__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/48764167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLocal(String name) {
if (kind == CLASS) {
return false;
}
if ((kind == BLOCK || kind == CODE) &&
(findVariableInThisScope(name) != null || findInThisScope(name) != null)) {
return true;
}
if (outer == null) {
return false;
}
return outer.isLocal(name);
}
COM: <s> returns whether the particular symbol is defined locally </s>
|
funcom_train/1505024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
layout_ = new VLayout(5);
layout_.setWidth100();
layout_.setHeight100();
chatTextBuffer_ = new HashMap<String, String>();
editors_ = new HashMap<String, GEMSEditor>();
createMenuBar();
createMainPanel();
layout_.draw();
//timer to pull information
//this should be changed to a push implementation
Timer t = new Timer() {
public void run() {
refreshChat();
refreshProject();
}
};
t.scheduleRepeating(1000);
}
COM: <s> the init method of the singleton label manager </s>
|
funcom_train/14170590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void scan(FileEntry fe, boolean refresh) {
if (refresh || fe.getContentDigest() == null) {
try {
InputStream is = provider.getContentsOf(fe);
if (is != null) {
getHasher().createHashFor(fe, is);
is.close();
}
} catch (IOException e) {
logger
.warn("Could not scan a file: " + fe.getAbsolutePath(),
e);
}
}
}
COM: <s> scans a single file </s>
|
funcom_train/878341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showHelp(String topic) {
stdout.println();
if (topic.equalsIgnoreCase("magicX")){
hr(locale.translate("magicX"));
stdout.println(locale.translate("magicXDetails"));
} else {
stdout.println( locale.translate("unknownTopic") );
}
stdout.println();
}
COM: <s> show help on a specific topic </s>
|
funcom_train/33406114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createLoadingMessage(final Object parentTreeItem) {
if (loadingTreeItemDecorator != null) {
loadingTreeItemDecorator.decorate(parentTreeItem,
(UIObject) getBindedObject());
} else {
addTreeItem(parentTreeItem, getMessages().loadingMessage(), false);
}
}
COM: <s> create the loading message for the tree item which is loading its child </s>
|
funcom_train/4557585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTurnToMyProfilePage() {
repEng.newStep("1179: My Profile-Turn to My Profile Page");
//1. Log in Magnet Portal
//2. Click Brand Information/My Profile
actionset.goToMyProfile30Page();
//Should Turn to My Profile Page
check.checkElementOnPage("infoForm:Personal_lbl");
check.checkElementOnPage("infoForm:Payment_lbl");
}
COM: <s> 1179 my profile turn to my profile page </s>
|
funcom_train/4464785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void previousHistory() {
try {
// get previous term from History Array
if (historyCtr<=0) return; else historyCtr--;
OWLNamedObject namedObj = historyEntity[historyCtr][0];
OWLOntology histOnt = (OWLOntology) historyEntity[historyCtr][1];
this.traverseHistory(namedObj, histOnt);
// if previous was pressed, next button must be enabled
nextBtn.setEnabled(true);
}
catch (Exception ex) {
ex.printStackTrace();
}
updateButtons();
}
COM: <s> traverse to the previous element in the history </s>
|
funcom_train/29881921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JToggleButton createShowHideZoomSliderButton() {
JToggleButton tJToggleButton = createToolBarToggleButton("V221ZoomSlider.png", "Show/Hide Zoom Slider",false);
tJToggleButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {mOpenPCLViewer.actionShowHideZoomSliderPopup();}
});
return tJToggleButton;
}
COM: <s> show hide zoom slider toolbar button </s>
|
funcom_train/3774434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(byte b[], int off, int len) throws IOException {
if (b == null) {
throw new NullPointerException();
} else {
try {
out.write(b, off, len);
} catch (Exception e) {
e.printStackTrace();
throw new IOException(e.getMessage());
}
}
}
COM: <s> writes code len code bytes from the specified byte array </s>
|
funcom_train/35036365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void togglePaused() {
// Are we downloading?
if (downloader.isDownloading()) {
downloader.stopDownloading();
controller.getUiDelegate().setPauseDisplay(true);
} else {
// Restart the NZB at the head of the queue
// Just wake up the processor, it will start the current NZB
currentNZB = null;
synchronized (this) {
notifyAll();
}
controller.getUiDelegate().setPauseDisplay(false);
}
}
COM: <s> toggle the pause state which is not really paused it stopped or started </s>
|
funcom_train/9277430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCancelRowUpdatesWithoutUpdateXXX() throws SQLException {
createTableT1();
Statement stmt = createStatement(
ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
ResultSet rs = stmt.executeQuery("SELECT * FROM t1");
assertTrue("FAIL - row not found", rs.next());
rs.cancelRowUpdates();
rs.close();
stmt.close();
}
COM: <s> positive test issue cancel row updates without any update xxx </s>
|
funcom_train/48690442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hashAndPrintBdayBits(byte[] identPublicKey) {
DaviesMeyerDESRoque digester = new DaviesMeyerDESRoque();
byte[] hash = null;
byte[] hash2 = null;
try {
digester.doHash(origCert.toByteArray(), roqueCert.toByteArray());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> sends certs to davies meyer des roque object who counts the last ihvs </s>
|
funcom_train/20748040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ISIMetaData previous() {
if (modified==true) throw new RuntimeException("The underlying collection was modified");
if (hits==null) throw new RuntimeException("Read past end of list");
ISIMetaData answer = get(previousItemIndex, false);
findItemsIndex(false);
return answer;
}
COM: <s> return the previous item </s>
|
funcom_train/7680689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setUrlTitle(String url, String title) {
mUrl = url;
mTitle = title;
// While the tab overview is animating or being shown, block changes
// to the title.
if (mAnimationCount == 0 && mTabOverview == null) {
setTitle(buildUrlTitle(url, title));
}
}
COM: <s> sets a title composed of the url and the title string </s>
|
funcom_train/33512127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createInvertedFile() {
System.err.println("Started building the inverted index...");
long beginTimestamp = System.currentTimeMillis();
indexer.createInvertedIndex();
long endTimestamp = System.currentTimeMillis();
System.err.println("Finished building the inverted index...");
double seconds = (endTimestamp - beginTimestamp) / 1000.0d;
System.err.println("Time elapsed for inverted file: " + seconds);
}
COM: <s> building the inverted file </s>
|
funcom_train/27677648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readZeroTerminatedCompressedString( final int length ) {
// Setup the string buffer, we subtract one from the length to exlude
// the zero terminator
// Get the string from the file
final String string = new String(
this.readCompressedCharArray( length - 1 )
);
// Skip the zero termination
this.skipBytes( 1 );
// and return the new string
return string;
}
COM: <s> returns a zero terminated compressed string of the specified length from </s>
|
funcom_train/13244870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertPreparedTab(String title, String id, Component comp) {
super.addTab(title, null, comp, null);
this.setSelectedComponent(comp);
if (id != null && !id.equals(SynProperties.NULL_ID)) {
((Tab) (comp)).setId(id);
tabMap.put(id, comp);
usedIds.add(id);
}
}
COM: <s> use this method only when the tab has already been created </s>
|
funcom_train/47675515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValue(String attrName) {
List<MsgAttribute> l_data = getTableData();
for (MsgAttribute l_iter : l_data) {
if (l_iter.getName().equalsIgnoreCase(attrName)) {
return l_iter.getValue();
}
}
return null;
}
COM: <s> get the value by the name of the msg attribute </s>
|
funcom_train/17136239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigInteger distance(NodeId otherId) {
BigInteger smaller, bigger;
if (bigIntegerId.compareTo(otherId.bigIntegerId) > 0) {
smaller = otherId.bigIntegerId;
bigger = bigIntegerId;
} else {
smaller = bigIntegerId;
bigger = otherId.bigIntegerId;
}
BigInteger d1 = (smaller.add(maxId.subtract(bigger))).add(new BigInteger("1"));
BigInteger d2 = bigger.subtract(smaller);
return (d1.compareTo(d2) < 0) ? d1 : d2;
}
COM: <s> calculate distance on circular field from 0 to 2 128 1 </s>
|
funcom_train/35953686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Delete
public void deleteWitness() {
if ( this.set == null ) {
LOG.info("DELETE ["+this.witness+"]");
this.witnessDao.delete( witness );
} else {
LOG.info("DELETE ["+this.witness+"] from ["+this.set+"]");
this.setDao.deleteWitness(this.set, this.witness);
}
}
COM: <s> delete the specified witness </s>
|
funcom_train/1707661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected WebModel getModel(HttpServletRequest req) {
HttpSession session = req.getSession();
WebModel model = (WebModel) session.getAttribute(Resources.MODEL);
if (model == null) {
model = new WebModel();
session.setAttribute(Resources.MODEL, model);
}
return model;
}
COM: <s> get the model for the session </s>
|
funcom_train/25420408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QueryBuilder newQueryBuilder(IterationContext iterationContext) {
if (iterationContext==null) {
iterationContext = new IterationContext() {
public void onIterationException(Exception ex) {
}
};
}
return getProtocol()!=null? getProtocol().newQueryBuilder(iterationContext, getHostUrl()): null;
}
COM: <s> creates new query builder </s>
|
funcom_train/49456842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void test11_can_augment() throws Exception{
db.enter();
RaciVrt mod = new RaciVrt(db);
assertTrue(mod.can(db, esisId.intValue(), RaciOperation.CAN_AUGMENT));
assertTrue(mod.can(db, guestId.intValue(), RaciOperation.CAN_AUGMENT));
assertFalse(mod.can(db, extenId.intValue(), RaciOperation.CAN_AUGMENT));
db.exit();
}
COM: <s> checks that user esis guest can augment but not user exten </s>
|
funcom_train/31157517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean feed() throws IOException {
if ((numBytesRead = audioIs.read(data)) != -1) { // read all data from file ?
int numBytesRemaining = numBytesRead;
while (numBytesRemaining > 0) {
numBytesRemaining -= line.write(data, 0, numBytesRemaining);
}
return true;
}
return false;
}
COM: <s> makes sure a chunk of bytes is written to soundcard </s>
|
funcom_train/19896690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getJCheckBox() {
if (jCheckBox == null) {
jCheckBox = new JCheckBox();
jCheckBox.setBackground(new Color(51, 204, 0));
jCheckBox.setSize(new Dimension(21, 14));
jCheckBox.setLocation(new Point(37, 78));
}
return jCheckBox;
}
COM: <s> this method initializes j check box </s>
|
funcom_train/36679176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initArea() {
int x = getX() - MENU_ITEM_MARGIN;
int y = getY() - MENU_ITEM_MARGIN;
int maxWidth = getMaxWidth() + MENU_ITEM_MARGIN;
int maxHeight = getMaxHeight() + MENU_ITEM_MARGIN;
setArea(x, y, maxWidth, maxHeight);
}
COM: <s> set the area that this menu items covers </s>
|
funcom_train/44837899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFaculty(Faculty faculty) {
try {
FacultyObject facultyObject = (FacultyObject) faculty;
facultyPK = ((FacultyPK) facultyObject.getPrimaryKey()).id;
this.faculty = faculty;
// EJB container specific
setModified(true);
} catch (Exception ex) {
throw new EJBException("Invalid faculty");
}
}
COM: <s> sets the faculty for this semester </s>
|
funcom_train/19825120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Manifest getManifest() throws IOException {
// TBD: Should recognize entry with lower case?
InputFlow mif = getInputFlow("META-INF/MANIFEST.MF");
if (mif != null) {
return new Manifest(mif.is);
} else {
throw new IOException("Manifest is missing");
}
}
COM: <s> get the manifest for this archive </s>
|
funcom_train/32711496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int content() {
int caracter = FREE;
if (this.animal != null) {
switch (this.animal.getAngle()) {
case 0:
caracter = ANIMAL;
break;
case 90:
caracter = ANIMAL;
break;
case 180:
caracter = ANIMAL;
break;
case 270:
caracter = ANIMAL;
break;
}
} else if (this.obstacle != null) {
if (this.obstacle.getClass().getSimpleName().compareTo("Alimento") == 0)
caracter = FOOD;
else
caracter = OBJECT;
}
else if (this.food != null)
caracter = FOOD;
else
caracter = FREE;
return caracter;
}
COM: <s> returns the terrains content </s>
|
funcom_train/2291611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTimeout(String value) {
try {
setTimeout(Long.parseLong(value));
} catch (Exception e) {
LOG.error(Messages.get().getBundle().key(
Messages.LOG_PARSE_TIMEOUT_FAILED_2,
value,
new Long(DEFAULT_TIMEOUT)), e);
setTimeout(DEFAULT_TIMEOUT);
}
}
COM: <s> sets the timeout to abandon threads indexing a resource as a string </s>
|
funcom_train/5808886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasIpAddrTable() {
// FIXME What should we do if the table had no error but was empty
if (m_ipAddrTable == null) {
log().debug("hasIpAddrTable: No IP interface address table present.");
}
return (m_ipAddrTable != null && !m_ipAddrTable.failed());
}
COM: <s> returns true if the ip interface address table was collected </s>
|
funcom_train/46056217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateFromFormData(HomePageConfig conf){
// save state of each property handler
for (UserPropertyHandler propertyHandler : propertyHandlers) {
CheckBoxElement cbe = getCheckBoxElement(propertyHandler.getName());
conf.setEnabled(propertyHandler.getName(), cbe.isChecked());
}
// add about me text
conf.setTextAboutMe(getWikiMarkupTextAreaElement(TEXTABOUTME_NAME).getValue());
}
COM: <s> update the config object with the data in the form </s>
|
funcom_train/10628814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTestBitNegative2() {
byte aBytes[] = {-1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26};
int aSign = -1;
int number = 45;
BigInteger aNumber = new BigInteger(aSign, aBytes);
assertTrue(!aNumber.testBit(number));
}
COM: <s> test bit int n of a positive n </s>
|
funcom_train/2878508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invoke() {
try {
if (logImpl != null) {
method.invoke(logImpl, params);
}
} catch (Throwable thr) {
if (logImpl != null) {
logImpl.error("Error Invoke LogRequest", thr);
} else {
thr.printStackTrace();
}
}
//logImpl.invoke(method, params);
}
COM: <s> invoke the log method </s>
|
funcom_train/14082966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exiting(String sourceClass, String sourceMethod) {
this.sourceMethod = sourceMethod;
// establish the severity level of this type of log action:
int severity = FINER;
// writes the message to the standard servlet log file:
if (severity >= concern) {
App.context.log(sourceClass + ": " + sourceMethod + ": RETURN");
}
this.sourceMethod = "N/A";
}
COM: <s> log a procedure return </s>
|
funcom_train/44450303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getComment() {
// For some reason long comments are separated into multiple text
// nodes, therefore we just attach them again:
StringBuffer sb = new StringBuffer();
for (int i = 0; i < content().size(); ++i) {
sb.append(((Node)content().get(i)).getText());
}
return sb.toString();
}
COM: <s> returns a string representation of the comments content </s>
|
funcom_train/3363272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String paramString() {
String kitString = (kit != null ?
kit.toString() : "");
String typeHandlersString = (typeHandlers != null ?
typeHandlers.toString() : "");
return super.paramString() +
",kit=" + kitString +
",typeHandlers=" + typeHandlersString;
}
COM: <s> returns a string representation of this code jeditor pane code </s>
|
funcom_train/34134340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove( String value) {
if (DEBUG) System.out.println( "PropertyList.remove( "+value+") ["+name+"]");
if ( value != null && value.length() > 0) {
for( int i = 0; i < entries.size(); i++) {
if ( ((String)entries.elementAt(i)).equals( value)) {
entries.removeElementAt( i);
return;
}
}
}
}
COM: <s> removes a value from the list </s>
|
funcom_train/33428480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void accelerate(float accelerationX, float accelerationY, float terminalVelocityX, float terminalVelocityY) {
_stopAtTerminalVelocity = true;
_terminalVelocityX = terminalVelocityX;
_terminalVelocityY = terminalVelocityY;
_accelerationX += accelerationX;
_accelerationY += accelerationY;
_triggeredReachTerminalVelocityX = false;
_triggeredReachTerminalVelocityY = false;
setLastUpdate();
}
COM: <s> accelerates a sprite note that this is relative to current acceleration </s>
|
funcom_train/12923236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SymbolClass add(final int uid, final String aString) {
if ((uid < 1) || (uid > Coder.USHORT_MAX)) {
throw new IllegalArgumentRangeException(
1, Coder.USHORT_MAX, uid);
}
if (aString == null || aString.length() == 0) {
throw new IllegalArgumentException();
}
objects.put(uid, aString);
return this;
}
COM: <s> add a mapping for a unique identifier to an actionscript 3 class </s>
|
funcom_train/43653587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void logException(java.lang.Exception e) {
ToolsLog log = new ToolsLog(getClass());
LogLevel level = LogLevel.ERROR;
if (getPriority() != null) {
level = (LogLevel)LogLevel.toLevel(getPriority());
}
log.log(level, "logException", e);
setPriority(null);
}
COM: <s> logs the exception in the tools log </s>
|
funcom_train/13999259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPPreview() {
if (pPreview == null) {
pPreview = PreviewPanel.newPreviewPanel();
pPreview.setLayout(new GridBagLayout());
pPreview.setBorder(BorderFactory.createTitledBorder(null,
Messages.getString("ExportResults.Preview"), TitledBorder.DEFAULT_JUSTIFICATION, //$NON-NLS-1$
TitledBorder.DEFAULT_POSITION, new Font("Dialog", //$NON-NLS-1$
Font.BOLD, 12), new Color(51, 51, 51)));
}
return pPreview;
}
COM: <s> this method initializes p preview </s>
|
funcom_train/25310088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Dictionary copyDictionary(Dictionary item) {
Dictionary dico = new Dictionary();
dico.setName(item.getName());
dico.setDescription(item.getDescription());
dico.setId(item.getId());
dico.setConceptTemplate(item.getConceptTemplate());
dico.setConcepts(item.getConcepts());
return dico;
}
COM: <s> create a new dictionary object from the given dictionary </s>
|
funcom_train/11023790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTransformWithNestedProperty() {
BeanToPropertyValueTransformer transformer =
new BeanToPropertyValueTransformer("anotherNested.stringProperty");
TestBean testBean = new TestBean();
TestBean nestedBean = new TestBean("foo");
testBean.setAnotherNested(nestedBean);
assertEquals("foo", transformer.transform(testBean));
}
COM: <s> test transform with nested property </s>
|
funcom_train/3315088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ListsBackedMap (List<K> keys, List<V> valueList) {
ObjectProxy.assertNotNull(keys);
ObjectProxy.assertNotNull(valueList);
this.keys = keys;
this.valueList = valueList;
this.defined = new BitSet(valueList.size());
defined.set(0,valueList.size());
}
COM: <s> constructs a new lists backed map </s>
|
funcom_train/24476163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServiceBean getBean(String serviceName) throws GfacGUIException{
try {
// To Get HostBean Object
return (ServiceBean)infoUtils.getBeanObjectInfo(super.getContext().getRegService(), serviceName, this);
} catch (Exception e) {
logger.severe(e.getLocalizedMessage());
super.setErrorString(e.getLocalizedMessage());
throw new GfacGUIException(e);
}
}
COM: <s> get service object to use for edit </s>
|
funcom_train/9494062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkSufficientData(final RealMatrix matrix) {
int nRows = matrix.getRowDimension();
int nCols = matrix.getColumnDimension();
if (nRows < 2 || nCols < 2) {
throw MathRuntimeException.createIllegalArgumentException(
"insufficient data: only {0} rows and {1} columns.",
nRows, nCols);
}
}
COM: <s> throws illegal argument exception of the matrix does not have at least </s>
|
funcom_train/12071298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEmpty () {
RealTBNode n = this;
// for nodes like (NP (-NONE- *)), we want NP to be considered empty
while (n != null && n.children.size() == 1) {
n = (RealTBNode) n.children.get(0);
}
return n != null && n.label.toString().equals(NONE_STRING);
}
COM: <s> true if the constituent is empty that is if if is a </s>
|
funcom_train/6260477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean lookup(RefObject ge, RefObject desiredObject) {
if (ge == desiredObject) {
return true;
}
List col = ((GeneralizableElement)ge).getSupertypes();
for (Iterator i = col.iterator(); i.hasNext(); ) {
RefObject rc = (RefObject)i.next();
if (lookup(rc, desiredObject)) {
return true;
}
}
return false;
}
COM: <s> returns true if ge object has one of its supertype </s>
|
funcom_train/29691175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getJTextArea() {
if (jTextArea == null) {
jTextArea = new JTextArea();
jTextArea.setText("About");
jTextArea.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 14));
jTextArea.setBounds(new Rectangle(114, 13, 41, 19));
jTextArea.setEditable(false);
}
return jTextArea;
}
COM: <s> this method initializes j text area </s>
|
funcom_train/8483849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ATObject meta_eval(ATContext ctx) throws InterpreterException {
NATTable evaluatedArgs = Evaluator.evaluateArguments(arguments_.asNativeTable(), ctx);
ATObject annotations = annotations_.meta_eval(ctx);
ATMessage msg = this.createMessage(ctx,
selector_,
evaluatedArgs,
(annotations.isTable()) ? annotations.asTable() : NATTable.of(annotations));
// make the first-class message object inherit its source location from this AST node
msg.impl_setLocation(this.impl_getLocation());
return msg;
}
COM: <s> to evaluate a message send transform the selector </s>
|
funcom_train/23453021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWsdlDocumentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_WsdlAtomicProcessGrounding_wsdlDocument_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_WsdlAtomicProcessGrounding_wsdlDocument_feature", "_UI_WsdlAtomicProcessGrounding_type"),
WsdlGroundingPackage.Literals.WSDL_ATOMIC_PROCESS_GROUNDING__WSDL_DOCUMENT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the wsdl document feature </s>
|
funcom_train/39911070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetBilled() {
System.out.println("setBilled");
String billed = "";
timesheet instance = new timesheet();
instance.setBilled(billed);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set billed method of class buissness </s>
|
funcom_train/31140730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String deteleItems(HttpServletRequest r){
/*
MySQLStorage sql = MySQLStorage.getInstance();
sql.Initialize(sqlPath);
// extract search information from request
for(int i=0;i<categories.length;i++){
ArrayList deleteArr = new ArrayList();
for(int j=0;j<categories[i].getHeader().length;j++){
String param = r.getParameter(i+"_"+j);
if(param != null){
// delete it
}
}
}
*/
return "Deletion not yet implemented";
}
COM: <s> deletes items specified as parameters in the httpservletrequest </s>
|
funcom_train/17141621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void elementalToSemantic() {
if (!isSparse) {
logger.warning("Tried to transform an elemental vector which is not in fact elemental."
+ "This may be a programming error.");
return;
}
votingRecord = new ArrayList<OpenBitSet>();
votingRecord.add((OpenBitSet) bitSet.clone());
tempSet = new OpenBitSet(dimension);
isSparse = false;
}
COM: <s> automatically translate elemental vector no storage capacity into </s>
|
funcom_train/11740463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateCanMap() {
if (relationship.getSourceEntity() == null) {
throw new CayenneRuntimeException(
"Can't map relationship without source entity.");
}
if (getStartEntity() == null) {
throw new CayenneRuntimeException(
"Can't map relationship without source DbEntity.");
}
}
COM: <s> checks if the entity can be edited with this inspector </s>
|
funcom_train/37893160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatch(ChibaEvent event) throws XFormsException {
if (event.getEventName().equalsIgnoreCase("http-request")) {
HttpServletRequest request = (HttpServletRequest) event.getContextInfo();
getHttpRequestHandler().handleRequest(request);
}
else {
LOGGER.warn("ignoring unknown event '" + event.getEventName() + "'");
}
}
COM: <s> servlet adapter knows and executes only one chiba event http request </s>
|
funcom_train/12191436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map buildGenericMap(GenericHandler handler) {
Map result = new HashMap();
for (int i = 0; i < handler.sizeReportList(); i++) {
GenericHandlerParam param = handler.getGenericHandlerParam(i);
if (param != null) {
result.put(param.getName(), param.getValue());
}
}
return result;
}
COM: <s> build a map from the generic parameters in the generic handler </s>
|
funcom_train/3289804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flushCache(String key) {
// remove from cache
cache.remove(key);
// not get module sessions and forget the session
sessions s=(sessions)mmb.getModule("SESSION");
if (s!=null) {
// session module found ask it to forget
// this sessions
s.forgetSession(key);
}
}
COM: <s> flush caches of the cookie defined user </s>
|
funcom_train/23778825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(BundleContext argContext) throws Exception {
super.start(argContext);
// register images
_sharedImages = new SharedImages();
// create and init model tree
EslinkModel.getInstance();
_registerAdapters();
getLogger().info("Eslink started. $Id: EslinkPlugin.java 110 2010-01-07 21:29:59Z tvater $");
}
COM: <s> this method is called upon plug in activation </s>
|
funcom_train/50084013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isTheSame(IIsotope isotopeOne, IIsotope isotopeTwo) {
if(isotopeOne.getSymbol() != isotopeTwo.getSymbol() )
return false;
if(isotopeOne.getNaturalAbundance() != isotopeTwo.getNaturalAbundance() )
return false;
if(isotopeOne.getExactMass() != isotopeTwo.getExactMass() )
return false;
return true;
}
COM: <s> compare to iisotope </s>
|
funcom_train/44876152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNotEqual() {
ContentDescription cd1 = new ContentDescription("foo/bar/my.properties", sessionCache);
ContentDescription cd2 = new ContentDescription("foo/bar/my2.properties", sessionCache);
assertFalse("Objects that are not equal reported as equal", cd1.equals(cd2));
}
COM: <s> test that verifies that not equal classes arent </s>
|
funcom_train/12112206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC13(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.cancellaCompetenzeJButton_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c13 cancella competenze jbutton </s>
|
funcom_train/12699179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLakeID(String lakeName) throws SQLException, WildDBException
{
int id = -1;
Statement query = dbConnection.createStatement();
String queryString = "SELECT " + ID_COLUMN + " FROM " + LAKE_TABLE + " WHERE " + LAKENAME_COLUMN + " = '" + lakeName + "'";
ResultSet lakes = query.executeQuery(queryString);
if(lakes.next())
id = lakes.getInt(ID_COLUMN);
else
{
throw new WildDBException("Lake '" + lakeName + "' not found in the database.");
}
return id;
COM: <s> returns the lake id for a given lake name </s>
|
funcom_train/12191366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClear() {
GenericCache cache = createTestableGenericCache();
Object value = new Object();
Object key = new Object();
cache.put(key, value);
assertEquals("Should be one entry in the cache", 1, cache.size());
cache.clear();
assertEquals("Should be no entry in the cache", 0, cache.size());
}
COM: <s> test that the cache says it is empty after a clear </s>
|
funcom_train/20273419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean differsFrom(JSType that) {
// if there are no unknowns, just use normal equality.
if (!this.isUnknownType() && !that.isUnknownType()) {
return !this.isEquivalentTo(that);
}
// otherwise, they're different iff one is unknown and the other is not.
return this.isUnknownType() ^ that.isUnknownType();
}
COM: <s> whether this type is meaningfully different from </s>
|
funcom_train/10209840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateSimulationTime() {
simStart = ModelManager.getInstance().getSimulationStartTime();
simEnd = ModelManager.getInstance().getSimulationEndTime();
fullTime = ModelManager.getInstance().getSimulationLength();
// potentially update current event's start if the new starttime
// is greater than the events starttime.
if (currentEvent != null)
setEvent(currentEvent);
this.repaint();
}
COM: <s> updates the worlds simulation time from the internal database </s>
|
funcom_train/18486622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Symbol lookup(int type, String name) {
symbol.type = type;
symbol.name = name;
Symbol sym = (Symbol) symbolTable.get(symbol);
if (sym != null) {
return sym;
}
sym = new Symbol(type, name);
symbolTable.put(sym, sym);
return sym;
}
COM: <s> lookup a symbol in the symbol table </s>
|
funcom_train/49670742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getPluginIcon(final String name, final ClassLoader classLoader) {
if (resourcePool.containsKey(name)) {
return resourcePool.get(name);
}
final Image i = new Image(display, classLoader
.getResourceAsStream("icons/" + name));
resourcePool.put(name, i);
return i;
}
COM: <s> gets icon with plugins classloader </s>
|
funcom_train/35442562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testState18() {
System.out.println("state18");
Partida partida = null;
String traduciendo = "";
Fide instance = new Fide();
int[] expResult = null;
int[] result = instance.state18(partida );
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 state1 method of class controller </s>
|
funcom_train/2859626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
dbdesc = null;
indexMap = null;
dbStopWords = null;
if (header != null)
header.close();
header = null;
if (posting != null)
posting.close();
posting = null;
if (index != null)
index.close();
index = null;
}
COM: <s> close files and release data </s>
|
funcom_train/47103264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadLevels() {
GameWorld g = GameWorld.getInstance();
g.resetCities();
for (int i=0; i<header.getNumberOfLevels(); i++) {
try {
LevelHeader lh = header.getLevelHeader(i);
Level l = new Level(lh);
Constants.debugPrint(l);
g.newCity(lh.getName(), lh.getNumRows(), lh.getNumColumns());
l.load();
levels.add(l);
} catch(src.exceptions.CityNameExistsException e) { }
}
}
COM: <s> loads the levels from the map file </s>
|
funcom_train/27975497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void implClose() {
closing = true;
try {
serverSocket.close();
} catch ( IOException e ) {
System.err.println( "Error closing server socket" );
e.printStackTrace();
return;
}
try {
listener.join();
} catch ( InterruptedException e ) {
System.err.println( "Interrupted while waiting for gate listener to stop" );
e.printStackTrace();
}
}
COM: <s> closes the code gate code </s>
|
funcom_train/8027787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean crosses(Edge edge) {
return getMinIndex() > edge.getMinIndex()
&& getMinIndex() < edge.getMaxIndex()
&& getMaxIndex() > edge.getMaxIndex() ||
edge.getMinIndex() > getMinIndex()
&& edge.getMinIndex() < getMaxIndex()
&& edge.getMaxIndex() > getMaxIndex();
}
COM: <s> checks whether the given edge crosses this edge </s>
|
funcom_train/48269528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Transition doWaitingForApiLoad() {
if (HeadlessApi.isLoaded()) {
return Transition.ACTION_COMPLETE;
}
Timer t = new Timer() {
@Override
public void run() {
runStateMachine(doWaitingForApiLoad());
}
};
t.schedule(250);
return Transition.WAITING;
}
COM: <s> a polling wait for the injected script to load </s>
|
funcom_train/13957660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ERXValidationException createCustomException(EOEnterpriseObject eo, String property, Object value, String method) {
ERXValidationException erv = createException(eo, property, value, ERXValidationException.CustomMethodException);
if (erv != null)
erv.setMethod(method);
return erv;
}
COM: <s> creates a custom validation exception </s>
|
funcom_train/20504383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPerformanceOfBooking() throws Exception {
// setting the expectations.
Booking booking = new Booking();
Performance performance = new Performance();
daoMock.getPerformanceForBooking(booking);
daoMockControl.setReturnValue(performance);
daoMockControl.replay();
// executing the tested method.
Performance result = boxOffice.getPerformanceOfBooking(booking);
// assertions and verifications.
assertSame(performance, result);
daoMockControl.verify();
}
COM: <s> tests the get performance of booking booking method of the box office service </s>
|
funcom_train/28125883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNoDescription() throws Exception {
InputStream is = getClass().getClassLoader().getResourceAsStream
("net/sourceforge/hourglass/framework/sample_no_desc.xml");
ProjectGroup results = _parser.parse(is);
assertEquals(1, results.getProjects().size());
Project p = (Project) results.getProjects().iterator().next();
assertEquals("", p.getDescription());
}
COM: <s> tests that the description field is never null even if its not </s>
|
funcom_train/37446362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPercentageidentity () {
SimilarityResultBean bda = (SimilarityResultBean) this.getObject();
if (bda == null) return "";
String percentage = bda.getPercentage();
if (percentage == null || percentage.trim().length() == 0) {
percentage = "<font color=\"#898989\"> No percentage available </font>";
}
return percentage;
}
COM: <s> send back the percentage identity retrieved in the fasta output file </s>
|
funcom_train/13275006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRoomFloorColoredOrTextured(boolean floorTextureVisible) {
if (this.roomFloorColoredOrTextured != floorTextureVisible) {
this.roomFloorColoredOrTextured = floorTextureVisible;
this.propertyChangeSupport.firePropertyChange(Property.ROOM_FLOOR_COLORED_OR_TEXTURED.name(),
!floorTextureVisible, floorTextureVisible);
}
}
COM: <s> sets whether floor texture is visible in plan or not </s>
|
funcom_train/37435181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InputStream getResource(final String resourceName) throws IOException {
if (debug) {
getListener().debug("Loading resource " + resourceName);
}
synchronized (this) {
final InputStream inputStream = this.getClass().getResourceAsStream(resourceName);
if (inputStream == null) {
throw new IOException("could not find resource " + resourceName);
}
return inputStream;
}
}
COM: <s> returns an input stream to a named resource </s>
|
funcom_train/49757070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDeviceListener(UPBDeviceListenerI theListener, UPBDeviceI forDevice) {
synchronized(deviceListenerList) {
for (QualifiedDeviceListener deviceListener: deviceListenerList) {
if (deviceListener.theListener != theListener) continue;
if (deviceListener.theDevice != forDevice) continue;
// Listener already exists
return;
}
deviceListenerList.add(new QualifiedDeviceListener(theListener, forDevice));
}
}
COM: <s> add a upb device listener for a specific device </s>
|
funcom_train/43231042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillTaskTables() {
final List<Task> allTasks = this.sprint.getSprintBacklog().getTasks();
Collections.sort(allTasks, new Comparator<Task>() {
@Override
public int compare(final Task o1, final Task o2) {
return o1.getName().compareTo(o2.getName());
}
});
this.fillOpenTaskTable(allTasks);
this.fillInProgressTaskTable(allTasks);
this.fillDoneTaskTable(allTasks);
}
COM: <s> this method is needed to fill the tables of the taskboard </s>
|
funcom_train/3399271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String requireArgument(String optionName, String[] args, int i) throws BadCommandLineException {
if (i == args.length || args[i].startsWith("-")) {
throw new BadCommandLineException(
Messages.format(Messages.MISSING_OPERAND,optionName));
}
return args[i];
}
COM: <s> obtains an operand and reports an error if its not there </s>
|
funcom_train/20598926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result attachToTab() throws AttachmentFailureException, MethodIsBlockingException {
boolean res = attachState.compareAndSet(null, AttachState.ATTACHING);
if (!res) {
throw new AttachmentFailureException("Illegal state", null);
}
String command = V8DebuggerToolMessageFactory.attach();
Result attachResult = sendSimpleCommandSync(attachCallback, command);
debugSession.startCommunication();
return attachResult;
}
COM: <s> attaches the remote debugger to the associated browser tab </s>
|
funcom_train/10188284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getSubstPanelLabel() {
if (SubstPanelLabel == null) {
SubstLabel = new JLabel();
SubstLabel.setText("Subst");
SubstLabel.setHorizontalAlignment(SwingConstants.CENTER);
SubstPanelLabel = new JPanel();
SubstPanelLabel.setLayout(new GridBagLayout());
SubstPanelLabel.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
SubstPanelLabel.add(SubstLabel, new GridBagConstraints());
}
return SubstPanelLabel;
}
COM: <s> this method initializes subst panel label </s>
|
funcom_train/28343871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void synchronizeAcceleratorSeq() throws LatticeError {
checkLattice();
MPXStopWatch.timeElapsed("...xal.model.Scenario.resync():begin! ");
try {
scenario.resync();
} catch (SynchronizationException e) {
System.out.println(e);
throw new LatticeError("SynchronizationException during resync");
}
MPXStopWatch.timeElapsed("...xal.model.Scenario.resync():end! ");
notifyListeners(ModelProxyListener.SEQUENCE_CHANGED);
}
COM: <s> synchronize the model with according to current sync mode </s>
|
funcom_train/33512283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeUnary(int n) {
byte mask = 1;
//write n-1 ones
for (int i=0; i<n-1; i++) {
buffer |= (mask << bitOffset);
bitOffset++;
if (bitOffset == 8) {
bitOffset = 0;
byteOffset++;
outBuffer.write(buffer);
buffer = 0;
}
}
//and end with 1 zero
bitOffset++;
if (bitOffset == 8) {
bitOffset = 0;
byteOffset++;
outBuffer.write(buffer);
buffer = 0;
}
}
COM: <s> writes a unary integer to the buffer </s>
|
funcom_train/16564902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BursaWolfParameters getBursaWolfParameters(GeodeticDatum Datum) {
BursaWolfParameters parameters = new BursaWolfParameters(Datum);
parameters.dx = dx;
parameters.dy = dy;
parameters.dz = dz;
parameters.ex = -radiansToSeconds(alfa);
parameters.ey = -radiansToSeconds(beta);
parameters.ez = -radiansToSeconds(gamma);
parameters.ppm = (q - 1) * 1000000;
return parameters;
}
COM: <s> returns bursa wolf transformation parameters </s>
|
funcom_train/42134863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSender(String streamId, RecordNetworkTransport netTrans) {
RecordListener listener = new RecordListener(netTrans, archiveMgr);
logger.debug("Record_Session_Manager: Adding listener for setup");
logger.debug("Record_Session_Manager::addSender streamId " + streamId);
listenMap.put(streamId, listener);
}
COM: <s> add a stream to the recording </s>
|
funcom_train/9706617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InputStream getInputStream(URLConnection urlCon) throws Exception {
final URLConnection finalURLCon = urlCon;
InputStream is = null;
try {
is = (InputStream) AccessController.doPrivileged(
new PrivilegedExceptionAction() {
public Object run() throws IOException {
return finalURLCon.getInputStream();
}
});
}
catch(PrivilegedActionException e) {
throw e.getException();
}
return is;
}
COM: <s> this method provides a java2 security compliant way to obtain the input stream </s>
|
funcom_train/25648239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isTransitionEnabled(Transition tran, StateMachine sm) {
boolean result = true;
// implicit loopback's are enabled
if (tran != null) {
List<GuardCondition> gList = tran.getGuardConditions();
for (GuardCondition gc : gList) {
if (!gc.check(sm.getExecutionContext())) {
result = false;
break;
}
}
}
return result;
}
COM: <s> check if transition is enabled in given context </s>
|
funcom_train/21180574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pass1() {
java.util.Vector nodes1 = new java.util.Vector();
//System.out.println("------- Dfs.process");
//g.print();
java.util.Iterator iter1 = g.forAllNodes();
while (iter1.hasNext())
nodes1.add(iter1.next());
dfs(nodes1);
setRoot();
}
COM: <s> perform the depth first search </s>
|
funcom_train/39107274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private HTMLHeadElementVector getInstitutionalStylesheet() {
HTMLHeadElementVector hev = new HTMLHeadElementVector();
String css = userData.getUserDetails().getInst().css();
if (css != null) {
HTMLHeadLink sss = new HTMLHeadLink(css, "stylesheet");
sss.setTYPE("text/css");
hev.addElement(sss);
}
return hev;
}
COM: <s> gets the css defined in institutions </s>
|
funcom_train/48526083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isFile(File parent, String name) {
// return (((getPrefix(parent).length() + name.length()) >= factory.getIdToStringLength()) && (! name.equals(METADATA_FILENAME)));
return ((! new File(parent, name).isDirectory()) && (! name.equals(METADATA_FILENAME)));
}
COM: <s> returns whether or not the given filename represents a stored file </s>
|
funcom_train/4973109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String shapeCacheKey(String filename){
int sep = filename.lastIndexOf(File.separator);
if(sep > -1){
return filename.substring(sep + 1);
} else {
sep = filename.lastIndexOf("/");// zip files use '/'
if(sep > -1){
return filename.substring(sep + 1);
}
}
return filename;
}
COM: <s> returns the cache key for this shape </s>
|
funcom_train/40525655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFact(Expression e, Fact fact) {
// Recursively fold e, since that is how the optimizer will compare it.
// This has the side effect of turning complex expressions like (1/0),
// (0/0), and (-0) into NumberLiterals.
addFactInt(rfold(e, false), fact);
}
COM: <s> adds a fact about the environment to the knowledge base and adds facts </s>
|
funcom_train/45598675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element getResource(String id, String src, boolean parse) {
Element res = xml.createElement("res");
res.setAttribute("id", id);
res.setAttribute("src", src);
if (parse)
res.setAttribute("parse", "yes");
return res;
}
COM: <s> gets the resource element for the specified fields </s>
|
funcom_train/16464759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void show_newKActionLeaveForm(Object keywordList) {
Keyword keyword = getKeyword(getSelectedItem(keywordList));
showGroupSelecter(keyword, InternationalisationUtils.getI18NString(COMMON_KEYWORD) + " \"" + keyword.getKeyword() + "\" " + InternationalisationUtils.getI18NString(COMMON_AUTO_LEAVE_GROUP) + ":", "do_newKActionLeave(groupSelecter, groupSelecter_groupList)");
}
COM: <s> shows the new leave group action dialog </s>
|
funcom_train/42761495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void countNumCols() {
int maxAttribute=0;
// Loop through data array
for(int index=0;index<dataArray.length;index++) {
int lastIndex = dataArray[index].length-1;
if (dataArray[index][lastIndex] > maxAttribute)
maxAttribute = dataArray[index][lastIndex];
}
numCols = maxAttribute;
numOneItemSets = numCols; // default value only
}
COM: <s> counts number of columns represented by input data </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.