__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/42110223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int recurseHeight(int start, int[] heightMap, Integer[] worldState) {
if (worldState[start] == 0) {
heightMap[start] = 1;
return 1;
}
int below = worldState[start] - 1;
recurseHeight(below, heightMap, worldState);
heightMap[start] = heightMap[below] + 1;
return heightMap[start];
}
COM: <s> finds the height of a block recursively by following a path </s>
|
funcom_train/40547652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveCallBackListenerChargeListener() throws Exception {
int beforeRemove = _handler.getListenerSize(ChargeNotificationEvent.class);
_handler.removeCallBackListener(_chargeHandler);
int afterRemove = _handler.getListenerSize(ChargeNotificationEvent.class);
assertEquals(beforeRemove - 1, afterRemove);
}
COM: <s> the b test remove call back listener charge listener b method removes a </s>
|
funcom_train/29270970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPrint() throws Exception {
String address = getAddress();
InputSource isource = new InputSource(new StringReader(address));
isource.setSystemId("testPrint.xml");
Address addr = AddressPrinter.getAddress(isource);
JAXBContext context = JAXBContext.newInstance("org.apache.ws.jaxme.test.misc.address");
StringWriter sw = new StringWriter();
Marshaller m = context.createMarshaller();
m.setProperty(JMMarshallerImpl.JAXME_XML_DECLARATION, Boolean.FALSE);
m.marshal(addr, sw);
sw.close();
String got = sw.toString();
assertEquals(address, got);
}
COM: <s> tests unmarshalling a string into t jax me object </s>
|
funcom_train/35541400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String cleanLine(final String line) {
String cleanedLine = extendedCleanLine(line);
/* Replace long separator forms */
cleanedLine = cleanedLine.replace(", ", " ").replace("; ", " ");
/* Right trim, no need to over burden the lexer with spaces */
cleanedLine = ("a" + cleanedLine).trim().substring(1);
return cleanedLine;
}
COM: <s> remove characters that should not be passed to the lexer </s>
|
funcom_train/2290552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CmsPublishManager getPublishManager() {
if (m_publishManager == null) {
// no publish manager configured, create default
m_publishManager = new CmsPublishManager(
CmsPublishManager.DEFAULT_HISTORY_SIZE,
CmsPublishManager.DEFAULT_QUEUE_PERSISTANCE,
CmsPublishManager.DEFAULT_QUEUE_SHUTDOWNTIME);
}
return m_publishManager;
}
COM: <s> returns the configured publish manager </s>
|
funcom_train/41759114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Spacer getSpacer() {
if (spacer == null) {//GEN-END:|69-getter|0|69-preInit
// write pre-init user code here
spacer = new Spacer(30, 20);//GEN-LINE:|69-getter|1|69-postInit
// write post-init user code here
}//GEN-BEGIN:|69-getter|2|
return spacer;
}
COM: <s> returns an initiliazed instance of spacer component </s>
|
funcom_train/46638657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addColumnsIndexesToGroup(String colGroupName, int... bodyColumnIndexs) {
if (nameToColumnGroup.get(colGroupName) == null) {
ColumnGroup group = new ColumnGroup(colGroupName);
nameToColumnGroup.put(colGroupName, group);
}
insertColumnIndexes(colGroupName, bodyColumnIndexs);
notifyListeners();
}
COM: <s> creates the column group if one does not exist with the given name </s>
|
funcom_train/35078908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose() {
this.removeRef();
if(this.refCount()>0)
return;
// if no other object which referenced this font,
// then distroy it:
font.dispose();
((SWTFontFactory)com.crackj2ee.jexi.ui.FontFactory.instance()).remove(this);
}
COM: <s> distroy the font if no other object referenced it </s>
|
funcom_train/42643953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateCurrentAnnotation(Annotation annotation) {
int pageIndex = currentAnnotaiton.getPageIndex();
PageTree pageTree = currentAnnotaiton.getDocument().getPageTree();
Page page = pageTree.getPage(pageIndex, this);
// update the altered annotation.
page.updateAnnotation(annotation);
pageTree.releasePage(page, this);
}
COM: <s> utility to udpate the action annotation when changes have been made to </s>
|
funcom_train/10522504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSwapHeaderStrings() throws Exception {
String header1 = "foo";
String header2 = "bar";
StringHolder h1 = new StringHolder(header1);
StringHolder h2 = new StringHolder(header2);
client.swapHeaderStrings(h1, h2);
assertEquals(header2, h1.value);
assertEquals(header1, h2.value);
}
COM: <s> test swapping header values </s>
|
funcom_train/19381667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void highlightRow(JTable table, int row, int column) {
Rectangle cell = table.getCellRect(row, column, true);
Point p = new Point(cell.x, cell.y);
// Programatically scroll tables horizontally
headScroll.getModel().setValue(p.x);
// Programatically scroll tables vertically
scrollPanel.scrollRectToVisible(cell);
// programatically highlight the row
table.setRowSelectionInterval(row, row);
}
COM: <s> this method highlights a row in the list of games </s>
|
funcom_train/9645931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char getMnem(String key) {
String s;
try {
s = resource.getString(key + ".mnem");
} catch (MissingResourceException e) {
s = null;
}
return (s == null || s.length() == 0) ? '\0' : s.charAt(0);
}
COM: <s> get a mnemonic from the resource bundle </s>
|
funcom_train/43245037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEmergencyResponseOptions() throws Exception {
System.out.println("getEmergencyResponseOptions");
String securitytoken = secToken;
org.vistaoutreach.voe.refdata.ws.RefDataServicesImpl instance = new org.vistaoutreach.voe.refdata.ws.RefDataServicesImpl();
String[] expResult = null;
String[] result = instance.getEmergencyResponseOptions(securitytoken);
assertTrue(result.length>0);
}
COM: <s> test of get emergency response options method of class org </s>
|
funcom_train/37564610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setResponse(Response response) {
this.response= response;
if (response != null) {
expireTime= null;
String expireStr= response.getHeader("Expires");
if (expireStr != null) {
try {
DateFormat df= DateFormat.getDateInstance(DateFormat.LONG);
Date date= df.parse(expireStr);
expireTime= date;
} catch (Exception e) {
;
}
}
}
}
COM: <s> sets the response for this request record </s>
|
funcom_train/10906438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOutputIntent(PDFOutputIntent outputIntent) {
if (getDocumentSafely().getPDFVersion() >= PDFDocument.PDF_VERSION_1_4) {
PDFArray outputIntents = getOutputIntents();
if (outputIntents == null) {
outputIntents = new PDFArray(this);
put("OutputIntents", outputIntents);
}
outputIntents.add(outputIntent);
}
}
COM: <s> adds an output intent to the pdf </s>
|
funcom_train/47107372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemArmor07() {
JMenuItem menuItem = new JMenuItem();
menuItem.setText(Armor.A_07.getItemName());
menuItem.setEnabled(false);
menuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
controller.setPlrReadiedArmor(Armor.A_07);
}
});
return menuItem;
}
COM: <s> creates the eighth choice for the armor menu </s>
|
funcom_train/50464045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBLXElement(BLXElement blxElement) {
super.setBLXElement(blxElement);
Element noteNode = blxElement.getDataElement();
if(noteNode != null) {
Node _text = noteNode.getFirstChild();
if(_text != null) {
textArea.setText(_text.getNodeValue());
}
}
//Clear the Dirty Flag
setIsDirty(false);
}
COM: <s> set the node on this component </s>
|
funcom_train/29864094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle2D getBounds() {
Point2D pt = (Point2D) getLocation(null).clone();
int width = 24;
int height = 24;
Rectangle2D bounds = new Rectangle2D.Double();
// TODO denne linjen sorger for at det blir ramme rundt porten...
bounds.setFrame(pt.getX() - width / 2, pt.getY() - height / 2, width, height);
return bounds;
}
COM: <s> returns the bounds for the port view </s>
|
funcom_train/1683165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void flushCache() throws IOException {
if (this.cachePosition > 0) {
this.out.writeLine(Integer.toHexString(this.cachePosition));
this.out.write(this.cache, 0, this.cachePosition);
this.out.writeLine("");
this.cachePosition = 0;
}
}
COM: <s> writes the cache out onto the underlying stream </s>
|
funcom_train/25187168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFormat_Object() throws Exception {
System.out.println("format");
Object data = JSONParserLite.parse(new BufferingReader(TesterJSONTest.getSampleSource("sample1.json").getReader()));
String expResult = Formatter.toJSONString(data, false);
String result = JSONFormatterLite.format(data);
assertEquals(expResult, result);
}
COM: <s> test of format method of class jsonformatter lite </s>
|
funcom_train/4965597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void tuneInStation(StationUrl stationUrl) throws IOException, ServiceException {
if(sessionToken == null) {
handshake();
}
doRequest(
RequestType.TUNEIN,
SERVICE_BASEURL +
"radio/" +
"adjust.php" +
"?session=" + sessionToken.getSessionId() +
"&url=" + stationUrl.toString() +
"&debug=0"
);
isTunedIn = true;
}
COM: <s> tunes in a specific radio station </s>
|
funcom_train/44846668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawTiled(Graphics g) {
Dimension d = getSize();
int width = image.getWidth(null);
int height = image.getHeight(null);
for (int x = 0; x < d.width; x += width) {
for (int y = 0; y < d.height; y += height) {
g.drawImage(image, x, y, null, null);
}
}
}
COM: <s> draws the image when tiled has been chosen </s>
|
funcom_train/15867151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateUnit(Object obj, Errors errors) {
String method = "validateUnit(obj, errors)";
if (logger.isDebugEnabled()) {
logger.debug("BEGIN " + method);
}
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "ingredient.unit",
"required", "*");
if (logger.isDebugEnabled()) {
logger.debug(errors.getErrorCount() + "errors found");
logger.debug("END " + method);
}
}
COM: <s> validates the unit of the new ingredient </s>
|
funcom_train/27781411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHTMLRenderer(PanelHTMLRenderer aPanelHTMLRenderer) {
getMainFrame().log(mName + ".setHTMLRenderer() called");
if (aPanelHTMLRenderer != null) {
mPanelHTMLRenderer = aPanelHTMLRenderer;
mPanelResultLister.setHTMLRenderer(mPanelHTMLRenderer);
}
getMainFrame().log(mName + ".setHTMLRenderer() done");
}
COM: <s> sets the h tmlrenderer attribute of the panel main left object </s>
|
funcom_train/17892376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTitle() {
String title;
if (Beans.isDesignTime()) {
title = BeanTest.TITLE_DESIGN;
} else {
title = BeanTest.TITLE_RUNTIME;
}
if (filename != null) {
title += " [" + filename + "]";
}
super.setTitle(title);
}
COM: <s> sets the title of the frame based on the current state </s>
|
funcom_train/1316107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int register(Player p) {
int slot = -1;
// TODO make it so this works better
players.add(p);
slot = p.getIndex();
if(slot != -1) {
logger.info("Registered " + p.getPlayerDetails().getDisplayName() + " [idx="+slot+",online="+players.size()+"]");
p.getFriends().registered();
} else {
logger.info("Could not register " + p.getPlayerDetails().getDisplayName() + " - too many online [online="+players.size()+"]");
}
return slot;
}
COM: <s> register a player </s>
|
funcom_train/39001687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Packet makeRadioPacketLocal(int sizeOfPacket) {
if (sizeOfPacket > maxPayloadLength()) {
sizeOfPacket = maxPayloadLength();
}
Packet p = new Packet();
p.usedLength = (byte) sizeOfPacket;
p.data = new byte[sizeOfPacket];
p.destination = IRadio.AM_BROADCAST_ADDR;
//p.source = nodeAddress();
return p;
}
COM: <s> copied this function from radio class so that </s>
|
funcom_train/26379024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDirectionAsString(int input) {
String[] direction = {" N ", "NNE", "NE ", "ENE",
" E ", "ESE", "SE ", "SSE",
" S ", "SSW", "SW ", "WSW",
" W ", "WNW", "NW ", "NNW" };
input = (input + northOffset ) % 16;
return direction[input];
}
COM: <s> get the wind direction as a string </s>
|
funcom_train/8367845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Paths copyTo (String destDir) throws IOException {
Paths newPaths = new Paths();
for (Path path : paths) {
File destFile = new File(destDir, path.name);
File srcFile = path.file();
if (srcFile.isDirectory()) {
destFile.mkdirs();
} else {
destFile.getParentFile().mkdirs();
copyFile(srcFile, destFile);
}
newPaths.paths.add(new Path(destDir, path.name));
}
return newPaths;
}
COM: <s> copies the files and directories to the specified directory </s>
|
funcom_train/14464163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMergeParent() {
try {
CellRange cr = mycell.getMergeRange();
if (cr==null)return false;
int[] i = cr.getRangeCoords();
if (this.getRowNum()+1 == i[0] && this.getColNum()==i[1])return true;
}catch(Exception e) {return false;}
return false;
}
COM: <s> returns if the cell is the parent cell containing display value </s>
|
funcom_train/13271503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXStart(float xStart) {
if (xStart != this.xStart) {
float oldXStart = this.xStart;
this.xStart = xStart;
clearPointsCache();
this.propertyChangeSupport.firePropertyChange(Property.X_START.name(), oldXStart, xStart);
}
}
COM: <s> sets the start point abscissa of this wall </s>
|
funcom_train/23182487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateAllProjectionsTabs() {
logger.info("updateAllProjectionsTabs() - Entry");
ArrayList<Plotter> plotters = mainGuiController.getCtrlMainFrame().getTabbedPlotter()
.getAllPlotters();
for (Plotter plotter : plotters) {
updateTabSettings(plotter, false);
}
mainGuiController.getMainGuiModel().getVesselObjects().forceUpdateVessels();
logger.info("updateAllProjectionsTabs() - Exit");
}
COM: <s> apply setting and update all projections currently loaded in application </s>
|
funcom_train/19748818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putFieldIndicesInCache(String[] fieldIndices, String fieldIdentifier, String locale, String layoutDefinition, String pageUri) {
putInCache(fieldIndices, fieldIdentifier + "_" + layoutDefinition + "_" + pageUri, locale, FIELD_INDICES_SUFFIX, new String[]{FIELD_INDEXES_GROUP}, PageContext.APPLICATION_SCOPE);
}
COM: <s> puts array of field indices into cache </s>
|
funcom_train/19646068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getLoginOkCommand() {
if (loginOkCommand == null) {//GEN-END:|64-getter|0|64-preInit
// write pre-init user code here
loginOkCommand = new Command("Connect", Command.OK, 0);//GEN-LINE:|64-getter|1|64-postInit
// write post-init user code here
}//GEN-BEGIN:|64-getter|2|
return loginOkCommand;
}
COM: <s> returns an initiliazed instance of login ok command component </s>
|
funcom_train/41331446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uninstallDefaults() {
SeaGlassContext context = getContext(this, ENABLED);
style.uninstallDefaults(context);
context.dispose();
style = null;
JInternalFrame.JDesktopIcon di = frame.getDesktopIcon();
if (di != null && di.getComponentPopupMenu() == systemPopupMenu) {
// Release link to systemMenu from the JInternalFrame
di.setComponentPopupMenu(null);
}
}
COM: <s> uninstall the defaults </s>
|
funcom_train/43094221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setOwnerScope(Object feature, short modifiers) {
if ((modifiers & JavaRecognizer.ACC_STATIC) > 0) {
Model.getCoreHelper().setOwnerScope(feature,
Model.getScopeKind().getClassifier());
} else {
Model.getCoreHelper().setOwnerScope(feature,
Model.getScopeKind().getInstance());
}
}
COM: <s> set the owner scope for a feature </s>
|
funcom_train/16891440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLongDayNames(boolean useLongDayNames) {
DateFormatSymbols symbols = new DateFormatSymbols();
days = symbols.getShortWeekdays();
if (useLongDayNames) {
dayMargin = LONG_DAY_MARGIN;
} else {
dayMargin = SHORT_DAY_MARGIN;
for (int i = 0; i < days.length; i++) {
if (days[i].length() != 0) {
days[i] = days[i].substring(0, 1);
}
}
}
}
COM: <s> configures the calendar to use either short or long day names </s>
|
funcom_train/28977220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String key, Serializable object) throws StoringException {
try {
StorageService service = Configurator.getStorageService();
if(service.hasObject(key)){
logger.debug("key already exist: " + key);
service.removeObject(key);
}
logger.debug("put: " + key);
service.store(key, new StorageObject(object));
}catch (NamingException e) {
throw new StoringException(e);
}
}
COM: <s> add or update this object </s>
|
funcom_train/39049125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addPeriodStructures() {
assert Thread.holdsLock(currentPeriodLock);
currentPeriodEdgeIncrements =
new HashMap<WeightedEdge, Integer>();
periodEdgeIncrementsQueue.add(currentPeriodEdgeIncrements);
currentPeriodConflicts =
new HashMap<Long, Map<Object, Integer>>();
periodConflictQueue.add(currentPeriodConflicts);
}
COM: <s> update our queues for this period </s>
|
funcom_train/49455286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int aggregateCreationSelect(StringBuffer sql, int nIn, String tableAlias) throws SQLException {
final Iterator<AggregatedPositionValue> i = vector.iterator();
int n = nIn;
while (i.hasNext()) {
final AggregatedPositionValue apv = i.next();
n = apv.pvt.aggregateCreationSelect(sql, apv.nIter, n, tableAlias);
}
return n;
}
COM: <s> select a subset of values when doing a join </s>
|
funcom_train/24039015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
Iterator<Integer> it = Sport.nameMap.keySet().iterator();
while (it.hasNext()) {
Integer sportid = it.next();
sportsDisplayed.add(sportid);
addItem(Sport.nameMap.get(sportid));
}
if (displayAllSportsItem)
addItem(dataInterface.getString("st_mi_allsports"));
setSelectedIndex(
Integer.parseInt(dataInterface.getPreference("gui_default_sport"))
);
//Important: Set the listener add the end, or else we already fire an
//event when the index is selected, which, in turn might lead to null
//pointer exceptions etc.
addActionListener(listener);
}
COM: <s> initialize the combo i </s>
|
funcom_train/39174587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessage(SimpleMailMessage msg, String templateName, Map model) {
String result = null;
try {
//the template must be in the classpath
result = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine,
templateName, model);
}
catch(VelocityException e) {
e.printStackTrace();
}
msg.setText(result);
send(msg);
}
COM: <s> send a simple message based on a velocity template </s>
|
funcom_train/34733782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean contentEquals(byte[] content1, byte[] content2) {
// if one content is null, both must be null
if (content1 == null)
return (content2 == null);
// contents must have same length
if (content1.length != content2.length)
return false;
// content elements must be the same
for (int i = 0; i < content1.length; i++)
if (content1[i] != content2[i])
return false;
return true;
}
COM: <s> compare two cv content byte arrays </s>
|
funcom_train/50453315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeAll (ConfigChunkDB db) {
boolean retval = false;
ConfigChunk ch;
ListIterator i = db.chunks.listIterator();
while (i.hasNext()) {
ch = (ConfigChunk)i.next();
retval |= (null != remove (ch));
}
return retval;
}
COM: <s> removes any config chunks in self with the same name as any chunk </s>
|
funcom_train/51638813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isLessThanOperator(IDocument document, int offset) throws BadLocationException {
if (offset < 0) return false;
JavaHeuristicScanner scanner= new JavaHeuristicScanner(document, IJavaPartitions.JAVA_PARTITIONING, TextUtilities.getContentType(document, IJavaPartitions.JAVA_PARTITIONING, offset, false));
return !isTypeParameterBracket(offset, document, scanner);
}
COM: <s> returns true if the character at the specified offset is a </s>
|
funcom_train/46056469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assessmentStarted(UserRequest ureq) {
if (isCollaborationEnabled()) {
// if collab was enabled before, disable it now
fireEvent(ureq, COLLAB_DISABLE_EVENT);
if (InstantMessagingModule.isEnabled())
InstantMessagingModule.getAdapter().disableChat(ureq.getIdentity().getName(), "Working on test (IM disabled)");
}
assessmentCounter++;
}
COM: <s> call this if an assessment was started </s>
|
funcom_train/32823964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createFolders() {
// Generating Dir Structure
IProject project = this.project;
try {
IFolder srcfolder = project.getFolder("src");
if (!srcfolder.exists())
srcfolder.create(true, true, new NullProgressMonitor());
IFolder libfolder = project.getFolder("lib");
if (!libfolder.exists())
libfolder.create(true, true, new NullProgressMonitor());
} catch (Exception ex) {
log.error("GenerateCode",ex);
}
}
COM: <s> this function generates the common folders required in each type of scenario </s>
|
funcom_train/1719166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendTransferEncodingHeader(OutputStream out) throws IOException {
String transferEncoding = getTransferEncoding();
if (transferEncoding != null) {
out.write(CRLF_BYTES);
out.write(CONTENT_TRANSFER_ENCODING_BYTES);
out.write(EncodingUtils.getAsciiBytes(transferEncoding));
}
}
COM: <s> write the content transfer encoding header to the specified </s>
|
funcom_train/19241828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Playlist findPlaylistByName(String name, MediaType type) {
List playlistList = dataStore.getPlaylists();
int index = indexOfPlaylist(name, type, playlistList);
Playlist playlist = null;
if (index >= 0) {
playlist = (Playlist) playlistList.get(index);
}
return playlist;
}
COM: <s> find a playlist given the name </s>
|
funcom_train/48601085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void display() {
String url = "file://" + path + filename + ".html";
err.xmlMessage(WriterXML.MESSAGE, "message:openurl", "", url);
if (!BrowserControl.displayURL(url)) {
err.xmlMessage(WriterXML.ERROR, "error:badbrowser", "");
}
}
COM: <s> displays document in system browser </s>
|
funcom_train/46454548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public boolean propertyIsTypeOf(String _property, String _keyword) {
String info = getPropertyInfo(_property);
if(info==null) {
return false;
}
if(info.toLowerCase().indexOf(_keyword.toLowerCase())>=0) {
return true;
}
return false;
}
COM: <s> returns wether a property information contains a given keyword in its preamble </s>
|
funcom_train/20043428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void keyIntoDoc(){
try {
Robot rob = new Robot();
log.println("try to press 'A'");
rob.keyPress(java.awt.event.KeyEvent.VK_A);
rob.keyRelease(java.awt.event.KeyEvent.VK_A);
} catch (java.awt.AWTException e) {
log.println("couldn't press key");
}
}
COM: <s> this method press the a key </s>
|
funcom_train/18104473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected long doSetMediaTime(long now) throws MediaException {
int milli_now = (int)(now /1000);
if (getState() == STARTED)
doStop();
milli_now = toneCommon(ad, 16, milli_now); // SET_CUR_TIME
if (getState() == STARTED)
doStart();
return (milli_now * 1000L);
}
COM: <s> the worker method to actually set players media time </s>
|
funcom_train/10494463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unbindService(TradeServices tradeServices, Map props) {
if (Log.doTrace())
Log.trace("TradeServicesManagerImpl:unbindService()", tradeServices, props);
if (tradeServices != null) {
tradeServicesList[tradeServices.getMode()] = null;
}
}
COM: <s> unbind a trade services implementation </s>
|
funcom_train/3393808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean shouldReport(JavaFileObject file, int pos) {
if (multipleErrors || file == null)
return true;
Pair<JavaFileObject,Integer> coords = new Pair<JavaFileObject,Integer>(file, pos);
boolean shouldReport = !recorded.contains(coords);
if (shouldReport)
recorded.add(coords);
return shouldReport;
}
COM: <s> returns true if an error needs to be reported for a given </s>
|
funcom_train/34663922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createSelectionListener() {
this.selectionListener = new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
Widget widget = event.widget;
if (widget == CheckedListEditor.this.upButton) {
upPressed();
} else if (widget == CheckedListEditor.this.downButton) {
downPressed();
} else if (widget == CheckedListEditor.this.list) {
selectionChanged();
}
}
};
}
COM: <s> creates a selection listener </s>
|
funcom_train/27844817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetGetPointerToRoot() throws Exception {
org.scopemvc.model.Pointer[] tests = {
new MockPointer("test"),
null
};
for (int i = 0; i < tests.length; i++) {
_mapmodel.setPointerToRoot(tests[i]);
assertEquals(tests[i], _mapmodel.getPointerToRoot());
}
}
COM: <s> method test set get pointer to root is testing set pointer to root </s>
|
funcom_train/43988502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testModelReflectsAdapterChanges() {
ValueModel model = new ValueHolder();
SingleListSelectionAdapter adapter =
new SingleListSelectionAdapter(model);
for (int index : INDICES) {
adapter.setLeadSelectionIndex(index);
assertEquals("New model index",
new Integer(index),
model.getValue());
}
}
COM: <s> checks that changes to the adapter update the underlying value model </s>
|
funcom_train/3025348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLineNumber() {
String text = textPane.getText();
javax.swing.text.Caret caret = textPane.getCaret();
int pos = caret.getDot();
int i = 0;
while (pos > 0 && i < text.length()) {
if (text.charAt(i++) == '\n') {
pos--;
}
}
return i;
}
COM: <s> get the line number of the cursor within the current buffer </s>
|
funcom_train/16141847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataSource getDataSource(String dataSourceName) throws Exception{
//Return DataSource info doc
Exception possibleException = null;
DataSourcesInfoStorage dataSourcesInfoStorage = null;
DataSource dataSource = null;
try {
dataSourcesInfoStorage = DataSourcesInfoStorage.factory.build(config);
dataSource = dataSourcesInfoStorage.get(dataSourceName);
} catch (Exception e) {
possibleException = e;
} finally {
if (dataSourcesInfoStorage != null)
dataSourcesInfoStorage.close();
if (possibleException != null)
throw possibleException;
}
return dataSource;
}
COM: <s> get a data source information object from the store </s>
|
funcom_train/17026961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sameAs() {
Resource resource;
Model model = getModel();
Reasoner owlReasoner = ReasonerRegistry.getOWLReasoner();
InfModel infModel = ModelFactory.createInfModel(owlReasoner, model);
resource = infModel.getResource(johnPrimeURI);
printStatements("OWLReasoned", infModel, resource, null, null);
runTestQuery(infModel);
}
COM: <s> play with same as reasoning </s>
|
funcom_train/12765633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateSelection(SelectionChangedEvent event) {
perspDesc = null;
IStructuredSelection sel = (IStructuredSelection) event.getSelection();
if (!sel.isEmpty()) {
Object obj = sel.getFirstElement();
if (obj instanceof IPerspectiveDescriptor) {
perspDesc = (IPerspectiveDescriptor) obj;
}
}
}
COM: <s> update the selection object </s>
|
funcom_train/50305106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undeleteResource(String filename) throws CmsException {
//read the file header including deleted
CmsResource res = m_rb.readFileHeader(m_context.currentUser(), m_context.currentProject(), getSiteRoot(filename), true);
I_CmsResourceType rt = getResourceType(res.getType());
rt.undeleteResource(this, filename);
}
COM: <s> undeletes a resource </s>
|
funcom_train/44536156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image toNative( Image src ) {
// todo: check createCompatibleImage....
if ( src == null ) return null;
Image res = observer.createImage( src.getWidth( observer ), src.getHeight( observer ) );
res.getGraphics().drawImage( src, 0, 0, null );
return res;
}
COM: <s> converts loaded image to native format on the fly during 1st painting </s>
|
funcom_train/31103870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDTDHandler(DTDHandler dtdHandler) {
// REVISIT: SAX1 doesn't require a null pointer exception
// to be thrown but SAX2 does. [Q] How do we
// resolve this? Currently I'm erring on the side
// of SAX2. -Ac
if (dtdHandler == null) {
throw new NullPointerException();
}
fDTDHandler = dtdHandler;
} // setDTDHandler(DTDHandler)
COM: <s> allow an application to register a dtd event handler </s>
|
funcom_train/43911693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FeatureSource getAliasedFeatureSource() throws IOException {
DataStore dataStore = data.getDataStoreInfo(dataStoreId).getDataStore();
FeatureSource fs;
if (alias == null) {
fs = dataStore.getFeatureSource(typeName);
} else {
fs = new RenamingDataStore(dataStore, typeName, alias).getFeatureSource(alias);
}
return fs;
}
COM: <s> returns the native feature source eventually aliasing the name of the </s>
|
funcom_train/9381618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void changeAirplaneModeSystemSetting(boolean on) {
Settings.System.putInt(
mContext.getContentResolver(),
Settings.System.AIRPLANE_MODE_ON,
on ? 1 : 0);
Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
intent.putExtra("state", on);
mContext.sendBroadcast(intent);
}
COM: <s> change the airplane mode system setting </s>
|
funcom_train/7243519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DatagramChannel getChannel(int port) throws IOException {
DatagramChannel channel = DatagramChannel.open();
channel.configureBlocking(false);
DatagramSocket s = channel.socket();
s.setReceiveBufferSize(64*1024);
s.setSendBufferSize(64*1024);
s.setReuseAddress(true);
s.bind(new InetSocketAddress(port));
return channel;
}
COM: <s> returns a new datagram channel that is bound to the given port </s>
|
funcom_train/33723910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onClick(MouseEvent e) {
if (sortable) {
int visColIndex = getTable().columnAtPoint(e.getPoint());
if (visColIndex >= 0) {
int modelColIndex = getColumnModel().getColumn(visColIndex).getModelIndex();
toggleSortOrder(modelColIndex);
}
}
}
COM: <s> handles the click event and sorts the table </s>
|
funcom_train/50221700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newSelection(GraphObject element) {
Collection elementsToRemove = new Selection(selection).asCollection();
CompoundEdit ce = new NamedCompoundEdit("Toggle selected elements");
modifySelection(new MosesArrayList(element), elementsToRemove);
// report that the undoable edit is finished
ce.addEdit(new UndoableSelectionEdit(elementsToRemove, false));
ce.addEdit(new UndoableSelectionEdit(new MosesArrayList(element), true));
ce.end();
fireUndoableEditUpdate(new UndoableEditEvent(this, ce));
}
COM: <s> make the graph element the selection </s>
|
funcom_train/12624935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configure() throws CoreException {
addCoberturaToClassPath();
addInstrumentedDirToClassPath();
ClassInstrumentor.addBuilderToProject(project);
new Job("ClassInstrumentor") {
protected IStatus run(IProgressMonitor monitor) {
try {
project.build(ClassInstrumentor.FULL_BUILD,
ClassInstrumentor.BUILDER_ID, null, monitor);
} catch (Throwable e) {
CoberclipseLog.error(e);
}
return Status.OK_STATUS;
}
}.schedule();
}
COM: <s> configures this nature for its project </s>
|
funcom_train/50066789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Chain branch(int opcode) {
Chain result = null;
if (opcode == goto_) {
result = pendingJumps;
pendingJumps = null;
}
if (opcode != dontgoto && isAlive()) {
result = new Chain(emitJump(opcode), stacksize, result,
varDebugInfo ? defined.dup() : null);
fixedPc = fatcode;
if (opcode == goto_)
alive = false;
}
return result;
}
COM: <s> emit a branch with given opcode return its chain </s>
|
funcom_train/10190903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init(String username, String hostname, int portnumber)
{ StringBuffer sb=new StringBuffer("sip:");
if (username!=null) sb.append(username).append('@');
sb.append(hostname);
if (portnumber>0) sb.append(":"+portnumber);
m_URL=sb.toString();
}
COM: <s> inits the sip url </s>
|
funcom_train/40900856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetBoxB() throws AssertionFailedException {
System.out.println("getBoxB");
ImageCreator instance = new ImageCreator();
Image expResult_1 = null;
Image result_1 = instance.getBoxB();
assertEquals(expResult_1, result_1);
fail("The test case is a prototype.");
}
COM: <s> test of test get box b method of class image creator </s>
|
funcom_train/46766558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getClearButton() {
if (ClearButton == null) {
ClearButton = new JButton();
ClearButton.setText("Clear");
ClearButton.setToolTipText("Eliminates option value");
ClearButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
//System.out.println("actionPerformed()-Cancel");
o.setValue("VOID");
mp.rebuildTree();
mp.getMainPane();
}
});
}
return ClearButton;
}
COM: <s> this method initializes clear button </s>
|
funcom_train/18729853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Constructor c) {
if (container) {
if (c.getId() != null && c != Project.getInstance().getActiveCoordinateSystem()) {
constructors.remove(c.getId());
c.setId(null);
c.setOwner(null);
}
}
}
COM: <s> remove a constructor </s>
|
funcom_train/3292303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MMObjectBuilder getListBuilder(String command, Map params) {
if (command.equals("TREE")) return treeBuilder;
if (command.equals("WHO") || command.equals("TEMPORARYRELATIONS")) {
String type=(String)params.get("TYPE");
if (type!=null) {
return mmb.getMMObject(type);
}
}
return new VirtualBuilder(mmb);
}
COM: <s> returns a virtual builder used to create node lists from the results </s>
|
funcom_train/20507942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyNewTalk(String toUsername, String fromUsername) {
Notification notification = new Notification();
notification.setFromUsername(fromUsername);
notification.setToUsername(toUsername);
notification.setTitle(messageSource.getMessage(
MSGKEY_NEW_TALK_TITLE, new Object[]{fromUsername,
toUsername}, null));
notification.setType(NotificationType.TALK);
notificationDao.save(notification);
}
COM: <s> notify a user that someone wrote on his her talk page </s>
|
funcom_train/26324528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JComponent createNewDisplay() throws FCException {
//todo: Add support for different types of fields.
FCField field = new FCField(SCROLLING.getAsInt());
field.setRect(getProperty(RECT).getAsRect());
field.addFocusListener(this);
field.addKeyListener(this);
//field.setText(getProperty(CONTENTS).getAsString());
return field;
}
COM: <s> creates a new fccomponent for this item </s>
|
funcom_train/44465612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String mungeName(String in) {
String f = new String(in);
int x = f.lastIndexOf('/')+1;
if(x==-1)
return null;
int y = f.indexOf('.');
if(y==-1)
return null;
String g = f.substring(x,y);
return g;
}
COM: <s> returns the filename sans extention of a given string </s>
|
funcom_train/8077171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSymmetric() {
int nr = m_Elements.length, nc = m_Elements[0].length;
if (nr != nc)
return false;
for(int i = 0; i < nc; i++) {
for(int j = 0; j < i; j++) {
if (m_Elements[i][j] != m_Elements[j][i])
return false;
}
}
return true;
}
COM: <s> returns true if the matrix is symmetric </s>
|
funcom_train/3344858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setQuickSectorFree(int systemAreaSize, BlockDeviceAPI api) throws IOException {
byte[] reserveArray = new byte[512];
for (int i = 0; i < systemAreaSize; i++) {
api.write(i * 512, ByteBuffer.wrap(reserveArray));
}
}
COM: <s> the method for disk free operations </s>
|
funcom_train/11728201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAnd() throws RepositoryException {
String stmt =
xpathRoot + "/*[@" + jcrPrimaryType + " and @" + jcrMixinTypes + "]";
try {
qm.createQuery(stmt, Query.XPATH);
} catch (InvalidQueryException e) {
fail("invalid statement syntax for '" + stmt + "'");
}
}
COM: <s> verifies that the and operator is accepted for a property name </s>
|
funcom_train/38551919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTestResultCode(TestResultCode testResultCode) {
Cube42NullParameterException.checkNull(testResultCode,
"testResultCode",
"setTestResultCode",
this);
this.testResultCode = new PortableResultCode(testResultCode.getName(),
testResultCode.getMessage(),
testResultCode.getResultType());
}
COM: <s> sets the test result code for the system test result </s>
|
funcom_train/27809446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void emitJpFlag(char flag, String label) {
if (Options.forGB) {
if (flag == 'm' || flag == 'p') {
/* High byte is in A. Shift into carry. */
emit("rlca");
if (flag == 'm') {
emit("jp c," + label);
}
else {
emit("jp nc," + label);
}
}
else {
throw new RuntimeException("Internal error");
}
}
else {
emit("jp " + flag + "," + label);
}
}
COM: <s> generates the plaform specific version of the given z80 jump </s>
|
funcom_train/640226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setChildrensHierarchies(SGYElement ele) {
Iterator<SGYElement> childIter = ele.children.iterator();
SGYElement child;
while (childIter.hasNext()) {
child = childIter.next();
if (child.hierarchy < ele.hierarchy + 1)
child.hierarchy = ele.hierarchy + 1;
if (maxHierarchy < ele.hierarchy + 1)
maxHierarchy = ele.hierarchy + 1;
if (child.children.size() != 0)
setChildrensHierarchies(child);
}
}
COM: <s> goes through the graph for all models children and grandchildren and </s>
|
funcom_train/17015130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processTask(String taskId, JobHistory.Task task) {
// Any TASK info commits the previous transaction
boolean hasHanging = hangingAttempts.remove(taskId) != null;
if (hasHanging) {
numEventsRecovered += 2;
}
TaskID id = TaskID.forName(taskId);
TaskInProgress tip = getTip(id);
updateTip(tip, task);
}
COM: <s> process a task </s>
|
funcom_train/37821118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean gotoSplit(Concatenation aConcat) {
try {
SplitAction anAction = new SplitAction(myModel, aConcat);
myActionStack.perform(anAction);
// OldExplanation must be changed
// To prevent wrong Explanation after MouseOver
this.oldExplanation = myModel.getExplanation();
// The Observers must be informed, that model has changed.
myModel.notifyObservers();
return true;
}
// Exceptions are thrown by the ActionStack if startAlgorithm is not
// possible.
// These Exceptions arent handled.
catch (Exception e) {
myModel.notifyObservers();
return false;
}
}
COM: <s> this method performs the passing of a concatenation in a </s>
|
funcom_train/18032297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
JButton button = (JButton) e.getSource();
String buttonText = button.getText();
int day = new Integer(buttonText).intValue();
setDay(day);
for (int i=0; i<m_calendarSelectionListener.size(); i++) {
CalendarSelectionListener listener = (CalendarSelectionListener)m_calendarSelectionListener.get(i);
listener.selectionPerformed(CalendarSelectionListener.DAY);
}
}
COM: <s> jday chooser is the action listener for all day buttons </s>
|
funcom_train/9978218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasReferencesToClass(Project project, String name) {
ArrayList<NodeAction> actions = project.getAllActions();
for (NodeAction action: actions) {
if (action.getCustomObject() instanceof Struts2CustomObject) {
Struts2CustomObject co = (Struts2CustomObject) action.getCustomObject();
if (co.className != null && name.equals(co.className)) {
return true;
}
}
}
return false;
}
COM: <s> find all actions interceptors result types </s>
|
funcom_train/45645863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SceneModel goToFinalSceneFromItemRegisterRM() {
GoScenesAction goToServ = new GoScenesAction(
GridPSConstants.TR_OUT_REGISTER_RM, GridPSConstants.SC_FINAL);
SceneModel finalScene = ((SceneModel) extAccess.getBeliefbase()
.getBelief("itemRegisterRM").getFact()).exit(goToServ)[0];
finalScene.addSceneListener(this);
return finalScene;
}
COM: <s> go to the final scene from item register scene </s>
|
funcom_train/38520403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String filterDatabaseData(String databaseData) {
if (this.XmlFilter && databaseData!=null) {
return databaseData.replaceAll("\\<.*?\\>","").replaceAll(" "," ").replaceAll("&"," and ").replaceAll("&"," and ");
}
return databaseData;
}
COM: <s> filters data selected from a database </s>
|
funcom_train/13956648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected NSMutableSet entitiesDependentOn(NSMutableDictionary dependencies, EOEntity entity) {
NSMutableSet referencingEntities = (NSMutableSet) dependencies.objectForKey(dependencyKeyFor(entity));
if (referencingEntities == null) {
referencingEntities = new NSMutableSet();
dependencies.setObjectForKey(referencingEntities, dependencyKeyFor(entity));
}
return referencingEntities;
}
COM: <s> returns the list of the names of the entities that reference depend on </s>
|
funcom_train/18480752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumItersU(int num_iters_u) {
if (this.num_iters_u != num_iters_u) {
int old = this.num_iters_u ;
this.num_iters_u = num_iters_u ;
notifyChanged(NUMITERSU,old,num_iters_u) ;
}
}
COM: <s> sets the number of iterations for u </s>
|
funcom_train/27825274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object other) {
if (this==other)
return true;
if (!(other instanceof UnaryFunctionCallValue))
return false;
UnaryFunctionCallValue otherUnaryFunctionCallValue=(UnaryFunctionCallValue)other;
return m_functionName.equals(otherUnaryFunctionCallValue.m_functionName) && m_argument.equals(otherUnaryFunctionCallValue.m_argument);
}
COM: <s> checks if this variable is equal to some other variable </s>
|
funcom_train/43467722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cache buildCache(String region, Properties properties) throws CacheException {
int refreshPeriod = PropertiesUtil.getInt(
StringUtil.qualify(region, OSCACHE_REFRESH_PERIOD),
OSCACHE_PROPERTIES,
CacheEntry.INDEFINITE_EXPIRY
);
String cron = OSCACHE_PROPERTIES.getProperty(StringUtil.qualify(region, OSCACHE_CRON));
// construct the cache
return new OSCache(refreshPeriod, cron, region);
}
COM: <s> builds a new </s>
|
funcom_train/10609614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(String str, int offset, int count) throws IOException {
if (count < 0) { // other cases tested by getChars()
throw new StringIndexOutOfBoundsException();
}
char buf[] = new char[count];
str.getChars(offset, offset + count, buf, 0);
synchronized (lock) {
write(buf);
}
}
COM: <s> writes code count code number of characters starting at </s>
|
funcom_train/29829344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void combineWithGroupPresences() {
// for all individual presences for groups
Enumeration groupEnum = groups.keys();
while (groupEnum.hasMoreElements()) {
String groupName = (String) groupEnum.nextElement();
BSPresenceInfo newPi = (BSPresenceInfo) groups.get(groupName);
if (newPi == null) continue;
maybeUpdateResultPresence(groupName, newPi);
}
}
COM: <s> combines resultant presences according to settings for groups </s>
|
funcom_train/10764954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unregisterBpelEventListener(BpelEventListener listener) {
// Do not synchronize, eventListeners is copy-on-write array.
try {
listener.shutdown();
} catch (Exception e) {
__log.warn("Stopping BPEL event listener " + listener.getClass().getName() + " failed, nevertheless it has been unregistered.", e);
} finally {
_contexts.eventListeners.remove(listener);
}
}
COM: <s> unregister a global listener from receive </s>
|
funcom_train/8147224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getVertices( int degree ) {
Set verticesofsamedegree = new HashSet();
Iterator iterator;
Vertex vertex;
iterator = this.vertices.iterator();
while( iterator.hasNext() ) {
vertex = (Vertex) iterator.next();
if( this.getAdjacentVertices( vertex ).size() == degree )
verticesofsamedegree.add( vertex );
}
return verticesofsamedegree;
}
COM: <s> returns all vertices with the specified degree </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.