__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/12244878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEmotion(Element emo) {
List emotions = emotionsRoot.getChildren();
String emoName = emo.getAttribute("name").getValue();
for (Iterator iter = emotions.iterator(); iter.hasNext();) {
Element emotion = (Element) iter.next();
String emotionName = emotion.getAttribute("name").getValue();
debugLogger.debug(emotionName);
if (emotionName.compareTo(emoName) == 0) {
emotionsRoot.removeContent(emotion);
break;
}
}
emotionsRoot.addContent(emo);
}
COM: <s> add an emotion element to the document tree </s>
|
funcom_train/43376231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
//jScrollPane.setViewportView(getJLeftPanel());
jScrollPane.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
jScrollPane.setPreferredSize(new java.awt.Dimension(153,600));
jScrollPane.setViewportView(getJTree());
}
return jScrollPane;
}
COM: <s> this method initializes j scroll pane </s>
|
funcom_train/1222714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeUInt(long v) throws IOException {
out.write((int) ((v >>> 24) & 0xff));
out.write((int) ((v >>> 16) & 0xff));
out.write((int) ((v >>> 8) & 0xff));
out.write((int) ((v >>> 0) & 0xff));
incCount(4);
}
COM: <s> writes an unsigned 32 bit integer value </s>
|
funcom_train/29055254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IApiExtractorArguments getExtractorArguments() throws MalformedURLException {
final IPreferenceStore prefStore = CorePlugin.getDefault().getPreferenceStore();
return new ApiExtractorArguments(new URL(prefStore
.getString(ApiExtractorWizardPage.MEDIAWIKI_API_URL)), prefStore
.getString(ApiExtractorWizardPage.MEDIAWIKI_API_USERNAME), prefStore
.getString(ApiExtractorWizardPage.MEDIAWIKI_API_PASSWORD));
}
COM: <s> retrieve the currently set </s>
|
funcom_train/7721978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void sizeWindowOnScreen(Window w, double ratio) {
Toolkit tk = w.getToolkit();
Dimension scrn = tk.getScreenSize();
w.setSize( new Dimension( (int)(scrn.width*ratio), (int)(scrn.height*ratio) ) );
}
COM: <s> resizes the given window to the given ratio of the screen size </s>
|
funcom_train/48763655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class Version extends polyglot.main.Version {
public String name() { return "ib"; }
// TODO: define a version number, the default (below) is 0.1.0
public int major() { return 0; }
public int minor() { return 1; }
public int patch_level() { return 0; }
}
COM: <s> version information for ib extension </s>
|
funcom_train/22094428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean taskAddAllowed(RobotTask task) {
if (task == null) {
log.info("Null task not allowed");
return false;
}
if (! isAllowed(task)) {
// log.info("Not allowed: "+task.getURL());
return false;
}
if (todo.contains(task)) {
return false;
}
return true;
}
COM: <s> checks if a tasks should be added to the task list </s>
|
funcom_train/24242668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getPortletList(String user_id) throws DBException {
boolean getPortletList = false;
PortletLayoutDB pldb = new PortletLayoutDB(conn);
try {
tmpList = pldb.getRecords();
getPortletList = (!tmpList.isEmpty());
}
finally {
pldb.release();
pldb = null;
}
return getPortletList;
}
COM: <s> get portlet list for specific user </s>
|
funcom_train/38551997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MobileFrame spawnMobileFrame(MobilePanel mobilePanel) {
if(mobilePanel == null) return null;
if(this.mobileFrames.containsKey(mobilePanel.getName())) return null;
MobileFrame temp = new MobileFrame(mobilePanel, this);
this.mobileFrames.put(mobilePanel.getName(), temp);
this.windowMenu.add(temp.getAppearMenuItem());
return temp;
}
COM: <s> spawns a new mobile frame registers it with the system </s>
|
funcom_train/35683319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateStatus(final String errorMessage) {
if (getNextPage() == null) {
((AbstractWizard) getWizard()).setCanFinish(
(errorMessage == null) ? true : false);
}
setErrorMessage(errorMessage);
setPageComplete(errorMessage == null);
}
COM: <s> invalidate the dialog content if error message is not null and make sure </s>
|
funcom_train/21846545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeInvalidateListener(InvalidateListener listener) {
synchronized (listeners) {
// Iterator on LinkedList allows remove()
for (Iterator it = listeners.iterator(); it.hasNext();) {
WeakReference ref = (WeakReference) it.next();
InvalidateListener obj = (InvalidateListener) ref.get();
// remove required or gc()ed references
if (obj == null || obj == listener)
it.remove();
}
}
}
COM: <s> remove a dtd </s>
|
funcom_train/13595821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String constructFileName( String dir, String fname ) {
String name;
if( fname.endsWith( "*.*" ) ) {
fname = fname.substring( 0, fname.indexOf( '.' ) );
}
name = (dir == null ? "" : dir) + fname;
if( fname.indexOf( '.' ) < 0 )
name += "." + default_extension;
return name;
}
COM: <s> constructs a real filename from the given directory and the </s>
|
funcom_train/3936783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setItem(COSName inKey, COSBase inValue) {
if (inValue == null) {
removeItem(inKey);
}
else {
if (!items.containsKey(inKey)) {
// insert only if not already there
keys.add(inKey);
}
items.put(inKey, inValue);
}
}
COM: <s> this will set an item in the dictionary </s>
|
funcom_train/36756462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDegreeByName() {
DbHelper dbh = new DbHelper();
Degree degree = dbh.GetDegree("MSEE", "");
assertEquals("MSEE", degree.getName());
degree = dbh.GetDegree("MSEE", "Embedded Systems");
assertEquals("Embedded Systems", degree.getConcentration());
dbh.close();
}
COM: <s> test of get degree by name method of class csis543 tfinal project </s>
|
funcom_train/43852441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Expression parseRelational() throws ParseException {
Expression e = parseFTContains();
consumeWS();
while(true) {
final Comp expr = cmp(new Comp[] { Comp.LE, Comp.LT, Comp.GE, Comp.GT });
if(expr == null) return e;
e = new Relational(e, parseFTContains(), expr);
}
}
COM: <s> parses a relational expr </s>
|
funcom_train/44297284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void log(final Level level) {
final LogRecord record = new LogRecord(level, message);
record.setLoggerName(logger.getName());
record.setSourceClassName("org.opengis.test.Validator");
record.setSourceMethodName(mandatory ? "mandatory" : "forbidden");
logger.log(record);
}
COM: <s> logs this message at the given level </s>
|
funcom_train/4447786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Menu getAdminMenu() {
if(pageRequest.isLoggedIn() && pageRequest.getUser().hasRole("admin")) {
return MenuHelper.getMenu("admin", "noAction", pageRequest.getUser(), pageRequest.getWeblog());
}
return null;
}
COM: <s> get a menu representing the admin ui action menu if the user is </s>
|
funcom_train/31630914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean writeBatch(String buff, String filename) {
FileWriter fileWriter;
try {
fileWriter = new FileWriter(filename);
fileWriter.write(buff);
fileWriter.close();
} catch ( java.io.IOException ioe ) {
System.out.println( "IO error: " + ioe);
return false;
}
return true;
}
COM: <s> write a batch summary to a file </s>
|
funcom_train/39568229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT:
public boolean greaterThan(I_Address laddr){
if (laddr == null || !(laddr instanceof HC_LogicalAddress))
throw new IllegalArgumentException("Call to HC_LogicalAddress.equals() with argument not of type HC_LogicalAddress!");
HC_LogicalAddress hcla = (HC_LogicalAddress) laddr;
if (ColexIndex > hcla.getColexIndex())
return true;
else
return false;
COM: <s> compares two hc logical address objects p </s>
|
funcom_train/46466791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProduct(String productId, int quantity) {
if(productList == null) {
productList = new HashMap<String, TransactionProduct>();
}
TransactionProduct product = productList.get(productId);
if(product == null) {
productList.put(productId, new TransactionProduct(productId, quantity));
}
else {
product.addQuantity(quantity);
}
}
COM: <s> add one product to a transaction </s>
|
funcom_train/1463482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteUser(User user) throws NoSuchUserException{
logger.debug("deleteUser: user="+user);
if(user.getId() > 0){
return userDao.deleteUser(user.getId());
}else{
User u = getUser(user.getUsername());
if(u != null && u.getId() > 0){
return userDao.deleteUser(u.getId());
}
}
return false;
}
COM: <s> deletes an user account from the system </s>
|
funcom_train/51000359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getGroupList(String user_id) throws SQLException {
Connection con = getConnection();
if(con == null) {
throw new IllegalStateException("Connection not yet opened.");
}
PreparedStatement ps = con.prepareStatement(
"SELECT group_id FROM user_group WHERE " +
"user_id = ?");
ps.setString(1,user_id);
ResultSet rs = ps.executeQuery();
List group_list = createEmptyList();
while(rs.next()) {
group_list.add(rs.getString("group_id"));
}
rs.close();
return group_list;
}
COM: <s> returns a list of groups for a particular user </s>
|
funcom_train/18748431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void convert(GraphShape graph, PrintWriter writer) {
this.writer = writer;
this.indent = 0;
println("(%s", GRAPH_KEYWORD);
println(")");
assert this.indent == 0 : String.format("Conversion ended at indentation level %d", indent);
}
COM: <s> writes a graph to a writer in the requried format </s>
|
funcom_train/6359967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ObservableMapLabelProvider getProvider() {
// KLUDGE: this shouldn't be needed once databinding is working
// NotYetInitializedException.assertOk(_provider!=null, this,
// "Must first call initProvider().");;
if(_provider == null) {
IObservableSet elements = JmeModelContentProvider
.getInstance().getKnownElements();
initProvider(elements);
}
// :KLUDGE
return _provider;
}
COM: <s> gets the label provider </s>
|
funcom_train/3473415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component getRoot(Component component) {
Component result = component;
Component parent = null;
do {
ComponentHandler compHandler = getFirstComponentHandler(result);
if (compHandler != null) {
parent = compHandler.getParent(result);
if (parent != null) {
result = parent;
}
} else {
// just to avoid an endless loop
parent = null;
}
} while (parent != null);
return result;
}
COM: <s> returns the root component of the component tree of a given </s>
|
funcom_train/9555657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resetBorder() {
if (processing) {
setBorder(processingBorder);
} else if (selected) {
setBorder(selectedBorder);
} else if (preview) {
setBorder(previewBorder);
} else if (invalid) {
setBorder(invalidBorder);
} else {
setBorder(null); // Normal border.
}
}
COM: <s> this method sets the border to what it should be </s>
|
funcom_train/48405145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addMovedHandler(com.smartgwt.client.widgets.events.MovedHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.events.MovedEvent.getType()) == 0) setupMovedEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.events.MovedEvent.getType());
}
COM: <s> add a moved handler </s>
|
funcom_train/10252478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set visibleGrantees() {
HashSet grantees = new HashSet();
GranteeManager gm = granteeManager;
if (isAdmin()) {
grantees.addAll(gm.getGrantees());
} else {
grantees.add(this);
Iterator it = getAllRoles().iterator();
while (it.hasNext()) {
grantees.add(it.next());
}
}
return grantees;
}
COM: <s> iteration of all visible grantees including self </s>
|
funcom_train/37189268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel footpage(){
JPanel p = new JPanel();
p.setLayout(new BorderLayout());
p.setBorder(BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
JPanel pLabel = new JPanel();
pLabel.setLayout(new BorderLayout());
pLabel.setBorder(BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
pLabel.add(help);
p.add(pLabel,BorderLayout.CENTER);
return p;
}
COM: <s> build a jpanel which makes it possible to display help messages </s>
|
funcom_train/25646870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() throws FileNotFoundException {
log.debug("Initializing document composer..");
// read fonts from font directory and register to FontFactory
this.registerFonts();
// init IText document and writer
this.doc = new Document(PageSize.A4, 45, 45, 125, 75);
RtfWriter2.getInstance(this.doc, new FileOutputStream(outputFile));
}
COM: <s> pre execution setup and configurations </s>
|
funcom_train/18433141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeSeries(OHLCSeries series) {
if (series == null) {
throw new IllegalArgumentException("Null 'series' argument.");
}
boolean removed = this.data.remove(series);
if (removed) {
series.removeChangeListener(this);
fireDatasetChanged(new DatasetChangeInfo());
//TODO: fill in real change info
}
return removed;
}
COM: <s> removes the specified series from the dataset and sends a </s>
|
funcom_train/8608678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void gameServerDisconnected() {
synchronized (this) {
serverShutdown = true;
/**
* GameServer shutting down, must close all pending login requests
*/
for (AionConnection client : loginRequests.values()) {
// TODO! somme error packet!
client.close(/* closePacket, */true);
}
loginRequests.clear();
loginServer.close(false);
}
log.info("GameServer disconnected from the Login Server...");
}
COM: <s> when game server shutdown have to close all pending client connection </s>
|
funcom_train/2309154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void finishBlock() throws IOException {
if (blockSize > 0 && byteCount >= blockSize) {
try {
obuffer = cipher.doFinal();
byteCount = 0;
} catch (GeneralSecurityException e) {
throw new IOException("cipher failed while doFinal", e);
}
if (obuffer != null) {
output.write(obuffer);
obuffer = null;
}
}
}
COM: <s> finishes the encryption operation for the previous block and reset the </s>
|
funcom_train/40007396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAdd() {
System.out.println("add");
Users user = null;
UserServiceImpl instance = new UserServiceImpl();
instance.add(user);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of add method of class user service impl </s>
|
funcom_train/47184178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeHospitalAssignment(long hcpID, String hospitalID) throws DBException {
Connection conn = null;
PreparedStatement ps = null;
try {
conn = factory.getConnection();
ps = conn.prepareStatement("DELETE FROM HCPAssignedHos WHERE HCPID = ? AND HosID = ?");
ps.setLong(1, hcpID);
ps.setString(2, hospitalID);
return (1 == ps.executeUpdate());
} catch (SQLException e) {
e.printStackTrace();
throw new DBException(e);
} finally {
DBUtil.closeConnection(conn, ps);
}
}
COM: <s> unassigns an hcp to a hospital </s>
|
funcom_train/27675742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Expr readStmnts() {
Expr x = new SkipExpr();
for (;;) {
Expr y = readOptExprPrec( 0 );
if ( y == null ) {
return x;
} else {
x = CommaExpr.make( CheckNoneExpr.make( x ), y );
}
if ( ! this.tryRead( ";" ) ) {
return x;
}
}
}
COM: <s> reads a sequence of expressions from the source </s>
|
funcom_train/26467255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createImportStatements(StringBuffer buf) {
List imports = getImports();
Iterator it = imports.iterator();
while (it.hasNext()) {
buf.append("import ");
buf.append(it.next());
buf.append(";");
buf.append(System.getProperty("line.separator"));
}
}
COM: <s> writes the import statements to the given string buffer </s>
|
funcom_train/11687644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getActiveChildren() throws Exception {
if (endpoint.getChildren() == null) {
return 0;
} else {
int activeCount = 0;
for (Endpoint e : endpoint.getChildren()) {
if (e.getContext().isState(EndpointContext.ST_ACTIVE)) {
activeCount++;
}
}
return activeCount;
}
}
COM: <s> return the number of active children for this endpoint </s>
|
funcom_train/12806611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mergeXfaData(Node n) throws IOException, DocumentException {
XfaForm.Xml2SomDatasets data = new XfaForm.Xml2SomDatasets(n);
for (String string : data.getOrder()) {
String name = string;
String text = XfaForm.getNodeText(data.getName2Node().get(name));
setField(name, text);
}
}
COM: <s> merges an xml data structure into this form </s>
|
funcom_train/48226594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getChkDisplayJDK() {
if (chkDisplayJDK == null) {
chkDisplayJDK = new JCheckBox();
chkDisplayJDK.setName("");
chkDisplayJDK.setText("show JDK artefacts");
chkDisplayJDK.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
options.setShowJDKArtefacts(chkDisplayJDK.isSelected());
}
});
}
return chkDisplayJDK;
}
COM: <s> this method initializes chk display jdk </s>
|
funcom_train/11404491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBuffering(boolean enable) {
buffering = enable;
if (!stream.markSupported()) {
try {
stream = IOUtils.loadIntoBAIS(stream);
} catch (IOException ex) {
LOG.warning(new org.apache.cxf.common.i18n.Message("NO_SOURCE_MARK", BUNDLE).toString());
}
}
}
COM: <s> allows for multiple queries against the same stream </s>
|
funcom_train/29985394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void merge (Config other) {
for (String section : other.getSections ()) {
SProperties p = other.getProperties (section);
if (p == null)
continue;
for (Map.Entry<String, String> me : p.entrySet ()) {
String key = me.getKey ();
String value = me.getValue ();
String merged = getProperty (section, key, value);
setProperty (section, key, merged);
}
}
}
COM: <s> merge this config with another one </s>
|
funcom_train/31873659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLtReal(){
Value v = _rv1.lt(_rv2);
assertTrue("Return type check.", v instanceof BoolValue);
assertTrue("Return value check.", ((BoolValue)v).booleanValue());
assertEquals(new Boolean(true), v.objectValue());
}
COM: <s> tests less than operator of two real values </s>
|
funcom_train/7269339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(TreeSelectionEvent e) {
Object obj = _tree.getLastSelectedPathComponent();
if(obj instanceof OptionsTreeNode) {
OptionsTreeNode node = (OptionsTreeNode)obj;
// only leaf nodes have corresponding panes to display
if(node.isLeaf())
OptionsMediator.instance().handleSelection(node);
else {
_tree.expandPath(new TreePath(node.getPath()));
OptionsMediator.instance().handleSelection((OptionsTreeNode) node.getFirstChild());
}
}
}
COM: <s> implements the code tree selection listener code interface </s>
|
funcom_train/18595483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionRoll(Component comp, int ms) {
Dimension size = comp.getSize();
mousePress(comp, (size.width + 1) / 2, (size.height + 1) / 2,
InputEvent.BUTTON1_MASK);
delay(ms);
mouseRelease(InputEvent.BUTTON1_MASK);
}
COM: <s> press and hold the button for the given length of time in ms </s>
|
funcom_train/18565600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatchParent1(int caller, boolean isSelected) {
if (isSelected) {
commandAll(Calculation.cmdResetBest, caller);
commandAll(Calculation.cmdResetParent1, caller);
command(Calculation.cmdSetParent1, caller);
} else {
command(Calculation.cmdResetParent1, caller);
}
toggleButtons();
}
COM: <s> method dispatch parent1 </s>
|
funcom_train/31343390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getFile(boolean pRefresh) {
String lFolder = mBookMark.getLocalFolder();
String mFile = mFileName;
if (mFile == null || mFile.length() == 0 || mFile.equals("null")
|| pRefresh) {
mFile = getName();
if (mFileName == null || !mFileName.equals(mFile)) {
mFileName = mFile;
}
if (mFile == null) {
return null;
}
}
return DownloadUtil.getLocalEnclosureFile(mFile, lFolder);
}
COM: <s> overrides the xfile method </s>
|
funcom_train/3424389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void synchronizeData() {
// no need to sychronize again
needsSyncData(false);
// get the node data
DeferredDocumentImpl ownerDocument =
(DeferredDocumentImpl)this.ownerDocument;
name = ownerDocument.getNodeName(fNodeIndex);
baseURI = ownerDocument.getNodeValue(fNodeIndex);
} // synchronizeData()
COM: <s> synchronize the entity data </s>
|
funcom_train/43245565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDispositionedDate() {
System.out.println("getDispositionedDate");
ApplicationObject instance = new ApplicationObject();
String expResult = "";
String result = instance.getDispositionedDate();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get dispositioned date method of class org </s>
|
funcom_train/40312341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsAutoIncrement_InvalidColumn2() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.isAutoIncrement(0);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by isAutoIncrement method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests is auto increment with column index equals to 0 </s>
|
funcom_train/18203265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireAssemblyClassified( AssemblyLogic asm, Compotype c ) {
AssemblyTrackerListener l;
AssemblyClassificationEvent e =
new AssemblyClassificationEvent( asm, c );
for( int i = 0; i < m_listeners.size(); i++ ) {
l = m_listeners.get( i );
l.assemblyClassified( e );
}
}
COM: <s> informs all listeners that the specified assembly has been classified </s>
|
funcom_train/49050063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectiveDescType setItemDescription (String inDescription, String inItemId) {
ObjectiveDescType objDesc = null; // return value.
ItemType item = getItem (inItemId);
if (item != null)
objDesc = setItemDescription (inDescription, item);
return objDesc;
} // end setItemDescription (String inDescription, String inItemId).
COM: <s> set the given items description to the given one replacing any existing </s>
|
funcom_train/7230091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getRating(Infantry infantry){
if(!infantry.canCarry(weapon)) return 0;
if(!weapon.getWeaponType().canUnitUseCapturedWeapon(infantry)) return 1;
if(infantry.isLeader()) return 2;
if(!infantry.getCarried().isEmpty()) return 3;
return 4;
}
COM: <s> the higher the rating the better </s>
|
funcom_train/25313542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void or(BooleanVar in1, BooleanVar in2, BooleanVar out) {
int[][] tuples = { { 0, 0, 0 }, { 0, 1, 1 }, { 1, 0, 1 }, { 1, 1, 1 } };
store.impose(new ExtensionalSupportVA(new BooleanVar[] { in1, in2,
out }, tuples));
}
COM: <s> it imposes an extensional constraint enforcing an or relationship </s>
|
funcom_train/37603094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActiveNextDocument() {
OpenDefinitionsDocument key = _activeDocument;
OpenDefinitionsDocument nextKey = _documentNavigator.getNext(key);
if (key != nextKey) setActiveDocument(nextKey);
else setActiveDocument(_documentNavigator.getFirst());
/* selects the active document in the navigator, which signals a listener to call _setActiveDoc(...) */
}
COM: <s> sets the active document to be the next one in the collection </s>
|
funcom_train/39536293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void putUp() {
//getting the currently selected node
int row=table.getSelectedRow();
if(row>0 && row<buttonJwidgetElements.size()) {
ButtonGroupEdition.this.putUp(buttonJwidgetElements.get(row), true);
setCurrentJWidgetElement(tableJwidgetElement);
table.getSelectionModel().setSelectionInterval(row-1, row-1);
}
}
COM: <s> puts this tree node at a upper place </s>
|
funcom_train/25194181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setAttributeValueFromPathName(Object objectToSetOn, String attributePathName, Object value) {
SetAttributeValueVisitor visitor = new SetAttributeValueVisitor();
visitor.setAttributePathName(attributePathName);
visitor.setObjectToSetOn(objectToSetOn);
visitor.setValue(value);
this.visit(visitor);
return visitor.isSuccessfull();
}
COM: <s> this attribute sets an value at an attribute </s>
|
funcom_train/2023146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeNodes(int[] rows) {
int i;
MutableTreeNode[] nodes;
nodes = new MutableTreeNode[rows.length];
for (i = 0; i < rows.length; i++)
nodes[i] = (MutableTreeNode) getPathForRow(rows[i]).getLastPathComponent();
removeNodes(nodes);
}
COM: <s> removes the speicifed lines from the tree </s>
|
funcom_train/28874761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void normalizeInstrument() {
for (int i=0; i<patterns.length; i++) {
int[] instrs=patterns[i].getPatInstr();
for (int j=0; j<patterns[i].DIMENSION; j++) {
if (instrs[j]!=0 && instrs[j]>OFFSET) instrs[j]=instrs[j]-OFFSET;
}
}
}
COM: <s> normalize the instrument in pattern </s>
|
funcom_train/31363703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _showDoxygenOutputStream() throws IOException {
if( ! _showDoxygenOutput ) { return; }
BufferedReader inReader = new BufferedReader( new InputStreamReader( _doxygenProcess.getInputStream() ) );
String line;
while( null != ( line = inReader.readLine() ) ) {
System.out.println( line );
}
}
COM: <s> once doxygen has been executed emit its output stream </s>
|
funcom_train/37241198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Phrase copy(){
Phrase phr = new Phrase(this.title + " copy", this.startTime, this.instrument);
phr.setAppend(this.append);
phr.setPan(this.pan);
phr.setLinkedPhrase(this.linkedPhrase);
Enumeration enum = this.noteList.elements();
while(enum.hasMoreElements()){
phr.addNote( ((Note) enum.nextElement()).copy() );
}
return phr;
}
COM: <s> returns a copy of the entire phrase </s>
|
funcom_train/50531149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerCommand(String name, String cmd) throws IllegalArgumentException {
if ((name == null) || ("".equals(name)))
throw new IllegalArgumentException("Name cannot be null or empty string");
cmdMap.put(name, new String[] {cmd});
}
COM: <s> register a command </s>
|
funcom_train/28766215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setThumbnail(String newVal) {
if ((newVal != null && this.thumbnail != null && (newVal.compareTo(this.thumbnail) == 0)) ||
(newVal == null && this.thumbnail == null && thumbnail_is_initialized)) {
return;
}
this.thumbnail = newVal;
thumbnail_is_modified = true;
thumbnail_is_initialized = true;
}
COM: <s> setter method for thumbnail </s>
|
funcom_train/4393390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfDiffProcessNode (Set<String> existPIDs, Set<String> pidsOfMatch) {
int numberOfDiffAssignedProcNode = 0;
if (!pidsOfMatch.isEmpty()) {
pidsOfMatch.clear();
}
addAllProcessNodeIDs(pidsOfMatch);
for (String pidOfMatch : pidsOfMatch) {
if (!existPIDs.contains(pidOfMatch)) {
numberOfDiffAssignedProcNode++;
}
}
return numberOfDiffAssignedProcNode;
}
COM: <s> returns the number of different ids between the ids of the process nodes </s>
|
funcom_train/41794812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getEstimatedErrorsForBranch(Instances data) throws Exception {
Instances[] localInstances;
double errors = 0;
int i;
if (m_isLeaf)
return getEstimatedErrorsForDistribution(new Distribution(data));
else {
Distribution savedDist = localModel().m_distribution;
localModel().resetDistribution(data);
localInstances = (Instances[]) localModel().split(data);
localModel().m_distribution = savedDist;
for (i = 0; i < m_sons.length; i++)
errors = errors
+ son(i).getEstimatedErrorsForBranch(localInstances[i]);
return errors;
}
}
COM: <s> computes estimated errors for one branch </s>
|
funcom_train/35839901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object copyTaggedValue(TaggedValue source) {
TaggedValue tv = createTaggedValue();
tv.setType(source.getType());
tv.getDataValue().addAll(source.getDataValue());
tv.getReferenceValue().addAll(source.getReferenceValue());
return tv;
}
COM: <s> copy a single tagged value and return the copy </s>
|
funcom_train/1872624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void bfs( int from ) {
List<Integer> q = new LinkedList<Integer>();
int u, du;
q.add(from);
q.add(0);
if( d != null ) d[from] = 0;
color[from]=GREY;
while( ! q.isEmpty() )
{
u = q.remove(0).intValue();
du = q.remove(0).intValue();
for(int j:g.getNeighbours(u))
{
if( color[j]==WHITE )
{
color[j]=GREY;
q.add(j);
q.add(du+1);
if( d != null ) d[j] = du+1;
}
else
{
if( color[j]<0 )
cluster.add(color[j]);
}
}
color[u]=BLACK;
}
}
COM: <s> collects nodes accessible from node from using breadth first search </s>
|
funcom_train/42238503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
// Send the first RTCP packet
long delay = (long) (Math.random() * 1000) + 500;
rtcpTimer.schedule(new RTCPTimerTask(this), delay);
globalReceptionStats.resetBytesRecd();
lastRTCPSendTime = System.currentTimeMillis();
}
COM: <s> starts the sending of rtcp packets </s>
|
funcom_train/38353053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exchangeOutPorts(int x, int y) {
OutPort xPort = (OutPort)outPorts.get(x);
outPorts.set(x, inPorts.get(y));
outPorts.set(y, xPort);
((Port)outPorts.get(y)).setNumber(y);
((Port)outPorts.get(x)).setNumber(x);
firePortsExchangedEvent((Port)outPorts.get(x), (Port)outPorts.get(y));
}
COM: <s> exchanges the outports with index code x code code y code </s>
|
funcom_train/16524589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyFrom(MapLayer other) {
if (!canEdit())
return;
for (int y = bounds.y; y < bounds.y + bounds.height; y++) {
for (int x = bounds.x; x < bounds.x + bounds.width; x++) {
setTileAt(x, y, ((TileLayer) other).getTileAt(x, y));
}
}
}
COM: <s> copy data from another layer onto this layer </s>
|
funcom_train/49608657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GuestRecording updateGuestRecording(String username,EntityManager em,GuestRecording vo) throws Throwable {
try {
return (GuestRecording)JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo);
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
finally {
em.flush();
}
}
COM: <s> update a guest recording </s>
|
funcom_train/11704216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasNext() throws AnalysisEngineProcessException {
timer.startIt();
try {
if (nextCas == null)
nextCas = processUntilNextOutputCas();
return (nextCas != null);
} finally {
timer.stopIt();
getMBean().reportAnalysisTime(timer.getDuration());
}
}
COM: <s> returns whether there are any more cases to be returned </s>
|
funcom_train/44433330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int setPlayerField(int x, int y, int num, boolean isTeamHome) {
int res=-1;
try { res=((Integer)m_setPlayerField.invoke(rch,new Object[] { new Integer(x), new Integer(y), new Integer(num), new Boolean(isTeamHome) } ) ).intValue(); }
catch (Exception e) { e.printStackTrace(); }
return res;
}
COM: <s> sets a player onto the field </s>
|
funcom_train/25310701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addAManifestInJarFile(Manifest mf, ZipOutputStream outputFileZip, String fileName) throws IOException {
// Add ZIP entry to output stream.
outputFileZip.putNextEntry(new ZipEntry(fileName));
mf.write(outputFileZip);
// Complete the entry
outputFileZip.closeEntry();
}
COM: <s> add a manifest to the given </s>
|
funcom_train/33819647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NaturalSet inActiveRegion(){
NaturalSet region;
if(inDegree() > 0){
region = genealogy.snpDomain.createEmptyNaturalSet();
for ( Edge edge : edges ) {
try { if (isTarget(edge)) region.union(edge.activeRegion());}
catch (NaturalSetException e) {genealogy.env().log().printError(e);}
}
} else {
region = genealogy.snpDomain.createCompleteNaturalSet();
} return region;
}
COM: <s> union the active regions on all incoming edges </s>
|
funcom_train/5427099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String registerNewPrefix(String namespace) {
final String prefix = generatePrefix(namespace);
final int stackTop = contextStack.size() - 1;
final ArrayList<String> previousTop = contextStack.get(stackTop);
if (previousTop == null) {
final ArrayList<String> l = new ArrayList<String>(1);
l.add(prefix);
contextStack.set(stackTop, l);
} else {
previousTop.add(prefix);
}
namespaceToPrefixMap.put(namespace, prefix);
prefixToNamespaceMap.put(prefix, namespace);
return prefix;
}
COM: <s> registers new prefix for namespace </s>
|
funcom_train/3631823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void engage(int value) {
for (int i = 0; i < context().currEj().size(); i++) {
EjLine line = (EjLine) context().currEj().line(i);
if (line.lineType() == EjLine.TAX) {
EjTax tax = (EjTax) line;
tax.setActiveTaxRate(EjTax.PRIMARY_TAX);
}
}
}
COM: <s> switch each tax item in the current ej to the primay tax rate </s>
|
funcom_train/4411984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAlignment(String alignment) {
if (ElementTags.ALIGN_LEFT.equalsIgnoreCase(alignment)) {
this.alignment = Element.ALIGN_LEFT;
return;
}
if (ElementTags.RIGHT.equalsIgnoreCase(alignment)) {
this.alignment = Element.ALIGN_RIGHT;
return;
}
this.alignment = Element.ALIGN_CENTER;
}
COM: <s> sets the alignment of this paragraph </s>
|
funcom_train/10383293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCatalinaBase() {
if (System.getProperty(Globals.CATALINA_BASE_PROP) != null)
return;
if (System.getProperty(Globals.CATALINA_HOME_PROP) != null)
System.setProperty(Globals.CATALINA_BASE_PROP,
System.getProperty(Globals.CATALINA_HOME_PROP));
else
System.setProperty(Globals.CATALINA_BASE_PROP,
System.getProperty("user.dir"));
}
COM: <s> set the code catalina </s>
|
funcom_train/18898167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(BlankNode node, long id) throws GraphException {
String nodeString = node.toString();
try {
longToNodeMap.put(nodeString, id);
nodeToLongMap.put(nodeString, id);
}
catch (IOException ioException) {
throw new GraphException("Failed to add mapping.", ioException);
}
}
COM: <s> inserts a mapping between a blank node and a node id </s>
|
funcom_train/15453881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isManager() {
Iterator itAccessLevels = getAccessLevels().iterator();
boolean isManager = false;
while (itAccessLevels.hasNext() && !isManager) {
AccessLevel accessLevel = (AccessLevel) itAccessLevels.next();
isManager = accessLevel.isManager();
}
return isManager;
}
COM: <s> verify when the user has a manager access </s>
|
funcom_train/13935414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String computeNext() {
int size=lastid.length();
char[] idchar= lastid.toCharArray();
for (int i=size-1;i>=0;i--) {
if (idchar[i]<'z') {
idchar[i]++;
return new String(idchar);
}
}
// we have to use a longer id, use an id made of "a" of length = length old id + 1
String nextid="";
for (int i=0;i<size+1;i++) {
nextid=nextid+"a";
}
return nextid;
}
COM: <s> computes the next available id </s>
|
funcom_train/35318791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(String item) {
synchronized (this) {
int index = pItems.indexOf(item);
if (index < 0) {
throw new IllegalArgumentException("item " + item +
" not found in choice");
} else {
removeNoInvalidate(index);
}
}
// This could change the preferred size of the Component.
invalidateIfValid();
}
COM: <s> removes the first occurrence of code item code </s>
|
funcom_train/51812413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetLastModifiedForFile() throws Exception {
URLResource resource = new URLResource(createFile("Hello World").toURI().toURL());
long lastModified = resource.getLastModified();
assertTrue("Not a reasonable last modified, should be using real dates. " + lastModified, lastModified > 2000l );
}
COM: <s> test that ensures that if a url is a file url e </s>
|
funcom_train/44837895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Faculty getFaculty() {
// Lazy load...
try {
if (faculty != null) {
return faculty;
} else {
FacultyHome facultyHome = (FacultyHome) HomeInterfaceFactory.create(
FacultyHome.class,
FacultyHome.COMP_NAME);
faculty = facultyHome.findByPrimaryKey(new FacultyPK(facultyPK));
return faculty;
}
} catch (Exception ex) {
throw new EJBException("Invalid faculty");
}
}
COM: <s> gets the faculty for this semester </s>
|
funcom_train/34146786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyContacts() {
if ( deleted ) {
return;
}
contactLongBuffer.rewind();
contactFloatBuffer.rewind();
// Ode.setContactGroupID( contactGroupId );
// Ode.setWorldID( worldId );
// Add all contacts to contact jointgroup in a single call
if ( contactCount > 0 ) {
Odejava.createContactJoints( worldId, contactGroupId );
}
}
COM: <s> apply contact data to simulation </s>
|
funcom_train/43283921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deSelectAll() {
if ((SWT.CHECK & style) != 0) {
final TableItem[] items = tableViewer.getTable().getItems();
for (int i = 0; i < items.length; i++) {
items[i].setChecked(false);
}
} else {
System.err.println("TODO deselect all");
}
updateUI(false);
}
COM: <s> deselect all tree items </s>
|
funcom_train/24379327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTypeAsXML(FeedbackInlineType type){
String sXML = "";
if (type!=null){
QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "feedbackInline");
JAXBElement<FeedbackInlineType> jaxbe =
new JAXBElement<FeedbackInlineType>(qname, FeedbackInlineType.class, type);
sXML = getXML(jaxbe);
}
return sXML;
}
COM: <s> gets the feedback inline type as an xml string </s>
|
funcom_train/32380435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEditPrivilegeForFailure() {
System.out.println("testEditPrivilegeForFailure");
ResourcePrivileges privilege = null;
ResourcePrivilegeManager resPrivManager = new ResourcePrivilegeManager();
int expResult = IdentityMgmtConstants.ACTION_FAILED;
int result = resPrivManager.editPrivilege(privilege);
assertEquals(expResult, result);
}
COM: <s> test of edit privilege method of class com </s>
|
funcom_train/51361592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonExit() {
if (jButtonExit == null) {
jButtonExit = new JButton();
jButtonExit.setText("Exit");
jButtonExit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.exit(0); // TODO Auto-generated Event stub actionPerformed()
}
});
}
return jButtonExit;
}
COM: <s> this method initializes j button exit </s>
|
funcom_train/28738614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProjectInfo getProjectInfoById(Integer id) throws SimsException {
//String errMsg = clsName + ".getProjectInfoById(): ";
ProjectLocal local;
ProjectInfo info;
try {
local = this.getProjectLocalById(id);
info = local.getProjectInfo();
}
catch (RuntimeException e) {
//Propagate.
throw e;
}
return info;
}
COM: <s> get project info object by id </s>
|
funcom_train/19308716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initGraphicalEnvironment() throws GraphicException {
try {
final BufferedImage bi = new BufferedImage(1, 1,
BufferedImage.TYPE_INT_ARGB);
this.fmg = bi.createGraphics();
} catch (final LinkageError e) {
throw new GraphicException("Unable to create graphical "
+ "environment required to process SVG. Aborting.");
}
}
COM: <s> initializes the graphics environment specifically by ensuring that one </s>
|
funcom_train/3799392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseEntered (MouseEvent e) {
if (e.getComponent() == this) return;
String name = e.getComponent().getName();
if (debug) System.out.println("Entering " + name);
showCircles = (name == "circles");
showDelaunay = (name == "delaunay");
showVoronoi = (name == "voronoi");
repaint();
}
COM: <s> mouse enter events </s>
|
funcom_train/16913773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInput(final int priority, final Collection<? extends Action> input) {
Holder holder = new Holder(priority, input);
int index = Collections.binarySearch(inputs, holder);
if (index < 0) index = -(index + 1);
inputs.add(index, holder);
}
COM: <s> adds an input with the given priority lower has more priority </s>
|
funcom_train/20080304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPagePosition(int x, int y) {
// will cause render
MyDOM.setLeftTop(getElement(), x, y);
if (shadow != null) {
shadow.sync(getBounds());
}
if (framePanel != null) {
framePanel.sync(getElement());
}
}
COM: <s> sets the shells location based on page coordinates </s>
|
funcom_train/4882326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Font getFont3 () {
if (font3 == null) {//GEN-END:|259-getter|0|259-preInit
// write pre-init user code here
font3 = Font.getFont (Font.FACE_SYSTEM, Font.STYLE_ITALIC, Font.SIZE_SMALL);//GEN-LINE:|259-getter|1|259-postInit
// write post-init user code here
}//GEN-BEGIN:|259-getter|2|
return font3;
}
COM: <s> returns an initiliazed instance of font3 component </s>
|
funcom_train/4283525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMnemonics( String mnemonics ) {
StringTokenizer st = new StringTokenizer( mnemonics, "," );
int n = st.countTokens();
for (int i = 0; i < n; i++) {
super.setMnemonicAt( i, Integer.parseInt( st.nextToken().trim() ) );
}
}
COM: <s> sets the keyboard mnemonic for accessing the specified tab </s>
|
funcom_train/13244363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte LSWrite(byte port, byte [] txData, byte rxDataLength) {
byte [] request = {DIRECT_COMMAND_NOREPLY, LS_WRITE, port, (byte)txData.length, rxDataLength};
request = appendBytes(request, txData);
return sendRequest(request);
}
COM: <s> used to request data from an inter integrated circuit i2 c sensor the </s>
|
funcom_train/46752579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValueUnitRef(DisplayModel valueUnitRef) {
if (Converter.isDifferent(this.valueUnitRef, valueUnitRef)) {
DisplayModel oldvalueUnitRef= new DisplayModel(this);
oldvalueUnitRef.copyAllFrom(this.valueUnitRef);
this.valueUnitRef.copyAllFrom(valueUnitRef);
setModified("valueUnitRef");
firePropertyChange(String.valueOf(PARAMETERVALUES_VALUEUNITREFID), oldvalueUnitRef, valueUnitRef);
}
}
COM: <s> quantitative values stored in the parameter value are measure in these units </s>
|
funcom_train/50501229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getTagMaps(String tagName) {
List resultList = new LinkedList();
Iterator mainiter = tags.iterator();
while(mainiter.hasNext()) {
DocletTag currentTag = (DocletTag) mainiter.next();
if(currentTag.getName().equals(tagName))
resultList.add(currentTag.getValueMap());
}
return resultList;
}
COM: <s> gets the tag maps attribute of the doclet tags object </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.