__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/50313723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undoChanges(String filename) throws CmsException {
//read the file header including deleted
CmsResource res = m_rb.readFileHeader(m_context.currentUser(), m_context.currentProject(), getSiteRoot(filename), true);
I_CmsResourceType rt = getResourceType(res.getType());
rt.undoChanges(this, filename);
}
COM: <s> undo changes in a file by copying the online file </s>
|
funcom_train/46837109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonExample() {
if (jButtonExample == null) {
jButtonExample = new JButton();
jButtonExample.setBounds(new java.awt.Rectangle(5, 50, 120, 22));
jButtonExample.setText("Button");
}
return jButtonExample;
}
COM: <s> this method initializes j button example </s>
|
funcom_train/2369713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getGuessed() {
int result = 0;
final Iterator<Player> iterator = this.players.iterator();
while (iterator.hasNext()) {
final Player current = iterator.next();
final int amount = this.getGuessed(current);
if (amount != -1) {
result += amount;
}
}
return result;
}
COM: <s> this convenience method returns the total amount of currently guessed </s>
|
funcom_train/2963564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void model(int cst, int seed, int domSize, int n, StringBuffer message) {
switch (cst){
case MIN :
modelMin(seed, domSize, n, message);
break;
case MAX :
modelMax(seed, domSize, n, message);
break;
default:
Assert.fail("unknow constraint");
}
}
COM: <s> build the correct model </s>
|
funcom_train/32057607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLostOwnership() {
Object[] objs = new Object[5];
ConnectionSet cs = new ConnectionSet();
HashMap map = new HashMap();
Rectangle rec = new Rectangle();
GraphTransferable trans = new GraphTransferable(objs, cs, map, rec);
trans.lostOwnership(null, null);
assertTrue(trans.getAttributeMap().size() == 0);
}
COM: <s> this function test lost ownership function of graph transferable class </s>
|
funcom_train/33614890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() throws IOException {
synchronized (lock) {
if (isClosed()) {
throw new IOException("Reader is closed"); //$NON-NLS-1$
}
if (markpos == -1) {
throw new IOException("Mark pos is not setted"); //$NON-NLS-1$
}
pos = markpos;
}
}
COM: <s> reset this buffered readers position to the last code mark code </s>
|
funcom_train/40409566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTrafficEstimatorService() throws ApiException, RemoteException {
KeywordRequest newKeyword = new KeywordRequest();
newKeyword.setText("test");
newKeyword.setMaxCpc(1000000L);
newKeyword.setType(KeywordType.Broad);
KeywordRequest[] keywordList = {newKeyword};
KeywordEstimate[] estimates = trafficEstimatorService.estimateKeywordList(keywordList);
}
COM: <s> a smoke test for the traffic estimator service </s>
|
funcom_train/39314289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetStroke() {
System.out.println("testSetStroke");
m.setStroke(0);
BasicStroke bs = new BasicStroke( 0 );
assertTrue( "updated stroke ", bs.getLineWidth() == ((BasicStroke )m.current_stroke).getLineWidth() );
System.out.println("done testSetStroke");
}
COM: <s> test of set stroke method of class main canvas </s>
|
funcom_train/12187697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected HTTPMessageEntities getEntities(XMLPipelineContext context) {
HTTPMessageEntities entities = (HTTPMessageEntities)
context.getProperty(entityCollectionKey);
if (entities == null) {
entities = factory.createHTTPMessageEntities();
context.setProperty(entityCollectionKey, entities, false);
}
return entities;
}
COM: <s> get the appropriate httpmessage entities from the context creating </s>
|
funcom_train/15697226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addFolders(Directory dir, TreeItem parentItem) {
for (BaseFile bf : dir.getSubentries()) {
if (bf instanceof Directory) {
Directory bfdir = (Directory) bf;
TreeItem item = new TreeItem(parentItem, SWT.NONE);
updateTreeItem(item, bfdir);
addFolders(bfdir, item);
}
}
}
COM: <s> adds folders to a tree item </s>
|
funcom_train/3652786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void write(ClassOutput output) throws IOException {
// write the size of the collection
output.writeShort(children.size());
// have the children write themselves out to the stream
Iterator childIter = children.iterator();
AbstractClassMember child = null;
while (childIter.hasNext()) {
child = (AbstractClassMember)childIter.next();
child.write(output);
}
}
COM: <s> writes the object to a stream of bytecodes </s>
|
funcom_train/25649025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removePort(Object subModelCell, Port port) {
log.debug("Removing port...");
Object portCell = getPortByUserObject(subModelCell, port);
if (portCell != null) {
jGraphModel.remove(new Object[] { portCell });
jGraphModel.edit(cellFactory.calculatePortPositions(subModelCell, port), null , null, null);
}
}
COM: <s> removes the specified port from the specified cell </s>
|
funcom_train/31561355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MaverickString DTX(MaverickString result, ConstantString width) {
result.clear();
String val = Long.toHexString(Long.parseLong(toString())).toUpperCase();
while (width.intValue() - val.length() > result.length()) {
result.append('0');
}
result.append(val);
return result;
}
COM: <s> converts a decimal integer to hexadecimal notation </s>
|
funcom_train/25028724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MotherTabbedPane getTabbedPane(TextPad textPad) {
int lenGroup = getGroupTabbedPane().getTabCount();
MotherTabbedPane pane = null;
// finds the Text Pad by searching for the index of the component
// in each tab group
for (int i = 0; i < lenGroup; i++) {
pane = getTabbedPaneAt(i);
if (pane.indexOfComponent(textPad.getScrollPane()) != -1) {
return pane;
}
}
return null;
}
COM: <s> gets the mother tabbed pane that houses the given text pad </s>
|
funcom_train/32790321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IterateExp createIterate(OclExpression src, VariableDeclaration itVar, VariableDeclaration accVar, OclExpression body) throws WellFormednessException{
IterateExp itExp = factory.createIterateExp();
itExp.setSource(src);
itExp.getIterators().add(itVar);
itExp.setResult(accVar);
itExp.setBody(body);
typeEvl.getType(itExp);
return itExp;
}
COM: <s> creates an instance of iterate exp </s>
|
funcom_train/32069351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAccountGroup(AccountGroup accountGroup) {
boolean addOk = getAccountGroups().add(accountGroup);
if (addOk) {
accountGroup.setParentGroup((AccountGroup)this);
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed account group to the parent group collection </s>
|
funcom_train/39538667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean test(ComponentAdapter adapter) {
if (pattern == null) {
return false;
}
if (!adapter.isTestable(testColumn))
return false;
Object value = adapter.getFilteredValueAt(adapter.row, testColumn);
if (value == null) {
return false;
} else {
boolean matches = pattern.matcher(value.toString()).find();
return matches;
}
}
COM: <s> tests whether the string representation of the value of the cell </s>
|
funcom_train/17015742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getTaskType(TaskInProgress tip) {
if (tip.isJobCleanupTask()) {
return Values.CLEANUP.name();
} else if (tip.isJobSetupTask()) {
return Values.SETUP.name();
} else if (tip.isMapTask()) {
return Values.MAP.name();
} else {
return Values.REDUCE.name();
}
}
COM: <s> get the task type for logging it to </s>
|
funcom_train/3560312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showPrograms() throws DbException {
DbIterator res;
if (!isInitialized())
init();
res = prv.getPrograms(null).iterator();
TableUtils.fillSortedTable(tabProgramList, res, programIndexes, 0);
initProgramTableSizes();
}
COM: <s> shows the list of programs </s>
|
funcom_train/44843330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DataItem _getCachedDataItem(int id) {
synchronized (_mruCache) {
Iterator iter = _mruCache.iterator();
while (iter.hasNext()) {
DataItem dataItem = (DataItem)iter.next();
if (id == dataItem.id) {
// Cache hit, move hit to most-recent position
iter.remove();
_mruCache.addFirst(dataItem);
// Return the matching DataItem
return dataItem;
}
}
}
return null;
}
COM: <s> fetches the data item with the specified id from the cache </s>
|
funcom_train/43852533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finish(final String db) throws IOException {
final DataOutput out = new DataOutput(db, tag ? DATATAG : DATAATN);
out.writeBytesArray(keys);
out.writeNums(next);
out.writeNums(bucket);
out.writeNums(counter);
out.writeBooleans(noleaf);
out.writeNum(size);
out.close();
}
COM: <s> finishes the index structure and optimizes its memory usage </s>
|
funcom_train/3841242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void queueJob(Job job) {
synchronized (this) {
if (job.isPrePrepared()) {
Job j = (Job) preparedJobs.get(job.getPrePreparedJobID());
job.setDynamicJob(j);
}
pendingJobs.add(job);
notifyAll();
}
}
COM: <s> queue up a job for processing </s>
|
funcom_train/16912556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double findPhysicalDistance(final Neuron neuron1, final Neuron neuron2) {
double ret = Math.sqrt(Math.pow(neuron2.getX() - neuron1.getX(), 2)
+ Math.pow(neuron2.getY() - neuron1.getY(), 2));
return ret;
}
COM: <s> finds the physical euclidian distance between two neurons </s>
|
funcom_train/3102226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializePage(final IResource resource) {
Assertion.valid(resource);
final IEiffelElement element= (IEiffelElement) resource.getAdapter(IEiffelElement.class);
if (element != null) {
final ISourceRootElement root= (ISourceRootElement) element.getAncestor(ISourceRootElement.class);
if (root != null) {
setContainerSelection((IContainer) root.getResource());
}
}
}
COM: <s> initializes the wizard page with a resource </s>
|
funcom_train/14012363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getPeerForObject(Class objectClass, boolean searchSuperClasses) {
Object peer = null;
do {
peer = objectClassNameToPeerMap.get(objectClass.getName());
if (peer != null) {
return peer;
}
objectClass = objectClass.getSuperclass();
} while (searchSuperClasses && objectClass != null);
return null;
}
COM: <s> retrieves the appropriate peer instance for a given object </s>
|
funcom_train/24430847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(String text) {
try {
document.remove(0, document.getLength());
document.insertString(0, text, null);
// this is to make sure that this setText can not be undon by the undo manager
document.getUndoManager().discardAllEdits();
} catch (BadLocationException bl) {
bl.printStackTrace();
}
}
COM: <s> sets the entire text of this text area </s>
|
funcom_train/20764266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override
public void startAEReader() throws HardwareInterfaceException { // raphael: changed from private to protected, because i need to access this method
setAeReader(new IVS128AEReader(this));
allocateAEBuffers();
getAeReader().startThread(3); // arg is number of errors before giving up
HardwareInterfaceException.clearException();
}
COM: <s> starts reader buffer pool thread and enables in endpoints for aes </s>
|
funcom_train/50181392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addKeyhash(HashedKeyword keyhash, NestId nestid) {
if (pheromoneRT.containsKey(keyhash)) {
/* Keyword already exists, update this entry with this nest. */
pheromoneRT.remove(keyhash);
pheromoneRT.put(keyhash, nestid);
return true;
} else {
/* Keyword doesn't exists, add this entry in the Routing Table */
pheromoneRT.put(keyhash, nestid);
return false;
}
}
COM: <s> add a new nest containing a document that match the specified </s>
|
funcom_train/41299717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getMetaTabs() {
if (metaTabs == null) {
metaTabs = new JTabbedPane();
metaTabs.setTabPlacement(JTabbedPane.TOP);
metaTabs.setBounds(new Rectangle(6, 8, 274, 170));
metaTabs.addTab("main info", null, getMain(), null);
metaTabs.addTab("description", null, getDescriptionPane(), null);
}
return metaTabs;
}
COM: <s> this method initializes meta tabs </s>
|
funcom_train/22593790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadProblemInstances(ArrayList<ProblemInstance> problemInstances) {
if (instances == null)
this.instances = new ProblemsGroup();
for (ProblemInstance instance : problemInstances) {
instances.add(instance);
setChanged();
notifyObservers(new RunMessage("new", instance.getId(),
RunMessage.Type.NEW_INSTANCE, 0, 0));
}
// this.instances.addAll(problemInstances);
this.loadInstance(instances.getNext(problemInstance));
}
COM: <s> add passed instances to current problems group and load the first of them </s>
|
funcom_train/23284497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int refreshServiceEventing(int duration, ServiceEventHandler handler) throws IOException {
ServicesEventing eventing = ServicesEventing.getInstance();
int i = eventing.register(service, handler, duration);
LOG.info("Registered " + getClass() + " for eventing for " + i + "s");
return i;
}
COM: <s> adds or refreshes the registration of service event notifications to the </s>
|
funcom_train/35090686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultFormatter getResultFormatter() {
ResultFormatter ret = null;
try {
Class<?> formatterClass = Class.forName(props.getProperty(
RESULT_FORMATTER, TextResultFormatter.class.getName()));
ret = (ResultFormatter) formatterClass.newInstance();
} catch (RuntimeException e) {
e.printStackTrace();
throw e;
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(
"Failed to instantiate result formatter", e);
}
return ret;
}
COM: <s> get the configured result formatter </s>
|
funcom_train/50189162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void atestRunTests6() {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {}
long delta = exampleDOMSourceAndSAXResult(xmlId);
log.info("1. DOM2SAX Transformation length : " + delta + " ms");
delta = exampleDOMSourceAndSAXResult(xmlId);
log.info("2. DOM2SAX Transformation length : " + delta + " ms");
}
COM: <s> show the identity transformation with domsource and saxresult </s>
|
funcom_train/50365034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MibNode getPreviousSibling() {
MibNode retval;
MibNode myParent = (MibNode) getParent();
if (myParent == null) {
retval = null;
} else {
retval = (MibNode) myParent.getChildBefore(this);
}
if (retval != null && !isNodeSibling(retval)) {
throw new Error("child of parent is not a sibling");
}
return retval;
}
COM: <s> returns the previous sibling of this node in the parents children array </s>
|
funcom_train/26318132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCritsHit(int loc) {
int count = 0;
int numberOfCriticals = this.getNumberOfCriticals(loc);
for (int i = 0; i < numberOfCriticals; i++) {
CriticalSlot ccs = getCritical(loc, i);
if (ccs.isDamaged() || ccs.isBreached()) {
count++;
}
}
return count;
}
COM: <s> counts the of crits taken by proto in the location </s>
|
funcom_train/10941418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onException(JMSException je) {
this.setConnected(false);
Debug.logError(je, "JMS connection exception", module);
while (!isConnected()) {
try {
this.refresh();
} catch (GenericServiceException e) {
try {
Thread.sleep(10000);
} catch (InterruptedException ie) {}
continue;
}
}
}
COM: <s> on exception try to re establish connection to the jms server </s>
|
funcom_train/40440610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setFiles(List<FileResource> _files) {
files = _files;
Collections.sort(files, new Comparator<FileResource>() {
public int compare(FileResource arg0, FileResource arg1) {
return arg0.getName().compareTo(arg1.getName());
}
});
folderFileCount = files.size();
GWT.log("File count:" + folderFileCount, null);
}
COM: <s> fill the file cache with data </s>
|
funcom_train/21887860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateMapFile(File mapFile) {
if (!mapFile.exists())
ErrorHandler.logException(new FileNotFoundException("Map file: "
+ mapFile.getName() + " does not exist."));
else if (!(mapFile.canRead() && mapFile.canWrite()))
ErrorHandler.logError("Could not read from or, to: "
+ mapFile.getName() + " file.");
}
COM: <s> this methods only purpose is to validate a map file </s>
|
funcom_train/37589854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void _updateNoErrors(boolean done) throws BadLocationException {
ErrorDocument doc = new ErrorDocument(getErrorDocumentTitle());
String msg = "";
if (done) {
if (_wasSuccessful) msg = "Javadoc generated successfully.";
else msg = "Javadoc generation failed.";
}
doc.append(msg, NORMAL_ATTRIBUTES);
setDocument(doc);
selectNothing();
}
COM: <s> used to show that the last compile was successful </s>
|
funcom_train/28664254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point computeSharePoint(Point p) {
BigInteger value = BigInteger.ZERO;
for (int j = coefficient.length - 1; j >= 0; j--) {
value = value.multiply(p.getX());
value = value.add(coefficient[j]);
}
switch (mode) {
case NUMERICAL:
p.setY(value.mod(modul));
break;
case GRAPHICAL:
p.setY(value);
break;
}
return p;
}
COM: <s> compute the corresponding share to the given point value </s>
|
funcom_train/41385699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBotonUsuarios() {
if (botonUsuarios == null) {
botonUsuarios = new JButton();
botonUsuarios.setBounds(new Rectangle(675, 2, 110, 20));
botonUsuarios.setFont(new Font("Verdana", Font.BOLD, 10));
botonUsuarios.setText("Usuarios");
botonUsuarios.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e)
{
listener.actionPerformed(e);
}
});
}
return botonUsuarios;
}
COM: <s> this method initializes boton usuarios </s>
|
funcom_train/49704509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNextCycleOf (PageDB otherdb) {
// logger.debug("PAGEDB setNextCycleOf "+dirname+" <- "+otherdb.getDir()+" + 1 ("+new Throwable().getStackTrace()[1].getClassName()+")");
stats.cycleCount = otherdb.getCycles() + 1;
stats.write();
}
COM: <s> tell the pagedb that it is the next cycle of anoter pagedb </s>
|
funcom_train/11074592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Collection unmodifiableCollection(Collection collection) {
if (collection instanceof List) {
return Collections.unmodifiableList((List) collection);
}
if (collection instanceof SortedSet) {
return Collections.unmodifiableSortedSet((SortedSet) collection);
}
if (collection instanceof Set) {
return Collections.unmodifiableSet((Set) collection);
}
return Collections.unmodifiableCollection(collection);
}
COM: <s> get an unmodifiable version of a collection </s>
|
funcom_train/14625602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attachViewListenersDialogJDK() {
m_dialogJDK.addDialogJDKOKListener(getDialogJDKOKListener());
m_dialogJDK.addDialogJDKCancelListener(getDialogJDKCancelListener());
m_dialogJDK.addDialogJDKBrowseListener(getDialogJDKBrowseListener());
m_dialogJDK.addDialogJDKPathEnterListener(getDialogJDKPathEnterListener());
}
COM: <s> attaches the listeners for the jdk dialog </s>
|
funcom_train/32035020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(PrintStream out) {
if (comment != null)
comment.write(out, 0);
if (pkg != null)
pkg.write(out, 0);
for (Import imp : imports)
imp.write(out, 0);
cls.write(out, 0);
for (Field field : fields)
field.write(out, 1);
for (Method method : methods)
method.write(out, 1);
out.println(BLOCK_END);
}
COM: <s> prints the class to the given writer </s>
|
funcom_train/51274098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isWebService() {
Object value = getNamedValue(WEB_SERVICE_PORT);
if (value != null) {
this.isWebService = true;
}
// value = getNamedValue(WEB_SERVICE_NAME);
// if(value != null){
// this.isWebService = true;
// }
value = getNamedValue(WEB_SERVICE_NAME);
if (value != null) {
this.isWebService = true;
}
value = getNamedValue(WEB_SERVICE_ENDPOINT_NAME);
if (value != null) {
this.isWebService = true;
}
return this.isWebService;
}
COM: <s> returns if the context is declared as a web service </s>
|
funcom_train/10980974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSimpleInt() {
Object value = dynaForm.get("intProperty");
assertNotNull("Got a value", value);
assertTrue("Got correct type", (value instanceof Integer));
assertEquals("Got correct value", ((Integer) value).intValue(),
(int) 123);
}
COM: <s> test get simple property on a int property </s>
|
funcom_train/50504047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResourceEnvRef getResourceEnvReference(String reference) {
Iterator iter = resourceEnvReferences.iterator();
while (iter.hasNext()) {
ResourceEnvRef ref = (ResourceEnvRef) iter.next();
if (ref.getName().equals(reference)) {
return ref;
}
}
return null;
}
COM: <s> gets the resource env reference attribute of the deployment descriptor </s>
|
funcom_train/26391978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws IOException {
// Close input if non-null references.
if (null != myInput) {
myInput.close();
myInput = null;
} /* End if*/
if (null != myOutput) {
myOutput.close();
myOutput = null;
} /* End if*/
}
COM: <s> closes all streams </s>
|
funcom_train/1844922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String sendAsForm(final String to, final String formName, String subject) {
if (!request.getMethod().equals(Method.POST))
return "Error: Invalid method: " + request.getMethod();
String contentType = getHeader("Content-Type");
return (contentType.startsWith("multipart/form-data")) ? parseMultipartForm(to, formName, subject)
: parseSimpleForm(to, formName, subject, new Form(request.getEntity()), new ArrayList<DataSource>());
}
COM: <s> sends mail from a given form </s>
|
funcom_train/48614687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(GroupWorkspaceFolder folder, IrUser deletingUser, String deleteReason) {
List<GroupWorkspaceFile> files = groupWorkspaceFolderDAO.getAllFilesForFolder(folder);
// delete all the files within folder and sub folders
for( GroupWorkspaceFile aFile :files)
{
delete(aFile, deletingUser, deleteReason);
}
if( folder.getIsRoot())
{
GroupWorkspace owningWorkspace = folder.getGroupWorkspace();
owningWorkspace.removeRootFolder(folder);
}
else
{
GroupWorkspaceFolder parent = folder.getParent();
parent.removeChild(folder);
}
groupWorkspaceFolderDAO.makeTransient(folder);
}
COM: <s> delete the group workspace folder </s>
|
funcom_train/14016560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void invokeValidatorMethod(String validatorMethod, Object formObject, Errors errors) throws Exception {
if (logger.isDebugEnabled()) {
logger.debug("Invoking piecemeal validator method '" + validatorMethod + "(" + getFormObjectClass()
+ ", Errors)'");
}
getValidateMethodInvoker().invoke(validatorMethod, new Object[] { formObject, errors });
}
COM: <s> invoke specified validator method on the validator registered with this action </s>
|
funcom_train/1316540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void listen(int port) throws IOException {
SocketAcceptorConfig sac = new SocketAcceptorConfig();
sac.getSessionConfig().setTcpNoDelay(false);
sac.setReuseAddress(true);
sac.setBacklog(100);
throttleFilter = new ConnectionThrottleFilter(Constants.THROTTLE_FILTER_INTERVAL*1000);
sac.getFilterChain().addFirst("throttleFilter", throttleFilter);
acceptor.bind(new InetSocketAddress(port), connectionHandler, sac);
logger.info("Listening on port " + port + ".");
}
COM: <s> start listening on the specified port </s>
|
funcom_train/21644293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getBattleOpenMenuItem() {
if (battleOpenMenuItem == null) {
battleOpenMenuItem = new JMenuItem();
battleOpenMenuItem.setText("Open");
battleOpenMenuItem.setMnemonic('O');
battleOpenMenuItem.setDisplayedMnemonicIndex(0);
battleOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_MASK, false));
battleOpenMenuItem.addActionListener(eventHandler);
}
return battleOpenMenuItem;
}
COM: <s> return the battle open menu item </s>
|
funcom_train/15893553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File f) {
boolean result = false;
Iterator<String> endings = this.m_endings.iterator();
if (f.isFile())
while (!result && endings.hasNext()) {
String ending = endings.next();
assert ending!=null && ending.length()>0 : "Empty ending";
result = f.getName().endsWith(ending);
}
return result;
}
COM: <s> accept plain files that end with any of the strings </s>
|
funcom_train/20303697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleUnrecognizedArg( String argStr ) {
if (argStr.equals("-") || !argStr.startsWith( "-" )) {
// queue this action for reading later
m_actionQ.add( new ReadAction( argStr, getExpectedInput() ) );
}
else {
System.err.println( "Unrecognised argument: " + argStr );
usage();
}
}
COM: <s> handle an unrecognised argument by assuming its a uri to read </s>
|
funcom_train/34333666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int update(Pet pet) {
return this.update(new Object[] {
pet.getName(), new java.sql.Date(pet.getBirthDate().getTime()),
pet.getType().getId(), pet.getOwner().getId(), pet.getId()});
}
COM: <s> method to update an code pet code s data </s>
|
funcom_train/4018171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLocalizedText (String textID) {
String text = getText(textID);
if (text == null)
throw new NoLocalizedTextException("Can't find localized text for current locale! text id: [" + textID + "] locale: ["+currentLocale+"]", textID, currentLocale);
return text;
}
COM: <s> retrieve localized text for a text handle in the current locale </s>
|
funcom_train/9146948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getOrAddSymbolInteger(String symbol) {
Integer id = mSymbolToId.get(symbol);
if (id != null) return id;
Integer freshId = Integer.valueOf(mNextSymbol++);
mSymbolToId.put(symbol,freshId);
mIdToSymbol.put(freshId,symbol);
return freshId;
}
COM: <s> returns the integer identifier for the specified symbol </s>
|
funcom_train/23396004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected TerminationHandler xml2TerminationHandler(Element terminationHandlerElement) {
TerminationHandler terminationHandler = BPELFactory.eINSTANCE.createTerminationHandler();
terminationHandler.setElement(terminationHandlerElement);
// Save all the references to external namespaces
saveNamespacePrefix(terminationHandler, terminationHandlerElement);
terminationHandler.setActivity(getChildActivity(terminationHandlerElement));
xml2ExtensibleElement(terminationHandler, terminationHandlerElement);
return terminationHandler;
}
COM: <s> converts an xml termination handler element to a bpel termination handler object </s>
|
funcom_train/13994708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getInt(Object object) {
Integer integer;
if (object instanceof String) {
integer = new Integer((String) object);
} else if (object instanceof Integer) {
integer = (Integer) object;
} else {
throw new FatalException("class " + object.getClass()
+ " not supported");
}
return integer.intValue();
}
COM: <s> returns the int value from object </s>
|
funcom_train/31958494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String resolveIP(String ip) {
String name = "";
try {
name = InetAddress.getByName(ip).getHostName(); // Does not work properly -> any ideas??
} catch (Exception e) {
e.printStackTrace();
}
return name;
} // end resolveIP
COM: <s> resolves the ip address to a dns name </s>
|
funcom_train/37738688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SortCriterion (String criterion) {
StringTokenizer st = new StringTokenizer(criterion, "/");
property = st.nextToken();
if (st.hasMoreTokens()) {
if (st.nextToken().toLowerCase().startsWith("d")) {
isAscending = false;
}
}
}
COM: <s> create a new sort criterion from the given string </s>
|
funcom_train/17136306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void actionPerformed() {
java.awt.datatransfer.Clipboard systemClipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
Transferable contents = systemClipboard.getContents(null);
try {
String copiedText = (String) contents.getTransferData(DataFlavor.stringFlavor);
MonitorEclipse.getInstance().gotTextCopiedFromEditor(copiedText);
} catch (UnsupportedFlavorException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> developer copied some text </s>
|
funcom_train/12181335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disposeResources() {
if (literalTextImage != null && !literalTextImage.isDisposed()) {
literalTextImage.dispose();
literalTextImage = null;
}
if (componentTextImage != null && !componentTextImage.isDisposed()) {
componentTextImage.dispose();
componentTextImage = null;
}
}
COM: <s> dispose of the image resources used for the menu items </s>
|
funcom_train/5338969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openServer(String host) throws IOException, UnknownHostException {
int port = FTP_PORT;
if (serverSocket != null)
closeServer();
serverSocket = new Socket(host, FTP_PORT);
serverOutput = new PrintWriter(new BufferedOutputStream(serverSocket.getOutputStream()),true);
serverInput = new BufferedInputStream(serverSocket.getInputStream());
}
COM: <s> open a ftp connection to host i host i </s>
|
funcom_train/51071679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void send_remove_pointers() {
// get the list of recently removed node
LinkedList removed_nodes = _routing_tbl.get_removed_nodes();
while( removed_nodes.size() > 0 ) {
Pair currPair = (Pair) removed_nodes.remove(0);
Integer level = (Integer) currPair.second;
sendNonceMsg( new DynamicPtrMsg( (NodeId) currPair.first,
_self_guid,
level.intValue(), true ),
SHORT_TIMEOUT, new Pair( USERDATA_PTR,
new Integer(0)));
}
}
COM: <s> send dynamic ptr msg </s>
|
funcom_train/17398844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getCrossProduct(Vector crossedVector){
float tmpX, tmpY, tmpZ;
tmpX = this.y*crossedVector.z - this.z*crossedVector.y;
tmpY = this.z*crossedVector.x - this.x*crossedVector.z;
tmpZ = this.x*crossedVector.y - this.y*crossedVector.x;
Vector crossProduct = new Vector(tmpX, tmpY, tmpZ);
return crossProduct;
}
COM: <s> operation to calculate the cross product with another vector object </s>
|
funcom_train/16379952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateKindnessExtensionTimeType_Min(int kindnessExtensionTimeType, DiagnosticChain diagnostics, Map<Object, Object> context) {
boolean result = kindnessExtensionTimeType >= KINDNESS_EXTENSION_TIME_TYPE__MIN__VALUE;
if (!result && diagnostics != null)
reportMinViolation(CTEPackage.Literals.KINDNESS_EXTENSION_TIME_TYPE, new Integer(kindnessExtensionTimeType), new Integer(KINDNESS_EXTENSION_TIME_TYPE__MIN__VALUE), true, diagnostics, context);
return result;
}
COM: <s> validates the min constraint of em kindness extension time type em </s>
|
funcom_train/41165882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CoParagraphTeacher3 update(CoParagraphTeacher3 entity) {
EntityManagerHelper.log("updating CoParagraphTeacher3 instance", Level.INFO, null);
try {
CoParagraphTeacher3 result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved co paragraph teacher3 entity and return it or a </s>
|
funcom_train/4366384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeNode findChild(String name) {
if (children == null)
return (null);
Iterator items = children.iterator();
while (items.hasNext()) {
TreeNode item = (TreeNode) items.next();
if (name.equals(item.getName()))
return (item);
}
return (null);
}
COM: <s> return the first child node of this node with the specified name </s>
|
funcom_train/51637064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(IWorkbench workbench, JarPackageData jarPackage) {
Assert.isNotNull(workbench);
Assert.isNotNull(jarPackage);
fJarPackage= jarPackage;
setInitializeFromJarPackage(true);
fSelection= new StructuredSelection(fJarPackage.getElements());
setWindowTitle(JarPackagerMessages.JarPackageWizard_windowTitle);
setDefaultPageImageDescriptor(JavaPluginImages.DESC_WIZBAN_JAR_PACKAGER);
setNeedsProgressMonitor(true);
}
COM: <s> initializes this wizard from the given jar package description </s>
|
funcom_train/36242773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws CardException {
if (number == 0) {
throw new CardException("Cannot close the basic channel.");
}
ResponseAPDU resp = transmit(new CommandAPDU(0, 0x70, 0x80,
(byte) number, 1));
if (resp.getSW() != 0x9000) {
throw new CardException("Channel could not be closed.");
}
}
COM: <s> close the channel </s>
|
funcom_train/48792893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPart() {
/*
* part_id is a combination of 5 numeric, 5 alpha,5 numeric
* For manufactured parts, the part_id is of the form
* <scale>"MITEM"<n> where n ranges from 1-10. (There are
* 10 manufactured parts per PG)
*/
int p3 = r.NURand(A, 1, numItems);
String p_id = prt(1) + "MITEM" + prt(p3);
return(p_id);
}
COM: <s> this method generates a random part id to use for access </s>
|
funcom_train/1547311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkMultiplicationCompatible(final FieldMatrix<T> m) {
if (getColumnDimension() != m.getRowDimension()) {
throw MathRuntimeException.createIllegalArgumentException(
LocalizedFormats.NOT_MULTIPLICATION_COMPATIBLE_MATRICES,
getRowDimension(), getColumnDimension(),
m.getRowDimension(), m.getColumnDimension());
}
}
COM: <s> check if a matrix is multiplication compatible with the instance </s>
|
funcom_train/3008910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(SimpleKey[] keys) {
if (this.key == null) {
this.key = keys;
} else {
for (int i = 0; i < this.key.length; i++) {
if (this.key[i] == null) {
this.key[i] = keys[i];
}
}
}
}
COM: <s> sets the internal representation using an array of simple keys </s>
|
funcom_train/36680184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loginToServerGame(String gameName, String userName, String userPassword) throws NetworkException {
serverGame = new ServerGame(gameName);
user = new User(userName, userPassword);
try {
battleServerConnection.validateLogin(serverGame, user);
} catch (IOException ex) {
throw new NetworkException(ex);
}
}
COM: <s> login into an existing server game </s>
|
funcom_train/38724393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void update(MatchAlgorithm matchAlgorithm, ParametersSetting parameters, Shape queryObject, double threshold, ParametersSetting combinationParameters) {
this.matchAlgorithm = matchAlgorithm;
this.parameters = parameters;
this.combinationParameters = combinationParameters;
setQueryShape( queryObject );
this.threshold = threshold;
algorithmLabel.setText(matchAlgorithm.getName());
}
COM: <s> updates the information held in this panel with the given values </s>
|
funcom_train/45539750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Set getSelectedLibraries(IStructuredSelection selection) {
Set libraries= new HashSet();
for (Iterator iter= selection.iterator(); iter.hasNext();) {
Object element= iter.next();
if (element instanceof LibraryStandin) {
libraries.add(element);
}
// else if (element instanceof SubElement) {
// libraries.add(((SubElement)element).getParent());
// }
}
return libraries;
}
COM: <s> returns the list of libraries in the given selection </s>
|
funcom_train/10836306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String cleanPath(String path) {
// replace backslash by slash
path = path.replace('\\', '/');
// cut off trailing slash
while (path.endsWith("/")) {
path = path.substring(0, path.length() - 1);
}
if ( this.classPath == null || this.classPath.length == 0 ) {
return path;
}
return this.classPath[0] + path;
}
COM: <s> helper method to clean the path </s>
|
funcom_train/32304325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(final Temp pseudoReg) {
List regs = ((RegListAndInstr)tmpToRegLst.remove(pseudoReg)).l;
for (Object regO : regs) {
Temp reg = (Temp) regO;
regToTmp.remove(reg);
}
dirtyTemps.remove(pseudoReg);
if (PRINT_USAGE) System.out.println(this+".remove: "+pseudoReg);
}
COM: <s> removes the assignment for code pseudo reg code </s>
|
funcom_train/1176413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testContains() {
System.out.println("contains");
Carta aCarta = new Carta(12);
ColecaoCartas instance = new CartasSecretas(3);
instance.addCarta(aCarta);
boolean expResult = true;
boolean result = instance.contains(new Carta(12));
assertEquals(expResult, result);
}
COM: <s> test of contains method of class caraacara </s>
|
funcom_train/47105991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemWeapon11() {
JMenuItem menuItem = new JMenuItem();
menuItem.setText(Weapon.W_11.getItemName());
menuItem.setEnabled(false);
menuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setPlrReadiedWeapon(Weapon.W_11);
}
});
return menuItem;
}
COM: <s> creates the twelfth choice for the weapon menu </s>
|
funcom_train/4814049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Player getOpponent() {
Player opponent = new ShortSightedAI();
switch (getTeam()) {
case HUMANS:
opponent.setTeam(Team.PREDATORS);
break;
case PREDATORS:
opponent.setTeam(Team.HUMANS);
break;
default:
throw new IllegalStateException("Invalid team: " + getTeam());
}
return opponent;
}
COM: <s> creates a short sighted i </s>
|
funcom_train/38757589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu createBookmarksMenu() {
bookmarkMenu = new JMenu("Bookmarks");
//update the menu whenever it is opened
//mouseClicked, mousePressed did not work properly
bookmarkMenu.addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {
if(!hoverBookmarkMenu) {
updateBookmarkMenu();
hoverBookmarkMenu = true;
}
}
@Override
public void mouseExited(MouseEvent e) {
hoverBookmarkMenu = false;
}
});
updateBookmarkMenu();
return bookmarkMenu;
}
COM: <s> creates a jmenu with all bookmarks </s>
|
funcom_train/26571626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Piece copyPiece (Board b){
Piece p = new Knight (this.getChar(), b, this.getCol(), this.getRow(), this.getColor());
p.setLastLocation (this.getLastCol(), this.getLastRow());
p.setMoved (this.getMoved());
return p;
}
COM: <s> creates a copy to a new board </s>
|
funcom_train/3369918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectionRows(int[] rows) {
TreeUI ui = getUI();
if(ui != null && rows != null) {
int numRows = rows.length;
TreePath[] paths = new TreePath[numRows];
for(int counter = 0; counter < numRows; counter++) {
paths[counter] = ui.getPathForRow(this, rows[counter]);
}
setSelectionPaths(paths);
}
}
COM: <s> selects the nodes corresponding to each of the specified rows </s>
|
funcom_train/6204246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean processFlowHasSource(IGaijinWebFlow processFlow) {
try {
IWebFlowGeneratorHelper helper = GeneratorHelperFactory.create(processFlow);
IFile sourceFile = helper.getFlowEventsInterfaceFile();
if ((sourceFile != null) && (sourceFile.exists())) {
return true;
} else {
return false;
}
} catch (GaijinModelException e) {
return false;
}
}
COM: <s> indicates whether the process has an existing source file </s>
|
funcom_train/25072217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field getFieldById(int fieldId) {
int idx = Collections.binarySearch(fields
, new Field(fieldId, null, 0)
, FIELD_ID_COMPARATOR);
if (idx >= 0) {
return (Field) fields.elementAt(idx);
}
return null;
}
COM: <s> returns the code field code with attribute code id code equal to </s>
|
funcom_train/12803688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void treeWillExpand(TreeExpansionEvent event){
/*
** Call function to let us (the TreeBrowser descendant) know that
** the user is expanding a node.
*/
BrowserTreeNode aNode = (BrowserTreeNode) event.getPath().getLastPathComponent();
nodeIsExpanding(aNode);
} // ends treeWillExpand()
COM: <s> tree will expand tree expansion event event </s>
|
funcom_train/37205532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateBootstrapClassLoader(BootstrapClassLoader loader) {
List<URL> deps = findDependencies();
Set<URL> exists = new HashSet<URL>(Arrays.asList(loader.getURLs()));
for (URL dep : deps) {
if (exists.contains(dep)) {
continue;
}
logger.info("Registering with system classloader:" + dep);
loader.addURL(dep);
exists.add(dep);
}
}
COM: <s> add any new dependencies identified by </s>
|
funcom_train/26572882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadDocuments(java.lang.Long projectPK, DefaultMutableTreeNode parent) {
DocumentFactory factory = new DocumentFactory(connectionParameter);
try {
LinkedList resultList = factory.query(projectPK, null);
ListIterator it = resultList.listIterator();
while (it.hasNext()) {
DefaultMutableTreeNode node = new DefaultMutableTreeNode(it.next());
parent.add(node);
}
} catch (Exception e) {
JEErrorHandler handler = new JEErrorHandler(connectionParameter.getLogList());
handler.fatalError(e);
}
}
COM: <s> method load document </s>
|
funcom_train/51534379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fill() throws IOException {
if (in == null)
throw new ZipException("InflaterInputStream is closed");
len = in.read(buf, 0, buf.length);
if (len < 0)
throw new ZipException("Deflated stream ends early.");
inf.setInput(buf, 0, len);
}
COM: <s> fills the buffer with more data to decompress </s>
|
funcom_train/48406767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRankPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PlanningData_rank_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PlanningData_rank_feature", "_UI_PlanningData_type"),
SpemxtcompletePackage.eINSTANCE.getPlanningData_Rank(),
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the rank feature </s>
|
funcom_train/21017176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getRemainingWidth(Caret lineCaret) {
double result = 0;
TextArea textArea = (TextArea) lineCaret.getComposite();
IComposite line = lineCaret.getElement().getComposite();
ILayoutManager layoutManager = line.getLayout();
double lineWidth = layoutManager.getLayoutWidth(line);
if (!endsWithParagraphBreak(lineCaret)) {
result = textArea.getWidth() - lineWidth;
}
return result;
}
COM: <s> returns the remaining width of the specified line </s>
|
funcom_train/18645400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNameSpaceURIForPrefix(String prefix) {
String ret=null;
Iterator iter=getNameSpaces().iterator();
while (ret == null && iter.hasNext()) {
NameSpace ns=(NameSpace)iter.next();
if (ns.getPrefix().equals(prefix)) {
ret = ns.getURI();
}
}
return(ret);
}
COM: <s> this method returns the uri associated with the </s>
|
funcom_train/38996235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reply(String text, boolean address) {
if (text.trim().isEmpty()) {
return;
}
if (context.isPublic() && address) {
text = getUser().getNick() + ": " + text;
}
getServer().sendMessage(context.getReplyDestination(), text);
}
COM: <s> replys to this message by sending a message to the </s>
|
funcom_train/49790104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetVisibleTrue() throws Exception {
beginAtSitemapThenPage("Home");
assertNoProblem();
assertTargetVisible(true);
assertButtonPresentWithText("set visibility");
// and a text field to set the value
{
String id = getLabelIDForText("visibility value");
assertLabeledFieldEquals(id, "");
setLabeledFormElementField(id, "true");
}
// click the button
clickButtonWithText("set visibility");
// the target is still visible
assertTargetVisible(true);
}
COM: <s> set the visibility to true </s>
|
funcom_train/15606473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseNameAndValue(String lDeflinePart) {
if (lDeflinePart == null)
return;
StringTokenizer lStk = new StringTokenizer(lDeflinePart, "=");
if (lStk.countTokens() != 2)
return; // Badly-formed.
String lName = lStk.nextToken();
String lValue = lStk.nextToken();
mFields.put(lName, lValue);
} // End method
COM: <s> parses open the name value part </s>
|
funcom_train/8436917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIByID() {
System.out.println("iByID");
int id = 56;
Logic l = new Logic("");
l.setModelSize(10);
Model instance = new Model(l);
instance.addSpecificGraph("r1");
int expResult = 5;
int result = instance.iByID(id);
assertEquals(expResult, result);
}
COM: <s> test of i by id method of class nii </s>
|