__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/23320386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setFocus(int pageIndex) {
if (pageIndex < 0 || pageIndex >= getPageCount()) {
// page index out of bounds, don't set focus.
return;
}
final IEditorPart editor = getEditor(pageIndex);
if (editor != null) {
editor.setFocus();
} else {
// Give the page's control focus.
final Control control = getControl(pageIndex);
if (control != null) {
control.setFocus();
}
}
}
COM: <s> sets focus to the control for the given page </s>
|
funcom_train/32631931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DViewEntry getUserEntry(final String username) {
DDatabase database = getDatabase("", "names.nsf");
DView view = database.getView("($Users)");
Iterator iterator = view.getAllEntriesByKey(username);
if (iterator.hasNext()) {
return (DViewEntry) iterator.next();
}
return null;
}
COM: <s> returns the person document of the current user from the servers </s>
|
funcom_train/28592248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOf(Object o) {
if (o == null) {
throw new NullPointerException();
}
int result = -1;
for (int i = 0; i < size && result < 0; i++) {
if (array[i].equals(o)) {
result = i;
}
}
return result;
}
COM: <s> this returns the index that an object is found at </s>
|
funcom_train/13887516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lookup(FeatureMap query, SystemStructure systemStructure) throws Exception {
systemStructure.reset();
this.systemStructure = systemStructure;
this.response = new CopyFeatureMap();
systemStructure.setResponse(response);
FeatureMap objs = query.introduce(OBJECTS);
String objName = (String) objs.getAtomicValue(FIRST_NAME_PATH);
response.clear();
if (objName != null) {
FeatureMap props = query.introduce(PROPERTIES);
lookupObjectsData(objs, props);
log.debug("leaving with response"+response);
}
}
COM: <s> interprets performs web lookup and generates system structure response on given query </s>
|
funcom_train/9215498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector requestPublicTimeline(String sinceId) throws TwitterException {
if (sinceId != null && sinceId.length() > 0) {
sinceId = "since_id="+StringUtil.urlEncode(sinceId);
}
HttpUtil.setBasicAuthentication("", "");
return requestTimeline(gateway+PUBLIC_TIMELINE_URL, "");
}
COM: <s> request public timeline from twitter api </s>
|
funcom_train/15719726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPosition(int p) {
position = p;
switch (position) {
case LEFT:
orientation = VERTICAL;
break;
case RIGHT:
orientation = VERTICAL;
break;
case TOP:
orientation = HORIZONTAL;
break;
case BOTTOM:
orientation = HORIZONTAL;
break;
case HORIZONTAL:
orientation = HORIZONTAL;
position = BOTTOM;
break;
case VERTICAL:
orientation = VERTICAL;
position = LEFT;
break;
default:
orientation = HORIZONTAL;
position = BOTTOM;
break;
}
}
COM: <s> set the axis position </s>
|
funcom_train/24009544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkData() {
if (lbRoomType.getSelectedIndex() == -1) {
//TODO: manage messages I18N
Window.alert("Room Type Must be specified");
return false;
}
if (dbFrom.getValue() == null) {
//TODO: manage messages I18N
Window.alert("From Date Must be specified");
return false;
}
if (dbTo.getValue() == null) {
//TODO: manage messages I18N
Window.alert("To Date Must be specified");
return false;
}
return true;
}
COM: <s> checks if all data are entered correctly </s>
|
funcom_train/12855695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RepositoryException toRepositoryException(Throwable e) {
RepositoryException re = transformIntoRepositoryException(e);
if (re != null) {
return re;
}
Throwable cause = e.getCause();
if (cause != null) {
re = transformIntoRepositoryException(cause);
if (re != null) {
return re;
}
} else {
cause = e;
}
return new RepositoryException(cause);
}
COM: <s> transforms the given throwable into an appropriate repository </s>
|
funcom_train/20504233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetShow() throws Exception {
// setting the expectations
Show expectedResult = new Show("show");
daoMock.getShow(1);
daoMockControl.setReturnValue(expectedResult);
daoMockControl.replay();
// executing the tested method
Show result = eventsCalendar.getShow(1);
// assertions & verifications
assertSame(expectedResult, result);
daoMockControl.verify();
}
COM: <s> tests the get show id method of the events calendar service </s>
|
funcom_train/25172892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModuleServeurDTO createModuleServeurDTO (ModuleServeur pModuleServeur) {
ModuleServeurDTO vModuleServeurDTO = new ModuleServeurDTO();
if (pModuleServeur != null) {
vModuleServeurDTO.setIdmoduleServeur(pModuleServeur.getIdmoduleServeur());
vModuleServeurDTO.setDerniereMaj(pModuleServeur.getDerniereMaj());
vModuleServeurDTO.setJeton(pModuleServeur.getJeton());
}
return vModuleServeurDTO;
}
COM: <s> this method transform a module serveur object into a module serveur dto object </s>
|
funcom_train/18865216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addHistoryNode(CommodityHistoryNode node) {
synchronized (mutex) {
if (history == null) {
history = new CommodityHistoryNode[] { node };
return true;
}
// remove the node if it exists
history = (CommodityHistoryNode[]) SortedArray.remove(history, node);
// add the node
history = (CommodityHistoryNode[]) SortedArray.insert(history, node);
return true;
}
}
COM: <s> add a new history node but replace a node with the same date </s>
|
funcom_train/47675072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isConnectedTo(BeanWrapperElement p_otherElement) {
for (WDEdge edge : getAllEdges()) {
if (edge.isOutgoing(this)) {
//check the target
if (edge.getTarget() == p_otherElement) {
return true;
}
}
}
//per default return false, because nothing could be found.
return false;
}
COM: <s> check if this bean wrapper element is directly connected to another </s>
|
funcom_train/31908400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SVGItem removeIfNeeded(Object newItem){
SVGItem item = null;
if ( newItem instanceof SVGItem ){
//existing item, remove the item
// first from its original list
item = (SVGItem)newItem;
if ( item.getParent() != null ){
item.getParent().removeItem(item);
}
}
else{
item = createSVGItem( newItem );
}
return item;
}
COM: <s> if the itemis already in another list </s>
|
funcom_train/39273121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UPMError createProject(Project project) {
UPMError upme = UPMError.SUCCESS;
Project newProject = (Project)project.clone();
if (!EntityUtil.nameExists(newProject.getName(), projects)) {
newProject.setID(++projectCount);
projects.add(newProject);
} else return (upme = UPMError.ENTITY_ALREADY_EXISTS);
return upme;
}
COM: <s> creates a new project </s>
|
funcom_train/21302163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isModified(InputStream inputStream) throws IOException {
boolean modified = false;
if (intervalMonitor.isExpired()) {
long checkSum = getChecksum(inputStream);
if (checkSum != getLastChecksum()) {
setLastChecksum(checkSum);
modified = true;
}
}
return modified;
}
COM: <s> checks if input stream has changed since last refresh </s>
|
funcom_train/3081621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getObjectText(Object o) {
if (o instanceof AbstractButton) {
return ((AbstractButton) o).getText();
}
if (o instanceof TextComponent) {
return ((TextComponent) o).getText();
}
if (o instanceof LabelEx) {
return ((LabelEx) o).getText();
}
if (o instanceof SelectField) {
return ((SelectField) o).getSelectedItem().toString();
}
if (o == null) {
return "null";
}
return o.toString();
}
COM: <s> returns the meaningful text for a given object when sorting our list </s>
|
funcom_train/38216881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void search(String pattern, Vector container) {
if (this.toString().toLowerCase().indexOf(pattern.toLowerCase()) != -1) {
container.add(this);
}
if (this.getClass() == Group.class) {
Group me = (Group) this;
Iterator it = me.getEntities().iterator();
while (it.hasNext()) {
Entity entity = (Entity) it.next();
entity.search(pattern, container);
}
}
}
COM: <s> search matches are thrown into the container </s>
|
funcom_train/13944515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finished() {
// redraw map only if songs were projected on it
if (this.data != null) {
String name = (String) this.data;
if (name.equals(loader.getMap().getName())) {
((SOMTreeItem) loader.getTreeTool().getTree().getTreeItem("SOM")).loadMap(name);
}
}
}
COM: <s> do at finish </s>
|
funcom_train/9994227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCommandAction() throws AssertionFailedException {
System.out.println("commandAction");
DateViewer instance = null;
Command c_1 = null;
Displayable d_1 = null;
instance.commandAction(c_1, d_1);
fail("The test case is a prototype.");
}
COM: <s> test of test command action method of class date viewer </s>
|
funcom_train/8327908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _testStringComparisons() {
assertQueryReturns(
"SELECT {Measures.[Unit Sales]} ON COLUMNS,\n" +
" FILTER([Product].[Product Name].MEMBERS,\n" +
" INSTR(LCASE([Product].CURRENTMEMBER.NAME), \"fruit\") <> 0) ON ROWS \n" +
"FROM Sales", "");
}
COM: <s> b how can i perform complex string comparisons b </s>
|
funcom_train/19179655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeHash(String trackerUrl, HashWrapper hash) {
// TODO: this doesn't handle multiple tracker torrents yet
TrackerStatus ts = (TrackerStatus) trackers.get(trackerUrl);
if (ts != null){
//System.out.println( "removing hash for " + trackerUrl );
ts.removeHash(hash);
}
}
COM: <s> removes the scrape task and data associated with the supplied tracker </s>
|
funcom_train/22498917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Thread blinker(final String s1, final String s2) {
Thread blink;
blink = new Thread(new Runnable() {
public void run() {
String onText = s1;
String doneText = s2;
String offText = " ";
int count = 0;
try {
while (blinking) {
Thread.sleep(500);
if (count%2 == 0) {
status.setText(offText);
} else {
status.setText(onText);
}
count++;
}
status.setText(doneText);
} catch (InterruptedException ex) {
status.setText(doneText);
}
}
});
blinking = true;
blink.start();
return blink;
}
COM: <s> blink a pair of messages on the status line </s>
|
funcom_train/44946396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCurrent(long checksum) throws ChecksumQueryException {
try {
ResultSet resultSet = executeQuery(SELECT_CHEKSUM);
if (!resultSet.first())
return false;
long currentChecksum = resultSet.getLong(1);
resultSet.close();
return currentChecksum == checksum;
} catch (SQLException e) {
logger.error(e);
throw new ChecksumQueryException(e);
}
}
COM: <s> returns code true code if code checksum code is equal to the </s>
|
funcom_train/13803986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isExtensionDefined(String name) {
if( initialized == false ) {
instanceInitialize(null,null,null);
initialized = true;
}
for( int i = 0; i < extensions.length; i++ ) {
if( extensions[i].matches(name) ) return true;
}
return false;
}
COM: <s> is this extension defined </s>
|
funcom_train/18475672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws BuildException {
isCondition = false;
boolean value = validateAndExecute();
//if (verifyProperty != null) {
// getProject().setNewProperty(verifyProperty,
// new Boolean(value).toString());
//}
this.setVerifyProperty(new Boolean(value).toString());
}
COM: <s> calculate the checksum s </s>
|
funcom_train/16462104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send() {
String recipient = uiController.getText(uiController.find("tfRecipient"));
String message = uiController.getText(uiController.find("tfMessage"));
if (recipient.equals("")) {
uiController.alert(InternationalisationUtils.getI18NString(FrontlineSMSConstants.MESSAGE_BLANK_PHONE_NUMBER));
return;
}
this.uiController.frontlineController.sendTextMessage(recipient, message);
clearMessageComponent();
}
COM: <s> extract message details from the controls in the panel and send an sms </s>
|
funcom_train/26226950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPhiCatch(BasicBlock bb) {
if (phis[bb.getIndex()] != null) return;
//the type is not used, the rigth type of all operands,
// will be defined when passing operands to SSA form.
QVar variable = new QVar(var, Constants.TYP_REFERENCE);
phis[bb.getIndex()] = new QPhiCatch(variable);
}
COM: <s> add a phi catch for a given basic block </s>
|
funcom_train/26445370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
int flavorNumber = 1;
String key = "FlavorToClear";
while(getAttrib().containsKey(key+flavorNumber)){
for (int i = 0; i < envWidth; i++) {
for (int j = 0; j < envHeight; j++) {
patchGrid[i][j].setPatchVariable(getAttrib().getString(key+flavorNumber), 0);
}
}
flavorNumber++;
}
}
COM: <s> clear environment each time the update method is called refresh </s>
|
funcom_train/35087205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDone() {
// boolean result = true;
// try {
// result = !evaluateCondition();
// } catch (Exception e) {
// logger.error(e.getMessage(), e);
// }
// setDone(true);
// return result;
// setDone(false);
return false;
}
COM: <s> this is overriding the parent method </s>
|
funcom_train/7993708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WikiPageMW getPageByURI(String sourceURI) {
int lastslash = sourceURI.lastIndexOf('=');
String pagename = sourceURI.substring(lastslash + 1);
// check whether root url of this repository is part of sourceURI
if (sourceURI.indexOf(getRootURL()) == -1) {
throw new RuntimeException(
"given page uri doesnt match given repository");
}
return this.getPageByName(pagename);
}
COM: <s> only work with uris like http root uri </s>
|
funcom_train/44873007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getRationalPanel() {
if (rationalPanel == null) {
rationalPanel = new JPanel();
rationalPanel.setLayout(new BoxLayout(getRationalPanel(),
BoxLayout.X_AXIS));
rationalPanel.setPreferredSize(new java.awt.Dimension(120, 24));
rationalPanel.add(getTickSpacingRationalRB(), null);
rationalPanel.add(getRationalTextCB(), null);
}
return rationalPanel;
}
COM: <s> this method initializes rational panel </s>
|
funcom_train/31890546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadFolderSettings() {
settings = (FolderSettings) ab.dtop.getGltOptions(contactManager.getPath(), ab.MY_ID);
if (settings == null) {
settings = new FolderSettings();
log.info("No folder settings, using default.");
}
}
COM: <s> get folder settings and intialize the view according to the settings </s>
|
funcom_train/2758815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void flushLogs() throws InterruptedException {
LogFlush logFlush = new LogFlush();
LogFactory.getLog(getClass()).debug(logFlush);
if(false == LogFlush.STATUS_FLUSHED.equals(logFlush.getStatus())) {
throw new IllegalStateException("Log flush not performed:" + logFlush.getStatus());
}
}
COM: <s> flushes the current log and the logs pending send to the log consumer </s>
|
funcom_train/7295293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
try {
UnicodeSet that = (UnicodeSet) o;
if (len != that.len) return false;
for (int i = 0; i < len; ++i) {
if (list[i] != that.list[i]) return false;
}
if (!strings.equals(that.strings)) return false;
} catch (Exception e) {
return false;
}
return true;
}
COM: <s> compares the specified object with this set for equality </s>
|
funcom_train/30009171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRoot() {
System.out.println("getRoot");
FileListing instance = new FileListing();
File expResult = null;
File result = instance.getRoot();
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 root method of class papyrus </s>
|
funcom_train/7866399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocumentListFeed getFolderDocsListFeed(String folderResourceId) throws Exception {
if (folderResourceId == null) {
throw new RuntimeException("null folderResourceId");
}
URL url = buildUrl(URL_DEFAULT + URL_DOCLIST_FEED + "/" + folderResourceId + URL_FOLDERS);
return service.getFeed(url, DocumentListFeed.class);
}
COM: <s> gets the feed for all the objects contained in a folder </s>
|
funcom_train/49199884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLinkIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Link_linkId_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Link_linkId_feature", "_UI_Link_type"),
ExhibitionPackage.Literals.LINK__LINK_ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the link id feature </s>
|
funcom_train/43051757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JPanel makeNewPanel(String text, boolean isTab) {
JPanel panel;
if(isTab){
panel = new JPanel(new GridLayout(2, 1));
}
else{
panel = new JPanel(new GridLayout(1,1));
}
panel.setPreferredSize(new Dimension(500, 500));
// JLabel filler = new JLabel(text);
// filler.setHorizontalAlignment(JLabel.CENTER);
// panel.setLayout(new GridLayout(1, 1));
// panel.add(filler);
return panel;
}
COM: <s> creates and returns a new </s>
|
funcom_train/18959967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Player setCurrentPlayer(String name) {
for (int c=0; c< Players.size() ; c++) {
if ( ((Player)Players.elementAt( c )).getName().equals(name) ) { currentPlayer=((Player)Players.elementAt( c )) ; }
}
return currentPlayer;
}
COM: <s> sets the current player in the game </s>
|
funcom_train/7683378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onNext() {
if (Utility.requiredFieldValid(mDescription)) {
mAccount.setDescription(mDescription.getText().toString());
}
mAccount.setName(mName.getText().toString());
mAccount.save(Preferences.getPreferences(this));
FolderMessageList.actionHandleAccount(this, mAccount, Email.INBOX);
finish();
}
COM: <s> todo validator should also trim the description string before checking it </s>
|
funcom_train/5609150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PyObject _isnot(PyObject o) {
// Access javaProxy directly here as is is for object identity, and at best getJavaProxy
// will initialize a new object with a different identity
return this != o && (javaProxy == null || javaProxy != o.javaProxy) ? Py.True : Py.False;
}
COM: <s> implements code is not code operator </s>
|
funcom_train/35171418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeTableModel() {
tableModel = new ObjectTableModel(new String[] { COLUMN_NAMES_0, COLUMN_NAMES_1 },
Argument.class,
new Functor[] {
new Functor("getName"), // $NON-NLS-1$
new Functor("getValue") }, // $NON-NLS-1$
new Functor[] {
new Functor("setName"), // $NON-NLS-1$
new Functor("setValue") }, // $NON-NLS-1$
new Class[] { String.class, String.class });
}
COM: <s> initialize the table model used for the arguments table </s>
|
funcom_train/20504262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertSeatClass(long id, String code, String description) {
String sql = "insert into Seat_Class (id, code, description) values (?, ?, ?)";
Object[] args = new Object[] { new Long(id), code, description };
jdbcTemplate.update(sql, args);
}
COM: <s> inserts a seat class record to the seat class table </s>
|
funcom_train/47890769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getTrash() {
if (jTrashB == null) {
jTrashB = new TuxButton("images/trash.png", new Rectangle(0, 210, 34, 34));
//Sets the drop target and function that will be launched.
jTrashB.setDropTarget(new TuxDropTarget(this, "delete_current", "set_gif_trash_icon", "reset_trash_icon"));
}
return jTrashB;
}
COM: <s> this function initializes trash </s>
|
funcom_train/168002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFormattedTextField getJTimeMin() {
NumberFormatter maskTime = new NumberFormatter();
maskTime.setMinimum(timeMin);
maskTime.setMaximum(timeMax);
if (jTimeMin == null) {
jTimeMin = new JFormattedTextField(maskTime);
jTimeMin.setColumns(8);
}
jTimeMin.setMinimumSize(jTimeMin.getPreferredSize());
jTimeMin.setHorizontalAlignment(SwingConstants.RIGHT);
return jTimeMin;
}
COM: <s> this method initializes j time min </s>
|
funcom_train/23711608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ensureAttrEndsWith(Manifest mf, String attrName, String suffix) {
Manifest.Attribute attr = mf.getMainSection().getAttribute(attrName);
if ((null != attr) && !attr.getValue().endsWith(suffix)) {
attr.setValue(attr.getValue() + suffix);
}
}
COM: <s> ensure that the named main section attribute ends with the specified </s>
|
funcom_train/4761315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SocketChannel getChannel() throws InterruptedException {
// return (SocketChannel)buf.get();
if (srv == null) {
if (srvrun) {
throw new IllegalArgumentException("dont call when no server listens");
}
} else if ( ! srvstart ) {
init();
}
return buf.take();
}
COM: <s> get a new socket channel from a server socket </s>
|
funcom_train/35863767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected long calculateTimeToLiveMilliseconds() {
if (blockingCache.isDisabled()) {
return -1;
} else {
CacheConfiguration cacheConfiguration = blockingCache.getCacheConfiguration();
if (cacheConfiguration.isEternal()) {
return ONE_YEAR_IN_MILLISECONDS;
} else {
return cacheConfiguration.getTimeToLiveSeconds() * MILLISECONDS_PER_SECOND;
}
}
}
COM: <s> get the time to live for a page in milliseconds </s>
|
funcom_train/19326308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FoValue traitSpeakNumeral(final FObj fobj, final FoContext context) {
final PdSpeakNumeral property = (PdSpeakNumeral) getProperty(
FoProperty.SPEAK_NUMERAL);
if (property != null) {
return property.getValue(context, fobj);
}
return PdSpeakNumeral.getValueNoInstance(context, fobj);
}
COM: <s> returns the speak numeral property </s>
|
funcom_train/8931404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canExecute() {
int locationType = RoleQuery.INSTANCE.getLocationType(owner);
int[] cardinality = owner.getCheckboxViewCardinality();
return (cardinality[1] > 1 || cardinality[1] == -1) &&
(locationType == RoleQuery.MODEL_PROPERTIES ||
locationType == RoleQuery.METAMODEL_PROPERTIES ||
locationType == RoleQuery.CONFIGURATION ||
locationType == RoleQuery.CONFIGURATION_PROPERTIES);
}
COM: <s> you can clone only if </s>
|
funcom_train/21349187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean CheckValidation(String xml, String schemaURI, String proxyServer, String proxyPort, String userName, String password) {
return this.Utility.CheckValidation(xml,schemaURI,proxyServer,proxyPort,userName,password);
}
COM: <s> checks validation against schema url </s>
|
funcom_train/35838663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean restoreNode(PCSession session, String sNodeID) throws SQLException {
//
// DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName());
//
// boolean restored = DBNode.restore(dbcon, sNodeID, session.getUserID());
//
// getDatabaseManager().releaseConnection(session.getModelName(),dbcon);
return true;
}
COM: <s> restores a node in the database and returns true if successful </s>
|
funcom_train/10842203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkScheme(final String scheme) {
if ( scheme == null || scheme.length() == 0 ) {
throw new IllegalArgumentException("Scheme required");
}
if ( scheme.indexOf(':') != -1 ) {
throw new IllegalArgumentException("Scheme must not contain a colon");
}
}
COM: <s> check the scheme </s>
|
funcom_train/28755027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLibraryid(Long newVal) {
if ((newVal != null && this.libraryid != null && (newVal.compareTo(this.libraryid) == 0)) ||
(newVal == null && this.libraryid == null && libraryid_is_initialized)) {
return;
}
this.libraryid = newVal;
libraryid_is_modified = true;
libraryid_is_initialized = true;
}
COM: <s> setter method for libraryid </s>
|
funcom_train/3417473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printStackTrace(PrintWriter s) {
synchronized (s) {
s.println(this);
StackTraceElement[] trace = getOurStackTrace();
for (int i=0; i < trace.length; i++)
s.println("\tat " + trace[i]);
Throwable ourCause = getCause();
if (ourCause != null)
ourCause.printStackTraceAsCause(s, trace);
}
}
COM: <s> prints this throwable and its backtrace to the specified </s>
|
funcom_train/46435862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillProjectFilter(XComponent form, Map<String, List<String>> projectsResourcesMap) {
XComponent projectDataSet = form.findComponent(PROJECT_SET);
//add projects that are only for adhoc tasks
for (String projectChoice : projectsResourcesMap.keySet()) {
XComponent row = new XComponent(XComponent.DATA_ROW);
row.setStringValue(projectChoice);
projectDataSet.addChild(row);
}
}
COM: <s> fills up the project filter data set </s>
|
funcom_train/25213215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMathcode(UnicodeChar uc, MathCode code, boolean global) {
if (mathcodeMap == null) {
mathcodeMap = new HashMap<UnicodeChar, MathCode>();
}
mathcodeMap.put(uc, code);
if (global && next != null) {
next.setMathcode(uc, code, global);
}
}
COM: <s> setter for the math code of a character </s>
|
funcom_train/34782146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onFrameFinished() {
// we have just finished a frame
++this.frames;
// notify observers of the new frame
if (this.isPaintFrame) {
setChanged(true);
notifyObservers(SIGNAL_NEW_FRAME);
}
// determine whether to paint the next frame
this.isPaintFrame = this.frames % getFrameSkip() == 0;
}
COM: <s> paint the newly generated frame </s>
|
funcom_train/47434379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Int2 template2CommentPositionIn(TemplateElement template, Int2 limits) {
if (template == null)
return Int2.NOT_FOUND;
if (!commit)
commit();
List positions = (List) template2CommentPositions.get(template);
if (positions != null) {
Iterator it = positions.iterator();
while (it.hasNext()) {
Int2 pos = (Int2) it.next();
if (pos.b() >= limits.b() && pos.e() <= limits.e()) {
return pos;
}
}
}
return Int2.NOT_FOUND;
}
COM: <s> returns the first comment position of the given template </s>
|
funcom_train/3840311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void shuffle() {
String tmp;
int pick;
for (int i = 0; i < this.size() * 2; i++) {
pick = (int) (Math.random() * (this.size() - 1));
tmp = (String) this.getDice(pick);
this.removeElementAt(pick);
this.addElement(tmp);
}
}
COM: <s> shuffles the diceset </s>
|
funcom_train/36932234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tumble(final float theAzimuthOffset, final float theElevationOffset) {
// Calculate the new azimuth and elevation for the camera
_myXrotation = CCMath.constrain(
_myXrotation + theElevationOffset,
TOL - CCMath.HALF_PI,
CCMath.HALF_PI - TOL
);
_myYRotation = (_myYRotation + theAzimuthOffset + CCMath.TWO_PI) % CCMath.TWO_PI;
// Update the camera
updateCamera();
}
COM: <s> tumble the camera about its target </s>
|
funcom_train/9236272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initComponents() {
button = new JButton("Edit");
durationLabel = new JLabel();
if (duration == 0) {
durationLabel.setText("0 Seconds");
} else {
durationLabel.setText(Formatter.formatDuration(duration));
}
button.setMargin(new Insets(0, 2, 0, 2));
}
COM: <s> initliases and lays out the components </s>
|
funcom_train/31249138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onInvite(String chan, IRCUser user, String nickInvited) {
String nickAct = user.getUsername();
int index = qii.getSelectedIndex();
String line = "* Invite: " + nickInvited + " was invited by " + nickAct
+ " to " + chan;
qii.updateTab(index, line, Settings.getServerColor());
}
COM: <s> fired when somebody gets invited </s>
|
funcom_train/47514192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sort(double a[]) {
try {
//Fill the index array according to the double array length
sortedIndex= new int[a.length];
fillIndex(a.length);
QuickSort(a, 0, a.length - 1);
InsertionSort(a, 0, a.length - 1);
} catch (Exception e) {
System.err.println("FastQuickSort error: " + e);
}
}
COM: <s> sorts the given array </s>
|
funcom_train/24076875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertConsistent() throws InvalidInputException {
if (!m_categories.getCategories().containsAll(m_assignments.getAllCategories())) {
final Collection<ICategory> left = CollectionUtils.subtract(getAssignedCategories(), m_categories
.getCategories());
throw new InvalidInputException("Assigned categories " + left
+ " not contained in this object's categories.");
}
}
COM: <s> ensures that this object has a consistent state see </s>
|
funcom_train/50313980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle map (Control from, Control to, int x, int y, int width, int height) {
checkDevice ();
if (from != null && from.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
if (to != null && to.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
Point point = map(from, to, x, y);
return new Rectangle(point.x, point.y, width, height);
}
COM: <s> maps a point from one coordinate system to another </s>
|
funcom_train/51721677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTab(JPanel paneltoTab, String tabtitle, javax.swing.Icon i) {
String title = tabtitle;
if (title == null) {
title = "New";
}
jTabbedPane1.add(title, paneltoTab);
if (i != null) {
jTabbedPane1.setIconAt(jTabbedPane1.getTabCount() - 1, i);
}
}
COM: <s> add a cab for stat </s>
|
funcom_train/35297478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleNewConnection(AsynchronousSocketChannel channel) {
Client client = new Client(channel, new ClientReader(this, new NameReader(this)));
try {
channel.setOption(StandardSocketOptions.TCP_NODELAY, true);
} catch (IOException e) {
// ignore
}
connections.add(client);
client.run();
}
COM: <s> creates a new client and adds it to the list of connections </s>
|
funcom_train/34527763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void setDefaultProjectName(String projectName) {
// if (!projectExists(projectName)) {
// String msg = "Unable to change the default project to '"
// + projectName + "' as this project doesn't exist.";
// throw new IllegalArgumentException(msg);
// }
// serviceConfigMgr.setDefaultProjectName(projectName);
// }
COM: <s> sets the name of the default project </s>
|
funcom_train/44130490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAttribute(Attribute a){
attributes.put(a.getName(), a);
log.debug("Item id = " + id + " Attribute added. Name = " + a.getName() + " value = " + a.getValue() + " type = " + a.getType());
}
COM: <s> add an attribute to this workflow item </s>
|
funcom_train/46477772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDrClausesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DriversDiagram_DrClauses_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DriversDiagram_DrClauses_feature", "_UI_DriversDiagram_type"),
SecurityContextPackage.Literals.DRIVERS_DIAGRAM__DR_CLAUSES,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the dr clauses feature </s>
|
funcom_train/42414910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
GwtPermission perm = (GwtPermission) o;
if (this.equals(perm)) {
return 0;
}
if (this.mServiceClass.compareTo(perm.mServiceClass) == 0) {
return this.mServiceMethod.compareTo(perm.mServiceMethod);
} else {
return this.mServiceClass.compareTo(perm.mServiceClass);
}
}
COM: <s> method used to compare two objects </s>
|
funcom_train/4779728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeGameBoard(){
gameBoard = new String[10][10];
colorBoard = new String[10][10];
for (int i = 1; i < 10; i++) {
gameBoard[0][i] = i + "";
gameBoard[i][0] = i + "";
}
for (int i = 1; i < 10; i++) {
for (int j = 1; j < 10; j++) {
gameBoard[i][j] = "?";
colorBoard[i][j] = "none";
}
}
}
COM: <s> function to initialize the game board with values and colors </s>
|
funcom_train/45624449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSuperInterfacesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Interface_SuperInterfaces_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Interface_SuperInterfaces_feature", "_UI_Interface_type"),
CSMPackage.Literals.INTERFACE__SUPER_INTERFACES,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the super interfaces feature </s>
|
funcom_train/8629850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
try {
if (isDebugEnabled()) {
debugCode("executeUpdate("+quote(sql)+", "+autoGeneratedKeys+");");
}
return executeUpdate(sql);
} catch (Exception e) {
throw logAndConvert(e);
}
}
COM: <s> executes a statement and returns the update count </s>
|
funcom_train/13847846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() throws Exception {
logger.finest("JoinManager - LeaseExpireNotifyTask started");
boolean tryIt = false;
synchronized(joinSet) {
tryIt = joinSet.contains(proxyReg);
}//end sync(joinSet)
if(tryIt) proxyReg.register(regAttrs);
logger.finest("JoinManager - LeaseExpireNotifyTask completed");
}//end run
COM: <s> attempts to re register this join managers service with the </s>
|
funcom_train/8827897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sort(Comparator c) {
Arrays.sort(m_programs, c);
float f = 0;
for (int i = 0; i < m_programs.length; i++) {
m_fitnessRank[i] = f;
f += m_programs[i].getFitnessValue();
}
}
COM: <s> sorts the population into ascending order using some criterion for </s>
|
funcom_train/445684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCoreValidSubAttribute() throws Exception {
createAxiomDef("?x[ageOfAnimal hasValue ?y] impliedBy ?x[ageOfHuman hasValue ?y].");
WsmlCoreValidator v = new WsmlCoreValidator(leFactory);
boolean b = v.isValid(ontology, errors, warnings);
// printWarning(warnings);
// printError(errors);
assertTrue(b);
removeAxiomDef();
}
COM: <s> this test checks for the validity of an sub attribute inverse implication </s>
|
funcom_train/19457351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isAllDigits(String string) {
if (string == null || string.length() == 0) return false;
for (int i=0; i<string.length(); i++) {
char ch = string.charAt(i);
if (!Character.isDigit(ch) && ch != ',') {
return false;
}
}
return true;
}
COM: <s> test for digits in the screen </s>
|
funcom_train/37841458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int askToSave() {
if (! project.isDirty()) {
return -1;
}
Object[] buttons = {
resources.getString("button.yes"),
resources.getString("button.no"),
resources.getString("button.cancel")
};
int result = JOptionPane.showOptionDialog(
this,
resources.getString("project.wantToSave"),
resources.getString("project.saveChanges"),
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE,
null,
buttons,
buttons[NO]);
if (result == YES) {
saveProject(false);
}
return result;
}
COM: <s> displays the project modified save question </s>
|
funcom_train/37841242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllFunctions() {
if (functions.size() == 0) { return; }
ListDataEvent foo = new ListDataEvent(functions, ListDataEvent.INTERVAL_REMOVED, 0, functions.size()-1);
functions.removeAllElements();
Iterator i = functionListeners.iterator();
while (i.hasNext()) {
((ListDataListener) i.next()).intervalRemoved(foo);
}
fireFunctionSetChanged();
}
COM: <s> deletes all functions from the list </s>
|
funcom_train/29548056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setZoomValue(int value) {
// double range =
// zoomSB.getMaximum()-zoomSB.getMinimum()-zoomSB.getVisibleAmount();
double range = zoomSB.getMaximum() - zoomSB.getMinimum() - EXTEND;
zoomSB.setValue((int) ((value + 100) / 200.0 * range + 0.5)
+ zoomSB.getMinimum());
}
COM: <s> set the zoom value </s>
|
funcom_train/28723091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRecordData(String name, String value) {
FormRecordInterface ctrl = (FormRecordInterface) controlsPoolHT.get(name);
if (value != null) {
ctrl.setValue(value);
/*if (ctrl instanceof ComboFormRecord) {
int selectionIndex = ((ComboFormRecord) ctrl).getSelectionIndex();
if (selectionIndex != ComboFormRecord.COMBO_NOT_AVAILABLE) {
updateLayout(name, selectionIndex);
}
}*/
}
}
COM: <s> sets data value to the record name </s>
|
funcom_train/7673467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExecutionStack merge(ExecutionStack other) {
try {
return Merger.mergeStack(this, other);
} catch (SimException ex) {
ex.addContext("underlay stack:");
this.annotate(ex);
ex.addContext("overlay stack:");
other.annotate(ex);
throw ex;
}
}
COM: <s> merges this stack with another stack </s>
|
funcom_train/13287212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
try {
Category category = (Category) obj;
return new EqualsBuilder()
.append(this.getName(), category.getName())
.append(this.getBlog(), category.getBlog())
.isEquals();
} catch (ClassCastException e) {
// The given object is not a category, therefore they are not equal.
return false;
}
}
COM: <s> compares this category with the given object for equality </s>
|
funcom_train/1241531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRow(int row) {
SOAPMonitorData soap = null;
if (filter_data == null) {
soap = (SOAPMonitorData) data.elementAt(row);
data.remove(soap);
} else {
soap = (SOAPMonitorData) filter_data.elementAt(row);
filter_data.remove(soap);
data.remove(soap);
}
fireTableRowsDeleted(row, row);
}
COM: <s> remove a message from the table </s>
|
funcom_train/32016554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("PwscfBeanService".equals(portName)) {
setPwscfBeanServiceEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/24601379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getItemKey(int index, int label) throws Exception {
String format = data.getValueFromLabel(index, label) + "(%d,%d)";
if (data.useGeo)
format += "_geo";
if (data.wrap)
format += "_wrap";
// String key = String.format(format, thumb_width, thumb_height);
// DEBUG.printMessage(String.format("key: %s", key));
return String.format(format, thumb_width, thumb_height);
}
COM: <s> return a key string using label </s>
|
funcom_train/11737206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMixinRemovedWithProtectedChildNode() throws Exception {
testRootNode.addMixin("test:mixinNode_protectedchild");
superuser.save();
// remove the mixin type again
testRootNode.removeMixin("test:mixinNode_protectedchild");
assertFalse(testRootNode.isNodeType("test:mixinNode_protectedchild"));
superuser.save();
assertFalse(testRootNode.isNodeType("test:mixinNode_protectedchild"));
}
COM: <s> test for bug jcr 2778 </s>
|
funcom_train/48606769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPasswordConfirm() {
if (user.getAccount().getPassword().equals(confirmPassword)) {
return true;
} else {
FacesContext jsf = FacesContext.getCurrentInstance();
String errorMessage = MessageBundle.getMessage("notConfirmedPassword");
jsf.addMessage("registerForm:passwordRepeat", new FacesMessage(FacesMessage.SEVERITY_ERROR, errorMessage, null));
return false;
}
}
COM: <s> check that user confirm password correctly </s>
|
funcom_train/35233950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OmniUnit getUnit(int unitNo) {
OmniUnit ret = units.get(unitNo);
if (ret == null) {
ret = outputs.get(unitNo);
if (ret == null) {
ret = rooms.get(unitNo);
if (ret == null ) {
ret = devices.get(unitNo);
if (ret == null ) {
ret = flags.get(unitNo);
}
}
}
}
return ret;
}
COM: <s> get at a unit object </s>
|
funcom_train/15685007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Object targetData, int rowIndex) {
try {
if (rowIndex < 0) {
throw new IllegalArgumentException(
"rowIndex must not be of negative value ," + rowIndex);
}
getContext().addToCollection(getAbsoluteCollectionDataPath(),
targetData, rowIndex);
tableViewer.insert(targetData, rowIndex);
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> adds an element at the given row index </s>
|
funcom_train/38809841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_TCM__OrgJdomDocument_setRootElement_OrgJdomElement() {
Element element = new Element("element");
Document doc1 = new Document(element);
assertEquals("incorrect root element returned", element, doc1
.getRootElement());
Document doc2 = new Document();
try {
doc2.setRootElement(element);
fail("didn't catch element already attached to anohter document");
} catch (IllegalAddException e) {
}
}
COM: <s> test that set root element works as expected </s>
|
funcom_train/24112901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SymObjType readObjectType(final InputStream stream) throws IOException {
final SymObjType type = new SymObjType();
final byte[] array = getBytes(stream, type.getDataStructureSize());
if (array == null) {
return null;
}
return type.initFromArray(array) ? type : null;
}
COM: <s> reads and returns the object type data structure from the given stream </s>
|
funcom_train/29771234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStoreAllBACsData() throws Exception {
System.out.println("storeAllBACsData");
AllBACsData data = new BlueFuseFileReader().readAllBACs(new File(fileLoc));
BlueFuseSQLTable result = BlueFuseSQLManager.storeAllBACsData(data);
}
COM: <s> test of store all bacs data method of class sql </s>
|
funcom_train/46456208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAll(int val[][]) {
if(val.length!=raster.getNx()||val[0].length!=raster.getNy()) {
resizeRaster(val.length, val[0].length);
}
raster.setBlock(0, 0, val);
}
COM: <s> sets the rasters values using integer values </s>
|
funcom_train/10680908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char getNextValueAsChar() {
reading_data_index = reading_data_index
+ TypesLengths.getTypeLength(TypesLengths.CHAR_ID);
return (char)readFromByteArray(data, reading_data_index
- TypesLengths.getTypeLength(TypesLengths.CHAR_ID), TypesLengths
.getTypeLength(TypesLengths.CHAR_ID));
}
COM: <s> gets the next value of the data of the packet as char </s>
|
funcom_train/26245594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Planet getPlanet(int id) throws ObjectNotFoundException {
ResultSet rs = null;
Planet planet = null;
try {
rs = db.query("select * from planet where id=?", id);
if (rs.next()) {
planet = new Planet(this, rs);
} else {
throw new ObjectNotFoundException("Could not find a planet with id ["+id+"]");
}
} catch (SQLException e) {
Log.error(e);
} finally {
db.tidy(rs);
}
return planet;
}
COM: <s> get the specified planet according to its id </s>
|
funcom_train/45192161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prop(String name, String value) {
if (value == null) {
return;
}
out.append(' ');
out.append(name);
out.append("=\"");
out.append(WUtil.encodeHtml(value));
out.append('\"');
}
COM: <s> print name encode html value if value is not null </s>
|
funcom_train/35419611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isWithinNextInvocation(Object pProxy, Method pMethod,Object[] pArgs) {
Invocation nextInvocation = peekNextInvocation() ;
if(nextInvocation==null)
return false ;
return this.isInvocation(nextInvocation, pProxy, pMethod, pArgs);
}
COM: <s> determine if execution as progressed to next in invocation sequence </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.