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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
private AgendaEditor getAgendaEditor(Object model) {
MaintenanceDocumentForm maintenanceForm = (MaintenanceDocumentForm) model;
return (AgendaEditor) maintenanceForm.getDocument().getNewMaintainableObject().getDataObject();
} | AgendaEditor function(Object model) { MaintenanceDocumentForm maintenanceForm = (MaintenanceDocumentForm) model; return (AgendaEditor) maintenanceForm.getDocument().getNewMaintainableObject().getDataObject(); } | /**
* Get the AgendaEditor out of the MaintenanceDocumentForm's newMaintainableObject
*
* @param model the MaintenanceDocumentForm
* @return the AgendaEditor
*/ | Get the AgendaEditor out of the MaintenanceDocumentForm's newMaintainableObject | getAgendaEditor | {
"repo_name": "ricepanda/rice-git2",
"path": "rice-middleware/krms/impl/src/main/java/org/kuali/rice/krms/impl/ui/AgendaEditorMaintainable.java",
"license": "apache-2.0",
"size": 28658
} | [
"org.kuali.rice.krad.web.form.MaintenanceDocumentForm"
] | import org.kuali.rice.krad.web.form.MaintenanceDocumentForm; | import org.kuali.rice.krad.web.form.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 1,164,063 |
@Message(id = 187, value = "Get service target only supported in runtime operations")
IllegalStateException serviceTargetRuntimeOperationsOnly(); | @Message(id = 187, value = STR) IllegalStateException serviceTargetRuntimeOperationsOnly(); | /**
* Creates an exception indicating the get service target only supported in runtime operations.
*
* @return an {@link IllegalStateException} for the error.
*/ | Creates an exception indicating the get service target only supported in runtime operations | serviceTargetRuntimeOperationsOnly | {
"repo_name": "aloubyansky/wildfly-core",
"path": "controller/src/main/java/org/jboss/as/controller/logging/ControllerLogger.java",
"license": "lgpl-2.1",
"size": 164970
} | [
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 79,165 |
public static int countSections(final Assessment assessment) {
return assessment.getSections().size();
} | static int function(final Assessment assessment) { return assessment.getSections().size(); } | /**
* Counts the number of sections in this assessment.
*
* @param assessment
* @return Number of sections in this assessment.
*/ | Counts the number of sections in this assessment | countSections | {
"repo_name": "huihoo/olat",
"path": "OLAT-LMS/src/main/java/org/olat/lms/ims/qti/editor/QTIEditHelperEBL.java",
"license": "apache-2.0",
"size": 35428
} | [
"org.olat.lms.ims.qti.objects.Assessment"
] | import org.olat.lms.ims.qti.objects.Assessment; | import org.olat.lms.ims.qti.objects.*; | [
"org.olat.lms"
] | org.olat.lms; | 1,654,922 |
return starttime;
}
/**
* Legt den Wert der starttime-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link Duration } | return starttime; } /** * Legt den Wert der starttime-Eigenschaft fest. * * @param value * allowed object is * {@link Duration } | /**
* Ruft den Wert der starttime-Eigenschaft ab.
*
* @return
* possible object is
* {@link Duration }
*
*/ | Ruft den Wert der starttime-Eigenschaft ab | getStarttime | {
"repo_name": "castlabs/dashencrypt",
"path": "dash.xsd/src/main/java/mpeg/dash/schema/mpd/_2011/RangeType.java",
"license": "mpl-2.0",
"size": 2415
} | [
"javax.xml.datatype.Duration"
] | import javax.xml.datatype.Duration; | import javax.xml.datatype.*; | [
"javax.xml"
] | javax.xml; | 2,026,003 |
public Map<String, Class> usingResources() throws EvalError; | Map<String, Class> function() throws EvalError; | /**
* Declares resources the script will be using. Overdrive handles un/loading internally.
* Called on all scripts when a screen is created.
*/ | Declares resources the script will be using. Overdrive handles un/loading internally. Called on all scripts when a screen is created | usingResources | {
"repo_name": "kartoFlane/OverdriveGDX",
"path": "engine-core/src/main/java/com/ftloverdrive/script/OVDScript.java",
"license": "gpl-2.0",
"size": 1342
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,406,649 |
public ServiceReference getCommandReference(String name);
| ServiceReference function(String name); | /**
* Returns the service reference associated with the specified
* command name.
* @param name the name of the target command.
* @return the description of the specified command or null.
**/ | Returns the service reference associated with the specified command name | getCommandReference | {
"repo_name": "boneman1231/org.apache.felix",
"path": "trunk/shell/src/main/java/org/apache/felix/shell/ShellService.java",
"license": "apache-2.0",
"size": 4078
} | [
"org.osgi.framework.ServiceReference"
] | import org.osgi.framework.ServiceReference; | import org.osgi.framework.*; | [
"org.osgi.framework"
] | org.osgi.framework; | 1,569,827 |
public static File copyMediaToTempFile(Form form, String mediaPath)
throws IOException {
MediaSource mediaSource = determineMediaSource(form, mediaPath);
return copyMediaToTempFile(form, mediaPath, mediaSource);
}
| static File function(Form form, String mediaPath) throws IOException { MediaSource mediaSource = determineMediaSource(form, mediaPath); return copyMediaToTempFile(form, mediaPath, mediaSource); } | /**
* Copies the media specified by mediaPath to a temp file and returns the
* File.
*
* @param form the Form
* @param mediaPath the path to the media
*/ | Copies the media specified by mediaPath to a temp file and returns the File | copyMediaToTempFile | {
"repo_name": "ajhalbleib/aicg",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/util/MediaUtil.java",
"license": "mit",
"size": 17685
} | [
"com.google.appinventor.components.runtime.Form",
"java.io.File",
"java.io.IOException"
] | import com.google.appinventor.components.runtime.Form; import java.io.File; import java.io.IOException; | import com.google.appinventor.components.runtime.*; import java.io.*; | [
"com.google.appinventor",
"java.io"
] | com.google.appinventor; java.io; | 2,286,708 |
private Element createBasicColset(String pname) {
//1<color>
Element lcolset = mdocument.createElement("color");
lcolset.setAttribute("id", getUniqueId());
lcolset.setIdAttribute("id", true);
//1.A<id></id>
Element lid = mdocument.createElement("id");
lid.set... | Element function(String pname) { Element lcolset = mdocument.createElement("color"); lcolset.setAttribute("id", getUniqueId()); lcolset.setIdAttribute("id", true); Element lid = mdocument.createElement("id"); lid.setTextContent(pname); lcolset.appendChild(lid); return lcolset; } | /**
* Creates a new color set element, with the common structure to all sets.
*
* @param pname color set name
* @return new incomplete color set element.
*/ | Creates a new color set element, with the common structure to all sets | createBasicColset | {
"repo_name": "pcgomes/libcpntools",
"path": "src/main/java/stave/cpntools/CPNToolsNetFactory.java",
"license": "gpl-3.0",
"size": 39718
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 596,728 |
public static ArrayList<Ingredient> search(String keyword) {
keyword = keyword.toUpperCase();
//create new arraylist for the matched
ArrayList<Ingredient> match = new ArrayList<>(0);
int index;
//create new arraylist for the search queryies
ArrayList<String> query = n... | static ArrayList<Ingredient> function(String keyword) { keyword = keyword.toUpperCase(); ArrayList<Ingredient> match = new ArrayList<>(0); int index; ArrayList<String> query = new ArrayList<>(0); while (keyword.contains(",")) { index = keyword.indexOf(","); query.add(keyword.substring(0, index)); keyword = keyword.subs... | /**
* Searches the list of ingredients for the keyword
*
* @param keyword the word(s) to search with
* @return a list of the matches
*/ | Searches the list of ingredients for the keyword | search | {
"repo_name": "isaactsg/Nutrient-Calculator",
"path": "app/src/main/java/ics4u/ics4u_final_project/Database.java",
"license": "agpl-3.0",
"size": 33143
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 829,994 |
public java.util.List<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.FiniteIntRangeConstantHLAPI> getSubterm_finiteIntRanges_FiniteIntRangeConstantHLAPI(){
java.util.List<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.FiniteIntRangeConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.F... | java.util.List<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.FiniteIntRangeConstantHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.FiniteIntRangeConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.finiteIntRanges.hlapi.FiniteIntRangeConstantHLAPI>(); for (Term elemnt : getSubterm(... | /**
* This accessor return a list of encapsulated subelement, only of FiniteIntRangeConstantHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of FiniteIntRangeConstantHLAPI kind. WARNING : this method can creates a lot of new object in memory | getSubterm_finiteIntRanges_FiniteIntRangeConstantHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/finiteIntRanges/hlapi/GreaterThanHLAPI.java",
"license": "epl-1.0",
"size": 108747
} | [
"fr.lip6.move.pnml.hlpn.terms.Term",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 1,531,689 |
@FIXVersion(introduced="4.4")
public void setInstrumentExtension() {
throw new UnsupportedOperationException(getUnsupportedTagMessage());
} | @FIXVersion(introduced="4.4") void function() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); } | /**
* Message field setter.
*/ | Message field setter | setInstrumentExtension | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/SecurityStatusMsg.java",
"license": "gpl-3.0",
"size": 64007
} | [
"net.hades.fix.message.anno.FIXVersion"
] | import net.hades.fix.message.anno.FIXVersion; | import net.hades.fix.message.anno.*; | [
"net.hades.fix"
] | net.hades.fix; | 297,256 |
@CheckReturnValue
private SnapshotHierarchy startWatching(SnapshotHierarchy currentRoot, WatchMode watchMode, List<File> unsupportedFileSystems) {
try {
watchRegistry = watcherRegistryFactory.createFileWatcherRegistry(new FilterChangesToOutputsChangesHandler(locationsWrittenByCurrentBuild,
... | SnapshotHierarchy function(SnapshotHierarchy currentRoot, WatchMode watchMode, List<File> unsupportedFileSystems) { try { watchRegistry = watcherRegistryFactory.createFileWatcherRegistry(new FilterChangesToOutputsChangesHandler(locationsWrittenByCurrentBuild, new CompositeChangeHandler( new InvalidateVfsChangeHandler()... | /**
* Start watching the known areas of the file system for changes.
*/ | Start watching the known areas of the file system for changes | startWatching | {
"repo_name": "gradle/gradle",
"path": "subprojects/file-watching/src/main/java/org/gradle/internal/watch/vfs/impl/WatchingVirtualFileSystem.java",
"license": "apache-2.0",
"size": 25398
} | [
"java.io.File",
"java.util.List",
"org.gradle.internal.snapshot.SnapshotHierarchy",
"org.gradle.internal.watch.registry.WatchMode"
] | import java.io.File; import java.util.List; import org.gradle.internal.snapshot.SnapshotHierarchy; import org.gradle.internal.watch.registry.WatchMode; | import java.io.*; import java.util.*; import org.gradle.internal.snapshot.*; import org.gradle.internal.watch.registry.*; | [
"java.io",
"java.util",
"org.gradle.internal"
] | java.io; java.util; org.gradle.internal; | 906,970 |
public void updateAlertDefinition(StatAlertDefinition alertDefinition) {
if (logger.isDebugEnabled()) {
logger.debug("Entered AdminDistributedSystemJmxImpl.updateAlertDefinition(StatAlertDefinition) *****");
}
synchronized (ALERT_DEFINITIONS) {
ALERT_DEFINITIONS.put(Integer.valueOf(alertD... | void function(StatAlertDefinition alertDefinition) { if (logger.isDebugEnabled()) { logger.debug(STR); } synchronized (ALERT_DEFINITIONS) { ALERT_DEFINITIONS.put(Integer.valueOf(alertDefinition.getId()), alertDefinition); if (logger.isDebugEnabled()) { logger.debug(STR, alertDefinition.getId(), alertDefinition.getStrin... | /**
* This method can be used to update alert definition for the Stat mentioned.
* This method should update the collection maintained at the aggregator and
* should notify members for the newly added alert definitions.
* A new alert definition will be created if matching one not found.
*
* @param ... | This method can be used to update alert definition for the Stat mentioned. This method should update the collection maintained at the aggregator and should notify members for the newly added alert definitions. A new alert definition will be created if matching one not found | updateAlertDefinition | {
"repo_name": "ysung-pivotal/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java",
"license": "apache-2.0",
"size": 85240
} | [
"com.gemstone.gemfire.internal.admin.StatAlertDefinition"
] | import com.gemstone.gemfire.internal.admin.StatAlertDefinition; | import com.gemstone.gemfire.internal.admin.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 2,551,816 |
public Vector<String> getSubject() {
if (subject == null) {
getMessageIDs();
getInfo();
}
return this.subject;
} | Vector<String> function() { if (subject == null) { getMessageIDs(); getInfo(); } return this.subject; } | /**
* Will check to see if the subject has already been set, if not it will intialize the
* Vectors of this Bean with getMessageIDs and get Info
* @return Vector Strings either read, new or del
*/ | Will check to see if the subject has already been set, if not it will intialize the Vectors of this Bean with getMessageIDs and get Info | getSubject | {
"repo_name": "hexbinary/landing",
"path": "src/main/java/oscar/oscarMessenger/pageUtil/MsgDisplayMessagesBean.java",
"license": "gpl-2.0",
"size": 18995
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,951,900 |
public void reschedCards(long[] ids, int imin, int imax) {
ArrayList<Object[]> d = new ArrayList<Object[]>();
int t = mToday;
long mod = Utils.intNow();
Random rnd = new Random();
for (long id : ids) {
int r = rnd.nextInt(imax - imin + 1) + imin;
d.add... | void function(long[] ids, int imin, int imax) { ArrayList<Object[]> d = new ArrayList<Object[]>(); int t = mToday; long mod = Utils.intNow(); Random rnd = new Random(); for (long id : ids) { int r = rnd.nextInt(imax - imin + 1) + imin; d.add(new Object[] { Math.max(1, r), r + t, mCol.usn(), mod, 2500, id }); } removeLr... | /**
* Put cards in review queue with a new interval in days (min, max).
*
* @param ids The list of card ids to be affected
* @param imin the minimum interval (inclusive)
* @param imax The maximum interval (inclusive)
*/ | Put cards in review queue with a new interval in days (min, max) | reschedCards | {
"repo_name": "tanzoniteblack/Anki-Android",
"path": "src/com/ichi2/libanki/Sched.java",
"license": "gpl-3.0",
"size": 92902
} | [
"java.util.ArrayList",
"java.util.Random"
] | import java.util.ArrayList; import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 777,301 |
public String firstSeenUrlTagName() {
return TagSpecUtils.getTagSpecName(this.firstUrlSeenTag);
} | String function() { return TagSpecUtils.getTagSpecName(this.firstUrlSeenTag); } | /**
* The TagSpecName of the first seen URL. Do not call unless HasSeenUrl
* returns true.
*
* @return returns TagSpecName of the first seen URL.
*/ | The TagSpecName of the first seen URL. Do not call unless HasSeenUrl returns true | firstSeenUrlTagName | {
"repo_name": "ampproject/validator-java",
"path": "src/main/java/dev/amp/validator/Context.java",
"license": "apache-2.0",
"size": 25071
} | [
"dev.amp.validator.utils.TagSpecUtils"
] | import dev.amp.validator.utils.TagSpecUtils; | import dev.amp.validator.utils.*; | [
"dev.amp.validator"
] | dev.amp.validator; | 1,586,501 |
EAttribute getJoinTeamMessage_UserID(); | EAttribute getJoinTeamMessage_UserID(); | /**
* Returns the meta object for the attribute '{@link MessagesModel.JoinTeamMessage#getUserID <em>User ID</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>User ID</em>'.
* @see MessagesModel.JoinTeamMessage#getUserID()
* @see #getJoinTeamMessage()
... | Returns the meta object for the attribute '<code>MessagesModel.JoinTeamMessage#getUserID User ID</code>'. | getJoinTeamMessage_UserID | {
"repo_name": "Hu3bl/statsbot",
"path": "statsbot-parent/statsbot-module.messages.model/src/main/java/MessagesModel/ModelPackage.java",
"license": "mit",
"size": 147130
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 773,069 |
public SnapshottableDirectoryStatus[] getSnapshottableDirListing()
throws IOException {
SnapshottableDirectoryStatus[] status = null;
checkOperation(OperationCategory.READ);
boolean success = false;
readLock();
try {
checkOperation(OperationCategory.READ);
status = FSDirSnapshotO... | SnapshottableDirectoryStatus[] function() throws IOException { SnapshottableDirectoryStatus[] status = null; checkOperation(OperationCategory.READ); boolean success = false; readLock(); try { checkOperation(OperationCategory.READ); status = FSDirSnapshotOp.getSnapshottableDirListing(dir, snapshotManager); success = tru... | /**
* Get the list of snapshottable directories that are owned
* by the current user. Return all the snapshottable directories if the
* current user is a super user.
* @return The list of all the current snapshottable directories
* @throws IOException
*/ | Get the list of snapshottable directories that are owned by the current user. Return all the snapshottable directories if the current user is a super user | getSnapshottableDirListing | {
"repo_name": "jiayuhan-it/yarn-jyhtest",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java",
"license": "apache-2.0",
"size": 298813
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.SnapshottableDirectoryStatus",
"org.apache.hadoop.hdfs.server.namenode.NameNode"
] | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.SnapshottableDirectoryStatus; import org.apache.hadoop.hdfs.server.namenode.NameNode; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,455,236 |
void queryWritten(InetSocketAddress dnsServerAddress, ChannelFuture future); | void queryWritten(InetSocketAddress dnsServerAddress, ChannelFuture future); | /**
* The query has been written.
* @param dnsServerAddress The DNS server address which the query was sent to.
* @param future The future which represents the status of the write operation for the DNS query.
*/ | The query has been written | queryWritten | {
"repo_name": "NiteshKant/netty",
"path": "resolver-dns/src/main/java/io/netty/resolver/dns/DnsQueryLifecycleObserver.java",
"license": "apache-2.0",
"size": 4010
} | [
"io.netty.channel.ChannelFuture",
"java.net.InetSocketAddress"
] | import io.netty.channel.ChannelFuture; import java.net.InetSocketAddress; | import io.netty.channel.*; import java.net.*; | [
"io.netty.channel",
"java.net"
] | io.netty.channel; java.net; | 1,946,502 |
return (String) NMSWrapper.getInstance().exec(nmsObject, object);
} | return (String) NMSWrapper.getInstance().exec(nmsObject, object); } | /**
* TODO Find correct name
* @see net.minecraft.server.v1_9_R1.WhiteList#a(java.lang.Object)
*/ | TODO Find correct name | a | {
"repo_name": "Vilsol/NMSWrapper",
"path": "src/main/java/me/vilsol/nmswrapper/wraps/unparsed/NMSWhiteList.java",
"license": "apache-2.0",
"size": 1495
} | [
"me.vilsol.nmswrapper.NMSWrapper"
] | import me.vilsol.nmswrapper.NMSWrapper; | import me.vilsol.nmswrapper.*; | [
"me.vilsol.nmswrapper"
] | me.vilsol.nmswrapper; | 81,690 |
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
for (Map.Entry<String, ArrayList<String>> e : paramHashValues.entrySet()) {
sb.append(e.getKey()).append('=');
ArrayList<String> values = e.getValue();
for (String value : values) {
... | String function() { StringBuilder sb = new StringBuilder(); for (Map.Entry<String, ArrayList<String>> e : paramHashValues.entrySet()) { sb.append(e.getKey()).append('='); ArrayList<String> values = e.getValue(); for (String value : values) { sb.append(value).append(','); } sb.append('\n'); } return sb.toString(); } | /**
* Debug purpose
*/ | Debug purpose | toString | {
"repo_name": "plumer/codana",
"path": "tomcat_files/8.0.22/Parameters.java",
"license": "mit",
"size": 17617
} | [
"java.util.ArrayList",
"java.util.Map"
] | import java.util.ArrayList; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,826,668 |
public synchronized boolean remove( Principal user )
{
user = findMember( user.getName() );
if ( user == null )
return false;
m_members.remove( user );
return true;
} | synchronized boolean function( Principal user ) { user = findMember( user.getName() ); if ( user == null ) return false; m_members.remove( user ); return true; } | /**
* Removes a Principal from the group.
*
* @param user the principal to remove
* @return <code>true</code> if the operation was successful
*/ | Removes a Principal from the group | remove | {
"repo_name": "tateshitah/jspwiki",
"path": "jspwiki-war/src/main/java/org/apache/wiki/auth/authorize/Group.java",
"license": "apache-2.0",
"size": 8988
} | [
"java.security.Principal"
] | import java.security.Principal; | import java.security.*; | [
"java.security"
] | java.security; | 1,160,349 |
public static ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessmentDetails extractMiniNutritionalAssessmentDetails(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.MiniNutritionalAssessmentDetails valueObject)
{
return extractMiniNutritionalAssessmentDetails(domainFactory, val... | static ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessmentDetails function(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.MiniNutritionalAssessmentDetails valueObject) { return extractMiniNutritionalAssessmentDetails(domainFactory, valueObject, new HashMap()); } | /**
* Create the domain object from the value object.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param valueObject - extract the domain object fields from this.
*/ | Create the domain object from the value object | extractMiniNutritionalAssessmentDetails | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/nursing/vo/domain/MiniNutritionalAssessmentDetailsAssembler.java",
"license": "agpl-3.0",
"size": 17931
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,430,602 |
public QuerySpaces getQuerySpaces() {
return querySpaces;
} | QuerySpaces function() { return querySpaces; } | /**
* Provides subclasses access to the spaces to which this space belongs.
*
* @return The query spaces
*/ | Provides subclasses access to the spaces to which this space belongs | getQuerySpaces | {
"repo_name": "kevin-chen-hw/LDAE",
"path": "com.huawei.soa.ldae/src/main/java/org/hibernate/loader/plan/build/internal/spaces/AbstractQuerySpace.java",
"license": "lgpl-2.1",
"size": 3098
} | [
"org.hibernate.loader.plan.spi.QuerySpaces"
] | import org.hibernate.loader.plan.spi.QuerySpaces; | import org.hibernate.loader.plan.spi.*; | [
"org.hibernate.loader"
] | org.hibernate.loader; | 2,598,523 |
public static List<Marker> createSimpleMarkers(List<Feature> features) {
if (markerFactory == null) {
markerFactory = new MarkerFactory();
}
return markerFactory.createMarkers(features);
} | static List<Marker> function(List<Feature> features) { if (markerFactory == null) { markerFactory = new MarkerFactory(); } return markerFactory.createMarkers(features); } | /**
* Creates Unfolding's simple markers from features. (without the need to create a MarkerFactory)
*
* @param features
* The features to get markers for.
* @return A list of markers.
*/ | Creates Unfolding's simple markers from features. (without the need to create a MarkerFactory) | createSimpleMarkers | {
"repo_name": "hellodk/unfolding",
"path": "src/de/fhpotsdam/unfolding/utils/MapUtils.java",
"license": "mit",
"size": 3439
} | [
"de.fhpotsdam.unfolding.data.Feature",
"de.fhpotsdam.unfolding.data.MarkerFactory",
"de.fhpotsdam.unfolding.marker.Marker",
"java.util.List"
] | import de.fhpotsdam.unfolding.data.Feature; import de.fhpotsdam.unfolding.data.MarkerFactory; import de.fhpotsdam.unfolding.marker.Marker; import java.util.List; | import de.fhpotsdam.unfolding.data.*; import de.fhpotsdam.unfolding.marker.*; import java.util.*; | [
"de.fhpotsdam.unfolding",
"java.util"
] | de.fhpotsdam.unfolding; java.util; | 1,305,725 |
public void arm(ITextViewer viewer) {
disarm();
if (viewer == null)
throw new NullPointerException("editor"); //$NON-NLS-1$
fViewer= viewer;
addListeners(fViewer);
} | void function(ITextViewer viewer) { disarm(); if (viewer == null) throw new NullPointerException(STR); fViewer= viewer; addListeners(fViewer); } | /**
* Installs the receiver on <code>viewer</code> and arms it. After this call returns, any
* registered listeners will be notified if a compound edit ends.
*
* @param viewer the viewer to install on
*/ | Installs the receiver on <code>viewer</code> and arms it. After this call returns, any registered listeners will be notified if a compound edit ends | arm | {
"repo_name": "xiaguangme/simon_ide_tools",
"path": "02.eclipse_enhance/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/CompoundEditExitStrategy.java",
"license": "apache-2.0",
"size": 8619
} | [
"org.eclipse.jface.text.ITextViewer"
] | import org.eclipse.jface.text.ITextViewer; | import org.eclipse.jface.text.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 1,479,687 |
MockMvcRequestSpecification principal(Principal principal); | MockMvcRequestSpecification principal(Principal principal); | /**
* Authenticate using the given principal. This method simply delegates to {@link org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder#principal(java.security.Principal)}.
*
* @param principal The principal to use.
* @return The request specification
* @see org.springfr... | Authenticate using the given principal. This method simply delegates to <code>org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder#principal(java.security.Principal)</code> | principal | {
"repo_name": "lanwen/rest-assured",
"path": "modules/spring-mock-mvc/src/main/java/com/jayway/restassured/module/mockmvc/specification/MockMvcAuthenticationSpecification.java",
"license": "apache-2.0",
"size": 3802
} | [
"java.security.Principal"
] | import java.security.Principal; | import java.security.*; | [
"java.security"
] | java.security; | 1,114,278 |
@Override
public Set<Provider> getAllProviders() throws APIManagementException {
Set<Provider> providerSet = new HashSet<Provider>();
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(registry,
APIConstants.PROVIDER_KEY);
try {
if (artifactMa... | Set<Provider> function() throws APIManagementException { Set<Provider> providerSet = new HashSet<Provider>(); GenericArtifactManager artifactManager = APIUtil.getArtifactManager(registry, APIConstants.PROVIDER_KEY); try { if (artifactManager == null) { String errorMessage = STR; log.error(errorMessage); throw new APIMa... | /**
* Returns a list of all #{@link org.wso2.carbon.apimgt.api.model.Provider} available on the system.
*
* @return Set<Provider>
* @throws org.wso2.carbon.apimgt.api.APIManagementException if failed to get Providers
*/ | Returns a list of all #<code>org.wso2.carbon.apimgt.api.model.Provider</code> available on the system | getAllProviders | {
"repo_name": "malinthaprasan/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java",
"license": "apache-2.0",
"size": 479940
} | [
"java.util.HashSet",
"java.util.Set",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.model.Provider",
"org.wso2.carbon.apimgt.impl.utils.APIUtil",
"org.wso2.carbon.governance.api.exception.GovernanceException",
"org.wso2.carbon.governance.api.generic.GenericArtifactMana... | import java.util.HashSet; import java.util.Set; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.Provider; import org.wso2.carbon.apimgt.impl.utils.APIUtil; import org.wso2.carbon.governance.api.exception.GovernanceException; import org.wso2.carbon.governance.api.generic... | import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.utils.*; import org.wso2.carbon.governance.api.exception.*; import org.wso2.carbon.governance.api.generic.*; import org.wso2.carbon.governance.api.generic.dataobjects.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 262,451 |
public Enumeration listOptions() {
Vector newVector = new Vector(8);
newVector.addElement(new Option(
"\tWeight neighbours by the inverse of their distance\n"+
"\t(use when k > 1)",
"I", 0, "-I"));
newVector.addElement(new Option(
"\tWeight neighbours by 1 - their distance\n"... | Enumeration function() { Vector newVector = new Vector(8); newVector.addElement(new Option( STR+ STR, "I", 0, "-I")); newVector.addElement(new Option( STR+ STR, "F", 0, "-F")); newVector.addElement(new Option( STR+ STR, "K", 1,STR)); newVector.addElement(new Option( STR+ STR, "E", 0,"-E")); newVector.addElement(new Opt... | /**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/ | Returns an enumeration describing the available options | listOptions | {
"repo_name": "dsibournemouth/autoweka",
"path": "weka-3.7.7/src/main/java/weka/classifiers/lazy/IBk.java",
"license": "gpl-3.0",
"size": 32385
} | [
"java.util.Enumeration",
"java.util.Vector"
] | import java.util.Enumeration; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,884,405 |
public AssertQuery queryContains(Consumer<List> predicate1) {
final List<Object> list = new ArrayList<>();
addHook(Hook.QUERY_PLAN, list::add);
return withConnection(connection -> {
assertQuery(connection, sql, limit, materializationsEnabled,
hooks, null, null, null);
p... | AssertQuery function(Consumer<List> predicate1) { final List<Object> list = new ArrayList<>(); addHook(Hook.QUERY_PLAN, list::add); return withConnection(connection -> { assertQuery(connection, sql, limit, materializationsEnabled, hooks, null, null, null); predicate1.accept(list); }); } | /** Runs the query and applies a checker to the generated third-party
* queries. The checker should throw to fail the test if it does not see
* what it wants. This method can be used to check whether a particular
* MongoDB or SQL query is generated, for instance. */ | Runs the query and applies a checker to the generated third-party queries. The checker should throw to fail the test if it does not see what it wants. This method can be used to check whether a particular | queryContains | {
"repo_name": "jcamachor/calcite",
"path": "core/src/test/java/org/apache/calcite/test/CalciteAssert.java",
"license": "apache-2.0",
"size": 80435
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.function.Consumer",
"org.apache.calcite.runtime.Hook"
] | import java.util.ArrayList; import java.util.List; import java.util.function.Consumer; import org.apache.calcite.runtime.Hook; | import java.util.*; import java.util.function.*; import org.apache.calcite.runtime.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 1,906,416 |
private void restartDatanodes(int volTolerated, boolean manageDfsDirs)
throws IOException {
// Make sure no datanode is running
cluster.shutdownDataNodes();
conf.setInt(DFSConfigKeys.DFS_DATANODE_FAILED_VOLUMES_TOLERATED_KEY,
volTolerated);
cluster.startDataNodes(conf, 1, manageDfsDirs, ... | void function(int volTolerated, boolean manageDfsDirs) throws IOException { cluster.shutdownDataNodes(); conf.setInt(DFSConfigKeys.DFS_DATANODE_FAILED_VOLUMES_TOLERATED_KEY, volTolerated); cluster.startDataNodes(conf, 1, manageDfsDirs, null, null); cluster.waitActive(); } | /**
* Restart the datanodes with a new volume tolerated value.
*
* @param volTolerated
* number of dfs data dir failures to tolerate
* @param manageDfsDirs
* whether the mini cluster should manage data dirs
* @throws IOException
*/ | Restart the datanodes with a new volume tolerated value | restartDatanodes | {
"repo_name": "robzor92/hops",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailureToleration.java",
"license": "apache-2.0",
"size": 10572
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.DFSConfigKeys"
] | import java.io.IOException; import org.apache.hadoop.hdfs.DFSConfigKeys; | import java.io.*; import org.apache.hadoop.hdfs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,584,564 |
protected String extractProviderUserId(AccessGrant accessGrant) {
return null;
}
// internal helpers
| String function(AccessGrant accessGrant) { return null; } | /**
* Hook for extracting the providerUserId from the returned {@link AccessGrant}, if it is available.
* Default implementation returns null, indicating it is not exposed and another remote API call will be required to obtain it.
* Subclasses may override.
*/ | Hook for extracting the providerUserId from the returned <code>AccessGrant</code>, if it is available. Default implementation returns null, indicating it is not exposed and another remote API call will be required to obtain it. Subclasses may override | extractProviderUserId | {
"repo_name": "wooder79/spring-social_SOCIAL-196",
"path": "spring-social-core/src/main/java/org/springframework/social/connect/support/OAuth2ConnectionFactory.java",
"license": "apache-2.0",
"size": 4420
} | [
"org.springframework.social.oauth2.AccessGrant"
] | import org.springframework.social.oauth2.AccessGrant; | import org.springframework.social.oauth2.*; | [
"org.springframework.social"
] | org.springframework.social; | 901,752 |
Locale getLocale(); | Locale getLocale(); | /**
* Returns the current locale or {@code null} if no locale is in
* effect. The locale can be be used to provide localized
* {@linkplain Messager messages}.
*
* @return the current locale or {@code null} if no locale is in
* effect
*/ | Returns the current locale or null if no locale is in effect. The locale can be be used to provide localized Messager messages | getLocale | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/langtools/src/share/classes/javax/annotation/processing/ProcessingEnvironment.java",
"license": "gpl-2.0",
"size": 5193
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,274,655 |
private Object createValue(ExpressionContainerHandler cmpHandler) throws AuraValidationException {
Object result;
String raw = getRawValue();
Set<PropertyReference> propRefs = null;
if (type == TokenType.EXPRESSION) {
propRefs = Sets.newHashSetWithExpect... | Object function(ExpressionContainerHandler cmpHandler) throws AuraValidationException { Object result; String raw = getRawValue(); Set<PropertyReference> propRefs = null; if (type == TokenType.EXPRESSION) { propRefs = Sets.newHashSetWithExpectedSize(2); Expression e = AuraImpl.getExpressionAdapter().buildExpression(unw... | /**
* creates either a string or expression object out of this token,
* notifying the parent componentdef whenever an expression is found
*/ | creates either a string or expression object out of this token, notifying the parent componentdef whenever an expression is found | createValue | {
"repo_name": "lhong375/aura",
"path": "aura-impl/src/main/java/org/auraframework/impl/util/TextTokenizer.java",
"license": "apache-2.0",
"size": 12493
} | [
"com.google.common.collect.Sets",
"java.util.Set",
"java.util.regex.Matcher",
"org.auraframework.expression.Expression",
"org.auraframework.expression.PropertyReference",
"org.auraframework.impl.AuraImpl",
"org.auraframework.impl.expression.PropertyReferenceImpl",
"org.auraframework.impl.root.parser.h... | import com.google.common.collect.Sets; import java.util.Set; import java.util.regex.Matcher; import org.auraframework.expression.Expression; import org.auraframework.expression.PropertyReference; import org.auraframework.impl.AuraImpl; import org.auraframework.impl.expression.PropertyReferenceImpl; import org.auraframe... | import com.google.common.collect.*; import java.util.*; import java.util.regex.*; import org.auraframework.expression.*; import org.auraframework.impl.*; import org.auraframework.impl.expression.*; import org.auraframework.impl.root.parser.handler.*; import org.auraframework.throwable.quickfix.*; | [
"com.google.common",
"java.util",
"org.auraframework.expression",
"org.auraframework.impl",
"org.auraframework.throwable"
] | com.google.common; java.util; org.auraframework.expression; org.auraframework.impl; org.auraframework.throwable; | 1,661,666 |
public ResourceId getResourceId() {
return getExtension(ResourceId.class);
} | ResourceId function() { return getExtension(ResourceId.class); } | /**
* Returns the Sidewiki author id.
*
* @return Sidewiki author id
*/ | Returns the Sidewiki author id | getResourceId | {
"repo_name": "ermh/Gdata-mavenized",
"path": "java/src/com/google/gdata/data/sidewiki/SidewikiEntry.java",
"license": "apache-2.0",
"size": 5372
} | [
"com.google.gdata.data.extensions.ResourceId"
] | import com.google.gdata.data.extensions.ResourceId; | import com.google.gdata.data.extensions.*; | [
"com.google.gdata"
] | com.google.gdata; | 116,341 |
public void onRequestEnd(cfSession Session) {
cfSessionData sessData = getSessionData( Session );
if ( sessData == null )
return;
try{
Document keys = new Document("_id", appName + sessData.getStorageID() );
Document vals = new Document("et", new Date(System.currentTimeMillis() + sessData.getTimeOut... | void function(cfSession Session) { cfSessionData sessData = getSessionData( Session ); if ( sessData == null ) return; try{ Document keys = new Document("_id", appName + sessData.getStorageID() ); Document vals = new Document("et", new Date(System.currentTimeMillis() + sessData.getTimeOut() ) ); ByteArrayOutputStreamRa... | /**
* Need to page the session out to Mongo
* @param session
*/ | Need to page the session out to Mongo | onRequestEnd | {
"repo_name": "OpenBD/openbd-core",
"path": "src/com/naryx/tagfusion/cfm/application/sessionstorage/SessionStorageMongoImpl.java",
"license": "gpl-3.0",
"size": 7225
} | [
"com.mongodb.client.model.UpdateOptions",
"java.util.Date",
"org.aw20.io.ByteArrayOutputStreamRaw",
"org.aw20.io.FileUtil",
"org.bson.Document"
] | import com.mongodb.client.model.UpdateOptions; import java.util.Date; import org.aw20.io.ByteArrayOutputStreamRaw; import org.aw20.io.FileUtil; import org.bson.Document; | import com.mongodb.client.model.*; import java.util.*; import org.aw20.io.*; import org.bson.*; | [
"com.mongodb.client",
"java.util",
"org.aw20.io",
"org.bson"
] | com.mongodb.client; java.util; org.aw20.io; org.bson; | 1,390,063 |
@ApiModelProperty(example = "null", value = "")
public Map<String, RelationTranslation> getRelations() {
return relations;
} | @ApiModelProperty(example = "null", value = "") Map<String, RelationTranslation> function() { return relations; } | /**
* Get relations
* @return relations
**/ | Get relations | getRelations | {
"repo_name": "leanix/leanix-sdk-java",
"path": "src/main/java/net/leanix/api/models/DataModelTranslation.java",
"license": "mit",
"size": 5059
} | [
"io.swagger.annotations.ApiModelProperty",
"java.util.Map",
"net.leanix.api.models.RelationTranslation"
] | import io.swagger.annotations.ApiModelProperty; import java.util.Map; import net.leanix.api.models.RelationTranslation; | import io.swagger.annotations.*; import java.util.*; import net.leanix.api.models.*; | [
"io.swagger.annotations",
"java.util",
"net.leanix.api"
] | io.swagger.annotations; java.util; net.leanix.api; | 1,015,444 |
public Mapping getMapping() {
return m_mapping;
} | Mapping function() { return m_mapping; } | /**
* Get the mapping to use for decoding the row
*
* @return the mapping to use
*/ | Get the mapping to use for decoding the row | getMapping | {
"repo_name": "m-a-hall/big-data-plugin",
"path": "kettle-plugins/hbase/src/main/java/org/pentaho/big/data/kettle/plugins/hbase/output/HBaseOutputMeta.java",
"license": "apache-2.0",
"size": 13313
} | [
"org.pentaho.bigdata.api.hbase.mapping.Mapping"
] | import org.pentaho.bigdata.api.hbase.mapping.Mapping; | import org.pentaho.bigdata.api.hbase.mapping.*; | [
"org.pentaho.bigdata"
] | org.pentaho.bigdata; | 335,365 |
private IPreferenceStore createCombinedPreferenceStore(IEditorInput input) {
List<IPreferenceStore> stores = new ArrayList<IPreferenceStore>(3);
// IJavaProject project= EditorUtility.getJavaProject(input);
// if (project != null) {
// stores.add(new EclipsePreferencesAdapter(new
// ProjectScope(project.g... | IPreferenceStore function(IEditorInput input) { List<IPreferenceStore> stores = new ArrayList<IPreferenceStore>(3); stores.add(VdmUIPlugin.getDefault().getPreferenceStore()); stores.add(EditorsUI.getPreferenceStore()); stores.add(PlatformUI.getPreferenceStore()); return new ChainedPreferenceStore( (IPreferenceStore[]) ... | /**
* Creates and returns the preference store for this Java editor with the
* given input.
*
* @param input
* The editor input for which to create the preference store
* @return the preference store for this editor
* @since 3.0
*/ | Creates and returns the preference store for this Java editor with the given input | createCombinedPreferenceStore | {
"repo_name": "LasseBP/overture",
"path": "ide/ui/src/main/java/org/overture/ide/ui/editor/core/VdmEditor.java",
"license": "gpl-3.0",
"size": 28465
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.jface.preference.IPreferenceStore",
"org.eclipse.ui.IEditorInput",
"org.eclipse.ui.PlatformUI",
"org.eclipse.ui.editors.text.EditorsUI",
"org.eclipse.ui.texteditor.ChainedPreferenceStore",
"org.overture.ide.ui.VdmUIPlugin"
] | import java.util.ArrayList; import java.util.List; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.editors.text.EditorsUI; import org.eclipse.ui.texteditor.ChainedPreferenceStore; import org.overture.ide.ui.VdmUIPlugin; | import java.util.*; import org.eclipse.jface.preference.*; import org.eclipse.ui.*; import org.eclipse.ui.editors.text.*; import org.eclipse.ui.texteditor.*; import org.overture.ide.ui.*; | [
"java.util",
"org.eclipse.jface",
"org.eclipse.ui",
"org.overture.ide"
] | java.util; org.eclipse.jface; org.eclipse.ui; org.overture.ide; | 399,956 |
public void join() {
if (this.regionThreads != null) {
for(Thread t: this.regionThreads) {
if (t.isAlive()) {
try {
Threads.threadDumpingIsAlive(t);
} catch (InterruptedException e) {
LOG.debug("Interrupted", e);
}
}
}
}
if ... | void function() { if (this.regionThreads != null) { for(Thread t: this.regionThreads) { if (t.isAlive()) { try { Threads.threadDumpingIsAlive(t); } catch (InterruptedException e) { LOG.debug(STR, e); } } } } if (this.masterThreads != null) { for (Thread t : this.masterThreads) { if (t.isAlive()) { try { Threads.threadD... | /**
* Wait for Mini HBase Cluster to shut down.
* Presumes you've already called {@link #shutdown()}.
*/ | Wait for Mini HBase Cluster to shut down. Presumes you've already called <code>#shutdown()</code> | join | {
"repo_name": "mahak/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java",
"license": "apache-2.0",
"size": 17154
} | [
"org.apache.hadoop.hbase.util.Threads"
] | import org.apache.hadoop.hbase.util.Threads; | import org.apache.hadoop.hbase.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,909,636 |
private void logExitStatus( Result result, Class<?> mainClass, NoExitSecurityManager.NoExitSecurityException ex ) {
// Only error if exit code is not 0
if ( ex.getStatus() != 0 ) {
result.setStopped( true );
result.setNrErrors( 1 );
result.setResult( false );
logError( BaseMessages.get... | void function( Result result, Class<?> mainClass, NoExitSecurityManager.NoExitSecurityException ex ) { if ( ex.getStatus() != 0 ) { result.setStopped( true ); result.setNrErrors( 1 ); result.setResult( false ); logError( BaseMessages.getString( PKG, STR, mainClass.getName(), ex .getStatus() ) ); } } | /**
* Log the status of an attempt to exit the JVM while executing the provided class' main method.
*
* @param result
* Result to update with failure condition if exit status code was not 0
* @param mainClass
* Main class we were executing
* @param ex
* Exception caug... | Log the status of an attempt to exit the JVM while executing the provided class' main method | logExitStatus | {
"repo_name": "AndreyBurikhin/big-data-plugin",
"path": "src/org/pentaho/di/job/entries/hadoopjobexecutor/JobEntryHadoopJobExecutor.java",
"license": "apache-2.0",
"size": 38559
} | [
"org.pentaho.di.core.Result",
"org.pentaho.di.i18n.BaseMessages"
] | import org.pentaho.di.core.Result; import org.pentaho.di.i18n.BaseMessages; | import org.pentaho.di.core.*; import org.pentaho.di.i18n.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 760,016 |
private DataRegionConfiguration createMetastoreDataRegionConfig(DataStorageConfiguration storageCfg) {
DataRegionConfiguration cfg = new DataRegionConfiguration();
cfg.setName(METASTORE_DATA_REGION_NAME);
cfg.setInitialSize(storageCfg.getSystemRegionInitialSize());
cfg.setMaxSize(st... | DataRegionConfiguration function(DataStorageConfiguration storageCfg) { DataRegionConfiguration cfg = new DataRegionConfiguration(); cfg.setName(METASTORE_DATA_REGION_NAME); cfg.setInitialSize(storageCfg.getSystemRegionInitialSize()); cfg.setMaxSize(storageCfg.getSystemRegionMaxSize()); cfg.setPersistenceEnabled(true);... | /**
* Create metastorage data region configuration with enabled persistence by default.
*
* @param storageCfg Data storage configuration.
* @return Data region configuration.
*/ | Create metastorage data region configuration with enabled persistence by default | createMetastoreDataRegionConfig | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java",
"license": "apache-2.0",
"size": 127324
} | [
"org.apache.ignite.configuration.DataRegionConfiguration",
"org.apache.ignite.configuration.DataStorageConfiguration"
] | import org.apache.ignite.configuration.DataRegionConfiguration; import org.apache.ignite.configuration.DataStorageConfiguration; | import org.apache.ignite.configuration.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 827,724 |
public void run(final String args[]) {
final List files = new LinkedList();
final List archives = new LinkedList();
boolean archivesAsInput = false;
String outputArchiveFileName = null;
for (int i = 0; i < args.length; ++i) {
final String s = args[i];
... | void function(final String args[]) { final List files = new LinkedList(); final List archives = new LinkedList(); boolean archivesAsInput = false; String outputArchiveFileName = null; for (int i = 0; i < args.length; ++i) { final String s = args[i]; if (s.equals("-b") s.equalsIgnoreCase(STR) s.equalsIgnoreCase(STR)) { ... | /**
* This method takes command line arguments one by one and passes them to
* {@link #processDataFile} or {@link #processArchive}.
*
* @param args the command line arguments.
*/ | This method takes command line arguments one by one and passes them to <code>#processDataFile</code> or <code>#processArchive</code> | run | {
"repo_name": "BackupTheBerlios/gavrog",
"path": "src/org/gavrog/apps/systre/SystreCmdline.java",
"license": "apache-2.0",
"size": 42275
} | [
"java.io.BufferedWriter",
"java.io.FileWriter",
"java.io.IOException",
"java.util.Iterator",
"java.util.LinkedList",
"java.util.List",
"org.gavrog.joss.geometry.SpaceGroupCatalogue"
] | import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import org.gavrog.joss.geometry.SpaceGroupCatalogue; | import java.io.*; import java.util.*; import org.gavrog.joss.geometry.*; | [
"java.io",
"java.util",
"org.gavrog.joss"
] | java.io; java.util; org.gavrog.joss; | 678,435 |
@Test
public void testGetAllFilesFromDefaultDir() {
List<File> fileList = example.getAllFilesFromDefaultDir();
if (fileList == null) {
System.out.println("No file exist in default directory");
} else {
boolean flag = false;
for (File myFile : fileList) {
System.out.println(myFile);
i... | void function() { List<File> fileList = example.getAllFilesFromDefaultDir(); if (fileList == null) { System.out.println(STR); } else { boolean flag = false; for (File myFile : fileList) { System.out.println(myFile); if (myFile.getName().equals(file.getName())) { flag = true; } } assertTrue(flag); } } | /**
* Test method for {@link com.sanjay.examples.singleton.Example1#getAllFilesFromDefaultDir()}.
*/ | Test method for <code>com.sanjay.examples.singleton.Example1#getAllFilesFromDefaultDir()</code> | testGetAllFilesFromDefaultDir | {
"repo_name": "SanjayMadnani/singleton.sample",
"path": "SingletonExamples/src/test/com/sanjay/singleton/examples/Example1Test.java",
"license": "gpl-3.0",
"size": 2391
} | [
"java.io.File",
"java.util.List",
"org.junit.Assert"
] | import java.io.File; import java.util.List; import org.junit.Assert; | import java.io.*; import java.util.*; import org.junit.*; | [
"java.io",
"java.util",
"org.junit"
] | java.io; java.util; org.junit; | 2,329,691 |
public TextBox getEndPatternTextBox() {
return endPattern;
} | TextBox function() { return endPattern; } | /**
* To get End Pattern Text Box.
*
* @return TextBox
*/ | To get End Pattern Text Box | getEndPatternTextBox | {
"repo_name": "kuzavas/ephesoft",
"path": "dcma-gwt/dcma-gwt-admin/src/main/java/com/ephesoft/dcma/gwt/admin/bm/client/view/tableinfo/EditTableInfoView.java",
"license": "agpl-3.0",
"size": 21397
} | [
"com.google.gwt.user.client.ui.TextBox"
] | import com.google.gwt.user.client.ui.TextBox; | import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,004,713 |
public void appendToDoc(String text, Font f, Color fg, Color bg,
boolean underline, boolean setFG) {
if (text!=null) {
// Set font to use, if different from last addition.
int fontIndex = f==null ? 0 : (getFontIndex(fontList, f)+1);
if (fontIndex!=lastFontIndex) {
document.append("\\f... | void function(String text, Font f, Color fg, Color bg, boolean underline, boolean setFG) { if (text!=null) { int fontIndex = f==null ? 0 : (getFontIndex(fontList, f)+1); if (fontIndex!=lastFontIndex) { document.append("\\f").append(fontIndex); lastFontIndex = fontIndex; lastWasControlWord = true; } if (f!=null) { int f... | /**
* Appends styled text to the RTF document being generated.
*
* @param text The text to append.
* @param f The font of the text. If this is <code>null</code>, the
* default font is used.
* @param fg The foreground of the text. If this is <code>null</code>,
* the default foregroun... | Appends styled text to the RTF document being generated | appendToDoc | {
"repo_name": "Nanonid/RSyntaxTextArea",
"path": "src/org/fife/ui/rsyntaxtextarea/RtfGenerator.java",
"license": "bsd-3-clause",
"size": 13823
} | [
"java.awt.Color",
"java.awt.Font"
] | import java.awt.Color; import java.awt.Font; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,900,067 |
public final void setJdoTemplate(JdoTemplate jdoTemplate) {
this.jdoTemplate = jdoTemplate;
} | final void function(JdoTemplate jdoTemplate) { this.jdoTemplate = jdoTemplate; } | /**
* Set the JdoTemplate for this DAO explicitly,
* as an alternative to specifying a PersistenceManagerFactory.
* @see #setPersistenceManagerFactory
*/ | Set the JdoTemplate for this DAO explicitly, as an alternative to specifying a PersistenceManagerFactory | setJdoTemplate | {
"repo_name": "cbeams-archive/spring-framework-2.5.x",
"path": "src/org/springframework/orm/jdo/support/JdoDaoSupport.java",
"license": "apache-2.0",
"size": 7014
} | [
"org.springframework.orm.jdo.JdoTemplate"
] | import org.springframework.orm.jdo.JdoTemplate; | import org.springframework.orm.jdo.*; | [
"org.springframework.orm"
] | org.springframework.orm; | 1,030,432 |
protected Principal getPrincipal(String username) {
Account user = null;
try {
user = service.getAccount(username);
} catch (XMLDBException e) {
}
if (user == null) {
user = defaultUser;
}
// Accumulate the list of roles for this user
ArrayList<String> list = new ArrayList<String>();
... | Principal function(String username) { Account user = null; try { user = service.getAccount(username); } catch (XMLDBException e) { } if (user == null) { user = defaultUser; } ArrayList<String> list = new ArrayList<String>(); String[] groups = user.getGroups(); for (int i = 0; i < groups.length; i++) { list.add(groups[i... | /**
* Return the Principal associated with the given user name.
*/ | Return the Principal associated with the given user name | getPrincipal | {
"repo_name": "shabanovd/exist",
"path": "extensions/tomcat-realm/src/org/exist/http/realm/XmldbRealm.java",
"license": "lgpl-2.1",
"size": 7578
} | [
"java.security.Principal",
"java.util.ArrayList",
"java.util.List",
"org.apache.catalina.Realm",
"org.apache.catalina.realm.GenericPrincipal",
"org.exist.security.Account",
"org.exist.security.XmldbPrincipal",
"org.xmldb.api.base.XMLDBException"
] | import java.security.Principal; import java.util.ArrayList; import java.util.List; import org.apache.catalina.Realm; import org.apache.catalina.realm.GenericPrincipal; import org.exist.security.Account; import org.exist.security.XmldbPrincipal; import org.xmldb.api.base.XMLDBException; | import java.security.*; import java.util.*; import org.apache.catalina.*; import org.apache.catalina.realm.*; import org.exist.security.*; import org.xmldb.api.base.*; | [
"java.security",
"java.util",
"org.apache.catalina",
"org.exist.security",
"org.xmldb.api"
] | java.security; java.util; org.apache.catalina; org.exist.security; org.xmldb.api; | 108,729 |
protected void importLegacySettings(@NotNull CodeStyleSettings rootSettings) {
}
protected void beforeLoading() {} | void function(@NotNull CodeStyleSettings rootSettings) { } protected void beforeLoading() {} | /**
* For compatibility with old code style settings stored in CodeStyleSettings.
*/ | For compatibility with old code style settings stored in CodeStyleSettings | importLegacySettings | {
"repo_name": "goodwinnk/intellij-community",
"path": "platform/lang-api/src/com/intellij/psi/codeStyle/CustomCodeStyleSettings.java",
"license": "apache-2.0",
"size": 3464
} | [
"org.jetbrains.annotations.NotNull"
] | import org.jetbrains.annotations.NotNull; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 1,258,714 |
public Response exportBillingData(POBillingDataExport exportParam)
throws NoBilingSharesDataAvailableException,
OrganizationAuthoritiesException; | Response function(POBillingDataExport exportParam) throws NoBilingSharesDataAvailableException, OrganizationAuthoritiesException; | /**
* triggers data export for customer billing data
* <p>
* Required roles: manager of the supplier or reseller organization
* <p>
* if successful:
*
* - return POBillingDataExport in Result
*
* @param exportParam
* holding period and customerIds for expor... | triggers data export for customer billing data Required roles: manager of the supplier or reseller organization if successful: - return POBillingDataExport in Result | exportBillingData | {
"repo_name": "opetrovski/development",
"path": "oscm-internal-interfaces/javasrc/org/oscm/internal/billingdataexport/ExportBillingDataService.java",
"license": "apache-2.0",
"size": 3643
} | [
"org.oscm.internal.components.response.Response",
"org.oscm.internal.types.exception.OrganizationAuthoritiesException",
"org.oscm.internal.types.exceptions.NoBilingSharesDataAvailableException"
] | import org.oscm.internal.components.response.Response; import org.oscm.internal.types.exception.OrganizationAuthoritiesException; import org.oscm.internal.types.exceptions.NoBilingSharesDataAvailableException; | import org.oscm.internal.components.response.*; import org.oscm.internal.types.exception.*; import org.oscm.internal.types.exceptions.*; | [
"org.oscm.internal"
] | org.oscm.internal; | 1,547,514 |
public List<TimeAlarm> getAllTimeAlarms() {
SQLiteDatabase db = this.getReadableDatabase();
List<TimeAlarm> list = new LinkedList<TimeAlarm>();
Cursor cursor = db.query(TABLE_TIME_ALARMS, new String[]{
COLUMN_TIME_ALARMS_ID, COLUMN_TIME_ALARMS_DATE}, null, null,
null, null, null);
if (cursor.moveToF... | List<TimeAlarm> function() { SQLiteDatabase db = this.getReadableDatabase(); List<TimeAlarm> list = new LinkedList<TimeAlarm>(); Cursor cursor = db.query(TABLE_TIME_ALARMS, new String[]{ COLUMN_TIME_ALARMS_ID, COLUMN_TIME_ALARMS_DATE}, null, null, null, null, null); if (cursor.moveToFirst()) { do { TimeAlarm object = n... | /**
* Returns a list with all the TimeAlarms in the database
*
* @return
*/ | Returns a list with all the TimeAlarms in the database | getAllTimeAlarms | {
"repo_name": "simonjrp/ESCAPE",
"path": "ESCAPE/src/se/chalmers/dat255/group22/escape/database/DBHandler.java",
"license": "gpl-3.0",
"size": 53985
} | [
"android.database.Cursor",
"android.database.sqlite.SQLiteDatabase",
"java.sql.Date",
"java.util.LinkedList",
"java.util.List",
"se.chalmers.dat255.group22.escape.objects.TimeAlarm"
] | import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.sql.Date; import java.util.LinkedList; import java.util.List; import se.chalmers.dat255.group22.escape.objects.TimeAlarm; | import android.database.*; import android.database.sqlite.*; import java.sql.*; import java.util.*; import se.chalmers.dat255.group22.escape.objects.*; | [
"android.database",
"java.sql",
"java.util",
"se.chalmers.dat255"
] | android.database; java.sql; java.util; se.chalmers.dat255; | 165,834 |
@Override
public double getY() {
return getValue(Property.Y, Undefined.DOUBLE);
}
| double function() { return getValue(Property.Y, Undefined.DOUBLE); } | /**
* Returns the Y location of event in pixel.
*
* @return the Y location of event in pixel.
*/ | Returns the Y location of event in pixel | getY | {
"repo_name": "pepstock-org/Charba",
"path": "src/org/pepstock/charba/client/events/ChartEventContext.java",
"license": "apache-2.0",
"size": 6616
} | [
"org.pepstock.charba.client.items.Undefined"
] | import org.pepstock.charba.client.items.Undefined; | import org.pepstock.charba.client.items.*; | [
"org.pepstock.charba"
] | org.pepstock.charba; | 1,986,182 |
@Basic(invars = @Expression("locale != null"))
public Locale getLocale() {
return $locale;
}
private final Locale $locale; | @Basic(invars = @Expression(STR)) Locale function() { return $locale; } private final Locale $locale; | /**
* The locale of this address.
*/ | The locale of this address | getLocale | {
"repo_name": "jandppw/ppwcode-recovered-from-google-code",
"path": "java/value/dev/d20081208-0925/src/main/java/org/ppwcode/value_III/location/PostalAddress.java",
"license": "apache-2.0",
"size": 16727
} | [
"java.util.Locale",
"org.toryt.annotations_I.Basic",
"org.toryt.annotations_I.Expression"
] | import java.util.Locale; import org.toryt.annotations_I.Basic; import org.toryt.annotations_I.Expression; | import java.util.*; import org.toryt.*; | [
"java.util",
"org.toryt"
] | java.util; org.toryt; | 641,832 |
private void finishLoadingArtifacts(InputStream in)
throws InvalidFormatException, IOException {
final ZipInputStream zip = new ZipInputStream(in);
Map<String, Object> artifactMap = new HashMap<String, Object>();
ZipEntry entry;
while((entry = zip.getNextEntry()) != null ) {
// Note: T... | void function(InputStream in) throws InvalidFormatException, IOException { final ZipInputStream zip = new ZipInputStream(in); Map<String, Object> artifactMap = new HashMap<String, Object>(); ZipEntry entry; while((entry = zip.getNextEntry()) != null ) { String entryName = entry.getName(); String extension = getEntryExt... | /**
* Finish loading the artifacts now that it knows all serializers.
*/ | Finish loading the artifacts now that it knows all serializers | finishLoadingArtifacts | {
"repo_name": "Eagles2F/opennlp",
"path": "opennlp-tools/src/main/java/opennlp/tools/util/model/BaseModel.java",
"license": "apache-2.0",
"size": 21277
} | [
"java.io.IOException",
"java.io.InputStream",
"java.util.HashMap",
"java.util.Map",
"java.util.zip.ZipEntry",
"java.util.zip.ZipInputStream"
] | import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import java.util.Map; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; | import java.io.*; import java.util.*; import java.util.zip.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 499,595 |
@Test
public void testSlotReportDoesNotContainStaleInformation() throws Exception {
final OneShotLatch receivedSlotRequest = new OneShotLatch();
final CompletableFuture<Void> verifySlotReportFuture = new CompletableFuture<>();
final OneShotLatch terminateSlotReportVerification = new OneShotLatch();
final Te... | void function() throws Exception { final OneShotLatch receivedSlotRequest = new OneShotLatch(); final CompletableFuture<Void> verifySlotReportFuture = new CompletableFuture<>(); final OneShotLatch terminateSlotReportVerification = new OneShotLatch(); final TestingResourceManagerGateway testingResourceManagerGateway = n... | /**
* Tests that the {@link SlotReport} sent to the RM does not contain
* out dated/stale information as slots are being requested from the
* TM.
*
* <p>This is a probabilistic test case and needs to be executed
* several times to produce a failure without the fix for FLINK-12865.
*/ | Tests that the <code>SlotReport</code> sent to the RM does not contain out dated/stale information as slots are being requested from the TM. This is a probabilistic test case and needs to be executed several times to produce a failure without the fix for FLINK-12865 | testSlotReportDoesNotContainStaleInformation | {
"repo_name": "tzulitai/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorTest.java",
"license": "apache-2.0",
"size": 87998
} | [
"java.util.ArrayList",
"java.util.concurrent.CompletableFuture",
"java.util.concurrent.ScheduledExecutorService",
"java.util.concurrent.TimeUnit",
"org.apache.flink.core.testutils.OneShotLatch",
"org.apache.flink.runtime.clusterframework.types.AllocationID",
"org.apache.flink.runtime.clusterframework.ty... | import java.util.ArrayList; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import org.apache.flink.core.testutils.OneShotLatch; import org.apache.flink.runtime.clusterframework.types.AllocationID; import org.apache.flink.runtime... | import java.util.*; import java.util.concurrent.*; import org.apache.flink.core.testutils.*; import org.apache.flink.runtime.clusterframework.types.*; import org.apache.flink.runtime.concurrent.*; import org.apache.flink.runtime.messages.*; import org.apache.flink.runtime.resourcemanager.utils.*; import org.apache.flin... | [
"java.util",
"org.apache.flink",
"org.hamcrest",
"org.junit"
] | java.util; org.apache.flink; org.hamcrest; org.junit; | 1,347,936 |
protected void addSelected(RenderableDataItem item) {
if (itemAttributes == null) {
itemAttributes = new ItemAttributes();
}
itemAttributes.addSelected(item);
} | void function(RenderableDataItem item) { if (itemAttributes == null) { itemAttributes = new ItemAttributes(); } itemAttributes.addSelected(item); } | /**
* Adds the specified item to this widget selected item set. This method is
* called when an item is created from a DataItem configuration object
*
* @param item
* the item to add
*/ | Adds the specified item to this widget selected item set. This method is called when an item is created from a DataItem configuration object | addSelected | {
"repo_name": "appnativa/rare",
"path": "source/rare/core/com/appnativa/rare/widget/aWidget.java",
"license": "gpl-3.0",
"size": 150848
} | [
"com.appnativa.rare.ui.RenderableDataItem"
] | import com.appnativa.rare.ui.RenderableDataItem; | import com.appnativa.rare.ui.*; | [
"com.appnativa.rare"
] | com.appnativa.rare; | 1,640,464 |
@Nullable
static UfsJournalFile decodeCheckpointFile(UfsJournal journal, String filename) {
URI location = URIUtils.appendPathOrDie(journal.getCheckpointDir(), filename);
try {
String[] parts = filename.split("-");
// There can be temporary files in logs directory. Skip them.
if (parts.le... | static UfsJournalFile decodeCheckpointFile(UfsJournal journal, String filename) { URI location = URIUtils.appendPathOrDie(journal.getCheckpointDir(), filename); try { String[] parts = filename.split("-"); if (parts.length != 2) { return null; } long start = Long.decode(parts[0]); long end = Long.decode(parts[1]); Preco... | /**
* Decodes a checkpoint file name into a {@link UfsJournalFile}.
*
* @param journal the UFS journal instance
* @param filename the filename
* @return the instance of {@link UfsJournalFile}, null if the file invalid
*/ | Decodes a checkpoint file name into a <code>UfsJournalFile</code> | decodeCheckpointFile | {
"repo_name": "PasaLab/tachyon",
"path": "core/server/common/src/main/java/alluxio/master/journal/ufs/UfsJournalFile.java",
"license": "apache-2.0",
"size": 8773
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,102,344 |
public void setValue(Set<? extends File> value) {
setValueInternal(decode(value));
} | void function(Set<? extends File> value) { setValueInternal(decode(value)); } | /**
* Mutator for this setting.
*
* @param value the value to store
*/ | Mutator for this setting | setValue | {
"repo_name": "alejandroarturom/frostwire-desktop",
"path": "src/org/limewire/setting/FileSetSetting.java",
"license": "gpl-3.0",
"size": 4041
} | [
"java.io.File",
"java.util.Set"
] | import java.io.File; import java.util.Set; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 294,423 |
protected synchronized void addRecord(String id) throws IOException {
writer.append(id);
writer.newLine();
writer.flush();
LOG.debug("Added record {}", id);
} | synchronized void function(String id) throws IOException { writer.append(id); writer.newLine(); writer.flush(); LOG.debug(STR, id); } | /**
* Add a blob id to the tracking file.
*
* @param id id to track
* @throws IOException
*/ | Add a blob id to the tracking file | addRecord | {
"repo_name": "yesil/jackrabbit-oak",
"path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/BlobIdTracker.java",
"license": "apache-2.0",
"size": 24059
} | [
"java.io.IOException",
"org.apache.jackrabbit.oak.commons.FileIOUtils"
] | import java.io.IOException; import org.apache.jackrabbit.oak.commons.FileIOUtils; | import java.io.*; import org.apache.jackrabbit.oak.commons.*; | [
"java.io",
"org.apache.jackrabbit"
] | java.io; org.apache.jackrabbit; | 84,133 |
@Override
public Iterator findEntitiesForGroup(IEntityGroup group) throws GroupsException {
if (isTreeRefreshRequired()) {
refreshTree();
}
log.debug("Invoking findEntitiesForGroup() for group: {}", group.getLocalKey());
// We only deal w/ group-group relationship... | Iterator function(IEntityGroup group) throws GroupsException { if (isTreeRefreshRequired()) { refreshTree(); } log.debug(STR, group.getLocalKey()); List<IEntity> rslt = new ArrayList<IEntity>(); if (displayPersonMembers) { List<String> list = groupsTree.getPersonChildren().get(group.getLocalKey()); if (list != null) { ... | /**
* Returns an <code>Iterator</code> over the <code>Collection</code> of <code>IEntities</code>
* that are members of this <code>IEntityGroup</code>.
*
* @return java.util.Iterator
* @param group org.apereo.portal.groups.IEntityGroup
*/ | Returns an <code>Iterator</code> over the <code>Collection</code> of <code>IEntities</code> that are members of this <code>IEntityGroup</code> | findEntitiesForGroup | {
"repo_name": "GIP-RECIA/esco-portail",
"path": "uPortal-groups/uPortal-groups-smartldap/src/main/java/org/apereo/portal/groups/smartldap/SmartLdapGroupStore.java",
"license": "apache-2.0",
"size": 38948
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.apereo.portal.groups.GroupsException",
"org.apereo.portal.groups.IEntity",
"org.apereo.portal.groups.IEntityGroup"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apereo.portal.groups.GroupsException; import org.apereo.portal.groups.IEntity; import org.apereo.portal.groups.IEntityGroup; | import java.util.*; import org.apereo.portal.groups.*; | [
"java.util",
"org.apereo.portal"
] | java.util; org.apereo.portal; | 631,441 |
public String toCompactString()
{
CharArrayWriter caw = new CharArrayWriter();
PrintWriter pw = new PrintWriter(caw);
print(pw);
pw.close();
return caw.toString();
} | String function() { CharArrayWriter caw = new CharArrayWriter(); PrintWriter pw = new PrintWriter(caw); print(pw); pw.close(); return caw.toString(); } | /**
* Prints the JSONObject as a compact string (not extra punctuation). This is, essentially, what
* Tapestry 5.1 did inside {@link #toString()}.
*/ | Prints the JSONObject as a compact string (not extra punctuation). This is, essentially, what Tapestry 5.1 did inside <code>#toString()</code> | toCompactString | {
"repo_name": "apache/tapestry-5",
"path": "tapestry-json/src/main/java/org/apache/tapestry5/json/JSONCollection.java",
"license": "apache-2.0",
"size": 3520
} | [
"java.io.CharArrayWriter",
"java.io.PrintWriter"
] | import java.io.CharArrayWriter; import java.io.PrintWriter; | import java.io.*; | [
"java.io"
] | java.io; | 2,128,437 |
public Builder withAgendaEventListener(AgendaEventListener agendaEventListener) {
this.toBuild.kieSession.addEventListener(agendaEventListener);
return this;
} | Builder function(AgendaEventListener agendaEventListener) { this.toBuild.kieSession.addEventListener(agendaEventListener); return this; } | /**
* Add an <code>AgendaEventListener</code> to the underlying <code>KieSession</code>
* @param agendaEventListener
* @return
*/ | Add an <code>AgendaEventListener</code> to the underlying <code>KieSession</code> | withAgendaEventListener | {
"repo_name": "droolsjbpm/drools",
"path": "kie-pmml-trusty/kie-pmml-models/kie-pmml-models-drools/kie-pmml-models-drools-common/src/main/java/org/kie/pmml/models/drools/utils/KiePMMLSessionUtils.java",
"license": "apache-2.0",
"size": 7168
} | [
"org.kie.api.event.rule.AgendaEventListener"
] | import org.kie.api.event.rule.AgendaEventListener; | import org.kie.api.event.rule.*; | [
"org.kie.api"
] | org.kie.api; | 2,888,724 |
public static Dimension makeNarrower(Dimension size, double percent) {
return new Dimension((int) (size.width * (1 - percent)), size.height);
} | static Dimension function(Dimension size, double percent) { return new Dimension((int) (size.width * (1 - percent)), size.height); } | /**
* Narrows the rectangle by the specified percentage.
*
* @param size the current size
* @param percent the percentage to make it narrower (0-1)
* @return the narrowed rectangle
*/ | Narrows the rectangle by the specified percentage | makeNarrower | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/gui/core/GUIHelper.java",
"license": "gpl-3.0",
"size": 88762
} | [
"java.awt.Dimension"
] | import java.awt.Dimension; | import java.awt.*; | [
"java.awt"
] | java.awt; | 245,519 |
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
final ContentValues values = new ContentValues();
values.put(AquaNotesDbContract.Vendors.VENDOR_STARRED, isChecked ? 1 : 0);
mHandler.startUpdate(mVendorUri, values);
AnalyticsUtils.getInstance(getActivity(... | void function(CompoundButton buttonView, boolean isChecked) { final ContentValues values = new ContentValues(); values.put(AquaNotesDbContract.Vendors.VENDOR_STARRED, isChecked ? 1 : 0); mHandler.startUpdate(mVendorUri, values); AnalyticsUtils.getInstance(getActivity()).trackEvent( STR, isChecked ? STR : STR, mNameStri... | /**
* Handle toggling of starred checkbox.
*/ | Handle toggling of starred checkbox | onCheckedChanged | {
"repo_name": "HeneryH/AquaNotesBU",
"path": "src/com/heneryh/aquanotes/ui/VendorDetailFragment.java",
"license": "apache-2.0",
"size": 9326
} | [
"android.content.ContentValues",
"android.widget.CompoundButton",
"com.heneryh.aquanotes.provider.AquaNotesDbContract",
"com.heneryh.aquanotes.util.AnalyticsUtils"
] | import android.content.ContentValues; import android.widget.CompoundButton; import com.heneryh.aquanotes.provider.AquaNotesDbContract; import com.heneryh.aquanotes.util.AnalyticsUtils; | import android.content.*; import android.widget.*; import com.heneryh.aquanotes.provider.*; import com.heneryh.aquanotes.util.*; | [
"android.content",
"android.widget",
"com.heneryh.aquanotes"
] | android.content; android.widget; com.heneryh.aquanotes; | 2,587,042 |
BuildState getOwner(); | BuildState getOwner(); | /**
* Returns the containing build of this project.
*/ | Returns the containing build of this project | getOwner | {
"repo_name": "gradle/gradle",
"path": "subprojects/core/src/main/java/org/gradle/api/internal/project/ProjectState.java",
"license": "apache-2.0",
"size": 5006
} | [
"org.gradle.internal.build.BuildState"
] | import org.gradle.internal.build.BuildState; | import org.gradle.internal.build.*; | [
"org.gradle.internal"
] | org.gradle.internal; | 1,364,192 |
protected final Ticket getProxiedTicketInstance(final Ticket ticket) {
if (ticket == null) {
return null;
}
if (ticket instanceof TicketGrantingTicket) {
return new TicketGrantingTicketDelegator(this, (TicketGrantingTicket) ticket, needsCallback());
}
... | final Ticket function(final Ticket ticket) { if (ticket == null) { return null; } if (ticket instanceof TicketGrantingTicket) { return new TicketGrantingTicketDelegator(this, (TicketGrantingTicket) ticket, needsCallback()); } return new ServiceTicketDelegator(this, (ServiceTicket) ticket, needsCallback()); } private st... | /**
* Gets the proxied ticket instance.
*
* @param ticket the ticket
* @return the proxied ticket instance
*/ | Gets the proxied ticket instance | getProxiedTicketInstance | {
"repo_name": "0be1/cas",
"path": "cas-server-core/src/main/java/org/jasig/cas/ticket/registry/AbstractDistributedTicketRegistry.java",
"license": "apache-2.0",
"size": 8358
} | [
"org.jasig.cas.ticket.ServiceTicket",
"org.jasig.cas.ticket.Ticket",
"org.jasig.cas.ticket.TicketGrantingTicket"
] | import org.jasig.cas.ticket.ServiceTicket; import org.jasig.cas.ticket.Ticket; import org.jasig.cas.ticket.TicketGrantingTicket; | import org.jasig.cas.ticket.*; | [
"org.jasig.cas"
] | org.jasig.cas; | 2,234,065 |
protected void startPE(String name, boolean literal)
throws IOException, XNIException {
int depth = fPEDepth;
String pName = "%"+name;
if (fValidation && !fEntityStore.isDeclaredEntity(pName)) {
fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,"EntityNotDeclared",
... | void function(String name, boolean literal) throws IOException, XNIException { int depth = fPEDepth; String pName = "%"+name; if (fValidation && !fEntityStore.isDeclaredEntity(pName)) { fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,STR, new Object[]{name}, XMLErrorReporter.SEVERITY_ERROR); } fEntityManager... | /**
* start a parameter entity dealing with the textdecl if there is any
*
* @param name The name of the parameter entity to start (without the '%')
* @param literal Whether this is happening within a literal
*/ | start a parameter entity dealing with the textdecl if there is any | startPE | {
"repo_name": "openjdk/jdk8u",
"path": "jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java",
"license": "gpl-2.0",
"size": 81041
} | [
"com.sun.org.apache.xerces.internal.impl.XMLErrorReporter",
"com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter",
"com.sun.org.apache.xerces.internal.xni.XNIException",
"java.io.IOException"
] | import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter; import com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter; import com.sun.org.apache.xerces.internal.xni.XNIException; import java.io.IOException; | import com.sun.org.apache.xerces.internal.impl.*; import com.sun.org.apache.xerces.internal.impl.msg.*; import com.sun.org.apache.xerces.internal.xni.*; import java.io.*; | [
"com.sun.org",
"java.io"
] | com.sun.org; java.io; | 1,637,999 |
SignalExecutors.BOUNDED.execute(() -> ApplicationDependencies.getJobManager().add(forRecipient(recipientId)));
}
/**
* Submits the necessary job to refresh the profile of the requested recipient. Works for any
* RecipientId, including individuals, groups, or yourself.
*
* Identical to {@link #enqueue(S... | SignalExecutors.BOUNDED.execute(() -> ApplicationDependencies.getJobManager().add(forRecipient(recipientId))); } /** * Submits the necessary job to refresh the profile of the requested recipient. Works for any * RecipientId, including individuals, groups, or yourself. * * Identical to {@link #enqueue(Set)})} | /**
* Identical to {@link #enqueue(Set)})}, but run on a background thread for convenience.
*/ | Identical to <code>#enqueue(Set)</code>)}, but run on a background thread for convenience | enqueueAsync | {
"repo_name": "stinsonga/Signal-Android",
"path": "app/src/main/java/org/thoughtcrime/securesms/jobs/RetrieveProfileJob.java",
"license": "gpl-3.0",
"size": 22416
} | [
"java.util.Set",
"org.signal.core.util.concurrent.SignalExecutors",
"org.thoughtcrime.securesms.dependencies.ApplicationDependencies",
"org.thoughtcrime.securesms.recipients.RecipientId"
] | import java.util.Set; import org.signal.core.util.concurrent.SignalExecutors; import org.thoughtcrime.securesms.dependencies.ApplicationDependencies; import org.thoughtcrime.securesms.recipients.RecipientId; | import java.util.*; import org.signal.core.util.concurrent.*; import org.thoughtcrime.securesms.dependencies.*; import org.thoughtcrime.securesms.recipients.*; | [
"java.util",
"org.signal.core",
"org.thoughtcrime.securesms"
] | java.util; org.signal.core; org.thoughtcrime.securesms; | 649,447 |
public Paint getTextPaint() {
return textPaint;
} | Paint function() { return textPaint; } | /**
* Returns the paint used to draw the text
*
* @return the paint used to draw the text
*/ | Returns the paint used to draw the text | getTextPaint | {
"repo_name": "garvankeeley/MozStumbler",
"path": "android/src/main/java/org/mozilla/osmdroid/views/overlay/ScaleBarOverlay.java",
"license": "mpl-2.0",
"size": 23033
} | [
"android.graphics.Paint"
] | import android.graphics.Paint; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,317,976 |
protected String getEntityContent(HttpResponse response) throws IOException {
BufferedReader br = new BufferedReader(
new InputStreamReader((response.getEntity().getContent())));
String output;
System.err.println("Output from Server -> ");
String json = "";
while ((output = br.readLine()) != null) {
... | String function(HttpResponse response) throws IOException { BufferedReader br = new BufferedReader( new InputStreamReader((response.getEntity().getContent()))); String output; System.err.println(STR); String json = STRJSON:"+json); return json; } | /**
* From https://github.com/rayzhangcl/ESDemo March 28, 2015
* get the http response and return json string
*/ | From HREF March 28, 2015 get the http response and return json string | getEntityContent | {
"repo_name": "CMPUT301W15T01/Team1Project",
"path": "Team1TEAppTest/src/ca/ualberta/cs/team1travelexpenseapp/test/ClaimTest.java",
"license": "apache-2.0",
"size": 24680
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStreamReader",
"org.apache.http.HttpResponse"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import org.apache.http.HttpResponse; | import java.io.*; import org.apache.http.*; | [
"java.io",
"org.apache.http"
] | java.io; org.apache.http; | 2,675,518 |
public static File getAppDataSubDir(final String dirName, final boolean createIt)
{
File newDir = new File(getAppDataDir() + File.separator + dirName);
if (!newDir.exists() && createIt)
{
if (!newDir.mkdirs())
{
return null;
}
}... | static File function(final String dirName, final boolean createIt) { File newDir = new File(getAppDataDir() + File.separator + dirName); if (!newDir.exists() && createIt) { if (!newDir.mkdirs()) { return null; } } return newDir; } | /**
* Creates a File object for a Sub-Directory inside the Default Working Path Directory.
* If the directory doesn't exist you can have it created.
* @param dirName the new or existing directory name
* @param createIt true to create it if it doesn't exist, false doesn't create it
* @return a... | Creates a File object for a Sub-Directory inside the Default Working Path Directory. If the directory doesn't exist you can have it created | getAppDataSubDir | {
"repo_name": "specify/specify6",
"path": "src/edu/ku/brc/ui/UIRegistry.java",
"license": "gpl-2.0",
"size": 98859
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,424,941 |
public void testNonDefaultPublicGroupPermissions() throws Exception
{
// Sanity check the current permissions
assertEquals(PermissionService.ALL_AUTHORITIES, sysAdminParams.getSitePublicGroup());
// Change the public site group
SysAdminParamsImpl sp = new SysAdminParams... | void function() throws Exception { assertEquals(PermissionService.ALL_AUTHORITIES, sysAdminParams.getSitePublicGroup()); SysAdminParamsImpl sp = new SysAdminParamsImpl(); sp.setSitePublicGroup(groupFour); siteServiceImpl.setSysAdminParams(sp); SiteInfo s1 = this.siteService.createSite(TEST_SITE_PRESET, STR, "priv", "pr... | /**
* ALF-10343 - When the default public group for sites isn't EVERYBODY,
* check that creating and altering sites results in the correct permissions
*/ | ALF-10343 - When the default public group for sites isn't EVERYBODY, check that creating and altering sites results in the correct permissions | testNonDefaultPublicGroupPermissions | {
"repo_name": "loftuxab/alfresco-community-loftux",
"path": "projects/repository/source/test-java/org/alfresco/repo/site/SiteServiceImplTest.java",
"license": "lgpl-3.0",
"size": 154784
} | [
"org.alfresco.repo.admin.SysAdminParamsImpl",
"org.alfresco.service.cmr.security.PermissionService",
"org.alfresco.service.cmr.site.SiteInfo",
"org.alfresco.service.cmr.site.SiteVisibility"
] | import org.alfresco.repo.admin.SysAdminParamsImpl; import org.alfresco.service.cmr.security.PermissionService; import org.alfresco.service.cmr.site.SiteInfo; import org.alfresco.service.cmr.site.SiteVisibility; | import org.alfresco.repo.admin.*; import org.alfresco.service.cmr.security.*; import org.alfresco.service.cmr.site.*; | [
"org.alfresco.repo",
"org.alfresco.service"
] | org.alfresco.repo; org.alfresco.service; | 2,883,366 |
Collection<User> searchByUserName(final String userName); | Collection<User> searchByUserName(final String userName); | /**
* Search user where the user name includes the substring 'userName'
* @param userName Substring user name
* @return Found users collection
*/ | Search user where the user name includes the substring 'userName' | searchByUserName | {
"repo_name": "Recon838/VeterinaryClinic",
"path": "src/main/java/org/raliev/store/UserStorage.java",
"license": "apache-2.0",
"size": 1647
} | [
"java.util.Collection",
"org.raliev.models.User"
] | import java.util.Collection; import org.raliev.models.User; | import java.util.*; import org.raliev.models.*; | [
"java.util",
"org.raliev.models"
] | java.util; org.raliev.models; | 1,692,002 |
@Test
public void shouldUnmarshalUsingIterator() throws Exception {
template.sendBody("direct:lazy", join("A B C ", "1 2 3 ", "onetwothree"));
result.expectedMessageCount(1);
result.assertIsSatisfied();
Iterator<?> body = assertIsInstanceOf(Iterator.class, resu... | void function() throws Exception { template.sendBody(STR, join(STR, STR, STR)); result.expectedMessageCount(1); result.assertIsSatisfied(); Iterator<?> body = assertIsInstanceOf(Iterator.class, result.getExchanges().get(0).getIn().getBody()); assertTrue(body.hasNext()); assertEquals(Arrays.asList("A", "B", "C"), body.n... | /**
* Tests that we can unmarshal fixed-width and produce an Iterator that lazily reads the input
*/ | Tests that we can unmarshal fixed-width and produce an Iterator that lazily reads the input | shouldUnmarshalUsingIterator | {
"repo_name": "logzio/camel",
"path": "components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityFixedWidthDataFormatUnmarshalTest.java",
"license": "apache-2.0",
"size": 7758
} | [
"java.util.Arrays",
"java.util.Iterator",
"java.util.NoSuchElementException",
"org.apache.camel.dataformat.univocity.UniVocityTestHelper"
] | import java.util.Arrays; import java.util.Iterator; import java.util.NoSuchElementException; import org.apache.camel.dataformat.univocity.UniVocityTestHelper; | import java.util.*; import org.apache.camel.dataformat.univocity.*; | [
"java.util",
"org.apache.camel"
] | java.util; org.apache.camel; | 1,404,923 |
private ValidationResult validateParameterURL(Map<String,String> properties) {
String urlProp = properties.get(PARAMETER_NAME_URL);
URL u = null;
try {
u = new URL(urlProp);
} catch (MalformedURLException e) {
return new MyValidationResult(false, "Must be... | ValidationResult function(Map<String,String> properties) { String urlProp = properties.get(PARAMETER_NAME_URL); URL u = null; try { u = new URL(urlProp); } catch (MalformedURLException e) { return new MyValidationResult(false, STR); } try { u.toURI(); } catch (URISyntaxException e) { return new MyValidationResult(false... | /**
* Validates the parameter URL.
*
* @param properties the view instance parameters
* @return the validation result
*/ | Validates the parameter URL | validateParameterURL | {
"repo_name": "arenadata/ambari",
"path": "ambari-views/examples/property-validator-view/src/main/java/org/apache/ambari/view/property/MyValidator.java",
"license": "apache-2.0",
"size": 7937
} | [
"java.net.MalformedURLException",
"java.net.URISyntaxException",
"java.util.Map",
"org.apache.ambari.view.validation.ValidationResult"
] | import java.net.MalformedURLException; import java.net.URISyntaxException; import java.util.Map; import org.apache.ambari.view.validation.ValidationResult; | import java.net.*; import java.util.*; import org.apache.ambari.view.validation.*; | [
"java.net",
"java.util",
"org.apache.ambari"
] | java.net; java.util; org.apache.ambari; | 207,926 |
private void enableExportProcessProps(final ComboBox fieldValue) {
if (fieldValue != null) {
for (final Widget widget : widgetMap.values()) {
if (fieldValue.getValue().equalsIgnoreCase(PluginNameConstants.GHOSTSCRPT)) {
if (widget != null && widget instanceof ComboBox) {
ComboBox field = ((ComboB... | void function(final ComboBox fieldValue) { if (fieldValue != null) { for (final Widget widget : widgetMap.values()) { if (fieldValue.getValue().equalsIgnoreCase(PluginNameConstants.GHOSTSCRPT)) { if (widget != null && widget instanceof ComboBox) { ComboBox field = ((ComboBox) widget); String name = field.getName(); if ... | /**
* Sets the properties of create multipage file plugin according to the selected multipage file export process.
*
* @param fieldValue {@link ListBox}- value of selected multipage file export process
*/ | Sets the properties of create multipage file plugin according to the selected multipage file export process | enableExportProcessProps | {
"repo_name": "ungerik/ephesoft",
"path": "Ephesoft_Community_Release_4.0.2.0/source/gxt/gxt-admin/src/main/java/com/ephesoft/gxt/admin/client/presenter/plugin/PluginDetailPresenter.java",
"license": "agpl-3.0",
"size": 17588
} | [
"com.ephesoft.gxt.admin.client.i18n.PluginNameConstants",
"com.ephesoft.gxt.core.client.ui.widget.ComboBox",
"com.google.gwt.user.client.ui.Widget",
"com.sencha.gxt.widget.core.client.form.TextField"
] | import com.ephesoft.gxt.admin.client.i18n.PluginNameConstants; import com.ephesoft.gxt.core.client.ui.widget.ComboBox; import com.google.gwt.user.client.ui.Widget; import com.sencha.gxt.widget.core.client.form.TextField; | import com.ephesoft.gxt.admin.client.i18n.*; import com.ephesoft.gxt.core.client.ui.widget.*; import com.google.gwt.user.client.ui.*; import com.sencha.gxt.widget.core.client.form.*; | [
"com.ephesoft.gxt",
"com.google.gwt",
"com.sencha.gxt"
] | com.ephesoft.gxt; com.google.gwt; com.sencha.gxt; | 1,336,846 |
private void setContainerFilesystemCapacity(AgentContainerLog containerLog) throws Exception {
iterateParserUntilKeyMatch("filesystem");
iterateParserUntilKeyMatch("capacity");
nextJson();
containerLog.diskTotal = jsonParser.get().getLong() / 1048576; //divide by 1048576 for Bytes -> MB
} | void function(AgentContainerLog containerLog) throws Exception { iterateParserUntilKeyMatch(STR); iterateParserUntilKeyMatch(STR); nextJson(); containerLog.diskTotal = jsonParser.get().getLong() / 1048576; } | /**
* Sets the diskTotal field of the AgentContainerLog object passed as a parameter.
* @param containerLog AgentContainerLog
* @throws Exception
*/ | Sets the diskTotal field of the AgentContainerLog object passed as a parameter | setContainerFilesystemCapacity | {
"repo_name": "DePaul2015SEStudioTeam1/agent",
"path": "src/main/java/edu/depaul/agent/LogCollector.java",
"license": "mit",
"size": 10753
} | [
"edu.depaul.armada.model.AgentContainerLog"
] | import edu.depaul.armada.model.AgentContainerLog; | import edu.depaul.armada.model.*; | [
"edu.depaul.armada"
] | edu.depaul.armada; | 1,371,532 |
private int getBytes(byte[] buf, int start, int n) throws EOBException, IOException {
int i;
int c;
for (i = 0; i < n; i++) {
c = reader.read();
if (c == -1) {
// EOBException is thrown if no more bytes in buffer. This exception is used to exit the pa... | int function(byte[] buf, int start, int n) throws EOBException, IOException { int i; int c; for (i = 0; i < n; i++) { c = reader.read(); if (c == -1) { throw new EOBException(); } buf[start + i] = (byte) c; } return i; } | /**
* Gets a specific number of bytes from reader input stream
*
* @param buf byte buffer to store bytes
* @param start starting index to store bytes
* @param n number of bytes to read
* @return number of bytes read
* @throws EOBException
* @throws IOException
*/ | Gets a specific number of bytes from reader input stream | getBytes | {
"repo_name": "Snickermicker/openhab2",
"path": "bundles/org.openhab.binding.pentair/src/main/java/org/openhab/binding/pentair/internal/handler/PentairBaseBridgeHandler.java",
"license": "epl-1.0",
"size": 17254
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,725,319 |
public boolean hasTimedOut() {
if (timeout == null || timeout.equals(TIMEOUT_INFINITE)) {
return false;
}
int seconds = Integer.parseInt(timeout.substring(7));
Calendar expiry = Calendar.getInstance();
expiry.setTime(created);
expiry.add(Ca... | boolean function() { if (timeout == null timeout.equals(TIMEOUT_INFINITE)) { return false; } int seconds = Integer.parseInt(timeout.substring(7)); Calendar expiry = Calendar.getInstance(); expiry.setTime(created); expiry.add(Calendar.SECOND, seconds); return Calendar.getInstance().after(expiry); } | /**
* Has timeout.
* @return The boolean: hasTimeout.
*/ | Has timeout | hasTimedOut | {
"repo_name": "Eisler/cosmo",
"path": "cosmo-core/src/test/unit/java/org/unitedinternet/cosmo/model/mock/MockTicket.java",
"license": "apache-2.0",
"size": 10491
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 2,528,419 |
public void testLazyMapNestedExceedLimitNotExtended() throws Throwable {
checkNotExtendedLimitExceeded(DEFAULT_LEVEL_THRESHOLD-1,
ObjectInspector.Category.MAP);
} | void function() throws Throwable { checkNotExtendedLimitExceeded(DEFAULT_LEVEL_THRESHOLD-1, ObjectInspector.Category.MAP); } | /**
* Test the LazyMap class with multiple levels of nesting, when nesting
* levels are not extended
*/ | Test the LazyMap class with multiple levels of nesting, when nesting levels are not extended | testLazyMapNestedExceedLimitNotExtended | {
"repo_name": "winningsix/hive",
"path": "serde/src/test/org/apache/hadoop/hive/serde2/lazy/TestLazyArrayMapStruct.java",
"license": "apache-2.0",
"size": 31412
} | [
"org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector"
] | import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; | import org.apache.hadoop.hive.serde2.objectinspector.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,134,136 |
@Test
public void testOverlapsWidth() {
HistogramBin b1 = new HistogramBin(1.0, 2.0);
HistogramBin b2 = new HistogramBin(2.0, 3.0);
HistogramBin b3 = new HistogramBin(3.0, 4.0);
HistogramBin b4 = new HistogramBin(0.0, 5.0);
HistogramBin b5 = new HistogramBin(2.0, 3.... | void function() { HistogramBin b1 = new HistogramBin(1.0, 2.0); HistogramBin b2 = new HistogramBin(2.0, 3.0); HistogramBin b3 = new HistogramBin(3.0, 4.0); HistogramBin b4 = new HistogramBin(0.0, 5.0); HistogramBin b5 = new HistogramBin(2.0, 3.0, false, true); HistogramBin b6 = new HistogramBin(2.0, 3.0, true, false); ... | /**
* Some checks for the overlapsWith() method.
*/ | Some checks for the overlapsWith() method | testOverlapsWidth | {
"repo_name": "oskopek/jfreechart-fse",
"path": "src/test/java/org/jfree/data/statistics/HistogramBinTest.java",
"license": "lgpl-2.1",
"size": 5669
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 169,182 |
public HRegionServer getRSForFirstRegionInTable(byte[] tableName)
throws IOException {
List<byte[]> metaRows = getMetaTableRows(tableName);
if (metaRows == null || metaRows.isEmpty()) {
return null;
}
LOG.debug("Found " + metaRows.size() + " rows for table " +
Bytes.toString(tableNam... | HRegionServer function(byte[] tableName) throws IOException { List<byte[]> metaRows = getMetaTableRows(tableName); if (metaRows == null metaRows.isEmpty()) { return null; } LOG.debug(STR + metaRows.size() + STR + Bytes.toString(tableName)); byte [] firstrow = metaRows.get(0); LOG.debug(STR + Bytes.toString(firstrow)); ... | /**
* Tool to get the reference to the region server object that holds the
* region of the specified user table.
* It first searches for the meta rows that contain the region of the
* specified table, then gets the index of that RS, and finally retrieves
* the RS's reference.
* @param tableName user t... | Tool to get the reference to the region server object that holds the region of the specified user table. It first searches for the meta rows that contain the region of the specified table, then gets the index of that RS, and finally retrieves the RS's reference | getRSForFirstRegionInTable | {
"repo_name": "Shmuma/hbase-trunk",
"path": "src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java",
"license": "apache-2.0",
"size": 67326
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hbase.regionserver.HRegionServer",
"org.apache.hadoop.hbase.util.Bytes"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.regionserver.HRegionServer; import org.apache.hadoop.hbase.util.Bytes; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 588,592 |
private void createProviders() {
HashSet<ServiceProvider> providers = new HashSet<ServiceProvider>();
this.serviceProviders = providers;
} | void function() { HashSet<ServiceProvider> providers = new HashSet<ServiceProvider>(); this.serviceProviders = providers; } | /**
* Creates a empty service provider set
*/ | Creates a empty service provider set | createProviders | {
"repo_name": "B3Partners/kaartenbalie",
"path": "src/test/java/nl/b3p/kaartenbalie/service/ServiceProviderValidatorTest.java",
"license": "lgpl-3.0",
"size": 7787
} | [
"java.util.HashSet",
"nl.b3p.wms.capabilities.ServiceProvider"
] | import java.util.HashSet; import nl.b3p.wms.capabilities.ServiceProvider; | import java.util.*; import nl.b3p.wms.capabilities.*; | [
"java.util",
"nl.b3p.wms"
] | java.util; nl.b3p.wms; | 1,741,202 |
public static void saveKOML(File saveTo, Object model, Instances header) throws Exception {
Vector v = new Vector();
v.add(model);
if (header != null) {
v.add(header);
}
v.trimToSize();
KOML.write(saveTo.getAbsolutePath(), v);
} | static void function(File saveTo, Object model, Instances header) throws Exception { Vector v = new Vector(); v.add(model); if (header != null) { v.add(header); } v.trimToSize(); KOML.write(saveTo.getAbsolutePath(), v); } | /**
* Save a model in KOML deep object serialized XML form.
*
* @param saveTo the file name to save to
* @param model the model to save
* @param header the header of the data that was used to train the model (optional)
*/ | Save a model in KOML deep object serialized XML form | saveKOML | {
"repo_name": "dsibournemouth/autoweka",
"path": "weka-3.7.7/src/main/java/weka/gui/beans/SerializedModelSaver.java",
"license": "gpl-3.0",
"size": 21522
} | [
"java.io.File",
"java.util.Vector"
] | import java.io.File; import java.util.Vector; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,011,445 |
protected boolean accept(TokenType accept) {
return token == null || token.getType().getType() == accept;
} | boolean function(TokenType accept) { return token == null token.getType().getType() == accept; } | /**
* Accept the given token.
* <p/>
* This is to be used by the grammar to accept tokens and then continue parsing
* using the grammar, such as a function grammar.
*
* @param accept the token
* @return <tt>true</tt> if accepted, <tt>false</tt> otherwise.
*/ | Accept the given token. This is to be used by the grammar to accept tokens and then continue parsing using the grammar, such as a function grammar | accept | {
"repo_name": "curso007/camel",
"path": "camel-core/src/main/java/org/apache/camel/language/simple/BaseSimpleParser.java",
"license": "apache-2.0",
"size": 9798
} | [
"org.apache.camel.language.simple.types.TokenType"
] | import org.apache.camel.language.simple.types.TokenType; | import org.apache.camel.language.simple.types.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,719,382 |
public AudioTrack playSound(byte[] generatedSnd, int ear) {
AudioTrack audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate, AudioFormat.CHANNEL_OUT_STEREO, AudioFormat.ENCODING_PCM_16BIT, generatedSnd.length, AudioTrack.MODE_STATIC);
audioTrack.write(generatedSnd, 0, generatedSnd.lengt... | AudioTrack function(byte[] generatedSnd, int ear) { AudioTrack audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate, AudioFormat.CHANNEL_OUT_STEREO, AudioFormat.ENCODING_PCM_16BIT, generatedSnd.length, AudioTrack.MODE_STATIC); audioTrack.write(generatedSnd, 0, generatedSnd.length); if (ear == 0) { audioTra... | /**
* Writes the parameter byte array to an AudioTrack and plays the array
* @param generatedSnd- input 16-bit PCM Array
*/ | Writes the parameter byte array to an AudioTrack and plays the array | playSound | {
"repo_name": "ReeceStevens/ut_ewh_audiometer_2014",
"path": "app/src/main/java/ut/ewh/audiometrytest/TestProctoring.java",
"license": "mit",
"size": 14876
} | [
"android.media.AudioFormat",
"android.media.AudioManager",
"android.media.AudioTrack"
] | import android.media.AudioFormat; import android.media.AudioManager; import android.media.AudioTrack; | import android.media.*; | [
"android.media"
] | android.media; | 2,344,755 |
public UserModel authenticate(HttpServletRequest httpRequest, boolean requiresCertificate) {
// try to authenticate by certificate
boolean checkValidity = settings.getBoolean(Keys.git.enforceCertificateValidity, true);
String [] oids = getStrings(Keys.git.certificateUsernameOIDs).toArray(new String[0]);
... | UserModel function(HttpServletRequest httpRequest, boolean requiresCertificate) { boolean checkValidity = settings.getBoolean(Keys.git.enforceCertificateValidity, true); String [] oids = getStrings(Keys.git.certificateUsernameOIDs).toArray(new String[0]); UserModel model = HttpUtils.getUserModelFromCertificate(httpRequ... | /**
* Authenticate a user based on HTTP request parameters.
*
* Authentication by X509Certificate, servlet container principal, cookie,
* and BASIC header.
*
* @param httpRequest
* @param requiresCertificate
* @return a user object or null
*/ | Authenticate a user based on HTTP request parameters. Authentication by X509Certificate, servlet container principal, cookie, and BASIC header | authenticate | {
"repo_name": "BullShark/IRCBlit",
"path": "src/main/java/com/gitblit/GitBlit.java",
"license": "apache-2.0",
"size": 119961
} | [
"com.gitblit.Constants",
"com.gitblit.models.UserModel",
"com.gitblit.utils.Base64",
"com.gitblit.utils.HttpUtils",
"com.gitblit.utils.StringUtils",
"com.gitblit.utils.X509Utils",
"java.nio.charset.Charset",
"java.security.Principal",
"java.text.MessageFormat",
"javax.servlet.http.HttpServletReque... | import com.gitblit.Constants; import com.gitblit.models.UserModel; import com.gitblit.utils.Base64; import com.gitblit.utils.HttpUtils; import com.gitblit.utils.StringUtils; import com.gitblit.utils.X509Utils; import java.nio.charset.Charset; import java.security.Principal; import java.text.MessageFormat; import javax.... | import com.gitblit.*; import com.gitblit.models.*; import com.gitblit.utils.*; import java.nio.charset.*; import java.security.*; import java.text.*; import javax.servlet.http.*; | [
"com.gitblit",
"com.gitblit.models",
"com.gitblit.utils",
"java.nio",
"java.security",
"java.text",
"javax.servlet"
] | com.gitblit; com.gitblit.models; com.gitblit.utils; java.nio; java.security; java.text; javax.servlet; | 1,491,068 |
private int countRealBlocks(Map<String, BlockLocs> map) {
int total = 0;
final String bpid = cluster.getNamesystem().getBlockPoolId();
for(int i=0; i<dn_num; i++) {
for(int j=0; j<=1; j++) {
File storageDir = cluster.getInstanceStorageDir(i, j);
File dir = MiniDFSCluster.getFinalized... | int function(Map<String, BlockLocs> map) { int total = 0; final String bpid = cluster.getNamesystem().getBlockPoolId(); for(int i=0; i<dn_num; i++) { for(int j=0; j<=1; j++) { File storageDir = cluster.getInstanceStorageDir(i, j); File dir = MiniDFSCluster.getFinalizedDir(storageDir, bpid); if(dir == null) { System.out... | /**
* look for real blocks
* by counting *.meta files in all the storage dirs
* @param map
* @return
*/ | look for real blocks by counting *.meta files in all the storage dirs | countRealBlocks | {
"repo_name": "jonathangizmo/HadoopDistJ",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java",
"license": "mit",
"size": 15406
} | [
"java.io.File",
"java.util.List",
"java.util.Map",
"org.apache.hadoop.hdfs.MiniDFSCluster",
"org.junit.Assert"
] | import java.io.File; import java.util.List; import java.util.Map; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.junit.Assert; | import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.io; java.util; org.apache.hadoop; org.junit; | 2,209,053 |
public static void toAgent(final Descriptor descriptor, DataInputStream in, DataOutputStream out) {
//
// Check if the framework is active
if (descriptor.framework.getState() != Bundle.ACTIVE) {
throw new IllegalStateException("Framework " + descriptor.name + " is not active. (Stopped?)");
}
//
// G... | static void function(final Descriptor descriptor, DataInputStream in, DataOutputStream out) { if (descriptor.framework.getState() != Bundle.ACTIVE) { throw new IllegalStateException(STR + descriptor.name + STR); } // | /**
* Create a new agent on an existing framework.
*/ | Create a new agent on an existing framework | toAgent | {
"repo_name": "mcculls/bnd",
"path": "biz.aQute.remote/src/aQute/remote/agent/AgentDispatcher.java",
"license": "apache-2.0",
"size": 5314
} | [
"java.io.DataInputStream",
"java.io.DataOutputStream",
"org.osgi.framework.Bundle"
] | import java.io.DataInputStream; import java.io.DataOutputStream; import org.osgi.framework.Bundle; | import java.io.*; import org.osgi.framework.*; | [
"java.io",
"org.osgi.framework"
] | java.io; org.osgi.framework; | 2,586,804 |
public DcmElement putXXsq(int tag, int vr) {
switch (vr) {
case VRs.OB:
return putOBsq(tag);
case VRs.OF:
return putOFsq(tag);
case VRs.OW:
return putOWsq(tag);
case VRs.UN:
return putUNsq(tag);
default:
thro... | DcmElement function(int tag, int vr) { switch (vr) { case VRs.OB: return putOBsq(tag); case VRs.OF: return putOFsq(tag); case VRs.OW: return putOWsq(tag); case VRs.UN: return putUNsq(tag); default: throw new IllegalArgumentException(Tags.toString(tag) + " " + VRs.toString(vr)); } } | /**
* Description of the Method
*
* @param tag
* Description of the Parameter
* @param vr
* Description of the Parameter
* @return Description of the Return Value
*/ | Description of the Method | putXXsq | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/trunk/src/java/org/dcm4cheri/data/DcmObjectImpl.java",
"license": "apache-2.0",
"size": 86569
} | [
"org.dcm4che.data.DcmElement",
"org.dcm4che.dict.Tags",
"org.dcm4che.dict.VRs"
] | import org.dcm4che.data.DcmElement; import org.dcm4che.dict.Tags; import org.dcm4che.dict.VRs; | import org.dcm4che.data.*; import org.dcm4che.dict.*; | [
"org.dcm4che.data",
"org.dcm4che.dict"
] | org.dcm4che.data; org.dcm4che.dict; | 2,406,024 |
EAttribute getFunctionMemberAttributes_IsThisConst(); | EAttribute getFunctionMemberAttributes_IsThisConst(); | /**
* Returns the meta object for the attribute '{@link org.xtext.example.delphi.astm.FunctionMemberAttributes#isIsThisConst <em>Is This Const</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Is This Const</em>'.
* @see org.xtext.example.delphi.astm.Fu... | Returns the meta object for the attribute '<code>org.xtext.example.delphi.astm.FunctionMemberAttributes#isIsThisConst Is This Const</code>'. | getFunctionMemberAttributes_IsThisConst | {
"repo_name": "adolfosbh/cs2as",
"path": "org.xtext.example.delphi/emf-gen/org/xtext/example/delphi/astm/AstmPackage.java",
"license": "epl-1.0",
"size": 670467
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,037,250 |
public static boolean isConcrete(Class<?> klass) {
int mod = klass.getModifiers();
return !Modifier.isAbstract(mod) && !Modifier.isInterface(mod);
} | static boolean function(Class<?> klass) { int mod = klass.getModifiers(); return !Modifier.isAbstract(mod) && !Modifier.isInterface(mod); } | /**
* Verify the given class corresponds to a concrete class and not to an abstract class or
* interface.
* @param klass the class object.
* @return true if the argument is a concrete class, false if it's abstract or interface.
*/ | Verify the given class corresponds to a concrete class and not to an abstract class or interface | isConcrete | {
"repo_name": "MyPureCloud/kafka",
"path": "connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java",
"license": "apache-2.0",
"size": 13593
} | [
"java.lang.reflect.Modifier"
] | import java.lang.reflect.Modifier; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 686,101 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux<InterfaceEndpointInner> listAsync(); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<InterfaceEndpointInner> listAsync(); | /**
* Gets all interface endpoints in a subscription.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return all interface endpoin... | Gets all interface endpoints in a subscription | listAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/InterfaceEndpointsClient.java",
"license": "mit",
"size": 20412
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.network.fluent.models.InterfaceEndpointInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.network.fluent.models.InterfaceEndpointInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,789,503 |
protected void configureJta() {
if (this.userTransaction != null) {
ConfigContext.getCurrentContextConfig().putObject(RiceConstants.USER_TRANSACTION_OBJ, this.userTransaction);
}
if (this.transactionManager != null) {
ConfigContext.getCurrentContextConfig().putOb... | void function() { if (this.userTransaction != null) { ConfigContext.getCurrentContextConfig().putObject(RiceConstants.USER_TRANSACTION_OBJ, this.userTransaction); } if (this.transactionManager != null) { ConfigContext.getCurrentContextConfig().putObject(RiceConstants.TRANSACTION_MANAGER_OBJ, this.transactionManager); }... | /**
* If the user injected JTA classes into this configurer, verify that both the
* UserTransaction and TransactionManager are set and then attach them to
* the configuration.
*/ | If the user injected JTA classes into this configurer, verify that both the UserTransaction and TransactionManager are set and then attach them to the configuration | configureJta | {
"repo_name": "bhutchinson/rice",
"path": "rice-middleware/core/impl/src/main/java/org/kuali/rice/core/impl/config/module/CoreConfigurer.java",
"license": "apache-2.0",
"size": 7340
} | [
"org.apache.commons.lang.StringUtils",
"org.kuali.rice.core.api.config.ConfigurationException",
"org.kuali.rice.core.api.config.property.ConfigContext",
"org.kuali.rice.core.api.util.RiceConstants"
] | import org.apache.commons.lang.StringUtils; import org.kuali.rice.core.api.config.ConfigurationException; import org.kuali.rice.core.api.config.property.ConfigContext; import org.kuali.rice.core.api.util.RiceConstants; | import org.apache.commons.lang.*; import org.kuali.rice.core.api.config.*; import org.kuali.rice.core.api.config.property.*; import org.kuali.rice.core.api.util.*; | [
"org.apache.commons",
"org.kuali.rice"
] | org.apache.commons; org.kuali.rice; | 1,259,018 |
private void processExistingStaticInitializer(ClassTraceInfo info) {
List<MethodNode> clinitMethods = getMethods("<clinit>", info.classNode.methods);
MethodNode staticInitializer = clinitMethods.isEmpty() ? null : clinitMethods.get(0);
if (staticInitializer == null) {
return;
... | void function(ClassTraceInfo info) { List<MethodNode> clinitMethods = getMethods(STR, info.classNode.methods); MethodNode staticInitializer = clinitMethods.isEmpty() ? null : clinitMethods.get(0); if (staticInitializer == null) { return; } if (isMethodAlreadyInjectedAnnotationPresent(staticInitializer)) { return; } Ite... | /**
* Analyze the class static initializer looking for initializations of the various Logger/TraceComponent fields.
* <p>
* When the next phase of instrumentation occurs, the code to get a {@code Logger} or a {@code TraceComponent} will be injected at the
* beginning of the class static initializer ... | Analyze the class static initializer looking for initializations of the various Logger/TraceComponent fields. When the next phase of instrumentation occurs, the code to get a Logger or a TraceComponent will be injected at the beginning of the class static initializer if one is not already present | processExistingStaticInitializer | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.ras.instrument/src/com/ibm/ws/ras/instrument/internal/main/LibertyTracePreprocessInstrumentation.java",
"license": "epl-1.0",
"size": 40831
} | [
"java.util.Iterator",
"java.util.List",
"org.objectweb.asm.Opcodes",
"org.objectweb.asm.tree.AbstractInsnNode",
"org.objectweb.asm.tree.FieldInsnNode",
"org.objectweb.asm.tree.MethodNode"
] | import java.util.Iterator; import java.util.List; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.FieldInsnNode; import org.objectweb.asm.tree.MethodNode; | import java.util.*; import org.objectweb.asm.*; import org.objectweb.asm.tree.*; | [
"java.util",
"org.objectweb.asm"
] | java.util; org.objectweb.asm; | 88,615 |
public void setAdvanceLineStroke(Stroke stroke) {
ParamChecks.nullNotPermitted(stroke, "stroke");
this.advanceLineStroke = stroke;
} | void function(Stroke stroke) { ParamChecks.nullNotPermitted(stroke, STR); this.advanceLineStroke = stroke; } | /**
* The advance line is the line drawn at the limit of the current cycle,
* when erasing the previous cycle.
*
* @param stroke the stroke (<code>null</code> not permitted).
*/ | The advance line is the line drawn at the limit of the current cycle, when erasing the previous cycle | setAdvanceLineStroke | {
"repo_name": "Epsilon2/Memetic-Algorithm-for-TSP",
"path": "jfreechart-1.0.16/source/org/jfree/chart/axis/CyclicNumberAxis.java",
"license": "mit",
"size": 41207
} | [
"java.awt.Stroke",
"org.jfree.chart.util.ParamChecks"
] | import java.awt.Stroke; import org.jfree.chart.util.ParamChecks; | import java.awt.*; import org.jfree.chart.util.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 1,587,564 |
private void generateAreas() throws IOException, OmniNotConnectedException, OmniInvalidResponseException, OmniUnknownMessageTypeException{
String groupString = "Group\t%s\t\"%s\"\t(%s)\n";
String itemString = "%s\t%s\t\"%s\"\t(%s)\t{omnilink=\"%s:%d\"}\n";
String groupName = "Areas";
groups.append(String.fo... | void function() throws IOException, OmniNotConnectedException, OmniInvalidResponseException, OmniUnknownMessageTypeException{ String groupString = STR%s\STR; String itemString = STR%s\STR%s:%d\"}\n"; String groupName = "Areas"; groups.append(String.format(groupString,groupName,"Areas","All")); int objnum = 0; Message m... | /**
* Generates are items
* @throws IOException
* @throws OmniNotConnectedException
* @throws OmniInvalidResponseException
* @throws OmniUnknownMessageTypeException
*/ | Generates are items | generateAreas | {
"repo_name": "gregfinley/openhab",
"path": "bundles/binding/org.openhab.binding.omnilink/src/main/java/org/openhab/binding/omnilink/internal/ui/OmnilinkItemGenerator.java",
"license": "epl-1.0",
"size": 28633
} | [
"com.digitaldan.jomnilinkII.Message",
"com.digitaldan.jomnilinkII.MessageTypes",
"com.digitaldan.jomnilinkII.OmniInvalidResponseException",
"com.digitaldan.jomnilinkII.OmniNotConnectedException",
"com.digitaldan.jomnilinkII.OmniUnknownMessageTypeException",
"java.io.IOException"
] | import com.digitaldan.jomnilinkII.Message; import com.digitaldan.jomnilinkII.MessageTypes; import com.digitaldan.jomnilinkII.OmniInvalidResponseException; import com.digitaldan.jomnilinkII.OmniNotConnectedException; import com.digitaldan.jomnilinkII.OmniUnknownMessageTypeException; import java.io.IOException; | import com.digitaldan.*; import java.io.*; | [
"com.digitaldan",
"java.io"
] | com.digitaldan; java.io; | 1,120,711 |
public static void deployFiles(ServletContext servletContext,
String[] resources, String targetDir) {
if (resources == null) {
throw new IllegalArgumentException("Null resources parameter");
}
for (String resource : resources) {
ClickUtils.deploy... | static void function(ServletContext servletContext, String[] resources, String targetDir) { if (resources == null) { throw new IllegalArgumentException(STR); } for (String resource : resources) { ClickUtils.deployFile(servletContext, resource, targetDir); } } | /**
* Deploy the specified classpath resources to the given target directory
* under the web application root directory.
*
* @param servletContext the web applications servlet context
* @param resources the array of classpath resource names
* @param targetDir the target directory to ... | Deploy the specified classpath resources to the given target directory under the web application root directory | deployFiles | {
"repo_name": "medgar/click",
"path": "framework/src/org/apache/click/util/ClickUtils.java",
"license": "apache-2.0",
"size": 141236
} | [
"javax.servlet.ServletContext"
] | import javax.servlet.ServletContext; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 1,770,133 |
public void deleteTable(final byte [] tableName) throws IOException {
isMasterRunning();
HTableDescriptor.isLegalTableName(tableName);
HRegionLocation firstMetaServer = getFirstMetaServerForTable(tableName);
boolean tableExists = true;
try {
getMaster().deleteTable(tableName);
} catch (R... | void function(final byte [] tableName) throws IOException { isMasterRunning(); HTableDescriptor.isLegalTableName(tableName); HRegionLocation firstMetaServer = getFirstMetaServerForTable(tableName); boolean tableExists = true; try { getMaster().deleteTable(tableName); } catch (RemoteException e) { throw RemoteExceptionH... | /**
* Deletes a table.
* Synchronous operation.
*
* @param tableName name of table to delete
* @throws IOException if a remote or network exception occurs
*/ | Deletes a table. Synchronous operation | deleteTable | {
"repo_name": "infospace/hbase",
"path": "src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java",
"license": "apache-2.0",
"size": 93687
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.hbase.HConstants",
"org.apache.hadoop.hbase.HRegionLocation",
"org.apache.hadoop.hbase.HTableDescriptor",
"org.apache.hadoop.hbase.RemoteExceptionHandler",
"org.apache.hadoop.hbase.catalog.MetaReader",
"org.apache.had... | import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HRegionLocation; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.RemoteExceptionHandler; import org.apache.hadoop.hbase.catalog.MetaRea... | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.catalog.*; import org.apache.hadoop.hbase.ipc.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.ipc.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 839,086 |
public void setDefaultParser( Closure defaultParser ) {
if ( defaultParser == null ) this.defaultParser = DEFAULT_PARSER;
this.defaultParser = defaultParser;
} | void function( Closure defaultParser ) { if ( defaultParser == null ) this.defaultParser = DEFAULT_PARSER; this.defaultParser = defaultParser; } | /**
* Set the default parser used for unregistered content-types.
* @param defaultParser if
*/ | Set the default parser used for unregistered content-types | setDefaultParser | {
"repo_name": "nbakken81/AIDE",
"path": "videos-smartphone/www/http-builder-0.6/src/main/java/groovyx/net/http/ParserRegistry.java",
"license": "gpl-2.0",
"size": 17095
} | [
"groovy.lang.Closure"
] | import groovy.lang.Closure; | import groovy.lang.*; | [
"groovy.lang"
] | groovy.lang; | 1,053,426 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.