__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/47305132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTableDependants(DatabaseMetaData dbmd) throws SQLException {
ResultSet ikrs = dbmd.getImportedKeys(getCatalog(), getSchema(), getName());
addDependantsFromKeys(ikrs);
ikrs.close();
ikrs = dbmd.getExportedKeys(getCatalog(), getSchema(), getName());
addDependantsFromKeys(ikrs);
ikrs.close();
}
COM: <s> adds the dependant imported and exported key relationships which must </s>
|
funcom_train/5078075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handlePreferenceStorePropertyChanged(String property) {
if (property.equals(PREFERENCE_LAYOUT)) {
firePropertyChanged(property, new Integer(getLayoutSetting()));
} else if (property.equals(PREFERENCE_AUTO_COLLAPSE)) {
firePropertyChanged(property, new Integer(getAutoCollapseSetting()));
} else if (property.equals(PREFERENCE_FONT)) {
firePropertyChanged(property, getFontData());
} else {
firePropertyChanged(property,
new Boolean(useLargeIcons(convertPreferenceNameToLayout(property))));
}
}
COM: <s> this method is invoked when the preference store fires a property change </s>
|
funcom_train/40527738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRule(Rule rule) {
// We keep 'ruleNames' as a guard against programming errors
if (!ruleNames.add(rule.getName())) {
throw new IllegalArgumentException(
"Duplicate rule name: " + rule.getName());
}
rules.add(rule);
rule.setRewriter(this);
}
COM: <s> adds a rule to this rewriter </s>
|
funcom_train/29520436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ReplayFileSimulation() {
List startingInstructions;
statisticsShowed = false;
simulating = true;
//statisticsControl mark if all traffic lines are ended.
statisticsControl = new StatisticExchangeBuffer(accessPoints.GetTrafficSize());
if (MobiliyActivated()) {
ReplayMobility();
} else {
StartStaticSimulation();
}
GenerateFileInstructionsForAllNodes();
startingInstructions = GenerateStartingInstructionsForSSH();
RunSimulation(SSHThread, startingInstructions, false);
}
COM: <s> replay the last simulation storing first the instructions in a file </s>
|
funcom_train/8609323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Legion legion) {
if (legionsById.put(legion.getLegionId(), legion) != null)
throw new DuplicateAionObjectException();
if (legionsByName.put(legion.getLegionName().toLowerCase(), legion) != null)
throw new DuplicateAionObjectException();
}
COM: <s> add legion to this container </s>
|
funcom_train/36399754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getBooleanProperty(ConfigurationKey key, boolean def) {
String res=userPreferences.get(key.getKey(), null);
return res==null?sharePreferences.getBoolean(key.getKey(), def):userPreferences.getBoolean(key.getKey(), def);
}
COM: <s> returns the boolean value of the given key </s>
|
funcom_train/3082384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModel(BoundedRangeModel newModel) {
BoundedRangeModel oldModel = getModel();
setProperty(PROPERTY_MODEL, newModel);
if (newModel != oldModel) {
if (oldModel != null) {
oldModel.removeChangeListener(changeListener);
changeListener = null;
}
if (newModel != null) {
changeListener = createChangeListener();
newModel.addChangeListener(changeListener);
}
newModel.setExtent(0);
}
}
COM: <s> sets the data model used by the progress bar </s>
|
funcom_train/8487106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetCase() {
System.out.println("setCase");
int ligne = 0;
int colonne = 0;
StoneVal pion = StoneVal.WHITE;
Goban instance = new Goban();
instance.setCase(ligne, colonne, pion);
StoneVal sortie = instance.getCase(ligne, colonne);
assertEquals(sortie, pion);
}
COM: <s> test of set case method of class goban </s>
|
funcom_train/3172802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawFamBox(FamBox fambox, int x, int y, int gen) {
AffineTransform transform = graphics.getTransform();
transform(x, y, fambox.width, fambox.height);
transpose(fambox);
elements.drawFamBox(fambox, 0, 0, gen);
transpose(fambox);
graphics.setTransform(transform);
}
COM: <s> outputs a rotated image of a family box </s>
|
funcom_train/15911645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(boolean withAnalysis) {
// Starts these reactive machines
ReactiveMachine[] machines = getMachines();
for (int i = 0; i < machines.length; i++)
machines[i].start(withAnalysis);
started = true;
try {
Toolkit.getDefaultToolkit().addAWTEventListener(this,
KeyEvent.KEY_EVENT_MASK);
} catch (Exception e) {
}
fireConfigurationStarted();
}
COM: <s> starts running the configuration </s>
|
funcom_train/15453001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFormatedDateLastModified(){
File file = new File(path);
Date lastModified = new Date(file.lastModified());
SimpleDateFormat formatter = new SimpleDateFormat(Resources.getString(
Resources.DATE_FORMAT, Locale.getDefault()));
return formatter.format(lastModified);
}
COM: <s> gets the last modified date in a given format </s>
|
funcom_train/19886580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RevenueSource read(String id) throws DataException {
Connection conn;
RevenueSource rs;
try {
conn = ConnectionPool.getInstance().get();
rs = read(id, conn);
} catch (ConnectionPoolException ex) {
throw new DataException("data error " + ex);
} catch (SQLException ex){
throw new DataException("data error " + ex);}
return rs;
}
COM: <s> this is the public read statement </s>
|
funcom_train/20688302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CommandLineOption getOption(CommandLineApplication app, String handlerMemberName) {
Collection<AccessibleObject> objs =
ReflectionTool.getAllAccessibleObjects(
app.getClass(), handlerMemberName, ReflectionTool.INCLUDE_ALL_MAKE_ACCESSIBLE
);
Iterator<AccessibleObject> iter = objs.iterator();
AccessibleObject o = iter.next();
CommandLineOption a = o.getAnnotation(CommandLineOption.class);
return a;
}
COM: <s> gets the command line option annotation instance for the specified member </s>
|
funcom_train/4442692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void indexContent(URI resourceURI, InputStream in, IMimeType mimetype) {
assertOpen();
// TODO find extractor
// TODO use native RDFContainer
// TODO extract!
// TODO get fulltext from native container
// TODO put to lucene
// TODO get RDF
// TODO put somewhere? to RDF to one global model
// TODO use mimetype
Reader r = new InputStreamReader(in);
indexContent(resourceURI, r);
}
COM: <s> use mimetype to transform binary content into something indexable </s>
|
funcom_train/9886492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIntensities(int index, float cy3, float cy5) {
ISlideDataElement sde = (ISlideDataElement)elementAt(index);
sde.setTrueIntensity(ISlideDataElement.CY3, cy3);
sde.setTrueIntensity(ISlideDataElement.CY5, cy5);
}
COM: <s> sets intensities for a spot with specified index </s>
|
funcom_train/31676983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLastRow() {
double[][] old = elems;
elems = new double[getRows()-1][getCols()];
for ( int r = 0; r < elems.length; r++ )
System.arraycopy( old[r], 0, elems[r], 0, old[r].length );
}
COM: <s> removes last row from matrix </s>
|
funcom_train/11010869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XWPFStyles createStyles() {
if(styles == null) {
StylesDocument stylesDoc = StylesDocument.Factory.newInstance();
XWPFRelation relation = XWPFRelation.STYLES;
int i = getRelationIndex(relation);
XWPFStyles wrapper = (XWPFStyles)createRelationship(relation, XWPFFactory.getInstance(), i);
wrapper.setStyles(stylesDoc.addNewStyles());
styles = wrapper;
}
return styles;
}
COM: <s> creates an empty styles for the document if one does not already exist </s>
|
funcom_train/2886864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addFiller(long rowId) {
int base = (int) ((rowId * 8) % 26);
for (int i = 0; i < 7; ++i) {
value.append(filler[(base + i) % 26], 0, 10);
}
value.append(filler[(base + 7) % 26], 0, 8);
}
COM: <s> add the required filler bytes </s>
|
funcom_train/11709047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Templates getTemplates(String filename) {
InputStream is = AnnotationViewGenerator.class.getResourceAsStream(filename);
Templates templates;
try {
templates = mTFactory.newTemplates(new StreamSource(is));
} catch (TransformerConfigurationException e) {
throw new UIMARuntimeException(e);
} finally {
try {
is.close();
} catch (IOException e) {
// ignore close errors
}
}
return templates;
}
COM: <s> parses an xml file and produces a templates object </s>
|
funcom_train/49469596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNewPublished(VulnId e_vulnerability_id) throws Exception {
_logger.debug("Marking the vulnerability "+e_vulnerability_id+" as new.");
Db db = getDb();
try {
db.enter();
st_upd_ev_new_published.setInt(1, e_vulnerability_id.getId());
int updated = db.executeUpdate(st_upd_ev_new_published);
if (updated != 1)
throw new Exception("Can't renew the vulnerability "+updated);
} finally {
db.exit();
}
}
COM: <s> flag a vulnerability as new scanned </s>
|
funcom_train/12564511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected float getFloatPropertyState(final int propertyIndex) {
switch (propertyIndex) {
case GraphicsNode.PROPERTY_STROKE_WIDTH:
return strokeWidth;
case GraphicsNode.PROPERTY_STROKE_MITER_LIMIT:
return strokeMiterLimit;
case GraphicsNode.PROPERTY_STROKE_DASH_OFFSET:
return strokeDashOffset;
default:
return super.getFloatPropertyState(propertyIndex);
}
}
COM: <s> returns the value of the given float valued property </s>
|
funcom_train/5618431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String convert(PyObject index, PyObject object) {
if (this.converters != Py.None) {
PyObject converter = this.converters.__finditem__(index);
if (converter != Py.None) {
object = converter.__call__(object);
}
}
if ((object == Py.None) || (object == null)) {
return "";
}
return CSVString.toCSV(object.toString());
}
COM: <s> convert the object at index to a string </s>
|
funcom_train/31658977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getInput(FormModelNode item) {
if (item.getFormItem() instanceof ChoiceFormItem)
return HtmlUtil.renderChoiceFormItem2(getFormModel(), item,
getLanguage(), item.getId(), true);
else if (item.getFormItem() instanceof TextFormItem)
return HtmlUtil.renderTextFormItem(item, item
.getId(), true);
else
return "";
}
COM: <s> gets the input </s>
|
funcom_train/17184023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionSelectAll() {
//disable search mode
multiSearchMode=false;
// Toggle.
selectAll = !selectAll;
// Radio buttons doesn't allow multiple selections. Switch to
// checkboxes.
if (selectAll) {
selectMultiple = true;
}
for (int index = dataTable.getFirst(); index < (dataTable.getFirst() + dataTable
.getRows()); index++) {
selectedRows.put(index, selectAll);
}
}
COM: <s> select all items </s>
|
funcom_train/34354447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dragStarted() {
// notify only, if this component has a defined dragSource
// (components without a drag source type cannot be used with
// VDnDBrowserController)
if ((dragSource != null) && !dragSource.equals("")) {
VDnDBrowserController.get().dragStarted(dragSource);
}
}
COM: <s> invoked when we detect that a drag has started </s>
|
funcom_train/1310445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Short getRegisteredClassId(Class<?> c) {
Short id = JGN.getRegisteredClassId(c);
if (id != null && id < 0) return id; // if it's a system id we return the internal value
// TODO - It would be more efficient to just store all the system IDs in the client registry.
return classToId.get(c);
}
COM: <s> if the local registry had the messageclass registered return its id </s>
|
funcom_train/36751578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
setButton(btnAdd, HibernateUtil.OP_INSERT);
setButton(btnDel, HibernateUtil.OP_DELETE);
setButton(btnUpd, HibernateUtil.OP_UPDATE);
RootPanel.get().add(lblServerReply);
RootPanel.get().add(btnAdd);
RootPanel.get().add(btnDel);
RootPanel.get().add(btnUpd);
}
COM: <s> the entry point method called automatically by loading a module </s>
|
funcom_train/50840264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void logTableDDL(Table t) throws HsqlException {
StringBuffer tableDDL;
String sourceDDL;
tableDDL = new StringBuffer();
DatabaseScript.getTableDDL(database, t, 0, null, true, tableDDL);
sourceDDL = DatabaseScript.getDataSource(t);
database.logger.writeToLog(session, tableDDL.toString());
if (sourceDDL != null) {
database.logger.writeToLog(session, sourceDDL);
database.logger.synchLog();
}
}
COM: <s> logs the ddl for a table created with into </s>
|
funcom_train/49046486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonPreview() {
if (jButtonPreview == null) {
jButtonPreview = new JButton();
jButtonPreview.setText("Preview");
jButtonPreview.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
actionEventButtonPreview(e);
}
});
jButtonPreview.setActionCommand("preview");
}
return jButtonPreview;
}
COM: <s> this method initializes j button preview </s>
|
funcom_train/25290324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isGraphicsConfigSupported(GraphicsConfiguration gc) {
if (gc == null) {
return false;
}
synchronized (globalLock) {
testCfg = gc;
threadWaiting = true;
if (Thread.currentThread() instanceof BehaviorScheduler) {
VirtualUniverse.mc.sendRenderMessage(gc, this, MasterControl.ISCONFIGSUPPORT);
} else {
VirtualUniverse.mc.postRequest(MasterControl.ISCONFIGSUPPORT, this);
}
runMonitor(Ding3dThread.WAIT);
return ((Boolean) testCfg).booleanValue();
}
}
COM: <s> returns a boolean indicating whether or not the given </s>
|
funcom_train/645314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void computeStatistics() {
for (int i = 0; i < children.size(); i++)
children.get(i).computeStatistics();
costGuessedTotal = costGuessedSelf;
costActualTotal = costActualSelf;
for (int i = 0; i < children.size(); i++) {
costGuessedTotal += children.get(i).costGuessedTotal;
costActualTotal += children.get(i).costActualTotal;
}
}
COM: <s> compute statistics after the complete tree has been build up </s>
|
funcom_train/4805203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseIncludedMode(Attributes attributes) throws SAXException {
// Create an anonymous mode.
Mode parent = md.currentMode;
modeDataStack.push(md);
md = new ModeData();
md.currentMode = new Mode(defaultBaseMode);
md.currentMode.noteDefined(locator);
parent.addIncludedMode(md.currentMode);
}
COM: <s> parse a mode element </s>
|
funcom_train/10009410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeGeneratedChargebackEvent(Lease lease, String billName, Date date) {
for (Event event : events) {
if (isMatchingBillEvent(event, lease, billName, date)) {
removeEvent(event, currentProcessedEventIndex);
break;
}
}
}
COM: <s> removes the chargeback event for the given bill from the tenant to the </s>
|
funcom_train/14267060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getKeyWords(){
FileDesc[] fds = getAllSharedFileDescriptors();
ArrayList retList = new ArrayList();
for(int i=0;i<fds.length;i++)
retList.add(fds[i].getFile().getAbsolutePath());
return retList;
}
COM: <s> called when a query route table has to be made </s>
|
funcom_train/9367028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentTab(int index) {
if (index < 0 || index >= getTabCount()) {
return;
}
getChildTabViewAt(mSelectedTab).setSelected(false);
mSelectedTab = index;
getChildTabViewAt(mSelectedTab).setSelected(true);
mStripMoved = true;
}
COM: <s> sets the current tab </s>
|
funcom_train/13875087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsAbstractPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Class_isAbstract_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Class_isAbstract_feature", "_UI_Class_type"),
EmofPackage.Literals.CLASS__IS_ABSTRACT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is abstract feature </s>
|
funcom_train/17806139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addVolatileStorage_gbPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PhysicalComponent_VolatileStorage_gb_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PhysicalComponent_VolatileStorage_gb_feature", "_UI_PhysicalComponent_type"),
CtbPackage.Literals.PHYSICAL_COMPONENT__VOLATILE_STORAGE_GB,
true,
false,
false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the volatile storage gb feature </s>
|
funcom_train/37863504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOutputProperties(Properties properties) {
if (properties == null)
outputProperties = defaultProperties;
else
outputProperties = properties;
String encoding = outputProperties.getProperty(OutputKeys.ENCODING, "UTF-8");
charSet = CharacterSet.getCharacterSet(encoding);
if (charSet == null)
throw new IllegalStateException("Charset should never be null");
}
COM: <s> set the output properties </s>
|
funcom_train/35838322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copy() {
if (editing) {
String text = oNode.getText();
if (startSelection < 0 || stopSelection < 0 || stopSelection > text.length())
return;
if (clipboard == null)
clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
StringSelection data;
String selectedText = text.substring(startSelection, stopSelection);
data = new StringSelection(selectedText);
clipboard.setContents(data, data);
}
}
COM: <s> if editing do a copy to the clipboard from the node label </s>
|
funcom_train/16615141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Exon exon) throws AdaptorException {
Connection conn = null;
try {
conn = getConnection();
conn.setAutoCommit(false);
delete(conn, exon);
conn.commit();
} catch (SQLException e) {
rollback(conn);
throw new AdaptorException(
"Failed to delete supporting evidence for exon " + exon,
e);
} finally {
close(conn);
}
}
COM: <s> deletes all links between exon and its supporting evidence </s>
|
funcom_train/44808623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List findByOrganizationIdAndPeriodId(final Integer organizationId, final Integer periodId, final Integer partnerId, final ICriteria fromCriteria) throws DAOException {
Criteria criteria = new Criteria();
addOrganizationFilter(organizationId, criteria);
addPeriodFilter(periodId, criteria);
addPartnerFilter(partnerId, criteria);
populateERMCriteria(fromCriteria, criteria);
return getEntityManager().select(getEntityClass(), criteria);
// addDateOrder(criteria);
// return criteria.list();
}
COM: <s> find documents by organization id my company period id and partner id </s>
|
funcom_train/13812789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final private void activate(final TransitionTimerPort port) throws Exception {
final long duration = port.getDuration();
if (duration >= 0) {
// only consider transitions with durations greater
// than or equal to 0 - this means transitions with
// durations less than 0 will never fire
final long currentTime = System.currentTimeMillis();
port.setActivationTime(currentTime);
port.setDesiredExpiryTime(new Long(currentTime + duration));
timerQueue.add(port);
}
}
COM: <s> calculate transitions expiry time and add it to timer queue in </s>
|
funcom_train/18195503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDefault(TestElement element) {
return ((element instanceof TestSequence)
&& (element.getId() == SEQUENCE_INTEGRATION_TEST_ID)
|| (element.getId() == SEQUENCE_SYSTEM_TEST_ID) || (element
.getId() == SEQUENCE_UNIT_TEST_ID));
}
COM: <s> checks if an element is a default sequence </s>
|
funcom_train/21017150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canAppendTo(ElementPath parentPath) {
requireNotNull(parentPath, "@require (parentPath != null)");
boolean result = true;
IComposite parent = parentPath.getLastElement().getComposite();
IElement element = getElement(0);
int index = getElementIndex(0);
if ((parent == null) || (index >= parent.getElementCount())
|| (parent.get(index) != element)) {
result = false;
}
return result;
}
COM: <s> checks if this path can be appended to the given path </s>
|
funcom_train/26021167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void declineIncomingSession() {
Thread thread = new Thread() {
public void run() {
try {
// Reject the invitation
incomingCshSession.removeSessionListener(incomingSessionEventListener);
incomingCshSession.rejectSession();
incomingCshSession = null;
// Exit activity
exitActivityIfNoSession(null);
} catch (Exception e) {
}
}
};
thread.start();
}
COM: <s> decline incoming session </s>
|
funcom_train/44559815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SearchMode getMode(String diplayName) {
IServer server = getDefaultServer();
if (server != null && server.getSearchModes() != null) {
for (SearchMode mode : server.getSearchModes()) {
if (mode.getDisplayName().equals(diplayName))
return mode;
}
}
return null;
}
COM: <s> retrieves the search mode for the display name </s>
|
funcom_train/18756171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getComponentIndex(Component c) {
Component[] components = getMenuComponents();
int retVal = -1;
for (int i = 0; i < components.length; i++) {
if (components[i] == c) {
retVal = i;
break;
}
}
if (retVal == -1) {
// Account for nested More menu
int moreLocation = moreMenu.getComponentIndex(c);
if (moreLocation != -1) {
retVal = (components.length-1) + moreLocation;
}
}
return retVal;
}
COM: <s> override of jmenu get component index component </s>
|
funcom_train/17897790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void trace(Object message) {
if (!isTrace()) return;
if(is12) {
getLogger().log(FQCN, (Priority) Level.DEBUG, message, null );
} else {
getLogger().log(FQCN, Level.DEBUG, message, null );
}
}
COM: <s> log a message to the log4j logger with code trace code priority </s>
|
funcom_train/9700632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initDBButton(int selection,boolean canBeModified){
switch (selection) {
case DynamicDBGenerationCode.WITH_DB_INPUT_FILE:
enableInputRadioButton(1,canBeModified);
break;
case DynamicDBGenerationCode.WITHOUT_DB:
enableInputRadioButton(0,canBeModified);
break;
default:
DynamicDBGenerationCode dbCode = new DynamicDBGenerationCode();
int index = dbCode.convert2Index(selection>>2);
enableInputRadioButton(index, canBeModified);
}
}
COM: <s> initialize the radio buttons with a pre selection </s>
|
funcom_train/44533667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getFramesFile() {
String title = getProject().getName() + " - Invicta Project Definition Documentation";
String frames = "<HTML>";
frames += "<HEAD><TITLE>" + title + "</TITLE></HEAD>\n";
frames += "<FRAMESET cols=\"20%,80%\">\n";
frames += "<FRAME src=\"" + LIST_FILE_NAME + "\" name=\"list\">";
frames += "<FRAME src=\"" + PROJECT_FILE_NAME + "\" name=\"component\">";
frames += "</FRAMESET>";
frames += "</HTML>";
return frames;
}
COM: <s> return the content of the frames file </s>
|
funcom_train/10670917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result testAddListenerForNSelectedProperties() {
try {
for (int i = 0; i < certainProperties.length; i++) {
certainProperties[i].addListener(0);
certainProperties[i].fireAndVerify("old value", "new value");
}
return passed();
} catch (Exception e) {
e.printStackTrace();
return failed(e.toString());
}
}
COM: <s> add listener for n different selected properties and verify that listener </s>
|
funcom_train/7735442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int calculateWidth(JComponent c) {
JMenu menuButton = (JMenu) c;
//text metrics
String text = menuButton.getText();
FontMetrics textMetrics =
menuButton.getFontMetrics(menuButton.getFont());
int textWidth = textMetrics.stringWidth(text);
//calculate the size of the menu point
int menuWidth =
textWidth + leftMargin + rightMargin + leftInset + rightInset;
return menuWidth;
}
COM: <s> calculates the preferred width for the given component </s>
|
funcom_train/3118526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setState(final Object state) {
final boolean flag = ((Boolean)state).booleanValue();
if (flag) {
((CheckBoxGroup)getParent()).addSelectedCheckBox(this);
}
else {
((CheckBoxGroup)getParent()).removeSelectedCheckBox(this);
}
}
COM: <s> sets whether this check box is checked </s>
|
funcom_train/43245119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetNOKTwoStreetAddr1() {
System.out.println("getNOKTwoStreetAddr1");
EmergencyContactDG2Object instance = new EmergencyContactDG2Object();
String expResult = "";
String result = instance.getNOKTwoStreetAddr1();
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 noktwo street addr1 method of class org </s>
|
funcom_train/13874813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addConfigPropertyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Module_configProperty_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Module_configProperty_feature", "_UI_Module_type"),
QvtoperationalPackage.Literals.MODULE__CONFIG_PROPERTY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the config property feature </s>
|
funcom_train/45558422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addProcessURIPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_OwlsProcess_processURI_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_OwlsProcess_processURI_feature", "_UI_OwlsProcess_type"),
OwlsPackage.Literals.OWLS_PROCESS__PROCESS_URI,
false,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the process uri feature </s>
|
funcom_train/42772990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLineStyle(int style) {
checkWidget();
switch (style) {
case SWT.LINE_SOLID:
case SWT.LINE_DASH:
case SWT.LINE_DASHDOT:
case SWT.LINE_DASHDOTDOT:
case SWT.LINE_DOT:
break;
default:
SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, "Line style must be one of SWT.LINE_SOLID, SWT.LINE_DASH, SWT.LINE_DASHDOT, SWT.LINE_DASHDOTO, or SWT.LINE_DOT");
}
Integer oldStyle = (Integer)getLineStyle();
this.lineStyle = style;
firePropertyChange(IWidgetProperties.LINE_STYLE, oldStyle, style);
}
COM: <s> sets the line style according to swt line styles code swt </s>
|
funcom_train/21655823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtAvance() {
if (btAvance == null) {
btAvance = new JButton();
btAvance.setBounds(new Rectangle(20, 80, 150, 30));
btAvance.setMnemonic('a');
btAvance.setText("Avance de Obra");
btAvance.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ControladorPrincipal.mostrarRegistroAvance();
}
});
}
return btAvance;
}
COM: <s> this method initializes bt avance </s>
|
funcom_train/17471341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
//System.out.println("insert-content");
JTextComponent target = getTextComponent(e);
if ( (target != null) && (e != null)) {
if ( (!target.isEditable()) || (!target.isEnabled())) {
UIManager.getLookAndFeel().provideErrorFeedback(target);
return;
}
String content = e.getActionCommand();
if (content != null) {
target.replaceSelection(content);
}
else {
UIManager.getLookAndFeel().provideErrorFeedback(target);
}
}
}
COM: <s> the operation to perform when this action is ed </s>
|
funcom_train/13568429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean moveLane(final double now) {
updateBufferCapacity();
//TODO if width>0 moveLaneToBufferRectangle(now);
// move vehicles from lane to buffer. Includes possible vehicle arrival. Which, I think, would only be triggered
// if this is the original lane.
moveLaneToBuffer(now);
// move vehicles from waitingQueue into buffer if possible
moveWaitToBuffer(now);
return this.isActive();
}
COM: <s> called from framework do everything related to link movement here </s>
|
funcom_train/14229146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void answerCall(CallId call, String address, String terminal) throws RawStateException, ResourceUnavailableException {
RawPhone phone = this.getPhone(terminal);
if (phone != null) {
if (!phone.answer(call))
throw new RawStateException(call, terminal, terminal,
javax.telephony.InvalidStateException.TERMINAL_CONNECTION_OBJECT,
javax.telephony.TerminalConnection.UNKNOWN);
} else
throw new ResourceUnavailableException(ResourceUnavailableException.ORIGINATOR_UNAVAILABLE);
}
COM: <s> tell a call to be answered on a terminal </s>
|
funcom_train/12809359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addImage(final Image image, final AffineTransform transform) throws DocumentException {
double matrix[] = new double[6];
transform.getMatrix(matrix);
addImage( image, (float)matrix[0], (float)matrix[1], (float)matrix[2],
(float)matrix[3], (float)matrix[4],(float) matrix[5], false );
}
COM: <s> adds an image with the given matrix </s>
|
funcom_train/45740883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemCommandWrite () {
if (itemCommandWrite == null) {//GEN-END:|33-getter|0|33-preInit
// write pre-init user code here
itemCommandWrite = new Command ("Write", "Go into write mode", Command.ITEM, 0);//GEN-LINE:|33-getter|1|33-postInit
// write post-init user code here
}//GEN-BEGIN:|33-getter|2|
return itemCommandWrite;
}
COM: <s> returns an initiliazed instance of item command write component </s>
|
funcom_train/35340371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTransform(Transform transform) {
if (log.isLoggable(java.util.logging.Level.FINE))
log.log(java.util.logging.Level.FINE, "Transforms.addTransform(" + transform.getURI() + ")");
Element transformElement = transform.getElement();
this._constructionElement.appendChild(transformElement);
XMLUtils.addReturnToElement(this._constructionElement);
}
COM: <s> adds a user provided transform step </s>
|
funcom_train/32306142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePhi(int nPhi) {
assert 0<=nPhi && nPhi<numPhis();
dst = (Temp[]) Util.shrink(Temp.arrayFactory, dst, nPhi);
src = (Temp[][]) Util.shrink(Temp.doubleArrayFactory, src, nPhi);
}
COM: <s> removes a given phi function from the block </s>
|
funcom_train/3884578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateCatalogType_MaxLength(String catalogType, DiagnosticChain diagnostics, Map context) {
int length = catalogType.length();
boolean result = length <= 1000;
if (!result && diagnostics != null)
reportMaxLengthViolation(ImsmdRootv1p2p1Package.Literals.CATALOG_TYPE, catalogType, length, 1000, diagnostics, context);
return result;
}
COM: <s> validates the max length constraint of em catalog type em </s>
|
funcom_train/21437466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaxRepetitions(String max) {
if( !isEndRepetition() )
return;
String new_name = "#endrep";
new_name += "_" + getMinRepetitions();
new_name += "_" + (TextUtils.isPositiveInteger(max) ?max :"?");
name = new_name;
}
COM: <s> set the upper bound of a repeat block range applies only to </s>
|
funcom_train/51197229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testgetColor() {
System.out.println("getColor");
try {
jjil.algorithm.RgbSelect2Gray instance =
new RgbSelect2Gray(RgbSelect2Gray.GREEN);
assertEquals(RgbSelect2Gray.GREEN,
instance.getColor());
} catch (Exception ex) {
ex.printStackTrace();
fail(ex.toString() + " thrown");
}
}
COM: <s> test of get color method of class jjil </s>
|
funcom_train/19971963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName(Field field) {
int val = timeFields[field.ordinal()];
if (field == Field.WDAY)
return DAY_NAMES[val];
if (field == Field.MONTH)
return MONTH_NAMES[val];
if (field == Field.WATCH)
return Watch.forOrdinal(val).name;
return String.valueOf(val);
}
COM: <s> get the name of the value of a specified date time field </s>
|
funcom_train/22001855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void verify(EODQuote quote) {
try {
quote.verify();
} catch (QuoteFormatException e) {
List<String> messages = e.getMessages();
for (Iterator<String> iterator = messages.iterator(); iterator.hasNext();) {
String message = iterator.next();
report.addWarning(fileName
+ ":"
+ Integer.toString(lineNumber)
+ ":"
+ Localization.getString("WARNING")
+ ": "
+ message);
}
}
}
COM: <s> verify the quote is valid </s>
|
funcom_train/28901024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRecursionBetweenRules() throws Exception {
program = "path(?X, ?Y) :- edge(?X, ?Y)."
+ "edge(?X, ?Y) :- path(?X, ?Y)."
+ "path(?X, ?Y) :- edge(?X, ?Z), path(?Z, ?Y)."
+ "?- path(?X, ?Y).";
parser.parse(program);
rules = createRules();
compile();
}
COM: <s> test for rules with a cyclic dependency </s>
|
funcom_train/3816305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setGUISpeakingState(final boolean speaking) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
speakButton.setEnabled(!speaking);
stopButton.setEnabled(speaking);
playButton.setEnabled(!speaking);
decoderComboBox.setEnabled(!speaking);
}
});
}
COM: <s> sets the state of the various relevant swing gui objects </s>
|
funcom_train/19182917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getFirstSelectedDataSource() {
if (table == null || table.isDisposed() || table.getSelectionCount() == 0)
return null;
TableRowCore row = (TableRowCore)table.getSelection()[0].getData("TableRow");
if (row == null)
return null;
return row.getDataSource(true);
}
COM: <s> returns the first selected data sources </s>
|
funcom_train/28755328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCreatedby(String newVal) {
if ((newVal != null && this.createdby != null && (newVal.compareTo(this.createdby) == 0)) ||
(newVal == null && this.createdby == null && createdby_is_initialized)) {
return;
}
this.createdby = newVal;
createdby_is_modified = true;
createdby_is_initialized = true;
}
COM: <s> setter method for createdby </s>
|
funcom_train/44789705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveAsShp(String fileName, Layer layer) {
try {
ShapefileWriter.write(layer.getFeatureCollection(), fileName,
layer.getCRS());
} catch (Exception e) {
ProjectFrame.logger
.error("Shapefile export failed! See stack trace below : "); //$NON-NLS-1$
e.printStackTrace();
}
}
COM: <s> saves a layer into an esri shapefile </s>
|
funcom_train/4901128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getLastModified() {
Header h = getHeader("Last-Modified");
if (h == null) return null;
try {
String value = h.getValue();
Long longValue = Long.parseLong(value);
return new Date(longValue);
} catch (Exception e) {
//silently fail. Maybe should log using FINER?
return null;
}
}
COM: <s> gets the date specified in the last modified header if any </s>
|
funcom_train/7938357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node getData(org.w3c.dom.Element node, Types repltype){
Node datanode;
switch(repltype){
case WIKIFY:
datanode = node.getElementsByTagName("Url").item(0);
//return URLDecoder.decode(datanode.getChildNodes().item(0).getNodeValue(), "UTF-8");
break;
case WIKIDEF:
datanode = node.getElementsByTagName("Description").item(0);
//return new String(datanode.getChildNodes().item(0).getNodeValue().getBytes("UTF-8"), "UTF-8");
break;
default:
return null;
}
return datanode;
}
COM: <s> returns url or description according to the type of query </s>
|
funcom_train/42710674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double spread(SpatialStatistic goalSpatialStatistic) {
Proportion goal = (Proportion) goalSpatialStatistic;
double value = 0.0;
for( int i = numInRegion.length - 1; i >= 0; i--) {
double gProportion = goal.numInRegion[i] / goal.totInRegion[i];
double gNum = gProportion * this.totInRegion[i];
double gDif = (numInRegion[ i] - gNum);
value += gDif * gDif;
}
return value;
}
COM: <s> compute difference between accumulated statistics in this object and the </s>
|
funcom_train/36550585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteScheduleData(long taskId, String time, int flag, int important) {
mDb.execSQL("DELETE FROM schedule WHERE task_id = '" + taskId
+ "' and time = '" + time + "' and important = '" + important
+ "' and flag = '" + flag + "'");
}
COM: <s> delete the data in schedule table which matches all parameters passed </s>
|
funcom_train/5734454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
if(tempFiles != null && tempFiles.size() > 0) {
Iterator fileIter = tempFiles.iterator();
while(fileIter.hasNext()) {
try {
File file = (File)fileIter.next();
file.delete();
} catch(Exception e) {
// Ignore
}
}
}
}
COM: <s> deletes all code file code s in the internal cache </s>
|
funcom_train/14268014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uploadFile(File apath) {
FileInputStream in;
int length = (int)apath.length();
byte[] content = new byte[length];
try {
writeHeader(length, getMimeType(apath.toString()));
in = new FileInputStream(apath);
in.read(content);
in.close();
_ostream.write(content);
} catch( IOException e ) {
_inErrorState =true;
}
try {
_ostream.close();
} catch( IOException e ) {
}
}
COM: <s> read in and return a file </s>
|
funcom_train/50585905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void verify(String command) throws RuntimeException {
if (!((command.equalsIgnoreCase(START))
|| (command.equalsIgnoreCase(TEST_STEP))
|| (command.equalsIgnoreCase(USER_INTERACTION))
|| (command.equalsIgnoreCase(STOP))
|| (command.equalsIgnoreCase(OFF))
|| (command.equalsIgnoreCase(CommandLanguage.RESET_SERVER)))) {
throw new IllegalArgumentException(
"illegal argument: only use start," + " ts or ui, stop or off");
}
}
COM: <s> verify if the command will be identified by recorder and filtermanager </s>
|
funcom_train/32759628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deadPoolCheck(SmfPvMonitor.IAction ifcAct, SmfPvMonitor monSrc) {
if (!this.bolActive) {
System.err.println("Active monitor in dead pool for device: "
+ monSrc.getDevice()
+ " handle: "
+ monSrc.getChannelHandle());
System.err.println(" shutting it down");
monSrc.clear();
}
}
COM: <s> the dead pool checking method </s>
|
funcom_train/8014384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString() {
if (_dreamWeaverConv && !_noConv) {
_noConv = false;
return TagWriter.dreamWeaverConv(_prefix, _tagName, _origTag, new String(_cb, 0, _nextChar));
} else {
_noConv = false;
return new String(_cb, 0, _nextChar);
}
}
COM: <s> return the value of the body jsp writer as a string </s>
|
funcom_train/26278554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String extractNameFromPath(String i_URL) {
int indexOfName = i_URL.lastIndexOf("/");
if (indexOfName == -1) {
indexOfName = i_URL.lastIndexOf("\\");
}
return i_URL.substring(indexOfName+1);
}
COM: <s> extracts a file name from a path url </s>
|
funcom_train/12188867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSpacesOnLeftSide() throws ExpressionException {
final Function function = new NormalizeSpaceFunction();
Value result = function.invoke(expressionContextMock,
new Value[]{factory.createStringValue(" abc")});
assertTrue(result instanceof StringValue);
assertEquals("abc", ((StringValue) result).asJavaString());
}
COM: <s> tests if function works correctly for strings with spaces on left side </s>
|
funcom_train/28127412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
AnnualHoliday duplicate = null;
try {
duplicate = (AnnualHoliday)super.clone();
}
catch (CloneNotSupportedException e) {
e.printStackTrace();
}
try {
duplicate.rule = (AnnualDateRule)rule.clone();
}
catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return duplicate;
}
COM: <s> creates a clone of the annual holiday </s>
|
funcom_train/31909506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkInterrupted() {
// don't use isInterrupted() since that won't clear the
// interrupted state of this thread. If that isn't cleared
// then the next function that is declaired to throw
// InterruptedException will do so, this in particular
// effects class loading.
if (!Thread.interrupted())
return false;
fireCancelledEvent(renderer.getOffScreen());
return true;
}
COM: <s> checks for this thread to be interrupted </s>
|
funcom_train/1869000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceLDAPAttribute() throws GamaLDAPException {
try {
LDAPModification ldapModification = new LDAPModification(
LDAPModification.REPLACE, m_ldapAttr);
LDAPConnection ldapConnection = GamaLDAPConnectionManager
.getConnection();
ldapConnection.modify(m_dn, ldapModification);
} catch (LDAPException e) {
GamaLDAPException gamaLDAPException = GamaLDAPExceptionFactory
.getGamaLDAPException(e);
throw gamaLDAPException;
} finally {
GamaLDAPConnectionManager.disconnect();
}
}
COM: <s> replaces all existing values of the given attribute with the new value </s>
|
funcom_train/8034769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int send(String msgBody, int serialNumber) throws SocketException {
boolean reconnect = true;
String data = null;
if (serialNumber < 0) {
serialNumber = this.serialNumber;
this.serialNumber += 1;
if (this.serialNumber == Integer.MAX_VALUE)
this.serialNumber = 1;
}
msg.setBody(msgBody);
msg.setSerialNumber(serialNumber);
data = msg.buildMsgBuf();
while (reconnect) {
try {
socketOutputWriter.write(data);
socketOutputWriter.flush();
reconnect = false;
} catch(IOException ioe) {
reconnect();
}
}
return serialNumber;
}
COM: <s> send message through socket and reconnect when it is necessary </s>
|
funcom_train/14245965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLeaf(Object node) {
int nSubs = _subTreeModels.size();
for (int i = 0; i < nSubs; i++) {
TreeModel tm = (TreeModel) _subTreeModels.elementAt(i);
if (!tm.isLeaf(node)) return false;
}
return true;
}
COM: <s> returns true if i node i is a leaf </s>
|
funcom_train/8805666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRightOperand(ASExpression rightOperand) {
if (rightOperand == null) {
throw new IllegalArgumentException();
}
// an Assignment may occur inside a Expression - must check cycles
ASTNode oldChild = this.rightOperand;
preReplaceChild(oldChild, rightOperand, RIGHT_OPERAND_PROPERTY);
this.rightOperand = rightOperand;
postReplaceChild(oldChild, rightOperand, RIGHT_OPERAND_PROPERTY);
}
COM: <s> sets the right operand </s>
|
funcom_train/25368593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void check() {
super.check();
if (m_Classifier == null)
throw new IllegalStateException("No classifier set!");
if (m_ClassIndex == -1)
throw new IllegalStateException("No class index set!");
if (m_Evaluation == null)
throw new IllegalStateException("No evaluation set");
}
COM: <s> checks whether classifier class index and evaluation are provided </s>
|
funcom_train/8685659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String modifyName(String name) {
if (!caseSensitive) {
name = name.toLowerCase();
}
if (handleDirSep) {
if (name.indexOf('\\') != -1) {
name = name.replace('\\', '/');
}
}
return name;
}
COM: <s> modify string based on dir char mapping and case sensitivity </s>
|
funcom_train/49798433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getContext(String[] lines, int lineNum) {
StringBuffer buf = new StringBuffer();
for (int i = lineNum - 4; i < lineNum + 4; i++) {
if (i < 0 || i >= lines.length)
continue;
if (i == lineNum - 1)
buf.append(" >> ");
buf.append(lines[i]);
buf.append("\n");
}
return buf.toString();
}
COM: <s> get the string context at a given position </s>
|
funcom_train/12908584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void editHeader () {
if (editHeaderWindow != null) {
editHeaderWindow.show ();
editHeaderWindow.toFront ();
}
else {
editHeaderWindow = new EditHeaderWindow (this, header);
editHeaderWindow.setLocation (130, 130);
editHeaderWindow.show ();
}
}
COM: <s> edits the archive header </s>
|
funcom_train/37508151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenuItem getMenuViewOptions() {
if (m_menuViewOptions == null) {
m_menuViewOptions = new JMenuItem("View options", 'o');
m_menuViewOptions.setActionCommand(ACTION_VIEW_OPTIONS);
}
return m_menuViewOptions;
}
COM: <s> returns the view options item </s>
|
funcom_train/2885364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateClusterLimit() throws SmartFrogResolutionException, RemoteException {
if (clusterLimit < 0) {
throw new SmartFrogResolutionException(new Reference(ATTR_CLUSTER_LIMIT),
sfCompleteName(),
"Manual Clusters need a cluster limit >= 0, not " + clusterLimit,
clusterLimit);
}
}
COM: <s> check that the cluster limit is within range </s>
|
funcom_train/9960406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateUser(User user) throws BlogunityException {
try {
update(user);
} catch (HibernateException e) {
log.error("updateUser(User)", e);
throw new BlogunityException(I18NStatusFactory.create(
I18N.ERRORS.UPDATE, "User", e));
}
}
COM: <s> updates database entry equals to the given user instance </s>
|
funcom_train/2302241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public State getStateMappedToGroup(State[] group, Automaton minDfa) {
State[] states = minDfa.getStates();
for (int k = 0; k < states.length; k++) {
State[] tempGroup = getGroupMappedToState(states[k]);
if (tempGroup == group) return states[k];
}
return null;
}
COM: <s> returns the state from code min dfa code that is mapped to </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.