__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/14396254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleTokenError( int aErrorCode, String aErrorMessage ) throws ParseException {
String errorMessage = "unexpected token: \""+theTokenizer.getToken()+
"\", read token type: "+theTokenizer.getTokenTypeString()+
(aErrorMessage != null ? ", " + aErrorMessage : "");
handleError( aErrorCode, errorMessage );
}
COM: <s> handles unexpected token error during parsing this method throws the exception </s>
|
funcom_train/28473739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getLocusWeightPanel() {
if (locusWeightPanel == null) {
locusWeightLabel = new JLabel();
locusWeightLabel.setText("Weight:");
locusWeightLabel.setPreferredSize(new Dimension(180, 16));
locusWeightPanel = new JPanel();
locusWeightPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
locusWeightPanel.add(locusWeightLabel, null);
locusWeightPanel.add(getLocusWeightTextField(), null);
}
return locusWeightPanel;
}
COM: <s> this method initializes locus weight panel </s>
|
funcom_train/9666833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLastInsertID() {
int id = -1;
try {
ResultSet rs = executeQuery("SELECT LAST_INSERT_ID()");
rs.next();
id = (rs.getInt(1));
}
catch (SQLException sqlex) {
sqlex.printStackTrace();
}
return id;
}
COM: <s> retrieves the id of the last element to be inserted into the database </s>
|
funcom_train/29769010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doTestGetInvalidProperty(Customer customer) {
IVOW uow = VOWTest.createVOW();
uow.register(customer);
VRuntimeException wantedException = null;
try {
uow.getProperty(customer, "xxxxlastName");
} catch (ReflectionException e) {
wantedException = e;
}
assertTrue("Exception should have occured now because we read an invalid property.", wantedException != null);
}
COM: <s> tests if an invalid property name will correctly throw an exception </s>
|
funcom_train/10764951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void debuggingDelay() {
// Do a delay for debugging purposes.
if (_delayMean != 0)
try {
long delay = randomExp(_delayMean);
// distribution
// with mean
// _delayMean
__log.warn("Debugging delay has been activated; delaying transaction for " + delay + "ms.");
Thread.sleep(delay);
} catch (InterruptedException e) {
; // ignore
}
}
COM: <s> block the thread for random amount of time </s>
|
funcom_train/1124424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isImmigrationComplete() {
return (_immigrantPopulation.getForagersAlive() ==0 && _immigrantPopulation.getForagersRemaining() ==0) ||
(_eggCounter.getTotalEggs()>=_pattern.getEggLimit() && _immigrantPopulation.getForagersAlive() == 0);
}
COM: <s> with the egg limit westill cant complete until all the foragers are dead </s>
|
funcom_train/33371672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createComposite() {
RowLayout rowLayout = new RowLayout();
rowLayout.fill = true;
rowLayout.pack = true;
rowLayout.justify = false;
rowLayout.wrap = false;
rowLayout.type = org.eclipse.swt.SWT.VERTICAL;
composite = new Composite(sShell, SWT.NONE);
composite.setLayout(rowLayout);
composite.setSize(sShell.getSize());
createToolBar();
createSashForm();
createCombo();
createCTabFolder();
text = new Text(composite, SWT.BORDER);
}
COM: <s> this method initializes composite </s>
|
funcom_train/27822150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModel(TreeTableModel model) {
if (m_treeTableModel!=null)
m_treeTableModel.removeTreeModelListener(m_treeModelListener);
m_treeTableModel=model;
if (m_treeTableModel!=null)
m_treeTableModel.addTreeModelListener(m_treeModelListener);
updateLayoutCache();
fireTableStructureChanged();
}
COM: <s> sets tree table model </s>
|
funcom_train/19287994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUserID(String userID) {
if (!canSetUserID())
throw new IllegalAccessError(
"Programmer error: you must call User.canSetUserID() before calling setUserID() to check whether the userID is modifiable. In this case, this User cannot have it's userID changed.");
this.userID.setValue(userID);
}
COM: <s> right now this should never be changed </s>
|
funcom_train/3609085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void editTime() {
int selectedIndex = timesList.getSelectedIndex();
TimeEntry thisTime = (TimeEntry) timesData.elementAt(selectedIndex);
new TimeEntryUI(this, thisTime);
TimeEntry previousTime = null;
if (selectedIndex > 0) {
previousTime = (TimeEntry) timesData.elementAt(selectedIndex - 1);
}
timesList.remove(selectedIndex);
timesList.add(timeFormatter.format(previousTime, thisTime), selectedIndex);
}
COM: <s> edit an individual time entry called on double click of that </s>
|
funcom_train/32905764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSize() {
synchronized(byteCounter) {
byteCounter.reset();
synchronized(dataCounter) {
try {
write(dataCounter);
} catch (IOException ex) {
throw new RuntimeException("ByteCounter should never " +
" throw an IOException");
}
}
return byteCounter.size();
}
}
COM: <s> returns the size in bytes of this message </s>
|
funcom_train/41266257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Dlluser entity) {
EntityManagerHelper.log("saving Dlluser instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved dlluser entity </s>
|
funcom_train/43934529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyItemPlay(IPlayItem item, boolean isLive) {
IStreamAwareScopeHandler handler = getStreamAwareHandler();
if (handler != null) {
try {
handler.streamPlaylistItemPlay(this, item, isLive);
} catch (Throwable t) {
log.error("error notify streamPlaylistItemPlay", t);
}
}
}
COM: <s> notifies subscribers on item playback </s>
|
funcom_train/50066896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void endScope(int adr) {
defined.excl(adr);
if (adr < lvar.length && lvar[adr] != null) {
LocalVar v = lvar[adr];
lvar[adr] = null;
if (v.start_pc != Character.MAX_VALUE) {
char length = (char) (curPc() - v.start_pc);
if (length < Character.MAX_VALUE) {
v.length = length;
putVar(v);
}
}
}
}
COM: <s> end the scope of a variable </s>
|
funcom_train/24000492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSequenceType() {
OclType result = OclTypeRegistry.getSequenceType(OclTypeRegistry.OclBooleanType);
assertTrue(result.isCollectionType());
assertEquals(OclTypeRegistry.OclBooleanType,((OclCollectionBase)result).getCollectionType());
assertEquals("Sequence< Boolean >",result.getPathName());
}
COM: <s> test of get sequence type method of class ocl type registry </s>
|
funcom_train/15516318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelection(Calendar date) {
Assert.isLegal(date != null, "Argument \"date\" cannot be null"); //$NON-NLS-1$
selectionStart = (Calendar) date.clone();
selectionStart.set(Calendar.DAY_OF_WEEK, selectionStart
.getFirstDayOfWeek());
selectionEnd = (Calendar) selectionStart.clone();
selectionEnd.add(Calendar.DATE, 7);
redraw();
notifyListeners(SWT.Selection, new Event());
}
COM: <s> sets controls selection from the given date </s>
|
funcom_train/38557357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startCAttributeList() {
// remove any C_Attributes associated with this bit of content
if (this.xmlAttributes().count() > 0) {
Enumeration attributeEnumerator =
this.xmlAttributes().objectEnumerator();
while (attributeEnumerator.hasMoreElements()) {
C_Attribute attr =
(C_Attribute) attributeEnumerator.nextElement();
this.removeObjectFromBothSidesOfRelationshipWithKey(
attr,
"xmlAttributes");
attr.removeObjectFromBothSidesOfRelationshipWithKey(
this,
"element");
}
}
}
COM: <s> convenience method used to ensure that attribute dictionaries are cleared </s>
|
funcom_train/12184240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAllCharsReplacement() throws Exception {
final String str = "xxxxxxxxxx";
final String search = "x";
final String replace = "y";
final String expected = "yyyyyyyyyy";
assertTrue("String replacement failed",
doReplaceAllTest(str, search, replace, expected));
}
COM: <s> tests that a multi character string consisting of the same character </s>
|
funcom_train/48024321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Writer write(Writer writer) throws JSONException {
try {
boolean b = false;
Enumeration keys = keys();
writer.write('{');
while (keys.hasMoreElements()) {
if (b) {
writer.write(',');
}
Object k = keys.nextElement();
writer.write(quote(k.toString()));
writer.write(':');
Object v = myHashMap.get(k);
if (v instanceof JSONObject) {
((JSONObject) v).write(writer);
} else if (v instanceof JSONArray) {
((JSONArray) v).write(writer);
} else {
writer.write(valueToString(v));
}
b = true;
}
writer.write('}');
return writer;
} catch (IOException e) {
throw new JSONException(e);
}
}
COM: <s> write the contents of the jsonobject as json text to a writer </s>
|
funcom_train/35201907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() throws ColorSpaceException {
if (ncomps != 1 && ncomps != 3) {
String msg = "SYccColorSpaceMapper: ycc transformation _not_ applied to " +
ncomps + " component image";
FacilityManager.getMsgLogger().printmsg(MsgLogger.ERROR,msg);
throw new ColorSpaceException(msg); }}
COM: <s> general utility used by ctors </s>
|
funcom_train/18065189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*private JButton getModConn() {
if (modConn == null) {
modConn = new JButton();
modConn.setName("ModConnection");
modConn.setToolTipText("ModCon");
modConn.addActionListener(listener);
ImageIcon immag = new ImageIcon ("resources/images/modifyconnectionIcon.png");
this.iconize(modConn,immag,defaultIconSize,defaultIconSize);
}
return modConn;
}*/
COM: <s> this method initializes mod conn button </s>
|
funcom_train/38817510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addStation(StationInfo si) {
if (si != null) {
if (!model_.hasURL(si.url)) {
model_.addStation(si);
} else {
//StationInfo si2 = model_.getStationInfo(si.url);
//showWarning(locale.getString(Constants.STR_Station_in_playlist)
// + si2.name, currDisplayable_);
}
}
}
COM: <s> insert new station information into playlist </s>
|
funcom_train/38480967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSetterMethodName() {
String setterMethodName = modelProperty.getSetterMethodName();
if (setterMethodName == null) {
setterMethodName = getName();
if (setterMethodName != null) {
setterMethodName = "set" + setterMethodName;
}
}
return setterMethodName;
}
COM: <s> get setter method name </s>
|
funcom_train/8971460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void acos() {
boolean negative = (this.sign!=0);
abs();
{ tmp1.mantissa = this.mantissa; tmp1.exponent = this.exponent; tmp1.sign = this.sign; };
sqr();
neg();
add(ONE);
sqrt();
div(tmp1);
atan();
if (negative) {
neg();
add(PI);
}
}
COM: <s> calculates the trigonometric arc cosine of this code real code </s>
|
funcom_train/9139530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print() {
int i = 0; //a counter
try {
while (readNextEntry() != -1) {
System.out.println(
""
//+ (i * DocumentIndex.entryLength)
//+ ", "
+ docid
+ ", "
+ docLength
+ ", "
+ docno
+ ", "
+ endOffset
+ ", "
+ endBitOffset);
i++;
}
} catch (IOException ioe) {
logger.error(
"Input/Output exception while reading the document " +
"index input stream. Stack trace follows.", ioe);
}
}
COM: <s> prints out to the standard error stream </s>
|
funcom_train/18104948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToDeleteNotifyURLList(String url) {
Vector deleteNotifyList;
if (url == null) {
return;
}
// NOTE: The spec only guarantees that the http:// protocol be
// supported. We do not do any checking of the protocol.
deleteNotifyList = getDeleteNotifyURLList();
deleteNotifyList.addElement(url);
saveDeleteNotifyURLList(deleteNotifyList);
}
COM: <s> queues providers url to send a delete notification message </s>
|
funcom_train/10687199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndRule(int month, int dayOfMonth, int time) {
endMonth = month;
endDay = dayOfMonth;
endDayOfWeek = 0; // Initialize this value for hasSameRules()
endTime = time;
setEndMode();
if (isSimple) {
((com.ibm.icu.util.SimpleTimeZone) icuTZ).setEndRule(month,
dayOfMonth, time);
}
}
COM: <s> sets the rule which specifies the end of daylight savings time </s>
|
funcom_train/25565693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireValueChange() {
if (valueChangeListeners != null) {
final Object[] l = valueChangeListeners.toArray();
final Property.ValueChangeEvent event = new ValueChangeEvent(this);
for (int i = 0; i < l.length; i++) {
((Property.ValueChangeListener) l[i]).valueChange(event);
}
}
}
COM: <s> sends a value change event to all registered listeners </s>
|
funcom_train/43357918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeUncheckedField(String field) {
if ((uncheckedFields != null) && uncheckedFields.contains(field)) {
if (uncheckedFields.size() == 1) {
uncheckedFields = null;
fieldsAreSharedWithParent = false;
return true;
}
if (fieldsAreSharedWithParent) {
uncheckedFields = new HashSet<String>(uncheckedFields);
fieldsAreSharedWithParent = false;
uncheckedFields.remove(field);
return true;
} else {
uncheckedFields.remove(field);
return true;
}
}
return false;
}
COM: <s> return the field from the set of unchecked fields </s>
|
funcom_train/23710543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void localTranspose() {
double[][] data = new double[cols()][rows()];
for (int i=0; i < rows(); i++)
for (int j=0; j < cols(); j++)
data[j][i]=mData[i][j];
int t = rows();
numRows=cols();
numCols=t;
mData=data;
}
COM: <s> transposes the matrix locally </s>
|
funcom_train/7589290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double distance(double [] a, double [] b) {
double distance = 0.0;
for (int i = 0; i < a.length; i++) {
distance += Math.pow(a[i]-b[i],2.0);
}
return Math.sqrt(distance);
} // distance
COM: <s> this method returns the distance taken the euclidean distance between </s>
|
funcom_train/2321491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object send(String url) throws Exception {
if (url == null) url = "///main";
else if (url.startsWith("//") && url.endsWith("/")) url += "main";
return invoke(getItem(url), "send", this);
}
COM: <s> this method sends its remote reference to another item either from a </s>
|
funcom_train/43479331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open(String filename) {
// sanity check
if (isOpen()){
System.err.println("log file is allready open: " + filename);
return ;
}
try {
logfile = new RandomAccessFile(filename, "rw");
} catch (Exception e) {
System.err.println("can't open: " + filename);
logfile = null;
}
}
COM: <s> opens the specified logfile with read write access </s>
|
funcom_train/1382836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnSalvaCliente() {
if (btnSalvaCliente == null) {
try {
btnSalvaCliente = new JButton();
btnSalvaCliente.setText("Salva");
btnSalvaCliente.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
inserisciCliente();
}
});
} catch (java.lang.Throwable e) {
// TODO: Something
}
}
return btnSalvaCliente;
}
COM: <s> this method initializes btn salva cliente </s>
|
funcom_train/47023454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdAddOnline() {
if (cmdAddOnline == null) {//GEN-END:|261-getter|0|261-preInit
// write pre-init user code here
cmdAddOnline = new Command(getLocalizedString("adddictonline"), Command.OK, 7);//GEN-LINE:|261-getter|1|261-postInit
// write post-init user code here
}//GEN-BEGIN:|261-getter|2|
return cmdAddOnline;
}
COM: <s> returns an initiliazed instance of cmd add online component </s>
|
funcom_train/25515651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint( Graphics g ) {
// draw image
g.drawImage( frame, 0, 0, null );
// draw squares
g.setColor( Color.RED );
for( Rectangle f : faces ){
g.drawRect( f.x, f.y, f.width, f.height );
}
}
COM: <s> draw video frame and each detected faces area </s>
|
funcom_train/20914031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object createValue(Class<?> type) {
for (ValueFactory factory: factories) {
if( factory.handlesType(type)) {
return factory.createValue(type);
}
}
if( type.isInterface() ) {
throw new IllegalArgumentException("No factory registered for " + type);
}
else {
return createObject(type);
}
}
COM: <s> create a new value instance for a particular class </s>
|
funcom_train/17724453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void configureInteger(UIComponent component, String name, String value) {
if (value == null) {
return;
}
if (isValueReference(value)) {
ValueBinding vb =
getFacesContext().getApplication().createValueBinding(value);
component.setValueBinding(name, vb);
} else {
component.getAttributes().put(name, Integer.valueOf(value));
}
}
COM: <s> p configure a component property of type code int code </s>
|
funcom_train/50776165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAvailableScripts() {
RecursiveFileIterator i = new RecursiveFileIterator(scriptpath);
List list = new ArrayList();
while (i.hasNext()) {
i.next();
String pkg = i.getRelativePath().replaceAll("\\|/",".");
String name = i.getName();
if (name.endsWith(".ij")) {
name = name.substring(0, name.length()-3);
if (pkg.length()!=0) list.add(pkg+"."+name); else list.add(name);
}
}
return list;
}
COM: <s> returns a list of strings with the available script signatures </s>
|
funcom_train/35443556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillAudioFormats(AudioFormat[] audioFormats) {
for(int n=0;n<audioFormats.length;n++)
audioFormats[n] = new AudioFormat(JJackSystem.getSampleRate(),8+(8*(n%4)),((n/8)+1),true,((n%8)/4) == 0 ? false : true);
}
COM: <s> fill audio formats array with available audio formats </s>
|
funcom_train/2585281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDateConstructor2() {
TimeZone zone = TimeZone.getTimeZone("Europe/Istanbul");
Quarter q1 = new Quarter(new Date(1017608399999L), zone);
Quarter q2 = new Quarter(new Date(1017608400000L), zone);
assertEquals(1, q1.getQuarter());
assertEquals(1017608399999L, q1.getLastMillisecond(zone));
assertEquals(2, q2.getQuarter());
assertEquals(1017608400000L, q2.getFirstMillisecond(zone));
}
COM: <s> in istanbul the end of q1 2002 is java </s>
|
funcom_train/38484770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMetaData(MetaData metaData) throws NamingException, ServiceLocatorException, CreateException, FinderException {
MetaDataEntityLocalHome metaDataEntityLocalHome =
(MetaDataEntityLocalHome) ServiceLocator.getInstance().getLocalHome(MetaDataEntityLocalHome.JNDI_NAME, MetaDataEntityLocalHome.class);
MetaDataEntityLocal metaDataEntityLocal = metaDataEntityLocalHome.create(metaData);
this.setMetaData(metaDataEntityLocal);
}
COM: <s> sets meta data </s>
|
funcom_train/49265649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPort() throws HttpException {
int Port = getTarget().getPort();
if (Port == -1) {
// check for "CONNECT" command
if (getCommand().equalsIgnoreCase(HttpConstants.ConnectCommand)) {
Port = HttpConstants.HTTPS_PORT;
} else {
Port = getTarget().getDefaultPort();
}
}
return Port;
}
COM: <s> read requests port number </s>
|
funcom_train/8898445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(){
mFrag.removeOrdinaryVariable(this);
type.removeUserObject(this);
for(Node node: isOVariableOfList){
if(node instanceof ResidentNode){
((ResidentNode) node).removeArgument(this);
}else{
if(node instanceof InputNode){
}
}
}
for(ResidentNodePointer pointer: this.isArgumentOfList){
pointer.removeOrdinaryVariable(this);
}
}
COM: <s> delete the ordinary variable removing it from the respective mfrag </s>
|
funcom_train/35772743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProducto(Producto producto) {
old = this.producto;
this.producto = producto;
jTextField1.setText(String.valueOf(producto.getIDproducto()));
jTextField2.setText(producto.getConcepto());
jTextField3.setText(String.valueOf(producto.getPrecio()));
propertyChangeSupport.firePropertyChange("producto", old, producto);
}
COM: <s> set the value of producto </s>
|
funcom_train/13253660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getBoolVariable(String name) {
DLiteral var = parser.getVariable(name);
if (var == null) {
throw new RuntimeException("Variable \""+ name +"\" not found");
}
if (var instanceof DBoolean) {
return ((DBoolean)var).asBool();
}
return DBoolean.get(var.asString()).asBool();
}
COM: <s> return a boolean variable value from the script environment </s>
|
funcom_train/23941011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFindKey() throws ConstantsKeyUnknowException {
ConstantsKeys[] keys = ConstantsKeys.values();
int i = ((int) Math.random() * keys.length) % keys.length;
// select a key randomly
ConstantsKeys key = keys[i];
// verify that we can re-find it
assertEquals("Can't find any key with string key", key, Constants
.getInstance().indexOf(Constants.getInstance().getKey(key)));
}
COM: <s> verify that index of is right the opposite of get key </s>
|
funcom_train/15861438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getJTabbedPane() {
if (jTabbedPane == null) {
jTabbedPane = new JTabbedPane();
jTabbedPane.addTab("VNC configurations", null, getJPanel(), null);
jTabbedPane.addTab("Programs", null, getJPanel4(), null);
jTabbedPane.addTab("Advanced", null, getJPanel3(), null);
}
return jTabbedPane;
}
COM: <s> this method initializes j tabbed pane </s>
|
funcom_train/16175963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getValueAt(int x, int y) {
rangeCheck(x, y);
Object o = matrix.get(x, y);
if (o instanceof Number) {
Number n = (Number) o;
return n.doubleValue();
} else {
throw new IllegalArgumentException("Object cannot be converted to a long");
}
}
COM: <s> gets the double value at x y if possible </s>
|
funcom_train/36470518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateTemplate(Template t) {
ContentValues newValues = getTemplateValues(t);
if(newValues == null) {
return false;
}
String idAsString=(new Long(t.getID())).toString();
return mDb.update(TABLE_TEMPLATE, newValues, KEY_TEMPLATE_ID+"=?", new String[] { idAsString }) > 0;
}
COM: <s> update a template based on the current values in the object </s>
|
funcom_train/12811497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGState(final PdfGState gstate) {
PdfObject obj[] = writer.addSimpleExtGState(gstate);
PageResources prs = getPageResources();
PdfName name = prs.addExtGState((PdfName)obj[0], (PdfIndirectReference)obj[1]);
content.append(name.getBytes()).append(" gs").append_i(separator);
}
COM: <s> sets the graphic state </s>
|
funcom_train/22400829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addGeometryObserver(NodeGeometryObserver o) {
WeakReference<NodeGeometryObserver> wr = new WeakReference<NodeGeometryObserver>(
o);
if (geometryObservers == null) { // lazy instantiation avoids needing init
// method
geometryObservers = new Vector<WeakReference<NodeGeometryObserver>>();
}
geometryObservers.add(wr);
}
COM: <s> by implementing the node geometry observer interface an edge view can register </s>
|
funcom_train/45539830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initDefaultVM() {
IVMInstall realDefault= JSCRuntime.getDefaultVMInstall();
if (realDefault != null) {
IVMInstall[] vms= fJREBlock.getJREs();
for (int i = 0; i < vms.length; i++) {
IVMInstall fakeVM= vms[i];
if (fakeVM.equals(realDefault)) {
verifyDefaultVM(fakeVM);
break;
}
}
}
}
COM: <s> find verify the default vm </s>
|
funcom_train/18014622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateRepositoryMode(boolean aRepositoryMode) {
System.out.println("updateRepositoryMode(" + aRepositoryMode + ")");
MIExit.setText(aRepositoryMode ? STRING_EXIT_TO_REPOSITORY : STRING_EXIT_JSTELLA);
//TODO: updateRepositoryMode doesn't currently work
}
COM: <s> this alters the appearance of the player depending on whether or not it </s>
|
funcom_train/11659073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void objectData(Object object) throws SAXException {
if(contentHandler instanceof XMLOutput)
((XMLOutput) contentHandler).objectData(object);
else {
if(object!=null) {
String output=object.toString();
write(output);
} else {
// we could have a "configurable null-toString"...
write("null");
}
}
}
COM: <s> pass data through the pipline </s>
|
funcom_train/12759265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean privateIsPropertyDeclared(String key) {
getProperties().containsKey(key);
if (getProperties().containsKey(key)) {
// Key exists
return true;
} else if (getParentCatalog() != null) {
// Key does not exist, Check ParentCatalog
return getParentCatalog().privateIsPropertyDeclared(key);
} else {
// Key does not exist and their is no ParentCatalog
return false;
}
}
COM: <s> return true if the property is set at all including set to null </s>
|
funcom_train/13493721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(String s) {
if (reactive) {
if ((!s.equals("yes")) && (!s.equals("no")) &&(s.indexOf("@@")==-1) && (console)) {
super.write(s);
}
} else super.write(s); // show all outputs
}
COM: <s> write only results other than yes or no </s>
|
funcom_train/12155763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPatientName(String patientName) {
if (logger.isDebugEnabled()) {
logger.debug("Entering setPatientName(String patientName).");
logger.debug("patientName = " + (patientName != null ? "\"" + patientName + "\"" : null) + ".");
}
this.patientName = patientName;
logger.debug("Exiting setPatientName(String patientName");
}
COM: <s> sets the patients name </s>
|
funcom_train/51099583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancelTableEditing() {
int row = pathTable.getEditingRow();
if (row < 0) {
return;
}
int column = pathTable.getEditingColumn();
if (column < 0) {
return;
}
TableCellEditor editor = pathTable.getCellEditor(row, column);
if (editor != null) {
editor.cancelCellEditing();
}
}
COM: <s> cancels any editing that might be going on in the path table </s>
|
funcom_train/31930843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean confirmAbandon() {
boolean abandon = true;
if (propertiesHaveChanged()) {
abandon = (JOptionPane
.showConfirmDialog(
this,
"Some "
+ resourceWord()
+ " have been modified.\nDo you really want to abandon your changes?",
"Changes Pending!", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION);
}
return abandon;
}
COM: <s> return code true code if the user wants to abandon any changes </s>
|
funcom_train/40944925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getErrorLevel() {
int level = Integer.MIN_VALUE;
for (int i = 0; i < causes.length; i++) {
final int causeLevel = (causes[i] instanceof ErrorMessage) ? ((ErrorMessage) causes[i])
.getErrorLevel()
: ErrorMessage.ERROR;
if (causeLevel > level) {
level = causeLevel;
}
}
return level == Integer.MIN_VALUE ? ErrorMessage.ERROR : level;
}
COM: <s> gets the error level of this buffered source exception </s>
|
funcom_train/21699713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor getSleep(final String rowId, final String[] columns) {
final String selection = "rowid = ?";
final String[] selectionArgs = new String[] { rowId };
return query(selection, selectionArgs, columns);
/*
* This builds a query that looks like: SELECT <columns> FROM <table>
* WHERE rowid = <rowId>
*/
}
COM: <s> returns a cursor positioned at the record specified by row id </s>
|
funcom_train/6475626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setConfigStyle(MainGrid gridStyle) {
gridStyle.setWidthGridCell(cellWidth);
gridStyle.setHeightGridCell(cellHeight);
gridStyle.setBackgroundColour0(gridBackgroundColour0);
gridStyle.setBackgroundColour1(gridBackgroundColour1);
gridStyle.setStrokeWidth(gridLineStrength);
gridStyle.setStrokeColour(gridStrokeColour);
gridStyle.setFontFamily(gridFontFamily);
gridStyle.setFontSize(gridFontSize);
}
COM: <s> set the style read from config file </s>
|
funcom_train/35846387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemStateChanged(ItemEvent e) {
if (e.getSource() instanceof PerspectiveComboBox) {
rules = ((ExplorerPerspective) e.getItem()).getList();
} else { // it is the combo for "order"
order = (Comparator) e.getItem();
}
structureChanged();
// TODO: temporary - let tree expand implicitly - tfm
tree.expandPath(tree.getPathForRow(1));
}
COM: <s> updates the explorer for new perspectives orderings </s>
|
funcom_train/20818291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReferenceDiet(long codigo, String descricao, JTable nutrientes) throws Exception {
txtId.setText(Long.toString(codigo));
txtDescription.setText(descricao);
enableFieldsEditMode(true);
ReferenceDietService serv = new ReferenceDietService();
serv.findById(Long.valueOf(codigo));
createTable(nutrientes);
formStatus = FormStatus.EDIT;
pack();
}
COM: <s> preenche os campos do formulario </s>
|
funcom_train/7508081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDateHeader(String name, long date) {
try {
String safeName = ESAPI.validator().getValidInput("safeSetDateHeader", name, "HTTPHeaderName", 20, false);
getHttpServletResponse().setDateHeader(safeName, date);
} catch (ValidationException e) {
logger.warning(Logger.SECURITY_FAILURE, "Attempt to set invalid date header name denied", e);
}
}
COM: <s> add a date header to the response after ensuring that there are no </s>
|
funcom_train/1481621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (!(o instanceof MultiPhraseQuery)) return false;
MultiPhraseQuery other = (MultiPhraseQuery)o;
return this.getBoost() == other.getBoost()
&& this.slop == other.slop
&& this.termArrays.equals(other.termArrays)
&& this.positions.equals(other.positions);
}
COM: <s> returns true if code o code is equal to this </s>
|
funcom_train/47459894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
UIManager.put("swing.boldMetal", Boolean.FALSE);
JFrame frame = new JFrame("Musquash");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
MainWindow main_window = new MainWindow();
//Ajoute le menu
frame.setJMenuBar(new MenuBar(main_window));
//Add content to the window.
frame.add(main_window, BorderLayout.CENTER);
//Display the window.
frame.pack();
frame.setVisible(true);
frame.setSize(1000, 600);
}
COM: <s> lance le thread de swing </s>
|
funcom_train/7426844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PBounds getBoundsReference() {
final PBounds targetBounds = target.getFullBounds();
camera.viewToLocal(targetBounds);
camera.globalToLocal(targetBounds);
final PBounds bounds = super.getBoundsReference();
bounds.setRect(targetBounds);
return super.getBoundsReference();
}
COM: <s> the sticky handle managers bounds as computed by examining its target </s>
|
funcom_train/50189067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireResultPI(SAXEvent saxevent) {
if (hasTraceListeners()) {
// count of registered tracelisteners
int countListener = traceListeners.size();
for (int i = 0; i < countListener; i++) {
TraceListener currentListener =
(TraceListener) traceListeners.elementAt(i);
// call the according method on tracelistener
currentListener.resultPI(saxevent);
}
}
}
COM: <s> indicates the pi event of the result document </s>
|
funcom_train/13511105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean textExists(String text){
for(int i=0;i<this.choosables.size();i++){
if( ((Choosable) this.choosables.get(i)).getText().equals(text)){
return Boolean.TRUE.booleanValue();
}
}
return Boolean.FALSE.booleanValue();
}
COM: <s> return true if the text already exists </s>
|
funcom_train/51723866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBorderGap(int borderGapval) {
borderGap = borderGapval;
javax.swing.border.Border inner = new javax.swing.border.EmptyBorder(0, borderGap, 0, borderGap);
setBorder(new javax.swing.border.CompoundBorder(new javax.swing.border.MatteBorder(0, 0, 0, 2, Color.GRAY), inner));
lastDigits = 0;
setPreferredWidth();
}
COM: <s> the border gap is used in calculating the left and right insets of </s>
|
funcom_train/2558595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateUnion(InputNode node, LabelMap map, Label label) throws Exception {
Collection<String> list = label.getPaths(context);
for(String key : list) {
Label union = map.getLabel(key);
if(union != null) {
if(label.isInline()) {
criteria.set(union, null);
}
}
}
validate(node, label);
}
COM: <s> the code validate union code method is determine the unions </s>
|
funcom_train/4534001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showRegistrationFailed(RegisterEvent event) {
loadingLabel.setForeground(new Color(210, 0, 0));
loadingLabel.setText(PhoneRes.getIString("phone.failed"));
loadingLabel.setIcon(PhoneRes.getImageIcon("NORMAL_PHONE_ICON"));
retryButton.setVisible(true);
}
COM: <s> call to display failure to register </s>
|
funcom_train/24067908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getIlvNumber(final String path) {
int number = 0;
if (path != null && path.contains("-")) {
try {
number = Integer.valueOf(path.substring(path.lastIndexOf("-") + 1, path.length()));
} catch (final NumberFormatException e) {
LOG.error(e.toString());
}
}
return number;
}
COM: <s> get the ill form number from the wildcard mapping </s>
|
funcom_train/39540633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSquareLength(int length) {
if (length <= 0) {
throw new IllegalArgumentException("Length must be > 0");
}
int old = getSquareLength();
this.squareLength = length;
checkerPaint = null;
firePropertyChange("squareLength", old, getSquareLength());
}
COM: <s> specifies the length of the squares </s>
|
funcom_train/20463711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MessageDigest getDigest(String algorithmName) {
try {
return MessageDigest.getInstance(algorithmName);
} catch (NoSuchAlgorithmException e) {
String msg = "No native '" + algorithmName + "' MessageDigest instance available on the current JVM.";
throw new IllegalStateException(msg, e);
}
}
COM: <s> returns the jdk message digest instance to use for executing the hash </s>
|
funcom_train/22292440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EdgeSet getEdgesFrom(int id) {
EdgeSet returnSet = new EdgeSet();
Enumeration enum = ( (GraphAdjacencyData) directed.get(new Integer(id)) ).getLinks().elements();
BasicEdge eg;
while(enum.hasMoreElements()) {
eg = edges.getEdge(id, ((Integer)enum.nextElement()).intValue());
if(eg != null)
returnSet.addEdge(eg);
}
return(returnSet);
}
COM: <s> gives you a list of the edges leaving the given node </s>
|
funcom_train/18103272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration getCategories() {
Vector categories;
try {
categories = getCategories1();
} catch (IOException e) {
// hmm... no way to report back if any error occured, so just return
// null if anything bad happened
return null;
}
// if there were no categories, return an enumeration with no entries
if (categories == null) {
Vector empty = new Vector(0);
return empty.elements();
}
return categories.elements();
}
COM: <s> returns the category names that are defined in this landmark store </s>
|
funcom_train/36828205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String save(String file) throws IOException {
BufferedOutputStream fos = new BufferedOutputStream(new FileOutputStream(file));
for (int i = 0; i < size; i++) {
fos.write(bitmask[i]);
}
fos.close();
return new File(file).getAbsolutePath();
}
COM: <s> saves the data block to an output file </s>
|
funcom_train/35481864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkIO(String input, String output){
if (input == null || output == null) return true;
File inputFile = new File(input);
File outputFile = new File(output);
try {
if(inputFile.getCanonicalPath().equals(
outputFile.getCanonicalPath())){
return false;
}
} catch (IOException ex) {
return false;
}
return true;
}
COM: <s> check if output is the same as input </s>
|
funcom_train/51574990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTickSize(final int size) {
Tick workTick = getTickHandle();
if (workTick == null) {
workTick = createNewTicker();
}
if (DEBUG) {
System.err.println("Ticker.setTickSize setting new size.");
}
workTick.setSize(size);
if (DEBUG) {
System.err.println("Ticker.setTickSize set new size successfully.");
}
}
COM: <s> this method is used for setting to tick size in seconds </s>
|
funcom_train/50330749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(int address, byte [] payload, int repeat) {
addr = address;
// Arrays.copyOf(payload, payload.length), a Java 1.6 construct
this.payload = new byte[payload.length];
for (int i = 0; i<payload.length; i++) this.payload[i] = payload[i];
this.setRepeat(repeat);
status = SprogConstants.SLOT_IN_USE;
}
COM: <s> set the contents of the slot </s>
|
funcom_train/39974218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override protected void configureWindow(java.awt.Window root) {
this.addExitListener(new ExitListener() {
public boolean canExit(EventObject event) {
if(testRunner.isRunning()){
return false;
}else{
return true;
}
}
public void willExit(EventObject event) {
System.out.println("will exit");
}
});
}
COM: <s> this method is to initialize the specified window by injecting resources </s>
|
funcom_train/9381512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeNmeaListener(GpsStatus.NmeaListener listener) {
try {
GpsStatusListenerTransport transport = mNmeaListeners.remove(listener);
if (transport != null) {
mService.removeGpsStatusListener(transport);
}
} catch (RemoteException e) {
Log.e(TAG, "RemoteException in unregisterGpsStatusListener: ", e);
}
}
COM: <s> removes an nmea listener </s>
|
funcom_train/17947108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void lookAheadCode(Editor_Model model){
if(model instanceof Component_Model){
if(((Component_Model)model).getMainComponent().intValue()==1){
if(mainClass.equals("")){
mainClass = ((Component_Model)model).getClass_Name();
}
}
}
List children = model.getChildren();
for(int i=0;i<children.size();i++){
String modelClass = model.getClass().getName();
Object child = children.get(i);
if(child instanceof Editor_Model){
components.add(child);
((Editor_Model)child).setParent(model);
lookAheadCode((Editor_Model)child);
}
}
return;
}
COM: <s> find out who is the main component </s>
|
funcom_train/9339815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BigDecimal getSimple(int o, BigDecimal a, BigDecimal b) {
if (o == 0) {
return a.add(BigDecimal.ONE);
} else if (o == 1) {
return a.add(b);
} else if (o == 2) {
return a.multiply(b);
} else if (o == 3) {
return power(a, b);
} else if (a.equals(BigDecimal.ZERO)) {
return BigDecimal.ZERO;
}
return null;
}
COM: <s> handles simple hyperoperation cases such as iteration addition </s>
|
funcom_train/268937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getVersion(char tag, int protocol) {
for (int i = 0; i < tags.length; i++) {
if (tags[i] == tag) {
// must match all digits but the less significant
if (data[i] / 10 == protocol / 10)
return data[i];
}
}
return -1;
}
COM: <s> this method will return the exact version of a protocol </s>
|
funcom_train/37592029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private final javax.swing.filechooser.FileFilter _txtFileFilter = new javax.swing.filechooser.FileFilter() {
public boolean accept(File f) { return f.isDirectory() || f.getPath().endsWith(TEXT_FILE_EXTENSION); }
public String getDescription() { return "Text Files (*"+TEXT_FILE_EXTENSION+")"; }
};
COM: <s> filter for text files </s>
|
funcom_train/14370486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tearDown() throws Exception {
try {
PlanetManager planet = getRoller().getPlanetManager();
PlanetConfigData config = planet.getConfiguration();
PlanetGroupData group = planet.getGroup("external");
planet.deleteGroup(group);
deleteWebsite(testUsername);
} catch (RollerException e) {
mLogger.error("Tearing down",e);
}
super.tearDown();
}
COM: <s> child test cases should take care to tear down their own resources </s>
|
funcom_train/32136355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getJCheckBoxIPBound() {
if (jCheckBoxIPBound == null) {
jCheckBoxIPBound = new JCheckBox();
jCheckBoxIPBound.setText("IP");
jCheckBoxIPBound
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
keyBoundChecked();
}
});
}
return jCheckBoxIPBound;
}
COM: <s> this method initializes j check box ipbound </s>
|
funcom_train/20134537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addToCol(int col, char symbol){
for(int i = this.board.length - 1; i >= 0; --i){
if(this.board[i][col] == Constants.EMPTY){
this.board[i][col] = symbol;
return 0;
}
}
return -1;
}
COM: <s> assumes col is legal and attempts to place the symbol in the </s>
|
funcom_train/10791330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean canSet(ColumnIO io, int i, boolean nullValue) {
if (io == null)
return true;
if (_action == ACTION_INSERT)
return io.isInsertable(i, nullValue);
if (_action == ACTION_UPDATE)
return io.isUpdatable(i, nullValue);
return true;
}
COM: <s> return true if the given column index is settable </s>
|
funcom_train/10362920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateEBAContent(AbstractName applicationGBeanName, long bundleId, File bundleFile) throws GBeanNotFoundException, NoSuchOperationException, Exception{
kernel.invoke(applicationGBeanName, "updateApplicationContent", new Object[]{bundleId, bundleFile}, new String[]{long.class.getName(), bundleFile.getClass().getName()});
}
COM: <s> only support local bundle update </s>
|
funcom_train/890201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean evaluate(Object target) {
for (Iterator i = getConditions().iterator(); i.hasNext();) {
//result = result && ((Condition) i.next()).evaluate(target);
if (!((Condition) i.next()).evaluate(target)) {
return false;
}
}
return true;
}
COM: <s> returns true if if all nested </s>
|
funcom_train/42589523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getBeanFromQuery() throws StreamException {
// Commenting error catching for the moment
// as those are handed down the stream
try {
return xstream.fromXML(swXML.toString());
// } catch (StreamException e) {
// throw new OntologyServiceException("Term not found");
} catch (ConversionException e) {
log.error("Web service signature has changed!");
log.error(e.getMessage());
// e.printStackTrace();
return null;
}
}
COM: <s> returns the parsed bean from bioportal services </s>
|
funcom_train/12165413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWritePaneContents() throws Exception {
final VolantisProtocol protocol = getProtocol();
MethodInvoker invoker = new MethodInvoker() {
public void invoke() throws Exception {
protocol.writePaneContents(getOutputBuffer(protocol));
}
};
String expecting = getExpectedWritePaneContentsResult();
ProtocolIntegrationTestHelper.doTest(expectations, protocol, invoker, expecting);
}
COM: <s> this method tests the method public void write pane contents output buffer </s>
|
funcom_train/31252025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHeader() {
return new StringBuffer("Subject: ").append(getSubject())
.append(" To: ").append(getTo())
.append(" CC: ").append(getCc())
.append(" BCC: ").append(getBcc())
.append(" From: ").append(getFrom())
.toString();
}
COM: <s> returns labels and values for the current templates subject </s>
|
funcom_train/9930926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTicStyle() {
String style = TypeConverter.getString(
getAxisAttributes().get("ticStyle"),
Constants.getDefault(getAxisToken().concat("axis.ticStyle")));
if (style == null)
return "";
else
return style;
}
COM: <s> gets the tic style </s>
|
funcom_train/43570626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnCancel() {
if (btnCancel == null) {
btnCancel = new JButton();
btnCancel.setText(Constant.messages.getString("all.button.cancel"));
btnCancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
FilterChangeUserAgentDialog.this.dispose();
exitCode = JOptionPane.CANCEL_OPTION;
}
});
}
return btnCancel;
}
COM: <s> this method initializes j button1 </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.