__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/5431885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean nickInUse(String nick) { nick=nick.toLowerCase(); nick=nick.replace(' ','_'); Enumeration e=usedCDs.elements(); while(e.hasMoreElements()) { Object o=e.nextElement(); if(o instanceof ClientConnectorData && nick.equals(((ClientConnectorData)o).nickname.toLowerCase())) return true; } return false; } COM: <s> tells whether or not a nick is in use </s>
funcom_train/49236885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String read() throws IOException { // Read the line from the server. String line = reader.readLine(); if (line == null) { throw new IOException("FTPConnection closed"); } // Call received() method on every communication listener // registered. for (Iterator iter = communicationListeners.iterator(); iter.hasNext();) { FTPCommunicationListener l = (FTPCommunicationListener) iter.next(); l.received(line); } // Return the line read. return line; } COM: <s> this method reads a line from the remote server </s>
funcom_train/9557814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toStringInDatabase(){ try{ if (messageAsString==null){ ByteArrayOutputStream e = new ByteArrayOutputStream(); message.writeTo(e); messageAsString=e.toString(); } return messageAsString; }catch (MessagingException e){System.out.println(e+"problem: toStringInDatabase");} catch (IOException e){System.out.println(e+"problem: toStringInDatabase");} return null; } COM: <s> returns a message as string to be stored in database </s>
funcom_train/36254851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void schedule() { // Scheduling new VMs Iterator<String> itVM = vmsQueue.iterator(); while (itVM.hasNext()) { String vmId = itVM.next(); int posVM = this.vms.indexOf(vmId); // Random scheduler Random rnd = new Random(); this.assignNode(posVM, rnd.nextInt(onNodes.size()), State.RUN); itVM.remove(); } //TODO put if want to allow powering on/off //super.schedule(); } COM: <s> schedule in a random way </s>
funcom_train/27788449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element hash2elem(String attributename, Hashtable subattributes) { Element item = new Element("item"); item.setAttribute("key",attributename); Element itemlist = new Element("dt_assoc"); Element elem = null; for (Enumeration e=subattributes.keys();e.hasMoreElements();) { String key = (String) e.nextElement(); // should be string String value = (String) subattributes.get(key); elem = new Element("item"); elem.setAttribute("key",key); elem.setText(value); itemlist.addContent(elem); } item.addContent(itemlist); return item; } COM: <s> convert a hashtable to an element with the proper </s>
funcom_train/50381159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean validateResourceName() { String resourceName = getResource(); if (resourceName.length() == 0) { problemType = PROBLEM_RESOURCE_EMPTY; problemMessage = NLS.bind( IDEWorkbenchMessages.ResourceGroup_emptyName, resourceType); return false; } if (!Path.ROOT.isValidPath(resourceName)) { problemType = PROBLEM_NAME_INVALID; problemMessage = NLS.bind( IDEWorkbenchMessages.ResourceGroup_invalidFilename, resourceName); return false; } return true; } COM: <s> returns a code boolean code indicating whether the resource name rep </s>
funcom_train/7660965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetKeepAliveTime() { ThreadPoolExecutor p2 = new ThreadPoolExecutor(2, 2, 1000, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(10)); assertEquals(1, p2.getKeepAliveTime(TimeUnit.SECONDS)); joinPool(p2); } COM: <s> get keep alive time returns value given in constructor if not otherwise set </s>
funcom_train/32765910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateValuesY(double[] y) { synchronized (lockUpObj) { if (xyPointV.size() != y.length) { return; } for (int i = 0; i < y.length; i++) { ((XYpoint) xyPointV.get(i)).setY(y[i]); } this.calculateRepresentation(); this.updateData(); } this.updateContainer(); } COM: <s> update the y array into the data set </s>
funcom_train/45515598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setBold(boolean active, boolean overwrite) { MutableAttributeSet attrBold = new SimpleAttributeSet(); StyleConstants.setBold(attrBold, active); int length = TEXT_AREA.getSelectionEnd() - TEXT_AREA.getSelectionStart(); ((StyledDocument) TEXT_AREA.getDocument()).setCharacterAttributes( TEXT_AREA.getSelectionStart(), length, attrBold, overwrite); } COM: <s> sets the current selection bold </s>
funcom_train/936655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getInputStream() throws FileSystemException { if (!exists() || isDirectory()) { throw new FileSystemException(this, "Not a file"); } try { GzFileSystem gfs = (GzFileSystem) getFileSystem(); File gzfile = gfs.getGzFile(); InputStream in = null; //synchronized (this) { in = new GZIPInputStream( new BufferedInputStream(new FileInputStream(gzfile))); //} return in; } catch (IOException ioe) { throw new FileSystemException(this, ioe); } } COM: <s> gets the input stream attribute of the gz file object </s>
funcom_train/51572319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTokenIfndefError() throws Exception { String ERR = "error-message"; String script = "ifndef token error = " + ERR; UncleScriptBuilder builder = parseScript(script); List<LogRecord> errors = builder.getErrors(); assertEquals(1, errors.size()); script = "token = value\nifndef token error = " + ERR; builder = parseScript(script); errors = builder.getErrors(); assertEquals(0, errors.size()); } COM: <s> test token definition error check </s>
funcom_train/25917458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateModeMenuFromCurrent() { switch (current) { case STOP: if(modeMenu_itemStop != null) modeMenu_itemStop.setChecked(true); break; case LAP: if(modeMenu_itemStop != null) modeMenu_itemLap.setChecked(true); break; case COUNTDOWN: if(modeMenu_itemStop != null) modeMenu_itemCountdown.setChecked(true); break; } } COM: <s> set the proper check in the mode menu </s>
funcom_train/15718571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMostRecentRun(String mostRecentRunDate) { try { mMostRecentRunDateValue = FULL_TIME_FORMAT.parse(mostRecentRunDate).getTime(); setMostRecentEndDate(ONLY_DATE_FORMAT.format(new Date(mMostRecentRunDateValue))); }catch(Exception e) {} } COM: <s> sets the most recent run date value if the task </s>
funcom_train/17935535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initInteractions(){ // Feature Arrangement AbstractInteraction feat=new BasicArrangement(); feat.setVGraphics(this); feat.initPopupMenu(); this.addMouseListener(feat); this.addMouseMotionListener(feat); addInteraction(feat); //feat.setUniqueInteractionID(uidSet.getNextID()); } COM: <s> any subclass of vgbase vgraphics object can add additional </s>
funcom_train/26480980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finish() throws IOException { ensureOpen(); if (finished) { return; } if (entry != null) { closeEntry(); } if (entries.size() < 1) { throw new ZipException("ZIP file must have at least one entry"); } // write central directory long off = written; Enumeration e = entries.elements(); while (e.hasMoreElements()) { writeCEN((EZipEntry)e.nextElement()); } writeEND(off, written - off); finished = true; } COM: <s> finishes writing the contents of the zip output stream without closing </s>
funcom_train/21848013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Font modifyFont(Font f) { return new Font(((fontMode & FONT_MODE_APPLY_NAME) != 0) ? font.getName() : f.getName(), ((fontMode & FONT_MODE_APPLY_STYLE) != 0) ? font .getStyle() : f.getStyle(), ((fontMode & FONT_MODE_APPLY_SIZE) != 0) ? font.getSize() : f.getSize()); } COM: <s> modify the given font according to the font mode </s>
funcom_train/41451253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOngoingTransaction(Transaction transaction) { if(transaction != null && ongoingTransactions != null && !isReadyToInvalidate() ) { boolean added = this.ongoingTransactions.add(transaction); if(added) { if(logger.isDebugEnabled()) { logger.debug("transaction "+ transaction +" has been added to sip session's ongoingTransactions" ); } setReadyToInvalidate(false); } } } COM: <s> add an ongoing tx to the session </s>
funcom_train/11415103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void activate() { LOG.log(Level.FINE, "Activating receipt of incoming messages"); URL url = null; try { url = new URL(endpointInfo.getAddress()); } catch (Exception e) { throw new Fault(e); } engine.addServant(url, new JettyHTTPHandler(this, contextMatchOnExact())); } COM: <s> activate receipt of incoming messages </s>
funcom_train/44136382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getMediaInclude(Node node) { String include = "false"; NamedNodeMap map = node.getAttributes(); if(map.getLength() > 0) { Node n = map.getNamedItem(OSMFile.OSM_MEDIA_ATT_INCLUDE); if(n != null) include = getStringCleaned(n.getNodeValue()); } return "true".equals(include); } COM: <s> it indicates whether the media is included into the presentation </s>
funcom_train/44771644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeLRU() { synchronized (cacheMonitor) { LRUEntry entry = head; while (entry != null) { PathMap.Element element = entry.getElement(); if (element.getChildrenCount() == 0) { evict(entry, true); return; } entry = entry.getNext(); } } } COM: <s> remove least recently used item </s>
funcom_train/43327499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Printf outfile) throws IOException { outfile.printf("MINAREA %f ",ratio); outfile.printf("%f ",score); outfile.printf("%f ",x); outfile.printf("%f ",y); outfile.printf("%f ",z); outfile.printf("%f ",phi); outfile.printf("%f ",theta); outfile.printf("%f\n",psi); } COM: <s> this should save all the results except alignment </s>
funcom_train/31873049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeData() { StringBuffer sb1 = new StringBuffer(); StringBuffer sb2 = new StringBuffer(); int j = 0; for (int i=0;i<Environment.size;i++) { if (this.resources[j].name.equalsIgnoreCase(envStrings[i])) { sb1.append(this.resources[j].quality+"\t"); sb2.append(this.resources[j].quantity+"\t"); if (++j==this.resources.length) j--; } else { sb1.append("0\t"); sb2.append("0\t"); } } this.dataQuality.print(sb1+"\n"); this.dataQuantity.print(sb2+"\n"); } COM: <s> store statistics about resources </s>
funcom_train/42292576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("ExternalPersService2HttpPort".equals(portName)) { setExternalPersService2HttpPortEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/46153056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void documentLoadingCompleted(SVGDocumentLoaderEvent e) { LOGGER.fine("whiteboard: document loading completed: " + e); now = new Date(); LOGGER.info("SVG loaded in: " + (now.getTime() - then.getTime()) / 1000 + " seconds"); whiteboardWindow.hideHUDMessage(false); } COM: <s> called when the loading of a document was completed </s>
funcom_train/15608930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int get(long location){ long pos = 0; for(int j = 0; j< r.size(); j++){ SplicedRange sr = (SplicedRange)r.get(j); if(location >= sr.getStart() && location <=sr.getEnd()){ pos = ((((SplicedRange)ranges.get(j)).getStart())+ location); break; } } return sequence.get(pos); } COM: <s> return the value at the given location </s>
funcom_train/2290451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFolderTranslation(String translation) { m_folderTranslations.add(translation); if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_VFS_ADD_FOLDER_TRANSLATION_1, translation)); } } COM: <s> adds one folder translation rule </s>
funcom_train/5305671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scroll(int value) { canScrollUp = true; canScrollDown = true; int newYPos = yPos + value; int maxYPos = multiText.getHeight() - getHeight(); if (newYPos <= 0) { newYPos = 0; canScrollUp = false; } else if (newYPos >= maxYPos) { newYPos = maxYPos; canScrollDown = false; } if (newYPos != yPos) { yPos = newYPos; repaint(); } } COM: <s> scroll the screen </s>
funcom_train/36047963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenuBar createMenubar(String rootKey) { JMenuBar menuBar = new JMenuBar(); // Parse the root key for tokens separated by a space String[] keys = getString(structBundle, rootKey).split("\\s"); JMenu menu; for (String key : keys) { menu = createMenu(key); if (menu != null) { menuBar.add(menu); } } return menuBar; } COM: <s> create the menu bar jmenu bar instance from the structure and display </s>
funcom_train/46189304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LogSummary getLogSummary(int year, int month, int day) { Calendar cal = blog.getCalendar(); cal.set(Calendar.YEAR, year); cal.set(Calendar.MONTH, month-1); cal.set(Calendar.DAY_OF_MONTH, day); int totalRequests = 0; return new LogSummaryItem(blog, cal.getTime(), totalRequests); } COM: <s> gets the log summary information for the given year month and day </s>
funcom_train/11674207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEdge(Edge edge) { Map directEdges = (Map)edges.get(edge.getStart()); if (directEdges == null) { directEdges = new java.util.HashMap(); edges.put(edge.getStart(), directEdges); } directEdges.put(edge.getEnd(), edge); } COM: <s> adds a new edge between two vertices </s>
funcom_train/10521829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String resolveParameterType(String typeName, ParamMode paramMode) { if (paramMode == ParamMode.INOUT || paramMode == ParamMode.OUT) return HolderUtils.getHolderForClass(typeName); else { if (typeName.startsWith("java.lang.")) typeName = typeName.substring(typeName.lastIndexOf('.') + 1); return typeName; } } COM: <s> given the class and mode of the parameter generate the classname </s>
funcom_train/26595673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private _Iterator returnFunctionalCOlumnTableDetail(ColumnDetails column) throws DException { for (int i = 0; i < selectColumnDetails.length; i++) { if (selectColumnDetails[i].getAppropriateColumn().trim().equalsIgnoreCase(column.getAppropriateColumn().trim())) { return (_Iterator)this; } } return null; } COM: <s> this method checks the passed column if the column belongs to the query </s>
funcom_train/27779703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object readData(java.io.DataInput i) throws java.io.IOException { org.egothor.store.disc.IListMeta ilm = new org.egothor.store.disc.IListMeta(i); lastKey = Compress.readUTFS(i, lastKey); ilm.setKey(lastKey); return ilm; } COM: <s> constructs a new </s>
funcom_train/49907959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getProxies() { List l = new ArrayList(); l.add(getProxyService()); if (parent.getGrantor() instanceof ProxyGrantingTicket) { ProxyGrantingTicket p = (ProxyGrantingTicket) parent.getGrantor(); l.addAll(p.getProxies()); } return l; } COM: <s> retrieves trust chain </s>
funcom_train/11013344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test46368() { HSSFWorkbook wb = openSample("46368.xls"); HSSFSheet s = wb.getSheetAt(0); HSSFCell cell1 = s.getRow(0).getCell(0); assertEquals(32770, cell1.getStringCellValue().length()); HSSFCell cell2 = s.getRow(2).getCell(0); assertEquals(32766, cell2.getStringCellValue().length()); } COM: <s> hssfrich text string </s>
funcom_train/29019398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void intersect (int x, int y, int width, int height) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (width < 0 || height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT); int /*long*/ rectRgn = OS.CreateRectRgn (x, y, x + width, y + height); OS.CombineRgn (handle, handle, rectRgn, OS.RGN_AND); OS.DeleteObject (rectRgn); } COM: <s> intersects the given rectangle to the collection of polygons </s>
funcom_train/21039135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConfig_4() throws Exception { String path = DBREVISION_CONFIGS+File.separatorChar+"config-4"; LocalDatabase localDatabaseAdapter = new LocalDatabase(null); boolean isCorrect=false; try { new DbRevisionManager(localDatabaseAdapter, path); } catch (FirstVersionWithPatchdException e) { isCorrect=true; } assertTrue(isCorrect); } COM: <s> test directory with first version must not contain patches patch directory </s>
funcom_train/27947742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexOfChild(Object parent, Object child) { if (parent instanceof CompoundBody) { CompoundBody compound = (CompoundBody) parent; if (compound.getPart() == child) { return 0; } else if (compound.getNext() == child) { return 1; } else { return -1; } } else { return -1; } } COM: <s> returns the index of child in parent </s>
funcom_train/41108912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAuthor(Long id) { if(id == null){ throw new NullPointerException("author's id"); } Author author = em.find(Author.class, id); if(author == null){ throw new IllegalStateException("The given author doesn't exist"); } em.remove(author); } COM: <s> it removes author from book </s>
funcom_train/17401013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String shortenReview(){ String [] words = review.split("\\W"); StringBuffer shortReview = new StringBuffer(0); if(words != null){ for(int i = 0; i < words.length && i < Dvd.SUMMARY_LENGTH; i++){ shortReview.append(words[i]); if(i < (words.length -1) && i < (Dvd.SUMMARY_LENGTH -1)) shortReview.append(" "); } if(words.length > 10) shortReview.append("..."); } return shortReview.toString(); } COM: <s> takes the dvd review and splits into words based on whitespace </s>
funcom_train/12860927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initEntities() { aggregated = new AggregatedClass(); aggregated.setAggregating(new HashSet<AggregatingClass>()); aggregating = new AggregatingClass(); aggregating.setPart(new HashSet<AggregatedClass>()); head = new KompositionHead(); head.setPart(new HashSet<KompositionPart>()); part = new KompositionPart(); part.setHead(head); } COM: <s> simple private init method </s>
funcom_train/39049668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setHealth(Health newHealth) { if (newHealth == health) { return; } health = newHealth; if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "Reporting change in health to " + health); } taskScheduler.scheduleTask( new AbstractKernelRunnable("ReportHealth") { public void run() { watchdogService.reportHealth(health, CLASSNAME); } }, taskOwner); } COM: <s> set the health of this service </s>
funcom_train/37757673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInputStreamHandler() throws Exception { ConfigurationHandler ish = new PropertiesFileHandler("jconfig.properties"); Configuration config = ConfigurationManager.getConfiguration("default"); ConfigurationManager.getInstance().load(ish, "default"); assertEquals("8080", config.getProperty("http.proxyPort")); assertEquals("192.168.3.1", config.getProperty("http.proxyHost")); } COM: <s> method test input stream handler </s>
funcom_train/4984609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createInlineStyles() { String result = ""; for (Map.Entry<String, String> entry : stylesMap.entrySet()) { result = result + " span." + entry.getKey() + " {" + entry.getValue() + "} "; } result = "<style type=\"text/css\"> " + result + "</style>"; return result; } COM: <s> collects all styles from passed selection and all child selections </s>
funcom_train/32316550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDescriptionsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ObjectUnionOf_descriptions_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ObjectUnionOf_descriptions_feature", "_UI_ObjectUnionOf_type"), OdmPackage.Literals.OBJECT_UNION_OF__DESCRIPTIONS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the descriptions feature </s>
funcom_train/18647145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RoleType getFromRoleType() { RoleType ret=null; RoleType other=getToRoleType(); if (getRelationship() != null && other != null) { ret = getRelationship().getFirstRoleType(); if (ret == other) { ret = getRelationship().getSecondRoleType(); } } return(ret); } COM: <s> this method returns the from role associated with </s>
funcom_train/43701502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCoefficients(PolynomialCoefficients other) { if (immutable) { throw new XADDRuntimeException("Immutable"); } for (TIntDoubleIterator iter = other.coeff.iterator(); iter.hasNext(); ) { iter.advance(); coeff.adjustOrPutValue(iter.key(), iter.value(), iter.value()); } } COM: <s> add coefficients from other into our own values </s>
funcom_train/37073993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTopLevelType() { /* gene can be null if transcript has been deleted but is still being erroneously held onto (like in SetDetailPanel) */ if (getRefFeature() == null) { if (biotype == null || biotype.equals ("")) return getFeatureType(); else return biotype; } else return getRefFeature().getTopLevelType(); } COM: <s> transcript has the same biotype as its gene </s>
funcom_train/43327494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void printDirectClassPrediction(Printf outfile) { try { if (name != null) outfile.printf(" Class of %s",name); else outfile.printf(" Class of generic profile"); outfile.printf(" (%d res) is ",residues()); outfile.printf("%s. Predicted ",className(k_class)); outfile.printf("%s.\n",className(p_class[0])); } catch (IOException e) { } } COM: <s> show the class prediction from the 4 output network </s>
funcom_train/50802341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public int getChance(int unitType, Pilot pilot) { int level = getLevel(); if (level == 1) return getUpgradeChance(1,unitType,pilot); // obtaining new skill if (pilot.getSkills().has(previous)) return getUpgradeChance(level+1, unitType, pilot); return 0; // cannot jump over levels } COM: <s> get the chance by asking of the chance of level upgrades </s>
funcom_train/13246601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getOldPasswordLabel() { if (oldPasswordLabel == null) { oldPasswordLabel = new JLabel(RESOURCE_BUNDLE.getString(ConverterResource.OLD_PASSWORD), SwingConstants.RIGHT); oldPasswordLabel.setLabelFor(getOldPasswordField()); } return oldPasswordLabel; } COM: <s> returns the label prompting the user to enter their old current password </s>
funcom_train/10505512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setRequestType(final int requestType) { switch (requestType) { case REQUEST_PUT: break; case REQUEST_GET: break; default: throw new IllegalArgumentException("Illegal request type: " + requestType); } this.requestType = requestType; addAttribute("request-type", requestType == REQUEST_GET ? "get" : "put"); } COM: <s> sets the request type </s>
funcom_train/17788663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isReset(int component) { if ((cocParametersList != null) && cocParametersList.containsKey(component)) { return cocParametersList.get(component).reset; } else if (codParameters != null) { return codParameters.reset; } else { return parent.isReset(component); } } COM: <s> check if the reset flag is active </s>
funcom_train/20845100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator childrenFromType() { if (type == null) return EmptyStructures.EMPTY_ITERATOR; if (type.isComplexType()) { List list = new LinkedList(); ComplexType complex = (ComplexType) type; for (Iterator it = complex.elements(); it.hasNext();) { Element e = (Element) it.next(); ParameterValue pv = ParameterValue.createElementValue(e); pv.setMaxOccurs(e.getMaxOccurs()); pv.setMinOccurs(e.getMinOccurs()); list.add(pv); } return list.iterator(); } return EmptyStructures.EMPTY_ITERATOR; } COM: <s> returns an iterator of types for all inner elements </s>
funcom_train/18903697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startDocument() { logger.debug("Starting N3 document"); statementCount = 0; // clear the anonymous node maps try { blankNodeIdMap.clear(); blankNodeNameMap.clear(); } catch (IOException ioe) { throw new RuntimeException("I/O error while setting up an import", ioe); } } COM: <s> called when a parsing is commenced on a valid document </s>
funcom_train/13916790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recordJobMessage(ETLJob pETLJob, ETLStep oStep, int iErrorCode, int iLevel, String strMessage, String strExtendedDetails, boolean bSendEmail) { this.recordJobMessage(pETLJob, oStep, iErrorCode, iLevel, strMessage, strExtendedDetails, bSendEmail, new java.util.Date()); } COM: <s> record job message </s>
funcom_train/20534131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCalcular_gen() { if (calcular_gen == null) { calcular_gen = new JButton(); calcular_gen.setText("Siguiente"); calcular_gen.setSize(new Dimension(116, 25)); calcular_gen.setLocation(new Point(462, 41)); calcular_gen.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { buscarGenero(); } }); } return calcular_gen; } COM: <s> this method initializes calcular gen </s>
funcom_train/33588756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextField_Password() { if (jTextField_Password == null) { jTextField_Password = new JTextField(); jTextField_Password.setColumns(10); jTextField_Password.setBounds(100, 60, 439, 19); } return jTextField_Password; } COM: <s> this method initializes j text field2 </s>
funcom_train/19221436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateTileOfParents(){ TiledSet ts = null; TiledSet tts = null; //going through all cardinality classes, we can start with cardinality two, since singletons are not tiled. for (int i = 1; i < cardinalityclasses.length; i++){ Iterator it = cardinalityclasses[i].iterator(); while (it.hasNext()){ ts = (TiledSet) it.next(); //the enumerating its tiles and set it as a parent Iterator tit = ts.getTiles().iterator(); while (tit.hasNext()){ tts = (TiledSet) tit.next(); tts.addTileOfParent(ts); } } } } COM: <s> caluclates the parents of the tiles for each tile </s>
funcom_train/37648610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals2() { Property p1 = new Property(); p1.setName("p1"); p1.setValue("value1"); Property p2 = new Property(); p2.setName("p2"); p2.setValue("value1"); assertFalse("2 properties must be different if their names are different", p1.equals(p2)); } COM: <s> 2 properties are diffrent if their names are different </s>
funcom_train/2888218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeHost(HostType host) throws DatabaseAccessException{ try{ database.delete(null, new DatabaseEntry(host.getId().getBytes())); Iterator itor = handlers.iterator(); while(itor.hasNext()){ ((HostUpdateHandler)itor.next()).hostDeleted(host); } }catch(DatabaseException e){ throw new DatabaseAccessException(e); } } COM: <s> removes a specfic host by its host type object </s>
funcom_train/10383248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void check() { if (host.getAutoDeploy()) { // Check for resources modification to trigger redeployment DeployedApplication[] apps = deployed.values().toArray(new DeployedApplication[0]); for (int i = 0; i < apps.length; i++) { if (!isServiced(apps[i].name)) checkResources(apps[i]); } // Hotdeploy applications deployApps(); } } COM: <s> check status of all webapps </s>
funcom_train/1589217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Interval withDurationBeforeEnd(ReadableDuration duration) { long durationMillis = DateTimeUtils.getDurationMillis(duration); if (durationMillis == toDurationMillis()) { return this; } Chronology chrono = getChronology(); long endMillis = getEndMillis(); long startMillis = chrono.add(endMillis, durationMillis, -1); return new Interval(startMillis, endMillis, chrono); } COM: <s> creates a new interval with the specified duration before the end instant </s>
funcom_train/21611829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParseDeclarationPredicate() throws MUParserException { ParseTree pt = parser.parse("declaration", "var=Predicate(a,b,c)"); System.out.println("parse tree: " + pt); checkParsing(pt, "variable", "=", "predicate_name", "(", "variable", "variable", "variable", ")"); } COM: <s> parses a declaration on a predicate result </s>
funcom_train/11689173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValidationOn(AxisService service) { Parameter validationParam = service.getParameter(FIXConstants.FIX_BEGIN_STRING_VALIDATION); if (validationParam != null) { if ("true".equals(validationParam.getValue().toString())) { return true; } } return false; } COM: <s> checks whether begin string validation is on for the specified </s>
funcom_train/3272965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setViewingPlayer(int viewingPlayer){ viewingFleet = getFleet(viewingPlayer); // Update the visibility of the World for the current // player's turn if(viewingFleet == null) Utilities.popUp("The specified fleet number does not exist!! Expect problems. Check the turn data file."); viewingFleet.visibilityCheckRequired = true; updateVisibility(); } COM: <s> set the viewing player number </s>
funcom_train/3291599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete(MMObjectNode node) { boolean result=false; DatabaseTransaction trans=null; try { trans=createDatabaseTransaction(); result=delete(node,trans); trans.commit(); } catch (StorageException e) { if (trans!=null) trans.rollback(); log.error(e.getMessage()); } return result; } COM: <s> delete a node </s>
funcom_train/3919866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EmailDataType getEmailData(Role role) { if(role == null) { return null; } for(int i = 0; i < _emailDataList.size(); i++) { EmailDataType ed = (EmailDataType)_emailDataList.get(i); if(role.equals(ed.getRoleRef().getReferencedComponent())) { return ed; } } return null; } COM: <s> get an email data component by finding the role that it references </s>
funcom_train/13997759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Stream addStream(Stock stock, Flow flow) { Stream oldStream = getStreamBetween(stock, flow); if (oldStream != null) { return oldStream; } else { disconnectOutFlow(flow); Stream stream = new Stream(stock, flow, entityIdentifier++); streams.add(stream); stock.addOutFlow(flow); firePropertyChange(STREAM_ADDED_PROP, null, stream); return stream; } } COM: <s> add a stream from </s>
funcom_train/10950189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String execute() throws Exception { if (isCreating()) { createInputUser(); setTask(Constants.CREATE); } else { setTask(Constants.EDIT); setUsername(getUser().getUsername()); setPassword(getUser().getPassword()); setPassword2(getUser().getPassword()); } return SUCCESS; } COM: <s> p retrieve user object to edit or null if user does not exist </s>
funcom_train/20364266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setTraitXML( Element xml , MutableList<TraitData> list) { list.clear(); Element[] elems = JDOMUtils.getChildArray( xml, "traitData" ); TraitType type = ( xml.getName().equals("assets") ? TraitType.ASSET : TraitType.COMPLICATION ); for ( Element e : elems ) { TraitData tdata = TraitData.createTraitData( e ); tdata.setType( type ); list.add ( tdata ); } } COM: <s> retreive a trait list from the given xml </s>
funcom_train/1572813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Exception appendContentHTMLString(final String _s) { if (_s == null || _s.length() == 0) return null; // TBD: flush at a certain size? if (this.stringBuffer == null) this._ensureStringBuffer(); return this.contentCoder.encodeString(this.stringBuffer, _s); } COM: <s> adds the given string to the response after escaping it according to </s>
funcom_train/44534742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doUpdate(String id, Object o) throws Exception { //TODO Transfer to Hibernate // try { // fbds.getSqlmap().startTransaction(); // fbds.getSqlmap().update(id, o); // fbds.getSqlmap().commitTransaction(); // } catch (Exception e) { // throw new Exception(e); // } finally { // fbds.getSqlmap().endTransaction(); // } } COM: <s> perform simple update </s>
funcom_train/34998686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String buildUrl(String module, String action, Object... args) { StringBuilder sb = new StringBuilder() .append(this.request.getContextPath()).append('/') .append(module).append('/') .append(action); if (args.length > 0) { sb.append('/'); for (int i = 0; i < args.length - 1; i++) { sb.append(args[i]).append('/'); } sb.append(args[args.length - 1]); } sb.append(this.config.getValue(ConfigKeys.SERVLET_EXTENSION)); return sb.toString(); } COM: <s> build an url from a given module action and optional arguments </s>
funcom_train/25577362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean shouldIncludeInFocusTraversal(Component c) { // base conditions: must be focusable and visible if (c != null && c.isFocusable() && c.isVisible()) { if (c instanceof JTextComponent) { return ((JTextComponent) c).isEditable(); } else if (c instanceof RDockable.JDockable) { return isNextFocusableComponentNotFound(c); } else { return true; } } return false; } COM: <s> checks if the component should gain the focus when traversing i </s>
funcom_train/9119302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getExpectedHTMLOutput() { StringBuffer html = new StringBuffer(); html.append("<meta name=\"language.qualifier\" content=\"").append(TEST_QUALIFIER).append("\" />\n"); html.append("<meta name=\"language.value\" content=\"").append(TEST_VALUE).append("\" />\n"); return (html.toString()); } COM: <s> returns the expected html output for this unit test </s>
funcom_train/18028988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConvertTo() { System.out.println("convertTo"); QDataSet ds = null; Units u = null; QDataSet expResult = null; QDataSet result = DataSetUtil.convertTo(ds, u); 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 convert to method of class data set util </s>
funcom_train/21955243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean alreadyRead(Message m, Folder f) throws javax.mail.MessagingException { String newUid = getUID(m, f); if (Pooka.isDebug()) System.out.println("checking to see if message with uid " + newUid + " is new."); boolean returnValue = uidsRead.contains(newUid); if (Pooka.isDebug()) System.out.println(newUid + " already read = " + returnValue); return returnValue; } COM: <s> p checks to see whether or not weve already read this message </s>
funcom_train/2380422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean open() { InputDialog dialog = new InputDialog(_shell, "New File", "Enter name", "", new InputValidator()); int code = dialog.open(); if(code == Window.OK) { String s = dialog.getValue(); _newFile = new File(_parentFolder, s); return true; } else { return false; } } COM: <s> throw up a dialog asking for a resource group name </s>
funcom_train/25143276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBug20888() throws Exception { String s = "SELECT 'What do you think about D\\'Artanian''?', \"What do you think about D\\\"Artanian\"\"?\""; this.pstmt = ((com.mysql.jdbc.Connection) this.conn) .clientPrepareStatement(s); this.rs = this.pstmt.executeQuery(); this.rs.next(); assertEquals(this.rs.getString(1), "What do you think about D'Artanian'?"); assertEquals(this.rs.getString(2), "What do you think about D\"Artanian\"?"); } COM: <s> tests fix for bug 20888 escape of quotes in client side prepared </s>
funcom_train/42364629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void tryToWin() { Player p = new DummyPlayer(this.symbol,board); Memento actualState = board.getMemento(); for (int i = 0; i < IBoard.COLUMN_COUNT; i++){ try { board.insertCoin(p, i); if (board.isWinner(p)){ evaluatedColumn = i; board.setMemento(actualState); System.out.println("Possibility found to win!"); return; } else { board.setMemento(actualState); } } catch (GameException e) { e.printStackTrace(); } } } COM: <s> method that evaluates the column to win the game directly if possible </s>
funcom_train/37002581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getOffset(int thePos) { int out = 0; if (thePos > 0) { thePos = thePos - 1; //didn't want to make thePos-- ListEntryT temp = (ListEntryT) EntryList.get(thePos); out = temp.getOffset(); out += temp.getSize(); } return out; } COM: <s> calculates offset incremental by obtaining the offset and size of the </s>
funcom_train/35530569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeLine(char[] cbuf, int off, int len) throws IOException { synchronized (getWriteLock()) { for (int ii = 0; ii < len; ii++) { final char nextChar = cbuf[off++]; writer.write(nextChar); if (nextChar == '\r') { // Bare CR. writer.write('\0'); } } writer.write("\r\n"); } } COM: <s> writes characters to the remote end adding line termination </s>
funcom_train/11649023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void uncache(Session session) { if (session == null) { return; } Serializable id = session.getId(); if (id == null) { return; } Cache<Serializable, Session> cache = getActiveSessionsCacheLazy(); if (cache != null) { cache.remove(id); } } COM: <s> removes the specified session from the cache </s>
funcom_train/41826890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearCookies(String url) { String host = Browser.getHost(url); Iterator<String> it = getCookies().keySet().iterator(); String check = null; while (it.hasNext()) { check = it.next(); if (check.contains(host)) { cookies.get(check).clear(); break; } } } COM: <s> clears all cookies for the givven url </s>
funcom_train/33772773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Set renameObjectKeys(S3Object[] objects) { Set newNames = new HashSet(); for (int i = 0; i < objects.length; i++) { String newName = renameObjectKey(objects[i].getKey(), i); newNames.add(newName); } return newNames; } COM: <s> return the renamed keys that will result from the proposed renaming pattern </s>
funcom_train/27824057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyChanges(List changeEvents) throws KAONException { synchronized (m_oimodelGraph) { try { m_oimodelGraph.suspendEvents(); Iterator iterator=changeEvents.iterator(); while (iterator.hasNext()) { ChangeEvent changeEvent=(ChangeEvent)iterator.next(); changeEvent.accept(this); } } finally { m_oimodelGraph.resumeEvents(); } } } COM: <s> processes the list and applies the changes to the graph </s>
funcom_train/30156995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(XMLWriter out, boolean includeUniqueID, boolean onlyIfNotEmpty) { if (!onlyIfNotEmpty || !isEmpty()) { out.startTag(getXMLTagName()); if (includeUniqueID) { out.writeAttribute(ATTRIBUTE_UNIQUE_ID, getUniqueID().toString()); } out.writeAttribute(LoadState.ATTRIBUTE_VERSION, getXMLTagVersion()); out.finishTagEOL(); saveSelf(out); out.endTagEOL(getXMLTagName(), true); } } COM: <s> saves the root tag </s>
funcom_train/14378548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRotation(Transform3D xform) { rotateX(xform.getCosAngleX(), xform.getSinAngleX()); rotateZ(xform.getCosAngleZ(), xform.getSinAngleZ()); rotateY(xform.getCosAngleY(), xform.getSinAngleY()); } COM: <s> rotates this vector with the angle of the specified transform </s>
funcom_train/3173838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDescription() { // "Child of Meier, Sven (I1)" if (parentOrFamily instanceof Indi) return resources.getString("create.child.of", parentOrFamily); // "Child in Meier, Sven (I1) + Radovcic Sandra (I2) (F1)" return resources.getString("create.child.in", parentOrFamily); } COM: <s> description of what thisll do </s>
funcom_train/17680204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String formatPkString() { if (pk == null) return "(null)"; StringBuffer s = new StringBuffer(); for (int i = 0; i < pk.length; i++) { if (i > 0) s.append(", "); s.append(pk[i]); } return s.toString(); } COM: <s> format the primary key as a string for debugging </s>
funcom_train/10926235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WordLengthPair chooseRandomStart_() { Set<WordLengthPair> keys = chains.keySet(); Set<WordLengthPair> validStarts = new HashSet<WordLengthPair>(starts); validStarts.retainAll(keys); int index = randomInt(validStarts.size()); WordLengthPair wlPair = validStarts.toArray(new WordLengthPair[0])[index]; return wlPair; } COM: <s> picks a random starting chain </s>
funcom_train/50392315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execAndWait(String orig, ExecutionContext ec) throws TSIBusyException,ExecutionException { try{ LocalExecution ex=new LocalExecution(configuration,orig,ec.getWorkingDirectory(),ec); ex.execute(false); Integer exitCode=LocalExecution.getExitCode(ec.getActionID()); if(exitCode!=null)ec.setExitCode(exitCode.intValue()); }catch(RejectedExecutionException re){ throw new TSIBusyException("Execution currently not possible."); }catch(Exception ex){ throw new ExecutionException("Error while executing <"+orig+">",ex);} } COM: <s> execute a command synchronously </s>
funcom_train/37507000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Subscription addSubscription(String aSubject, String aLabel) throws PushletException { Subscription subscription = Subscription.create(aSubject, aLabel); subscriptions.put(subscription.getId(), subscription); info("Subscription added subject=" + aSubject + " sid=" + subscription.getId() + " label=" + aLabel); return subscription; } COM: <s> add a subscription </s>
funcom_train/28113331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean execute() { if ( setter.isInteger() ) { for(int i=0; i<Network.size(); ++i) { // we avoid the entire expression being cast to double setter.set(i,Math.round(i*step)+min.longValue()); } } else { for(int i=0; i<Network.size(); ++i) { setter.set(i,i*step+min.doubleValue()); } } return false; } COM: <s> initializes a protocol vector with values in the range </s>
funcom_train/49651023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand1() { if (backCommand1 == null) {//GEN-END:|49-getter|0|49-preInit // write pre-init user code here backCommand1 = new Command("Back", Command.BACK, 0);//GEN-LINE:|49-getter|1|49-postInit // write post-init user code here }//GEN-BEGIN:|49-getter|2| return backCommand1; } COM: <s> returns an initiliazed instance of back command1 component </s>
funcom_train/37739906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void timeoutBlock() throws Exception { ProcessMgr mgr = defDir.processMgr("SystemTest", "timeoutBlock"); WfProcess proc = mgr.createProcess(requester); String procKey = proc.key(); proc.start(); assertTrue(stateReached(proc, "closed.completed")); ProcessData data = proc.processContext(); String path = (String)data.get("TransitionPath"); assertTrue(path, path.equals("PATH:start:a1:t1:a3:a2:t0:end")); procDir.removeProcess(proc); } COM: <s> test deadline execution within block activity </s>
funcom_train/9285725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DatabaseMetaData getMetaData() throws SQLException { checkIfClosed(); if (dbMetadata == null) { // There is a case where dbname can be null. // Replication client of this method does not have a // JDBC connection; therefore dbname is null and this // is expected. // dbMetadata = factory.newEmbedDatabaseMetaData(this, getTR().getUrl()); } return dbMetadata; } COM: <s> a connections database is able to provide information </s>
funcom_train/45542271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canIgnore(IJSCElementDelta[] delta) { if (delta.length != 1) return false; // become working copy if (delta[0].getFlags() == IJSCElementDelta.F_PRIMARY_WORKING_COPY) return true; // save if (delta[0].getFlags() == IJSCElementDelta.F_PRIMARY_RESOURCE && delta[0].getElement().equals(fReconciledElement)) return true; return canIgnore(delta[0].getAffectedChildren()); } COM: <s> check whether the given delta has been </s>
funcom_train/7624373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finishActivity(int requestCode) { if (mParent == null) { try { ActivityManagerNative.getDefault() .finishSubActivity(mToken, mEmbeddedID, requestCode); } catch (RemoteException e) { // Empty } } else { mParent.finishActivityFromChild(this, requestCode); } } COM: <s> force finish another activity that you had previously started with </s>