__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/17545346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetBuildXml() throws Exception {
FileObject result = SessionsUtils.getBuildXml(buildXmlDObj);
assertNotNull("Null build.xml FileObject", result);
assertEquals("Wrong file found", "build.xml", result.getNameExt());
}
COM: <s> test of get build xml method of class pl </s>
|
funcom_train/35837254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copy() {
if (editing) {
String text = oLink.getText();
if (startSelection < 0 || stopSelection < 0 || stopSelection > text.length())
return;
if (clipboard == null)
clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
StringSelection data;
String selectedText = text.substring(startSelection, stopSelection);
data = new StringSelection(selectedText);
clipboard.setContents(data, data);
}
}
COM: <s> if editing do a copy to the clipboard from the link label </s>
|
funcom_train/7476263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSymbolicDirectoryLink(final File pParentDirectory, final File pDirectory) {
try {
final String canonicalParentPath1 = pParentDirectory.getCanonicalPath();
final String canonicalParentPath2 = pDirectory.getCanonicalFile().getParent();
return !canonicalParentPath1.equals(canonicalParentPath2);
} catch (IOException e) {
return true;
} catch (NoSuchElementException e) {
// See: http://code.google.com/p/android/issues/detail?id=4961
// See: http://code.google.com/p/android/issues/detail?id=5807
return true;
}
}
COM: <s> checks to see if it appears that a directory is a symbolic link </s>
|
funcom_train/11010436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addLanguage() {
if (!propsPart.getLanguageProperty().hasValue())
return;
Element elem = xmlDoc.getRootElement().element(
new QName(KEYWORD_LANGUAGE, namespaceDC));
if (elem == null) {
// missing, we add it
elem = xmlDoc.getRootElement().addElement(
new QName(KEYWORD_LANGUAGE, namespaceDC));
} else {
elem.clearContent();// clear the old value
}
elem.addText(propsPart.getLanguageProperty().getValue());
}
COM: <s> add language property element if needed </s>
|
funcom_train/32062008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getEmissionsDetectionResolution() {
if (ships.isEmpty())
return 0f;
Starship bestdetectorcandidate = null;
for (Starship s : ships) {
if (bestdetectorcandidate == null) {
bestdetectorcandidate = s;
} else if (s.getEmissionsDetectionResolution() > bestdetectorcandidate
.getEmissionsDetectionResolution()) {
bestdetectorcandidate = s;
}
}
return bestdetectorcandidate.getEmissionsDetectionResolution();
}
COM: <s> returns the highest emissions detection resolution of all the starships </s>
|
funcom_train/3481855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSet fetchMsgTypeAll() throws ChannelStoreException {
// retrieve user details
ResultSet rsMsgTypeAll = null;
try {
rsMsgTypeAll = getMsgTypeSqlSelect_PS.executeQuery();
}
catch (Exception e) {
throw new ChannelStoreException("Error fetching queue message types (getMsgTypeAll).\n"
+ e.toString());
}
return rsMsgTypeAll;
}
COM: <s> retrieve all message type definitions </s>
|
funcom_train/19064111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTotalOccurencesCount() {
int totalTokenCount = getTotalTokenCount();
Iterator it = map.keySet().iterator();
int count = 0;
while (it.hasNext()) {
Token key = (Token) it.next();
Integer countInt = (Integer) map.get(key);
count += countInt.intValue();
}
return count;
}
COM: <s> get total count of occurences </s>
|
funcom_train/3935944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void afterSave() throws VException, SQLException {
initialize(focusItem);
DBChangeEvent lEvent = DBHandler.getInstance().getDefaultEvent(focusItem.getUniqueID());
Object[] lListeners = listeners.getListeners();
for (int i = 0; i < lListeners.length; i++) {
((IDBChangeListener)lListeners[i]).dbChanged(lEvent);
}
}
COM: <s> notify listeners about changes </s>
|
funcom_train/49049450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPrevPage(String currPage, Map requestMap) {
String prevPage = null;
for (int i = order.indexOf(currPage) - 1; i >= 0; --i) {
if (getParam(requestMap, (String) order.elementAt(i)) != null) {
prevPage = (String) order.elementAt(i);
break;
}
}
return prevPage;
}
COM: <s> get the previous page to be displayed given the current page </s>
|
funcom_train/44779454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareBoolean( Boolean in_bool1, Boolean in_bool2 ) {
boolean lc_b1 = in_bool1.booleanValue();
boolean lc_b2 = in_bool2.booleanValue();
if ( lc_b1 && lc_b2 || !lc_b1 && !lc_b2 ) {
return 0;
}
if ( !lc_b1 ) {
return -1;
}
if ( !lc_b2 ) {
return 1;
}
// Should not happen.
return 0;
}
COM: <s> compare boolean values </s>
|
funcom_train/8928046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBase64Element(byte[] bytes, String localname) {
if (bytes != null) {
Element e = Base64.encodeToElement(this._doc, localname, bytes);
this._constructionElement.appendChild(e);
if (!XMLUtils.ignoreLineBreaks()) {
this._constructionElement.appendChild(this._doc.createTextNode("\n"));
}
}
}
COM: <s> method add base64 element </s>
|
funcom_train/36911795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writePageDirectoryEntry(PageDirectoryEntry pageDirectoryEntry, int offset) throws ChainException{
if(offset >= 0 && offset < _totalEntries){
byte[] pageDirectoryEntryData = SerializationUtil.getSerializedForm(pageDirectoryEntry);
System.arraycopy(pageDirectoryEntryData, 0, data, offset * _directoryEntrySize, pageDirectoryEntryData.length);
}else{
throw new ChainException(null, "Invalid directory offset: " + offset);
}
}
COM: <s> write page directory entry at offset </s>
|
funcom_train/15617112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String lex(JFlexLexer lexer, ParserInput parserInput, ParserOutput parserOutput, int mode) throws ParserException {
lexer.init(parserInput, parserOutput, mode);
validate(lexer);
parserInput.incrementDepth();
try {
return lexer.lex();
} catch (Exception e) {
throw new ParserException("Failure while parsing topic " + parserInput.getVirtualWiki() + ':' + parserInput.getTopicName(), e);
} finally {
parserInput.decrementDepth();
}
}
COM: <s> utility method for executing a lexer parse </s>
|
funcom_train/14406718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildTree(Treeconfig[] treeconfigs) throws WbemsmtException {
List<TreeConfigData> list = new ArrayList<TreeConfigData>();
for (int i = 0; i < treeconfigs.length; i++) {
Treeconfig treeconfig = treeconfigs[i];
list.add(new TreeConfigData(treeconfig));
}
TreeConfigData[] configs = (TreeConfigData[]) list.toArray(new TreeConfigData[list.size()]);
buildTree(configs);
}
COM: <s> build the tree using the tree configurations </s>
|
funcom_train/31685388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeProperty(Property prop) throws ProfileException {
try {
PropertyInstanceStore propStore = getPropertyInstanceStore(prop);
if (propStore.isPopulated() == false) {
populatePropertyInstanceStore(null, propStore,false);
}
propStore.removePropertyInstance(prop);
} catch (DataAccessException e) {
throw new ProfileException(
"Error occured getting property instances",e);
} catch (PopulateException e) {
throw new ProfileException(
"Error occured populating prop insts",e);
}
}
COM: <s> removes instances of the specified code property code from this </s>
|
funcom_train/13958394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean canHandleRequest(WORequest request) {
String contentType = request.headerForKey("content-type");
if (contentType != null && contentType.startsWith("multipart/form-data")) {
return false;
}
ERXApplication app = ERXApplication.erxApplication();
String key = request.requestHandlerKey();
return key == null || KEY.equals(key) || app.componentRequestHandlerKey().equals(key) || app.directActionRequestHandlerKey().equals(key);
}
COM: <s> returns true if the request handler key can be handled </s>
|
funcom_train/31739184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleBid(Bid bid, Alert alert, int direction) {
System.out.println("Handle Bid");
try {
if (((direction + 1) % 4) == StressClient.this.direction) {
if (game.getStatus() == Game.BIDDING) {
bid();
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> handle a bid </s>
|
funcom_train/48525436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IdSet difference(IdSet local, IdSet remote, IdFactory factory) {
IdSet result = factory.buildIdSet();
Iterator<Id> i = remote.getIterator();
while (i.hasNext()) {
Id id = (Id) i.next();
if (! local.isMemberId(id))
result.addId(id);
}
return result;
}
COM: <s> this method simply returns remote local </s>
|
funcom_train/14025839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyDestinations(final Object src, final String srcProperty) {
// Do nothing if the destination property is not bound.
if (_destinations.containsKey(srcProperty)) {
synchronized(_destinations) {
for (DestinationEntry de : _destinations.get(srcProperty)) {
de.getDestination().bindUpdate(de.getProperty(), src, srcProperty);
}
}
}
}
COM: <s> helper method that informs bind destinations if any that the </s>
|
funcom_train/3399072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TypeUse getConversion() {
assert contentModel == Term.EMPTY; // this is PCDATA-only element
BIElement e = owner.bindInfo.element(name);
if(e!=null) {
BIConversion conv = e.getConversion();
if(conv!=null)
return conv.getTransducer();
}
return CBuiltinLeafInfo.STRING;
}
COM: <s> when this element is an pcdata only content model </s>
|
funcom_train/14406003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Options createOptions(Options options, OptionDefinition[] optionDefinitions, WbemSmtResourceBundle bundle) {
CliUtil util = CliUtil.getInstance();
for (int i = 0; i < optionDefinitions.length; i++) {
OptionDefinition def = optionDefinitions[i];
util.checkAliases(this,def);
Option option = CliUtil.createOption(bundle,def);
optionsByKey.put(def,option);
options.addOption(option);
}
return options;
}
COM: <s> create for all option definitions new options for the apache commons cli </s>
|
funcom_train/5395813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAbsoluteClassPath() {
System.out.println("getAbsoluteClassPath");
String expResult = "";
String result = ClassPathUtils.getAbsoluteClassPath();
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 absolute class path method of class org </s>
|
funcom_train/24644298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int indexOf(Rel r){
boolean found = false;
int ind = 0;
while (!found && ind<elements.length){
if (elements[ind].rel().equals(r))
found = true;
if (!found)
ind++;
}
if (found)
return ind;
else
return -1;
}
COM: <s> returns the index of the relation r in elements </s>
|
funcom_train/10494462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bindService(TradeServices tradeServices, Map props) {
if (Log.doTrace())
Log.trace("TradeServicesManagerImpl:bindService()", tradeServices, props);
if (tradeServices != null) {
tradeServicesList[tradeServices.getMode()] = tradeServices;
}
}
COM: <s> bind a new trade services implementation </s>
|
funcom_train/18189563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private static Check[] checkOwnPlanets = {
new Check() {
public String getMessage(Object o) {
return "Planet (" + ((OwnPlanet)o).getID() + ") has no clans";
}
public boolean check(Object o) {
return ((OwnPlanet)o).getClans()==0;
}
}
};
COM: <s> all ownplanet checks </s>
|
funcom_train/21016668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isInsideContext(ElementPath path) {
boolean result = true;
if (_selectionContext != null) {
result = false;
for (int i = path.getLength() - 1; i >= 0; i--) {
IElement element = path.getElement(i);
if (element == _controlElement) {
break;
}
if (element == _selectionContext) {
result = true;
break;
}
}
}
return result;
}
COM: <s> checks whether the given element path lies in the current selection </s>
|
funcom_train/11723868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lockTokenAdded(String lockToken) throws RepositoryException {
if (!isSessionScoped() && !isLockOwningSession()) {
// unless this lock is session-scoped (token is never transferred)
// and the session isn't the owner yet (token already present),
// it could be that this affects this lock and session became
// lock holder -> reload info to assert.
lockState.reloadLockInfo();
}
}
COM: <s> a lock token as been added to the current session </s>
|
funcom_train/49345438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CoveredElement setOffests(Element element) {
CoveredElement ce = new CoveredElement();
String fullPath = element.getUniquePath() + LOC_PATH;
Element loc = (Element) element.selectSingleNode(fullPath);
if (null != loc) {
ce.setStartOffset(Integer.valueOf(loc.attribute("StartOffset").getText()));
ce.setEndOffset(Integer.valueOf(loc.attribute("EndOffset").getText()));
}
return ce;
}
COM: <s> sets the offests for the element into the node </s>
|
funcom_train/4914202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clickWebPageLink(String link) {
// Log the click
System.out.println("CLICK: " + link);
// Click on the link
this.selenium.click("link=" + link);
this.waitForWebPageToLoad();
// Log page received
System.out.println("RESPONSE PAGE:");
System.out.println(this.selenium.getHtmlSource());
}
COM: <s> clicks the link and waits for linked page to load </s>
|
funcom_train/34127210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getBlockDefault() {
String result = null;
BlockList list = schema.getBlockDefault();
if ( list != null) {
if ( list.hasAll()) {
result = BLOCK_ALL;
} else if ( list.hasExtension()) {
result = BLOCK_EXTENSION;
} else if ( list.hasSubstitution()) {
result = BLOCK_SUBSTITUTION;
} else if ( list.hasRestriction()) {
result = BLOCK_RESTRICTION;
}
}
return result;
}
COM: <s> get the default block field value </s>
|
funcom_train/864615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void push( Object obj ) {
if( obj == null ) {
pushNull();
}
else if( obj instanceof String ) {
pushString( (String) obj );
}
else if( obj instanceof Integer ) {
pushInt( (Integer) obj );
}
else if( obj instanceof Double ) {
pushDouble( (Double) obj );
}
else if( obj instanceof Boolean ) {
pushBoolean( (Boolean) obj );
}
else {
throw new IllegalArgumentException( "Don't know how to push " + obj.getClass() );
}
}
COM: <s> push a value according to type </s>
|
funcom_train/18837240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String canVertical(int x, int startY, int endY) {
for(int y = Math.min(startY, endY) + 1; y < Math.max(startY, endY); y++) {
if(curState.pieceAt(x, y) != null) {
return "vertical move: someone blocks the way";
}
}
return null;
}
COM: <s> can move vertically </s>
|
funcom_train/34902133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addExperiment(final Experiment exp) {
final String name = exp.getName();
for (Experiment e : getExperiments()) {
if (name.equals(e.getName())) {
throw new RuntimeException(
"This project already contains an experiment named " + name);
}
}
exp.setProject(this);
getExperiments().add(exp);
}
COM: <s> add experiment to project </s>
|
funcom_train/45751918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateTitle(@NotNull String title) {
try {
Intent intent = new Intent(NookSpecifics.ACTION_UPDATE_TITLE);
String key = "apptitle";
intent.putExtra(key, title);
sendBroadcast(intent);
} catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> updates the applications title on the status bar </s>
|
funcom_train/49456829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void test01_declare_esis_as_rAci_in_vrt() throws Exception {
db.begin();
esisId = PeopleFactory.lookupUserName(db, "esis");
//esis is admin he should be able to do something
assertNotNull(esisId);
RaciVrt mod = new RaciVrt(db);
RACI raci = new RACI();
raci.setA(true);
raci.setUserId(esisId.intValue());
mod.addRaci(db, raci, esisId.intValue());
db.commit();
}
COM: <s> sets the esis user as a for vrt </s>
|
funcom_train/32712196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replace(Panel oldPanel, Panel newPanel) {
if (oldPanel != null) {
for(int i = 0; i < p.getComponentCount(); i++)
if (p.getComponent(i).equals(oldPanel)) {
p.remove(i);
if (newPanel != null)
p.add(newPanel, i);
DuckAwt.validate();
return;
}
} else {
add(newPanel);
DuckAwt.validate();
}
}
COM: <s> replace a panel not a string label by another or none if null </s>
|
funcom_train/25476948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAlwaysontopProperties(final String label, final String value, final String minValue, final String maxValue) {
alwaysontopLabel.setText(label);
alwaysontopJComboBox.setModel(new DefaultComboBoxModel(new String[] { minValue, maxValue }));
alwaysontopJComboBox.setSelectedItem(value);
alwaysontopJComboBox.setActionCommand(label);
}
COM: <s> sets the always on top components </s>
|
funcom_train/2581714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RegularTimePeriod next() {
Day result;
int serial = this.serialDate.toSerial();
if (serial < SerialDate.SERIAL_UPPER_BOUND) {
SerialDate tomorrow = SerialDate.createInstance(serial + 1);
return new Day(tomorrow);
}
else {
result = null;
}
return result;
}
COM: <s> returns the day following this one or code null code if some limit </s>
|
funcom_train/6211960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLookupLocators( LookupLocator[] locators ) throws UnexpectedException {
service.getDiscoveryLocatorManagement().setLocators( locators );
try {
service.locatorsCheckpoint();
} catch (PersistentWriteException e) {
throw new UnexpectedException( "Not able to set new locators persistently.", e );
}
}
COM: <s> replaces the set of locators the service is currently attempting to join </s>
|
funcom_train/45692332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCurrentPositionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SongEvent_currentPosition_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SongEvent_currentPosition_feature", "_UI_SongEvent_type"),
EsxPackage.Literals.SONG_EVENT__CURRENT_POSITION,
false,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the current position feature </s>
|
funcom_train/11650851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getLongParameter(String name) throws NumberFormatException {
if (params == null || !params.containsKey(name)) {
throw new NumberFormatException("No value for parameter named '" + name + "'.");
}
return Long.decode(params.get(name)).longValue();
}
COM: <s> get the value of a specified parameter as a long </s>
|
funcom_train/43067611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addViewChangeAck(ViewChangeAck vca){
int index = index(vca.getView());
int send = index(vca.getSendingReplica());
if (viewChanges[index] != null &&
viewChanges[index].getView() == vca.getView())
viewChanges[index].addAck(vca);
else if (pendingAcks[send] == null ||
pendingAcks[send].getView() < vca.getView())
pendingAcks[send] = vca;
}
COM: <s> adds a view change ack to the row </s>
|
funcom_train/45246180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JNumberFloatField getJNumberFloatFieldGamaJTT() {
if (jNumberFloatFieldGamaJTT == null) {
jNumberFloatFieldGamaJTT = new JNumberFloatField();
jNumberFloatFieldGamaJTT.setLocation(new Point(345, 265));
jNumberFloatFieldGamaJTT.setSize(new Dimension(65, 20));
}
return jNumberFloatFieldGamaJTT;
}
COM: <s> this method initializes j number float field gama jtt </s>
|
funcom_train/50078332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void translate(double x, double y) {
Rectangle2D rect = getGraphBounds();
setGraphBounds(
new Rectangle2D.Double(rect.getMinX()+x,
rect.getMinY()+y,rect.getWidth(),rect.getHeight()));
}
COM: <s> p translates the main graph rect by x and y horizontally and vertically </s>
|
funcom_train/22284736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
child = exec(command);
// get output from child process
new StreamThread(child.getInputStream(), System.out);
new StreamThread(child.getErrorStream(), System.err);
}
catch (Exception e) {
System.out.println(e + " while running " + command);
}
}
COM: <s> sets up the process and loops reading its input </s>
|
funcom_train/31336894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isParentMatch(Viewer viewer, Object element) {
if (viewer instanceof AbstractTreeViewer) {
ITreeContentProvider provider = (ITreeContentProvider) ((AbstractTreeViewer) viewer).getContentProvider();
Object[] children = provider.getChildren(element);
if ((children != null) && (children.length > 0))
return filter(viewer, element, children).length > 0;
}
return false;
}
COM: <s> check if the parent category is a match to the filter text </s>
|
funcom_train/36995132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IVVector getAllTextRecords() {
IVVector trs = new IVVector();
for( int i = 0; i<lines.size(); i++ ) {
TextLine line = (TextLine) lines.elementAt(i);
for( int k = 0; k<line.records.size(); k++ ) {
trs.addElement(line.records.elementAt(k));
}
}
return trs;
}
COM: <s> retrieves vector of all text records </s>
|
funcom_train/20901918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reportRemoval(String filename) {
Iterator itor = _listeners.iterator();
while (itor.hasNext()) {
Object l = itor.next();
try {
if (l instanceof DiscreteListener)
((DiscreteListener) l).fileRemoved(filename);
} catch (Exception e) {
warn(l, filename, e);
} catch (Error e) {
warn(l, filename, e);
}
}
}
COM: <s> report a file removal to the file removed listeners </s>
|
funcom_train/41441386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File createTempDUJarsDeploymentRoot() {
File tempDeploymentRootDir = ServerConfigLocator.locate().getServerTempDeployDir();
if (!tempDeploymentRootDir.exists()) {
if (!tempDeploymentRootDir.mkdirs()) {
throw new RuntimeException("Failed to create temp deployment dir: " + tempDeploymentRootDir);
}
}
return tempDeploymentRootDir;
}
COM: <s> initializes the temporary deploy folder if necessary </s>
|
funcom_train/2552753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(SequencerRun sequencerRun) {
if (sequencerRun.getReadyToProcess() != null && sequencerRun.getReadyToProcess().equals("Y")) {
sequencerRun.setStatus("ready_to_process");
} else {
sequencerRun.setStatus("not_ready_to_process");
}
sequencerRunDAO.update(sequencerRun);
}
COM: <s> updates an instance of sequencer run in the database </s>
|
funcom_train/17755799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getAdapter(Class aClass) {
Object adapter;
if (aClass.equals(IContentOutlinePage.class)) {
if (fOutlinePage == null || fOutlinePage.isDisposed()) {
fOutlinePage = new AntxrOutlinePage(this);
if (getEditorInput() != null) {
fOutlinePage.setInput(getEditorInput());
}
}
adapter = fOutlinePage;
} else {
adapter = super.getAdapter(aClass);
}
return adapter;
}
COM: <s> the code antxr editor code implementation of this </s>
|
funcom_train/10659925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetConfiguration() {
SecurityChecker checker = new SecurityChecker(new AuthPermission(
"setLoginConfiguration"), true);
System.setSecurityManager(checker);
Configuration custom = new ConfTestProvider();
Configuration.setConfiguration(custom);
assertTrue(checker.checkAsserted);
assertSame(custom, Configuration.getConfiguration());
checker.reset();
checker.enableAccess = false;
try {
Configuration.setConfiguration(new ConfTestProvider());
fail("No expected SecurityException");
} catch (SecurityException ex) {
}
}
COM: <s> tests that set configuration is properly secured via security manager </s>
|
funcom_train/32912263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updatePosition(String fieldname, int position, String display) throws ResultColumnException {
Enumeration e1 = columns.elements();
ResultColumn col = null;
while (e1.hasMoreElements()) {
ResultColumn rc = (ResultColumn) e1.nextElement();
if (rc.getFieldname().compareTo(fieldname)==0) {
col = rc;
col.setColumnDisplay(display);
break;
}
}
if (col != null) {
columns.remove(col);
columns.insertElementAt(col,position);
} else {
throw new ResultColumnException(fieldname);
}
}
COM: <s> updates the new position of a column and resorts list </s>
|
funcom_train/32791205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleMultDiv(String codeSrcExp, List<String> args, StringBuffer rule, StringBuffer spec) {
assert(args.size() == 1) : "Multiplicative expression / needs exactly one argument";
codeAgent.setArgument("un_exp_1", codeSrcExp);
codeAgent.setArgument("un_exp_2", args.get(0));
rule.append("multiplicative_expression_tail");
spec.append("div");
}
COM: <s> parameterizes the code agent for a divide operation </s>
|
funcom_train/22528711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDefaultEntries() {
//addChild(new OrganiserFolder("Activities"));
addChild(new OrganiserFolder(Messages.OrganiserIndex_0));
addChild(new OrganiserFolder(Messages.OrganiserIndex_1));
addChild(new OrganiserFolder(Messages.OrganiserIndex_2));
save();
}
COM: <s> add some default entries that help the new user </s>
|
funcom_train/11768508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void subscribeDataChanges(final String path, final IZkDataListener listener) throws KattaException {
ensureZkRunning();
addDataListener(path, listener);
try {
_zk.getData(path, true, null);
} catch (final Exception e) {
removeDataListener(path, listener);
throw new KattaException("Unable to subscribe data changes for path: " + path, e);
}
}
COM: <s> subscribes notifications for permanent notifications for data changes on </s>
|
funcom_train/45076005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBaseData(SyndromicData[] data) {
baseData = data;
baseWeek = new int[baseData.length];
baseSyms = new int[baseData.length];
for (int i = 0; i < baseData.length; i++) {
baseWeek[i] = baseData[i].week;
baseSyms[i] = baseData[i].syms;
}
}
COM: <s> set the base data externally </s>
|
funcom_train/51129753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPassSafeFromAllOpponents(Vector2D from, Vector2D target, MatchPlayer parReceiver, double passingForce) {
for (MatchPlayer p : opponents.getCurrentBlock()) {
if (!isPassSafeFromOpponent(from, target, parReceiver, p, passingForce)) {
return false;
}
}
return true;
}
COM: <s> checks if is pass safe from all opponents </s>
|
funcom_train/50961662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double precAtNumDocs(double numDocs) {
Iterator i = docOrder.keySet().iterator();
double answer = 0.0;
while(i.hasNext()) {
PRPair t = (PRPair)docOrder.get(i.next());
if (!t.interpolated && t.numDocs>=numDocs && t.precision>answer)
answer=t.precision;
}
return answer;
}
COM: <s> returns the precision at a particular number of documents </s>
|
funcom_train/35329545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object a) {
if (a instanceof PrincipalImpl){
for(int i = 0; i < add.length; i++) {
if(add[i].equals (((PrincipalImpl) a).getAddress()))
return true;
}
return false;
} else {
return false;
}
}
COM: <s> compares this principal to the specified object </s>
|
funcom_train/15453662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map createInstantMessengersMap(Collection instantMessengers) {
Map instantMessengersMap = new HashMap();
Iterator itInstantMessengers = instantMessengers.iterator();
while (itInstantMessengers.hasNext()) {
InstantMessenger im = (InstantMessenger) itInstantMessengers.next();
instantMessengersMap.put(new Integer(im.getCode()), im);
}
return instantMessengersMap;
}
COM: <s> creates a mapping for instant messengers </s>
|
funcom_train/39015398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEnabled(Effect effect){
if(effect==Effect.Lighting){
return lightState.isEnabled();
}else if(effect==Effect.Wireframe){
return wireframeState.isEnabled();
}else if(effect==Effect.Fog){
return fogState.isEnabled();
}else{
return passManager.get(effect).isEnabled();
}
}
COM: <s> tells if the given effect is enabled </s>
|
funcom_train/10542000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isdbActive() {
LanguageConnectionContext lcc = (LanguageConnectionContext) ContextService
.getContextOrNull(LanguageConnectionContext.CONTEXT_ID);
Database db = (Database) (lcc != null ? lcc.getDatabase() : null);
return (db != null ? db.isActive() : false);
}
COM: <s> check wheather the database is active or not </s>
|
funcom_train/50864991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String determineNewSettlementLatitude() {
double phi = Coordinates.getRandomLatitude();
String formattedLatitude = Coordinates.getFormattedLatitudeString(phi);
int degreeIndex = formattedLatitude.indexOf('\u00BA');
return formattedLatitude.substring(0, degreeIndex) + formattedLatitude.substring(degreeIndex + 1,
formattedLatitude.length());
}
COM: <s> determines a new settlements latitude </s>
|
funcom_train/800046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int computeCellWidth( GridCellIterator entry, GridColumn col, PrintSizeStrategy strategy ) {
if ( col.size == SWT.DEFAULT )
return strategy.computeSize( entry.target ).x;
if ( col.size == GridPrint.PREFERRED )
return entry.target.preferredSize().x;
return Math.round( col.size * device.getDPI().x / 72f );
}
COM: <s> compute the size of a column respecting the constraints of the grid column </s>
|
funcom_train/37818222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String cleanString(final String input){
if(input==null) return null;
//Force lower case and remove special chars from start/end
String Result=input.toLowerCase().trim();
//remove whitespace
Result=Result.replaceAll(" ", "");
//remove line breaks
Result=Result.replaceAll("\r", "");
Result=Result.replaceAll("\n", "");
//remove HTML
Result=removeHTML(Result);
return Result;
}
COM: <s> cleans up a string for parsing </s>
|
funcom_train/3293764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doAfterBody() throws JspTagException {
String value=bodyContent.getString();
Module community=getCloudContext().getModule("communityprc");
community.getInfo("MESSAGE-"+node.getNumber()+"-SETINFOFIELD-"+key+"-"+value,pageContext.getRequest(),pageContext.getResponse());
return SKIP_BODY;
}
COM: <s> store the given value </s>
|
funcom_train/2895789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getReturnValue(ProcessingClient client, String host, String port){
String retValue = "";
String _host = "";
String _port = "";
if (client.getNumFields()>1){
_host = (host == null)? client.getFieldContents(0): host;
_port = (port == null)? client.getFieldContents(1): port;
retValue = _host+"*"+_port;
}else{
_port = (port == null)? client.getFieldContents(0): port;
retValue = _port;
}
return retValue;
}
COM: <s> creates the return value </s>
|
funcom_train/47282652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCallonConsecutiveOccurrences() throws Exception {
testInput = new MungeStepOutput<String>("test", String.class);
testInput.setData("abcabc");
step.connectInput(0, testInput);
step.setFrom("abc");
step.setTo("123");
step.open(logger);
step.call();
List<MungeStepOutput> results = step.getMungeStepOutputs();
MungeStepOutput output = results.get(0);
String result = (String)output.getData();
assertEquals("123123", result);
}
COM: <s> this tests a previous design error where the munge step would </s>
|
funcom_train/51200142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkSyncSettings() {
String contactSM = (String) xmlContactValues.get(PARAM_SYNCMODE);
String serverUrl = (String) syncmlValues.get(PARAM_SYNCMLURL);
String calendarSM = (String) xmlCalendarValues.get(PARAM_SYNCMODE);
if (contactSM.equalsIgnoreCase(SYNC_NONE) && (serverUrl.length() < 1) &&
calendarSM.equalsIgnoreCase(SYNC_NONE)) {
return false;
}
return true;
}
COM: <s> check if there is least one source to synchronize </s>
|
funcom_train/34448709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFeatureNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FeatureChange_featureName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FeatureChange_featureName_feature", "_UI_FeatureChange_type"),
TracesPackage.Literals.FEATURE_CHANGE__FEATURE_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the feature name feature </s>
|
funcom_train/18719002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void FloatEventPerformed(String label, double zahl) {
if (!Double.isNaN(zahl)) {
if (label == "setAlpha") {
put("command=setAlpha value=" + zahl * 3.14159265 / 180);
} else
// System.out.println("command=set name=" + label + " value=" +
// zahl);
put("command=set name=" + label + " value=" + zahl);
}
}
COM: <s> is called if a control has been changed </s>
|
funcom_train/22132789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int last() {
int val;
int i;
for (i = data.length - 1; i >= 0; i--) {
if (data[i] != 0) {
val = data[i] >>> 1;
i <<= SHIFT;
while (val != 0) {
val >>>= 1;
i++;
}
return i;
}
}
return -1;
}
COM: <s> gets the last element of the set </s>
|
funcom_train/13519983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(Organization organisation){
org=organisation;
Collection<Actor> allActors=org.getActors();
for(Actor actor:allActors){
actorsHM.put(actor.getName(),actor);
actorsName.add(actor.getName());
}
Collection<Relation> allRelations=org.getRelations();
for(Relation relation:allRelations){
relationsHM.put(relation.getName(),relation);
relationsName.add(relation.getName());
}
// add the name of the organisation at the beggining of the result file
this.addHeader("Organisation : " + org.getName());
}
COM: <s> initialize the controller </s>
|
funcom_train/40886140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroyBody (Body body) {
body.setUserData(null);
this.bodies.remove(body.addr);
for (int i = 0; i < body.getFixtureList().size(); i++) {
this.fixtures.remove(body.getFixtureList().get(i).addr).setUserData(null);
}
for (int i = 0; i < body.getJointList().size(); i++)
this.joints.remove(body.getJointList().get(i).joint.addr);
jniDestroyBody(addr, body.addr);
freeBodies.free(body);
}
COM: <s> destroy a rigid body given a definition </s>
|
funcom_train/16482231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onTimeLimitChanged() {
int newtimelimit = 0;
try {
newtimelimit = Integer.parseInt(timelimitfield.getText());
} catch (NumberFormatException nfe) {
timelimitfield.setText(Integer.toString(secondspercard));
return;
}
// Set new time limit, mark stream for changes to be saved.
if (secondspercard != newtimelimit) {
secondspercard = newtimelimit;
data.getStream().setSecondsPerCard(secondspercard);
setStreamChangesMade(true);
}
}
COM: <s> called when the user changes the time limit value field </s>
|
funcom_train/45613325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double result(double x){
double result=0.0;
Iterator it=indices.keySet().iterator();
while(it.hasNext()){
double ord=Double.parseDouble(it.next().toString());
double card=indices.get(ord);
result+=card*Math.pow(x, ord);
}
return result;
}
COM: <s> the result method returns the sum of all cardinals </s>
|
funcom_train/37738709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPrimarySortAscending(boolean ascending) {
if (sortCriteria != null
&& isPrimarySortAscending() != ascending) {
((SortCriterion)sortCriteria.get(0)).setAscending(ascending);
modified = true;
if (logger.isDebugEnabled()) {
logger.debug ("New sort criteria: " + toString());
}
}
}
COM: <s> set the value of sort ascending for the primary sort property </s>
|
funcom_train/15518593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FlatFileFeatureImporter (MauveFrame mauve_frame) {
super ("Import Annotation File");
mauve = mauve_frame;
model = mauve.getModel ();
offset = new double [model.getSequenceCount ()];
for (int i = 0; i < offset.length; i++)
offset [i] = MauveConstants.FEATURE_HEIGHT + 5;
req_fields = new Vector ();
req_fields.add (LABEL_STRING);
initGUI ();
}
COM: <s> creates a feature importer associated with the specified mauve frame </s>
|
funcom_train/40403160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillCriteria(Criteria crit, List<CriteriaRequest> requests) {
// clear old aliases
instantiatedAliases.clear();
// projection list for the data
ProjectionList projList = Projections.projectionList();
for (CriteriaRequest request : requests) {
String path = fieldToPath.get(request.getField());
// requested unknown field.
if (path == null) {
continue;
}
parseDotPath(crit, path, request, projList);
}
// assign the projection list
crit.setProjection(projList);
}
COM: <s> fills a criteria based on the given list of filtering requests </s>
|
funcom_train/32962275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TolvenIdEx getTolvenEventId( long accountId) {
for (TolvenId tolvenId : getTolvenEventIds()) {
TolvenIdEx tolvenIdEx = (TolvenIdEx) tolvenId;
if ((tolvenIdEx.getIdAsLong() != null && tolvenIdEx.getAccountIdAsLong()!=null && tolvenIdEx.getAccountIdAsLong()==accountId)) return tolvenIdEx;
}
return null;
}
COM: <s> find the tolven event id associated with the specified account </s>
|
funcom_train/8074453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String printSets(char [][]raceSets) {
StringBuffer temp = new StringBuffer();
for (int i=0;i<raceSets.length;i++) {
for (int j=0;j<m_numAttribs;j++) {
temp.append(raceSets[i][j]);
}
temp.append('\n');
}
return temp.toString();
}
COM: <s> print an attribute set </s>
|
funcom_train/33232244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connectToRecieveMessage(boolean transacted, int acknowledgeMode) throws SLQueueException {
try {
createConnection(transacted, acknowledgeMode);
setMessageConsumer(getSession().createConsumer(getDestination()));
}
catch (JMSException e) {
throw new SLQueueException(e.getMessage(), e);
}
}
COM: <s> message consumer connection </s>
|
funcom_train/18000370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRelativePlace(boolean searchSubfolders) {
checkCurrent();
Element filterTerm = currentFilterTerms.addElement(SearchFilterKeys.FilterTerm);
filterTerm.addAttribute(SearchFilterKeys.FilterType, SearchFilterKeys.FilterTypeRelative);
filterTerm.addAttribute(SearchFilterKeys.FilterRelativeType, SearchFilterKeys.FilterTypePlace);
filterTerm.addText(Boolean.toString(searchSubfolders));
}
COM: <s> its a currentplace in query call time </s>
|
funcom_train/17209493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToolBar getSearchToolbar() {
if (searchToolbar == null) {
withinLabel = new JLabel();
withinLabel.setText(" in: ");
searchToolbar = new JToolBar();
searchToolbar.setFloatable(false);
searchToolbar.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0));
searchToolbar.add(getTextField());
searchToolbar.add(withinLabel);
searchToolbar.add(searchFilter());
searchToolbar.add(getSearchButton());
}
return searchToolbar;
}
COM: <s> this method initializes search toolbar </s>
|
funcom_train/35111286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void editExperiment( PExperiment anExperiment ) {
PExperiment editingCopy = anExperiment.clone();
//log.info("Start editting experiment " + editingCopy.getName() );
ExperimentEditor theEditor = new ExperimentEditor( this, anExperiment );
this.setMainDisplay( theEditor.getPanel() );
}
COM: <s> setup the editor with a copy of the given experiment </s>
|
funcom_train/51526405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getNewDishButton() {
if (newDishButton == null) {
newDishButton = new JButton();
newDishButton.setText("New");
newDishButton.setIcon(new ImageIcon("D:/eclipse/plugins/org.eclipse.compare.examples.xml_3.1.100.v20060609/doc-html/addidmap.gif"));
newDishButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ItemList.addDish(new MainDish());
DishItemModel.getModel().addRow(new DishItemListWrapper(),false);
}
});
}
return newDishButton;
}
COM: <s> this method initializes new dish button </s>
|
funcom_train/3515179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String insertCommand(String command) throws ServletException {
String digest;
try {
MessageDigest md =
MessageDigest.getInstance(m_messagedigest_algorithm);
md.update(command.getBytes());
byte bytes[] = new byte[20];
m_random.nextBytes(bytes);
md.update(bytes);
digest = bytesToHex(md.digest());
} catch (NoSuchAlgorithmException e) {
throw new ServletException("NoSuchAlgorithmException while " +
"attempting to generate graph ID: " +
e);
}
String id = System.currentTimeMillis() + "-" + digest;
m_map.put(id, command);
return id;
}
COM: <s> add a new rrdtool graph command to the command map returning a </s>
|
funcom_train/25749859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document setContents(StringBuffer contents) {
// Don't remove the content field here, because it's used for the filename
// luceneDoc.removeFields(Document.contents);
if (contents == null)
luceneDoc.add(new Field(Document.contents, "", Store.NO, Index.ANALYZED)); //$NON-NLS-1$
else
luceneDoc.add(new Field(Document.contents, contents.toString(), Store.NO, Index.ANALYZED));
return this;
}
COM: <s> sets the contents of the tt document tt </s>
|
funcom_train/14012823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGenarator(String value) {
Element metaGeneratorElement = getDocument().createElement("meta");
metaGeneratorElement.setAttribute("name", "generator");
metaGeneratorElement.setAttribute("content", value);
getHeadElement().appendChild(metaGeneratorElement);
}
COM: <s> sets the value of the generator meta element </s>
|
funcom_train/39167916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUp() throws Exception {
//make sure the right plugin is loaded
File pluginsHome = new File(System.getProperty(
GateConstants.GATE_HOME_PROPERTY_NAME),
"plugins");
try{
Gate.getCreoleRegister().registerDirectories(
new File(pluginsHome, "Tools").toURI().toURL());
}catch(Exception e){
throw new GateRuntimeException(e);
}
}
COM: <s> fixture set up does nothing </s>
|
funcom_train/14091829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attributeAdded(HttpSessionBindingEvent event) {
log.debug("event.name: " + event.getName());
if (event.getName().equals(EVENT_KEY)) {
SecurityContext securityContext = (SecurityContext) event.getValue();
User user =
(User) securityContext.getAuthentication().getPrincipal();
addUsername(user);
}
}
COM: <s> this method is designed to catch when users login and record their name </s>
|
funcom_train/18743123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setReplaceEnabled() {
boolean enabled;
try {
getNewLabelWithErrors();
getErrorLabel().setText("");
enabled = true;
} catch (FormatException exc) {
getErrorLabel().setText(exc.getMessage());
enabled = false;
}
getReplaceButton().setEnabled(enabled);
getNameFieldListener().setEnabled(enabled);
}
COM: <s> enables or disables the replace button depending on the validity of the </s>
|
funcom_train/34341212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getMesVenta() {
if (MesVenta == null) {//GEN-END:|52-getter|0|52-preInit
// write pre-init user code here
MesVenta = new TextField("Mes Auditado:", null, 2, TextField.ANY);//GEN-LINE:|52-getter|1|52-postInit
// write post-init user code here
}//GEN-BEGIN:|52-getter|2|
return MesVenta;
}
COM: <s> returns an initiliazed instance of mes venta component </s>
|
funcom_train/45471834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReplaceAll() {
String source, expected;
String toReplace = "hello";
String replacement = "bonjour";
/* no replacement */
source = "hallo world";
expected = source;
assertEquals("no replacement exist", expected, StringUtil.replaceAll(
source, toReplace, replacement));
}
COM: <s> tests various combinations of replacement functionality </s>
|
funcom_train/18479467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector3 getVector(double u,double v) {
return new Vector3(
dir_u.getX() * u + dir_v.getX() * v,
dir_u.getY() * u + dir_v.getY() * v,
dir_u.getZ() * u + dir_v.getZ() * v) ;
}
COM: <s> return a vector in the plane represented by u and v </s>
|
funcom_train/16707114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAsKey(String field) {
HashMultiMap<Object, Fields> indexmap = new HashMultiMap<Object, Fields>();
keymaps.add(indexmap);
keyfields.add(field);
int a = fields.indexOf(field);
for (int i = 0; i < size(); i++) {
indexmap.add(get(a, i), get(i));
}
}
COM: <s> adds an existing field to the table list </s>
|
funcom_train/44447474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IObjectFactory getPeopleObjectFactory() {
return new IObjectFactory() {
public NewObject getNewObject(Object collection) {
int position = (int)(Math.random() * people.size());
Person newPerson = new Person();
people.add(position, newPerson);
return new NewObject(newPerson, position);
}
};
}
COM: <s> get an object factory for people </s>
|
funcom_train/34246170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean getIsDeliveryOwner() {
if (communityMemberAssignment != null)
isDeliveryOwner = CacheUtility.getBoolean(WorkTaskAssignmentType.FACILITATOR.getName().equals(communityMemberAssignment.getGovernanceType()));
if (isDeliveryOwner == null)
isDeliveryOwner = Boolean.FALSE;
return isDeliveryOwner;
}
COM: <s> returns the is delivery owner </s>
|
funcom_train/4364212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFilter(InputFilter filter) {
InputFilter[] newFilterLibrary =
new InputFilter[filterLibrary.length + 1];
for (int i = 0; i < filterLibrary.length; i++) {
newFilterLibrary[i] = filterLibrary[i];
}
newFilterLibrary[filterLibrary.length] = filter;
filterLibrary = newFilterLibrary;
activeFilters = new InputFilter[filterLibrary.length];
}
COM: <s> add an input filter to the filter library </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.