__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/35223093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private byte getByteFromDictionary(String bracketedString) throws JFugueException
// { String definition = dictionaryLookup(bracketedString);
// Byte newbyte = null;
// if (definition.length() > 0)
// { try {
// newbyte = new Byte(definition);
// } catch (NumberFormatException e) {
// throw new JFugueException(JFugueException.EXPECTED_BYTE,definition,bracketedString);
// }
// }
// else
// newbyte = new Byte("-1");
// return newbyte.byteValue();
// }
COM: <s> look up a byte from the dictionary </s>
|
funcom_train/7531989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void setLevel(int level, Collection hosts) throws IllegalArgumentException {
if (hosts == null)
throw new NullPointerException();
for (Iterator it = hosts.iterator(); it.hasNext();) {
PGridHost host = (PGridHost)it.next();
mHosts.put(host.getGUID().toString(), host);
remove(host);
}
setLevels(level);
Collection coll = (Collection)mLevels.get(level);
coll.clear();
coll.addAll(hosts);
}
COM: <s> sets the whole level with the new delivered hosts </s>
|
funcom_train/7313495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run()
{
try
{
InputStreamReader isr = new InputStreamReader(m_is);
BufferedReader br = new BufferedReader(isr);
String line = null;
while ( (line = br.readLine()) != null)
consume(line);
}
catch (IOException ioe)
{
ioe.printStackTrace();
}
}
COM: <s> the actual thread that sits in a loop consuming input </s>
|
funcom_train/1977358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCharacterEscaping() throws Exception {
StringWriter value = new StringWriter();
OFXV1Writer writer = new OFXV1Writer(value);
writer.writeElement("NAME", "&<>");
writer.close();
assertEquals("<NAME>&<>", value.toString());
}
COM: <s> tests character escaping </s>
|
funcom_train/38157525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateEnabled() {
int row = resultTable.getSelectedRow();
if(row < 0) {
return;
}
TreePath path = resultTable.getTree().getSelectionPath();
SearchResult result = (SearchResult) path.getLastPathComponent();
resultMenu.getSubElements()[1].getComponent().
setEnabled(result.hasMetadata());
}
COM: <s> update the enabled state of the popup menu </s>
|
funcom_train/17589853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String nextToken() {
currentPosition = (newPosition >= 0 && !delimsChanged)
? newPosition
: skipDelimiters(currentPosition);
delimsChanged = false;
newPosition = -1;
if (currentPosition >= maxPosition) throw new NoSuchElementException();
int start = currentPosition;
currentPosition = scanToken(currentPosition);
return str.substring(start, currentPosition);
}
COM: <s> returns the next token from this string tokenizer </s>
|
funcom_train/19100769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected HandleEnumeration selectionHandles() {
java.util.List fSelectionHandles = CollectionsFactory.current().createList();
FigureEnumeration fe = selection();
while (fe.hasNextFigure()) {
Figure figure = fe.nextFigure();
HandleEnumeration kk = figure.handles();
while (kk.hasNextHandle()) {
fSelectionHandles.add(kk.nextHandle());
}
}
return new HandleEnumerator(fSelectionHandles);
}
COM: <s> gets an enumeration of the currently active handles </s>
|
funcom_train/7801308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAssignableFrom(final Object iPropertyValue) {
if (iPropertyValue == null)
return true;
final Class<?> cls = iPropertyValue.getClass();
for (int i = 0; i < allowAssignmentFrom.length; ++i) {
if (allowAssignmentFrom[i].equals(Array.class) && cls.isArray())
// SPECIAL CASE: GET ARRAYS
return true;
if (allowAssignmentFrom[i].isAssignableFrom(cls))
return true;
}
return false;
}
COM: <s> check if the value is assignable by the current type </s>
|
funcom_train/17937444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int binom(int n, int k) {
if (k == 0) return 1;
if (2*k > n) return binom(n, n - k);
else {
int erg = n;
for (int i = 2; i <= k; i++) {
erg = erg * (n + 1 - i);
erg = erg / i;
}
log.debug(n + " over " + k + " equals " + erg);
return erg;
}
}
COM: <s> calculates the binomial coefficient </s>
|
funcom_train/37858825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invalidateAll(XmldbURI collectionPath) {
//TODO : use XmldbURI.resolve !
if (!collectionPath.startsWith(CONFIG_COLLECTION_URI))
return;
synchronized (latch) {
LOG.debug("Invalidating collection " + collectionPath);
configurations.remove(new CollectionURI(collectionPath.getRawCollectionPath()));
}
}
COM: <s> notify the manager that a collection </s>
|
funcom_train/13998442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addPropertyRangeEntry(String URI) throws AcuityException {
if (isDatatypeProperty) {
currentNewPropertyRanges = new ArrayList();
isDatatypeProperty = false;
}
if (!isInRangeDomainList(URI, false)) {
if (currentNewPropertyRanges == null) {
currentNewPropertyRanges = new ArrayList();
}
ArrayList entry = new ArrayList();
entry.add(URI);
entry.add(stripNameSpacePrefix(URI));
currentNewPropertyRanges.add(entry);
}
}
COM: <s> add the entries from the propertys range </s>
|
funcom_train/48189933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(PosRation entity) {
LogUtil.log("deleting PosRation instance", Level.INFO, null);
try {
entity = entityManager
.getReference(PosRation.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 ration entity </s>
|
funcom_train/20311636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Expression notEqual( Node x, Node y )
{
return new Dyadic( asExpression( x ), "http://jena.hpl.hp.com/constraints/NE", asExpression( y ) )
{
public boolean evalBool( Object x, Object y )
{ return !x.equals( y ); }
};
}
COM: <s> an expression that is true if x and y differ </s>
|
funcom_train/25465178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getRowAt(int x, int y) {
for (int row = 0; row < target.getModel().getRowCount(); row++) {
Rectangle r = target.getCellRect(row, 0, true);
if (r.y < y && r.y + r.height > y) {
return row;
}
}
return -1;
}
COM: <s> finds the row from the x and y position </s>
|
funcom_train/17806109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAvailableBandwidth_mbPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PhysicalConnection_AvailableBandwidth_mb_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PhysicalConnection_AvailableBandwidth_mb_feature", "_UI_PhysicalConnection_type"),
CtbPackage.Literals.PHYSICAL_CONNECTION__AVAILABLE_BANDWIDTH_MB,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the available bandwidth mb feature </s>
|
funcom_train/31517269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ParseStreamData() {
// If there was no data, display the message 'No data.' (stored in hexadecimal).
if (this.streamDataSize == 0) {
this.streamData = "4E6F20646174612E";
} else if ((this.streamData = byteArrayToHex(this.streamDataSize)).length() < 0) {
return;
}
// The end of the current streams data is padded to a 4 byte boundary.
while (this.offset % this.padsize != 0) {
this.offset++;
}
}
COM: <s> extract the stream data </s>
|
funcom_train/40942080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(String dateFormat, String timeZone, Locale locale) {
DateTime newDateTime = this.convertTime(timeZone);
SimpleDateFormat sdf = new SimpleDateFormat(dateFormat, locale);
sdf.setDateFormatSymbols(new DateFormatSymbols(locale));
sdf.setTimeZone(TimeZone.getTimeZone(timeZone));
return sdf.format(newDateTime.getDate());
}
COM: <s> converts the stored date time to requested timezone and returns </s>
|
funcom_train/33913783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URLStreamHandler createURLStreamHandler(String protocol) {
URLStreamHandler handler=null;
if("xmldb".equals(protocol)){
LOG.debug(protocol);
handler=new Handler();
} else {
//LOG.error("Protocol should be xmldb, not "+protocol);
}
return handler;
}
COM: <s> create custom url streamhandler for the b xmldb b protocol </s>
|
funcom_train/43326726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void centerOfMass(DVector cm) {
int na = 0;
cm.setValue(0.0);
if (atoms != null)
for (AtomNode q = (AtomNode)atoms.head(); q!=null; q = q.next)
if (q.coord != null) {
na++;
cm.add(q.coord);
}
if (na > 1) cm.divide((double)na);
}
COM: <s> finds the center of mass for the monomer and puts in in </s>
|
funcom_train/49456609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Db getDb(String _company) throws Exception {
_logger.debug("JSP retrieving database connection for company ("+_company+")");
String company = StringHelper.nullify(_company);
if (company != null && ! StringHelper.checkStringIsAlpha(company)) {
_logger.error("Abnormal company name provided ("+company+")");
throw new IllegalArgumentException("Abnormal company name provided ("+company+")");
}
return (company == null ? DbConnection.defaultCieDbRO() : DbConnection.companyDbRO(company));
}
COM: <s> get the db corresponding to the named company </s>
|
funcom_train/38532330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Icon getIcon() {
if ( lineStart == null ) {
return null;
}
if ( lineStart.type == SourceLine.TYPE_PROCEDURE ) {
return Icons.iconProcedure;
}
else if ( lineStart.type == SourceLine.TYPE_SCREEN ) {
return Icons.iconScreen;
}
else if ( lineStart.type == SourceLine.TYPE_SUBROUTINE ) {
return Icons.iconSubroutine;
}
return null;
}
COM: <s> used to display in the tree model for the structure of the code </s>
|
funcom_train/47323498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteMessage(final long msgId) throws Exception {
deleteMsgUserRelation(msgId);
deleteEnvelope(msgId);
deleteBlobs(msgId);
deleteBody(msgId);
deleteTagXRef(msgId);
deleteMsgUuidRelation(msgId);
deleteUsingStatement(msgId, "del_msg");
}
COM: <s> forced permanent deletion of message </s>
|
funcom_train/20051734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PresidentSort getPresidentSort(Limit limit) {
PresidentSort presidentSort = new PresidentSort();
SortSet sortSet = limit.getSortSet();
Collection<Sort> sorts = sortSet.getSorts();
for (Sort sort : sorts) {
String property = sort.getProperty();
String order = sort.getOrder().toParam();
presidentSort.addSort(property, order);
}
return presidentSort;
}
COM: <s> a very custom way to sort the items </s>
|
funcom_train/31626597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Transition buildCancelTransition() throws DBException {
Transition cancel = new Transition("cancel", "Cancel", SelectionWizardManager.class,
SelectionWizardManager.STATE_PROMPT_EDIT);
cancel.addParam(WizardController.WIZ_PARAMETER_ID, getStep().getWizardDefinition().getId());
return cancel;
}
COM: <s> builds a cancel transition to allow easy exiting while in any </s>
|
funcom_train/25662536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dispActData() {
this.listModel.clear();
try {
for (ActivityListObject activityListObject : fHandler.readTmxFile(this.fileName)) {
this.listModel.addElement(activityListObject);
}
} catch (IOException ex) {
super.exitError(ERROR_LOG, ex);
}
}
COM: <s> display the existing activities and their current elapsed time </s>
|
funcom_train/38353033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeOutPort(int index) {
Port removed = (Port)outPorts.get(index);
getOperatorGraph().getSchedule().getEventController().removeModule(removed);
outPorts.remove(index);
for (int i = index; i < outPorts.size(); i++) {
((OutPort)outPorts.get(i)).setNumber(i);
}
firePortRemovedEvent(removed);
}
COM: <s> removes the out port with the specified number </s>
|
funcom_train/18741997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void graphChanged(GraphModelEvent e) {
boolean changed = false;
if (getTypeGraph() != this.typeGraph) {
updateModel();
} else {
GraphModelEvent.GraphModelChange change = e.getChange();
changed = processRegularEdit(change, changed);
if (changed) {
updateTree();
}
}
}
COM: <s> updates the label list according to the change event </s>
|
funcom_train/11671542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(int b) throws IOException {
fBuffer[fPosition++] = (byte)b;
if (fPosition == fBuffer.length) {
fPosition = 0;
fDataOutputStream.writeInt(fBuffer.length);
super.out.write(fBuffer, 0, fBuffer.length);
}
} // write(int)
COM: <s> writes a single byte to the output </s>
|
funcom_train/18497003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleBrowse() {
ContainerSelectionDialog dialog =
new ContainerSelectionDialog(
getShell(),
ResourcesPlugin.getWorkspace().getRoot(),
false,
"Select new file container");
if (dialog.open() == ContainerSelectionDialog.OK) {
Object[] result = dialog.getResult();
if (result.length == 1) {
containerText.setText(((Path)result[0]).toOSString());
}
}
}
COM: <s> uses the standard container selection dialog to </s>
|
funcom_train/20981947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createActions() {
loginAction = new LoginAction(this,"Login",MyImageRegistry.getInstance().getImageDescriptor("login_action"));
loginAction.setToolTipText("Login");
logoutAction = new LogoutAction(this,"Logout",MyImageRegistry.getInstance().getImageDescriptor("logout_action"));
logoutAction.setToolTipText("Logout");
logoutAction.setEnabled(false);
}
COM: <s> create the actions </s>
|
funcom_train/39877302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPasswordQuality(ComponentName admin, int quality) {
if (mService != null) {
try {
mService.setPasswordQuality(admin, quality);
} catch (RemoteException e) {
Log.w(TAG, "Failed talking with device policy service", e);
}
}
}
COM: <s> called by an application that is administering the device to set the </s>
|
funcom_train/29819670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EntryType set(int index, EntryType obj) {
incVersion();
checkInterval(index, 0, size() - 1);
AVLNode node = root.get(index);
EntryType result = (EntryType) node.getValue();
node.setValue((Persistent) obj);
return result;
}
COM: <s> sets the element at the specified index </s>
|
funcom_train/10956130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void injectIntoCookiesAwareAction(Object action, Map<String, String> cookiesMap) {
if (action instanceof CookiesAware) {
if (LOG.isDebugEnabled()) {
LOG.debug("action ["+action+"] implements CookiesAware, injecting cookies map ["+cookiesMap+"]");
}
((CookiesAware)action).setCookiesMap(cookiesMap);
}
}
COM: <s> hook that set the code cookies map code into action that implements </s>
|
funcom_train/6249641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertEqualColumns(Column column1, Column column2) {
assertEquals(column1, column2);
assertEquals(column1.hashCode(), column2.hashCode());
assertTrue(column1.compareTo(column2) == 0);
assertTrue(column2.compareTo(column1) == 0);
}
COM: <s> helper method to assert columns are equal </s>
|
funcom_train/23393588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addExpireTimePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Enactment_expireTime_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Enactment_expireTime_feature", "_UI_Enactment_type"),
EnactmentPackage.Literals.ENACTMENT__EXPIRE_TIME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the expire time feature </s>
|
funcom_train/26095884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBaseLevelsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Edge_baseLevels_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Edge_baseLevels_feature", "_UI_Edge_type"),
ArnePackage.Literals.EDGE__BASE_LEVELS,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the base levels feature </s>
|
funcom_train/26221399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setController(IAgentopiaSwingController controller) {
this.controller = controller;
getHostStarterPanel().setController(controller);
getAgentStarterInternalFrame().getAgentStarterPanel().setController(controller);
getServiteurStarterInternalFrame().getServiteurStarterPanel().setController(controller);
getExitStarterInternalFrame().getExitStarterPanel().setController(controller);
}
COM: <s> sets the controller </s>
|
funcom_train/7222649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void edit(ConsumerContext context, Token token){
String value = token.getAttributeValue(attrName_, null);
if((null == value) ||
token.hasAttribute(SET.EXTERNAL, VALUE.TRUE))
{
// does nothing, because no URL attribute is specified
getConsumer().consume(context, token);
}
else{
doEditing(context, token, value);
}
}
COM: <s> ensure that specified attribute value includes session id </s>
|
funcom_train/5020767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Edge newDummyEdge(Node sourceNode, Node targetNode) {
boolean addedEdge;
DummyEdgePart edgePart = new DummyEdgePart();
Edge edge = new Edge(edgePart, sourceNode, targetNode);
edge.weight = 2;
// add the new edge to the edge list
edgeList.add(edge);
targetNode = sourceNode;
addedEdge = true;
return edge;
}
COM: <s> creates a new dummy edge to be used in the graph </s>
|
funcom_train/17626570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isIdentifierChar() {
if (_len >= 0 && _pos >= _len) {
return false;
}
char ch = _working[_pos];
return Character.isUnicodeIdentifierStart(ch) || Character.isDigit(ch) || (':' == ch) || ('.' == ch) || ('-' == ch);
}
COM: <s> checks if character at current runtime position can be identifier part </s>
|
funcom_train/26322456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getChannels(String query) {
if (cachedQueries.containsKey(query)) {
return ( (ChannelQuery) cachedQueries.get(query)).execute();
}
else {
// the query wasnt cached yet, so add this.
ChannelQuery channelQuery = new ChannelQuery(super.getDataSource(), query);
cachedQueries.put(query, channelQuery);
return channelQuery.execute();
}
}
COM: <s> the pre defined queries are cached </s>
|
funcom_train/2344520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addTrafficObserver(){
Long onoff = ((LongParameter)plGui.getParameter("Input Active")).getValue();
if(onoff == -1){
//nothing
return -1;
}
if(onoff == 0){ //network on
InitConnection();
System.out.println("network on");
trafficLiveInput.addObserver(connectionSplitter);
return 0;
}
if(onoff == 1){// file on
InitConnection();
System.out.println("file on");
trafficFileInput.addObserver(connectionSplitter);
return 1;
}
return -1;
}
COM: <s> creates the in fe ct input oberserver structure </s>
|
funcom_train/24255058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getLatitudeScaleFactor(double lat) {
final double latAbs = lat < 0. ? -lat : lat;
final int piecesCount = this.distSpline.length;
int i = (int)(latAbs / LAT_INC);
if (i >= piecesCount)
i = piecesCount-1;
final double t = latAbs/LAT_INC - i;
return poly(this.distSpline, i, t);
}
COM: <s> returns the scale factor for the latitude computed with a cubic spline </s>
|
funcom_train/41262006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer generateBucketStoragePath() {
StringBuffer buffer = new StringBuffer();
Configuration configuration = getConfiguration();
String storageLocation = configuration
.getString(CONFIG_STORAGE_LOCATION);
String bucketDirectory = configuration.getString(
CONFIG_DIRECTORY_BUCKETS, DIRECTORY_BUCKETS);
buffer.append(storageLocation);
if (!storageLocation.endsWith(fileSeparator)) {
buffer.append(fileSeparator);
}
buffer.append(bucketDirectory);
if (!bucketDirectory.endsWith(fileSeparator)) {
buffer.append(fileSeparator);
}
return buffer;
}
COM: <s> generates a local path for the bucket </s>
|
funcom_train/3173375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getToolTip() {
if (toolTip==null) {
// can localize?
Resources resources = Resources.get(instance);
toolTip = resources.getString("option." + property + ".tip", false);
if (toolTip==null) {
toolTip = resources.getString(property + ".tip", false);
}
}
// done
return toolTip;
}
COM: <s> accessor tool tip for this option </s>
|
funcom_train/23011651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLoadComplete(boolean b) {
if(isGeocoding){
if (layerExtent!=null)
metadata.maxExtent = layerExtent;
}else{
metadata.isLoaded = b;
if (b && layerExtent!=null){
if (metadata.maxExtent.isZero()) //TIMEMAP
metadata.maxExtent = layerExtent;
}
}
// saveDataStorageAll();
}
COM: <s> sets a value indicating whether a layer is downloaded completely or not </s>
|
funcom_train/40485888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enterWhen(Guard guard) throws InterruptedException {
if (guard.monitor != this) {
throw new IllegalMonitorStateException();
}
final ReentrantLock lock = this.lock;
boolean reentrant = lock.isHeldByCurrentThread();
lock.lockInterruptibly();
try {
waitInterruptibly(guard, reentrant);
} catch (Throwable throwable) {
lock.unlock();
throw Throwables.propagate(throwable);
}
}
COM: <s> enters this monitor when the guard is satisfied </s>
|
funcom_train/25212412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addWord(CharNode node, UnicodeCharList word) {
if (node instanceof LigatureNode) {
LigatureNode ln = (LigatureNode) node;
CharNode[] chars = ln.getChars();
for (int j = 0; j < chars.length; j++) {
word.add(chars[j].getCharacter());
}
} else {
word.add((node).getCharacter());
}
}
COM: <s> add the characters extracted from a char node to the word container </s>
|
funcom_train/36426715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void confirmContexts() {
APLElement intent;
for (Goal subGoal: this.goalStacks) {
while (subGoal != null) {
intent = subGoal.getIntention();
if (intent != null) {
intent.getPlan().confirmContext(subGoal.getIntentionBinding());
}
subGoal = subGoal.getSubgoal();
}
}
}
COM: <s> go through all of the stacks and confirm the context </s>
|
funcom_train/16484651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setText("Squareness");
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
WipideaApplet.getInstance().updateLnf(WipideaApplet.LNF_SQUARENESS);
}
});
}
return jButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/43245359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetECTwoState() {
System.out.println("setECTwoState");
String eCTwoState = "";
EmergencyContactDG4Object instance = new EmergencyContactDG4Object();
instance.setECTwoState(eCTwoState);
// 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 ectwo state method of class org </s>
|
funcom_train/46824956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAttackingMove (ChessModel chessModel, int x1, int y1, int x2, int y2) {
return (
y2 == y1 - 1 && (x2 == x1 - 1 || x2 == x1 + 1) &&
chessModel.getPieceColour(x2, y2) == ChessModel.PLAYER_TWO
) || isEnPassant(chessModel, x1, y1, x2, y2);
}
COM: <s> a pawn is unique as its attacking moves are seperate from actually </s>
|
funcom_train/51606627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updatePanels() {
minLonTextField.setValue(new Float(bounding[0]));
minLatTextField.setValue(new Float(bounding[1]));
maxLonTextField.setValue(new Float(bounding[2]));
maxLatTextField.setValue(new Float(bounding[3]));
}
COM: <s> updates panel fields after params changes </s>
|
funcom_train/31407555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void run(){
while(true){
if( timeToThink ){
try{
game.applyMove(p.getNextMove(game)); }
catch( IllegalMoveException ime ){
System.out.println("attempted illegal move:"+ime);}
timeToThink = false;
}
try{
wait();
}catch(InterruptedException ie){}
}
}
COM: <s> comprises the behavior of the thinker thread </s>
|
funcom_train/20646935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JInternalFrame createDevelInternalFrame(String title) {
JInternalFrame jif= new JInternalFrame(title, true, false, true, true);
jif.setSize(300, 300);
setLocation(10, 310);
JScrollPane scrollPane= new JScrollPane(this);
jif.getContentPane().add(scrollPane, BorderLayout.CENTER);
jif.setVisible(true);
return jif;
}
COM: <s> added by perki </s>
|
funcom_train/37861434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void finishTrigger(Txn transaction, DocumentImpl doc) throws TriggerException {
//finish the trigger
DocumentTriggersVisitor triggersVisitor = triggers.get(doc.getDocId());
if(triggersVisitor != null) {
triggersVisitor.afterUpdateDocument(context.getBroker(), transaction, doc);
}
}
COM: <s> fires the finish function for update document event for the documents trigger </s>
|
funcom_train/49469180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PageCounter countPortalSites(Filter filter) throws Exception {
_logger.info("soapPortalReferentiel - countPortalSites: "+filter);
Db db = dbRO();
try {
return DbPortalReferentiel.getListOfSitesCounter(db, filter);
} catch (Exception e) {
store(e);
throw e;
} finally {
db.safeClose();
}
}
COM: <s> count portal sites </s>
|
funcom_train/4358829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Date getDate() {
// Only create a new Date once per second, max.
long systime = System.currentTimeMillis();
AccessDateStruct struct = currentDateStruct.get();
if ((systime - struct.currentDate.getTime()) > 1000) {
struct.currentDate.setTime(systime);
struct.currentDateString = null;
}
return struct.currentDate;
}
COM: <s> this method returns a date object that is accurate to within one second </s>
|
funcom_train/27674852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void interpret( final String origin, final Reader r ) {
// This method is always considered non-interactive.
Parser parser = new MillScriptParser( origin, r, true, config );
// This shoule compile everything that can be read, as the compile loop
// continues until the end of file.
this.getCompilerState().compileNoResults( parser );
}
COM: <s> interprets the characters returned by the specified reader into this </s>
|
funcom_train/45121581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPkFieldNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ComboTable_pkFieldName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ComboTable_pkFieldName_feature", "_UI_ComboTable_type"),
DictionaryPackage.Literals.COMBO_TABLE__PK_FIELD_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
getString("_UI_DatabasePropertyCategory"),
null));
}
COM: <s> this adds a property descriptor for the pk field name feature </s>
|
funcom_train/638396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedAnnotations(List<SimpleInstance> selectedAnnotations) {
if( selectedAnnotations.size() >= 2 ) {
SimpleInstance firstAnnotation = (SimpleInstance)selectedAnnotations.get(0);
SimpleInstance secondAnnotation = (SimpleInstance)selectedAnnotations.get(1);
setSelectedAnnotation( firstAnnotation );
setSelectedConsensusAnnotation( secondAnnotation );
EventHandler.getInstance().fireMultipleAnnotationSelectionChanged(selectedAnnotations);
}
}
COM: <s> used during consensus mode to allow multiple selection of annotations at a time </s>
|
funcom_train/7295411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isGroupingPosition(int pos) {
boolean result = false;
if (isGroupingUsed() && (pos > 0) && (groupingSize > 0)) {
if ((groupingSize2 > 0) && (pos > groupingSize)) {
result = ((pos - groupingSize) % groupingSize2) == 0;
} else {
result = pos % groupingSize == 0;
}
}
return result;
}
COM: <s> return true if a grouping separator belongs at the given </s>
|
funcom_train/38937923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveHorizontal(int XPosition, int MoveSpeed) {
this.XPos = XPosition;
this.speed = MoveSpeed;
if (XPos < 0) {
speed = (-1 * speed);
}
AnimationID = 2;
System.out.println("move horz with X at: " + x);
start();
}
COM: <s> moves component horizontally vertically and diagonally </s>
|
funcom_train/22638863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CodePath createNewCodePath(CodePath curPath) {
CodePath c;
c = new CodePath(curRun.codePathId++, curPath);
curRun.allCodePaths.add(c);
if (curPath != null) {
curPath.subPaths.add(c);
}
return c;
}
COM: <s> given a parent code path create a child </s>
|
funcom_train/14271137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
try {
log.info("Destroy called for " + this.getClass().getName());
log.info("Saving configuration");
ConfigurationBO.saveConfiguration();
} catch (Exception e) {
log.error("Exception during destroy : " + e.getMessage(), e);
}
}
COM: <s> run in case the application will be shut down </s>
|
funcom_train/25797007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendButton(short code, boolean repeat, boolean down, boolean queue, short amount, byte axis) throws IOException {
final InetAddress addr = mHostAddress;
if (addr != null) {
PacketBUTTON p = new PacketBUTTON(code, repeat, down, queue, amount, axis);
p.send(addr, mHostPort);
}
}
COM: <s> sends a button event </s>
|
funcom_train/3378788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
try {
String str = getAsString();
if (str != null)
return "\"" + str + "\"";
if (tag == tag_Null)
return "[DerValue, null]";
if (tag == tag_ObjectId)
return "OID." + getOID();
// integers
else
return "[DerValue, tag = " + tag
+ ", length = " + length + "]";
} catch (IOException e) {
throw new IllegalArgumentException("misformatted DER value");
}
}
COM: <s> returns a printable representation of the value </s>
|
funcom_train/20748389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getIndexibleText() {
try {
return getMetaData().getReadableName()+"\n\n"+getDescription()+"\n\n"+StringTools.htmlToText(tape.toString());
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Unable to get Text");
return "unknown";
}
}
COM: <s> get a text representation for this item that can be used for indexing </s>
|
funcom_train/30155700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEyeColor(String eyeColor) {
if (!mEyeColor.equals(eyeColor)) {
mCharacter.postUndoEdit(MSG_EYE_COLOR_UNDO, ID_EYE_COLOR, mEyeColor, eyeColor);
mEyeColor = eyeColor;
mCharacter.notifySingle(ID_EYE_COLOR, mEyeColor);
}
}
COM: <s> sets the eye color </s>
|
funcom_train/7757377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addHeader(String name, byte [] value) {
/*
if (LOG.isEnabledFor(Level.DEBUG))
LOG.debug("Add header :" + name + "(" + name.length() +") with " + value.length + " bytes of value");
*/
headers.add(new Header(name, value));
}
COM: <s> add a header </s>
|
funcom_train/50941267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if ( type == TYPE_ENTRY_RANGE || !calendarView ) {
return toStringDateInterval();
}
StringBuffer sb = new StringBuffer();
sb.append(toStringCalendar(false));
if ( false ) {
sb.append(" (");
sb.append(toStringDateInterval());
sb.append(")");
}
return sb.toString();
}
COM: <s> nice string complex representation year 2000 week 34 quarter 1 </s>
|
funcom_train/18183698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testIsClosed() throws ResourceException {
assertThat(connectionImpl.isClosed(), is(false));
connectionImpl.setManagedConnectionImpl(managedConnectionImpl);
connectionImpl.close();
assertThat(connectionImpl.isClosed(), is(true));
}
COM: <s> verifies the code closed code property </s>
|
funcom_train/20433533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getPlayerComboBox() {
if (playerComboBox == null) {
playerComboBox = new JComboBox(GameProperties.PLAYERS);
gamePlay.setPlayer(GamePlayers.values()[playerComboBox
.getSelectedIndex()].getPlayer());
playerComboBox.setPreferredSize(new Dimension(120, 30));
}
return playerComboBox;
}
COM: <s> this method initializes player combo box </s>
|
funcom_train/43846745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
jLabel = new JLabel();
jLabel.setText("");
jPanel = new JPanel();
jPanel.setLayout(new BorderLayout());
jPanel.setBorder(BorderFactory
.createBevelBorder(BevelBorder.LOWERED));
jPanel.add(jLabel, BorderLayout.NORTH);
jPanel.add(getProgressBar(), BorderLayout.CENTER);
jPanel.add(getJPanel1(), BorderLayout.SOUTH);
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/49320471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getParamValueAsDouble(String label, double defaultValue) {
Object o = getParamValue(label);
if (o == null)
return defaultValue;
if (o instanceof Number)
return ((Number) o).doubleValue();
if (o instanceof String)
return Double.parseDouble((String) o);
return defaultValue;
}
COM: <s> get the value of the named parameter as a double </s>
|
funcom_train/12310589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLabel() {
try {
return getFeatureLabel(newFeatureRef);
} catch (CoreException e) {
if (newFeatureRef instanceof IIncludedFeatureReference) {
String iname =
((IIncludedFeatureReference) newFeatureRef).getName();
if (iname != null)
return iname;
}
try {
VersionedIdentifier vid =
newFeatureRef.getVersionedIdentifier();
return vid.toString();
} catch (CoreException e2) {
}
}
return null;
}
COM: <s> returns label for ui presentation </s>
|
funcom_train/35329484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rereadTheFile() throws NotOwnerException, UnknownHostException {
alwaysAuthorized = false;
acl.removeAll(owner);
trapDestList.clear();
informDestList.clear();
AclEntry ownEntry = new AclEntryImpl(owner);
ownEntry.addPermission(READ);
ownEntry.addPermission(WRITE);
acl.addEntry(owner,ownEntry);
readAuthorizedListFile();
}
COM: <s> resets this acl to the values contained in the configuration file </s>
|
funcom_train/46695951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetParameter_0args() {
System.out.println("getParameter");
AggregateLinks instance = new AggregateLinks();
Properties expResult = null;
Properties result = instance.getParameter();
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 parameter method of class aggregate links </s>
|
funcom_train/32060489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Taskforce getPlayerFirstColonyTaskforce() {
Vector<Taskforce> tfs =
sf.game.currentplayer.getAllPlayerTaskforces(sf.game);
Taskforce colonytf = null;
// Find a taskforce in the system with a colony ship.
for(Taskforce tf : tfs) {
if(tf.getSystem() == starsystem) {
if(tf.hasColonyModule()) {
colonytf = tf;
break;
}
}
}
return colonytf;
}
COM: <s> returns the players first taskforce in the star system that has colony </s>
|
funcom_train/12806617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFields(FdfReader fdf) throws IOException, DocumentException {
HashMap<String, PdfDictionary> fd = fdf.getFields();
for (String f: fd.keySet()) {
String v = fdf.getFieldValue(f);
if (v != null)
setField(f, v);
}
}
COM: <s> sets the fields by fdf merging </s>
|
funcom_train/24628828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void go() {
// seen_=true; -- subclasses don't do a super.go()
Browser br = getBrowser();
////System.out.println("HyperlinkSpan "+target_);
if (target_==null) {}
else if (target_ instanceof SemanticEvent) br.eventq((SemanticEvent)target_);
else br.eventq(Document.MSG_OPEN, target_);
}
COM: <s> override this for special action when hyperlink is clicked </s>
|
funcom_train/25201740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear(PrintStream out) {
if (empty) {
return;
}
if (shift) {
ps.putText(out, text, x, y);
} else {
ps.putText(out, text, x);
}
text.delete(0, text.length());
empty = true;
}
COM: <s> ship the collected characters out </s>
|
funcom_train/2386349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addButtons(String label, JPanel plMain, ActionListener listener){
JButton bt = new JButton(label);
bt.addActionListener(listener);
JPanel plButton = new JPanel(new FlowLayout());
plButton.add(bt);
plMain.add(plButton);
}
COM: <s> add a button into a main panel </s>
|
funcom_train/43184062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Time getTimeChosen(Date start, Date end, int crossroadId, int sensorId) {
int travelTime = Math.abs(start.getMinutes() - end.getMinutes());
prepareData(crossroadId, sensorId);
if(isSuitable(travelTime)){
Time time = new Time(start, end, travelTime);
return time;
} else {
return null;
}
}
COM: <s> calculate time chosen between two sensor in road </s>
|
funcom_train/27682984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLogProperty(Log log, String key, String defaultValue) {
String value = "";
// If no log given, skip the log name override
if (log != null)
{
value = getProperty(log.getName() + "." + key, "");
}
if (value.equals("")) {
value = getProperty(key, defaultValue);
}
return value;
}
COM: <s> returns the default property for the key given by first looking </s>
|
funcom_train/15601252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void broadcastMessage(IMessage Message) throws EMessageTooLarge {
// Creating a copy of all connection handlers
Collection<CServerConnectionHandler> connections;
synchronized (m_ConnectionHandlers) { connections = m_ConnectionHandlers.values(); }
for (CServerConnectionHandler current : connections) {
try { current.sendMessage(Message); }
catch (EMessageSending Ignore) { /* ignore, try to broadcast to the next connection */ }
}
}
COM: <s> p broadcast the message to all mediator connection handlers </s>
|
funcom_train/7622529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCompoundDrawablePadding(int pad) {
Drawables dr = mDrawables;
if (pad == 0) {
if (dr != null) {
dr.mDrawablePadding = pad;
}
} else {
if (dr == null) {
mDrawables = dr = new Drawables();
}
dr.mDrawablePadding = pad;
}
invalidate();
requestLayout();
}
COM: <s> sets the size of the padding between the compound drawables and </s>
|
funcom_train/43827512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addGradientRotationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Fill_gradientRotation_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Fill_gradientRotation_feature", "_UI_Fill_type"),
GraphicsPackage.Literals.FILL__GRADIENT_ROTATION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the gradient rotation feature </s>
|
funcom_train/47399135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void closeConnection() {
if (m_connection != null) {
try {
m_connection.close();
}
catch(SQLException ex) {
m_log.error("DbUserManager.closeConnection()", ex);
}
m_connection = null;
}
m_log.info("Database connection closed.");
}
COM: <s> close connection to database </s>
|
funcom_train/41645072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTargetPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PresentationContainerRelationship_target_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PresentationContainerRelationship_target_feature", "_UI_PresentationContainerRelationship_type"),
AdaptedauiPackage.Literals.PRESENTATION_CONTAINER_RELATIONSHIP__TARGET,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the target feature </s>
|
funcom_train/12067654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeFont(float[] fgColor, float[] bgColor) {
int charsetTexture = 0;
if ((charsetTexture = makeFontTexture(fgColor, bgColor)) > 0) {
// create MAX_CHARS display lists, one for each character
// textureSize and fontSize are calculated by createFontImage()
buildFont(charsetTexture, textureSize, fontSize);
fontTextureHandle = charsetTexture;
}
}
COM: <s> prepare a texture mapped character set with the given font text color </s>
|
funcom_train/12239355 | /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();
sb.append(this.funcName);
sb.append("(");
Iterator<ResultRow> iter = this.args.iterator();
ResultRow row = null;
if(iter.hasNext()) {row = iter.next();}
while(row != null) {
sb.append(row.get("argType"));
sb.append(" ");
sb.append(row.get("argName"));
if(iter.hasNext()) {
row = iter.next();
sb.append(", ");
} else {break;}
}
sb.append(");");
return sb.toString();
}
COM: <s> returns a string representing this ddf </s>
|
funcom_train/16513382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveDown() {
int oldIndex = getCommandContainer().getCommands().indexOf(this);
getCommandContainer().getCommands().remove(oldIndex);
getCommandContainer().getCommands().add(oldIndex + 1, this);
registerMoved(UndoOperationValues.wasMovedDown);
}
COM: <s> moves this command down in the command container that </s>
|
funcom_train/16556446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeConnectionWP(ConnectionWithParams _cwp) {
ArrayList keysToRemove = new ArrayList();
Iterator iter = connections.keySet().iterator();
while (iter.hasNext()) {
Object key = iter.next();
ConnectionWithParams cwp = (ConnectionWithParams) connections.get(key);
if (cwp == _cwp) {
keysToRemove.add(key);
}
}
for (int i=0; i<keysToRemove.size(); i++) {
connections.remove(keysToRemove.get(i));
}
}
COM: <s> removes connection with its params </s>
|
funcom_train/19400994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeEntry(Entry entry) {
Entry prior = entry.prior;
Entry next = entry.next;
if (entry == first) {
first = next;
}
if (last == entry) {
last = prior;
}
if (prior != null) {
prior.next = next;
}
if (next != null) {
next.prior = prior;
}
entry.prior = null;
entry.next = null;
}
COM: <s> remove an entry from linked list </s>
|
funcom_train/16482243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean Undo( ) {
if (undoStack.size() < 1) { return false; }
UndoData ud = (UndoData)undoStack.remove(0);
if ( ud.right ) { right--; }
else { wrong--; }
lastCardStats = ud.oldStats;
reviewUntil = ud.oldReviewUntil;
remove(ud.oldCard.getID());
add(ud.oldCard);
return true;
}
COM: <s> undoes the effects of the last right or wrong call </s>
|
funcom_train/46845346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enterSpan(String className, CSSstyle s, IVisualPart vp, String tooltip) {
if (outputPendingTableElement(s, vp, tooltip, className)) {
// Span was absorbed in enclosing table element
// Create dummy element for subsequent invocation of exitSpan
openElement("", s, vp, tooltip, className);
} else {
// Treat unabsorbed span as an actual HTML element
openElement("SPAN", s, vp, tooltip, className);
printOpening();
}
}
COM: <s> opens an ozone block span train element in this html page </s>
|
funcom_train/8685388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean sameDefinition(AntTypeDefinition other, Project project) {
return (other != null && other.getClass() == getClass()
&& other.getTypeClass(project).equals(getTypeClass(project))
&& other.getExposedClass(project).equals(getExposedClass(project))
&& other.adapterClass == adapterClass
&& other.adaptToClass == adaptToClass);
}
COM: <s> equality method for this definition assumes the names are the same </s>
|
funcom_train/31073885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInitializeInexistentMappingFile() {
File _file = new File("target/test-classes/Inexistent.xml");
try {
XmlToXlsMapper _mapper = new XmlToXlsMapper(_file);
fail();
} catch (JAXBException e) {
// force the test to fail, because the exception was thrown
// and it shouldn't have
fail();
}
catch (IOException e) {
assertTrue(true);
}
}
COM: <s> test xml to xls mapper initialization from a inexistent xml file </s>
|
funcom_train/14505839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test09truststoreTypePEM() throws Exception {
final String truststoreType = "PKCS12";
// Setup workers
addRenewalWorkerWithPEM(6101, "RenewalWorker_6101");
addSigner(SIGNERID_6102, SIGNER_6102, SIGNER_6102_ENDENTITY);
// Setup EJBCA end entitity
mockSetupEjbcaSearchResult();
doRenewalFirstTime();
}
COM: <s> tests renewal using a pem file no trustore password should be used </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.