__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/8372490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countLanguages(FilterList fs) {
int count = 0;
try {
Statement stmt = getStatement();
// count rows using the filter
ResultSet rs = stmt.executeQuery("SELECT COUNT(*) FROM languages"
+ fs.getWhereClause(true, Table.LANGUAGES));
if (rs.next()) {
count = rs.getInt(1);
}
rs.close();
freeStatement(stmt);
} catch (SQLException e) {
e.printStackTrace();
}
return count;
}
COM: <s> counts the languages matching a specific filter list </s>
|
funcom_train/41165049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoCourseUserHistory entity) {
EntityManagerHelper.log("deleting CoCourseUserHistory instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoCourseUserHistory.class, entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co course user history entity </s>
|
funcom_train/21953097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectNextEntry() {
Selection currentSelection = getCurrentSelection();
net.suberic.pooka.AddressMatcher matcher = getNewMessageUI().getSelectedProfile().getAddressMatcher();
AddressBookEntry newValue = matcher.getNextMatch(currentSelection.text);
if (newValue != null) {
replaceAddressText(currentSelection, newValue.getID());
}
}
COM: <s> selects the next available address entry </s>
|
funcom_train/14274515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JPanel constructConfigPanel() {
JPanel ret = new JPanel();
JButton btn=new JButton(getCDKJBridgeResourceBundle().getString("conduit.bridge.buttontitle"));
btn.addActionListener(this);
ret.add(btn, BorderLayout.CENTER);
return ret;
} // end-method
COM: <s> constructs this j conduits configuration panel </s>
|
funcom_train/3170360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ScruTable subTableBetween(IntegerValue start, IntegerValue stop) {
return tableToScru.offsetSubTableBetween(start, stop, start);
/*
udanax-top.st:47693:IntegerScruTable methodsFor: 'accessing'!
{ScruTable} subTableBetween: start {IntegerVar} with: stop {IntegerVar}
"Return a table which contains the intersection of this table's domain and the
domain specified by the enclosure."
^ tableToScru offsetSubTableBetween: start with: stop with: start!
*/
}
COM: <s> return a table which contains the intersection of this tables domain and the </s>
|
funcom_train/4048577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Status itest() {
if(alreadyCompleted) {
return null;
}
synchronized (this) {
if (this.isCompleted()) {
return new mpjdev.Status(rank_source, tag, -1); //what is index ?
}
else {
return null; //change this to something understand at higher levels ...
}
}
}
COM: <s> this method returns status object if the communication is completed </s>
|
funcom_train/42613028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDataSource(DataSource dataSource) {
LOG.debug("setDataSource {} {}", ((org.apache.commons.dbcp.BasicDataSource) dataSource).getUrl(), getTableName());
template = new SimpleJdbcTemplate(dataSource);
// create the JDBC insert with specific columns and table name:
insert = createJdbcInsert(dataSource);
}
COM: <s> used for data source injection </s>
|
funcom_train/21101011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getChild(Object el , int index) {
if(el.equals(this)){
return rosterEles.elementAt(index);
}else if (el instanceof RosterElement){
return ((RosterElement)el).getChildren().elementAt(index);
}
throw new IllegalStateException("getchild of non-item");
}
COM: <s> returns a children object </s>
|
funcom_train/3761883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshParameters(){
backwards = dialogUI.checkboxSearchBackwards.isSelected();
wrapWords = dialogUI.checkboxWrapAround.isSelected();
regSearch = dialogUI.checkboxRegularSearch.isSelected();
caseSensetive = dialogUI.checkboxCaseSensitive.isSelected();
searchText = dialogUI.searchTextField.getText();
replaceText = dialogUI.replaceTextField.getText();
}
COM: <s> updates current search parameters from the user interface </s>
|
funcom_train/12622897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void collectInDir(Vector<File> colfiles, File dir) {
if(!dir.exists()) return;
File[] files = dir.listFiles(subdirFileFilter);
for(int i=0; i<files.length; i++) {
if(files[i].isDirectory()) {
collectInDir(colfiles, files[i]);
}
else colfiles.add(files[i]);
}
}
COM: <s> collects all valid files inside a directory </s>
|
funcom_train/25607739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveComponentByUser(InchVector diff){
//System.out.println("CComponent.moveComponent(..) - "+dim);
for(CConnector c: connectors){
c.parentWillMove(diff);
}
pos.x+=diff.x;
pos.y+=diff.y;
fireStateChanged(new StateChangeEvent(this, USER_MOVE_EVENT, diff));
fireStateChanged(new StateChangeEvent(this, MOVE_EVENT, diff));
}
COM: <s> change the position </s>
|
funcom_train/51696781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeContentPanel(int pageType){
splitpane.remove(contentPanel);
switch(pageType){
case HOME: contentPanel = home_page; break;
case ADVANCEDSEARCH: contentPanel = search_page; break;
case BACCALC: contentPanel = bac_page;break;
case SELECTEDRECIPE: contentPanel = selectedrecipe_page; break;
case MYBAR: contentPanel = mybar_page; break;
case GROCERYLIST: contentPanel = groclist_page; groclist_page.updateList(this); break;
default: contentPanel = home_page;
}
splitpane.add(contentPanel);
}
COM: <s> updates the current page to be the page passed in for example </s>
|
funcom_train/38866718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "table: " + this.table +
", stn: " + this.stn +
", elem: " + this.elem +
", yrMon: " + this.yrMon +
", yrMon2: " + this.yrMon2 +
", numRecs: " + this.numRecs;
}
COM: <s> converts the object to string </s>
|
funcom_train/9701204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getTriggerSQL(){
return "select TRIGGER_BODY,DESCRIPTION from dba_triggers where upper(TABLE_OWNER)=upper('"+getSchema()+"') and TRIGGERING_EVENT='INSERT' and upper(TABLE_NAME)=upper('"+table+"')"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
COM: <s> retrieve the sql that checks for the trigger </s>
|
funcom_train/12715210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddItem() {
Product book2 = new Product("Pragmatic Project Automation", 29.95);
cart.addItem(book2);
// have book1 and book2 in cart
assertEquals(2, cart.getItemCount());
double expectedBalance = book1.getPrice() + book2.getPrice();
assertEquals(expectedBalance, cart.getBalance(), 0.0);
}
COM: <s> tests adding an item to the cart </s>
|
funcom_train/13586856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeLinkedKml(final String filename, final KmlType kml) {
if (filename.equals("doc.kml")) {
throw new IllegalArgumentException(
"The filename 'doc.kml' is reserved for the primary kml.");
}
if (filename.equals("main.kml")) {
throw new IllegalArgumentException(
"The filename 'main.kml' is reserved for the main kml.");
}
writeKml(filename, kml);
}
COM: <s> adds the specified kml object to the file </s>
|
funcom_train/32631865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemove() {
System.out.println("-> DatabaseProxy.testRemove");
String dbName = "testRemove_" + System.currentTimeMillis() + ".nsf";
DDatabase lDatabase = getSession().createDatabase(getServerName(), dbName);
lDatabase.remove();
// DDocument doc = lDatabase.createDocument();
// assertNull("Document should not have been created.", doc);
}
COM: <s> tests removing of a database </s>
|
funcom_train/14384344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getMetricNodePath(MetricNode metricNode) {
BaseNode node = metricNode;
if (null != node) {
String metricNodePath = node.toString();
while (node.getParent() != treeRoot) {
metricNodePath = node.getParent().toString() + ":" + metricNodePath;
node = (BaseNode) node.getParent();
}
return metricNodePath;
}
return null;
}
COM: <s> utility function for getting metric full path in the monitoring tree </s>
|
funcom_train/4018174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRawText (String locale, String textID) {
if(locale == null) {
throw new UnregisteredLocaleException("Null locale when attempting to fetch text id: " + textID);
}
if(locale.equals(currentLocale)) {
return (String)currentLocaleData.get(textID);
} else {
return null; //(String)getLocaleMap(locale).get(textID);
}
}
COM: <s> get text for locale and exact text id only not using any fallbacks </s>
|
funcom_train/181992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawEnvironmentCells(Graphics g){
/* get the current environment */
Environment env = ClientGUIEngine.getEnvironment();
/*
* draw all the EnvironmentCells
*/
for (int i = 0; i < env.getWidth(); i++) {
for (int j = 0; j < env.getLength(); j++) {
EnvironmentCell curr = env.getCell(i, j, 0);
GUIFunctionFactory.getSmallDrawFunction(curr.getClass()).execute(curr,
g);
}
}
}
COM: <s> draws the environment cells </s>
|
funcom_train/25828347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initDataCollector() {
this.dataCollector = new DataCollector();
this.addCollectionEventListener(this.dataCollector);
this.addCollectionInitEventListener(this.dataCollector);
this.addDestroyObjektEventListener(this.dataCollector);
this.addObjektInitEventListener(this.dataCollector);
this.addPropertyChangeListener(this.dataCollector);
}
COM: <s> initializes the data collector used for xmlfull logger </s>
|
funcom_train/9916571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector toVector() {
Vector results = new Vector();
results.addElement(new Long(this.totalTime));
results.addElement(new Long(this.luceneTime));
results.addElement(new Long(this.allContentTime));
results.addElement(new Long(this.totalDocsCreated));
results.addElement(new Long(this.textLength));
return results;
}
COM: <s> returns metric results in a vector </s>
|
funcom_train/25191047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMessages (String[][] labeledMessages) {
clear ();
if (labeledMessages != null) {
for (int i = 0; i < labeledMessages.length; i++) {
put (labeledMessages[i][0], labeledMessages[i][1]);
}
}
}
COM: <s> populates message map with label keys and message values </s>
|
funcom_train/4923257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNoLogicClass() throws Exception {
// Start the server
this.isNonMethodLink = true;
this.startHttpServer("NoLogicTemplate.ofp", null);
// Ensure template is correct
this.assertHttpRequest("",
" /SECTION.links-nonMethodLink.task /SECTION.links-doExternalFlow.task");
// Ensure links out from template
this.assertHttpRequest("/SECTION.links-nonMethodLink.task", "LINKED");
}
COM: <s> ensure can render template without logic class and have links </s>
|
funcom_train/5584567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getInputStream() throws IOException {
if (isSocket()) {
return ((Socket) socket).getInputStream();
} else {
// accept socket from server,
// get and return it's InputStream
return ((ServerSocket) socket).accept().getInputStream();
}
}
COM: <s> returns an input stream for the wrapped socket </s>
|
funcom_train/35946577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set( T value) {
LocalContext ctx = Reference.getLocalContext();
if (ctx != null) {
FastMap references = ctx._references;
references.put(this, value);
_hasBeenLocallyOverriden = true;
return;
}
// No local context, sets default value.
_defaultValue = value;
}
COM: <s> sets the local value referent for this reference </s>
|
funcom_train/7517163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose() {
try {
if (!connection.isClosed()) {
connection.close();
Log.info("Closed database connection to '%s'.", jdbcUrl);
}
}
catch (SQLException e) {
Log.warn("Failed to close database connection to '%s'.", jdbcUrl);
}
}
COM: <s> closes the jdbc connection </s>
|
funcom_train/49743716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGenome(double [] __weights){
// test
if (__weights.length!=_reseauControleur.getNumberOfAllArcs()) {
System.out.println("Error while initializing the perceptron weights \n "
+__weights.length
+" given, "
+_reseauControleur.getNumberOfAllArcs()
+" attended");
}
else {
_genome=__weights;
ArrayList al = new ArrayList();
for(int i=0;i<_genome.length;i++) al.add(new Double(_genome[i]));
_reseauControleur.setAllArcsWeightValues(al);
}
}
COM: <s> set the weights given to the neural network </s>
|
funcom_train/45246291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JNumberFloatField getJNumberFloatFieldGamaMtREV() {
if (jNumberFloatFieldGamaMtREV == null) {
jNumberFloatFieldGamaMtREV = new JNumberFloatField();
jNumberFloatFieldGamaMtREV.setLocation(new Point(345, 265));
jNumberFloatFieldGamaMtREV.setSize(new Dimension(65, 20));
}
return jNumberFloatFieldGamaMtREV;
}
COM: <s> this method initializes j number float field gama mt rev </s>
|
funcom_train/18186505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getSobel() {
if (sobel == null) {
sobel = new JMenuItem("Sobel");
sobel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
optionsPanel.removeAll();
ImageTransformation t = new SobelTransformation();
optionsPanel.add(new TransformationEditor(t,img));
optionsPanel.updateUI();
jSplitPane.updateUI();
}
});
}
return sobel;
}
COM: <s> this method initializes sobel </s>
|
funcom_train/4358533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProcessExpiresFrequency(int processExpiresFrequency) {
if (processExpiresFrequency <= 0) {
return;
}
int oldProcessExpiresFrequency = this.processExpiresFrequency;
this.processExpiresFrequency = processExpiresFrequency;
support.firePropertyChange("processExpiresFrequency",
new Integer(oldProcessExpiresFrequency),
new Integer(this.processExpiresFrequency));
}
COM: <s> set the manager checks frequency </s>
|
funcom_train/19142439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAllFunctions() {
List all = new ArrayList();
for (Iterator iter = scripts.iterator(); iter.hasNext();) {
Script script = (Script) iter.next();
all.addAll(script.getAllFunctions());
}
Collections.sort(all, BaseEntity.COMPARATOR);
return all;
}
COM: <s> returns all functions on this project </s>
|
funcom_train/50100458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createGViewer() {
Composite parent = getContainer();
SashForm sashForm = new SashForm(parent, SWT.HORIZONTAL);
sashForm.setBackground(parent.getBackground());
graphicalViewer = createGraphicalViewer(sashForm);
sashForm.setWeights(new int[] { 100 });
int index = addPage(sashForm);
setPageText(index, "Table View");
}
COM: <s> creates the controls of the editor </s>
|
funcom_train/9919121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProjectionMatrix(String name) {
CGparameter p = CgGL.cgGetNamedParameter(currProgram, name);
if (p != null) CgGL.cgGLSetStateMatrixParameter(p, CgGL.CG_GL_PROJECTION_MATRIX, CgGL.CG_GL_MATRIX_IDENTITY);
}
COM: <s> copies the projection matrix from open gl to parameter name in the shader </s>
|
funcom_train/6245603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMessage() {
Object[] args = {new Integer(pos)};
StringBuffer sb = new StringBuffer();
String prefix = RE.getLocalizedMessage("error.prefix");
sb.append(MessageFormat.format(prefix, args));
sb.append('\n');
sb.append(super.getMessage());
return sb.toString();
}
COM: <s> reports the descriptive message associated with this exception </s>
|
funcom_train/39165420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPartiallyCompatible(Annotation anAnnot){
if (anAnnot == null) return false;
if (overlaps(anAnnot)){
if (anAnnot.getFeatures() == null) return true;
if (anAnnot.getFeatures().subsumes(this.getFeatures()))
return true;
}// End if
return false;
}//isPartiallyCompatible
COM: <s> this method verifies if two annotation and are partially compatible </s>
|
funcom_train/46731545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMedicationRef(DisplayModel medicationRef) {
if (Converter.isDifferent(this.medicationRef, medicationRef)) {
DisplayModel oldmedicationRef= new DisplayModel(this);
oldmedicationRef.copyAllFrom(this.medicationRef);
this.medicationRef.copyAllFrom(medicationRef);
setModified("medicationRef");
firePropertyChange(String.valueOf(MEDS_MEDICATIONREFID), oldmedicationRef, medicationRef);
}
}
COM: <s> facility name for the medication </s>
|
funcom_train/42110735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildModuleReplacementMap() {
termReplacements_ = new HashMap<String, String>();
if (queryParams_ == null)
return;
for (int i = 0; i < queryParams_.size(); i++) {
if (moduleParams_ != null)
termReplacements_
.put(queryParams_.get(i), moduleParams_.get(i));
}
}
COM: <s> builds the module replacement map which swaps the rules query parameters </s>
|
funcom_train/7272003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleRemoveEvent(FileManagerEvent evt) {
FileDesc file = evt.getFileDescs()[0];
Song song = urnToSong.remove(file.getSHA1Urn());
if (song != null) {
database.removeSong(autoCommitTxn, song);
song.setAttachment(null);
// auto commit
}
}
COM: <s> handles a remove event </s>
|
funcom_train/29937773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object dupTree(Object tree) {
if (tree == null) {
return null;
}
if (isNil(tree)) {
NilNode ret = (NilNode) nil();
for (int count=0; count<getChildCount(tree); count++) {
ret.addChild((AbstractTPLNode) dupTree(getChild(tree, count)));
}
return ret;
}
return treeBuilder.dupTree((AbstractTPLNode) tree);
}
COM: <s> duplicate tree recursively using </s>
|
funcom_train/4125749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasUnexploredAdjacent() {
Iterator<Position> tileIterator = getMap().getAdjacentIterator(getPosition());
while (tileIterator.hasNext()) {
Tile t = getMap().getTile(tileIterator.next());
if (!t.isExplored()) {
return true;
}
}
return false;
}
COM: <s> determine whether this tile has adjacent tiles that are unexplored </s>
|
funcom_train/21970995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeToClient( String str ) {
/* Translate the message to client format */
outputLine = formatOutput( str );
try {
bufferOut.write( outputLine );
Log.debug( " Writing to client: " + outputLine );
bufferOut.flush();
Log.debug( "Flushing" );
} catch (IOException e) {
Log.info( "Error sending the message." + e.getMessage() );
}
}
COM: <s> prepare and send the message back to client </s>
|
funcom_train/11111488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isInvalid(String value) {
char[] ch = value.toCharArray();
int i = 0;
while (i < ch.length) {
int c = Character.codePointAt(ch, i);
if (isInvalid(c)) {
return true;
}
i = i + Character.charCount(c);
}
return false;
}
COM: <s> checks if the given string contains any invalid xml characters </s>
|
funcom_train/30005822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean move(TestSequence target) {
boolean remove = false;
boolean add = false;
if (isThisMovableTo(target)) {
if (this.parent != null) {
remove = this.parent.removeChild(this);
}
if (remove) {
add = target.add(this);
if (add) {
this.parent = target;
}
}
}
return remove && add;
}
COM: <s> moves the element to another element </s>
|
funcom_train/18474041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object createMemberSet(List mList) {
if (mList.size() == 0)
return null;
else if (mList.size() == 1)
return (Exp) mList.get(0);
else {
Exp[] remExps = (Exp[]) mList.toArray(new Exp[0]);
return new FunCall("{}", remExps, FunCall.TypeBraces);
}
}
COM: <s> generate an object for a list of members </s>
|
funcom_train/39570480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleTimer(Object timerID) {
try {
simHCNode protocol = (simHCNode)((OverlayNode)phy).getProtocol();
if(protocol!=null){
protocol.checkEventListSize();
protocol.eventList.add(new TimerHistoryEntry(protocol.network.simTime(), false, timerID, 0.0f));
}
callback.timerExpired(timerID);
} catch (Exception e) {
lotusDebug.errorln("HC_Adapter#handleTimer: "+e.toString());
e.printStackTrace();
}
}
COM: <s> handle a timer </s>
|
funcom_train/38238250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeResult(AnalysisJob job){
String siteName = job.getSiteName();
String taskName = job.getTaskName();
Hashtable siteResult = (Hashtable)this._results.get(siteName);
Vector jobs = (Vector)siteResult.get(taskName);
jobs.removeElement(job);
}
COM: <s> removes a record from the result </s>
|
funcom_train/4299796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh(Connection c) {
cConn = c;
if (vHoldForms == null) {
this.initGUI();
// System.out.println("initGUI <<<<<<<<<<<<<<<<<<<<<<");
} else {
this.resetTableForms();
// System.out.println("reset >>>>>>>>>>>>>>>>>");
}
}
COM: <s> code refresh code will read again the meta data of the </s>
|
funcom_train/42043803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File createAndShowGUI() {
fs = new JFileChooser();
fs.setFileSelectionMode(JFileChooser.FILES_ONLY);
int returnVal = fs.showOpenDialog(FileSelector.this);
switch (returnVal) {
case JFileChooser.APPROVE_OPTION:
return fs.getSelectedFile();
case JFileChooser.CANCEL_OPTION:
default:
return null;
}
}
COM: <s> create the gui and show it </s>
|
funcom_train/1784817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Event getEventFromDatastore(String eventID) {
// If the Event doesn't have an ID, then it hasn't been persisted ever
if (eventID == null)
return null;
PersistenceManager pm = null;
Event event = null;
try {
pm = PMF.get().getPersistenceManager();
event = pm.getObjectById(Event.class, eventID);
} finally {
pm.close();
}
return event;
}
COM: <s> returns the db copy of the passed in event if it exists </s>
|
funcom_train/13849605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map cancelAll(Uuid[] cookies) {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(
TxnManagerImpl.class.getName(), "cancelAll");
}
readyState.check();
Map results = LandlordUtil.cancelAll(this, cookies);
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(
TxnManagerImpl.class.getName(), "cancelAll");
}
return results;
}
COM: <s> bulk cancel of leases on code transaction code s </s>
|
funcom_train/42262328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double turnToBall(int robotNumber) {
if (Camera.getInstance().whoHasABall() == robotNumber) {
// System.out.println("mam piłkę i mam się do niej zwrócić? Co jest!?");
// //gD.
return 0;
}
return turnToPosition(robotNumber, new Point2d(getFutureBallPosition()));
}
COM: <s> turn specified robot in the direction of a ball </s>
|
funcom_train/933284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Class formBeanClass() {
ClassLoader classLoader =
Thread.currentThread().getContextClassLoader();
if (classLoader == null) {
classLoader = this.getClass().getClassLoader();
}
try {
return (classLoader.loadClass(getType()));
}
catch (Exception e) {
return (null);
}
}
COM: <s> return the code class code instance for the form bean implementation </s>
|
funcom_train/37831241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startTimer() {
/*
* Time between playing is not very precise. It depends on the accuracy
* of the hourglass of the sacristan. (One minute precision + any turn
* time overflows).
*/
Calendar now = Calendar.getInstance();
int timeToNext = TIME_SLICE - (now.get(Calendar.MINUTE) % TIME_SLICE);
SingletonRepository.getTurnNotifier().notifyInSeconds(Math.max(1, timeToNext * MathHelper.SECONDS_IN_ONE_MINUTE), this);
}
COM: <s> start the timer for the next playing </s>
|
funcom_train/43246241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDischargeDate() {
System.out.println("getDischargeDate");
AdmissionObject instance = new AdmissionObject();
Calendar expResult = null;
Calendar result = instance.getDischargeDate();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get discharge date method of class org </s>
|
funcom_train/18503530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearData(boolean untitled) {
if (untitled) {
widgets.getStyledText().setText("");
widgets.getConfigData().setFilename(null);
}
widgets.getConfigData().setHasChanged(false);
undoStack.clear();
redoStack.clear();
}
COM: <s> set back all values for a new file </s>
|
funcom_train/49456810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSqlCie() {
StringBuffer sqlCie = new StringBuffer("( ");
boolean first=true;
for (Integer id : ciedomainsId) {
sqlCie.append(first ? " "+id+" " : ", "+id+" ");
first = false;
}
sqlCie.append(" ) ");
return sqlCie.toString();
}
COM: <s> the sql in </s>
|
funcom_train/50142096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate(Object value) throws ValidationException {
String contents = value.toString();
int num = contents.length();
if (num < min) {
throw new ValidationException("String length less than " + min + ".");
} else if (num > max) {
throw new ValidationException("String length bigger than " + max + ".");
}
}
COM: <s> the validate function br </s>
|
funcom_train/32368630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFindByDescription() {
String testName = "findByDescription";
if (logger.isInfoEnabled()) {
logger.info("\n\t\tRunning Test: " + testName);
}
String desc = "MiN";
ItemDefinition result = getFixture().findByDescription(desc);
// verify
assertTrue(result != null);
assertTrue(result.getDescription().equalsIgnoreCase(desc));
if (logger.isInfoEnabled()) {
logger.info(testName + " verified type:" + desc);
}
}
COM: <s> run the item definition find by description string method test </s>
|
funcom_train/12625569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openFile(String path) throws IOException{
file = (FileConnection)Connector.open("file:///" + path);
fileReader = file.openDataInputStream();
fileWriter = file.openDataOutputStream();
if(!file.exists())
file.create();
}
COM: <s> opens a file in the file system </s>
|
funcom_train/29882643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteAllTemporaryMacros() {
for (PriExecutableMacro eachPriExecutableMacro : mMacroStoreHashtable.values()) {
if (eachPriExecutableMacro.getIsMacroTemporary()) {
eachPriExecutableMacro.setMacroPclBytes(null);
}
}
// PriDebug.infoln(PriDebug.spacesForPclParseMsgs + "Delete all temporary macros");
}
COM: <s> delete all temporary macros </s>
|
funcom_train/19454181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void playerAdded() {
int row = tourney.getPlayerCount() - 1;
for(int i = 0; i < tables.length && tables[i] != null; i++) {
((AbstractTableModel) tables[i].getModel()).fireTableRowsInserted(row, row);
}
crossTable.newCrossTableModel();
}
COM: <s> a players has been added to the tourney telling all table models </s>
|
funcom_train/16829752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNullFilterCriterion() {
Query query = new Query().setObjectClassName(String.class.getName())
.addColumn("code");
String queryString = new QueryStringBuilder().buildQuery(query);
assertEquals(queryString,
"SELECT obj.id, obj.code FROM java.lang.String AS obj ORDER BY 2, 1");
}
COM: <s> ensures that a null pointer does not occur when a null filter criterion </s>
|
funcom_train/324574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newData(PamObservable o, PamDataUnit arg) {
// see which channel it's from
FFTDataUnit fftDataUnit = (FFTDataUnit) arg;
int chan = PamUtils.getSingleChannel(fftDataUnit.getChannelBitmap());
// chech that a detector has been instantiated for that detector
if (channelDetectors == null ||
channelDetectors.length <= chan ||
channelDetectors[chan] == null) {
return;
}
channelDetectors[chan].newData(o, fftDataUnit);
}
COM: <s> pam process already implements pam observer enabling it to subscribe </s>
|
funcom_train/37142284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getUnwrappedValue(Object value) {
if (!getUnwrapUserObject()) return value;
if (value instanceof DefaultMutableTreeNode) {
value = ((DefaultMutableTreeNode) value).getUserObject();
} else if (value instanceof TreeTableNode) {
TreeTableNode node = (TreeTableNode) value;
value = node.getUserObject();
}
return value;
}
COM: <s> returns the value as it should be passed to the delegate </s>
|
funcom_train/45320056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBotonGestionCompras() {
if (botonGestionCompras == null) {
botonGestionCompras = new JButton();
botonGestionCompras.setText("Gestion de Compras");
botonGestionCompras.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
padre.cambiarPanel("panelCompras");
}
});
}
return botonGestionCompras;
}
COM: <s> this method initializes boton gestion compras </s>
|
funcom_train/3761603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String HL(String msgkey){
try{
String amsg = ((Token)cmsgs.get(msgkey)).strVal();
amsg = amsg.replace(HS_MARK, HS_STRING);
return amsg.replace(HE_MARK, HE_STRING);
}catch(Exception x){
return msgkey;
}
}
COM: <s> extract and hilite the message defined by msgkey </s>
|
funcom_train/44869638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WCMPanelBean getXPanel() {
if (xPanel == null) {
xLabel = new JLabel();
xLabel.setText(" x = ");
xPanel = new WCMPanelBean();
xPanel.setLayout(new BoxLayout(getXPanel(), BoxLayout.X_AXIS));
xPanel.setAlignmentX(0.0F);
xPanel.add(xLabel, null);
xPanel.add(getXInput(), null);
xPanel.add(getXSlider(), null);
}
return xPanel;
}
COM: <s> this method initializes x panel </s>
|
funcom_train/40387653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSourceName_method() throws Exception {
Member method = Obj.class.getDeclaredMethod("method", String.class);
assertEquals("Method should be identified by its file name and line number",
"ShortNameFactoryTest.java:53", nameFactory.getSourceName(method));
}
COM: <s> tests the case where a provider method is the source of the </s>
|
funcom_train/48395710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addHandleErrorHandler(com.smartgwt.client.data.events.HandleErrorHandler handler) {
if(getHandlerCount(com.smartgwt.client.data.events.ErrorEvent.getType()) == 0) setupHandleErrorEvent();
return doAddHandler(handler, com.smartgwt.client.data.events.ErrorEvent.getType());
}
COM: <s> add a handle error handler </s>
|
funcom_train/13366611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSubViewToMaster(String aMasterName, SubViewMapper aSubViewMapper) {
for (BaseViewDataAccessor accessor : viewFieldAccessors)
if (accessor.addSubViewToMaster(aMasterName, aSubViewMapper) == true)
aSubViewMapper.addMaster(accessor);
}
COM: <s> adds a sub view to the master </s>
|
funcom_train/18746453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TypeEdge addEdge(int nr, TypeNode source, TypeNode target) {
SimpleMorphism morph =
newSimpleMorphism(TypeEdge.PREFIX + nr, source, target);
TypeEdge edge = new TypeEdge(nr, source, target, morph);
addEdge(edge);
return edge;
}
COM: <s> creates and returns a new edge with an empty morphism </s>
|
funcom_train/20363721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void revertList() {
int ret = JOptionPane.showConfirmDialog( this, "Revert list losing unsaved changes?","Confirm",JOptionPane.OK_CANCEL_OPTION );
if ( ret==JOptionPane.CANCEL_OPTION ) {
return;
}
archetypeControl.removeNameChangeListener( this );
rightPanel.removeAll();
archetypeControl=null;
rightPanel.add( selectLeftLabel );
rightPanel.repaint();
listData.clear();
listData.addAll( ArchetypesManager.getArchetypes() );
}
COM: <s> revert the list back to its saved state </s>
|
funcom_train/10517328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test6() {
expectBuildExceptionContaining("test6", "Manifest is invalid - section starts with incorrect attribute",
"Invalid Manifest");
String output = getLog();
boolean hasWarning = output.indexOf("Manifest sections should start with a \"Name\" attribute") != -1;
assertTrue("Expected warning about section not starting with Name: attribute", hasWarning);
}
COM: <s> new section not starting with name attribute </s>
|
funcom_train/23874443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Group clone() throws CloneNotSupportedException {
Group newGroup = new Group(this.name);
newGroup.setDescription(this.description);
newGroup.setRunnable(this.runnable);
newGroup.setVisible(this.visible);
newGroup.addOCLMetricList(oclMetric);
if ( !groups.isEmpty() )
{
//level ++;
for (Iterator it1 = groups.iterator(); it1.hasNext();) {
Group group = (Group) it1.next();
newGroup.addGroup(group.clone());
}
}
return newGroup;
}
COM: <s> this method does not clone the code oclmetric code s </s>
|
funcom_train/45850830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCatNameByLevel(String catName) {
String[] cats = catName.split("/");
if (cats.length > ConfigParser.getMaxCatLevels()) {
StringBuffer catsSB = new StringBuffer();
for(int i = 0; i < ConfigParser.getMaxCatLevels(); i++) {
catsSB.append(cats[i]);
catsSB.append("/");
}
catName = catsSB.toString().substring(0, catsSB.length()-1);
}
return catName;
}
COM: <s> get the first n levels from the category </s>
|
funcom_train/41150727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInterpolationParameterLowerBound(double value) {
if ( (value < 0) || (value >= 1) || (value > getInterpolationParameterUpperBound()) )
throw new IllegalArgumentException("Illegal lower bound");
m_sLower = value;
m_tuneInterpolationParameter = true;
m_interpolationParameterValid = false;
}
COM: <s> sets the lower bound for the interpolation parameter tuning </s>
|
funcom_train/37838303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String singular(final String word) {
final WordEntry entry = words.get(trimWord(word));
if (entry != null) {
if (entry.isPlural()) {
// return the associated singular from the word list
return entry.getPlurSing();
} else {
// The word is already in singular form.
return entry.getNormalized();
}
} else {
// fall back: call Grammar.singular()
return Grammar.singular(word);
}
}
COM: <s> lookup the singular form of the given word from the word list </s>
|
funcom_train/29935507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendPlayerInformation () {
synchronized (clients) {
for (ClientHandler ch : clients.values()) {
Object [] usermsg = new Object [] { ch.getPlayer (), players };
GameMessage gm = new GameMessage (MessageType.PLAYER, usermsg);
try {
ch.sendMessage (gm);
} catch (IOException ex) {
logger.error ("Can't send user message to client", ex);
}
}
}
}
COM: <s> sends each client the list of players in the game </s>
|
funcom_train/44888118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AST parseSuite() throws ParseException {
if (this.getNextToken().isNewline()) {
this.consumeToken();
return this.parseBlock();
}
AST statementList = this.parseStatementList();
if (!this.getNextToken().isNewline())
throw new ParseException("Newline expected.");
this.consumeToken();
return statementList;
}
COM: <s> suite stmt list newline newline block </s>
|
funcom_train/9479345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File findFile(File directory, String name) throws FileNotFoundException {
File file = new File(directory, name);
if (file.exists()) {
return file;
}
for (String child : directory.list()) {
if (child.equalsIgnoreCase(name)) {
return new File(directory, child);
}
}
throw new FileNotFoundException("Missing file: " + file);
}
COM: <s> finds the named file in the named directory </s>
|
funcom_train/8638804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFields(FdfReader fdf) throws IOException, DocumentException {
HashMap fd = fdf.getFields();
for (Iterator i = fd.keySet().iterator(); i.hasNext();) {
String f = (String)i.next();
String v = fdf.getFieldValue(f);
if (v != null)
setField(f, v);
}
}
COM: <s> sets the fields by fdf merging </s>
|
funcom_train/44586823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeRenamings() {
if (this.renamingsList != null && this.renamingsList.length == this.elementsToProcess.length) {
this.renamings = new HashMap(this.renamingsList.length);
for (int i = 0; i < this.renamingsList.length; i++) {
if (this.renamingsList[i] != null) {
this.renamings.put(this.elementsToProcess[i], this.renamingsList[i]);
}
}
}
}
COM: <s> sets up the renamings hashtable keys are the elements and </s>
|
funcom_train/40445784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private KerberosKey getKrbKey(Subject subject, int keyType) {
Set<Object> credentials = subject.getPrivateCredentials(Object.class);
for (Object cred : credentials) {
if (cred instanceof KerberosKey) {
KerberosKey key = (KerberosKey) cred;
if (key.getKeyType() == keyType) {
return (KerberosKey) cred;
}
}
}
return null;
}
COM: <s> obtain the kerberos key of the specified type from </s>
|
funcom_train/18059126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UID PCons() throws RemoteException {
synchronized(SO) {
SO.rmcCount++;
try {
ProcSlob ps = new ProcSlob();
UID uid = new UID();
SO.objectMap.put(uid, ps);
return uid;
} catch(Exception e) {
throw new RemoteException(e.getMessage());
}
}
}
COM: <s> constructor for the direct access process class </s>
|
funcom_train/40348312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GQuery setArray(NodeList<Element> list) {
if (list != null) {
nodeList = list;
int l = list.getLength();
elements = new Element[l];
for (int i = 0; i < l; i++) {
elements[i] = list.getItem(i);
}
}
return this;
}
COM: <s> force the current matched set of elements to become the specified array of </s>
|
funcom_train/3428322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isAdaptiveRTF(SyntaxTreeNode node) {
Vector contents = node.getContents();
for (int i = 0; i < contents.size(); i++) {
SyntaxTreeNode item = (SyntaxTreeNode)contents.elementAt(i);
if (!isTextElement(item, true))
return false;
}
return true;
}
COM: <s> return true if the node represents an adaptive rtf </s>
|
funcom_train/45895766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintTo(Graphics2D g2, int x0, int y0, int color) {
int y = y0 + rect.y;
for (int i = 0; i < rows.size(); i++) {
txt.paintTo(g2, x0 + rect.x, y + 3, 14, color, rows.get(i));
y += 20;
}
}
COM: <s> paint the rows </s>
|
funcom_train/23898463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChildTextNode(XMLTreeNode treeNode, String nodeText) {
// Create new Element and add it to the current node
XMLTreeNode newTreeNode = treeNode.createNewXMLTreeTextNode(nodeText);
treeNode.appendChildXMLTreeNode(newTreeNode);
// Add Element add end of tree.
addChildNode(treeNode, newTreeNode);
}
COM: <s> add a child text node to the tree model and xml </s>
|
funcom_train/7639768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectType(TypeInfo type) {
if (type == null || !type.getWidget().getSelection()) {
mInternalTypeUpdate = true;
mCurrentTypeInfo = type;
for (TypeInfo type2 : sTypes) {
type2.getWidget().setSelection(type2 == type);
}
updateRootCombo(type);
mInternalTypeUpdate = false;
}
}
COM: <s> helper method to select on of the type radio buttons </s>
|
funcom_train/9737105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int setSelfLoopEdgeActive (boolean active_p) {
int numChanged = 0;
for (int i=0; i<this.edgeList.size(); i++) {
Edge edgeObj = (Edge) this.edgeList.get(i);
if (edgeObj.isSelfLoop()) {
if (edgeObj.setActive(active_p)) numChanged++;
}
}
return numChanged;
}
COM: <s> sets active status for all self loop edges to active inactive passed in </s>
|
funcom_train/22054744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void resizeCache() {
long lOldCacheSize = iCacheSize;
iCacheSize += CACHE_INCREMENT;
byte[] newCache = new byte[iCacheSize];
for (int i = 0; i < lOldCacheSize; i++) {
newCache[i] = cacheBytes[i];
}
cacheBytes = newCache;
}
COM: <s> resize the cache </s>
|
funcom_train/14266198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsUrn(URN urn) {
if(urn == null) {
throw new NullPointerException("null URNS not allowed in containsUrn");
}
// now check if given urn matches
Iterator iter = URNS.iterator();
while(iter.hasNext()){
if (urn.equals((URN)iter.next())) {
return true;
}
}
// no match
return false;
}
COM: <s> determine whether or not the given tt urn tt instance is </s>
|
funcom_train/4644620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AttachmentType_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AttachmentType_name_feature", "_UI_AttachmentType_type"),
TassooPackage.Literals.ATTACHMENT_TYPE__NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the name feature </s>
|
funcom_train/41325833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CompColMatrix createInterpolationMatrix(int[] pt, int c) {
FlexCompColMatrix If = new FlexCompColMatrix(pt.length, c);
for (int i = 0; i < pt.length; ++i)
if (pt[i] != -1)
If.set(i, pt[i], 1);
return new CompColMatrix(If);
}
COM: <s> creates the interpolation prolongation matrix based on the </s>
|
funcom_train/14616729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUpFiles( String aFilename ) {
try {
m_aTemplateText = getTemplateText( aFilename );
} catch( IOException e ) {
throw new RuntimeException( e.getMessage() );
}
try {
m_aReferenceText = getReferenceText( aFilename );
} catch( IOException e ) {
m_aReferenceText = "";
}
m_aFilename = aFilename;
}
COM: <s> sets up the reference and template files to be used for the test </s>
|
funcom_train/33515409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(byte[] rowKey) {
if (startRow != null && Bytes.compareTo(rowKey, startRow) < 0) {
return false;
}
if (endRow != null && Bytes.compareTo(endRow, rowKey) < 0) {
return false;
}
return true;
}
COM: <s> check if this scan range contains the given key </s>
|
funcom_train/46743803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectActionRef(DisplayModel selectActionRef) {
if (Converter.isDifferent(this.selectActionRef, selectActionRef)) {
DisplayModel oldselectActionRef= new DisplayModel(this);
oldselectActionRef.copyAllFrom(this.selectActionRef);
this.selectActionRef.copyAllFrom(selectActionRef);
setModified("selectActionRef");
firePropertyChange(String.valueOf(APPLICATIONCONTROLLOGS_SELECTACTIONREFID), oldselectActionRef, selectActionRef);
}
}
COM: <s> action for mediator tree action select action list selection </s>
|
funcom_train/23013052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deactivateTemplate(StackTraceTemplate template) {
StackFrame stackFrame = template.getStackFrameTemplates().get(0).getStackFrame();
StackFrameKey key = new StackFrameKey(stackFrame);
ConcurrentMap<Integer, StackTraceTemplate> templateMap = activeTemplates.get(key);
if (templateMap != null) {
templateMap.remove(template.getId());
template.setActive(false);
}
}
COM: <s> deactivates the template </s>
|
funcom_train/21888583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanelInstantiation() {
if (jPanelInstantiation == null) {
jPanelInstantiation = new JPanel(new BorderLayout());
jPanelInstantiation.setBorder(javax.swing.BorderFactory
.createEmptyBorder(5, 5, 5, 5));
jPanelInstantiation.add(getJPanel2(), "North");
}
return jPanelInstantiation;
}
COM: <s> this method initializes j panel instantiation </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.