__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/11322865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testThreadLocal() {
long start = System.currentTimeMillis();
// Count is used to ensure JVM does not remove loop away entirely.
int count = 0;
for (int i = 0; i < ITERATIONS; i++) {
Object objectA = getThreadLocalObject();
if (objectA != null) {
count += 1;
}
}
System.out.println("testThreadLocal time:" + (System.currentTimeMillis() - start) + " ms");
}
COM: <s> test performance of looking up an object using a thread local </s>
|
funcom_train/18787633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isSystemPackage(MetaPackage packages) {
assert packages != null;
String name = packages.getName();
return ((name != null) && (name.startsWith("java.")
|| name.startsWith("javax.") || name.equals("java") || name
.equals("javax")));
}
COM: <s> returns true if the package is identified as a system package </s>
|
funcom_train/9886674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getMaxProduct(int intensityIndex1, int intensityIndex2) {
float product = 0, maxProduct = 0;
ISlideDataElement sde;
for (int i = 0; i < size(); i++) {
sde = getSlideDataElement(i);
product = sde.getIntensity(intensityIndex1) * sde.getIntensity(intensityIndex2);
if (product > maxProduct)
maxProduct = product;
}
return maxProduct;
}
COM: <s> returns a microarray max product value of specified intensities </s>
|
funcom_train/43328184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String arguments2() {
String rv = ("-I T -d " + databases2+
" -e "+String.valueOf(e)+
" -v "+String.valueOf(maxN)+
" -b "+String.valueOf(maxN)+
" -h "+String.valueOf(includeThreshold)+
" -j "+String.valueOf(rounds)+
" -F "+(filter ? "T" : "F"));
if (checkpointName != null)
rv += " -R "+checkpointName;
return rv;
}
COM: <s> return arguments for the program the second time its run </s>
|
funcom_train/48580158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BeanProperty getProperty(String fieldName) throws NoSuchFieldException {
for(BeanProperty property : getProperties()) {
if(fieldName.equals(property.getName())) {
return property;
}
}
throw new NoSuchFieldException("No such property: " + fieldName + " in class: " + getBeanClass().getName());
}
COM: <s> gets java bean property </s>
|
funcom_train/39911098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUpdate() throws Exception {
System.out.println("update");
employee_client u = null;
Employee_clientdao instance = new Employee_clientdao();
instance.update(u);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of update method of class dao </s>
|
funcom_train/26661694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStationAetGroups(Map stationAetGroups, boolean onlyGroups) {
selectedStationAetMap.clear();
if ( stationAetGroups == null ) {
this.stationAetGroups.clear();
} else {
this.stationAetGroups = stationAetGroups;
initStationAetGroupNames(false);
}
this.onlyGroups = onlyGroups;
}
COM: <s> set list of station aet groups </s>
|
funcom_train/25257546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopDownloading() {
//Log.d(TAG, "Stopping " + torrent.getTorrentFileName());
complete = true;
fileSetupTask.cancel(true);
if (manager != null) {
if (manager.getTorrent() != null) {
manager.getTorrent().setStatus("Stopped");
}
manager.stopListening();
Log.d(TAG, "Stopping tracker update...");
manager.stopTrackerUpdate();
manager.closeTempFiles();
}
}
COM: <s> stop the tracker updates and close any open files </s>
|
funcom_train/2881028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MBeanInfo getMBeanInfo() {
try {
return mbeanServer.getMBeanInfo(remoteName);
} catch (RuntimeConnectionException ce) {
return null;
} catch (InstanceNotFoundException infe) {
return null;
} catch (IntrospectionException ie) {
return null;
} catch (ReflectionException re) {
return null;
}
}
COM: <s> gets the m bean info attribute of the mbean proxy object </s>
|
funcom_train/35692050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRenderFacetsIfSinglePage() {
if (_renderFacetsIfSinglePage != null) {
return _renderFacetsIfSinglePage.booleanValue();
}
ValueBinding vb = getValueBinding("renderFacetsIfSinglePage");
Boolean v =
vb != null ? (Boolean) vb.getValue(getFacesContext()) : null;
return v != null ? v.booleanValue() : true;
}
COM: <s> p return the value of the code render facets if single page code </s>
|
funcom_train/37585571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(K key, V value) {
ExternallySortedSet<V, C> set = _map.get(key);
if (set == null) { return false; }
else {
if (set.remove(value)) {
_size--;
if (set.isEmpty()) { _map.remove(key); }
}
else {
return false;
}
}
return true;
}
COM: <s> removes the key value pair if it is present </s>
|
funcom_train/13759860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigInteger addAbstractNum(XWPFAbstractNum abstractNum){
int pos = abstractNums.size();
ctNumbering.addNewAbstractNum();
abstractNum.getAbstractNum().setAbstractNumId(BigInteger.valueOf(pos));
ctNumbering.setAbstractNumArray(pos, abstractNum.getAbstractNum());
abstractNums.add(abstractNum);
return abstractNum.getCTAbstractNum().getAbstractNumId();
}
COM: <s> add a new abstract num and return its abstract num id </s>
|
funcom_train/47673462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getHostnameValue() {
ObjectName objectName = null;
try {
objectName = new ObjectName(muleDomain + ":type=org.mule.MuleContext,name=MuleServerInfo");
return (String) server.getAttribute(objectName, "Hostname");
} catch (Exception ex) {
return "ERROR";
}
}
COM: <s> gets the hostname from mules mbean server </s>
|
funcom_train/47735204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSeconds(long s) {
if (s == 0) {
return;
}
long curSec = sec_of_day;
curSec += s;
while (curSec > 86399) {
curSec -= 86400;
julian_day++;
} while (curSec < 0) {
curSec += 86400;
julian_day--;
}
sec_of_day = (int)curSec;
}
COM: <s> advances this day by s seconds </s>
|
funcom_train/4510542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInterceptor(PacketInterceptor interceptor) {
if (interceptor == null) {
throw new NullPointerException("Parameter interceptor was null.");
}
// Remove the interceptor from the list since the position might have changed
if (globalInterceptors.contains(interceptor)) {
globalInterceptors.remove(interceptor);
}
globalInterceptors.add(interceptor);
}
COM: <s> inserts a new interceptor at the end of the list of currently configured </s>
|
funcom_train/39317186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /** public void testSave() {
System.out.println("testSave");
// f.save();
System.out.print("cannot be tested because this function instantiates ");
System.out.print("a JFileChooser that requires user input. ");
System.out.println("done testSave");
//needs work
}
COM: <s> public void test exit form </s>
|
funcom_train/20078034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllComments(){
logger.info("Deleting All Comments");
String command = getDeleteAllCommentsCommand(getMusicId());
String query = updateBegin() + command + updateEnd();
String result = executeQuery(query, "Comments.xml");
logger.info("Deleting result is:" + result);
if ("fail".equalsIgnoreCase(result)){
return;
}
}
COM: <s> remove all comments by comment music id parameter </s>
|
funcom_train/6507772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Color getRobColor(String name) {
Color foo = null;
foo = (Color) nameToColorHash.get(name);
if (foo == null) {
CAT.error("getRobColor: Color for " + name + "'s Laser not found");
return Color.white;
} else
return foo;
}
COM: <s> lookup the bots color by name </s>
|
funcom_train/44799594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void itemChange(ModelItemChangeEvent evt) {
synchronized (this) {
try {
LOG.debug("cause " + getXPath() + " changed");
calcField.reEval(expr);
// calcField.performMappingsAfterCalc();
} catch (Exception e) {
LOG.error(e,e);
}
}
}
COM: <s> respond to change items for specific xpath referenced nodes in the </s>
|
funcom_train/35112953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Object o) {
// float the new entry
for (int i=0;i<list.size();i++) {
if (((Comparable) list.get(i)).compareTo(o) > 0) {
list.add(i, o);
break;
}
}
if (!list.contains(o)) {
list.add(o);
}
//Collections.sort(list);
}
COM: <s> add an element to the list causes sorting </s>
|
funcom_train/17586355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
final String message = "Error evaluating file '" + this.sourceName() +
"' on line " + this.lineNumber() + " [column " + this.columnNumber() +
"]: " + this.details() + "\n\t" + this.lineSource();
return message;
}
COM: <s> returns a detailed description of the error thrown in the script thats </s>
|
funcom_train/18739856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NodeRelation computeSeq(RegExpr.Seq expr, List<NodeRelation> argList) {
Iterator<NodeRelation> argsIter = argList.iterator();
NodeRelation result = argsIter.next();
while (argsIter.hasNext()) {
NodeRelation operand = argsIter.next();
result.doThen(operand);
}
return result;
}
COM: <s> computes the sequential composition of the relations associated with the </s>
|
funcom_train/36046278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getContextArgument() {
return EVENT_BELL.toLowerCase() + "|" + EVENT_UPDATE.toLowerCase() + "|" +
EVENT_MATCH.toLowerCase() + "|" + EVENT_MISMATCH.toLowerCase() + "|" + EVENT_CLIPBOARD.toLowerCase();
}
COM: <s> implementation of the get context argument method </s>
|
funcom_train/599652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws MojoExecutionException {
try {
getLog().info("Start slgen...");
checkParameters();
prepareGenerators();
runGenerators(generators);
getLog().info("Finished slgen.");
} catch (Exception e) {
getLog().error("Error running slgen: " + e);
throw new MojoExecutionException("Error running " + this, e);
}
}
COM: <s> executes this task with the previously set parameters </s>
|
funcom_train/21656436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtAgregarFiltro() {
if (btAgregarFiltro == null) {
btAgregarFiltro = new JButton();
btAgregarFiltro.setBounds(new Rectangle(755, 179, 41, 25));
btAgregarFiltro.setText("+");
btAgregarFiltro.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ControladorPrincipal.mostrarAgregarFiltro();
}
});
}
return btAgregarFiltro;
}
COM: <s> this method initializes bt agregar filtro </s>
|
funcom_train/9978468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteSelectedPackage() {
TreeItem current = tree.getSelection()[0];
if (MessageDialog.openConfirm(getShell(), "Delete a package",
"Are you sure to delete package " + model.getPackageLabel((Element) current.getData()))) {
// Delete it...
model.deletePackage((Element) current.getData());
current.dispose();
}
}
COM: <s> deletes selected package </s>
|
funcom_train/6295669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LinkInfo describe_link(String name) throws IllegalLinkName, UnknownLinkName {
// is name legal?
if (name == null || name.length() == 0)
throw new IllegalLinkName(name);
// get LinkInfo
LinkInfo _result = (LinkInfo) m_current_links.get(name);
//check for UnknownLinkName (the key has no associated object)
if (_result == null)
throw new UnknownLinkName(name);
return _result;
}
COM: <s> get the link info object of a specific link </s>
|
funcom_train/50329492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configureManagers() {
InstanceManager.setProgrammerManager(getProgrammerManager());
InstanceManager.setPowerManager(getPowerManager());
InstanceManager.setTurnoutManager(getTurnoutManager());
InstanceManager.setThrottleManager(getThrottleManager());
InstanceManager.setConsistManager(getConsistManager());
commandStation = new jmri.jmrix.easydcc.EasyDccCommandStation(this);
InstanceManager.setCommandStation(commandStation);
}
COM: <s> configure the common managers for easy dcc connections </s>
|
funcom_train/51199793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GoogleContactModel insertContact(GoogleContactModel contact) throws ManagerException, MinorManagerException {
try {
return getDao().insertContact(contact);
} catch (MinorGoogleDaoException ex) {
throw new MinorManagerException(ex.getMessage());
} catch (GoogleDaoException ex) {
throw new ManagerException(ex.getMessage());
}
}
COM: <s> inserts a contact in google server </s>
|
funcom_train/24429135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void closeFile() {
if (mOos != null) {
try {
mOos.close();
} catch (final IOException e) {
// Exceptionally, it does not make sense to delegate to an
// ErrorHandler. Since a closed appender is basically dead.
LogLog.error("Could not close " + mOos, e);
}
}
}
COM: <s> closes the previously opened file </s>
|
funcom_train/1941937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void importData(String values) {
StringTokenizer st = new StringTokenizer(values, ",");
try {
while (st.hasMoreTokens()) {
String value = st.nextToken();
if (value.startsWith("!")) {
this.add(value.substring(1));
} else {
this.add(value);
}
}
} catch (NoSuchElementException e) { e.printStackTrace(); } // debug
}
COM: <s> imports the select list values from a csv coded structure </s>
|
funcom_train/3740216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean mayEditEvent(Event event, User who) throws HibernateException {
HibernateUtil.currentSession();
if (who.isSystemAdmin() || who.isBussinessAdmin()) {
return true;
}
/* autor ma prawo */
User author = event.getAllUser().getUser();
if (who.equals(author))
return true;
/* manager grupy ma prawa */
User manager = event.getGroup().getUser();
if (who.equals(manager))
return true;
/* osoby przypisane nie maja prawa */
return false;
}
COM: <s> checks whether user may edit event </s>
|
funcom_train/37595986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public TypeContext visit(SynchronizedStatement node) {
Type lockT = checkType(node.getLock());
if (!ts.isReference(lockT)) { throw new ExecutionError("lock.type", node); }
node.getBody().acceptVisitor(this);
return context;
}
COM: <s> visits a synchronized statement </s>
|
funcom_train/10211934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
try {
PrimitiveVector v = (PrimitiveVector)super.clone();
v.var = (BaseType)var.clone();
return v;
}
catch (CloneNotSupportedException e) {
// this shouldn't happen, since we are Cloneable
throw new InternalError();
}
}
COM: <s> returns a clone of this code primitive vector code </s>
|
funcom_train/23868769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testWrite() {
final File csvFile = new File(CSV_FILE_NAME);
final CsvFileWriterTest csvFileWriterTest = new CsvFileWriterTest(csvFile);
csvFileWriterTest.setColumnSeparator(',');
csvFileWriterTest.writeCsvData();
assertTrue("Output should have been written", new File(CSV_FILE_NAME).exists());
}
COM: <s> test method for </s>
|
funcom_train/36230378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int getDigitCount(int value) {
int result;
if (value == 0) {
result = 1;
}
else {
result = (int) Math.ceil(log10(Math.abs(value) + 1));
if (value < 0) {
// Add another digit got the "-" sign.
result += 1;
}
}
return result;
}
COM: <s> get number of digits required to reprents code value code </s>
|
funcom_train/20504285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRightSeatForSeat(long seatId, long rightSeatId) {
String sql = "update Seat set Right_Seat_id = ? where id = ?";
Object[] args = new Object[] { new Long(rightSeatId) , new Long(seatId) };
jdbcTemplate.update(sql, args);
}
COM: <s> sets the right seat of the given seat </s>
|
funcom_train/43686413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String selectMember() {
if (getAssessment() == null || getAssessment().getId() == null
|| getModel() == null || getModel().getId() == null) {
throw new ApplicationException("Please select a expert at least.");
}
selectMember(getAssessment().getId(), getModel().getId(), true);
return JSON;
}
COM: <s> check box expert session </s>
|
funcom_train/19972788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMillis(long millis) {
currentSecond = (int) ((millis / 1000) % 60);
currentMinute = (int) ((millis / 60000) % 60);
currentHour = (int) ((millis / 3600000) % 100);
secondPicker.setValue(currentSecond);
minutePicker.setValue(currentMinute);
hourPicker.setValue(currentHour);
onTimeChanged();
}
COM: <s> set the current time value </s>
|
funcom_train/4546030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMenuWithNoConcreteVisibleItemsIsHidden() {
MenuManager menuBarMgr = createMenuBarManager();
MenuManager fileMenu = createMenuManager("File", "gsgn");
menuBarMgr.add(fileMenu);
menuBarMgr.updateAll(false);
assertEquals(0, getShell().getMenuBar().getItems().length);
}
COM: <s> tests that a menu with no concrete visible items that is ignoring </s>
|
funcom_train/17145763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RealMatrix push(RealMatrix rm) {
// forget();
if (rm == null) {
Debug.out("MatrixStack", "Warning: you are adding a null matrix to the stack. " +
"Probably not what you want.");
new RuntimeException("hi").printStackTrace();
}
RealMatrix ret = super.push(rm);
current = current.multiply(rm);
return ret;
}
COM: <s> pushes a new entry onto the stack returning argument for some </s>
|
funcom_train/21888545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnNew() {
if (btnNew == null) {
btnNew = new JButton();
btnNew.setText("new +");
btnNew.setPreferredSize(new Dimension(90, 26));
btnNew.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(final java.awt.event.ActionEvent e) {
resetGUI();
}
});
}
return btnNew;
}
COM: <s> this method initializes btn new </s>
|
funcom_train/36547423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initDocument( Variant variant ) {
_resultsDocument = null;
DomRepresentation representation = null;
try {
representation = new DomRepresentation( variant.getMediaType() );
} catch ( IOException e ) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if ( representation != null ) {
_resultsDocument = getDomDocument( representation );
}
} // end method initDocument( )
COM: <s> creates the base dom document </s>
|
funcom_train/51100487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void characters(char[] buf, int start, int count) throws SAXException {
String s = new String(buf, start, count).trim();
if (s.length() > 0) {
throw new SAXException(this.getClass().getName()
+ ": unexpected text \""
+ s
+ "\"");
}
}
COM: <s> handles text within an element </s>
|
funcom_train/3408617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setNames(Identifier id, String[] idlModuleNames, String idlName) {
this.id = id;
name = Names.mangleClass(id).getName().toString();
packageName = null;
if (id.isQualified()) {
packageName = id.getQualifier().toString();
qualifiedName = packageName + NAME_SEPARATOR + name;
} else {
qualifiedName = name;
}
setIDLNames(idlModuleNames,idlName);
}
COM: <s> set name and package </s>
|
funcom_train/18074284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doMenuItemSelectLevel(ActionEvent e) {
SelectLevelDialog dlg = new SelectLevelDialog(this, this.model.getMapData().getLevels());
dlg.setVisible(true);
if(!dlg.isVisible()){
int index = dlg.getSelectedIndex();
if(index >= 0 && index < model.getMapData().getNumLevels()){
loadLevel(index);
}
}
}
COM: <s> open level select menu and change the level </s>
|
funcom_train/18215367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getDiagramConfigurationElement() throws JDOMException, IOException {
final Element chartConf = parseChartConfiguration(getChartConfiguration());
final Element metricResult = getMetricResultElement();
final Element metric = parseMetricConfiguration(getMetricConfiguration());
final Element runInformation = parseRunInformation(getRunInformation());
final Element metricRun = MetricRunElementCreation.createMetricRunElement(metricResult,
metric, runInformation);
return DiagramConfigurationCreator.createDiagramConfiguration(chartConf, metricRun);
}
COM: <s> returns the corresponding diagram configuration as jdom element </s>
|
funcom_train/1661810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disconnect() {
if (nodeWriter != null) {
try {
nodeWriter.close();
} catch (IOException ioe1) {
}
nodeWriter = null;
}
if (nodeOutputStream != null) {
try {
nodeOutputStream.close();
} catch (IOException ioe1) {
}
nodeOutputStream = null;
}
if (nodeInputStream != null) {
try {
nodeInputStream.close();
} catch (IOException ioe1) {
}
nodeInputStream = null;
}
if (nodeSocket != null) {
try {
nodeSocket.close();
} catch (IOException ioe1) {
}
nodeSocket = null;
}
synchronized (this) {
notify();
}
fireConnectionTerminated();
}
COM: <s> disconnects from the node </s>
|
funcom_train/18288084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void searchRoots(String[] searchRootsList) {
// Disable the controls that should not be used in this case
rootText.setEnabled(false);
browseButton.setEnabled(false);
ArrayList files = new ArrayList();
for (int i = 0; i < searchRootsList.length; i++) {
File file = new File(searchRootsList[i]);
if (file.exists()) {
files.add(file);
}
}
File[] searchFiles = (File[]) files.toArray(new File[files.size()]);
updateDevices(searchFiles);
}
COM: <s> set the roots to be searched </s>
|
funcom_train/46125737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeChild(String id) {
try {
CPResource res = (CPResource) getElementByIdentifier(id);
resources.remove(res);
} catch (Exception e) {
log.error("child " + id + " was not removed.", e);
throw new OLATRuntimeException(CPOrganizations.class, "error while removing child: child-element (<resource>) with identifier \""
+ id + "\" not found!", new Exception());
}
}
COM: <s> removes a child resource from this elements resource collection </s>
|
funcom_train/24484248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(String className) {
try {
// loads the class
Class candidate = cl.loadClass(className);
// checks type
return accept(candidate);
} catch (ClassNotFoundException ex) {
Logger.getLogger(ClassFilter.class.getName()).log(Level.SEVERE, null, ex);
return false;
}
}
COM: <s> checks if the class passed as class name is of the required type </s>
|
funcom_train/6488540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node buildBaseCriteriaRef(BaseCriteria baseCriteria) {
// Add it to the pool (even if it is already in the pool).
poolAdd(baseCriteria);
Element cri = document.createElement(BASE_CRITERIA_REF);
Attr idref = document.createAttribute(NAME_IDREF);
idref.setValue(Integer.toString(baseCriteria.hashCode()));
cri.setAttributeNode(idref);
return cri;
}
COM: <s> build dom node based on a base criteria which returns a reference to </s>
|
funcom_train/18116153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getPreferredSize() {
if (preferredSize == null) {
int height = 0;
int width = 0;
for (int i = 0; i < maxheight.length; i++) {
height += maxheight[i];
}
for (int i = 0; i < maxwidth.length; i++) {
width += maxwidth[i];
}
preferredSize = new Dimension(width, height);
}
return preferredSize;
}
COM: <s> gets the preferred size attribute of the html table object </s>
|
funcom_train/5420838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getSize() throws IOException {
if (size == null) {
if (isFile()) {
size = this.archiv.length();
} else {
ZipFile zipFile = getZipFile();
ZipEntry zipEntry = zipFile.getEntry(this.entry);
size = zipEntry.getSize();
}
}
return size;
}
COM: <s> gets the size </s>
|
funcom_train/4499649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isStalemate(int type) {
if (!blackKing().isUnderCheck() && !whiteKing().isUnderCheck()) {
for (ChessPiece c : pieces) {
if (c.getType() == type && c.hasLegalMove()) {
return false;
}
}
this.setChanged();
this.notifyObservers("Stalemate");
this.clearChanged();
return true;
}
return false;
}
COM: <s> checks if is stalemate </s>
|
funcom_train/12336200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IUIObserverCommand createFSaveEntityDisplayNameCommand(String itemEntityUUID, String newEntityDisplayname) {
DefaultUIObserverCommand fSaveNameCommand = new DefaultUIObserverCommand("fSaveEntityDisplayName");
fSaveNameCommand.putCommandArgument("itemEntityUUID", itemEntityUUID.trim());
fSaveNameCommand.putCommandArgument("newEntityDisplayName", newEntityDisplayname.trim());
return fSaveNameCommand;
}
COM: <s> feeler save entity display name </s>
|
funcom_train/42959254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Comment getEntity() {
try {
return (Comment) em.createQuery("SELECT e FROM Comment e where e.id = :id").setParameter("id", id).getSingleResult();
} catch (NoResultException ex) {
throw new WebApplicationException(new Throwable("Resource for " + uriInfo.getAbsolutePath() + " does not exist."), 404);
}
}
COM: <s> returns an instance of comment identified by id </s>
|
funcom_train/16524688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point tileToScreenCoords(int x, int y) {
Dimension tileSize = getTileSize();
int originX = (map.getHeight() * tileSize.width) / 2;
return new Point(
((x - y) * tileSize.width / 2) + originX,
((x + y) * tileSize.height / 2));
}
COM: <s> returns the location on the screen of the top corner of a tile </s>
|
funcom_train/13274875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setBrowserPage(URL browserPage) {
if (browserPage != this.browserPage) {
URL oldBrowserPage = this.browserPage;
this.browserPage = browserPage;
this.propertyChangeSupport.firePropertyChange(Property.BROWSER_PAGE.name(), oldBrowserPage, browserPage);
}
}
COM: <s> sets the browser page </s>
|
funcom_train/1241597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerStream(InputStream instream) throws SAXException, ParserConfigurationException, IOException {
try {
Document doc=XMLUtils.newDocument(instream);
WSDDDocument wsddDoc = new WSDDDocument(doc);
WSDDDeployment deployment;
deployment = getDeployment();
if(deployment!=null) {
wsddDoc.deploy(deployment);
}
} finally {
instream.close();
}
}
COM: <s> register an open stream which we close afterwards </s>
|
funcom_train/9684585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean calledItemWillBeInaccessible(InvocationData data) {
BinMember itemCalled = (BinMember) data.getWhat();
if (willBeTurnedToPublicOnMove(itemCalled) && isMoving(itemCalled)) {
return false;
}
if (itemCalled.isPackagePrivate()) {
return true;
}
if (itemCalled.isProtected() && !invokedFromSubclass(data)) {
return true;
}
return false;
}
COM: <s> only deals with package private and protected access undertands synthetic constructors </s>
|
funcom_train/48335423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifiesAll() {
assert monitor.getLockingThread() != null : "notifyAll on unlocked object: " + this;
ThreadInfo[] locked = monitor.getLockedThreads();
for (int i=0; i<locked.length; i++) {
locked[i].setState(ThreadInfo.State.NOTIFIED);
}
JVM.getVM().notifyObjectNotifiesAll(ThreadInfo.currentThread, this);
}
COM: <s> notify all waiters </s>
|
funcom_train/3000490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String replaceString(String str, String find, String replaceWith) {
int lastIndex = 0;
for (int i=str.indexOf(find,lastIndex); i>-1; i=str.indexOf(find,lastIndex)) {
String left = str.substring(0,i);
String right = str.substring(i+find.length());
str = left+replaceWith+right;
lastIndex=i+replaceWith.length();
}
return str;
}
COM: <s> utility method to replaces substrings in a string </s>
|
funcom_train/44773421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateIn() {
//call all the listeners of the state in
if(iStateListener!=null&&(iStateListener.size()>0)){
//make a copy of the listeners in case
//anyone adds/removes listeners
List listeners = null;
synchronized(this){
listeners = this.iStateListener;
}
StateEvent event = new StateEvent(this,this);
for(int i=0;i<listeners.size();i++){
((IStateListener)listeners.get(i)).stateIn(event);
}
}
}
COM: <s> calls all the listeners of the state in </s>
|
funcom_train/17983218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBase(String base) {
try {
long baseTime = DateTools.stringToTime(base);
// The time is parsed in UTC time zone. Now substract the offset.
this.base = baseTime - CURRENT_TIME_ZONE.getOffset(baseTime);
} catch (ParseException e) {
log.warn("Failed to parse base date \"" + base + "\". Defaulting to GMT Epoch time.");
}
}
COM: <s> the base date value is of format yyyy mmdd hhmmss sss or shoter </s>
|
funcom_train/6302274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void register_host(HostInfo host) throws IllegalHostName, InvalidSSDRef {
if (host.name == null || host.name.length() == 0)
throw new IllegalHostName(host.name);
try {
host.ssd_ref.get_system_load();
} catch (Exception _e) {
Debug.output(Debug.IMR | Debug.INFORMATION, _e);
throw new InvalidSSDRef();
}
server_table.putHost(host.name, new ImRHostInfo(host));
}
COM: <s> register a new host with a server startup daemon </s>
|
funcom_train/27809098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateGenresCount() throws SQLException {
if ( getCDCountStatement == null )
getCDCountStatement =
c.prepareStatement("select genreId, count(cddbId)" +
"from cddbIds group by genreId");
ResultSet rs;
rs = getCDCountStatement.executeQuery();
while ( rs.next() ) {
int genreId = rs.getInt(1);
int count = rs.getInt(2);
updateGenreCount(genreId, count);
};
rs.close();
}
COM: <s> gets the number of cds in database </s>
|
funcom_train/19456619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeFileEntry(int number, byte[] data) {
byte[] block = new byte[CpmFormatDisk.CPM_BLOCKSIZE];
System.arraycopy(data, 0, block,
0, CpmFormatDisk.CPM_BLOCKSIZE);
disk.writeCpmBlock(0, block);
System.arraycopy(data, 0, block,
CpmFormatDisk.CPM_BLOCKSIZE, CpmFormatDisk.CPM_BLOCKSIZE);
disk.writeCpmBlock(1, block);
}
COM: <s> write the file entry bytes back to the disk image </s>
|
funcom_train/32056547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructors() {
System.out.println("testFillFormatColorConstructors");
GPGraphpad graphpad = new GPGraphpad();
FormatFillColorList colorList = new FormatFillColorList(graphpad);
assertNotNull(colorList);
FormatFillColorList colorList2 = new FormatFillColorList(graphpad,
"Junit");
assertNotNull(colorList2);
FormatFillColorList colorList3 = new FormatFillColorList(graphpad,
"JunitIcon", new ImageIcon(FormatFillColor.class
.getResource("bold.gif")));
assertNotNull(colorList3);
}
COM: <s> tests the constructors of format fill color list </s>
|
funcom_train/45452536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateMultipleChoiceSingleValue() throws Exception {
MultipleChoiceSingleValueAnswer testAnswer = new MultipleChoiceSingleValueAnswer(
testMultipleChoiceSingleValueQuestion);
assertNotNull("Unable to create answer", testAnswer);
testAnswer.setValue(testPossibleAnswerValue1);
assertEquals("Constrained answer inconsistent", testPossibleAnswerValue1, testAnswer.getValue()
.getValue());
}
COM: <s> test creating a multiple choice single value answer which uses a constrained value </s>
|
funcom_train/21611291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParsePredicateNoArguments() throws MUParserException {
ParseTree pt = parser.parse("predicate", "PredicateName ()");
System.out.println("parse tree: " + pt);
checkParsing(pt, "predicate_name", "(", ")");
}
COM: <s> tests parsing of a predicate with no arguments </s>
|
funcom_train/28874772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void start() {
// stop alreday working thered
if (playerThread != null && playerThread.isAlive()) stop();
consolePlayer.normalSpeed();
isFast=false;
playerThread=new Thread(this);
playerThread.setPriority(Thread.MAX_PRIORITY);
playerThread.start();
}
COM: <s> start play of tune </s>
|
funcom_train/13875208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsReadOnlyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Property_isReadOnly_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Property_isReadOnly_feature", "_UI_Property_type"),
EmofPackage.Literals.PROPERTY__IS_READ_ONLY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is read only feature </s>
|
funcom_train/3315900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNormalTimeInterval( ) {
Calendar cal = Calendar.getInstance( );
Date from = cal.getTime( );
cal.add( Calendar.DAY_OF_YEAR, 1 );
Date to = cal.getTime( );
TimeInterval timeInter = new TimeInterval( from,to );
assertEquals( from, timeInter.getFrom( ) );
assertEquals( to, timeInter.getTo( ) );
}
COM: <s> usual interval of one year </s>
|
funcom_train/41836640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveSettings(String filename) {
int holes = HOLE_CHOICES[mSeekHoleCount.getProgress()];
int players = mSeekPlayerCount.getProgress() + 1;
mScoreData.setDimensions(players, holes);
mScoreData.setForceLandscape(mCheckBoxLandscape.isChecked());
mScoreData.saveToFile(this, filename);
}
COM: <s> save settings to the specified file </s>
|
funcom_train/31906645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getVKern(int glyphCode1, int glyphCode2) {
if (glyphCode1 < 0 || glyphCode1 >= glyphUnicodes.length
|| glyphCode2 < 0 || glyphCode2 >= glyphUnicodes.length) {
return 0f;
}
return vKerningTable.getKerningValue(glyphCode1, glyphCode2,
glyphUnicodes[glyphCode1], glyphUnicodes[glyphCode2]);
}
COM: <s> returns the vertical kerning value for the specified glyph pair </s>
|
funcom_train/24468676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isUrl(final String link) {
boolean check = true;
try {
final URL url = new URL(link);
LOG.ludicrous("Gültige URL: " + url); // unterdrückt Warnung, dass url nie gebraucht wird
} catch (final MalformedURLException e) {
LOG.info("isUrl: " + link + "\040" + e.toString());
check = false;
}
return check;
}
COM: <s> this method checks if a string is a valid url </s>
|
funcom_train/7421756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createBindSenderTo(MessageFlow flow, Element element) {
String bindSenderTo = getBindSenderTo(flow.getTarget());
if (bindSenderTo == null) {
this.output.addError("The reference to bind the sender to could "+
"not be defined for this message flow ", flow.getId());
} else {
element.setAttribute("bindSenderTo", bindSenderTo);
}
}
COM: <s> adds the bind sender to attribute to the given element </s>
|
funcom_train/12751993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (getID()!=OBJECT_NOT_YET_PERSISTENT)
return "Category " + name + ": " + description + " (ID=" + getID() + ")";
else
return "Category " + name + ": " + description + " (not saved)";
}
COM: <s> method for getting information string about the object </s>
|
funcom_train/42337996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws BuildException {
// make sure we don't have an illegal set of options
validateAttributes();
// deal with the single resource
if (resource != null) {
if (!resource.exists())
throw new BuildException("Resource " + resource + " not found");
try {
resource.refreshLocal(depth, null);
return;
} catch (CoreException e) {
throw new BuildException(e);
}
}
// handle the patterns
DirectoryScanner ds= getWorkspaceScanner();
refreshResources(ds.getIncludedDirectories());
refreshResources(ds.getIncludedFiles());
}
COM: <s> performs the copy operation </s>
|
funcom_train/36202790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOriginalTextSetLeaf(String nodeID, String replacingText) {
if (this.getID().equals(nodeID)) {
this.setText(replacingText);
this.removeAllChildren();
return;
}
List<Section<?>> children = this.getChildren();
if (children.isEmpty() || sharedChildren) {
return;
}
for (Section<?> section : children) {
section.setOriginalTextSetLeaf(nodeID, replacingText);
}
}
COM: <s> searches the successor node with node id in the successors of this node </s>
|
funcom_train/9241892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isNumericType(int type) {
switch (type) {
case Types.BIGINT: return true;
case Types.BIT: return true;
case Types.DECIMAL: return true;
case Types.DOUBLE: return true;
case Types.FLOAT: return true;
case Types.INTEGER: return true;
case Types.NUMERIC: return true;
case Types.REAL: return true;
case Types.SMALLINT: return true;
case Types.TINYINT: return true;
}
return false;
}
COM: <s> simple helper function used to determine of the specified jdbc </s>
|
funcom_train/34992840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageData getImageData() {
if(imageBytes==null)
return ImageDescriptor.createFromURL(CONST.NO_COVER_IMAGE).getImageData();
try {
return new ImageData(new ByteArrayInputStream(imageBytes));
} catch(SWTException e) {//Invalid or unsupported image data
return ImageDescriptor.createFromURL(CONST.NO_COVER_IMAGE).getImageData();
}
}
COM: <s> creates and returns the image data for this movie </s>
|
funcom_train/10509965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireSubBuildFinished(Throwable exception) {
BuildEvent event = new BuildEvent(this);
event.setException(exception);
BuildListener[] currListeners = listeners;
for (int i = 0; i < currListeners.length; i++) {
if (currListeners[i] instanceof SubBuildListener) {
((SubBuildListener) currListeners[i]).subBuildFinished(event);
}
}
}
COM: <s> send a quot subbuild finished quot event to the build listeners for </s>
|
funcom_train/20440028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addYearPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ESMFTime_year_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ESMFTime_year_feature", "_UI_ESMFTime_type"),
ESMFPackage.Literals.ESMF_TIME__YEAR,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the year feature </s>
|
funcom_train/47906384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMaximumFrameHeight() {
if (maximumFramesHeight == -1) {
for (int i = 0; i < frames.length; i++) {
Image img = frames[i];
if (maximumFramesHeight < img.getHeight()) maximumFramesHeight = img.getHeight();
}
}
return maximumFramesHeight;
}
COM: <s> gets the maximum height found on all the frames </s>
|
funcom_train/4694958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LIRUpType visit(MathUnaryOp unaryOp, Integer d){
String tr = "";
// recursive call to operand
LIRUpType operand = unaryOp.getOperand().accept(this, d);
tr += operand.getLIRCode();
tr += getMoveCommand(operand.getLIRInstType());
tr += operand.getTargetRegister()+",R"+d+"\n";
tr += "Neg R"+d+"\n";
return new LIRUpType(tr, LIRFlagEnum.REGISTER,"R"+d);
}
COM: <s> math unary op propagating visitor </s>
|
funcom_train/44457886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getProperty(String name) throws IllegalArgumentException {
MandatoryArgumentChecker.check("name", name);
HttpSession session = (HttpSession) _currentSession.get();
if (session == null) {
return null;
}
Object propertyValue = session.getAttribute(name);
return propertyValue;
}
COM: <s> gets the value of a session property </s>
|
funcom_train/31040790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ImageDescriptor getImageDescriptor(String relativePath) {
String iconPath = "icons/full/"; //$NON-NLS-1$
try {
AbstractUIPlugin plugin = (AbstractUIPlugin) Platform.getPlugin(PlatformUI.PLUGIN_ID);
URL installURL = plugin.getDescriptor().getInstallURL();
URL url = new URL(installURL, iconPath + relativePath);
return ImageDescriptor.createFromURL(url);
} catch (MalformedURLException e) {
// Should not happen
return null;
}
}
COM: <s> returns the image descriptor with the given relative path </s>
|
funcom_train/15620449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Concept getInputConcept() throws M4CompilerError {
try {
return this.getMyRelation().getTheToConcept();
}
catch (M4Exception m4e) {
throw new M4CompilerError("Operator 'FeatureConstructionByRelation, Step '" +
this.getStep().getName() +"': M4 error accessing the relation's ToConcept: " + m4e.getMessage());
}
}
COM: <s> this method overrides the super class method because the </s>
|
funcom_train/14310709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Document loadXML(InputStream is) throws SAXException, IOException, ParserConfigurationException {
//create document builder
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
domFactory.setNamespaceAware(true);
DocumentBuilder builder = domFactory.newDocumentBuilder();
//load xml
Document document = builder.parse(is);
return document;
}
COM: <s> creates a dom document from an input stream </s>
|
funcom_train/12649658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startup(boolean nativeOverride) {
try {
try {
if (!stillborn && ThreadRegistry.threadCreationAllowed()) {
if (nativeOverride) {
CVM.setContextArtificial();
runNative();
CVM.postThreadExit();
} else {
CVM.setDebugEvents(true);
run();
CVM.postThreadExit();
CVM.setDebugEvents(false);
}
}
} finally {
// disable any future async/remote exceptions
CVM.disableRemoteExceptions();
CVM.maskInterrupts();
stillborn = true;
}
} catch (Throwable uncaughtException) {
exit(uncaughtException);
return;
}
exit(null);
}
COM: <s> this method is called by the system to manage thread </s>
|
funcom_train/30275109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String parseSystemStatusDuration(DataRow row, JSONObject jsonObj) {
TimeItem ssdItem = (TimeItem) systemStatusDurationTimers.get(row);
if (ssdItem == null) {
ssdItem = new TimeItem(row, HeaderColumn.SYSTEMSTATUS_DUR_NICK, jsonObj);
taskTimerController.registerTask(systemStatusDurationTimers, row, ssdItem);
} else {
ssdItem.parse(jsonObj);
}
return ssdItem.calculate();
}
COM: <s> parse system status duration agent detail </s>
|
funcom_train/4527810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCapacity() {
final Buffer instance = new Buffer();
final int expResult = 0;
final int result = instance.getCapacity();
assertEquals("getCapacity failed", expResult, result);
instance.setCapacity(100);
assertEquals("setCapacity failed", 100, instance.getCapacity());
}
COM: <s> test of get capacity method of class org </s>
|
funcom_train/8766510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer readXML(String path) throws Exception {
InputStream in = openXML(path);
if (in == null)
return null;
StringBuffer txtContent = new StringBuffer();
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String tempStr = "";
while ((tempStr = br.readLine()) != null) {
txtContent.append(tempStr + "\n");
}
br.close();
in.close();
return txtContent;
}
COM: <s> read the xml content </s>
|
funcom_train/15609409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setWasDirtied() {
//if there is nothing in Workspace then there is
// nothing to save hence dirty bit should be false
if (getWorkspaceOids().size() == 0) {
isDirty = false;
this.postWorkspaceDirtyStateChanged(isDirty);
return;
} else {
if (isDirty) {
return;
}
isDirty = true;
// Fire off Notification...
this.postWorkspaceDirtyStateChanged(isDirty);
return;
}
}
COM: <s> set that something has been dirtied in the workspace </s>
|
funcom_train/47197375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addValidValuetoMtypeFieldWithVarname(String varName, String fieldName, String value) {
if (!fieldName.equals("")) {
String varType = "";
try {
varType = getVar(varName).getTypename().toCode();
} catch (RuleViolationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
addValidValuetoMtypeFieldWithUtypename(varType, fieldName, value);
}
}
COM: <s> add a valid value to a mtype field in a utype </s>
|
funcom_train/4124805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayTerrain(Graphics2D g, Map map, Tile tile, int x, int y) {
displayBaseTile(g, map, tile, x, y, true);
displayTileItems(g, map, tile, x, y);
//displayUnexploredBorders(g, map, tile, x, y);
}
COM: <s> displays the given tile onto the given graphics2 d object at the </s>
|
funcom_train/37009418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int minGreen() {
int m = Integer.MAX_VALUE;
for (int v = 0; v < getHeight(); v++)
{
for (int u = 0; u < getWidth(); u++)
{
if (green(u, v) < m) m = green(u, v);
}
}
return m;
}
COM: <s> returns the minimum green pixel value in band 1 </s>
|
funcom_train/1175669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRemoteRtpRecvPort(int remoteRtpRecvPort) {
if (remoteRtpRecvPort % 2 != 0) {
throw new IllegalArgumentException("RtpRecvPort must be even.");
}
this.remoteRtpRecvPort = remoteRtpRecvPort;
if ( remoteRtpRecvPort == 0 && this.myRtpSendSocket != this.myRtpRecvSocket ) {
this.myRtpSendSocket.close();
this.myRtpSendSocket = null;
}
}
COM: <s> set the remote rtp receive port </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.