__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/22598699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getStopButton() {
if (stopButton == null) {
stopButton = new JButton();
stopButton.setText("Stop Layout");
stopButton.setEnabled(true);
stopButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
getBrowser().stopLayout();
}
});
}
return stopButton;
}
COM: <s> this method initializes stop button </s>
|
funcom_train/25289750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlaneQ(Vector4f planeQ) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_PLANE_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("TexCoordGeneration6"));
if (isLive())
((TexCoordGenerationRetained)this.retained).setPlaneQ(planeQ);
else
((TexCoordGenerationRetained)this.retained).initPlaneQ(planeQ);
}
COM: <s> sets the q coordinate plane equation </s>
|
funcom_train/48622245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer("[Date id = ");
sb.append(id);
sb.append(" day = ");
sb.append(day);
sb.append(" month = ");
sb.append(month);
sb.append(" year = ");
sb.append(year);
sb.append(" hour = ");
sb.append(hours);
sb.append(" min = ");
sb.append(minutes);
sb.append(" sec = ");
sb.append(seconds);
sb.append(" fraction of sec = ");
sb.append(fractionOfSecond);
sb.append("]");
return sb.toString();
}
COM: <s> to string method </s>
|
funcom_train/5851966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAddress(int ipv4Addr) {
m_addr = new byte[4];
m_addr[0] = (byte) (ipv4Addr >>> 24);
m_addr[1] = (byte) ((ipv4Addr >> 16) & 0xff);
m_addr[2] = (byte) ((ipv4Addr >> 8) & 0xff);
m_addr[3] = (byte) (ipv4Addr & 0xff);
}
COM: <s> sets the address object based on the 32 bit passed value </s>
|
funcom_train/26018933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkImsServices() {
for(int i=0; i < services.length; i++) {
if (services[i].isActivated()) {
if (logger.isActivated()) {
logger.info("Check IMS service: " + services[i].getClass().getName());
}
services[i].check();
}
}
}
COM: <s> check ims services </s>
|
funcom_train/46739429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setClassName(String className) {
if (Converter.isDifferent(this.className, className)) {
String oldclassName= null;
oldclassName = this.className;
this.className = className;
setModified("className");
firePropertyChange(String.valueOf(APPLICATIONPANELS_CLASSNAME), oldclassName, className);
}
}
COM: <s> fully qualified class name of the component for this model </s>
|
funcom_train/2628397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetComponent() {
System.out.println("getComponent");
FullComponentType instance = new FullComponentType();
ComponentType expResult = new ComponentType();
instance.component=expResult;
ComponentType result = instance.getComponent();
assertEquals(expResult, result);
}
COM: <s> test of get component method of class full component type </s>
|
funcom_train/26388650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MidiMessage mapChannel(ShortMessage message) {
int command = message.getCommand();
int data1 = message.getData1();
int data2 = message.getData2();
if (command < 0xF0 && channel != -1) {
try {
ShortMessage mapped = new ShortMessage();
mapped.setMessage(command, channel, data1, data2);
message = mapped;
} catch (InvalidMidiDataException ex) {
throw new Error(
"unexpected invalid data in MidiMerger channel mapping");
}
}
return message;
}
COM: <s> map the channel of the given message </s>
|
funcom_train/44838549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List findSubjects(String hqlStatement) throws RemoteException {
List result = null;
try {
result = subjectManager.findSubjects(hqlStatement);
} catch (RemoteException rex) {
System.out.println("Error on the remote server" + rex);
throw new RemoteException("Error on the remote server" + rex);
}
return result;
}
COM: <s> find subjects only a certain hql statement as parameter </s>
|
funcom_train/45422139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveUsedIds() throws SQLException {
Set<Integer> pubMedIds = new HashSet<Integer>();
pubMedIds.add(17719957);
pubMedIds.add(17431544);
pubMedIds.add(-1);
int expectedCount = 1;
evaluator.removeUsedIds(134, pubMedIds);
assertEquals(expectedCount, pubMedIds.size());
}
COM: <s> test get max rank </s>
|
funcom_train/13955393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String applicationNameForAppending() {
if (applicationNameForAppending == null) {
applicationNameForAppending = WOApplication.application() != null ? WOApplication.application().name() : null;
if (applicationNameForAppending != null) {
applicationNameForAppending = "." + applicationNameForAppending;
}
}
return applicationNameForAppending;
}
COM: <s> caches the application name for appending to the key </s>
|
funcom_train/25213427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNodetype(Node node) throws HelpingException {
if (node == null) {
return NODE_TYPE_EMPTY_LIST;
}
try {
return ((Integer) node.visit(this, null)).intValue();
} catch (GeneralException e) {
// this should not happen
throw new NoHelpException(e);
}
}
COM: <s> returns the node for an specified node </s>
|
funcom_train/50862281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
settlement = null;
Iterator<Building> i = buildings.iterator();
while (i.hasNext()) {
i.next().destroy();
}
buildings.clear();
buildings = null;
buildingValuesNewCache.clear();
buildingValuesNewCache = null;
buildingValuesOldCache.clear();
buildingValuesOldCache = null;
lastBuildingValuesUpdateTime = null;
}
COM: <s> prepare object for garbage collection </s>
|
funcom_train/3512613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDocked(boolean docked) {
if(docked && (this.componentShownHandler == null)) {
this.componentShownHandler = new ComponentShownHandler();
this.addComponentListener(this.componentShownHandler);
}
else if(!docked && (this.componentShownHandler != null)) {
this.removeComponentListener(this.componentShownHandler);
this.componentShownHandler = null;
}
}
COM: <s> sets the docked attribute of the tide browse object </s>
|
funcom_train/31654956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String interpolate() throws UndefinedVariableException {
if ( tokenized==null ) {
return null;
}
StringBuffer retval = new StringBuffer();
// return replaced version
Iterator it = tokenized.iterator();
while( it.hasNext() ) {
Token t = (Token)it.next();
retval.append( t.interpolate( this ) );
}
return retval.toString();
}
COM: <s> perform variable replacement on the source string </s>
|
funcom_train/14023080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParent(UrlDownloadJob pParent) {
mParent = new WeakReference<UrlDownloadJob>(pParent);
mDepth = pParent.getDepth() + 1;
setSavePath(pParent.getSavePath());
setMaxRetryCount(pParent.getMaxRetryCount());
setTryResume(pParent.isTryResume());
setParameter(new JobParameter("RefererURL", pParent.getUrl()));
}
COM: <s> sets the parent of the job </s>
|
funcom_train/18503676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void populate(ResultSet rs) {
//Get the cols to save to
DatabaseCol[] cols = getCols();
if (cols != null) {
//Get one value to each col
for (int i = 0; i < cols.length; i++) {
try {
//Get the data in a col-specific way
cols[i].populate(rs);
} catch (SQLException e) {
Database.printSQLException(e);
}
}
}
//Signal that the data is present it the database
inDatabase = true;
}
COM: <s> extracts data from a result set and into the java </s>
|
funcom_train/19543134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File exportImage(String name) {
name = IMAGES_DIR + name;
int index = name.lastIndexOf(".");
String type = ".unknownImage";
if (index >= 0) type = name.substring(index);
return exportFile(name, type, null);
}
COM: <s> copy an image into a temporary file </s>
|
funcom_train/13875179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAnnotatedElementPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Comment_annotatedElement_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Comment_annotatedElement_feature", "_UI_Comment_type"),
EmofPackage.Literals.COMMENT__ANNOTATED_ELEMENT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the annotated element feature </s>
|
funcom_train/24097189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSchemaVersion(CPESchemaVersion ver) {
if (getElement() != null) {
Element e = getElement().getChild("schema_version",
getElement().getNamespace(""));
boolean insertElement = false;
if (e == null) {
e = new Element("schema_version", getElement().getNamespace(""));
insertElement = true;
}
e.setText(ver.getVersion());
if (insertElement) {
insertChild(e, CPE_ORDER);
}
}
}
COM: <s> set the schema version </s>
|
funcom_train/15532092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearCache(Pattern pattern) {
synchronized (cacheLock) {
Set classes = cacheByTopic.keySet();
for (Iterator iterator = classes.iterator(); iterator.hasNext();) {
String cachedTopic = (String) iterator.next();
if (pattern.matcher(cachedTopic).matches()) {
iterator.remove();
}
}
}
}
COM: <s> clears the topic data cache for all topics that match a particular pattern </s>
|
funcom_train/49074884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String hmac(final String stringToSign) {
String signature = null;
byte[] data;
byte[] rawHmac;
try {
data = stringToSign.getBytes(UTF8_CHARSET);
rawHmac = this.mac.doFinal(data);
final Base64 encoder = new Base64(0);
signature = new String(encoder.encode(rawHmac));
} catch (final UnsupportedEncodingException e) {
throw new RuntimeException(UTF8_CHARSET + " is unsupported!", e);
}
return signature;
}
COM: <s> compute the hmac </s>
|
funcom_train/46765949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RuleMapModel getRuleMap(final long ruleMapId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return SecurityData.getRuleMap(ruleMapId, chain, call);
}}; return (RuleMapModel) call(method, call);
}
COM: <s> same transaction return the single rule map model for the primary key </s>
|
funcom_train/10035425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getInputStream() throws AS2Exception {
final Tracer tracer = baseTracer.entering("getInputStream()");
try {
if (this.mdn != null) {
tracer.leaving();
return mdn.getInputStream();
}
String errorMessage = "MDN is null.";
tracer.error(errorMessage);
AS2Exception as2ex = new AS2Exception(errorMessage);
tracer.throwing(as2ex);
throw as2ex;
} catch (Exception ex) {
tracer.catched(ex);
String errorMessage = "Exception occurred during getInputStream: "
+ ex.getMessage();
tracer.error(errorMessage);
AS2Exception as2ex = new AS2Exception(errorMessage);
tracer.throwing(as2ex);
throw as2ex;
}
}
COM: <s> returns the content of the mdn </s>
|
funcom_train/51538869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateState(boolean activeOperation) {
log("[validateState]");
if (activeOperation && this.mediator == null) {
throw new IllegalStateException(
"Illegal operation on an input session already in progress");
} else if (!activeOperation && this.mediator != null) {
throw new IllegalStateException(
"Illegal operation on an input session which is not in progress");
}
}
COM: <s> this method will validate the state of this input mode </s>
|
funcom_train/42044673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addElement(DataSourceEntry dataSource) {
dsList.add(dataSource);
// Always ensure we're changing the GUI on the EDT
if (SwingUtilities.isEventDispatchThread()) {
fireTableRowsInserted(dsList.size(), dsList.size());
} else {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
fireTableRowsInserted(dsList.size(), dsList.size());
}
});
}
}
COM: <s> add the element data source entry to the end of the list </s>
|
funcom_train/50770513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LabeledConcernReference addLabeledConcernReference(String label, Vector pack, String type) {
LabeledConcernReference lcref = new LabeledConcernReference();
lcref.setPackage(pack);
lcref.setName(type); //fixme: change to setType??
lcref.setLabel(label);
this.addToRepository(lcref);
return (lcref);
}
COM: <s> creates a reference to a labeled concern </s>
|
funcom_train/29545686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int execute(String sqlStatement) {
this.lastError = null;
try {
Statement myStatement = this.DBConnection.createStatement();
return myStatement.executeUpdate(sqlStatement);
} catch (SQLException err) {
this.lastError = err.getMessage();
// String errorMsg = "Error executing the SQL statement:\n" + sqlStatement + "\n" + err;
// this.error(errorMsg);
return -1;
}
}
COM: <s> execute a valid sql command that is not a query including insert update </s>
|
funcom_train/10836217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void activate(ComponentContext componentContext) {
super.activate(componentContext);
Dictionary<?, ?> props = componentContext.getProperties();
this.userAdminGroupName = OsgiUtil.toString(props.get(PAR_USER_ADMIN_GROUP_NAME),
DEFAULT_USER_ADMIN_GROUP_NAME);
log.info("User Admin Group Name {}", this.userAdminGroupName);
}
COM: <s> activates this component </s>
|
funcom_train/18730433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(File file) throws Exception {
Selection.primary().clear();
reset();
Document document = Persistence.load(file);
setDocument(document);
makeClean();
resetHistory();
checkpoint();
setSavePath(file.getCanonicalPath());
setDefaultPath(file.getParent());
}
COM: <s> load a file </s>
|
funcom_train/21607457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseQualifierElements(Element beanEle, AbstractBeanDefinition bd) {
NodeList nl = beanEle.getChildNodes();
for (int i = 0; i < nl.getLength(); i++) {
Node node = nl.item(i);
if (node instanceof Element && DomUtils.nodeNameEquals(node, QUALIFIER_ELEMENT)) {
parseQualifierElement((Element) node, bd);
}
}
}
COM: <s> parse qualifier sub elements of the given bean element </s>
|
funcom_train/29711363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshPropertySheetPage() {
if (_propertySheetPage != null) {
IWorkbenchPart part = getPart();
if (part != null) {
ISelection sel = part.getSite().getSelectionProvider()
.getSelection();
_propertySheetPage.selectionChanged(part, sel);
} else {
// XXX: will else happen?
System.out.println("AbstractCustomSection --> What to do?");
}
}
}
COM: <s> for certain action performed in the section may result big change in the </s>
|
funcom_train/34483230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private EEntity getAttrType(EAttribute attribute) throws SdaiException{
EEntity domain = null;
//System.out.println("<OO>: " + attribute);
if (attribute instanceof EExplicit_attribute){
domain = ((EExplicit_attribute)attribute).getDomain(null);
}
else if (attribute instanceof EDerived_attribute){
domain = ((EDerived_attribute)attribute).getDomain(null);
}
else if (attribute instanceof EInverse_attribute){
domain = ((EInverse_attribute)attribute).getDomain(null);
}
return domain;
}
COM: <s> return domain of attribute </s>
|
funcom_train/8096293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInstanceWeights() {
boolean[] result;
if (m_weightedInstancesHandler) {
if (!canPredict())
return;
result = m_Tester.instanceWeights(
m_NominalPredictors,
m_NumericPredictors,
m_StringPredictors,
m_DatePredictors,
m_RelationalPredictors,
m_multiInstanceHandler);
if (!result[0])
System.err.println("Error handling instance weights!");
}
}
COM: <s> tests whether the clusterer handles instance weights correctly </s>
|
funcom_train/26595254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean last() throws DException {
if (!leftIterator.last()) {
state = BEFOREFIRST;
return false;
}
rightNull = false;
while (rightIterator.last() && ifConditionSolvedBackward()) {
if (!leftIterator.previous()) {
state = BEFOREFIRST;
return false;
}
}
rightNull = true;
state = VALIDSTATE;
return true;
}
COM: <s> this method is responsible to retrieve the last record from iterator </s>
|
funcom_train/15912925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NamedText getTestTextByName(String p_name) {
for (Iterator iter = testTexts.iterator(); iter.hasNext();) {
NamedText element = (NamedText)iter.next();
if (p_name.equals(element.getName())) {
return element;
}
}
return null;
}
COM: <s> returns the named text with the passed name if existing </s>
|
funcom_train/24540109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showAddedCellFeedback(Rectangle cellBounds) {
cellBounds = cellBounds.getExpanded(cellBounds.width < 10 ? 20 : 0, cellBounds.height < 10 ? 20 : 0);
fRowColFigure = new GridLayoutAddedCellFeedbackFigure();
fRowColFigure.setBounds(mapModelToFigure(cellBounds));
addFeedback(fRowColFigure);
}
COM: <s> show the adding cell outside figure feedback </s>
|
funcom_train/1835465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readXmlFile() throws IOException {
StringBuffer xml = new StringBuffer();
BufferedReader brFile = new BufferedReader(new FileReader(new File(this.xmlFilename)));
try {
String line = null;
while ((line = brFile.readLine()) != null)
xml.append(line);
} catch (FileNotFoundException fnfe) {
fnfe.printStackTrace();
System.exit(-1);
} finally {
brFile.close();
}
setXml(xml.toString());
} // End of readXmlFile method
COM: <s> reads in the xml file from disk </s>
|
funcom_train/9802859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintIcon(Component c, Graphics g, int x, int y) {
if (color != null) {
g.setColor(color);
g.fillRect(x, y, iconWidth, iconHeight);
g.setColor(Color.BLACK);
g.drawRect(x, y, iconWidth - 1, iconHeight - 1);
}
}
COM: <s> draw the icon at the specified location </s>
|
funcom_train/49789656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTextFieldsCreated() throws Exception {
Frame home = assertHasFrame(root, "Home");
InputForm form = assertHasInputForm(home, "View News");
InputTextField t1 = assertHasInputTextField(form, "title");
InputTextField t2 = assertHasInputTextField(form, "content");
InputTextField t3 = assertHasInputTextField(form, "posted");
assertGenerated(t1);
assertGenerated(t2);
assertGenerated(t3);
}
COM: <s> the form is populated with text fields </s>
|
funcom_train/50909176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValues(IFoodTable data) throws HerculeumException {
try {
this.setName(data.getName());
this.setWeight(data.getWeight());
this.setNutrients(data.getNutrients());
//TODO: for now we're all bananas...
this.setIcon(TileNumbers.Items.Banana);
} catch (Exception ex) {
logger.warning("Setting values failed");
throw new HerculeumException(
"Setting values failed",
ex);
}
}
COM: <s> sets values for this food ration from given ifood table </s>
|
funcom_train/37422412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Site findSiteByGenesisUrl(String pUrl) throws ClassNotFoundException, SQLException {
Vector tVect = findSiteByQuery("select * from site where url = " + Utility.isNull(pUrl));
if (tVect.size() > 0)
return (Site) tVect.firstElement();
else
return null;
}
COM: <s> finds a site in the database using its genesis url </s>
|
funcom_train/42635260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInUniversalCategory(UniversalCategory univCat, LanguageSet ls) throws WikapidiaException{
Vector<UniversalCategory> catMemberships = this.getUniversalCategoryMemberships(ls);
Vector<UniversalCategory> curParents;
for (UniversalCategory curUnivCat : catMemberships){
curParents = curUnivCat.getAllParents(ls);
for (UniversalCategory curParent : curParents){
if (univCat.getUnivID() == curParent.getUnivID()){
return true;
}
}
}
return false;
}
COM: <s> determines if this universal article is in the input universal category in any </s>
|
funcom_train/25646091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseSAX(Attributes attributes) throws ParseException {
setId(Long.parseLong(attributes.getValue("id")));
setChangeSet(Long.parseLong(attributes.getValue("changeset")));
setTimestamp(attributes.getValue("timestamp"));
setVersion(Integer.parseInt(attributes.getValue("version")));
}
COM: <s> sets all the basic fields id changeset timestamp and version </s>
|
funcom_train/120314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getURL(GPGraph graph, Object cell) {
if (cell instanceof DefaultGraphCell) {
final Object userObject = ((DefaultGraphCell) cell).getUserObject();
if (userObject instanceof GPUserObject) {
Object url = ((GPUserObject) userObject).getProperty(GPUserObject.keyURI);
if (url != null)
return url.toString();
}
}
return cell.toString();
}
COM: <s> override or implement to map from cells to urls </s>
|
funcom_train/43260855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getScreenCommand() {
if (screenCommand == null) {//GEN-END:|80-getter|0|80-preInit
// write pre-init user code here
screenCommand = new Command("Screen", Command.SCREEN, 0);//GEN-LINE:|80-getter|1|80-postInit
// write post-init user code here
}//GEN-BEGIN:|80-getter|2|
return screenCommand;
}
COM: <s> returns an initiliazed instance of screen command component </s>
|
funcom_train/44616969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void privateAddEntry (LRUCacheEntry entry, boolean shuffle) {
if (!shuffle) {
this.entryTable.put (entry.key, entry);
this.currentSpace += entry.space;
}
entry.timestamp = this.timestampCounter++;
entry.next = this.entryQueue;
entry.previous = null;
if (this.entryQueue == null) {
/* this is the first and last entry */
this.entryQueueTail = entry;
} else {
this.entryQueue.previous = entry;
}
this.entryQueue = entry;
}
COM: <s> adds the given entry from the receiver </s>
|
funcom_train/20622994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPanel getChoosePanel() {
try {
JPanel panel = new JPanel();
SpringLayout layout = new SpringLayout();
panel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
panel.setLayout(layout);
panel.setBorder(BorderFactory.createEmptyBorder());
return setUpPanelFields(panel);
} catch (Exception e) {
fLog.log(Level.SEVERE,e.getMessage(),e);
}
return null;
}
COM: <s> a jpanel to display inside the content panel </s>
|
funcom_train/17848778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkConnection() {
try {
// if checking is disabled, always assume existing connection
if (!Settings.propInternetConnectionCheck.getBoolean()) {
return true;
}
for (String url : CHECK_URLS) {
if (checkConnection(new URL(url))) {
return true;
}
}
} catch (MalformedURLException e) {
e.printStackTrace();
}
return false;
}
COM: <s> check the network </s>
|
funcom_train/8461308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Note getNoteFirstExtendedLineHigh() {
if (m_highNote == null) {
//A 7th (label=6) for 5 lines,
//A 5th (label=4) for 3 lines,
//A 3rd (label=2) for 1 line
byte label = (byte) (getStaffLines() + 1);
Interval interv = new Interval(label,
label==5?Interval.PERFECT:Interval.MAJOR,
Interval.UPWARD);
m_highNote = interv.calculateSecondNote(getMiddleNote());
m_highNote.setAccidental(new Accidental());//Accidental.NONE
}
return m_highNote;
}
COM: <s> return the high first note which needs an extended staff line </s>
|
funcom_train/50078838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Class getCollectionComponentType(String attrName) {
Class componentType = null;
try {
Method readMethod = this.documentType.getMethod(
"get" + attrName, new Class[] { String.class });
componentType = readMethod.getReturnType();
} catch (NoSuchMethodException e) {
// read method does not exist, so leave componentType as null
}
return componentType;
}
COM: <s> gets the type of class contained within a map </s>
|
funcom_train/12765570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createButtonsForButtonBar(Composite parent) {
okButton = createButton(parent, IDialogConstants.OK_ID,
IDialogConstants.OK_LABEL, true);
createButton(parent, IDialogConstants.CANCEL_ID,
IDialogConstants.CANCEL_LABEL, false);
updateButtons();
}
COM: <s> adds buttons to this dialogs button bar </s>
|
funcom_train/16141149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean initIdeHeapFile() {
String settingsDir = jEdit.getSettingsDirectory();
if (settingsDir != null) {
ideHeapFile = new File(settingsDir + File.separator + "ide.polysave");
return true;
} else {
ideHeapFile = null;
System.err.println("PolyML needs to compile IDE ML code in " +
"the settings directory, but no settings directory if being used. " +
"You will not be able to use the IDE features of the polyml Plugin ");
return false;
}
}
COM: <s> initialize the ide heap file variable </s>
|
funcom_train/15677355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AffineTransform2D invert() {
double det = m00 * m11 - m10 * m01;
if (Math.abs(det) < Shape2D.ACCURACY)
throw new NonInvertibleTransform2DException(this);
return new AffineTransform2D(
m11 / det, -m01 / det, (m01 * m12 - m02 * m11) / det,
-m10 / det, m00 / det, (m02 * m10 - m00 * m12) / det);
}
COM: <s> return the inverse transform </s>
|
funcom_train/42475831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void referencesDelete(List references, HttpServletRequest request) {
assert references != null : "Parameter 'references' must not be null.";
assert request != null : "Parameter 'request' must not be null.";
final int index = Integer.parseInt(request.getParameter("index"));
if (index >= references.size()) return; // if the user deletes a reference which is not stored yet
references.remove(Integer.parseInt(request.getParameter("index")));
}
COM: <s> deletes a reference from the given list of references </s>
|
funcom_train/6409673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTexture(Texture texture, int textureUnit) {
if (textureUnit >= 0 && textureUnit < numTotalTexUnits) {
while (textureUnit >= this.texture.size()) {
this.texture.add(null);
}
this.texture.set(textureUnit, texture);
resetFirstLast();
}
setNeedsRefresh(true);
}
COM: <s> code set texture code sets the texture object to be used by the </s>
|
funcom_train/24317365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void terminate() throws Exception, CannotStop, NotRunning {
long tStamp = SharkUtilities.methodStart(shandle, "WfProcessWrapper.terminate");
try {
checkSecurity("terminate", null);
WfProcessInternal procInternal = getProcessImpl(processId,
SharkUtilities.WRITE_MODE);
procInternal.terminate(shandle);
} finally {
SharkUtilities.methodEnd(shandle, tStamp, "WfProcessWrapper.terminate", this);
}
}
COM: <s> terminate this process </s>
|
funcom_train/33234008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getCardPassedSI() {
if (cardPassedSI == null) {//GEN-END:|128-getter|0|128-preInit
// write pre-init user code here
cardPassedSI = new StringItem("Passed:", null);//GEN-LINE:|128-getter|1|128-postInit
// write post-init user code here
}//GEN-BEGIN:|128-getter|2|
return cardPassedSI;
}
COM: <s> returns an initiliazed instance of card passed si component </s>
|
funcom_train/947852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getText(SrchOptn pSrchOpt){
JPanel txtPan=new JPanel();
txtPan.setLayout(new FlowLayout(FlowLayout.LEADING,25,10));
jLabTxt=new JLabel("Input the text/words to search :");
jLabTxt.setFont(new Font("Arial",Font.ITALIC,12));
txtPan.add(jLabTxt);
jTxt=new JTextField("",15);
txtPan.add(jTxt);
jTxt.setText(pSrchOpt.getSrchTxt());
optPanel.add(txtPan);
}
COM: <s> description fetches text to search </s>
|
funcom_train/16435536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void importVATCodesFrom(SSAccountPlan pAccountPlan) {
Map<Integer, SSAccount> iMap = getAccountMap();
iAssessementYear = pAccountPlan.iAssessementYear;
for (SSAccount iFromAccount : pAccountPlan.getAccounts()) {
SSAccount iAccount = iMap.get(iFromAccount.getNumber());
if (iAccount != null) {
iAccount.setVATCode(iFromAccount.getVATCode());
}
}
}
COM: <s> copies the vat codes from another account plan </s>
|
funcom_train/29913662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object PALO_EPARENTCOUNT(String servdb, String dimensionName, String elementName) {
try {
Element element = getElement(servdb, dimensionName, elementName);
if ( element == null )
return null;
return new Double(element.getParentCount());
} catch( Exception e ) {
return null;
}
}
COM: <s> returns the number of parents a certain element has </s>
|
funcom_train/36255745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Validator createValidator(FaceletContext ctx) {
if (this.validatorId == null) {
throw new TagException(
this.tag,
"Default behavior invoked of requiring a validator-id passed in the constructor, must override ValidateHandler(ValidatorConfig)");
}
return ctx.getFacesContext().getApplication().createValidator(
this.validatorId);
}
COM: <s> template method for creating a validator instance </s>
|
funcom_train/12178019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addHeight(StringBuffer url) {
// The height parameter is only added if there is not already a
// height parameter.
if(!parameterExists(url, tURLPP.getHeightParameterName())) {
url.append('&').append(tURLPP.getHeightParameterName()).
append('=').append("9999");
}
}
COM: <s> adds the height parameter name value pair to the url </s>
|
funcom_train/593131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Resolution proceed() throws Exception {
if (this.iterator == null) {
log.debug("Transitioning to lifecycle stage ", lifecycleStage);
this.iterator = this.interceptors.iterator();
}
if (this.iterator.hasNext()) {
return this.iterator.next().intercept(this);
}
else {
return this.target.intercept(this);
}
}
COM: <s> continues the flow of execution </s>
|
funcom_train/3760183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reschedule() {
nextTime = myTask.cronInterval();
if (nextTime > 0) {
if (nextTime < 100)
nextTime = 100;
logger.finer("Rescheduling task for " + nextTime + "msec: " + myTask);
nextTime += System.currentTimeMillis();
Cron.this.addCronJob(this);
}
}
COM: <s> add this event to the queue if it ought to </s>
|
funcom_train/50613585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean optimizeSegment() {
double minDist = tolerance;
if (realNodes.length > 2) {
for (int i = 0; i < realNodes.length - 2; i++) {
Line2D segment =
new Line2D.Double(
realNodes[i].asPoint2D(),
realNodes[i + 2].asPoint2D());
if (segment.ptLineDist(realNodes[i + 1].asPoint2D()) < minDist) {
linkModel.removeNode(realNodes[i + 1].i);
return true;
}
}
}
return false;
}
COM: <s> optimizes at most one segment </s>
|
funcom_train/3985987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int readBytes(byte outgoing[]) {
if (bufferIndex == bufferLast) return 0;
synchronized (buffer) {
int length = bufferLast - bufferIndex;
if (length > outgoing.length)
{
length = outgoing.length;
}
System.arraycopy(buffer, bufferIndex, outgoing, 0, length);
bufferIndex += length;
if (bufferIndex == bufferLast) {
bufferIndex = 0; // rewind
bufferLast = 0;
}
return length;
}
}
COM: <s> grab whatever is in the serial buffer and stuff it into a </s>
|
funcom_train/19372168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidFamilyNameNull() {
Contact contact = this.userPopulator.getContact1();
contact.setFamilyName(null);
try {
this.contactManager.update(contact);
fail("FamilyName == null");
} catch (ValidationException ignore) {
} catch (Exception e) {
fail(e.getMessage());
}
}
COM: <s> attempt to update a code contact code with a null </s>
|
funcom_train/9162564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContents( final JComponent contents ) {
final JComponent oldValue = contents;
this.contents = contents;
firePropertyChange( "open", oldValue, contents );
// If the drawer is open, we need to update the contents
if( open ) {
remove( oldValue );
add( contents, BorderLayout.CENTER );
}
}
COM: <s> sets the code jcomponent code that will be shown inside this </s>
|
funcom_train/49627739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initActivationRoleIds(final Element conf) {
if (conf.getChild("roles") != null) {
@SuppressWarnings("unchecked")
List<Element> roleEls = (List<Element>) conf.getChild("roles")
.getChildren("role");
if (roleEls.size() > 0) {
for (Element roleEl : roleEls) {
this.activationRoleIds.add(Long.parseLong(roleEl
.getAttributeValue("id")));
}
}
}
}
COM: <s> loads the roles which are to be added to a user on activation </s>
|
funcom_train/25658664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLoadBook() {
DTOSession dtoSession = DTOSessionFactory.getSession(DTOSessionFactory.createSession("test",dtoAccessService));
BookDTO aBookDto=(BookDTO) dtoService.doLoad(bookIds.get(0), "dtos.BookDTO", dtoSession);
assertNull(aBookDto);
}
COM: <s> loading a book without select rights should return null </s>
|
funcom_train/8683718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String currentTokenDisplay() {
if (t.currentToken==Token.NAME) {
return "name \"" + t.currentTokenValue + '\"';
} else if (t.currentToken==Token.UNKNOWN) {
return "(unknown token)";
} else {
return '\"' + Token.tokens[t.currentToken] + '\"';
}
}
COM: <s> display the current token in an error message </s>
|
funcom_train/48151967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintComponent(Graphics g){
super.paintComponent(g);
//Draw axes
g.setColor(Color.black);
drawAxis(g, 0, yMax, 0.1 * yMax, xMin, VERTICAL);
drawAxis(g, domain, 0, HORIZONTAL);
//Draw function
g.setColor(distributionColor);
if (functionType == PDF) drawDistributionPDF(g);
if (functionType == CDF) drawCDF(g);
//Draw boxplot
if (momentType == MSD) drawDistributionMSD(g);
}
COM: <s> this method paints the graph of the density function empirical density </s>
|
funcom_train/21022097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRole() {
String role = null;
if (!dataTable.getSelectedRows().isEmpty()) {
int selectedRow = ((Integer) dataTable.getSelectedRows().iterator().next()).intValue();
if (dataTable.isRowSelected(selectedRow)) {
role = dataTable.getHTML(((Integer) dataTable.getSelectedRows().iterator().next()).intValue(),0);
}
}
return role;
}
COM: <s> gets the role </s>
|
funcom_train/21995185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getSchedule() throws RpcException {
try {
authorize(Scanner.GET_SCHEDULE);
return getBus().getSchedule();
}
catch (JRecSecurityException e) {
throw new RpcException("security-problem obtaining scanner's schedule", e);
}
catch (BusException e) {
throw new RpcException("bus-problem obtaining scanner's schedule", e);
}
}
COM: <s> obtain the next scheduled run of the scanner </s>
|
funcom_train/40874970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void savePreferences(PreferenceDto preferenceDto, HttpServletRequest request, HttpSession session) {
ThemeDisplay themeDisplay = (ThemeDisplay) session.getAttribute("THEME_DISPLAY");
long organization = themeDisplay.getScopeGroupId();
accountStatusNotificationService.savePreferences(preferenceDto, organization);
}
COM: <s> checks user belongs to community and he is an admin or owner </s>
|
funcom_train/3370864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeIconFor(JInternalFrame f) {
JInternalFrame.JDesktopIcon di = f.getDesktopIcon();
Container c = di.getParent();
if(c != null) {
c.remove(di);
c.repaint(di.getX(), di.getY(), di.getWidth(), di.getHeight());
}
}
COM: <s> convenience method to remove the desktop icon of b f b is necessary </s>
|
funcom_train/4978574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public int distance( AlnSite siteA, AlnSite siteB) {
// int dist = 0;
// Map<AlnSite,AlnSite> pred = (Map<AlnSite,AlnSite>) _predecessors.get(siteB);
//
// AlnSite site1, site2 = siteA;
// while (site2 != siteB) {
// site1 = site2;
// site2 = (AlnSite) pred.get(site1);
// dist++;
// }
//
// return dist;
// }
COM: <s> method for calculating the distance from site a to site b </s>
|
funcom_train/9680792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addResultsToTable(List results, BinTreeTableNode rootNode){
for (int i = 0; i < results.size(); ++i) {
BinMember binMember = (BinMember) results.get(i);
ParentTreeTableNode parent = rootNode.findParent(binMember.getOwner(), true);
parent.addChild(new BinTreeTableNode(binMember));
}
}
COM: <s> adds results from list into the binary table </s>
|
funcom_train/42076626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer getSelectedBuffer() {
StringBuffer b = null;
int index = m_List.getSelectedIndex();
if (index != -1) {
String name = (String) (m_Model.elementAt(index));
b = (StringBuffer) (m_HashResults.get(name));
}
return b;
}
COM: <s> gets the buffer associated with the currently </s>
|
funcom_train/44433333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int setScore(int score, boolean isTeamHome) {
int res=-1;
try { res=((Integer)m_setScore.invoke(rch,new Object[] { new Integer(score), new Boolean(isTeamHome) } ) ).intValue(); }
catch (Exception e) { e.printStackTrace(); }
return res;
}
COM: <s> sets a teams score </s>
|
funcom_train/18895202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(java.lang.Object object) {
if (object instanceof BlankNode) {
return 1;
}
if (object instanceof URIReference) {
return 1;
}
else if (object instanceof Literal) {
Literal literal = (Literal) object;
return getLexicalForm().compareTo(literal.getLexicalForm());
}
else {
throw new ClassCastException("Not an RDF node");
}
}
COM: <s> comparison is by the var text var property </s>
|
funcom_train/38217367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertSameDay() throws IllegalArgumentException {
if (24 <= (this.critHourOfDay + critSliceWindow)) {
// XXX day boundary handling not implemented
throw new IllegalArgumentException("day boundary handling not implemented " +
"critHourOfDay ["+this.critHourOfDay+"] "+
"wanted delta ["+critSliceWindow+"]");
}
}
COM: <s> method to check if the two parameters </s>
|
funcom_train/49455189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(Bundle bundle, String xmlFilename, String xmlText) throws Exception {
this.cfg = bundle;
this.currentFilename = xmlFilename;
StringReader sr = new StringReader(xmlText);
try {
parse(new XMLInputSource(null, null, null, sr, null));
}
finally {
sr.close();
}
this.cfg = null;
}
COM: <s> parse many files into bundles </s>
|
funcom_train/37831532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeExpiredModifiers() {
Iterator<AttributeModifier> iterator = modifiers.iterator();
boolean updateNeeded = false;
while(iterator.hasNext()) {
AttributeModifier am = iterator.next();
if(am.isExpired()) {
iterator.remove();
updateNeeded = true;
}
}
ModifiedAttributeUpdater temp = this.affectedEntity.get();
if (updateNeeded && (temp != null)) {
temp.updateModifiedAttributes();
}
updateNextCleanUpRun();
}
COM: <s> clean up the managed modifiers and remove modifiers that are expired </s>
|
funcom_train/18787198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerRule(ValidationRule rule, String property) {
assert (rule != null) && (property != null);
List<ValidationRule> rules = propertyRules.get(property);
if (rules == null) {
rules = new ArrayList<ValidationRule>();
propertyRules.put(property, rules);
}
if (!rules.contains(rule)) {
rules.add(rule);
}
}
COM: <s> registers a validation rule </s>
|
funcom_train/2883547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object attr(Object d, Object av, boolean showme) {
DefaultMutableTreeNode node = new DefaultMutableTreeNode(av);
if (showme && visnode == null) {
visnode = node;
}
if (root == null) {
root = node;
} else {
((DefaultMutableTreeNode) d).add(node);
}
return node;
}
COM: <s> add attribute to the hierarchy to be displayed </s>
|
funcom_train/15955785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void CreateEvent() {
Event lEvent = new DefaultCreateEvent();
Invocation lINV = new DefaultInvocation(getTarget(),lEvent,null /*parameters*/);
if( getTarget() != lINV.getTopExecutionFrame().getTarget())
{
lINV.PushFrame(getTarget(),lEvent,null /*parameters*/);
}
CreateEvent(lINV, lEvent);
}
COM: <s> call immediatly after creation of active object </s>
|
funcom_train/21173695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDeleteInlineAnnotation () throws Exception {
Document doc = createInlineAnnotation ("Here");
String content = doc.getText (0, doc.getLength());
String addressEnd = browser.getContent().getAddressEnd(true);
int offset = ContentPane.getOffset(addressEnd, doc);
getHelper().enterClickAndLeave(new JTextComponentMouseEventData (this, browser.getContent(), 1, EventDataConstants.DEFAULT_MOUSE_MODIFIERS, false, 0, 0, offset-1));
}
COM: <s> this test is not yet done </s>
|
funcom_train/18002245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void normalize() {
minutes += seconds / SECONDS_PER_MINUTE;
seconds %= SECONDS_PER_MINUTE;
hours += minutes / MINUTES_PER_HOUR;
minutes %= MINUTES_PER_HOUR;
/* N.B. do *not* normalize hours to days. 24 hours is not the same thing
* as 1 day, if we're near a DST jump. */
}
COM: <s> normalize the duration so that every field is within its legal range </s>
|
funcom_train/10836034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ServiceRegistration registerService() {
@SuppressWarnings("unchecked")
Dictionary<String, Object> props = componentContext.getProperties();
String[] interfaces = new String[] { SlingRepository.class.getName(),
Repository.class.getName() };
return componentContext.getBundleContext().registerService(interfaces,
this, props);
}
COM: <s> registers this component as an osgi service with type </s>
|
funcom_train/17754498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void match(int t) throws MismatchedTokenException, TokenStreamException {
if (LA(1) != t) {
throw new MismatchedTokenException(tokenNames, LT(1), t, false, getFilename());
}
// mark token as consumed -- fetch next token deferred until LA/LT
consume();
}
COM: <s> make sure current lookahead symbol matches token type tt t tt </s>
|
funcom_train/7619167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(String key) {
unparcel();
Object o = mMap.get(key);
if (o == null) {
return null;
}
try {
return (String) o;
} catch (ClassCastException e) {
typeWarning(key, o, "String", e);
return null;
}
}
COM: <s> returns the value associated with the given key or null if </s>
|
funcom_train/40613723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTypeSave(Value a, Value b) {
if (a == b) {
return 0;
}
int dataType = Value.getHigherOrder(a.getType(), b.getType());
a = a.convertTo(dataType);
b = b.convertTo(dataType);
return a.compareTypeSave(b, compareMode);
}
COM: <s> compare two values with the current comparison mode </s>
|
funcom_train/43469214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
// StringBuffer toString = new StringBuffer(size() * 10);
//
// Iterator iter = iterator();
// Object objEntry;
// while (iter.hasNext()) {
// objEntry = iter.next();
// toString.append(objEntry.toString()).append(",");
// }
// return toString.toString();
return this.collection.toString();
}
COM: <s> string formatted version of zxcollection </s>
|
funcom_train/12655456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getTopTitles(int rowIndex, int columnIndex) {
if (columnIndex <= variables.size()) {
return getVariableAtColumn(columnIndex).getName();
} else if (columnIndex == variables.size() + 1) {
return "AS";
} else if (columnIndex == variables.size() + 2) {
return "P";
}
return null;
}
COM: <s> returns titles at the first row </s>
|
funcom_train/42660266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireOnAfterRemoveEvent(R r, C c, V v) {
if (this.onAfterRemoveEvent != null) {
Cell<R,C,V> cell = new CellImpl_1x2<R,C,V>(r, c, v);
this.onAfterRemoveEvent.fire(new ActionEventAfter_1x0<Cell<R,C,V>>(this, 0, CM_AFTER_REMOVE, cell));
}
}
COM: <s> fires an event after the remove operation </s>
|
funcom_train/24937460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerConfigurable(Node node, Configurable config) {
NodeList nodeList = node.getChildNodes();
for (int i = 0; i < nodeList.getLength(); i++) {
Node child = nodeList.item(i);
if ((child instanceof Element)
&& ((Element) child).getNodeName().equalsIgnoreCase(
SLIMConstants.CONFIG_OPTION)) {
configurableElements.put(config, (Element) node);
}
}
}
COM: <s> if needed the specified node and configurable are registered as </s>
|
funcom_train/48184139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SignScorer loadScorer(File tmpDir, int foldNum, File trainFile) throws IOException {
File foldSpecFile = new File(tmpDir, filename(foldNum));
String foldSpecPath = foldSpecFile.getCanonicalPath();
return new FactoredNgramModelFamily(foldSpecPath, useSemClasses);
}
COM: <s> loads a scoring model created from the training data </s>
|
funcom_train/17896498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object createObject(Class<?> clazz, String registryName, DbResult ret, DbManager manager) throws Exception {
Object object = manager.getActivator().createObject(clazz.getCanonicalName());
if (object instanceof DbObject) {
((DbObject)object).doInit(manager, registryName);
}
return object;
}
COM: <s> object factory to create different kinds of objects for one table </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.