__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/29698225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restore() {
if (typeName == null)
typeName = type.getName();
else
this.type = EquipmentType.get(typeName);
if (this.type == null) {
System.err.println("Mounted.restore: could not restore equipment type \"" + typeName + "\"");
}
}
COM: <s> restores the equipment from the name </s>
|
funcom_train/20271128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillInitialValues(Reference init, Map<String, Node> initvals) {
Node object = init.getAssignedValue();
Preconditions.checkState(object.getType() == Token.OBJECTLIT);
for (Node key = object.getFirstChild(); key != null;
key = key.getNext()) {
initvals.put(key.getString(), key.removeFirstChild());
}
}
COM: <s> populates a map of key names initial assigned values </s>
|
funcom_train/9860478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object remove(final Object pKey) {
if (!(pKey instanceof String)) {
throw new IllegalArgumentException(Messages.getString("_invalid_array_key")); //$NON-NLS-1$
}
final Object o = aHash.remove(pKey);
fireArrayChangeListenerArrayChange();
return o;
}
COM: <s> remove the object with the specified key from the hashtable </s>
|
funcom_train/17252994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveClone(Savable object) {
resetSavingState();
try {
className = object.getClass().getName();
root = object;
return save(object);
} catch (IOException e) {
// this becomes a runtime failure since there is no actual
// IO going on and any failure indicates a coding mistake
// not a file failure
throw new RuntimeException(e);
}
}
COM: <s> save the specified savable into the local state to allow it to be </s>
|
funcom_train/43868598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeTestContent() throws Exception {
if (insertedDocuments.size() < 1)
return;
String removeQuery = " xdmp:collection-delete(\"" + XQUERY_UNIT_TEST_COLLECTION + "\")";
executeQuery(removeQuery, null, (XdmVariable[]) null);
insertedDocuments.clear();
}
COM: <s> remove all documents that were inserted with the </s>
|
funcom_train/39024051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetObjectUID() {
System.out.println("getObjectUID");
Object obj = null;
boolean createIfNull = false;
UID expResult = null;
UID result = UID.getObjectUID(obj, createIfNull);
//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 object uid method of class uid </s>
|
funcom_train/25428365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRepair() throws UselessShieldException {
shield.receiveDamage(1f);
assertEquals("The remaining hit points should be the expected", MAXIMUM_SHIELD_HIT_POINTS - 1f, this.shield.getRemainingHitPoints());
Float cost = shield.repair();
assertEquals("The cost of the repair should be correct", 1f * 0.1f, cost);
assertEquals("The shield should be repaired", MAXIMUM_SHIELD_HIT_POINTS, shield.getRemainingHitPoints());
}
COM: <s> this test demonstrates that the repair implementation works </s>
|
funcom_train/2579963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CategoryAxis getDomainAxis(int index) {
CategoryAxis result = null;
if (index < this.domainAxes.size()) {
result = (CategoryAxis) this.domainAxes.get(index);
}
if (result == null) {
Plot parent = getParent();
if (parent instanceof CategoryPlot) {
CategoryPlot cp = (CategoryPlot) parent;
result = cp.getDomainAxis(index);
}
}
return result;
}
COM: <s> returns a domain axis </s>
|
funcom_train/16913922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeHighlights(final JTextComponent textComp) {
Highlighter hilite = textComp.getHighlighter();
Highlighter.Highlight[] hilites = hilite.getHighlights();
for (int i = 0; i < hilites.length; i++) {
if (hilites[i].getPainter() instanceof MyHighlightPainter) {
hilite.removeHighlight(hilites[i]);
}
}
}
COM: <s> removes highlights from specified component </s>
|
funcom_train/11070575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose() {
listeners.clear();
ftpletContainer.getFtplets().clear();
if (threadPoolExecutor != null) {
LOG.debug("Shutting down the thread pool executor");
threadPoolExecutor.shutdown();
try {
threadPoolExecutor.awaitTermination(5000, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
} finally {
// TODO: how to handle?
}
}
}
COM: <s> close all the components </s>
|
funcom_train/19440811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayAlert(String msg) {
if(dialogSearch.isVisible()){
labelSearchStatus.setText(msg);
buttonStartSearch.setText("Search");
progressBarSearch.setString("");
progressBarSearch.setIndeterminate(false);
clearDevices();
}else {
JOptionPane.showMessageDialog(this,msg,"Alert",JOptionPane.ERROR_MESSAGE);
}
}
COM: <s> displays the specified message in a code joption pane code with the </s>
|
funcom_train/9190158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIfFlowPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CheckNode_ifFlow_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CheckNode_ifFlow_feature", "_UI_CheckNode_type"),
FlowPackage.Literals.CHECK_NODE__IF_FLOW,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the if flow feature </s>
|
funcom_train/50119386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean query_write_access(String wiz_name, String dir)
{
boolean access = _query_access(wiz_name, get_dirs(dir), 'W');
if(!access)
mudlog.errorlog(0, "WRITE access denied for "+wiz_name+" to '"+dir+"'.", null);
return access;
}
COM: <s> checks if the wizard has write access to a specified directory </s>
|
funcom_train/15492884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit(Xid xid, boolean b) throws XAException {
Changes changes = (Changes)this.changes.remove(xid);
for (Iterator iter = changes.getAddList().iterator(); iter.hasNext();) {
queue.add(iter.next());
}
synchronized(this) {
notifyAll();
}
}
COM: <s> this method is called to commit the specified transaction </s>
|
funcom_train/18286969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void configureListener(HttpServer server) {
SocketListener listener = new SocketListener();
listener.setMinThreads(1);
listener.setMaxThreads(2);
listener.setMaxIdleTimeMs(10000);
listener.setDaemon(true);
Preferences prefs = EclipseMECorePlugin.getDefault().getPluginPreferences();
if (prefs.getBoolean(IEclipseMECoreConstants.PREF_OTA_PORT_DEFINED)) {
int specifiedPortNumber = prefs.getInt(IEclipseMECoreConstants.PREF_OTA_PORT);
listener.setPort(specifiedPortNumber);
}
server.addListener(listener);
}
COM: <s> configure the http server listener </s>
|
funcom_train/41320045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getJRadioButton2() {
if (jRadioButton2 == null) {
jRadioButton2 = new JRadioButton("2", false);
jRadioButton2.setBounds(new Rectangle(30, 70, 21, 21));
jRadioButton2.setBackground(new Color(Integer.valueOf("f3a15a", 16)));
}
return jRadioButton2;
}
COM: <s> this method initializes j radio button2 </s>
|
funcom_train/5380895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMenuCreator(IMenuCreator creator) {
// For backward compatibility, if the style is not
// set yet, then convert it to a drop down menu.
if (value == null) {
value = creator;
return;
}
if (value instanceof IMenuCreator)
value = creator == null ? VAL_DROP_DOWN_MENU : creator;
}
COM: <s> sets the menu creator for this action </s>
|
funcom_train/8523749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean fillValue(final T t, boolean commit) {
getTextField().setText(toString(t));
hideSuggestList();
getTextField().setFocus(true);
selected = t;
typed = toString(t);
if (commit) {
valueSelected(t);
} else {
// the change is not notified immediately since we just suggest the
// value t. We keep a flag to know there was no notification
fireChangeOnBlur = true;
}
return true;
}
COM: <s> fills a type safe value one of the available values in the list </s>
|
funcom_train/16884671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isSlotReifiable( RdbSlot assocSlot ) {
if ( !assocSlot.allowsMultipleValues() || !assocSlot.hasAssociatedCls() )
return false;
else if ( !assocSlot.isAtomicType() && !hasValidInstanceClsValueType( assocSlot ) )
return false;
else if ( assocSlot.referencesInlineCls() )
return false;
else if ( _rdb.supportsArrayType() && assocSlot.isAtomicType() )
return false;
else
return true;
}
COM: <s> whether slot should be reified </s>
|
funcom_train/41640922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTextPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TextImplement_text_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TextImplement_text_feature", "_UI_TextImplement_type"),
CfcuiPackage.Literals.TEXT_IMPLEMENT__TEXT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the text feature </s>
|
funcom_train/4962521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static final class InvalidLocator implements Locator {
private String msg_;
public InvalidLocator(String msg) {
msg_ = msg;
}
public InvalidLocator() {
msg_ = "InvalidLocator is always invalid";
}
public Object element() throws InvalidAccessorException {
throw new InvalidAccessorException(msg_);
}
public Object key() throws InvalidAccessorException {
throw new InvalidAccessorException(msg_);
}
}
COM: <s> a locator that is always invalid </s>
|
funcom_train/29554627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(final TimeStamp t1, final TimeStamp t2) {
if (t1.getTimeInMillis() < t2.getTimeInMillis()) {
return -1;
}
if (t1.getTimeInMillis() > t2.getTimeInMillis()) {
return 1;
}
return 0;
}
COM: <s> implementation of the comparator interface </s>
|
funcom_train/35675079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMSNSearch() throws Exception {
jaxbgen("MSNSearch", new File(COB_XSD_DIR, "MSNSearch.xsd"), true, 1L,
true, null, "Type", null, null, false, false);
check("MSNSearch");
}
COM: <s> the msnsearch case </s>
|
funcom_train/36996528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int readInt() throws IOException, EOFException {
return (((int)readUnsignedByte())<<24)+
(((int)readUnsignedByte())<<16)+
(((int)readUnsignedByte())<<8)+
(int)readUnsignedByte();
}
COM: <s> reads a signed integer value </s>
|
funcom_train/20367212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handle(int token, int start, int end, IJavaElement owner) throws JavaModelException {
helper.handle(token, start, end, owner);
switch (token) {
// purge the temp regions - we hit a element break.
case ITerminalSymbols.TokenNamepackage:
case ITerminalSymbols.TokenNameimport: {
addAllRegions(helper.result());
return;
}
}
}
COM: <s> process all of the tokens searching for javadocs and comment blocks </s>
|
funcom_train/2801006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeConnection(Connection pConnection) {
synchronized (this) {
mConnections.remove(pConnection);
java.sql.Connection jdbcConnection = pConnection.getConnection();
try {
if ((jdbcConnection != null) && (!jdbcConnection.isClosed())) {
jdbcConnection.close();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
}
COM: <s> removes and closes the provided connection </s>
|
funcom_train/19973230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateWarning(Intent intent) {
String action = intent.getAction();
int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0);
warningFlag = translateToken(action, BATTERY_WARN_INTENT);
display_warning.setText(warningFlag + " @ " + level);
}
COM: <s> update the battery warning flag </s>
|
funcom_train/10910684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean okToWriteRtf() {
boolean result = super.okToWriteRtf();
if (parent.getOptions().ignoreEmptyParagraphs() && getChildCount() == 0) {
// TODO should test that this is the last RtfParagraph in the cell instead
// of simply testing for last child??
result = false;
}
return result;
}
COM: <s> depending on rtf options do not emit any rtf for empty paragraphs </s>
|
funcom_train/44790663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(ColorimetricColor c) {
if (this.getRedRGB() == c.getRedRGB()
&& this.getGreenRGB() == c.getGreenRGB()
&& this.getBlueRGB() == c.getBlueRGB()) {
return true;
} else {
return false;
}
}
COM: <s> indicates whether some other object is equal to this one </s>
|
funcom_train/48190689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(PosSellForm entity) {
LogUtil.log("deleting PosSellForm instance", Level.INFO, null);
try {
entity = entityManager.getReference(PosSellForm.class, entity
.getId());
entityManager.remove(entity);
LogUtil.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent pos sell form entity </s>
|
funcom_train/40383783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void correctTimeValue() {
LinkedHashMap newMap = new LinkedHashMap();
Collection col = data.values();
Iterator it = col.iterator();
while (it.hasNext()) {
NmeaData nd = (NmeaData) it.next();
nd.setDate(calendarData.getActualTimeZoneDate(nd.getDate()));
newMap.put(nd.getDate(), nd);
}
data = newMap;
}
COM: <s> corrects all of the calendar object dates for the entire data set </s>
|
funcom_train/45775687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String callStoreDialog(String DisplayDirectory, String DefaultName, String sDocuType) {
String sExtension = DefaultName.substring(DefaultName.length() - 3, DefaultName.length());
addFilterToDialog(sExtension, sDocuType, true);
return callStoreDialog(DisplayDirectory, DefaultName);
}
COM: <s> attention a bug the extension calculated </s>
|
funcom_train/7732756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int sendAll(){
int res = 1;
// wait until outrs is cleared
synchronized ( outrs ) {
try{
while ( outrs.getNumRecords() > 0 ) {
// System.out.println("waiting to quit");
res = send();
if(res < 0){
break;
}
}
}catch (RecordStoreException rse) {
}
}
return res;
}
COM: <s> sena all the messages </s>
|
funcom_train/37609884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate() {
if (this.isShowing()) {
super.validate();
Dimension dim = stname.getSize();
int dgw = (int)dim.getWidth();
typemsg.setSize(550, 32);
pp3.setSize(500, 100);
stname.setSize(dgw, 32);
begin.setSize(dgw, 32);
ending.setSize(dgw, 32);
fmsg.setSize(dgw, 32);
stname.selectAll();
stname.requestFocusInWindow();
}
} // end validate()
COM: <s> selects tt cstreet tt name text for user input </s>
|
funcom_train/7640826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newData(byte[] data, int offset, int length) {
if (mTempFile != null) {
try {
FileOutputStream fos = new FileOutputStream(mTempFile, true /* append */);
fos.write(data, offset, length);
fos.close();
} catch (FileNotFoundException e) {
} catch (IOException e) {
}
}
}
COM: <s> processes raw data coming from the log service </s>
|
funcom_train/3913440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisibility(boolean isVisible) {
// check if something changes at all
if (isVisible() != isVisible) {
if (isVisible) {
// appearently the component has become visible, so alter the visibility
// date
visibleSince = new GregorianCalendar();
}
this.isVisible = Boolean.toString(isVisible);
persist();
}
}
COM: <s> sets the visibility of the component </s>
|
funcom_train/13998511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPInputs() {
if (pInputs == null) {
lblInputs = new JLabel();
lblInputs.setText("JLabel"); //$NON-NLS-1$
pInputs = new JPanel();
pInputs.setLayout(new BoxLayout(getPInputs(), BoxLayout.Y_AXIS));
pInputs.add(lblInputs, null);
pInputs.add(getSpInputs(), null);
}
return pInputs;
}
COM: <s> this method initializes p inputs </s>
|
funcom_train/25064954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onSelectRequest(int row, int col) {
// if click is on currently-selected row, unselect it
if (_table.getSelectedRow() != null && _table.getSelectedRow().getRowIndex() == row)
_table.unSelectRow(row);
else
_table.selectRow(row);
}
COM: <s> selects the given row </s>
|
funcom_train/17677007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JdbcCompiledQuery compile(QueryDetails q) {
cmd = jmd.getClassMetaData(q.getCandidateClass());
if (cmd == null) {
throw BindingSupportImpl.getInstance().invalidOperation(
"Class " +
q.getCandidateClass().getName() + " not found in meta data");
}
return compileImp(q);
}
COM: <s> compile a query details into a jdbc compiled query ready to run </s>
|
funcom_train/46760125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OrderInstanceModel getOrderInstance(final long orderInstanceId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return OrderData.getOrderInstance(orderInstanceId, chain, call);
}}; return (OrderInstanceModel) call(method, call);
}
COM: <s> same transaction return the single order instance model for the primary key </s>
|
funcom_train/4723111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUserLoggedIn(String userEmailStr, String logoutUrl) {
isLoggedIn = true;
userEmail.setInnerText(userEmailStr + " | ");
logoutLink.setHref(logoutUrl);
logoutLink.setInnerText(" logout");
// In case we get a login response after already disabling controls
getControlBar().enableControls();
}
COM: <s> sets the logout link and displays the currently signed in user </s>
|
funcom_train/45485576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton4Add() {
if (jButton4Add == null) {
jButton4Add = new JButton();
jButton4Add.setBounds(new Rectangle(5, 90, 64, 26));
Font font = new Font("Serif", Font.BOLD, 16);
jButton4Add.setFont(font);
jButton4Add.setForeground(Color.green);
jButton4Add.setText("4");
}
return jButton4Add;
}
COM: <s> this method initializes j button4 add </s>
|
funcom_train/18219022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String extractValue(Object state) {
String value;
if (state instanceof List) {
// if state is a multi valued field, take the last entry.
final List list = (List)state;
if (list==null || list.size()==0) {
return null;
}
value = list.get(list.size()-1).toString();
} else {
value = state.toString();
}
return this.getField().formatAsString(value);
}
COM: <s> extracts a field value from the given state object </s>
|
funcom_train/34675822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unlockAllAssessmentSheets() {
if (assessmentSheet!=null) {
assessmentSheet.clearLockingActor();
}
AssessmentSheet as;
for(Iterator<Section> it=section.iterator() ; it.hasNext() ; ) {
as=it.next().getAssessmentSheet();
if (as!=null) {
as.clearLockingActor();
}
}
}
COM: <s> unlock all the assessment sheets in the policy </s>
|
funcom_train/25086967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPortRegPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Port_PortReg_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Port_PortReg_feature", "_UI_Port_type"),
dioPackage.Literals.PORT__PORT_REG,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the port reg feature </s>
|
funcom_train/44451585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void receivedBYE( IncomingMessage incomingMessage ) {
/* Moving forward for multi-party conversation support, this should
should be aware of who is leaving. */
joined = false;
participants--;
if( participants == 0 ) {
OutgoingMessage msg = new OutgoingMessage( Message.OUT, OutgoingMessage.NO_TRANSACTION_ID );
sc.sendMSNPMessage( msg );
sc = null;
}
}
COM: <s> received when a buddy leaves a conversation </s>
|
funcom_train/3103766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createFilteredData() {
filtered_data = new FilterList(data);//
this.fireContentsChanged(this, 0, filtered_data.size()-1);//
this.fireIntervalAdded(this, 0, 1);
this.fireIntervalRemoved(this, 0, 1);
}
COM: <s> creates filtered data based on the actual data </s>
|
funcom_train/6333296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void testCreateDataFile() {
// // expect only objectStreamClasses dir
// assertEquals(dir.list().length, 1);
// for (int i = 0; i < 100; i++) {
// int created = dataFileManager.createDataFile();
// assertTrue(new File(dir, DataFileManager.dataFileIdToStorageName(created)).isFile());
// }
// }
COM: <s> test of create data file method of class org </s>
|
funcom_train/20883376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int calcJoinWeightShift(int[] joinWeights) {
int first = joinWeights[0];
for (int i = 1; i < joinWeights.length; i++) {
if (joinWeights[i] != first) {
return 0;
}
}
int divisor = 65536 / first;
if (divisor == 2) {
return 1;
} else if (divisor == 4) {
return 2;
}
return 0;
}
COM: <s> calculates the join weight shift </s>
|
funcom_train/3713041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void measure(int index) {
ManagedSpectrum msp = (ManagedSpectrum) getServer().getSpectrumStorage().get(index);
Spectrum sp = msp.getSpectrum();
if ((measurementManager == null) && (!(sp instanceof PhotometrySpectrum))) {
measurementManager = new MeasurementManager(msp.getSpectrum(), this, null, true);
}
measurementManager.measure();
}
COM: <s> performs a measurement in the index th spectrum in the server storage </s>
|
funcom_train/48058748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() throws SQLException, AuthorizeException {
if (!canUpdate()) {
throw new AuthorizeException("You are not authorized to update submission.");
}
getDao().update(getID());
LOGGER.info(LogManager.getHeader(getContext(), "update_vireosubmission", "submission_id=" + getID()));
}
COM: <s> update the submission on the database </s>
|
funcom_train/39913636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void message(long time, @NonNull Collection<Message> messages) {
nextSet = false;
lateMessage = false;
earlyWakeup = false;
if (state == ActorState.WAITING) {
if (wakeup != null) {
if (wakeup.longValue() == time) {
lateMessage = true;
} else
if (wakeup.longValue() > time) {
earlyWakeup = true;
}
}
}
state = ActorState.PROCESSING;
try {
onMessage(time, messages);
} finally {
submitAndTime();
}
}
COM: <s> the message dispatch from the controller </s>
|
funcom_train/9663799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void prepareList() {
FlowPanel panel = getList();
if (!isLazyRenderingEnabled() || getComboBox().getModel().getCount() != getItemCount())
panel.clear();
fillList();
int selected = getComboBox().getModel().getSelectedIndex();
selectRow(selected);
if (selected >= 0 && selected < getItemCount())
ensureVisible(getItem(selected));
}
COM: <s> this method prepares the list of items for displaying </s>
|
funcom_train/21636667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() {
// load driver
try {
Class.forName(DRIVER).newInstance();
} catch (Exception ex) {
System.err.println("Der JDBC-Treiber konnte nicht "
+ "geladen werden.");
System.exit(1);
}
// establish connection
try {
connection = DriverManager.getConnection(URL);
} catch (SQLException ex) {
System.err.println("Die Verbindung zur Datenbank konnte "
+ "nicht hergestellt werden. "
+ "Die Fehlermeldung lautet: " + ex.getMessage());
System.exit(1);
}
}
COM: <s> connects to the db </s>
|
funcom_train/12741836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void openTooltipPopup(HashMap event) {
String tooltipText = getTooltip();
XComponent toolTip = XComponent.createToolTip(tooltipText);
// <FIXME author="Horia Chiorean" description="This could use some fine-tuning(e.g cornering)">
Rectangle absoluteBounds = absoluteBounds();
openToolTipForComponent(toolTip, absoluteBounds);
// <FIXME>
}
COM: <s> opens a pop up for the current component containing the tooltip text </s>
|
funcom_train/563867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addCommandPolling(final CommandImpl command) throws DevFailed {
removeCommandPolling(command);
final CommandCache cache = new CommandCache(MANAGER, command, deviceName, deviceLock);
if (command.getPollingPeriod() == 0) {
extTrigCommandCacheMap.put(command, cache);
} else {
commandCacheMap.put(command, cache);
}
updatePoolConf();
}
COM: <s> add command as polled </s>
|
funcom_train/10204994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMAttributesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MClass_mAttributes_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MClass_mAttributes_feature", "_UI_MClass_type"),
ClassDiagramPackage.Literals.MCLASS__MATTRIBUTES,
false,
false,
false,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the mattributes feature </s>
|
funcom_train/18432149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Shape getItemShape(int series, int item, boolean selected) {
Shape result = null;
if (selected) {
result = this.selectedItemAttributes.getItemShape(series, item);
}
if (result == null) {
result = lookupSeriesShape(series);
}
return result;
}
COM: <s> returns a shape used to represent a data item </s>
|
funcom_train/38767525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String extractText(final InputStream in) throws IOException {
final PDFParser parser = new PDFParser(in);
parser.parse();
final PDDocument document = parser.getPDDocument();
String s = null;
try {
final PDFTextStripper stripper = new PDFTextStripper();
s = stripper.getText(document);
} finally {
document.close();
}
return s;
}
COM: <s> extracts text from a pdf document </s>
|
funcom_train/33137408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void migrate(String fromPath, String toPath, IProgressMonitor monitor) {
BOMService fromService = null;
try {
fromService = new BOMService(fromPath);
this.migrate(fromService, toPath, monitor);
} finally {
if (fromService != null) {
try {
fromService.getConn().close();
} catch (Exception e) {}
}
}
}
COM: <s> this migration method only works for bomservice which is not password protected </s>
|
funcom_train/45075782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Hashtable getHashtable(String key) {
//Get the permission for the key as a Dom Element
Element userPerm = getUserPermissions(key);
//Use it to build a hashtable with the user permissions, this hash
//table will contain the operations allowed for each key (a resource)
return buildUserPermissionsHashtable(userPerm);
}
COM: <s> get the permissions associated with a key representing a user </s>
|
funcom_train/6276940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAsText() {
Integer val = (Integer)getValue();
if (val == null) return "";
if (val.intValue() == NodeType.ELEMENT) {
return ELEMENT;
} else if (val.intValue() == NodeType.TEXT) {
return TEXT;
} else if (val.intValue() == NodeType.NONE) {
return NONE;
} else {
return ATTRIBUTE;
}
}
COM: <s> get text representation </s>
|
funcom_train/34628098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCompleteLines() {
try {
return document.get(startLine.getOffset(), endLine.getOffset() + this.endLine.getLength() -this.startLine.getOffset());
} catch (Exception e){
TexlipsePlugin.log("TexSelections.getCompleteLines: ", e);
return "";
}
}
COM: <s> gets all complete lines from the selection </s>
|
funcom_train/33262106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restoreFromXml() {
super.restoreFromXml();
Xil2messageChoice xil2messageChoice = xil2Msg.getXil2messageChoice();
if (xil2messageChoice == null)
return;
Browsemsg browsemsg = xil2messageChoice.getBrowsemsg();
dest = XIL2Util.readDestination(browsemsg.getDestination());
selector = browsemsg.getSelector();
msgs = new SpyMessage[browsemsg.getSpymessageCount()];
for (int i = 0; i < browsemsg.getSpymessageCount(); i++) {
msgs[i] = XIL2Util.readSpymessage(browsemsg.getSpymessage(i));
}
}
COM: <s> take the xml object received and construct the spy message array </s>
|
funcom_train/4233114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWindowFunction(WindowFunction windowFunction) {
if (windowFunction == null) {
windowFunction = WindowFunction.Rectangular;
}
if (this.windowFunction == windowFunction) {
return;
}
WindowFunction oldWindowFunction = this.windowFunction;
this.windowFunction = windowFunction;
firePropertyChange(WINDOW_FUNCTION_PROPERTY, oldWindowFunction, windowFunction);
createWindow();
plotSpectrum();
}
COM: <s> sets the window function </s>
|
funcom_train/20104002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object currentNode) {
boolean result = false;
if (this.getName().equals(((LatticeNode) currentNode).getName())) {
result = true;
} else if (this.getName() == ((LatticeNode) currentNode).getName()) {
result = true;
} else if (this == currentNode) {
result = true;
} else {
result = false;
}
return result;
}
COM: <s> determines equality by comparing the identifier or name of the current </s>
|
funcom_train/3364660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreePath getClosestPathForLocation(JTree tree, int x, int y) {
if(tree != null && treeState != null) {
// TreeState doesn't care about the x location, hence it isn't
// adjusted
y -= tree.getInsets().top;
return treeState.getPathClosestTo(x, y);
}
return null;
}
COM: <s> returns the path to the node that is closest to x y </s>
|
funcom_train/45622662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRevisionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FormatVersionType_revision_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FormatVersionType_revision_feature", "_UI_FormatVersionType_type"),
MSBPackage.eINSTANCE.getFormatVersionType_Revision(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the revision feature </s>
|
funcom_train/50802454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPilot(SPilot p, boolean isNew, boolean isTemporary) {
super.setPilot(p, isNew);
if (isNew && !isTemporary) {
UnitHistoryKeeper.addaddPilotEntry(getId(), getPilot().getId(), p.getName(), p.getGunnery(), p.getPiloting(), p.getSkillString(false));
updateSQLEntry();
}
setBV(0);
}
COM: <s> sets the pilot of this entity </s>
|
funcom_train/47271416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Font getFontByPosition(int fontSettingPosition) {
if (fontSettingPosition >=0 && fontSettingPosition < fontFamilySettingsValues.length) {
return EditorFont.createFontFromStringValues(fontFamilySettingsValues[fontSettingPosition],
fontStyleSettingsValues[fontSettingPosition],
fontSizeSettingsValues[fontSettingPosition]);
}
else {
return null;
}
}
COM: <s> retrieve a font setting </s>
|
funcom_train/28346296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Lattice createLattice(AcceleratorSeq accSeq) {
System.out.println("*** SadGenearator::createLattice this is obsolete. Do not use");
// create lattice using the (combo) sequence
LatticeFactory factory=new LatticeFactory();
factory.setDebug(false);
factory.setVerbose(false);
factory.setHalfMag(true);
Lattice lattice = new Lattice(myLatticeName);
try {
lattice=factory.getLattice(accSeq);
lattice.clearMarkers();
lattice.joinDrifts();
} catch(LatticeError lerr) {
System.out.println(lerr.getMessage());
}
return lattice;
}
COM: <s> create an xal intermediate lattice </s>
|
funcom_train/43245871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetGroupPolicy() {
System.out.println("setGroupPolicy");
boolean groupPolicy = true;
InsuranceBufferObject instance = new InsuranceBufferObject();
instance.setGroupPolicy(groupPolicy);
// 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 group policy method of class org </s>
|
funcom_train/11757798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean text_from_file_2(Struct fileName, Term text) {
try {
Struct goal = new Struct(alice.util.Tools.loadText(
alice.util.Tools.removeApices(((Struct) fileName).toString())));
return unify(text, goal);
} catch (Exception ex) {
//ex.printStackTrace();
return false;
}
}
COM: <s> reads a source text from a file </s>
|
funcom_train/25580112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean pageMatches(IStyle style, IComponent c) {
String stylePageID = style.getString(IStyle.Properties.PAGE_HOLDER);
if (stylePageID == null) {
return true;
} else {
PageHolder ph = RiafMgr.global().searchPageHolder(c);
if (ph != null) {
return stylePageID.equals(ph.getId());
} else {
return false;
}
}
}
COM: <s> checks if the page holder attribute of the style matches the page holder </s>
|
funcom_train/174460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
// Override AbstractSet version to avoid calling size()
if (o == this)
return true;
if (!(o instanceof Set))
return false;
Collection c = (Collection) o;
try {
return containsAll(c) && c.containsAll(this);
} catch (ClassCastException unused) {
return false;
} catch (NullPointerException unused) {
return false;
}
}
COM: <s> compares the specified object with this set for equality </s>
|
funcom_train/49122836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cache getCacheByURL(String uid, String url){
//select * from ${schema}.cache where url_key=?
String queryString = "from Cache where Uid = ? and UrlKey = ?";
List results = super.getHibernateTemplate()
.find( queryString, new Object[]{uid, Crypt.getHash(url)} );
if(results.isEmpty()){
return null;
}else{
return (Cache) results.iterator().next();
}
}
COM: <s> get the dom object of the cash of appointed url </s>
|
funcom_train/41489668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AuthenticationEvent save() throws ModelException {
try {
AuthenticationEvent e = (AuthenticationEvent) getDao().persist(this);
this.id = e.getId();
return this;
} catch (ServiceException e) {
throw new SaveException("Unable to save authentication event", e);
}
}
COM: <s> saves the authentication event </s>
|
funcom_train/12827295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tag_option(RewriteContext hr) {
String value = hr.get("value");
if (value != null) {
hr.put("value", value);
}
if (selectName == null || selectValue == null || value == null) {
return;
}
if (value.equals(selectValue)) {
hr.put("selected", "");
} else {
hr.remove("selected");
}
}
COM: <s> look at the option tag set the selected attribute as needed </s>
|
funcom_train/3715443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChild (Object child) {
// Return if the child is invalid.
if (child == null) return;
// Check that this node has no children.
if (children == null) return;
// Add the child if it is a string.
if (child instanceof String) {
children.addElement(child);
return;
}
// Add the child and set its parent if it is an HTMLNode.
if (child instanceof HTMLNode) {
children.addElement(child);
((HTMLNode) child).setParent(this);
return;
}
}
COM: <s> adds an object to the end of this nodes content </s>
|
funcom_train/41426513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onStartServiceEvent(javax.slee.serviceactivity.ServiceStartedEvent event, ActivityContextInterface aci) {
ServiceActivity sa = (ServiceActivity) aci.getActivity();
if (sa.getService().equals(this.sbbContext.getService())) {
// lets GO
if(!this.provider.isTransportUp())
{
startTimer();
return;
}else
{
resetCircuits();
return;
}
}
}
COM: <s> deploy process definition when the service is activated by slee </s>
|
funcom_train/14521123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateAuthorizationTree() {
if (log.isDebugEnabled()) {
log.debug("updateAuthorizationTree");
}
getAuthorizer().buildAccessTree(getAdminGroups());
this.authorizationtreeupdate = getAuthorizationTreeUpdateData().getAuthorizationTreeUpdateNumber();
this.lastupdatetime = System.currentTimeMillis();
}
COM: <s> method updating authorization tree </s>
|
funcom_train/1123461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getWords(Collection<int[]> words, int[] t, int d) {
if (inside) {
words.add(Arrays.cloneArray(t, d));
}
for (int i = 0; i < nodeSize; i++) {
if (nodes[i] != null) {
t[d] = i;
nodes[i].getWords(words, t, d + 1);
}
}
}
COM: <s> fills given collection of words by words from the trie </s>
|
funcom_train/22489859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finishTag () {
// create component
Component component = EComponentRegistry.getComponent(_descriptor);
if (component == null) {
System.err.println(
"ERR: unknown component type:" + _descriptor.getType()
);
return;
}
// fix the most stupid default in Swing: transparent tables
if (component instanceof JTable) {
if (_descriptor.getProperty("Opaque") == null) {
((JTable) component).setOpaque(true);
}
}
// register the component at the layout
_descriptor.setComponent(component);
}
COM: <s> called when the tags is finished </s>
|
funcom_train/33177279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addClientClockPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RPCMonModel_clientClock_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RPCMonModel_clientClock_feature", "_UI_RPCMonModel_type"),
ModelPackage.Literals.RPC_MON_MODEL__CLIENT_CLOCK,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the client clock feature </s>
|
funcom_train/22498660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(final File f) {
if (f != null) {
if (f.isDirectory()) {
return true;
}
final String extension = getExtension(f);
if (extension != null && filters.get(getExtension(f)) != null) {
return true;
};
}
return false;
}
COM: <s> return true if this file should be shown in the directory pane </s>
|
funcom_train/22031012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CoordinateSystem getCoordinateSystem() {
if (coordSystem == null) {
try {
if (directory == null) throw new Exception("null directory");
coordSystem = new GRIDCoordinateSystem(directory);
} catch (Exception ev) {
coordSystem = null;
System.out.println("No navigation available");
}
}
return coordSystem;
}
COM: <s> get the gridcoordinate system associated with this grid </s>
|
funcom_train/8685064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Method getElementMethod(String elementName) throws BuildException {
Object creator = nestedCreators.get(elementName);
if (creator == null) {
throw new UnsupportedElementException("Class "
+ bean.getName() + " doesn't support the nested \""
+ elementName + "\" element.", elementName);
}
return ((NestedCreator) creator).method;
}
COM: <s> returns the adder or creator method of a named nested element </s>
|
funcom_train/45348422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flush() {
if (myBitsToGo != BITS_PER_BYTE) {
try {
write((myBuffer << myBitsToGo));
} catch (java.io.IOException ioe) {
throw new RuntimeException("error writing bits on flush " + ioe);
}
myBuffer = 0;
myBitsToGo = BITS_PER_BYTE;
}
try {
myOutput.flush();
} catch (java.io.IOException ioe) {
throw new RuntimeException("error on flush " + ioe);
}
}
COM: <s> flushes bits not yet written must be called by client programs if </s>
|
funcom_train/16771373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean put(String filename) {
if (!connected) return false;
try {
SftpProgressMonitor monitor=new WowSyncProgressMonitor();
int mode=ChannelSftp.OVERWRITE;
cs.put(filename, ".", monitor, mode);
} catch (SftpException e) {
System.out.println(filename+" (sftp-put) "+e.getMessage());
return false;
}
return true;
}
COM: <s> sftp put command </s>
|
funcom_train/9965806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void FieldTypeNameLookahead() throws ParseException {
trace_call("FieldTypeNameLookahead");
try {
jj_consume_token(IDENTIFIER);
label_38:
while (true) {
if (jj_2_24(2)) {
;
} else {
break label_38;
}
jj_consume_token(DOT);
Identifier();
}
} finally {
trace_return("FieldTypeNameLookahead");
}
}
COM: <s> takes special consideration for assert </s>
|
funcom_train/41827121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveSrcToDif(String string, String string2) throws IOException {
File file;
JDIO.removeDirectoryOrFile(file = new File(this.updateDir, string2));
copyDirectory(new File(this.svn, string), file);
System.out.println("Updated SVN->" + file);
}
COM: <s> copies ressources from svn t update </s>
|
funcom_train/44425909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point getLocation(Point iReference) {
Rectangle r = getOwner().getBounds();
int x,y;
if (topDown)
y = r.y + offsetV;
else
y = r.y + r.height - offsetV;
if (leftToRight)
x = r.x + offsetH;
else
x = r.x + r.width - offsetH;
Point p = new Point(x, y);
getOwner().translateToAbsolute(p);
return p;
}
COM: <s> this method is taken from fixed connection anchor in logical diagram editor </s>
|
funcom_train/45864262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g, int offsetX, int offsetY) {
super.paint(g, offsetX, offsetY);
for (int n = (usedRows < visibleRows ? usedRows : visibleRows) - 1; n >= 0; n--) {
line[n].paint(g, offsetX, offsetY);
}
}
COM: <s> draws the text viewer and scroll arrows if required </s>
|
funcom_train/44528686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPropertyCapped() {
if (ctx.isUseEntireURIForIdentifiers())
return capitalize(JavaIdentifierEncoder.encode(ontProperty.getURI()));
else {
String name = capitalize(JavaIdentifierEncoder.encode(ontProperty.getLocalName()));
if (duplicateProperty) {
name = capitalize(addPrefix(name));
}
return name;
}
}
COM: <s> return the name of the property capitalized sould be prepended for use </s>
|
funcom_train/37005464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected float distance(final float[] c) {
if (coordinates.length != c.length) {
throw new IllegalArgumentException();
}
float dist = 0f;
for (int i = 0; i < coordinates.length; i++) {
dist += Math.pow(coordinates[i] - c[i], 2);
}
return (float) Math.sqrt(dist);
}
COM: <s> returns the distance to a set of coordinates </s>
|
funcom_train/20646456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyAfterTemplateCompilation( String report, String subreport ) {
synchronized ( m_listeners ) {
m_switchingStates = true;
ListIterator it = m_listeners.listIterator();
while ( it.hasNext() ) {
TemplateEventListener l = (TemplateEventListener) it.next();
l.notifyAfterTemplateCompilation( report, subreport );
}
m_switchingStates = false;
}
}
COM: <s> call all listeners with the after template event </s>
|
funcom_train/8103196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* public void testGraphVizNode() {
System.out.println("GraphVizNode");
Category instance = new Category();
String expResult = "";
String result = instance.GraphVizNode();
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 graph viz node method of class wikipedia </s>
|
funcom_train/27843689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Context getContext() {
if (_context != null) {
return _context;
}
if (_parent == null) {
// no ControllerContext defined, return null
if (LOG.isDebugEnabled()) {
LOG.debug("No ControllerContext defined");
}
return null;
}
return _parent.getContext();
}
COM: <s> return the controller context for this controller </s>
|
funcom_train/4124241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void toXMLImpl(XMLStreamWriter out) throws XMLStreamException {
// Start element:
out.writeStartElement(getXMLElementTagName());
out.writeAttribute("id", getId());
out.writeAttribute("accelerator", getKeyStrokeText(getAccelerator()));
out.writeEndElement();
}
COM: <s> this method writes an xml representation of this object to the given </s>
|
funcom_train/50465912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initMessage() {
//See if there is a Message Panel already
if(descriptor.getCustomPanel() != null) {
add(descriptor.getCustomPanel(), BorderLayout.CENTER);
return;
}
//See if there is an Exception
if(descriptor.getException() != null) {
initExceptionMessage();
return;
}
add(createMessageLabel(), BorderLayout.CENTER);
}
COM: <s> build the message area </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.