__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/48932946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePage(String pageId) {
Vector<Object> params = new Vector<Object>();
params.add(token);
params.add(pageId);
try {
rpcCall("removePage", params);
logger.info("Successfully deleted page: " + pageId);
} catch (Exception ex) {
logger.error("Error while deleting page: " + pageId + " " + ex.getMessage());
}
}
COM: <s> removes a given </s>
|
funcom_train/34888444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void logoutAndDisconnect(FTPClient ftpClient) {
try {
if (ftpClient.isConnected()) {
ftpClient.logout();
// Solved null pointer exceptions with this sleep. Couldn't
// catch the exceptions because they occured in another
// thread started by NetComponents.
Thread.sleep(1000);
ftpClient.disconnect();
}
} catch (IOException ioe) {} catch (InterruptedException ie) {}
}
COM: <s> logs out and disconnects </s>
|
funcom_train/10764395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void inject(JacobRunnable concretion) {
if (__log.isDebugEnabled()) {
__log.debug("injecting " + concretion);
}
addReaction(concretion, REDUCE_METHOD, CollectionUtils.EMPTY_OBJECT_ARRAY,
(__log.isInfoEnabled() ? concretion.toString() : null));
}
COM: <s> inject a concretion into the process context </s>
|
funcom_train/166143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isHidden(Path path, boolean deepCheck) {
if (deepCheck) {
for (CMSDirectoryItem hiddenItem : hiddenCMSDirectoryItems) {
if (path.isContainedIn(hiddenItem.getPath())) {
return true;
}
}
} else {
for (CMSDirectoryItem hiddenItem : hiddenCMSDirectoryItems) {
if (path.equals(hiddenItem.getPath())) {
return true;
}
}
}
return false;
}
COM: <s> hidden paths are those that must not be shown in the file manager </s>
|
funcom_train/22031330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read(byte[] b, int off, int len) throws IOException {
if (b == null) throw new NullPointerException();
if (off >= length) return -1;
for (int i=0; i<len; i++) {
if (off < length) {
b[i] = stream[off+i];
}
else return i;
}
return len;
}
COM: <s> reads up to len bytes from the array </s>
|
funcom_train/10799426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addBaseFields(BCClass bc) {
addBeanField(bc, "id", Object.class);
BCField field = addBeanField(bc, "storageGenerator",
PCDataGenerator.class);
field.setAccessFlags(field.getAccessFlags()
| Constants.ACCESS_TRANSIENT);
}
COM: <s> declare standard dynamic pcdata fields </s>
|
funcom_train/10315367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasPortletMode(String mimeType, PortletMode portletMode) {
if (mimeType == null) {
mimeType = Constants.TEXT_HTML;
}
Set mimeTypeModes = (Set)_portletModes.get(mimeType);
if (mimeTypeModes == null) {
return false;
}
if (mimeTypeModes.contains(portletMode.toString())) {
return true;
}
else {
return false;
}
}
COM: <s> returns true if the portlet supports the specified mime type and </s>
|
funcom_train/2635594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FuzzyNumber createQuadraticFuzzyNumber(double modal, double alpha, double beta) {
if (this.type == FuzzyFactory.LR)
return new LRFuzzyNumber(modal, alpha, beta, FuzzyNumber.FUNCTION_QUADRATIC, FuzzyNumber.FUNCTION_QUADRATIC);
else // decomposed
return new DecomposedFuzzyNumber(modal, alpha, beta, FuzzyNumber.FUNCTION_QUADRATIC, FuzzyNumber.FUNCTION_QUADRATIC, FuzzyFactory.defaultDecomposedCuts);
}
COM: <s> creates a fuzzy number with quadratic membership functions on both sides </s>
|
funcom_train/43360648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTimeout() {
int ret = 0;
int numGrabbers = setupInternalGrabbers();
if (numGrabbers > 0) {
Grabber grabber = (Grabber)m_grabbers.get(ZAPSCRAPER);
if (grabber instanceof ZapScraperGrabber) {
ret = ((ZapScraperGrabber)grabber).getTimeout();
}
}
return ret;
}
COM: <s> getter for property timeout </s>
|
funcom_train/36431128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void waitForEndOfTransfer() throws InterruptedException {
if (endOfCommand != null) {
endOfCommand.await();
if (endOfCommand.isFailed()) {
throw new InterruptedException("Transfer aborted");
}
}
// logger.debug("waitEndOfCommand over");
}
COM: <s> wait for the current transfer to finish called from </s>
|
funcom_train/39423744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applyNewOrg(OrganizationElement orgElement) {
// Prep the model to ensure that required components are in place
if(!abElement.isSetOrganizations())
abElement.setOrganizations(new AddressBookElement.Organizations());
AddressBookElement.Organizations o = abElement.getOrganizations();
o.getOrganization().add(orgElement);
}
COM: <s> add a new organization element to the document model </s>
|
funcom_train/2624468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createTests() {
icon.setIcon(new ImageIcon(getClass().getResource("/resources/Android_Busy.jpg")));
projectManagement.commitTemporary();
btnCreateTestCases.setEnabled(false);
btnCancel.setEnabled(true);
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
// Instances of javax.swing.SwingWorker are not reusuable, so
// we create new instances as needed.
lblStatusMessage.setText("Creating Tests");
task = new Task();
task.execute();
// preliminaryGUI.resetHome();
}
COM: <s> handles the creation of the task that executes the test generation script </s>
|
funcom_train/51714920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getinfos(int portidx, String protolabel, String entrylabel) {
Object res = null;
int column = portidx + 1;
com.mgib.modifiers.I_stack_elt target = model.findtargetmodule(column, protolabel);
if (target == null) {
TDeb.wri("getinfo from protocol : " + protolabel + "not found port : " + portidx);
}
res = target.getoptions().getValuefor(entrylabel);
return res;
}
COM: <s> get value of option entry on a target protocol on a port </s>
|
funcom_train/48380197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean cc_collision(Sprite spriteB) {
if(!visible || !spriteB.visible) return false;
float d;
d = (x-spriteB.x)*(x-spriteB.x) + (y-spriteB.y)*(y-spriteB.y);
d -= ((colRadius*scale+spriteB.colRadius*spriteB.scale)
*(colRadius*scale+spriteB.colRadius*spriteB.scale));
return (d < 0.0f);
}
COM: <s> see if the sprites collision circles overlap i </s>
|
funcom_train/12167120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FormatRendererContext getFormatRendererContext() {
FormatRendererContextMock formatRendererContext =
new FormatRendererContextMock("formatRendererContext",
expectations);
FormatStylingEngineMock formatStylingEngine = new
FormatStylingEngineMock("formatStylingEngine", expectations);
formatRendererContext.expects.getFormatStylingEngine().
returns(formatStylingEngine).any();
formatStylingEngine.expects.pushPropertyValues(immutablePropertyValues);
formatStylingEngine.expects.popPropertyValues(immutablePropertyValues);
return formatRendererContext;
}
COM: <s> get a format renderer which can provide a format styling engine </s>
|
funcom_train/46456204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAll(byte val[][]) {
if(val.length!=raster.getNx()||val[0].length!=raster.getNy()) {
this.resizeRaster(val.length, val[0].length);
}
raster.setBlock(0, 0, val);
}
COM: <s> sets the rasters values using byte values </s>
|
funcom_train/50158916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getShortTitle() throws Exception {
List nodes = xmlDoc.selectNodes("//*[local-name()='general']/*[local-name()='shortTitle']");
if (nodes.size() != 1)
throw new Exception("Unable to get Short Title. Wrong number of elements: " + nodes.size());
Element element = (Element) nodes.get(0);
return element.getText();
}
COM: <s> returns the short title for the collection </s>
|
funcom_train/25065157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addRangeIndicator(DockPanel panel) {
HTML rangeIndicator = createRangeIndicator();
panel.add(rangeIndicator, DockPanel.WEST);
panel.setCellHorizontalAlignment(rangeIndicator, HorizontalPanel.ALIGN_LEFT);
panel.setCellVerticalAlignment(rangeIndicator, VerticalPanel.ALIGN_MIDDLE);
}
COM: <s> adds the range indicator to the paging controls panel </s>
|
funcom_train/27960051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer s = new StringBuffer();
s.append('[');
Iterator i = iterator();
boolean more = i.hasNext();
while(more) {
s.append(i.next());
if (more = i.hasNext()) {
s.append(", ");
}
}
s.append(']');
return s.toString();
}
COM: <s> creates a string representation of the collection </s>
|
funcom_train/26254174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Expression evaluateUp(FieldAccess p) throws ParseTreeException {
{
OJClass reftype =
computeRefType(p.getReferenceType(), p.getReferenceExpr());
if (reftype != getSelfType()) {
Expression newp = reftype.expandFieldRead(getEnvironment(), p);
if (newp != p)
return newp;
}
}
{
OJClass type = getType(p);
Expression newp = type.expandExpression(getEnvironment(), p);
if (!(newp instanceof FieldAccess))
return newp;
p = (FieldAccess) newp;
}
return super.evaluateUp(p);
}
COM: <s> includes expand field read and expand expression </s>
|
funcom_train/4237382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testActualizarEstado() {
System.out.println("actualizarEstado");
String estado = "Entregado";
Orden orden = new Orden(31);
Platillo platillo = new Platillo(22);
ImplJefeDeCocina instance = new ImplJefeDeCocina();
try {
instance.actualizarEstado(estado, orden, platillo);
assertTrue(true);
} catch (Exception e) {
assertTrue(false);
}
}
COM: <s> test of actualizar estado method of class restaurante </s>
|
funcom_train/21982762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JBarcode createCode128(){
JBarcode jbc = new JBarcode(Code128Encoder.getInstance(), WidthCodedPainter.getInstance(), BaseLineTextPainter.getInstance());
jbc.setBarHeight(17);
try {
jbc.setXDimension(0.264583333);
} catch (InvalidAtributeException e) {}
jbc.setShowText(true);
jbc.setCheckDigit(true);
jbc.setShowCheckDigit(false);
return jbc;
}
COM: <s> creates a new jbarcode instance to code128 barcode type </s>
|
funcom_train/40222637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean undo(ks.common.games.Solitaire game) {
// VALIDATE:
if (draggedColumn == null) return false;
// Decrement the score
game.updateScore(-draggedColumn.count());
// move back and remove from foundation
int size = draggedColumn.count();
from.push (draggedColumn);
for (int i = 0; i < size; i++) { to.get(); }
draggedColumn = null;
return true;
}
COM: <s> to undo this move we move the cards back where they came from </s>
|
funcom_train/22579058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selUnRemAttributes() throws Exception {
Vector tmpAttribs = DbAttribute.dbGetUnremovedAttributes(dbConn, cDevice.getDeviceID(), cInterface.getIfIndex());
cAttributes.clear();
if (tmpAttribs != null)
for (int i=0; i<tmpAttribs.size(); i++)
cAttributes.add(tmpAttribs.elementAt(i));
}
COM: <s> select the unremoved attributes for a device interface </s>
|
funcom_train/50503881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element toAntElement() {
Element taskElement = super.toAntElement();
if(xmlEncoding != null) {
JDOMHelper.setAttribute(taskElement,"xmlencoding", xmlEncoding);
}
JDOMHelper.setAttribute(taskElement,"validatexml", "" + validateXml);
return taskElement;
}
COM: <s> creates a ant element of this task </s>
|
funcom_train/47314507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getCameraMenu() {
if (cameraMenu == null) {
cameraMenu = new JMenu();
cameraMenu.setText(localization
.getProperty("loc-Gui2007-cameraMenu"));
cameraMenu.add(getStartCamMenuItem());
cameraMenu.add(getStopCamMenuItem());
cameraMenu.add(getRecordMenuItem());
cameraMenu.add(getSnapShotMenuItem());
}
return cameraMenu;
}
COM: <s> this method initializes camera menu </s>
|
funcom_train/14233163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assembleAddURLPanel(){
addURLField.setMinimumSize(new Dimension(300,20));
addURLField.setPreferredSize(new Dimension(300,20));
addURLButton.setMinimumSize(new Dimension(80,24));
addURLButton.setPreferredSize(new Dimension(80,24));
// Add things to their panels
addURLPanel.add(addURLField);
addURLPanel.add(addURLButton);
// Add borders
TitledBorder title = BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Add an Online List from URL");
addURLPanel.setBorder(title);
}
COM: <s> assembles the add an online list from url panel </s>
|
funcom_train/23282949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String buildNestedName(javax.servlet.jsp.tagext.Tag from) {
StringBuffer fullName = new StringBuffer();
javax.servlet.jsp.tagext.Tag nestedTag = findAncestorWithClass(from, NestedTag.class);
if (nestedTag != null) {
fullName.append(buildNestedName(nestedTag)).append(".");
}
fullName = fullName.append(((NameIdentified) from).getName());
return (fullName.equals("")) ? null : fullName.toString();
}
COM: <s> build tag name with the nestead included if present </s>
|
funcom_train/12171081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialiseSerialisers(ReferenceResolver resolver) {
elementNameSerialiser = new WBSAXElementNameSerialiser(handler,
resolver);
attributeNameSerialiser = new WBSAXAttributeNameSerialiser(handler,
resolver);
createValueSerialisers(resolver);
attributesSerialiser = new WBSAXAttributesSerialiser(handler,
attributeNameSerialiser, attributeValueSerialiser,
configuration, urlListener);
}
COM: <s> initialise the element and attribute serialisers </s>
|
funcom_train/17901712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void historyPrevious() {
if (index == historyModel.getSize() - 1)
getToolkit().beep();
else if (index == -1) {
current = getText();
setText(historyModel.getItem(0));
index = 0;
}
else {
int newIndex = index + 1;
setText(historyModel.getItem(newIndex));
index = newIndex;
}
}
COM: <s> get previous item in the history list </s>
|
funcom_train/3931178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getServerName() throws SessionException {
if (!this.isStateless) {
if (this.isRunningAsPortlet) {
return this.portletRequestHelper.getServerName();
} else {
// return this.getRequest().getServerName();
return this.httpServletRequestHelper.getRequest()
.getServerName();
}
}
// for stateless sessions, return null;
throw new SessionException("Stateless request does not support getServerName() method.");
}
COM: <s> following wrapper methods added to eliminate dependence on servlet request </s>
|
funcom_train/49626578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Locale getDefaultLocale() {
if (this.defaultLocale != null) {
return this.defaultLocale;
}
if (!this.defaultLocaleInitialized.get()) {
synchronized (this) {
if (defaultLocaleInitialized.compareAndSet(false, true)) {
for (Locale l : getLocales()) {
if (l.isDefault()) {
this.defaultLocale = l;
break;
}
}
}
}
}
return this.defaultLocale;
}
COM: <s> returns the default locale if set </s>
|
funcom_train/647565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double evaluate(Chromosome a_subject) {
int total = 0;
for (int i = 0; i < a_subject.size(); i++) {
IntegerGene value = (IntegerGene) a_subject.getGene(a_subject.size() -
(i + 1));
if (value.intValue() > 0) {
total += Math.pow(2.0, (double) i);
}
}
return total;
}
COM: <s> this example implementation calculates the fitness value of chromosomes </s>
|
funcom_train/8203590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getUrl( String filename ){
if( baseUrlsStat.lastModified() != baseUrlsLM ){
baseUrls = fileToArrayList(baseUrlsStat.getPath());
baseUrlsLM = baseUrlsStat.lastModified();
}
String whichUrl = baseUrls.get( ran.nextInt( baseUrls.size() ) ) + "/" + filename;
return whichUrl;
}
COM: <s> returns a random url used for putting a file to the dfs </s>
|
funcom_train/10504847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDescriptor(String descriptorRule) {
if (DESCRIPTOR_REQUIRED.equals(descriptorRule)) {
allownomd = false;
} else if (DESCRIPTOR_OPTIONAL.equals(descriptorRule)) {
allownomd = true;
} else {
throw new IllegalArgumentException(
"unknown descriptor rule '" + descriptorRule
+ "'. Allowed rules are: "
+ Arrays.asList(new String[] {DESCRIPTOR_REQUIRED, DESCRIPTOR_OPTIONAL}));
}
}
COM: <s> sets the module descriptor presence rule </s>
|
funcom_train/43260773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand2() {
if (exitCommand2 == null) {//GEN-END:|38-getter|0|38-preInit
// write pre-init user code here
exitCommand2 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|38-getter|1|38-postInit
// write post-init user code here
}//GEN-BEGIN:|38-getter|2|
return exitCommand2;
}
COM: <s> returns an initiliazed instance of exit command2 component </s>
|
funcom_train/20246316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Button createButton(int code, String label) {
Button button = dialogPanel.createButton(label);
/*
* XXX setting properties on elements makes this difficult to test. Is
* there a better way of doing this?
*/
button.getElement().setPropertyInt(DIALOG_STATUS_CODE, code);
button.addClickHandler(new ButtonClickHandler(button));
return button;
}
COM: <s> creates and adds a button to this windows button bar </s>
|
funcom_train/50227858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object executeWithArray(Object[] params) {
// Determine parameter types
Class[] paramTypes = new Class [params.length];
for (int i = 0; i < params.length; i++) {
paramTypes[i] = params[i] == null ? null : params[i].getClass();
}
return executeWithArrayAndTypes(params, paramTypes);
}
COM: <s> the below method fails if any of the params is null </s>
|
funcom_train/41444612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadCatalogList(List catalogs) {
this.catalogsList = catalogs;
catalogCombo.removeAll();
for (Iterator iter = catalogs.iterator(); iter.hasNext();) {
EventCatalog catalog_i = (EventCatalog) iter.next();
/* TODO To verrify if the name is not already used */
catalogCombo.add(catalog_i.getCatalogName());
}
if (catalogs.size() > 0) {
/*
* catalogCombo.select(0); catalogCombo.notify();
*/
}
}
COM: <s> loads the differents alarm catalogs in the combo list </s>
|
funcom_train/21525477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getFuncaoOito() {
if (funcaoOito == null) {
funcaoOito = new JRadioButton();
funcaoOito.setText("F8");
funcaoOito.setSelected(true);
funcaoOito.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
funcaoOito.setSelected(true);
funcaoSeis.setSelected(false);
}
});
}
return funcaoOito;
}
COM: <s> this method initializes funcao oito </s>
|
funcom_train/5399403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean equals(Object o1, Object o2) {
if ((o1 == null) && (o2 == null)) {
return true;
}
if (o1 != null) {
if (o2 == null) {
return false;
} else {
return o1.equals(o2);
}
} else {
return false;
}
}
COM: <s> checks if two objects are equals </s>
|
funcom_train/15919168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Stmt makeLocalVar(Position pos, LocalDef li, Expr e) {
final TypeNode tn = xnf.CanonicalTypeNode(pos, li.type());
final LocalDecl ld = xnf.LocalDecl(pos, xnf.FlagsNode(pos, li.flags()), tn,
xnf.Id(pos,li.name()), e).localDef(li);
return ld;
}
COM: <s> create a new local variable declaration from the given local def </s>
|
funcom_train/5017823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getItemIndex(TableModel _tm, Object _item) {
if (_tm == null) return -1;
for (int i = 0; i < _tm.getRowCount(); i++) {
if (_tm.getValueAt(i, 0).equals(_item)) return i;
}
return -1;
}
COM: <s> get index of item in list model </s>
|
funcom_train/4366550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getBufferSize() {
// According to the spec, the JspWriter returned by
// JspContext.pushBody(java.io.Writer writer) must behave as
// though it were unbuffered. This means that its getBufferSize()
// must always return 0.
return (writer == null) ? bufferSize : 0;
}
COM: <s> this method returns the size of the buffer used by the jsp writer </s>
|
funcom_train/19748549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processLocale(HttpServletRequest request, HttpServletResponse response) {
WebappUtil.ensureLocaleValidity(request);
String localeIdentifier = null;
Locale locale = RequestUtils.getUserLocale(request, null);
if (locale != null) {
localeIdentifier = locale.getLanguage();
}
if ( log.isDebugEnabled() ) {
log.debug(" Setting user locale '" + localeIdentifier + "'");
}
response.setHeader("Content-Language", localeIdentifier);
}
COM: <s> p automatically selects a code locale code for the current user if requested </s>
|
funcom_train/50541960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void retransmit(long seqno, Message msg, Address dest) {
if(Trace.trace) Trace.info("NAKACK.OutOfBander.retransmit()", "dest=" + dest + ", msg #" + seqno);
msg.setDest(dest);
passDown(new Event(Event.MSG, msg));
}
COM: <s> called by retransmission thread of ack mcast sender window </s>
|
funcom_train/28482708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countReviewsByUser(User pUser) throws DatabaseException {
DBConstraints constraints = new DBConstraints();
constraints.getArguments().addConstArgument("reviews", "userKey",
pUser.getPrimaryKey(), DBCompare.EQUAL);
return countDatabaseObjects("reviews", constraints);
}
COM: <s> this functions counts the reviews written by a certain user </s>
|
funcom_train/8743273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isUpToDateFieldIndexes() {
for (int i = 0; i < TabulationSettings.geojson_property_names.length; i++) {
if (!(new File(index_path + TabulationSettings.geojson_property_names[i] + ".dat")).exists()) {
return false;
}
}
return true;
}
COM: <s> method to determine if the field indexes exist for </s>
|
funcom_train/24178063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showSelected() {
if (this.getFigure().getBorder() == null) {
showSelected = true;
BoundsRefreshment.refreshBounds(this, this.getSize().width + 2,
this.getSize().height + 4);
RoundedRectangleBorder border = new RoundedRectangleBorder(10, 10);
border.setWidth(2);
border.setColor(ColorConstants.orange);
this.getFigure().setBorder(border);
this.getFigure().repaint();
}
}
COM: <s> it will also show pipeline highlighted if its linked to any handler and </s>
|
funcom_train/7616044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point2D getEndPoint() {
double a = Math.toRadians(getAngleStart() + getAngleExtent());
return new Point2D.Double(getX() + (1.0 + Math.cos(a)) * getWidth() / 2.0, getY()
+ (1.0 - Math.sin(a)) * getHeight() / 2.0);
}
COM: <s> gets the end point of the arc as a point2 d </s>
|
funcom_train/13220066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean shouldCompress(HttpServletRequest request, String buffer) {
if(!allowCompression || !acceptsGzipEncoding(request)) {
return false;
} else {
//This is the rough calculation according to Google - it's just
//a basic guesstimate based on UTF-8 using on average 2 characters
//for most common strings we might be returning
return (buffer.length() * 2) > 256;
}
}
COM: <s> returns whether the response should be compressed before sending back to </s>
|
funcom_train/27860941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void move(long x, long y){
LongPoint[] t = new LongPoint[getNumberOfPoints()];
Arrays.fill(t, new LongPoint(x, y));
this.edit(t, false);
propagateMove(x,y); //take care of sticked glyphs
try{vsm.repaintNow();}catch(NullPointerException e){}
}
COM: <s> translate the glyph by x y relative translation </s>
|
funcom_train/39533608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleDashes(String dashesString){
if(dashesString!=null){
//getting the array of the dash factors
float[] dashes=DashChooserWidget.getDashes(dashesString);
if(dashes.length>0){
strokeDashesValues=dashesString;
gridStroke=new BasicStroke(1, BasicStroke.CAP_BUTT,
BasicStroke.JOIN_BEVEL, 0, dashes, 0);
}else{
gridStroke=null;
strokeDashesValues="";
}
}else{
gridStroke=defaultGridStroke;
strokeDashesValues=defaultStrokeDashesValues;
}
}
COM: <s> creates the stroke corresponding to the provided dashes string </s>
|
funcom_train/36753498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point3i replaceTri(Point3i tri, int replace, int replaceWith){
Point3i changed= new Point3i();
if(tri.x == replace){
changed.x= replaceWith;
changed.y= tri.y;
changed.z= tri.z;
} else if(tri.y == replace){
changed.x= tri.x;
changed.y= replaceWith;
changed.z= tri.z;
} else {
changed.x= tri.x;
changed.y= tri.y;
changed.z= replaceWith;
}
return changed;
}
COM: <s> replaces a given vert with another </s>
|
funcom_train/2444005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static abstract class Adapter implements WindowSectionListener {
@Override
public void contentAdded(WindowSectionEvent evt) {/**/}
@Override
public void contentRemoved(WindowSectionEvent evt) {/**/}
@Override
public void ensureVisibleRequested(WindowSectionEvent evt) {/**/}
@Override
public void sectionActivated(WindowSectionEvent evt) {/**/}
@Override
public void sectionDeactivated(WindowSectionEvent evt) {/**/}
@Override
public void activeContentChanged(WindowSectionEvent evt) {/**/}
}
COM: <s> provides empty implementations for all code window section listener code methods </s>
|
funcom_train/7656023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb =
new StringBuffer("CollectionCertStoreParameters: [\ncollection: "); //$NON-NLS-1$
sb.append(getCollection().toString());
sb.append("\n]"); //$NON-NLS-1$
return sb.toString();
}
COM: <s> returns the string representation of this instance </s>
|
funcom_train/22202500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAssociationSectionGroupNode() throws Exception {
AMArc sectionsArc = makeModelForTopic(john);
// the model must contain an node of gestalt GESTALT_ASSOCIATIONSECTIONGROUP
AMNode groupNode = assertAnEndnode(sectionsArc,
SectionMolder.GESTALT_ASSOCIATIONSECTIONGROUP);
// a sectiongroup has one arc that connects it with its sections
AMArc groupArc = assertAnArc(groupNode,
SectionMolder.GESTALT_SECTIONGROUP_TO_SECTION);
// john has 5 association groups
assertEquals(5, groupArc.getEndNodes().size());
}
COM: <s> checks that the model contains a node </s>
|
funcom_train/49435793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
_isConnecting = false;
boolean isOutgoing = MCONNECTION.isOutgoing();
_status = isOutgoing ? OUTGOING_STRING : INCOMING_STRING;
_host = MCONNECTION.getInetAddress().getHostAddress();
// once it's connected, add it to the dictionary for host entry
if ( isOutgoing )
LionShareConnectionMediator.instance().addKnownHost(
_host, MCONNECTION.getPort()
);
_updated = true;
_time = MCONNECTION.getConnectionTime();
}
COM: <s> updates this connection from a connecting to a connected state </s>
|
funcom_train/45064705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getViewMenu() {
if (viewMenu == null) {
viewMenu = new JMenu();
viewMenu.setText("View");
viewMenu.setPreferredSize(new java.awt.Dimension(37, 21));
viewMenu.setFont(defaultFont);
viewMenu.add(getToolbarMenuItem());
viewMenu.add(getLibraryMenuItem());
viewMenu.add(getObjectInspectorMenuItem());
viewMenu.setVisible(true);
}
return viewMenu;
}
COM: <s> this method initializes view menu </s>
|
funcom_train/45623441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addForcePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AspNetCompilerType_force_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AspNetCompilerType_force_feature", "_UI_AspNetCompilerType_type"),
MSBPackage.eINSTANCE.getAspNetCompilerType_Force(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the force feature </s>
|
funcom_train/29771311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetBACAbsolutePositionComparator() {
System.out.println("getBACAbsolutePositionComparator");
Comparator<BACDataPoint> expResult = null;
Comparator<BACDataPoint> result = BlueFuseFileSearcher.getBACAbsolutePositionComparator();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get bacabsolute position comparator method of class blue fuse file searcher </s>
|
funcom_train/46878918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Session getHibernateSession() {
try {
return this.getSession();
}
catch(DataAccessException ex){
throw new PersistenceServiceException(ex,
PersistenceServiceException.class.getPackage().getName()
+ ".cannot_get_hibernate_session",null,
Layer.SERVICES,Subsystem.PERSISTENCE_SERVICES);
}
}
COM: <s> returns the hibernate session </s>
|
funcom_train/47704063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String deleteResult(String[] testIds) {
if (testIds == null) {
return null;
}
StringBuilder sb = new StringBuilder();
for (int i = 0; i < testIds.length; i++) {
String file = testIds[i];
if (file == null) {
continue;
}
sb.append(FileUtil.deleteFile(file)
+ System.getProperty("line.separator"));
}
return sb.toString();
}
COM: <s> delete the files in the array </s>
|
funcom_train/50302549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSet getCatalogs() throws SQLException {
XSQLVAR[] xsqlvars = new XSQLVAR[1];
xsqlvars[0] = new XSQLVAR();
xsqlvars[0].sqltype = ISCConstants.SQL_VARYING;
xsqlvars[0].sqllen = 31;
xsqlvars[0].sqlname = "TABLE_CAT";
xsqlvars[0].relname = "TABLECATALOGS";
ArrayList rows = new ArrayList(0);
return new FBResultSet(xsqlvars, rows);
}
COM: <s> gets the catalog names available in this database </s>
|
funcom_train/25212465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String determineJobname() {
String jobname = properties.getProperty(PROP_JOBNAME_MASTER);
if (jobname == null || jobname.equals("")) {
jobname = properties.getProperty(PROP_JOBNAME);
if (jobname == null || jobname.equals("")) {
jobname = DEFAULT_JOBNAME;
}
}
return new File(jobname).getName();
}
COM: <s> find the name of the job </s>
|
funcom_train/13275239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addHomeBackgroundImageListener() {
if (this.home != null) {
this.home.addPropertyChangeListener(Home.Property.BACKGROUND_IMAGE,
new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent ev) {
enableBackgroungImageActions(getView(), (BackgroundImage)ev.getNewValue());
}
});
}
}
COM: <s> adds a property change listener to home that enables disables background image actions </s>
|
funcom_train/38464214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object newInstance() throws StorageException {
Object o;
try {
boolean accessible = voidConstructor.isAccessible();
voidConstructor.setAccessible(true);
try {
o = voidConstructor.newInstance(null);
}
finally {
voidConstructor.setAccessible(accessible);
}
}
catch(Exception e) {
throw new StorageException("Could not instantiate object of class: " +
javaClass.getName(),e);
}
return o;
}
COM: <s> creates new instance of storable class target java class </s>
|
funcom_train/12160631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createControls() {
GridLayout layout = new GridLayout(2, false);
layout.horizontalSpacing = HORIZONTAL_SPACING;
layout.marginHeight = 0;
layout.marginWidth = 0;
this.setLayout(layout);
this.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
addColorButton();
addCombo();
}
COM: <s> sets the layout for the selector creates the controls </s>
|
funcom_train/51129262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean havePlayerLeaveIce(MatchPlayer[] v) {
for (MatchPlayer p : v) {
for (int i = 0; i < playersOnIce.length; i++) {
if (playersOnIce[i].equals(p)) {
playersOnIce[i] = null;
}
}
}
return true;
}
COM: <s> have player leave ice </s>
|
funcom_train/39146901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long createRenderWindow(Composite parent) {
windowCanvasPair = OgrePlugin.getDefault().getRenderWindowPool()
.accquireRenderWindow();
windowCanvasPair.canvas.setSize(1, 1);
windowCanvasPair.canvas.setParent(parent);
windowCanvasPair.canvas.setEnabled(true);
windowCanvasPair.canvas.setVisible(true);
windowCanvasPair.renderWindow.windowMovedOrResized();
windowCanvasPair.renderWindow.setVisible(true);
long handle = windowCanvasPair.canvas.handle;
return handle;
}
COM: <s> creates the ogre render window </s>
|
funcom_train/11763455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean performFinish() {
//creates the project
boolean exit = super.performFinish();
//get the location of the project
IProject project = getNewProject();
IPath path = project.getLocation();
fPage.newPath = path;
//saves the new notes file in the same project space
exit = fPage.finish();
//refreshes the window to let the new file show up
try {
project.refreshLocal(1,null);
} catch (Exception e) {
System.out.println(e);
}
super.updatePerspective();
super.selectAndReveal(project);
return exit;
}
COM: <s> makes the project sets the path for the notes file and </s>
|
funcom_train/28982801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getSettingsRetrieveServerAddress () {
if (settingsRetrieveServerAddress == null) {//GEN-END:|63-getter|0|63-preInit
// write pre-init user code here
settingsRetrieveServerAddress = new TextField ("Server Address*:", "server_address.com", 64, TextField.ANY);//GEN-LINE:|63-getter|1|63-postInit
// write post-init user code here
}//GEN-BEGIN:|63-getter|2|
return settingsRetrieveServerAddress;
}
COM: <s> returns an initiliazed instance of settings retrieve server address component </s>
|
funcom_train/4018693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand() {
if (exitCommand == null) {//GEN-END:|42-getter|0|42-preInit
// Insert pre-init code here
exitCommand = new Command(LocalizationSupport.getMessage("COMMAND_EXIT"), Command.EXIT, 1);//GEN-LINE:|42-getter|1|42-postInit
// Insert post-init code here
}//GEN-BEGIN:|42-getter|2|
return exitCommand;
}
COM: <s> returns an initiliazed instance of exit command component </s>
|
funcom_train/32329075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class NullLogger implements Logger {
public void setProperties(Map<String, Object> properties) {}
public void info(String message) {}
public void verbose(String message) {}
public void debug(String message) {}
public void info(String message, Throwable t) {}
public void verbose(String message, Throwable t) {}
public void debug(String message, Throwable t) {}
}
COM: <s> logger that does not produce any output </s>
|
funcom_train/49608811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ReleaseType getReleaseType(String username,EntityManager em,String code) throws Throwable {
try {
ReleaseType vo = JPAMethods.find(username, em, ReleaseType.class, code);
if (vo==null)
throw new Exception("No ReleaseType found having code: "+code);
return vo;
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
}
COM: <s> retrieve a specific release type </s>
|
funcom_train/49874459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doOpen() {
if (myChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
File file = null;
// TODO
// try {
// file = myChooser.getSelectedFile();
// myModel.initialize(new Scanner(file));
// } catch (FileNotFoundException e) {
// showError("Could not open " + file.getName());
// }
}
}
COM: <s> open a file containing simulation settings load settings to simulation </s>
|
funcom_train/37556125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeItem getTopItem () {
checkWidget ();
int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem == 0) return null;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_PARAM;
tvItem.hItem = hItem;
if (OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem) == 0) return null;
return items [tvItem.lParam];
}
COM: <s> returns the item which is currently at the top of the receiver </s>
|
funcom_train/4918433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTreeMarshall() throws Throwable {
// Create the marshaller
XmlMarshaller marshaller = this.createTreeMarshaller();
// Create the root object
RootObject object = new RootObject();
// Marshall the object
marshaller.marshall(object, new WriterXmlOutput(this.writer));
// Validate the output
assertEquals(
"Incorrect XML",
"<root int=\"2\"><child long=\"3\"><float>4.4</float></child><another-child double=\"5.5\"/></root>",
this.writer.toString());
}
COM: <s> ensure able to tree marshall an object </s>
|
funcom_train/25735909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PeakListImpl getPeakList(Peak precursor) {
/**
* create it if peak list has not been created or if there were a filter
* applied to the last one
*/
if ((peakList == null) || (lastAppliedCondition != null)) {
/** all generated peaks are converted in peaklist */
lastSelectedPeakIndex = lastActivePeakIndex;
peakList = toPeakList(sortPeakArrayList(), precursor);
}
return peakList;
}
COM: <s> get the peaklist created from the temporary list </s>
|
funcom_train/13226229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String executeScript(java.lang.String javaScript) {
eventThread.fireNativeEvent(instanceNum,
NativeEventData.EVENT_EXECUTESCRIPT,
javaScript);
if (waitForResult() == true) {
try {
return eventThread.eventRetString;
}
catch (Exception e) {
}
}
return null;
}
COM: <s> executes the specified java script code on the currently loaded document </s>
|
funcom_train/46752300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInsertDt(DateTimeModel insertDt) {
if (Converter.isDifferent(this.insertDt, insertDt)) {
DateTimeModel oldinsertDt= DateTimeModel.getNow();
oldinsertDt.copyAllFrom(this.insertDt);
this.insertDt.copyAllFrom(insertDt);
setModified("insertDt");
firePropertyChange(String.valueOf(PARAMETERVALUES_INSERTDT), oldinsertDt, insertDt);
}
}
COM: <s> date the parameter value was created </s>
|
funcom_train/39846841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getArticleId() {
if (logger.isDebugEnabled()) {
logger.debug("getArticleId() - start");
}
if (logger.isDebugEnabled()) {
logger.debug("getArticleId() - end - return value = " + articleId);
}
return articleId;
}
COM: <s> unique identifier of the article to display </s>
|
funcom_train/36949132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ICacheEnumeration keysAndValues() {
return new ICacheEnumeration() {
Enumeration fValues = fEntryTable.elements();
LRUCacheEntry fEntry;
public boolean hasMoreElements() {
return fValues.hasMoreElements();
}
public Object nextElement() {
fEntry = (LRUCacheEntry) fValues.nextElement();
return fEntry._fKey;
}
public Object getValue() {
if (fEntry == null) {
throw new java.util.NoSuchElementException();
}
return fEntry._fValue;
}
};
}
COM: <s> returns an enumeration that iterates over all the keys and values </s>
|
funcom_train/10933236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isValidName(String name) {
if ((name == null) || (name.length() == 0) || (name.indexOf(File.separatorChar) != -1)
|| (name.indexOf(File.pathSeparatorChar) != -1)) {
return false;
}
return true;
}
COM: <s> checks if the given name is valid for a file system </s>
|
funcom_train/42273059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createAccessor() throws AccessorException {
try {
Directory directory = FSDirectory.getDirectory(repositoryFolder);
IIndexAccessProvider accessProvider = new IndexAccessProvider(directory, analyzer, null);
accessor = new LuceneIndexAccessor(accessProvider);
accessor.open();
} catch (IOException e) {
throw new AccessorException("Cannot create accessor.", e);
}
}
COM: <s> create the accessor </s>
|
funcom_train/19595113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(E element) {
if (head == null) {
head = new LinkedListNode(element);
++size;
return;
}
LinkedListNode next = head;
while (next.next != null) {
next = next.next;
}
next.next = new LinkedListNode(element);
next.next.prev = next;
++size;
}
COM: <s> add an element to the list </s>
|
funcom_train/29779338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void contentsChanged(ActiveListEvent event) {
threadLock.writeLock().lock();
info.setChanges(info.getChanges() + event.getY() - event.getX() + 1);
info.setEvents(info.getEvents() + 1);
threadLock.writeLock().unlock();
}
COM: <s> collect tt active list event tt and monitor the number of changes in </s>
|
funcom_train/50298300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDatabaseDialect(int dialect) throws SQLException {
if (dialect != 1 && dialect != 3){
throw new IllegalArgumentException("dialect must be either "
+ "1 or 3");
}
ServiceRequestBuffer srb = createDefaultPropertiesSRB();
srb.addArgument(ISCConstants.isc_spb_prp_set_sql_dialect, dialect);
executeServicesOperation(srb);
}
COM: <s> set the databases dialect </s>
|
funcom_train/51111858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Query setParameter(String name, Object value) {
if (!(cquery instanceof ParameterizedQuery)) {
throw new IllegalArgumentException("query does not accept parameters");
}
// TODO: check for valid parameter. should probably be built in to
// all ParameterizedQuerys
parameters.put(name, value);
return this;
}
COM: <s> bind an argument to a named parameter </s>
|
funcom_train/3904086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRollupObjectiveSatisfiedPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RollupRulesType_rollupObjectiveSatisfied_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RollupRulesType_rollupObjectiveSatisfied_feature", "_UI_RollupRulesType_type"),
ImsssPackage.Literals.ROLLUP_RULES_TYPE__ROLLUP_OBJECTIVE_SATISFIED,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the rollup objective satisfied feature </s>
|
funcom_train/22496077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void performVisibilityCulling(final Context context) {
int vc;
if (getVisibilityCulling() == VisibilityCulling.Inherited) {
vc = context.visibilityCulling;
} else {
vc = getVisibilityCulling();
}
switch (vc) {
case VisibilityCulling.None:
// Always render
shouldRenderSelf = true;
shouldRenderChildren = true;
break;
case VisibilityCulling.ObjectBased:
// Sphere test
shouldRenderSelf = context.getFrustum().sphereTest(getAbsolutePosition(),
boundingSphereRadius()) != Frustum.iOutside;
shouldRenderChildren = true;
break;
}
}
COM: <s> checks if the object should be rendered </s>
|
funcom_train/5525676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shiftCursorDown ()
{ if (CursorLine.next()==null) return;
Line el=CursorLine;
int pos=CursorLine.computePosToTrue(CursorPos,this);
CursorLine=CursorLine.next();
CursorPos=CursorLine.computeTrueToPos(pos,this);
int le=CursorLine.length();
if (CursorPos>le) CursorPos=le;
updateBlock(CursorLine,CursorPos);
paintline(el);
showCursor();
paintline(CursorLine);
testCursor();
copy();
}
COM: <s> same as cursor down with block extend </s>
|
funcom_train/3139307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initMenu() {
// Add listener to repopulate the menu each time
// it is shown to reflect changes in selection or active perspective
fCreatedMenu.addMenuListener(new MenuAdapter() {
public void menuShown(MenuEvent e) {
Menu m = (Menu)e.widget;
MenuItem[] items = m.getItems();
for(int i = 0; i < items.length; i++) {
items[i].dispose();
}
fillMenu();
}
});
}
COM: <s> creates the menu for the action </s>
|
funcom_train/7645268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void leaveGroup(InetAddress groupAddr) throws IOException {
checkClosedAndBind(false);
if (!groupAddr.isMulticastAddress()) {
throw new IOException(Msg.getString("K003a")); //$NON-NLS-1$
}
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkMulticast(groupAddr);
}
impl.leave(groupAddr);
}
COM: <s> removes this socket from the specified multicast group </s>
|
funcom_train/43245605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetRace() {
System.out.println("setRace");
String race = "";
PatientDataDG3Object instance = new PatientDataDG3Object();
instance.setRace(race);
// 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 race method of class org </s>
|
funcom_train/12812320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validCandidateFile(String filename, String filter) {
if( filter != null ) {
return filename.matches(filter);
}
else {
switch(configuration.getCategorySaada()) {
case Category.FLATFILE: return true;
case Category.IMAGE: return filename.matches(RegExp.FITS_FILE);
default: if( !filename.matches(RegExp.FITS_FILE) ) {
return filename.matches(RegExp.VOTABLE_FILE);
}
else {
return true;
}
}
}
}
COM: <s> check if filename is a possible datafile </s>
|
funcom_train/11049869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getNameAttribute(Node node) {
NamedNodeMap nnMap = node.getAttributes();
if (nnMap.getLength() == 0) {
return "";
}
Node nameAttrNode = nnMap.getNamedItem("name");
if (nameAttrNode == null) {
return "";
}
return nameAttrNode.getNodeValue();
}
COM: <s> obtain the name attribute for the node </s>
|
funcom_train/13394281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String prepareUpdateObjectPage() throws Exception {
// get object ID from currently selected item
Long id = Long.valueOf(BeanUtils.getProperty(m_data.getRowData(), "id"));
s_log.debug("Preparing update page, setting id to " + id);
setCurrentObjectId(id);
return PREPARE_UPDATE_COMPLETED;
}
COM: <s> method to prepare the bean for editing an existing object </s>
|
funcom_train/20977898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getPreferredSize(JScrollBar scrollbar) {
return (scrollbar.getOrientation() == JScrollBar.VERTICAL)
? new Dimension(Math.max(10, Math.max(up.getWidth(), v_thumb.getWidth())), 48)
: new Dimension(48, Math.max(10, Math.max(left.getHeight(), h_thumb.getHeight())));
}
COM: <s> gets the preferred size attribute of the gtk scrollbar object </s>
|
funcom_train/21189244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertExitCodeNot(int code) throws CruiseControlException {
if (exitCode == code) {
throw new CruiseControlException(
"The command \""
+ this.toString()
+ "\" returned exit code \""
+ exitCode
+ "\".\n"
+ "Stdout: "
+ stdout
+ "Stderr: "
+ stderr);
}
}
COM: <s> asserts that the exit code of the command is not a given value </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.