__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/3990348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOcena_zdrowiaPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BadanieOkresowe_ocena_zdrowia_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_ocena_zdrowia_feature", "_UI_BadanieOkresowe_type"),
PrzychodniaPackage.Literals.BADANIE_OKRESOWE__OCENA_ZDROWIA,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the ocena zdrowia feature </s>
|
funcom_train/31955258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doSavePrefs() {
KablogPrefsDB prefsDB = KablogPrefsDB.getDB();
KablogPrefs prefs = prefsDB.getKablogPrefsRecord();
collectFormData(prefs);
//if (debugOn) System.out.println("prefs are set to: " + prefs);
prefsDB.flushPrefs();
}//doSavePrefs
COM: <s> save and close </s>
|
funcom_train/42004729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rt_down( ) {
/* Make sure that you don't "down" a route more than once. */
if(rt_flags == RTF_DOWN) {
return;
}
// assert (rt->rt_seqno%2); // is the seqno odd?
rt_last_hop_count = rt_hops;
rt_hops = Integer.MAX_VALUE;
rt_flags = RTF_DOWN;
rt_nexthop = 0;
rt_expire = 0;
}
COM: <s> disable the routing entry </s>
|
funcom_train/37081085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Properties getProperties() {
getCurrentGamePanel().addSelectedToHistory();
Properties out = new Properties();
for (int i=0; i<gamePanels.length; i++) {
gamePanels[i].putHistoryInProperties(out);
}
// tabbed index
out.put(indexPropString,""+tabbedIndex);
return out;
}
COM: <s> retrieve history and return in properties </s>
|
funcom_train/16461829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Session getSession() {
LOG.trace("ENTER");
LOG.debug("Host [" + server + "]");
LOG.debug("Use SSL [" + isSSL + "]");
Properties props = getPropertiesForHost(server, serverPort, isSSL);
Session session;
if (isSSL) {
session = Session.getInstance(props);
} else {
session = Session.getInstance(props, new EmailSender.SMTPAuthenticator(account, password));
}
session.setDebug(DEBUG_SESSION);
LOG.trace("EXIT");
return session;
}
COM: <s> returns a new session for this server </s>
|
funcom_train/13187734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RegularTimePeriod next() {
RegularTimePeriod result = null;
if (this.millisecond != LAST_MILLISECOND_IN_SECOND) {
result = new Millisecond(this.millisecond + 1, this.second);
}
else {
Second next = (Second) this.second.next();
if (next != null) {
result = new Millisecond(FIRST_MILLISECOND_IN_SECOND, next);
}
}
return result;
}
COM: <s> returns the millisecond following this one </s>
|
funcom_train/49639200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSetModificationTime() throws Exception {
long start = storage.getModificationTime(testBase1);
assertEquals(storage.getStorageStartTime(), start);
storage.flush(new Record(testId1, testBase1, testContent1));
long newMtime = storage.getModificationTime(testBase1);
assertTrue(start < newMtime);
}
COM: <s> test get and set of modification time </s>
|
funcom_train/29019375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add (int[] pointArray) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);
int /*long*/ polyRgn = OS.CreatePolygonRgn(pointArray, pointArray.length / 2, OS.ALTERNATE);
OS.CombineRgn (handle, handle, polyRgn, OS.RGN_OR);
OS.DeleteObject (polyRgn);
}
COM: <s> adds the given polygon to the collection of polygons </s>
|
funcom_train/25650334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImageItemSelection(boolean showImages, boolean fitToCell) {
if (!showImages) {
showImagesItem.setSelected(true);
} else if (fitToCell) {
resizeToCellItem.setSelected(true);
} else {
resizeToImageItem.setSelected(true);
}
}
COM: <s> sets the correct view images menu item selected </s>
|
funcom_train/14070443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TriggerVO getTrigger(String deviceId,TriggerVO.State state) throws DataException {
String key = deviceId + "|" + state.name();
try {
return primaryIndex.get(key);
}
catch (DatabaseException e) {
logger.log(Level.SEVERE,"Getting " + key,e);
throw new DataException("Unable to get trigger for " + key);
}
}
COM: <s> get the trigger for the device and state </s>
|
funcom_train/13954177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EOEditingContext editingContext() {
if (editingContext == null) {
if (!hasCooperatingObjectStores()) {
LogLog.warn("Creating editing context for the ERCMailMessageAppender before any cooperating object stores have been added.");
}
editingContext = new EOEditingContext();
editingContext.setDelegate(_delegate);
}
return editingContext;
}
COM: <s> gets the editing context to use for creating </s>
|
funcom_train/20084952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean receiveClientMoves(String ClientID,WorldMove[] move){
boolean out=false;
if(incomingSMoves.get(ClientID) instanceof Map ){
for(WorldMove elem: move)
incomingSMoves.get(ClientID).put(elem.getActingCharacterID(),elem);
}else{
incomingSMoves.put(ClientID, new HashMap<String,WorldMove>());
for(WorldMove elem: move)
incomingSMoves.get(ClientID).put(elem.getActingCharacterID(),elem);
}
return out;
}
COM: <s> this method computes all incomming moves and adds them to all client queues </s>
|
funcom_train/4881654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getVoltarMenu () {
if (voltarMenu == null) {//GEN-END:|145-getter|0|145-preInit
// write pre-init user code here
voltarMenu = new Command ("SALVAR", "Salvar e ir para o Menu", Command.SCREEN, 0);//GEN-LINE:|145-getter|1|145-postInit
// write post-init user code here
}//GEN-BEGIN:|145-getter|2|
return voltarMenu;
}
COM: <s> returns an initiliazed instance of voltar menu component </s>
|
funcom_train/49248520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cleanSchemas(CatalogMD catalog) {
List<SchemaMD> schemasToRemove=new ArrayList<SchemaMD>();
for(SchemaMD schema:catalog.getSchemas()) {
if (schema.getElements().isEmpty()) schemasToRemove.add(schema);
}
for(SchemaMD schemaToRemove:schemasToRemove) {
schemaToRemove.getCatalog().removeSchema(schemaToRemove);
}
}
COM: <s> remove unused schemas </s>
|
funcom_train/37017579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyPressed(KeyEvent e) {
if (e.getKeyCode()==KeyEvent.VK_ENTER) {
// OK
if(e.getSource() == theOkButton){
okAction();
}else
// Cancel
if(e.getSource() == theCancelButton){
cancelAction();
}
}
}
COM: <s> handle the key pressed event </s>
|
funcom_train/38864475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getStnList() {
Vector sList = new Vector();
for (int i = 0; i < iData.size(); i++) {
IonoData id = (IonoData) iData.elementAt(i);
if (!sList.contains(id.getStn())) {
sList.addElement(id.getStn());
}
}
return sList;
}
COM: <s> get a vector of stations station code strings from the vector of data </s>
|
funcom_train/168519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sizeColumnsToFit(int resizingColumn) {
super.sizeColumnsToFit(resizingColumn);
if (getEditingColumn() != -1 && getColumnClass(editingColumn) ==
TreeTableModel.class) {
Rectangle cellRect = getCellRect(realEditingRow(),
getEditingColumn(), false);
Component component = getEditorComponent();
component.setBounds(cellRect);
component.validate();
}
}
COM: <s> this is overridden to invoke supers implementation and then </s>
|
funcom_train/43658021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void completeCollectionStatistics(Map collections, CollectionKey key, CollectionInformation information) {
CollectionActivity activity = (CollectionActivity) collections.get(key);
if (activity == null) {
collections.put(key, new CollectionActivity(information));
} else {
activity.add(information);
}
}
COM: <s> adds a collection information for a collection key </s>
|
funcom_train/13259614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractButton removeButton(AbstractJMTAction action) {
ButtonWithGroup data = buttons.remove(action);
if (data != null) {
remove(data.button);
// Removes from group
JMTButtonGroup group = getButtonGroup(data.group);
if (group != null) {
group.remove(data.button);
// Removes group if empty
if (group.getButtonCount() == 0) {
buttonGroups.remove(new Integer(data.group));
}
}
// Removes listener (if any)
if (data.listener != null) {
data.listener.remove();
}
return data.button;
}
return null;
}
COM: <s> removes any type of button including toggle ones from this toolbar </s>
|
funcom_train/7470766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tagDefineFontInfo(int fontId, String fontName, int flags, int[] codes) throws IOException {
// System.out.println("-defineFontInfo id=" + fontId + ", name=" +
// fontName);
fontCodes.put(new Integer(fontId), codes);
}
COM: <s> swftag types interface save the text font character code info </s>
|
funcom_train/12855757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Clob createNewClob(int blockSize) throws PersistException {
StoredLob lob = mLobStorage.prepare();
lob.setLocator(mLocatorSequence.nextLongValue());
lob.setBlockSize(blockSize);
lob.setLength(0);
lob.insert();
return new ClobImpl(lob.getLocator());
}
COM: <s> returns a new clob whose length is zero </s>
|
funcom_train/51337769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_shutdown_interrupted() throws InterruptedException {
final MockTransactionService service = newFixture();
try {
// final long tx =
service.newTx(ITx.UNISOLATED);
final Thread t = new Thread() {
public void run() {
service.shutdown();
}
};
t.setDaemon(true);
t.start();
service.awaitRunState( TxServiceRunState.Shutdown);
// interrupt the thread running shutdown().
t.interrupt();
service.awaitRunState( TxServiceRunState.Halted);
} finally {
service.destroy();
}
}
COM: <s> test that shutdown may be interrupted while waiting for a tx to </s>
|
funcom_train/8323616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void quoteTimestampLiteral(StringBuilder buf, String value) {
// NOTE jvs 1-Jan-2007: See quoteTimestampLiteral for explanation.
try {
java.sql.Timestamp.valueOf(value);
} catch (IllegalArgumentException ex) {
throw new NumberFormatException(
"Illegal TIMESTAMP literal: " + value);
}
buf.append("TIMESTAMP ");
Util.singleQuoteString(value, buf);
}
COM: <s> appends to a buffer a timestamp literal </s>
|
funcom_train/47509541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(AssuntoPadronizado entity) {
EntityManagerHelper.log("saving AssuntoPadronizado instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved assunto padronizado entity </s>
|
funcom_train/18647322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EList getExchangeDetails() {
EList ret=newList();
java.util.Iterator iter=
((Interaction)getCDLType()).
getExchangeDetails().iterator();
while (iter.hasNext()) {
ExchangeDetails ed=(ExchangeDetails)iter.next();
ret.add(new ExchangeDetailsRoleProjection(ed,
getProjectionRoleTypes()));
}
return(ret);
}
COM: <s> this method returns the list of exchange details </s>
|
funcom_train/48786298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getAttribute(Node node, String key) {
NamedNodeMap nodeMap = node.getAttributes();
if (nodeMap != null) {
Node item = nodeMap.getNamedItem(key);
return (item != null) ? item.getNodeValue() : null;
}
else {
return null;
}
}
COM: <s> return the string value of the specified attribute </s>
|
funcom_train/50152082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close(int num) throws Exception, Warning {
for (Subtask st : TaskModel.getReference().getSubTasks(num)) {
if (st.getCloseDate() == null) {
throw new Warning(Resource.getResourceString("open_subtasks"));
}
}
Task task = getTask(num);
task.setState(TaskModel.getReference().getTaskTypes()
.getFinalState(task.getType()));
savetask(task);
}
COM: <s> close a task </s>
|
funcom_train/44109198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireNavigationStateChanged(int idx) {
int size = navigationStateListeners.size();
for(int i = 0; i < size; i++) {
try {
NavigationStateListener l =
(NavigationStateListener)navigationStateListeners.get(i);
l.navigationStateChanged(idx);
} catch(Exception e) {
System.out.println("Error sending navigation state changed " + e);
e.printStackTrace();
}
}
}
COM: <s> fire a navigation state changed event </s>
|
funcom_train/13314711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(NadicRelationJoin n, A argu) {
n.nodeToken.accept(this, argu);
n.nodeOptional.accept(this, argu);
n.nodeToken1.accept(this, argu);
n.relationExpCommalist.accept(this, argu);
n.nodeToken2.accept(this, argu);
}
COM: <s> node token join </s>
|
funcom_train/36175702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkFaucetValidity(IFaucet faucet) {
if (faucet instanceof IDemuxFaucet)
throw new IllegalArgumentException("Faucet '" + faucet.getId() +
"' is an IDemuxFaucet instance. This is not allowed.");
if (faucet instanceof IFaucetTemplate)
throw new IllegalArgumentException("Faucet '" + faucet.getId() +
"' is an IFaucetTemplate instance. This is not allowed.");
}
COM: <s> helper method to check the faucet validity </s>
|
funcom_train/43221835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
if(util.util.DebugMainWindow)
System.out.println("Creating Content Frame");
jContentPane = new JPanel();
jContentPane.setLayout(new GridLayout(0,1));
jContentPane.add(getTabbedPane());
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/7530150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerDefaultClassLoader(ClassLoader loader) {
registerComponent(loader == null ? getClass().getClassLoader() : loader, ClassLoader.class);
// make sure the class loader is non-volatile, so it survives restarts.
componentLookup.get(ClassLoader.class.getName()).nonVolatile = true;
}
COM: <s> registers the default class loader </s>
|
funcom_train/46335321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateFitness(){
for (int i = 0; i < this.particles.length; i++){
double fitness = particles[i].updateFitness();
if (fitness < this.gBestFitness){
this.gBestFitness = fitness;
this.gBestPosition = particles[i].getPos();
} //end if
} //end for
} //end updateFitness()
COM: <s> updates fitness of every particle syncronously </s>
|
funcom_train/12924737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HorizontalAlign getAlignment() {
HorizontalAlign value;
switch (alignment) {
case 0:
value = HorizontalAlign.LEFT;
break;
case Coder.BIT0:
value = HorizontalAlign.RIGHT;
break;
case Coder.BIT1:
value = HorizontalAlign.CENTER;
break;
case Coder.BIT0 | Coder.BIT1:
value = HorizontalAlign.JUSTIFY;
break;
default:
throw new IllegalStateException();
}
return value;
}
COM: <s> get the alignment of the text either align left align right </s>
|
funcom_train/15817841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModuleType getModuleType() {
// if (moduleType == null) {
// moduleType = manager.getModuleType(tmID);
//
// }
// return moduleType;
if (moduleType != null) {
return moduleType;
}
//or get it from the parent node
return ((JonasModuleNode) node).getModuleType();
}
COM: <s> get the type of the module and put it in module type </s>
|
funcom_train/39380344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValidationJavaScript() {
if (isRequired()) {
Object[] args = new Object[3];
args[0] = getId();
args[1] = String.valueOf(isRequired());
args[2] = getMessage("file-required-error", getErrorLabel());
return MessageFormat.format(VALIDATE_FILEFIELD_FUNCTION, args);
} else {
return null;
}
}
COM: <s> return the file field java script client side validation function </s>
|
funcom_train/50370540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeDoneJobToSpace(String jobID) {
try {
JobDocument job = jobs.remove(jobID);
if (job != null) {
job.getJob().setStatus(StatusType.DONE);
if(requireDelegation){
getPerUserClient(job.getJob().getClientName()).write(job);
}
else{
client.write(job);
}
}
} catch (Exception e) {
logger.error("Error writing DONE job to space", e);
}
}
COM: <s> writes a done job back into the space </s>
|
funcom_train/34105171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getViolation() {
double left = this.left;
double right = this.right;
Block b = blocks.get(source);
Double o = offset.get(source);
if (b != null && o != null) {
left = b.pos + o;
}
b = blocks.get(target);
o = offset.get(target);
if (b != null && o != null) {
right = b.pos + o;
}
return new Double(Math.ceil(left + gap - right)).intValue();
}
COM: <s> the amount of overlap between the 2 nodes </s>
|
funcom_train/35837998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenuItem insert(JMenuItem mi, int pos) {
if (pos < 0) {
throw new IllegalArgumentException("index less than zero.");
}
//AccessibleContext ac = mi.getAccessibleContext();
//ac.setAccessibleParent(this);
//ensurePopupMenuCreated();
//popupMenu.insert(mi, pos);
//return mi;
return null;
}
COM: <s> inserts the specified code jmenuitem code at a given position </s>
|
funcom_train/24934837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int calculateDistance(Lifeline src) {
// src is actors lifeline -> return column of this lifeline
if (src == null)
return column();
// src is this lifeline -> return 0
if (src == this)
return 0;
// return differende between column of src and this
return (column() - src.column());
}
COM: <s> calculates the difference between this and another lifeline </s>
|
funcom_train/22076972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean save(Variable variable, Collection variables) {
boolean result = false;
if (nameAlreadyInUse(variable.getId(), variable.getName(), variables)) {
result = true;
} else if (variable.getId().equals("")) {
add(variable, variables);
} else {
modify(variable, variables);
}
return result;
}
COM: <s> add a new variable or edit an already existing one returns the statement </s>
|
funcom_train/51631319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean canEnable(final IStructuredSelection selection) throws JavaModelException {
if (selection.size() == 1) {
final Object element= selection.getFirstElement();
if (element instanceof IType) {
final IType type= (IType) element;
return type.getCompilationUnit() != null && type.isClass();
}
if (element instanceof ICompilationUnit)
return true;
}
return false;
}
COM: <s> can this action be enabled on the specified selection </s>
|
funcom_train/11734394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String replace(String sql) {
String result = sql;
for (Map.Entry<String, String> entry : varReplacement.entrySet()) {
result = Text.replace(result, entry.getKey(), entry.getValue()).trim();
}
return result;
}
COM: <s> applies the variable replacement to the given string </s>
|
funcom_train/15662889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ApptimersBean loadUniqueUsingTemplate(ApptimersBean bean) throws DAOException {
ApptimersBean[] beans = this.loadUsingTemplate(bean);
if (beans.length == 0) {
return null;
}
if (beans.length > 1) {
throw new ObjectRetrievalException("More than one element !!");
}
return beans[0];
}
COM: <s> loads a unique apptimers bean bean from a template one giving a c </s>
|
funcom_train/18287079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleClassDelta(IResourceDelta delta, IResource resource) {
// If this is a library class, it will be handled elsewhere
if (!isLibraryResource(libraryPaths, resource)) {
switch (delta.getKind()) {
case IResourceDelta.ADDED:
case IResourceDelta.CHANGED:
if (buildInfo.isOutputResource(resource)) {
// Batch up class updates so they can be verified
// in one go
addedOrChangedClasses.add(resource);
}
break;
case IResourceDelta.REMOVED:
removedClasses.add(resource);
break;
}
}
}
COM: <s> handle a change in a class </s>
|
funcom_train/17731760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(Map init) {
super.initialize(init);
extensions_ = new CaseInsensetiveSet(new HashSet());
extensions_.addAll(Arrays.asList(new String[] {
"pdf",
"html",
"htm",
"dvi",
"xml"
}
));
}
COM: <s> builds the list of viewable file types </s>
|
funcom_train/9470248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(int index) throws JSONException {
try {
Object value = values.get(index);
if (value == null) {
throw new JSONException("Value at " + index + " is null.");
}
return value;
} catch (IndexOutOfBoundsException e) {
throw new JSONException("Index " + index + " out of range [0.." + values.size() + ")");
}
}
COM: <s> returns the value at </s>
|
funcom_train/8123871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toContSelection(byte strength)throws ParseException{
for(Enumeration<ExpressionDescription> e = chunks.elements() ; e.hasMoreElements() ;){
Object o = e.nextElement();
try {
((AssignableSelection) o).toContSelection(strength);
} catch (ClassCastException cex) {
throw new ParseException ("this type of expression cannot be continuously assigned: " +
o);
}
}
}
COM: <s> convert this to a wire assignable selection expression </s>
|
funcom_train/32631803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEnvironmentString() {
System.out.println("-> testGetEnvironmentString");
String env = "Directory";
getSession().setEnvironmentString(env, "XXX", false);
String value = getSession().getEnvironmentString(env);
assertTrue("Environment not found: " + env, value != null && ((String) value).length() > 0);
}
COM: <s> tests get environment string string </s>
|
funcom_train/39478086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getOutPrefixBase() {
if (prefixBase == null) {
final String tmpPrefix = props.getProperty(Constants.PROP_OUT);
final int tmpPos = Math.max(tmpPrefix.lastIndexOf('/'), tmpPrefix.lastIndexOf('\\'));
prefixBase = (tmpPos > 0) ? tmpPrefix.substring(tmpPos + 1) : tmpPrefix;
}
return prefixBase;
}
COM: <s> returns filename without suffix for output jar file </s>
|
funcom_train/37126583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void waitTillCompletelyDone() {
// first wait for it to start
try {
// then wait for it to finish
while (! _threads.isEmpty()) {
synchronized(_threads) {
_threads.wait();
_logger.debug("threads left: " + _threads.size());
}
}
} catch (InterruptedException ix) {
// do nothing
}
}
COM: <s> warning this is a hack and should only be used in unit tests </s>
|
funcom_train/4519230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RButton getRButton31112() {
if (RButton31112 == null) {
RButton31112 = new RButton(0);
RButton31112.setText("ListTable");
RButton31112.setBounds(new Rectangle(550, 170, 120, 30));
RButton31112.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
(new TestListTable()).setVisible(true);
}
});
}
return RButton31112;
}
COM: <s> this method initializes rbutton31112 </s>
|
funcom_train/14012610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getPropertyClass(String propertyName) {
PropertyDescriptor propertyDescriptor = getPropertyDescriptor(propertyName);
if (propertyDescriptor == null) {
return null;
} else if (propertyDescriptor instanceof IndexedPropertyDescriptor) {
return ((IndexedPropertyDescriptor) propertyDescriptor).getIndexedPropertyType();
} else {
return propertyDescriptor.getPropertyType();
}
}
COM: <s> returns the code class code of a specific property </s>
|
funcom_train/50821838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void register(Actor a) {
this.enterHandler = new ButtonEnterHandler();
a.registerListener(this.enterHandler,
Mouse.CATEGORY, Mouse.MOUSE_ENTERED);
this.exitHandler = new ButtonExitHandler();
a.registerListener(this.exitHandler,
Mouse.CATEGORY, Mouse.MOUSE_EXITED);
}
COM: <s> registers this renderer with the mouse enter exit listeners </s>
|
funcom_train/50479460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMessageNumbers(final int startIndex, final int delta) {
for (Iterator<MessageExt> i = folderExt.getMessages().iterator(); i
.hasNext();) {
MessageExt messageExt = i.next();
int messageNumber = messageExt.getMessageNumber();
if (messageNumber >= startIndex) {
messageExt.setMessageNumber(messageNumber + delta);
}
}
}
COM: <s> updates all message numbers according to the specified arguments </s>
|
funcom_train/47826815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String output = "Directed Acyclic Graph: \n";
for (V vertex : vertexEdgesSet.keySet()) {
output = output + "Vertex = " + vertex.toString() + "\n";
output = output + vertexEdgesSet.get(vertex).toString();
}
return output;
}
COM: <s> returns a string representing the dag </s>
|
funcom_train/22101032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEqualsTimestampNotSpecified() throws Exception {
long value = 1000;
MetricValue mval1 = new MetricValue(value);
// sleep 10 msec to make sure we get a new system time value
Thread.sleep(10);
MetricValue mval2 = new MetricValue(value);
assertFalse(mval1.equals(mval2));
}
COM: <s> if the timestamp is not specified and set to the current system time </s>
|
funcom_train/4388436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Store getStore(MailServer mailServer) throws MailSessionException {
try {
Store store = getSession().getStore(mailServer.getProtocol().toString());
store.connect(mailServer.getHostname(), mailServer.getUsername(),
decipherPassword(mailServer.getPassword()));
return store;
} catch (MessagingException e) {
throw new MailSessionException(e);
}
}
COM: <s> gets the store </s>
|
funcom_train/5361777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flush() {
if (count == 0) {
return;
}
// don't print out blank lines; flushing from PrintStream puts out these
if (count == 1 && ((char) buf[0]) == '\n') {
reset();
return;
}
final byte[] theBytes = new byte[count];
System.arraycopy(buf, 0, theBytes, 0, count);
category.log(priority, new String(theBytes));
reset();
}
COM: <s> flushes this output stream and forces any buffered output bytes to be </s>
|
funcom_train/43245748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetUtilizationReviewRequired() {
System.out.println("setUtilizationReviewRequired");
boolean utilizationReviewRequired = true;
InsuranceDG1Object instance = new InsuranceDG1Object();
instance.setUtilizationReviewRequired(utilizationReviewRequired);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set utilization review required method of class org </s>
|
funcom_train/10980558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String property, ActionMessage message) {
ActionMessageItem item = (ActionMessageItem) messages.get(property);
List list;
if (item == null) {
list = new ArrayList();
item = new ActionMessageItem(list, iCount++, property);
messages.put(property, item);
} else {
list = item.getList();
}
list.add(message);
}
COM: <s> p add a message to the set of messages for the specified property </s>
|
funcom_train/495229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Appearance createRulerAppearance() {
Appearance materialAppear = new Appearance();
PolygonAttributes polyAttrib = new PolygonAttributes();
polyAttrib.setCullFace(PolygonAttributes.CULL_NONE);
materialAppear.setPolygonAttributes(polyAttrib);
Material material = new Material();
material.setDiffuseColor(new Color3f(1.0f, 1.0f, 1.0f));
materialAppear.setMaterial(material);
return materialAppear;
}
COM: <s> create the appearance to apply to the ruler </s>
|
funcom_train/3451187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findNMModule(String name) {
int i;
NMModule m;
// with few modules, a sequential search is fast enough
for (i = 0; i < nmModules.size(); i++) {
m = (NMModule)nmModules.get(i);
if (m.getName().equalsIgnoreCase(name)) {
return i + 1;
}
}
return -1;
}
COM: <s> find module return its index in module table first entry 1 </s>
|
funcom_train/22555119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addQuestionAfter(Question refques, Question moveques) {
// THIS METHOD IS OVERWRITTEN IN QPs!
// important when this is a questionnaire! Those questions can only be links to questions in questionnaires to questionpools
int index = getQuestionVector().indexOf(refques);
if (index==-1) return;
this.questionURIs.add(index+1, moveques.getUri());
addTreeNode(index+1, moveques);
QAModelManager.fireUpdatedEvent(this);
}
COM: <s> adds a question given as parameter after another question given as parameter </s>
|
funcom_train/313759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNumericFunctions() throws SQLException {
return "ABS,ACOS,ASIN,ATAN,ATAN2,BIT_COUNT,CEILING,COS,"
+ "COT,DEGREES,EXP,FLOOR,LOG,LOG10,MAX,MIN,MOD,PI,POW,"
+ "POWER,RADIANS,RAND,ROUND,SIN,SQRT,TAN,TRUNCATE";
}
COM: <s> get a comma separated list of math functions </s>
|
funcom_train/2952763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConfigItem getItemForResource(String resourcePath) {
for (Iterator it = this.items.iterator(); it.hasNext();) {
ConfigItem item = (ConfigItem) it.next();
if (item.getResourcePath().equals(resourcePath)) {
return item;
}
}
return null;
}
COM: <s> returns the item for the resource with the given path relative </s>
|
funcom_train/44167816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDestination(Location destination) {
if (destination != null) {
if (!destinations.contains(destination)) {
destinations.add(destination);
} else {
logger.warning(getId() + " already included destination " + destination.getId());
}
} else {
logger.warning("Tried to add null destination to " + getId());
}
}
COM: <s> add a single destination to this high seas instance </s>
|
funcom_train/943580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(Observable aPublisher, Object aData) {
if (aPublisher == ModelManager.getModelManager().getGeneralLookPreferencesEditor()) {
this.setFont(this.getFont().deriveFont(
(float) ModelManager.getModelManager().getGeneralLookPreferencesEditor().getFontSize()));
updateUI();
}
}
COM: <s> synchronize the state of this object with the state of the object that </s>
|
funcom_train/41761664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void next() {
if (hasNext()) {
currentPage = pagesIterator.next();
if(viewAnimator != null && cachedContext != null) {
viewAnimator.setInAnimation(cachedContext,R.anim.slide_from_right);
viewAnimator.setOutAnimation(cachedContext,R.anim.slide_to_left);
viewAnimator.showNext();
}
}
}
COM: <s> advances to the next page in the sequence </s>
|
funcom_train/50168579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean parseDateFormat(Element dateFormatElement) {
String dateFormatTag = dateFormatElement.getTagName();
if (dateFormatTag.equals("dateFormat") == false) {
return false;
} //end if ()
String fieldValue = parsingUtility.getFieldValue(dateFormatElement);
setDateFormat(fieldValue);
return true;
}
COM: <s> method should probably be deprecated </s>
|
funcom_train/4778791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCounts(SearchCounts searchCounts) {
if (this.counts == null) {
this.counts = new ConcurrentHashMap<String, SearchCounts>(1);
}
if (searchCounts != null) {
this.counts.put(searchCounts.getKey(), searchCounts);
}
}
COM: <s> add search counts to this set of search results </s>
|
funcom_train/42916979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCaptureCommand() {
if (captureCommand == null) {//GEN-END:|78-getter|0|78-preInit
// write pre-init user code here
captureCommand = new Command("Capturer", Command.OK, 0);//GEN-LINE:|78-getter|1|78-postInit
// write post-init user code here
}//GEN-BEGIN:|78-getter|2|
return captureCommand;
}
COM: <s> returns an initiliazed instance of capture command component </s>
|
funcom_train/14322850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean updateLocalizerParameters(OpProjectSession session, OpSettings settings) {
boolean refresh = false;
Map<String, String> oldLocalizerParameters = session.getLocalizerParameters();
Map<String, String> newLocalizerParameters = settings.getI18NParameters(session);
if (!oldLocalizerParameters.equals(newLocalizerParameters)) {
session.setLocalizerParameters(newLocalizerParameters);
refresh = true;
}
return refresh;
}
COM: <s> updates the i18n parameters with the new settings values </s>
|
funcom_train/50067156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getAutoModeCommand() {
if (autoModeCommand == null) {//GEN-END:|176-getter|0|176-preInit
// write pre-init user code here
autoModeCommand = new Command("Auto-mode", Command.OK, 1);//GEN-LINE:|176-getter|1|176-postInit
// write post-init user code here
}//GEN-BEGIN:|176-getter|2|
return autoModeCommand;
}
COM: <s> returns an initiliazed instance of auto mode command component </s>
|
funcom_train/50077306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer(32);
sb.append(this.getClass().getName());
sb.append(" [");
sb.append("name=");
sb.append(getName());
sb.append(", members.size()=");
sb.append(members.size());
sb.append("]");
return sb.toString();
}
COM: <s> a string representation of the group </s>
|
funcom_train/36671979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
// rebuildLocalDatabase();
// fill lists from local database
getFromLocalAddresses();
getFromLocalContacts();
fireUpdateEvent();
// synchronize local data with remote database
synchronize();
// regularly synchronize in-memory list to local db and remote db
syncTimer = new Timer() {
@Override
public void run() {
synchronize();
}
};
syncTimer.scheduleRepeating(5000);
}
COM: <s> initializes the in memory lists of contacts and addresses </s>
|
funcom_train/4210330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendOpenBlockQuoteTag(String style) {
StringBuilder sb = new StringBuilder("<blockquote");
if (style != null) {
sb.append(" style=\"");
sb.append(style);
sb.append("\"");
}
sb.append(">");
text.append(sb.toString());
}
COM: <s> appends a tag that indicates that a blockquote section begins </s>
|
funcom_train/14378012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(QuakeFile f) throws IOException {
f.writeInt(firstframe);
f.writeInt(lastframe);
if (frame == null) {
f.writeInt(-1);
} else {
f.writeInt(frame.length);
for (int n = 0; n < frame.length; n++) {
frame[n].write(f);
}
}
f.writeAdapter(eindFunctie);
}
COM: <s> writes the structure to a random acccess file </s>
|
funcom_train/19244103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void kestQedeqSetTheoryScript1() throws Exception {
final QedeqBo bo = check(new SixDynamicModel(), getDocDir(), "math/qedeq_set_theory_v1.xml");
assertEquals(0, bo.getErrors().size());
assertEquals(52, bo.getWarnings().size());
}
COM: <s> test set theory script for heuristic errors with default model </s>
|
funcom_train/8629293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addValueSorted(int value) {
int l = 0, r = size;
while (l < r) {
int i = (l + r) >>> 1;
int d = data[i];
if (d == value) {
return;
} else if (d > value) {
r = i;
} else {
l = i + 1;
}
}
add(l, value);
}
COM: <s> insert an element at the correct position in a sorted list </s>
|
funcom_train/20480047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer linkString = new StringBuffer(name + " " + rank + " ");
if (links.length > 0) {
linkString.append(links[0]);
}
for (int i = 1; i < links.length; i++) {
linkString.append(DELIM + links[i]);
}
return linkString.toString();
}
COM: <s> the written representation </s>
|
funcom_train/29572893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRgroupQuery4_restH() throws Exception {
String modifiedQuery=RGROUP_QUERY_4.replace(
"M LOG 1 4 0 0 0,>0",
"M LOG 1 4 0 1 0,>0");
performQuery(modifiedQuery, "N", 4);
}
COM: <s> test r group query 4 rest h trie </s>
|
funcom_train/24060936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand() {
if (exitCommand == null) {//GEN-END:|30-getter|0|30-preInit
// write pre-init user code here
exitCommand = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|30-getter|1|30-postInit
// write post-init user code here
}//GEN-BEGIN:|30-getter|2|
return exitCommand;
}
COM: <s> returns an initiliazed instance of exit command component </s>
|
funcom_train/50892124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCursor(int column, int row) {
this.newCursorx = column;
this.newCursory = row;
/*
int x = newCursorx * (FONTWIDTH + WIDTH_SPACE);
int y = newCursory * (FONTHEIGHT + HEIGHT_SPACE);
redraw(x - 2, y - 2, FONTWIDTH + WIDTH_SPACE + 4,
FONTHEIGHT + HEIGHT_SPACE + 4, true);
*/
}
COM: <s> defines which row and column is currently under </s>
|
funcom_train/32057653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRegisterListeners() {
System.out.println("testRegisterListeners");
GPGraphpad pad = new GPGraphpad();
GPGraph graph = new GPGraph();
GraphUndoManager undo = new GraphUndoManager();
GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo);
try {
newDoc.registerListeners(graph);
} catch (Exception e) {
fail();
}
}
COM: <s> test of register listeners method of class gpdocument </s>
|
funcom_train/35294678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void historizeCombo(JComboBox cb) {
Object o = cb.getSelectedItem();
if (o != null && !"".equals(o)) {
int found = -1;
for (int i = 0; i < cb.getItemCount(); i++) {
if (o.equals(cb.getItemAt(i))) {
found = i;
break;
}
}
if (found < 0) {
cb.addItem(o);
} else {
cb.setSelectedIndex(found);
}
}
}
COM: <s> historize the current value of the combobox </s>
|
funcom_train/11687776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getMessagesSent() {
if (endpoint.getChildren() != null) {
long messagesSent = 0;
for (Endpoint e : endpoint.getChildren()) {
if (e.getMetricsMBean() != null) {
messagesSent += e.getMetricsMBean().getMessagesSent();
}
}
return messagesSent;
} else {
return messagesSent;
}
}
COM: <s> number of messages sent </s>
|
funcom_train/31804634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration toLines() {
Enumeration secrets = secrets();
if (secrets == null) {
return null;
}
boolean bFirst = true;
Vector lines = new Vector();
while (secrets.hasMoreElements()) {
if (!bFirst) {
lines.addElement("");
}
SharedSecret secret = (SharedSecret)secrets.nextElement();
Enumeration lns = secret.toLines();
if (lns != null) {
while (lns.hasMoreElements()) {
String line = (String)lns.nextElement();
lines.addElement(line);
}
}
bFirst = false;
}
return lines.elements();
}
COM: <s> returns lines representation of the shared secret </s>
|
funcom_train/51812369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testThrowsExceptionForNonExistentResource() {
try {
new ClassPathResource("foo/bar");
fail("No Exception thrown");
}
catch (IllegalArgumentException e) {
assertTrue("foo/bar not in message", e.getMessage().indexOf("foo/bar") != -1 );
}
}
COM: <s> test that makes sure that a non existant resource throws an appropriate </s>
|
funcom_train/12686336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSelected(ItemType value) {
for (int j=0; j<listModel.getSize(); j++) {
CheckBoxListElement<ItemType> element = (CheckBoxListElement<ItemType>)listModel.get(j);
if (element.getValue().equals(value)) {
return element.getChecked();
}
}
return false;
}
COM: <s> get the state of the element representing the value </s>
|
funcom_train/44934475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void leavePublished(final List<Cell> news) {
Iterator<Cell> t = news.iterator();
while (t.hasNext()) {
final Cell cell = t.next();
final WebObject webObject = cell.getWebObject();
if (StateUtils.get(webObject, cell) != ResultState.PUBLISHED) {
t.remove();
}
}
}
COM: <s> leaves only published items </s>
|
funcom_train/45223222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteMemberAccountsItemsData() {
if (transEffectsBalance(selectedMemberaccountsitems
.getTransactiontype())) {
BigDecimal oldValue = new BigDecimal("0.0");
oldValue = selectedMemberaccounts.getAccountbalance();
oldValue = oldValue.subtract(selectedMemberaccountsitems
.getItemamount().multiply(
getMult(selectedMemberaccountsitems
.getTransactiontype())));
selectedMemberaccounts.setAccountbalance(oldValue);
}
session.delete(selectedMemberaccounts.getMemberaccountsitems().get(
selectedMemberAccountItemsIndex));
selectedMemberaccounts.getMemberaccountsitems().remove(
selectedMemberaccountsitems);
}
COM: <s> delete member accounts items data </s>
|
funcom_train/17112205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void selectFirstMatch() {
Table table = fTableViewer.getTable();
Object element = namePatternFilter.findElement(table.getItems(),
(ILabelProvider) fTableViewer.getLabelProvider());
if (element != null) {
fTableViewer.setSelection(new StructuredSelection(element), true);
} else {
fTableViewer.setSelection(StructuredSelection.EMPTY);
}
}
COM: <s> selects the first element in the table which matches the current filter </s>
|
funcom_train/5377172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int prompt(String string, int defaultAnswer) {
Integer i = new Integer(defaultAnswer);
int answer;
for (int j = 0; j < 3; j++) {
String s = prompt(string, i.toString());
try {
answer = Integer.parseInt(s);
if (answer >= 0) {
return answer;
}
} catch (NumberFormatException e) {
}
println(ConsoleMsg.CONSOLE_INVALID_INPUT);
}
println(ConsoleMsg.CONSOLE_TOO_MUCH_INVALID_INPUT);
return defaultAnswer;
}
COM: <s> prompts the user for input of a positive integer </s>
|
funcom_train/37830063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dropPrivileges(Player player) {
if (!AdministrationAction.isPlayerAllowedToExecuteAdminCommand(player, Actions.TELECLICKMODE, false)) {
player.setTeleclickEnabled(false);
}
if (!AdministrationAction.isPlayerAllowedToExecuteAdminCommand(player, Actions.GHOSTMODE, false)) {
player.setGhost(false);
}
if (!AdministrationAction.isPlayerAllowedToExecuteAdminCommand(player, Actions.INVISIBLE, false)) {
player.setInvisible(false);
}
}
COM: <s> drop persistent administrator attributes if the player is no longer </s>
|
funcom_train/32060470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayTurnMessage(TurnResult turnres) {
if (turnres == null)
return;
Vector<String> news = turnres.getNewsItems();
StringBuilder turnreport = new StringBuilder(1000);
if (news.size() > 0) {
for (String s : news) {
turnreport.append(" * " + s + "\n");
}
sf.dc.vc.displayMessage(turnreport.toString());
}
}
COM: <s> displays the contents of the specified turn result object in a message </s>
|
funcom_train/12656134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateSliders(int[] gains) {
if (gains != null) {
for (int i = 0, len = gains.length; i < len; i++) {
gainValue[i + 1] = gains[i];
sliders[i].setValue(gainValue[i + 1]);
}
}
}
COM: <s> update sliders from gains array </s>
|
funcom_train/50558453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDisplayerListener(ActionListener listener) {
Iterator i = listeners.iterator();
ActionListener l = null;
while (i.hasNext()) {
l = (ActionListener) i.next();
if (l.getName().equals(listener.getName())) {
return;
}
}
listeners.add(listener);
}
COM: <s> adds a code action listener code as listener for this displayer br </s>
|
funcom_train/11299969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void activateOptions() {
try {
sh = new SocketHandler(port);
sh.start();
}
catch(InterruptedIOException e) {
Thread.currentThread().interrupt();
e.printStackTrace();
} catch(IOException e) {
e.printStackTrace();
} catch(RuntimeException e) {
e.printStackTrace();
}
super.activateOptions();
}
COM: <s> all of the options have been set create the socket handler and </s>
|
funcom_train/16524592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyTo(MapLayer other) {
if (!other.canEdit())
return;
for (int y = bounds.y; y < bounds.y + bounds.height; y++) {
for (int x = bounds.x; x < bounds.x + bounds.width; x++) {
((TileLayer) other).setTileAt(x, y, getTileAt(x, y));
}
}
}
COM: <s> unlike merge onto copy to includes the null tile when merging </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.