__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/45466559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getBuilderReference() throws Exception {
Object generated = null;
if (_builderClassName != null) {
generated = _delegate.buildObjectModel(_builderClassName);
assertNotNull("The generated object with '" + _builderClassName + "' is null", generated);
}
return generated;
}
COM: <s> returns a reference document as generated by the hard coded </s>
|
funcom_train/14585918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void plays(Team team) {
// display roster options
String[] playsOptions = { "reload" };
String request =
NEWLINE + "Type the number of your play choice: [0/1/.../*1 (Go back)] ";
int choice = getNumberChoice(playsOptions, request, team);
// run the chosen option
switch (choice) {
case 0:
// Reload the plays from the team spec
team.loadTeamDB();
break;
default:
// 'back' option
break;
}
}
COM: <s> presents and accepts the play options </s>
|
funcom_train/12086412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addElement(String mbeanName, long timestamp, String attrName, String attrValue) {
String objectName = extractMBeanObjectName(mbeanName);
InstanceDataRecord objectRecord = instanceDataRecords.get(objectName);
if (objectRecord == null) {
objectRecord = new InstanceDataRecord(objectName, timestamp);
instanceDataRecords.put(objectName, objectRecord);
}
objectRecord.addElement(attrName, attrValue);
}
COM: <s> adds a new object name element of this mbean type element </s>
|
funcom_train/45692652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object exportAllAudioFiles(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
DirectoryDialog directoryDialog = new DirectoryDialog(window.getShell());
directoryDialog.setMessage(EsxEditorUtil.getString("_UI_Export_Samples_Select_Dir"));
String directory = directoryDialog.open();
if(directory!=null) {
exportAudioFilesToDirectory(window.getWorkbench(), directory);
}
return null;
}
COM: <s> this will pop open a choose directory dialog allowing a user to </s>
|
funcom_train/25582173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadHeraklesConfiguration(String filename){
property = new Properties();
File file = new File(filename);
if(file.exists()){
if(!file.canRead()){
System.out.println("The Configuration file can not be read!");
}
else {
try {
InputStream in = new FileInputStream(file);
property.loadFromXML(in);
} catch (Exception e) {
System.out.println("The format of the Configuration file is not correct!");
property = new Properties();
}
}
} else {
System.out.println("The Configuration file " + file.getAbsolutePath() + " can not be found!");
}
}
COM: <s> load the herakles confiuration by using special file name </s>
|
funcom_train/27823380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector parse(String toParse) {
LexiconChecker tc = lexi.getLexiconChecker();
locations.clear();
for (int i=0;i<toParse.length();i++) {
if (tc.nextChar(toParse.charAt(i))) {
while (tc.hasMoreEntryLocations()) {
locations.add(tc.getEntryLocation());
}
}
}
return locations;
}
COM: <s> looks for synonyms in the supplied string </s>
|
funcom_train/49169058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAnotherScriptAfterOneScript() throws IOException {
testSuccessfulShellScript();
startOfOutAndErrCapture();
at(WorkspaceWithShellScript.class).iwant(
"target/anotherSuccessfulScriptOutput/as-path");
assertEquals(pathLine("anotherSuccessfulScriptOutput"), out());
assertEquals("", err());
assertEquals("hello from anotherSuccessfulScript\n",
cachedContent("anotherSuccessfulScriptOutput"));
}
COM: <s> a bug made the second run run the first script again </s>
|
funcom_train/3369512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIconTextGap(int iconTextGap) {
int oldValue = this.iconTextGap;
this.iconTextGap = iconTextGap;
iconTextGapSet = true;
firePropertyChange("iconTextGap", oldValue, iconTextGap);
if (iconTextGap != oldValue) {
revalidate();
repaint();
}
}
COM: <s> if both the icon and text properties are set this property </s>
|
funcom_train/17204610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CompiledMethod compileSpecializedMethod(RVMMethod template, TypeReference[] specializedParams) {
NormalMethod normalMethod = (NormalMethod)template;
/* Currently only support eagerly compiled methods */
if (VM.VerifyAssertions) VM._assert(VM.writingBootImage);
return BootImageCompiler.compile(normalMethod, specializedParams);
}
COM: <s> compile a specialized version of a template method </s>
|
funcom_train/26326327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void move_up()
{ int row_up = assoc_table.getSelectedRow();
if (row_up >=1)
{
Vector local_temp_row = (Vector) rows.elementAt(row_up-1);
rows.setElementAt( rows.elementAt(row_up),row_up -1 ) ;
rows.setElementAt(local_temp_row,
row_up) ;
fireTableRowsUpdated(row_up -1,
row_up) ;
assoc_table.addRowSelectionInterval(row_up - 1,row_up -1) ;
}
}
COM: <s> switches position of selected row row up with row above </s>
|
funcom_train/36557851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getPantsSpecColor(float[] rgbOut) {
if (rgbOut == null || rgbOut.length < 3)
throw new IllegalArgumentException("Unacceptable array provided!");
rgbOut[0] = pantsSpecColor[0];
rgbOut[1] = pantsSpecColor[1];
rgbOut[2] = pantsSpecColor[2];
}
COM: <s> retrieve the pants specular component color </s>
|
funcom_train/35193906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() {
try {
this.crudService = new InternalNewsCRUDService();
InternalNewsCRUD crud = crudService.getInternalNewsCRUDPort();
News internalNewsToDelete = crud.readInternalNews(id);
crud.deleteInternalNews(internalNewsToDelete);
}
catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> delete the internal news corresponding with the identifier </s>
|
funcom_train/32636236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOneAlmostCompletePartition() {
int dataLen = PARTITION_LENGTH - 1;
byte[] data = new byte[dataLen];
Arrays.fill(data, (byte)6);
wu.setData(data);
wu.save();
reinitializeHibernate();
wu = WorkUnit.findAll()[0];
byte[] savedData = wu.getData();
assertTrue(savedData.length == dataLen);
for (byte datum : savedData) {
assertTrue(datum == (byte)6);
}
}
COM: <s> tests saving data with length partition length 1 </s>
|
funcom_train/40614360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaxRows(int maxRows) throws SQLException {
try {
debugCodeCall("setMaxRows", maxRows);
checkClosed();
if (maxRows < 0) {
throw DbException.getInvalidValueException("maxRows", maxRows);
}
this.maxRows = maxRows;
} catch (Exception e) {
throw logAndConvert(e);
}
}
COM: <s> gets the maximum number of rows for a result set </s>
|
funcom_train/31683322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() throws WebDAVException {
if ((fileName == null) && (url != null)) {
fileName = ResourceFactory.getRealPath(url);
}
String sDecoded = null;
try {
sDecoded = URLDecoder.decode(fileName, "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new WebDAVException(
WebDAVStatus.SC_INTERNAL_SERVER_ERROR,
e.getLocalizedMessage());
}
return sDecoded;
}
COM: <s> return the local name of the resource </s>
|
funcom_train/12628425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String convertListToPath(File[] files) {
String filePath = "";
for (int i = 0; i < files.length; i++) {
if (files[i].getPath().endsWith(".jar")) {
filePath = filePath + files[i].getPath() + pathSeperator;
}
}
return filePath;
}
COM: <s> description of the method </s>
|
funcom_train/47244372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBrowseGlossaryCommand() {
if (browseGlossaryCommand == null) {//GEN-END:|21-getter|0|21-preInit
// write pre-init user code here
browseGlossaryCommand = new Command("Browse Glossary", Command.ITEM, 0);//GEN-LINE:|21-getter|1|21-postInit
// write post-init user code here
}//GEN-BEGIN:|21-getter|2|
return browseGlossaryCommand;
}
COM: <s> returns an initiliazed instance of browse glossary command component </s>
|
funcom_train/44706197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void rollbackLinkClicked(PageState s, BigInteger id) {
ContentItem item = getItem(s);
User user = KernelHelper.getCurrentUser(s.getRequest());
VersionController.rollback(item.getOID(), id);
//item.rollBackTo(trans);
item.applyTag("Rolled back");
item.save();
}
COM: <s> rollback the item to the specified transaction </s>
|
funcom_train/26246046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getOrbitNumeral(int position) {
String numeral = "";
while (position > 10) {
numeral += "X";
position -= 10;
}
switch (position) {
case 1:
return numeral + "I";
case 2:
return numeral + "II";
case 3:
return numeral + "III";
case 4:
return numeral + "IV";
case 5:
return numeral + "V";
case 6:
return numeral + "VI";
case 7:
return numeral + "VII";
case 8:
return numeral + "VIII";
case 9:
return numeral + "IX";
case 10:
return numeral + "X";
}
return numeral;
}
COM: <s> gets the roman numeral suffix for the given orbital position </s>
|
funcom_train/19308805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PDFOutlineItem getNext() {
if (this.parent == null) {
return null;
}
final int siblingIndex = getSiblings().indexOf(this);
if (siblingIndex < 0
|| siblingIndex >= getSiblings().size() - 1) {
return null;
}
return getSiblings().get(siblingIndex + 1);
}
COM: <s> return the sibling outline item immediately after this one </s>
|
funcom_train/18089197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showNotify() {
// Make sure the checkbox to clear the log is unchecked.
// If the user cleared it last time it would retain its state
// as checked. The user might just be changing the log level
// and accidentally clear the logs.
clear.setChecked(false);
// Continue processing the event.
super.showNotify();
}
COM: <s> called when this screen is about to be displayed </s>
|
funcom_train/11419719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AuthDecisionStatementBean getStatement(TokenProviderParameters providerParameters) {
AuthDecisionStatementBean authzBean = new AuthDecisionStatementBean();
ActionBean actionBean = new ActionBean();
actionBean.setContents("Read");
authzBean.setActions(Collections.singletonList(actionBean));
authzBean.setResource("endpoint");
authzBean.setDecision(AuthDecisionStatementBean.Decision.PERMIT);
return authzBean;
}
COM: <s> get an auth decision statement bean using the given parameters </s>
|
funcom_train/37586099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getSpan(GlyphView v, int start, int end, TabExpander e, float x) {
sync(v);
Segment text = v.getText(start, end);
int width = Utilities.getTabbedTextWidth(text, _metrics, (int) x, e, start);
return width;
}
COM: <s> determines the span the glyphs given a start location for tab expansion </s>
|
funcom_train/42994368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2 && !e.getComponent().getName().trim().equals("")) {
viewChanger.show(center, DAY);
}
int s = Integer.parseInt(e.getComponent().getName());
if( s < 1 || s > curMonths[currentMonth-1]){
s = currentDay;
}
setCurrentDay(s);
}
COM: <s> called when there is a mouse event </s>
|
funcom_train/24939687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPackage() {
// blow through source file until we find { or EOF, looking for a
// line
// that starts with package as the command.
do {
String statement;
try {
statement = next();
} catch (IOException ioe) {
return "";
}
if (statement.startsWith("package")) {
// Trim out the rest of the statement and return it
String result = statement.substring("package".length(),
statement.length());
return result.trim();
}
} while (!eof() && !foundOpenBrace());
return "";
}
}
COM: <s> code get package code parses the java source file and returns the </s>
|
funcom_train/25282389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void write2file(final String path, final String data) {
FileOutputStream out; // declare a file output object
PrintStream p; // declare a print stream object
try { // Create a new file output stream // connected to "myfile.txt"
out = new FileOutputStream(path); // Connect print stream to the
// output stream
p = new PrintStream(out);
p.print(data);
p.close();
} catch (final Exception e) {
e.printStackTrace();
}
}
COM: <s> writes a string to a file </s>
|
funcom_train/5395486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDecodeDouble() {
System.out.println("decodeDouble");
byte[] buffer = null;
double expResult = 0.0;
double result = DecodeEncodePrimitives.decodeDouble(buffer);
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 decode double method of class org </s>
|
funcom_train/46526502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pmFileHistory(JTable where, int x, int y){
// Toplevel Menu
//int[] rows = where.getSelectedRows();
JPopupMenu mypm = new JPopupMenu("File History Menu");
generatePopupMenu(mypm, new String[]{
"<html><b>Open</b></html>",
"Show In Explorer",
"Copy Path",
"separator",
"Clear",
// "separator",
// "Toggle Fullscreen (double leftclick / F11)"
}, new Object[][]{
{where},
{where},
{where},
null,
null,
// null,
// null
}, "FileHistory");
mypm.show(where, x, y);
return ;
}
COM: <s> spawn a popupmenu for the file history </s>
|
funcom_train/3471293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireReportEvent(TestReportEvent event) {
for (TestReportListener listener : listeners) {
if (event.getID() == TestReportEvent.REPORT_ELEMENT_ADDED) {
listener.testReportElementAdded(event);
} else if (event.getID() == TestReportEvent.REPORT_CLEARED) {
listener.testReportCleared(event);
}
}
}
COM: <s> fires a report event </s>
|
funcom_train/5727645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean userIsInstituteMember(InstituteInfo institute, UserInfo user) {
final List<InstituteMember> instituteMembers = getInstituteService().getInstituteSecurity(institute.getId()).getMembers();
for (InstituteMember instituteMember : instituteMembers) {
if (user.getId().equals(instituteMember.getId())) {
return true;
}
}
return false;
}
COM: <s> checks if a user is member of an institute </s>
|
funcom_train/43580548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToolBar gettagToolBar() {
if (tagToolBar == null) {
tagToolBar = new JToolBar();
tagToolBar.add(getManualInputButton());
tagToolBar.addSeparator();
tagToolBar.add(getUrlInputButton());
tagToolBar.addSeparator();
tagToolBar.add(getFolderInputButton());
tagToolBar.addSeparator();
tagToolBar.add(dividePanel);
tagToolBar.addSeparator();
tagToolBar.add(getTagOutputButton());
tagToolBar.setFloatable(false);
}
return tagToolBar;
}
COM: <s> this method initializes tag tool bar </s>
|
funcom_train/18894420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileSystemModel getFileSystemModel() throws Exception {
validate();
if (fsModel == null) {
fsModel = new FileSystemModelImpl();
//init
fsModel.setResource(fsModelResource);
fsModel.setType(fsModelType);
fsModel.init(getModelContext());
}
return fsModel;
}
COM: <s> returns the current file system model used by mp3 model </s>
|
funcom_train/10912191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BookmarkData createBookmarkData(Bookmark bookmark) {
BookmarkData data = new BookmarkData(bookmark);
for (int count = 0; count < bookmark.getChildBookmarks().size(); count++) {
Bookmark bkmk = (Bookmark)(bookmark.getChildBookmarks()).get(count);
data.addSubData(createBookmarkData(bkmk));
}
return data;
}
COM: <s> create and return the bookmark data for this bookmark </s>
|
funcom_train/44712976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getChildObjects() {
LinkedList children = new LinkedList();
DataAssociationCursor cursor = ((DataAssociation) get(CHILD_OBJECTS))
.cursor();
applyOrder(cursor, s_categorizedObjectFields);
while (cursor.next()) {
children.add(new CategorizedObject(cursor.getDataObject()));
}
cursor.close();
return children;
}
COM: <s> returns the child objects of this category as </s>
|
funcom_train/22385888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected final Poolable getObject() {
//pa("getObject() ...");
if(startIndex > 0) {
startIndex--;
used[startIndex] = true;
//pa("From startIndex: "+startIndex);
return cache[startIndex];
} else {
int i = endIndex;
//pa("From endIndex: "+i);
endIndex++;
ensureLength(endIndex);
used[i] = true;
Poolable result = cache[i];
if(result == null) {
//pa("...create().");
result = create();
result.setPool(this, i);
cache[i] = result;
}
return result;
}
}
COM: <s> get a code placeable code object not yet casted to the class </s>
|
funcom_train/47440306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PaletteContainer createAgroEcoMAD1Group() {
PaletteGroup paletteContainer = new PaletteGroup(
AgroEcoMAD.AgroEcoMAD.diagram.part.Messages.AgroEcoMAD1Group_title);
paletteContainer.add(createDiagramaActividad1CreationTool());
paletteContainer.add(createConector2CreationTool());
paletteContainer.add(createFin3CreationTool());
paletteContainer.add(createCiclo4CreationTool());
paletteContainer.add(createActividad5CreationTool());
paletteContainer.add(createCondicion6CreationTool());
paletteContainer.add(createMetodo7CreationTool());
paletteContainer.add(createInicio8CreationTool());
return paletteContainer;
}
COM: <s> creates agro eco mad palette tool group </s>
|
funcom_train/12651918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEarlier(YearMonth other) {
if ((other == null) || (year == null) || (other.year == null))
return false;
int delta = year.compareTo(other.year);
if (delta < 0)
return true;
if (delta > 0)
return false;
return (month > 0) && (other.month > 0) && (month < other.month);
}
COM: <s> returns whether this date is definitively earlier than another date </s>
|
funcom_train/1114961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchAccount(long accountId) throws SQLException {
Cursor cursor = db.query(true, Accounts.TABLE_NAME, new String[] {"*"},
Accounts._ID + "=" + accountId, null, null, null, null, null);
if (cursor != null) {
cursor.moveToFirst();
}
return cursor;
}
COM: <s> return a cursor positioned at the account that matches the given account id </s>
|
funcom_train/549870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModel(IScalarAttribute attribute) {
setTitle(attribute.getName());
this.attribute = attribute;
if (attribute instanceof INumberScalar) {
INumberScalar scalar = (INumberScalar) attribute;
setter.setModel(scalar);
}
else {
IStringScalar scalar = (IStringScalar) attribute;
value.setText(scalar.getStringValue());
}
pack();
}
COM: <s> sets the global appearence of the window depending on the attribute </s>
|
funcom_train/31456530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
try {
UpdateStatistics stats = isle.getPopulationRI().getStatisticsRI();
if ( stats == null )
return;
long now = stats.getUpdateCnt();
long ts = isle.getTimestamp();
if ( ts > lastTimestamp ) {
lastUpdate = now;
lastTimestamp = ts;
refreshAll();
}
else if ( now > lastUpdate ) {
lastUpdate = now;
refresh();
}
} catch (RemoteException re) {
Log.exception(Log.WARNING, "failed to get update count from isle ", re);
}
}
COM: <s> threads main method </s>
|
funcom_train/25476981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setButtonBounds(final int item, final int x, final int y, final int width, final int height) {
switch (item) {
case SettingsView.ITEM_BUTTON_SAVE:
buttonSave.setBounds(x, y, width, height);
case SettingsView.ITEM_BUTTON_ABORT:
buttonAbort.setBounds(x, y, width, height);
}
}
COM: <s> sets the bounds of the button </s>
|
funcom_train/21173593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int selectLastFontSizeChoice(JComboBox sizeBox) {
// Select the last item and click the OK button. Then verify that the font size is as expected
int lastIndex = sizeBox.getItemCount()-1;
float newSize = Float.valueOf ((String) sizeBox.getItemAt(lastIndex));
sizeBox.setSelectedIndex(lastIndex);
return (int) newSize;
}
COM: <s> selects the last choice in the jcombo box representing the font size </s>
|
funcom_train/4732342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getEstimation(){
//double rez = -2 *(int)m_centre;
float rez = 0;
int count = 0;
for(int i = 0; i < m_size * 4; i++)
if(area(i))
{
rez += UN(m_array[i].m_blue);
count++;
}
rez = rez / (count);
return rez;
}
COM: <s> get estimation of central pixel </s>
|
funcom_train/40062475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DoubleExpression getFormulaWeight(ExpressionBuilder builder, Weights weights) {
builder.expr(weights.getWeights());
builder.intAttribute("formulas", "index").doubleArrayElement();
builder.doubleAttribute("formulas", "scale").doubleTimes();
return builder.getDouble();
}
COM: <s> returns an expression that represents the weight of the current ground formula </s>
|
funcom_train/7720259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFetchSize(int rows) throws SQLException {
if(rows > stmt.getMaxRows()) {
throw new SQLException("Cannot set fetch size. Statement's maximum is " + stmt.getMaxRows() + ".");
}
if(rows < 0) {
throw new SQLException("Cannot set fetch size. Minimum value is 0.");
}
fetchSize = rows;
}
COM: <s> sets the result sets fetch size </s>
|
funcom_train/12842431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getOutputSuffix() {
/*if(zipFormatButton.getSelection()) {
return ".zip"; //$NON-NLS-1$
} else if(compressContentsCheckbox.getSelection()) {
return ".tar.gz"; //$NON-NLS-1$
} else {
return ".tar"; //$NON-NLS-1$
}*/
return ".xpi";
}
COM: <s> answer the suffix that files exported from this wizard should have </s>
|
funcom_train/17769109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isOutOfBounds() {
Dimension d = panel.getSize();
if (get_X() < 0) {
return true;
}
if (get_X() > d.width) {
return true;
}
if (get_Y() < 0) {
return true;
}
if (get_Y() > d.height) {
return true;
}
return false;
}
COM: <s> indicates if the bullet is out of the panels bounds or not </s>
|
funcom_train/14242376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getContents() {
if (getLayer() != null ) {
return getLayer().getContents();
} else {
Editor _editor = Globals.curEditor();
Layer lay = _editor.getLayerManager().getActiveLayer();
Vector contents = lay.getContents();
return contents;
}
}
COM: <s> get the vector of all figures that are shown in </s>
|
funcom_train/13246436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hyperlinkUpdate(HyperlinkEvent e) {
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
try {
((JEditorPane) e.getSource()).setPage(e.getURL());
} catch (IOException excep) {
//do nothing
}
}
}
COM: <s> called when a hypertext link is updated from a code jeditor pane code </s>
|
funcom_train/14598313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StringBuffer reverseDomain(StringBuffer buf) {
buf.reverse();
final int length = buf.length();
int count = length;
int end = count;
while (count-- > -1) {
if (count == -1 || buf.charAt(count) == '.') {
reverseSubstring(buf, count + 1, end);
end = count;
}
}
return buf;
}
COM: <s> reverses the order of the labels in a host name fragment </s>
|
funcom_train/4306712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawRotatedImage(CoreImage image, int x, int y, int w, int h, int angle) {
if (image != null) {
drawRotatedImage(image, x, y, w, h, CoreMath.cos(angle), CoreMath.sin(angle),
0, 0, image.getWidth(), image.getHeight());
}
}
COM: <s> draws a rotated and scaled image </s>
|
funcom_train/10002671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class load (String name, byte [] data, boolean resolve) {
Class klass = defineClass (name, data, 0, data.length);
if (resolve) resolveClass (klass);
//System.out.println("caching: " + name);
classes.put (name, klass);
return klass;
}
COM: <s> load class file data into namespace of this class loader </s>
|
funcom_train/37123571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnName(int column) {
switch (column) {
case 0:
return Message.getInstance().getMessage(Batavia.getLocale(), "string.name", "Name");
case 1:
return Message.getInstance().getMessage(Batavia.getLocale(), "string.version", "Version");
}
return "???";
}
COM: <s> gets the column name attribute of the new plugin table model object </s>
|
funcom_train/10618197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int dragOver(int x, int y, int userAction, int sourceActions) {
DropTargetDragEvent e = new DropTargetDragEvent(
context, new Point(x, y),
WinDragSource.getDndActions(userAction),
WinDragSource.getDndActions(sourceActions));
return dispatchEvent(e, DRAG_OVER);
}
COM: <s> called from native method win drop target drag over </s>
|
funcom_train/41266321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Catvtapro entity) {
EntityManagerHelper
.log("deleting Catvtapro instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(Catvtapro.class,
entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent catvtapro entity </s>
|
funcom_train/23393989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAtomPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StateOfWorld_atom_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StateOfWorld_atom_feature", "_UI_StateOfWorld_type"),
ActionPackage.Literals.STATE_OF_WORLD__ATOM,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the atom feature </s>
|
funcom_train/26228237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void genCode(GenerationContext context, int start, int end) {
CodeSequence code = context.getCodeSequence();
setLineNumber(code);
int catchPC;
catchPC = code.getPC();
exception.genStore(context);
body.genCode(context);
code.addExceptionHandler(start,
end,
catchPC,
exception.getType().getCClass().getQualifiedName());
}
COM: <s> generates bytecode for the exception handler </s>
|
funcom_train/50076427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getId() {
if (archElement == null) return null;
switch (sofaaElementConstant) {
case SofaaConstants.TYPE_INSTANCE:
return ((IArchInstance) archElement).getId();
case SofaaConstants.TYPE_STRUCTURE:
return ((IArchStructure) archElement).getId();
default:
return null;
}
}
COM: <s> gives the id of the underlying architecture </s>
|
funcom_train/27789764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JField (int type, boolean multiValue, boolean useInIndex, String[] enumValues, String fieldIOClassName, FieldName[] names) {
this(DataAccess.NULL_ID, type, multiValue, useInIndex, enumValues, fieldIOClassName, false, names);
}
COM: <s> creates new field object to be stored into the data base </s>
|
funcom_train/9918589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVecParameter(String param, float x, float y, float z) {
CGparameter p = CgGL.cgGetNamedEffectParameter(effect, param);
if (p != null)
CgGL.cgSetParameter3f(p, x, y, z);
else
System.err.println("GLCgFXEffect: param3f is null");
}
COM: <s> sets the vec3 parameter with name to the given values </s>
|
funcom_train/48335592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCurrentJPFdir(List<File> jpfDirs){
File dir = new File(System.getProperty("user.dir"));
while (dir != null) {
File jpfProp = new File(dir, "jpf.properties");
if (jpfProp.isFile()) {
registerJPFdir(jpfDirs, dir);
return;
}
dir = getParentFile(dir);
}
}
COM: <s> add the current dir to the list of jpf components </s>
|
funcom_train/18436214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetSeriesToolTipGenerator() {
XYPlot plot = (XYPlot) this.chart.getPlot();
XYItemRenderer renderer = plot.getRenderer();
StandardXYToolTipGenerator tt = new StandardXYToolTipGenerator();
renderer.setSeriesToolTipGenerator(0, tt);
XYToolTipGenerator tt2 = renderer.getToolTipGenerator(0, 0,
false);
assertTrue(tt2 == tt);
}
COM: <s> check that setting a tool tip generator for a series does override the </s>
|
funcom_train/12803769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeJnlpFiles( File aDirectory ) {
File[] theFiles = aDirectory.listFiles( new FilenameFilter() {
public boolean accept(File arg0, String arg1) {
return arg1.endsWith(".jnlp");
}
});
// handle no files found
if ( theFiles == null ) {
return ;
}
// loop through the files and delete them...
for ( int index = 0;index < theFiles.length;index++ ) {
File theFile = theFiles[index];
theFile.delete();
}
}
COM: <s> remove any jnlp files as they are no longer valid </s>
|
funcom_train/30006310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(TestSequence father, TestBase child) throws NoProjectException {
if (MainController.getInstance().isProjectLoaded()) {
if (father != null && child != null) {
return father.add(child);
}
else {
throw new NullPointerException("Arguments 'father' or 'child' are empty.");
}
}
else {
throw new NoProjectException("No project opened.");
}
}
COM: <s> add a new test base element </s>
|
funcom_train/41150437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getValues(double[] values) {
// XXX this is a rather strange method, maybe it should be changed
// into one that returns (using System.arraycopy) the requested values
for (int i = 0; i < m_coord.length; i++) {
values[i] = m_coord[i];
}
}
COM: <s> get the values of the coordinates </s>
|
funcom_train/4237264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetIdOrden() {
System.out.println("getIdOrden");
OrdenPlatilloPK instance = new OrdenPlatilloPK();
instance.setIdOrden(6);
int expResult = 6;
int result = instance.getIdOrden();
assertEquals(expResult, result);
}
COM: <s> test of get id orden method of class data </s>
|
funcom_train/2904477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean addHostPortTag(XMLTag parent, Vector pm){
if((pm!=null) && (pm.size()>0)){
String hostname = (String)pm.remove(0);
if(hostname != null){
XMLTag.addTag(parent, "hostName", hostname);
}
Integer port = (Integer)pm.remove(0);
if(port != null){
XMLTag.addTag(parent, "port", port.toString());
}
if((hostname!=null) && (port!=null) && (port.intValue()>0)){
return true;
}
}
return false;
}
COM: <s> add a host name and port tag </s>
|
funcom_train/4347942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void closeQuietly(HttpURLConnection httpUrlConnection) {
if (httpUrlConnection == null)
return;
try {
httpUrlConnection.disconnect();
} catch (Throwable t) {
if (logger.isLoggable(WARNING))
logger.warning("Unable to disconnect " + httpUrlConnection + ": " + t);
}
}
COM: <s> attempts to cleanly close an </s>
|
funcom_train/5379557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateForDecorationReady(ViewerLabel settings, Object element) {
if(decorator instanceof IColorDecorator){
IColorDecorator colorDecorator = (IColorDecorator) decorator;
settings.setBackground(colorDecorator.decorateBackground(element));
settings.setForeground(colorDecorator.decorateForeground(element));
}
if(decorator instanceof IFontDecorator)
settings.setFont(((IFontDecorator) decorator).decorateFont(element));
}
COM: <s> decoration is ready </s>
|
funcom_train/51611223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String composeMasterId(SimpleNode masterNode) {
if(masterNode==null)
return "0";
SimpleNode parent = (SimpleNode) masterNode.jjtGetParent();
if(parent!=null) {
for(int i=0;i<parent.jjtGetNumChildren();i++) {
if(parent.jjtGetChild(i)==masterNode)
return composeMasterId(parent)+ "_" + i;
}
}
return "0";
}
COM: <s> composes an unique id for master e </s>
|
funcom_train/183003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeExternal(ObjectOutput stream) throws IOException {
/*
* Note - We don't care about the slope calculation at the client
* so I won't be transmitting it.
*/
stream.writeInt(generations.size());
for(int i = 0; i < generations.size(); i++)
{
this.getGeneration(i).writeExternal(stream);
}
}
COM: <s> implemented for externalizable </s>
|
funcom_train/46136816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSection(final Composite parent, final String text, final int numOfColumns) {
WidgetHelper.createNewBlankLabel(parent, numOfColumns);
WidgetHelper.createNewSectionLabel(parent, text, numOfColumns);
WidgetHelper.createNewSeparatorH(parent, numOfColumns);
}
COM: <s> adds the section </s>
|
funcom_train/48266755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(byte[] theBytes, String theAddress, int thePort) {
try {
InetAddress myInetAddress = InetAddress.getByName(theAddress);
send(theBytes, myInetAddress, thePort);
} catch (UnknownHostException e) {
SNetwork.printError("UDPServer.send", "while sending to "
+ theAddress + " " + e);
}
}
COM: <s> send a byte array to a dedicated remote address </s>
|
funcom_train/42134943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getEndTime() {
long startTime = getStartTime();
if (startTime == 0) {
return 0;
}
String end = (String) parameterMap.get(END_TIME);
if (end != null) {
long endTime = Long.valueOf(end).longValue();
if (endTime > startTime) {
return endTime;
}
return startTime;
}
return 0;
}
COM: <s> returns the end time of the stream </s>
|
funcom_train/3785570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Menu makeSubMenu(Menu pm, String sLabel, String sCmd, int shortcut)
{ /* makeSubMenu */
Menu mi= new Menu(sLabel);
if(shortcut!=0)
{
MenuShortcut msc= new MenuShortcut(shortcut);
mi.setShortcut(msc); /* optional shortcut */
}
pm.add(mi);
return(mi);
} /* makeSubMenu */
COM: <s> make sub menu make submenu entry in menu list </s>
|
funcom_train/48142595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModel(int size, double[] _modelX, double[] _modelY) {
modelX = new float[size];
modelY = new float[size];
for (int i = 0; i < _modelX.length; i++)
{ modelX[i] = (float)(_modelX[i]);
modelY[i] = (float)(_modelY[i]);
}
//modelPaint();
redraw();
return;
}
COM: <s> sets the model fit to the data </s>
|
funcom_train/28672790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAliasPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AliasType_alias_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AliasType_alias_feature", "_UI_AliasType_type"),
BeansPackage.Literals.ALIAS_TYPE__ALIAS,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the alias feature </s>
|
funcom_train/46055167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cleanUpCollectedScoData() {
if(scorm_lesson_mode.equals(ScormConstants.SCORM_MODE_BROWSE) || scorm_lesson_mode.equals(ScormConstants.SCORM_MODE_REVIEW)){
String path = FolderConfig.getCanonicalRoot()+"/tmp/"+this.hashCode();
FileUtils.deleteDirsAndFiles( new File(path),true, true);
}
}
COM: <s> in browse or review mode we dont collect sco data </s>
|
funcom_train/10254083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void forget(Xid xid) throws XAException {
/**
* Should this method not attempt to clean up the aborted
* transaction by rolling back or something? Maybe the
* tx manager will already have called rollback() if
* it were necessasry?
*/
validateXid(xid);
if (state != XA_STATE_PREPARED) {
throw new XAException(
"Attempted to forget a XAResource that "
+ "is not in a heuristically completed state");
}
dispose();
state = XA_STATE_INITIAL;
}
COM: <s> the xaresource api spec indicates implies that this is only for </s>
|
funcom_train/32622273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit() throws IndexOutOfBoundsException {
if (index > 0) {
// Swap top and previous stack entries and point to previous
Node[] newenv = (Node[]) trail.get(index-1);
trail.set(index-1, environment);
trail.set(index, newenv);
--index;
} else {
throw new IndexOutOfBoundsException("Underflow of BindingEnvironment");
}
}
COM: <s> forget the previously pushed state but keep the current environment </s>
|
funcom_train/32018792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private JMenuItem getJMenuAnnuler() {
// if (jMenuAnnuler == null) {
// jMenuAnnuler = new JMenuItem("Annuler", new ImageIcon(getClass().getResource("/Icon/back.png")));
// jMenuAnnuler.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Z, InputEvent.CTRL_MASK));
// }
// return jMenuAnnuler;
// }
COM: <s> this method initializes j menu item6 </s>
|
funcom_train/7537820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unread(char c) {
if (c != RubyYaccLexer.EOF) {
unreadBuffer.addTail(c, column, offset);
readHistory.removeTail();
if (readHistory.isEmpty()) {
column = 0;
offset = 0;
}
else {
CharRecord prev = readHistory.getTail();
column = prev.getColumn();
offset = prev.getOffset();
}
}
}
COM: <s> pushes char back onto this source </s>
|
funcom_train/3607691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(char[] cbuf, int off, int len) throws IOException {
IOException exception = null;
for (int i = 0, end = writers_.length; i < end; ++i) {
try {
writers_[i].write(cbuf, off, len);
}
catch (IOException e) {
exception = e;
}
}
if (exception != null) {
throw exception;
}
}
COM: <s> write a portion of an array of characters </s>
|
funcom_train/28298173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkExtension() {
if (getActualFile()==null) return;
String name=getActualFile().getName();
if (!getActualFile().exists() && name.indexOf(".")==-1) {
setActualFile(new File(getActualFile().getPath()+"."+TransBaseSettings.extensionMap[0]));
}
}
COM: <s> if there is no extension the standard map extension is set </s>
|
funcom_train/6460539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDefault (JClass currentClass) throws SchemaException {
// call on each generator
for (int i=0; i < pluginList.size (); i++) {
GeneratorPlugin gen = (GeneratorPlugin)pluginList.elementAt (i);
if (gen.hasDefault ())
gen.getPlugin (currentClass, gen.getDefaultFormatName ()); // add default..
}
}
COM: <s> call each registered generator for the given class </s>
|
funcom_train/41399989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setItems(List<T> list) {
itemList.clear();
itemList.addAll(list);
while (itemList.contains(null)) {
itemList.remove(null);
}
Collections.sort(itemList, comparator);
if (0 < getSize()) {
fireIntervalAdded(this, 0, getSize() - 1);
}
}
COM: <s> sets the items in the model </s>
|
funcom_train/10571209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOr() throws Exception {
String sXpath=getQuery("testOr",0);
String sExpected="<price at=\"val1\">2</price>";
m_xc.selectPath(sXpath);
assertEquals(1,m_xc.getSelectionCount());
m_xc.toNextSelection();
assertEquals(sExpected,m_xc.xmlText());
}
COM: <s> or or price 9 </s>
|
funcom_train/31648300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getURL() {
String server = config.getServer();
if(server == null){
return "jdbc:hsqldb:"+database;
}else{
int port = config.getPort();
if(port == 0) port = this.defaultPort;
return "jdbc:hsqldb:hsql://"+server+":"+port;
}
}
COM: <s> overload this method to provide connection string for hsql </s>
|
funcom_train/3071343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(int minutes) {
while (true) {
if (DEBUG) System.out.println("Go to work");
popmail();
if (DEBUG) System.out.println("Go to sleep");
try {
Thread.sleep(minutes * 1000 * 60);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
COM: <s> runs popmail and sleeps for minutes given </s>
|
funcom_train/7667052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
synchronized (handshaker) {
try {
AccessController.doPrivileged(action, context);
} catch (PrivilegedActionException e) {
// pass exception to HandshakeProtocol
handshaker.delegatedTaskErr = e.getException();
} catch (RuntimeException e) {
// pass exception to HandshakeProtocol
handshaker.delegatedTaskErr = e;
}
}
}
COM: <s> executes delegated task </s>
|
funcom_train/41562608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean intersects (Interval<T> other){
return !this.isEmpty() && !other.isEmpty() &&
(this.contains(other.start, true, true) ||
this.contains(other.end, true, true) ||
other.contains(this.start, true, true) ||
other.contains(this.end, true, true));
}
COM: <s> determines if this interval intersects another </s>
|
funcom_train/32767091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getCurrentMinY() {
if (zoomGridLimitsV.size() == 0) {
if (externalGridLimits == null || externalGridLimits.isSetYmin() == false) {
return getInnerMinY();
} else {
return externalGridLimits.getMinY();
}
} else {
GridLimits gl = (GridLimits) zoomGridLimitsV.lastElement();
if (gl.isSetYmin() == false) {
return getInnerMinY();
}
return gl.getMinY();
}
}
COM: <s> returns the current min y attribute of the function graphs jpanel object </s>
|
funcom_train/22402911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemLoadIndex() {
if (jMenuItemLoadIndex == null) {
jMenuItemLoadIndex = new JMenuItem();
jMenuItemLoadIndex.setText("Load indexations");
jMenuItemLoadIndex.addActionListener(new LoadIndex());
}
return jMenuItemLoadIndex;
}
COM: <s> this method initializes j menu item load index </s>
|
funcom_train/50293100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runMain(java.lang.Class arg1, java.lang.String[] arg2) throws java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.NoSuchMethodException, com.ibm.ivj.util.base.IvjException {}
COM: <s> run main method comment </s>
|
funcom_train/3004270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInt(String key, int def) {
int result = def;
try {
String value = get(key, null);
if (value != null)
result = Integer.parseInt(value);
} catch (NumberFormatException e) {
// Ignoring exception causes specified default to be returned
}
return result;
}
COM: <s> implements the tt get int tt method as per the specification in </s>
|
funcom_train/21316687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
jLabel = new JLabel();
jLabel.setText("C�digo");
jPanel = new JPanel();
jPanel.setLayout(new FlowLayout());
jPanel.add(jLabel, null);
jPanel.add(getFieldCodigo(), null);
jPanel.add(getJButton(), null);
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/3298080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MsnMessage addLine(String line) throws MessageFormatException {
try {
TokenizedLine tokenLine = new TokenizedLine(line);
account = tokenLine.getToken(1);
nick = SpecialCharacters.getInstance()
.decode(tokenLine.getToken(2), true);
super.setRequiredByteInput(Integer.parseInt(tokenLine.getToken(3)));
return this;
} catch (Exception ex) {
throw new MessageFormatException(ex);
}
}
COM: <s> adds a received line to a message </s>
|
funcom_train/47282808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddInput() {
if (mungeStep.canAddInput()) {
InputDescriptor desc = new InputDescriptor("test", Object.class);
MatchMakerEventCounter mml = new MatchMakerEventCounter();
mungeStep.addSPListener(mml);
mungeStep.addInput(desc);
assertEquals("Did not get any events",1,mml.getChildAddedCount());
mungeStep.removeSPListener(mml);
mungeStep.addInput(desc);
assertEquals("Got extra events",1,mml.getAllEventCounts());
}
}
COM: <s> test to ensure that add input adds the munge step ouput and </s>
|
funcom_train/31740317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void leaveGame() {
if (this.game != null) {
try {
this.game.removeGameListener(listener);
while (!KosiRMI.unexportObject(listener, false)) {
Thread.yield();
}
} catch (Exception e) {
CUtilities.handleException(e);
}
}
}
COM: <s> removes the game listener from the game and unexports it </s>
|
funcom_train/43873599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String computeAbsoluteUrl(final Resource relativeResource, final String importUrl) {
final String folder = FilenameUtils.getFullPath(relativeResource.getUri());
// remove '../' & normalize the path.
final String absoluteImportUrl = StringUtils.normalizePath(folder + importUrl);
return absoluteImportUrl;
}
COM: <s> computes absolute url of the imported resource </s>
|