__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/48076281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ClassDefinition getClassDefinitionFromAgent( String classname ) { if( BytecodeAgent.isLoaded() ) { byte[] bytecode = bytecodeAgent.getByteCode(classname); if( bytecode != null ) { if( log.isDebugEnabled() ) { log.debug( "BytecodeAgent had class definition for " + classname ); } return new ClassDefinition( classname, bytecode ); } } return null; } COM: <s> returns the classdefinition </s>
funcom_train/16383087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkParams() throws InvalidValueException, MissingArgumentException, ResourceUnavailableException { //Validate the path is set if (!params.containsKey(PATH)) throw new MissingArgumentException(PATH); //Validate the glob is set if (!params.containsKey(GLOB)) throw new MissingArgumentException(GLOB); //Validate the glob is set if (!params.containsKey(RECUR)) throw new MissingArgumentException(RECUR); //Check path exists } COM: <s> checks that the parameters are correct for this file record set </s>
funcom_train/15399399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent aevt) { _component.setLocation(new Point((int) _currentX,(int) _currentY)); _currentX+=_dx; _currentY+=_dy; _frame++; if (_frame==_frameCount) { _component.setLocation(_dest); _animTimer=null; _component.requestFocus(); stop(); // Remove the component if requested. if (_removeWhenDone) { Container parent=_component.getParent(); if (parent!=null) { parent.remove(_component); //parent.requestFocus(); parent.validate(); parent.repaint(); } } } } COM: <s> cleans up component when animation has completed </s>
funcom_train/34410161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double distance(ColorRgb other) { return Math.sqrt((this.r - other.r)*(this.r - other.r) + (this.g - other.g)*(this.g - other.g) + (this.b - other.b)*(this.b - other.b)); } COM: <s> given current color space rgb coordinates this method returns the </s>
funcom_train/38757474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reList() throws IOException { FTPFile[] files = client.listFiles(); dirSize = files.length - 1;// to remove root folder String dir = getCurrentPath(); fileList = new MonkeyFTPFile[dirSize]; for (int i = 0; i < dirSize; i++) { fileList[i] = new MonkeyFTPFile(dir, files[i + 1]); } } COM: <s> updates cached values file list and dir size should be called whenever </s>
funcom_train/21263776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Tipos entity) { EntityManagerHelper.log("saving Tipos instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved tipos entity </s>
funcom_train/44901724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { // reads the user's prefs from the registry, // userPrefs = UserPreferences.getPrefs(); // Create the document schedule = Schedule.getSchedule(); // Crete the JFrame schedulerFrame = new ClassroomSchedulerFrame(title + ": " + schedule.getScheduleName() + schedule.updated()); } COM: <s> creation of the global components for the application </s>
funcom_train/39125189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSelected(Collection<? extends T> list) { selectedList.addAll(list); for (T item : list) item.setSelected(true); if (list.size() != 0 ) focus=list.iterator().next(); // Notify selection listeners // notifyListeners(); /* for (SelectionListener<T> selectionListener : selectionListeners) selectionListener.addedToSelection(this, list); */ project.setSelectionFocus(this); dirty=true; } COM: <s> add multiple items to the selection </s>
funcom_train/2624909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { final StringBuffer result = new StringBuffer(); result.append(super.toString().replaceAll(".*\\.", "")); result.append('['); result.append("width="); result.append(width); result.append(",height="); result.append(height); result.append(']'); return result.toString(); } COM: <s> returns a string representation of this dimension object </s>
funcom_train/17049665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTagPath(Tree<XmlLite.Data> node) { // walk up the tree, pruning nodes until there is a sibling. while (node != null) { final Tree<XmlLite.Data> nextNode = (node.getNumSiblings() == 1) ? node.getParent() : null; node.prune(true, true); node = nextNode; } } COM: <s> remove the tag path ending with the given node </s>
funcom_train/5381057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Label getValueControl(Composite parent) { if (valueControl == null) { valueControl = new Label(parent, SWT.LEFT); valueControl.setFont(parent.getFont()); valueControl.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent event) { valueControl = null; } }); } else { checkParent(valueControl, parent); } return valueControl; } COM: <s> returns the value control for this field editor </s>
funcom_train/18577325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int payloadLength() { int l_ = 0; payloadToBytes(); if (children_ != null) { for (int i = 0; i < children_.size(); i++) { l_ += ((TreePacket) children_.get(i)).length(); } } if (payload_ != null) l_ += payload_.length; if (payload_ != null && children_ != null) l_++; return l_; } COM: <s> the length of the tree packet excluding the header i </s>
funcom_train/9197144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { Attribute attribute = null; try { attribute = (Attribute) super.clone(); } catch (final CloneNotSupportedException ignore) { // Won't happen } // Name, namespace, and value are references to imutable objects // and are copied by super.clone() (aka Object.clone()) // super.clone() copies reference to set parent to null attribute.parent = null; return attribute; } COM: <s> this will return a clone of this code attribute code </s>
funcom_train/19028497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getFileMenu() { if (fileMenu == null) { fileMenu = new JMenu(); fileMenu.setText("File"); fileMenu.add(getFileNewMenuItem()); fileMenu.add(getFileOpenMenuItem()); fileMenu.add(getFileSaveMenuItem()); fileMenu.add(getFileSaveAsMenuItem()); fileMenu.add(getFileExitMenuItem()); } return fileMenu; } COM: <s> this method initializes j menu </s>
funcom_train/37422800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParameter(String name) { try { Vector values = (Vector)cParameters.get(name); if (values == null || values.size() == 0) { return null; } String value = (String)values.elementAt(values.size() - 1); return value; } catch (Exception e) { return null; } } COM: <s> returns the value of the named parameter as a string or null if </s>
funcom_train/12935918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDefiniteDocumentNo() { MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); if (dt.isOverwriteDateOnComplete()) { setDateOrdered(new Timestamp (System.currentTimeMillis())); } if (dt.isOverwriteSeqOnComplete()) { String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true, this); if (value != null) setDocumentNo(value); } } COM: <s> set the definite document number after completed </s>
funcom_train/46701592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveResourceBundle(File outputFile, UJO ujo, String header, Object context) throws IOException { final OutputStream out = getOutputStream(outputFile); try { saveResourceBundle(out, ujo, header, context); } finally { out.close(); } } COM: <s> save ujo into java resource bundle </s>
funcom_train/8075176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AffineProbMetric () { m_editopProbs = new double[128][128]; m_editopLogProbs = new double[128][128]; m_editopOccs = new double[128][128]; m_editopCosts = new double[128][128]; initProbs(); normalizeEmissionProbs(); normalizeTransitionProbs(); updateLogProbs(); initCosts(); } COM: <s> set up an instance of affine prob metric </s>
funcom_train/9819038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float floatValue() throws FPException { FloatBV convertedBV = new FloatBV (IEEE754_SINGLE_WIDTH, IEEE754_SINGLE_EXPONENT_WIDTH, 0); fpConvert (this, convertedBV); return Float.intBitsToFloat (convertedBV.thisBV.intValue()); } COM: <s> returns a single precision floating point representation of a float bv </s>
funcom_train/18671357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateBullet(int id, int type,Point location, double direction) { // Make sure that the bullet exists. synchronized (bullets){ int index = findBulletIndex(id); if (index != -1) { Bullet bullet = (Bullet)bullets.get(index); bullet.setType(type); bullet.setLocation(location); bullet.setDirection(direction); } } } COM: <s> update the bullet specified by its id with the location and direction </s>
funcom_train/37769558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resubmitMessage(MessageViewerInDto input) throws ApplicationExceptions, FrameworkException{ if (input.getMessageMode() == MessageModeEnum.ERROR) JmsBrowser.resubmitMessage(JmsBrowser.getErrorQueueName(), input.getJMSMessageID()); else log.warn("Only an Error message can be resubmitted"); } COM: <s> resubmits a message </s>
funcom_train/48406384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRequiredQualificationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TaskDefinition_requiredQualification_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TaskDefinition_requiredQualification_feature", "_UI_TaskDefinition_type"), SpemxtcompletePackage.eINSTANCE.getTaskDefinition_RequiredQualification(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the required qualification feature </s>
funcom_train/49026704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getEliminaButton() { if (eliminaButton == null) { eliminaButton = new JButton(); eliminaButton.setText("Elimina"); eliminaButton.setIcon(new ImageIcon(getClass().getResource("/icone/application-remove-icon.png"))); eliminaButton.setFont(new Font("Dialog", Font.BOLD, 12)); eliminaButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); eliminaButton.setEnabled(false); eliminaButton.addActionListener(this); } return eliminaButton; } COM: <s> this method initializes elimina button </s>
funcom_train/29869987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJRootPanel() { if (jRootPanel == null) { jRootPanel = new JPanel(); jRootPanel.setLayout(new BorderLayout()); jRootPanel.setPreferredSize(new Dimension(400, 400)); jRootPanel.add(getJCenterPanel(), BorderLayout.CENTER); jRootPanel.add(getJSouthPanel(), BorderLayout.SOUTH); } return jRootPanel; } COM: <s> this method initializes j root panel </s>
funcom_train/46624546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File getFile(String name) throws FileNotFoundException { URL url = getClass().getResource(name); if (url == null){ throw new FileNotFoundException("Unable to load '" + name + "' from classpath"); } return new File(url.getFile()); } COM: <s> load the file from the caller classloader that loaded this class </s>
funcom_train/25749032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearAllOnlineMenus() { for (int i = 2; i < menuBar.getMenuCount() - 1; i++) { menuBar.getMenu(i).removeAll(); menuBar.getMenu(i).setEnabled(false); } menuGlobal.setEnabled(false); } COM: <s> clears and disables all online menus </s>
funcom_train/23287845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPersistAuditEvent() throws Exception { log.debug("Test Case: testPersistAuditEvent()..."); AuditEvent ae = new AuditEvent(Level.DEBUG, "TestCase", "Message"); getEventManager().saveEvent(ae.getEvent()); log.debug("AuditEvent saved."); } COM: <s> test the audit events persistence </s>
funcom_train/48630704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetListeVilles() { System.out.println("getListeVilles"); Itineraire instance = new Itineraire(); ArrayList<String> expResult = null; ArrayList<String> result = instance.getListeVilles(); 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 liste villes method of class itineraire </s>
funcom_train/41524937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TransformerHandler getTransformerHandler() throws Exception { SAXTransformerFactory stf = null; StreamSource sc = null; stf = (SAXTransformerFactory) TransformerFactory.newInstance(); if (xslt != null) sc = new StreamSource(xslt.openStream(), xslt.toExternalForm()); return (sc == null) ? stf.newTransformerHandler() : stf .newTransformerHandler(sc); } COM: <s> get the xsl transformer to convert dicom into xml </s>
funcom_train/11372024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { for(RecoveringBlock b : blocks) { try { logRecoverBlock("NameNode", b.getBlock(), b.getLocations()); recoverBlock(b); } catch (IOException e) { LOG.warn("recoverBlocks FAILED: " + b, e); } } } COM: <s> recover a list of blocks </s>
funcom_train/37607538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearLanes(int dir) { int lnct = qlane.size(); for (int kkk=0; kkk < lnct; kkk++) { ONLane zlane = this.useLane(kkk); if (zlane.getLaneDir() == dir) { zlane.setLaneDir(0); zlane.setShared(false); } else if (zlane.getLaneDir() == 0) // thru // fix shared all if (zlane.isShared()) zlane.setLaneDir(-dir); } this.setStartLanes(); } // clearLanes() COM: <s> makes either left or right turn lanes into thru lanes </s>
funcom_train/43421452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics graphics) { setFont(Tools.getFont()); graphics.setColor(new Color(240, 240, 240)); graphics.fillRect(0, 0, getBounds().width, getBounds().height); computeSteps(); drawAxes(graphics, true); drawHours(graphics); drawReferenceLines(graphics, true, true); } COM: <s> draws the chart of specified type from given days </s>
funcom_train/16382238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String receiveUdpMessage() throws IOException, SocketException { dataPacket = new DatagramPacket(buf, SipServerConstants.MAX_PACKET_SIZE); udpSocket.receive(dataPacket); LOGGER.info("receiving SIP message from " + dataPacket.getAddress().getHostAddress() + " and port " + dataPacket.getPort()); return new String(dataPacket.getData(), 0, dataPacket.getLength()); } COM: <s> receiving udp datagram </s>
funcom_train/18032066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getTabbedPane() { JTabbedPane tb = new JTabbedPane(); for (int i=0; i<m_exifBean.getCategoryCount(); i++) { ExifCategoryBean categoryBean = m_exifBean.getCategory(i); tb.addTab(categoryBean.getDescription(), createTab(categoryBean)); } return tb; } COM: <s> creates and returns the tabbed pane </s>
funcom_train/3903693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validatePercentType_Max(BigDecimal percentType, DiagnosticChain diagnostics, Map context) { boolean result = percentType.compareTo(PERCENT_TYPE__MAX__VALUE) <= 0; if (!result && diagnostics != null) reportMaxViolation(ImsssPackage.Literals.PERCENT_TYPE, percentType, PERCENT_TYPE__MAX__VALUE, true, diagnostics, context); return result; } COM: <s> validates the max constraint of em percent type em </s>
funcom_train/10842702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getServletPath(ComponentContext ctx) { final Dictionary<?, ?> config = ctx.getProperties(); String result = (String)config.get(SERVLET_PATH_NAME); if(result != null && result.trim().length() == 0) { result = null; } return result; } COM: <s> return the path at which to mount this servlet or null </s>
funcom_train/48668743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void highlight() { if (highlighter != null) { SwingUtilities.invokeLater(new Runnable() { public void run() { styledDocument.removeUndoableEditListener(undoManager); styledDocument.removeDocumentListener(eventHandler); // TODO: future versions should highlight only visible range highlighter.applyHighlight(styledDocument, 0, styledDocument.getLength()); styledDocument.addUndoableEditListener(undoManager); styledDocument.addDocumentListener(eventHandler); } }); } } COM: <s> remove undo manager apply highlight put back undo manager </s>
funcom_train/51209855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVGridSize(double val) { if (Double.isNaN(val) || Double.isInfinite(val) || 0.0 > val) val = 0.0; if (val == getVGridSize()) return; Event<? extends SettingsEvent> actionEvent = checkObservers(GS_VGridSize, val); if (null == actionEvent) return; vGridSize = val; notifyObservers(actionEvent); } COM: <s> sets the interval between the vertical grid bars </s>
funcom_train/38309525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void apply(Object operand) throws TypeMismatchException { if (calculateTotalResult) { // applying executor on total result totalResult = executor.execute(totalResult, operand); } if (groups != null) { // applying executor on groups for (int i = 0; i < groups.length; i++) { ReportGroup group = groups[i]; group.applyFunction(columnIdx, executor, operand); } } } COM: <s> applies the function for the given operand on the given current value </s>
funcom_train/43589913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getUpdateButton() { if (updateButton == null) { updateButton = new JButton(); updateButton.setText("Download Update via Web Browser"); updateButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent e) { Zenses.getInstance().openBrowser("http://sixones.com/projects/zenses/update.html"); ViewHandler.getInstance().hideUpdateWindow(); } }); } return updateButton; } COM: <s> this method initializes update button </s>
funcom_train/36375474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private S createExecutableStats() { try { return this.statsClass.newInstance(); } catch (Exception ex) { logger.warn("could not create instance of stats class " + this.statsClass.getName()); throw new IllegalStateException("could not create instance of stats class " + this.statsClass.getName(), ex); } } COM: <s> factory method for creating in instance of executable stats </s>
funcom_train/36172282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPitchBankHeading(XYZ xyz, int pitchIndex, int bankIndex, int headingIndex) { if (pitchIndex < 0 || pitchIndex > 2 || bankIndex < 0 || bankIndex > 2 || headingIndex < 0 || headingIndex > 2) throw new IllegalArgumentException("Indices out of bound"); pitch = xyz.get(pitchIndex); bank = xyz.get(bankIndex); heading = xyz.get(headingIndex); } COM: <s> copy the pitch bank heading of this initposition from a </s>
funcom_train/40545514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void draw() { if (!needRedraw) { return; } surface.clear().fillBackground(KnownColor.BLACK); // Draw the blocks. for (int r = 0; r < matrix.getNumRows(); r++) { for (int c = 0; c < matrix.getNumCols(); c++) { renderer.drawBlock(surface, r, c, matrix.getBlock(r, c)); } } needRedraw = false; } COM: <s> draws the tetris game </s>
funcom_train/8218214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getEnvironment() { List env = new ArrayList(); Enumeration keys = variables.keys(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); env.add(key + "=" + variables.getProperty(key)); } return env; } COM: <s> returns all environment variables which were set at the time the class </s>
funcom_train/22188835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public Song getPreview() { // Song s = null; // try { // s = ((QSong)q.get(0)).getSong(); // } catch (IndexOutOfBoundsException ioobE) { // // do nothing, just return null. // s = new Song(); // } // if ( s == null ) // s = new Song(); // return s; // } COM: <s> non destructively see which song is at the top of the queue </s>
funcom_train/16086500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updatePolygon() { resetPolygon(); if(getAngle()!=0.0) { for(int i = 0;i<super.numVertices();i++) { super.getVertex(i).rotate(getAngle()); } } for(int i = 0;i<super.numVertices();i++) { super.getVertex(i).add(getPosition()); } super.updateBounds(); } COM: <s> updates the bounding polygon </s>
funcom_train/33669023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String send(){ CollectionUtils.addAll(this.saludos, StringUtils.split(this.manyWords)); for(String saludo:saludos){ Amigo choto = new Amigo(saludo,Math.random()); this.chotos.add(choto); } return ("success"); } COM: <s> method that is backed to a submit button of a form </s>
funcom_train/2879055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFactoryWalk() throws Exception { int count = 0; ReverseListIterator<Integer> listIterator = iterate(longList); for (int value : listIterator) { count += value; } int previous = longList.size() + 1; for (int value : listIterator) { assertEquals(previous, value + 1); previous = value; count += value; } assertEquals(10, count); } COM: <s> test that the iterator restarts from the top </s>
funcom_train/7511480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPaneImageFiltered() { if (jScrollPaneImageFiltered == null) { jScrollPaneImageFiltered = new JScrollPane(); jScrollPaneImageFiltered .setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); jScrollPaneImageFiltered.setViewportView(getJPanelImageFiltered()); jScrollPaneImageFiltered .setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); } return jScrollPaneImageFiltered; } COM: <s> this method initializes j scroll pane image filtered </s>
funcom_train/7502558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete() { if (isBarGraph_) return; if (startSelection_ < endSelection_) wavWriter_.delete(adjustBounds(startSelection_), adjustBounds(endSelection_), graph_.getXSpace() * graph_.getPoints().length); else wavWriter_.delete(adjustBounds(endSelection_), adjustBounds(startSelection_), graph_.getXSpace() * graph_.getPoints().length); endSelection_ = startSelection_; } COM: <s> delete all points in selection </s>
funcom_train/38952818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void streamException(HttpServletRequest request, HttpServletResponse response, Exception e) throws IOException, ServletException { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); pw.flush(); request.setAttribute("error", sw.toString()); RequestDispatcher rd = request.getRequestDispatcher("/WEB-INF/error.jsp"); rd.forward(request, response); } COM: <s> convert a caught exception to a page to be displayed </s>
funcom_train/34805279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValueAsString(String pColumnName) throws ExCursorRoot { try { return mRset.getString(pColumnName); } catch (SQLException ex) { // TODO: handle this error properly throw new ExCursorRoot("Error: There was a problem returning the column value as a string", ex); } } COM: <s> returns the column value </s>
funcom_train/48404855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addMouseMoveHandler(com.smartgwt.client.widgets.events.MouseMoveHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.MouseMoveEvent.getType()) == 0) setupMouseMoveEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.MouseMoveEvent.getType()); } COM: <s> add a mouse move handler </s>
funcom_train/32212456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean notCanceled() { if(global.getDocChanged()){ int confirmClose = JOptionPane.showConfirmDialog ( builder, "Save changes before closing?" ); if(confirmClose != JOptionPane.CANCEL_OPTION){ if (confirmClose == JOptionPane.YES_OPTION) return(actionsPanel.saveResave()); else return true; } else { return false; } } else { return true; } } COM: <s> called to confirm a document closing event </s>
funcom_train/15926412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop(BundleContext context) throws Exception { super.stop(context); // For some reason, X10Builder.build() gets called with an AUTO build // after stop() gets called, and it tries to use the plugin instance // to get at the log... resulting in an NPE. So don't null it out. // sPlugin= null; } COM: <s> this method is called when the plug in is stopped </s>
funcom_train/4126232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOptionGroup(OptionGroup optionGroup) { // Add the option group allOptionGroups.put(optionGroup.getId(), optionGroup); // Add the options of the group Iterator<Option> iter = optionGroup.iterator(); while(iter.hasNext()){ Option option = iter.next(); addAbstractOption((AbstractOption) option); } } COM: <s> adds an code option group code to the specification </s>
funcom_train/32759058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void layoutGui() { this.setLayout( new GridBagLayout() ); this.add( this.pnlTrgEvt, new GridPosition(0, 0, 1, 2) ); this.add( this.knbTrgDly, new GridPosition(1, 0, 1, 1) ); this.add( this.whlTrgDly, new GridPosition(1, 1, 1, 1) ); } COM: <s> layout the gui display </s>
funcom_train/27944887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map defaultArguments() { Map args=super.defaultArguments(); Connector.Argument arg; arg=new StringArgumentImpl(false, bundle.getString("Port"), bundle.getString("PortDesc"), "port"); arg.setValue(""); args.put(arg.name(), arg); return args; } COM: <s> returns the arguments accepted by this connector and their default values </s>
funcom_train/27904376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void evalMoreInputs(Node node) { if(node == null) { return; } String value = node.getValue(); if(value.equals("moreInputs")) { Node input = node.getChild("input"); Node more = node.getChild("moreInputs"); evalInput(input); evalMoreInputs(more); } else { syntaxError(node,"evalMoreInputs()"); } } COM: <s> evaluates a more inputs production </s>
funcom_train/38806355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawKickoffTime(int x, int y, int height) { if (log.isDebugEnabled()) { log.debug("Draw Kickoff time at " + context.getConfig().getBlankStepsToKickoffTime()); } x = x + step_length * context.getConfig().getBlankStepsToKickoffTime(); this.drawKickoffOrDeadline(context.getConfig().getKickoffTimeBackColor(), x, y, height); } COM: <s> draw kick off time </s>
funcom_train/32057744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTouch() { System.out.println("testSetTouch"); GPGraphpad pad = new GPGraphpad(); GPGraph graph = new GPGraph(); GraphUndoManager undo = new GraphUndoManager(); GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo); try { newDoc.setTouch(null); } catch (Exception e) { fail(); } } COM: <s> test of set touch method of class gpdocument </s>
funcom_train/9885033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AlgorithmData execute(AlgorithmData data) throws AlgorithmException { AlgorithmParameters map = data.getParams(); numNeighbors = map.getInt("numNeighbors", 10); Org = data.getMatrix("experiment"); numGenes = this.Org.getRowDimension(); numExps = this.Org.getColumnDimension(); AlgorithmData result = Analysis(Org); return result; } COM: <s> this method execute calculation and return result </s>
funcom_train/40679005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect(final VIDEO_TAGS_CHANGED listener) { connect(VIDEO_TAGS_CHANGED.class, listener, new GstCallback() { @SuppressWarnings("unused") public void callback(PlayBin2 elem, int stream) { listener.videoTagsChanged(elem, stream); } }); } COM: <s> adds a listener for the code video tags changed code signal </s>
funcom_train/24181762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractTypeChecker getTypeChecker(String typeName) { AbstractTypeDeclaration atd = getType(this.cu, typeName); if (atd instanceof TypeDeclaration) { return new TypeChecker((TypeDeclaration) atd); } else if (atd instanceof EnumDeclaration) { return new EnumTypeChecker((EnumDeclaration) atd); } else if (atd instanceof AnnotationTypeDeclaration) { // return new Anno((TypeDeclaration) atd); } return null; } COM: <s> return an abstract type checker instance if this compilation unit contains </s>
funcom_train/5430369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readInt(int pos) { return (((int)(data[pos+0] & 0xff) << 24) | ((int)(data[pos+1] & 0xff) << 16) | ((int)(data[pos+2] & 0xff) << 8) | ((int)(data[pos+3] & 0xff) << 0)); } COM: <s> reads an int from the indicated position </s>
funcom_train/43293382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected XMLScanner getXMLScanner() { // initialized? if (m_Scanner == null) { m_Scanner = new XMLScanner(m_ColorManager); m_Scanner.setDefaultReturnToken(new Token(new TextAttribute( m_ColorManager.getColor(IColorConstants.DEFAULT)))); } return m_Scanner; } COM: <s> get the xml scanner </s>
funcom_train/22975120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public final static ColumnRenamer NULL = new ColumnRenamer() { public AliasMap applyTo(AliasMap aliases) { return aliases; } public Attribute applyTo(Attribute original) { return original; } public Expression applyTo(Expression original) { return original; } public Join applyTo(Join original) { return original; } public Set applyToJoinSet(Set joins) { return joins; } public String toString() { return "ColumnRenamer.NULL"; } }; COM: <s> an optimized column renamer that leaves every column unchanged </s>
funcom_train/39877322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean resetPassword(String password, int flags) { if (mService != null) { try { return mService.resetPassword(password, flags); } catch (RemoteException e) { Log.w(TAG, "Failed talking with device policy service", e); } } return false; } COM: <s> force a new device unlock password the password needed to access the </s>
funcom_train/3339559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectionTimedOut(ConnectionEvent ce) { try { terminalIO.write("CONNECTION_TIMEDOUT"); terminalIO.flush(); // close connection connection.close(); console.close(); } catch (Exception ex) { log.error("connectionTimedOut()", ex); } }// connectionTimedOut COM: <s> this implements the connection listener </s>
funcom_train/49670737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getUncachedIcon(final String name) { if (resourcePool.containsKey(name)) { return resourcePool.get(name); } final Image i = new Image(display, IconFactory.class.getClassLoader() .getResourceAsStream("icons/" + name)); resourcePool.put(name, i); return i; } COM: <s> gets uncached icon </s>
funcom_train/34954383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onCreate(Bundle savedInstanceState) { try{ super.onCreate(savedInstanceState); NateOnSingleton.SetStatus(UIStatus.OnList); setContentView(R.layout.friendlist); UpdateList(); }catch(Exception e) { TextView tv = new TextView(this); tv.setText(e.getMessage()); setContentView(tv); } } COM: <s> called when the activity is first created </s>
funcom_train/43221825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JFrame getJFrame() { if (jFrame == null) { if(util.util.DebugMainWindow) System.out.println("Creating Main Frame"); jFrame = new JFrame(); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jFrame.setJMenuBar(getJJMenuBar()); jFrame.setSize(800, 600); jFrame.setContentPane(getJContentPane()); jFrame.setTitle("FF-Verwaltung"); jFrame.setMinimumSize(new Dimension(400,300)); } return jFrame; } COM: <s> this method initializes j frame </s>
funcom_train/47891643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node toXML(Document document) throws Exception { Node result = document.createElement("rule"); Attr idAttribute = document.createAttribute("id"); idAttribute.setValue(getId()); result.getAttributes().setNamedItem(idAttribute); NodeList propNodes = getProperties().toXML(document).getChildNodes(); int x = propNodes.getLength(); for(int i = 0; i < x; i++) { result.appendChild(propNodes.item(0)); } return result; } COM: <s> serialises the rule properties back to xml </s>
funcom_train/25607255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long getRecursiveDirSize(File folder) { long foldersize = 0; fileServerListener.updateSubStatus("Processing " + folder + "..."); File[] filelist = folder.listFiles(); for (int i = 0; i < filelist.length; i++) { if (filelist[i].isDirectory()) { foldersize += getRecursiveDirSize(filelist[i]); } else { foldersize += filelist[i].length(); } } return foldersize; } COM: <s> recursively calls itself to get total directory size </s>
funcom_train/11734391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getProperty(Properties prop, String key, String defaultValue) { String sql = prop.getProperty(key, defaultValue); sql = Text.replace(sql, "${table}", tableSQL).trim(); sql = Text.replace(sql, "${tablePrefix}", tablePrefix + schemaObjectPrefix).trim(); return sql; } COM: <s> get the expanded property value </s>
funcom_train/14418246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getNormInfinity() { double result = 0.0; for (int j = sizeY - 1; j >= 0; j--) { double d = 0.0; for (int i = sizeX - 1; i >= 0; i--) d += Math.abs(getItem(i, j)); if (d > result) result = d; } return result; } COM: <s> return the infinity norm of the matrix that is equal to the </s>
funcom_train/20400175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean storeAllSettings() throws FileNotFoundException { Object s[] = files.keySet().toArray(); boolean result = true; for(int i = 0; i < s.length; i++) { result &= storeSettings((String)s[i]); } return result; } COM: <s> stores all the files managed by the settings manager </s>
funcom_train/5724910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof ChatMessageInfo)) { return false; } final ChatMessageInfo that = (ChatMessageInfo) object; if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) { return false; } return true; } COM: <s> returns code true code if the argument is an chat message info instance </s>
funcom_train/7858685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Writer write(Writer writer) throws JSONException { try { boolean b = false; Iterator<String> keys = keys(); writer.write('{'); while (keys.hasNext()) { if (b) { writer.write(','); } Object k = keys.next(); writer.write(quote(k.toString())); writer.write(':'); Object v = this.map.get(k); if (v instanceof JSONObject) { ((JSONObject) v).write(writer); } else if (v instanceof JSONArray) { ((JSONArray) v).write(writer); } else { writer.write(valueToString(v)); } b = true; } writer.write('}'); return writer; } catch (IOException e) { throw new JSONException(e); } } COM: <s> write the contents of the jsonobject as json text to a writer </s>
funcom_train/19442600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isInitialRequest(String requestBody) { boolean matches = false; matches = (requestBody.length() > NEW_REQUEST_COMMA) && (requestBody.charAt(0) == '0') && (requestBody.charAt(1) == ';') && (requestBody.charAt(NEW_REQUEST_COMMA) == ','); return (matches); } COM: <s> checks to see if the request body matches the format of an initial </s>
funcom_train/43221482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelected(boolean newState) { if (selected == newState) return; selected = newState; setBackground(selected ? getSelectionColor() : getDeselectedColor()); if (selected) { Container p = getParent(); if (p instanceof JLayeredPane) ((JLayeredPane) p).moveToFront(this); } repaint(); } COM: <s> sets the selection state </s>
funcom_train/37036700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttribute(String name, Object value) { // Name cannot be null if (name == null) throw new IllegalArgumentException (sm.getString("requestBase.setAttribute.namenull")); // Null value is the same as removeAttribute() if (value == null) { removeAttribute(name); return; } synchronized (attributes) { attributes.put(name, value); } } COM: <s> set the specified request attribute to the specified value </s>
funcom_train/40702201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getKeyName(Properties p) { final Configurable config = new Configurable("win") {{ this.registerParameter( "certname", Configurable.Type.string, DO_NOT_USE); }}; if (p != null) { config.setLocalConfig(p); } return config.getString("win.certname"); } COM: <s> returns the key to look for the certificate at </s>
funcom_train/18388909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasKey(Key key){ if(keys == null)return false; if(key == null)return false; Iterator<Key> iter = keys.iterator(); Key curKey = null; while(iter.hasNext()){ curKey = iter.next(); if(curKey.equals(key))return true; } return false; } COM: <s> detect if the current node has the key </s>
funcom_train/49462695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long getFieldLong(String field, List<String> al) throws InvalidLogLineException { Integer idx = configMap.get(field); if (idx == null) return 0L; String value = (ensureFieldNumberValid(al, idx) ? al.get(idx) : null); try{ return Long.parseLong(value); } catch(Exception e){ throw new InvalidLogLineException(value+" could not be parsed for ("+field+"), long number expected", e); } } COM: <s> returns field long value </s>
funcom_train/37414229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addServletMapping(String servletName, String urlPattern) { if (sLog.isDebugEnabled()) { sLog.debug("Process servletName=" + servletName + ", urlPattern=" + urlPattern); } if (servletName == null) { return; } if (servletName.equals(this.servletName)) { this.servletMappings.add(urlPattern); } } COM: <s> remember all servlet mapping from our web application deployment </s>
funcom_train/25801008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTexture() { TextureState state = (TextureState)this.geometry.getRenderState(StateType.Texture); if(state == null) { state = DisplaySystem.getDisplaySystem().getRenderer().createTextureState(); this.geometry.setRenderState(state); } state.setTexture(this.texture, 0); this.geometry.updateRenderState(); this.textureDirty = false; } COM: <s> initialize the geometry texture </s>
funcom_train/50501819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean showSaveCancelDialog(IPanel panel, String title) { ch.orcasys.editor.panel.dlog.SaveCancelDialog dlog = new ch.orcasys.editor.panel.dlog.SaveCancelDialog(panel, getMainFrame(), title, true); dlog.load(); dlog.show(); return dlog.isSaved(); } COM: <s> show a save cancel dialog </s>
funcom_train/1939335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateSelectionModel(int newSelectionIndex) { if (newSelectionIndex == -1) { table.getSelectionModel().clearSelection(); } else { int selectionIndex = table.convertRowIndexToView(newSelectionIndex); ListSelectionModel selectionModel = table.getSelectionModel(); selectionModel.setSelectionInterval(selectionIndex, selectionIndex); } } COM: <s> updates the selection model </s>
funcom_train/25143663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBug27412() throws Exception { Properties props = new Properties(); props.put("useServerPrepStmts", "false"); props.put("cachePreparedStatements", "true"); props.put("cacheResultSetMetadata", "true"); Connection conn2 = getConnectionWithProps(props); PreparedStatement pstm = conn2.prepareStatement("SELECT 1"); try { assertTrue(pstm.execute()); } finally { pstm.close(); conn2.close(); } } COM: <s> tests fix for bug 27412 cached metadata with </s>
funcom_train/20825378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFadeDown(final String fadeDownString) { String string = fadeDownString; int index = string.indexOf('/'); if (index != -1) { timing.setFadeOutDelay(time(string.substring(index + 1))); string = string.substring(0, index); } timing.setFadeOutTime(time(string)); } COM: <s> parse fade down time </s>
funcom_train/29837219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkConstraints() { if (constraints.isEmpty()) return; String message = ""; for (Iterator<GraphConstraint> i = constraints.iterator(); i.hasNext();) { GraphConstraint gc = (GraphConstraint) i.next(); try { gc.validate(g); } catch (UnsatisfiedConstraintException e) { // TODO save e.getMessage() together with other unsatisfied // constraints message.concat("\n" + e.getMessage()); } } if (!message.equals("")) ccl.checkFailed(message); } COM: <s> checks whether all constraints are satisfied on the specified graph </s>
funcom_train/35844012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JComponent getNamespaceSelector() { if (namespaceSelector == null) { namespaceSelector = new UMLSearchableComboBox( namespaceComboBoxModel, new ActionSetModelElementNamespace(), true); } return new UMLComboBoxNavigator( Translator.localize("label.namespace.navigate.tooltip"), namespaceSelector); } COM: <s> returns the namespace selector </s>
funcom_train/29547237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectNode(Node node) { if(node!=null) { try { tgPanel.setSelect(node); tgPanel.setLocale(node, getLookahead()); //tgPanel.expandNode(node); } catch (TGException e) { cat.debug("Unable to set lookahed!",e); } } } COM: <s> select node by java reference </s>
funcom_train/19543411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PropertyMap deleteRow(int row) { PropertyMap deletedRow = getRow(row); if (deletedRow != null) { Long key = deletedRow.getKey(); deletedKeys.add(key); insertKeys.remove(key); changeCache.remove(key); keys.remove(key); dataChanged(); } return deletedRow; } COM: <s> delete a row from the property table </s>
funcom_train/28929402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBoxLearn() { if (jCheckBoxLearn == null) { jCheckBoxLearn = new JCheckBox(); jCheckBoxLearn.setBounds(new Rectangle(382, 92, 95, 20)); jCheckBoxLearn.setText("Learn"); jCheckBoxLearn.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { onCheckBoxLearnChanged(); } }); } return jCheckBoxLearn; } COM: <s> this method initializes j check box learn </s>
funcom_train/3100671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { while (!isCycConnectionEstablished) { Thread.sleep(WAIT_TIME_INCREMENT); timerMillis = timerMillis + WAIT_TIME_INCREMENT; if (timerMillis > TIMEOUT_MILLIS) throw new InterruptedException(); } } catch (InterruptedException e) { Log.current .println("Timeout while awaiting Cyc connection establishment, closing sockets"); // close the socket connections to Cyc and kill any awaiting api // request threads if (trace == CycConnection.API_TRACE_NONE) trace = CycConnection.API_TRACE_MESSAGES; close(); } } COM: <s> waits for either the cyc connection constructor thread to set the done </s>
funcom_train/22927358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getDecreaser(FloraToken currentToken) { if (currentToken.equals(FloraKeywords.RULE_DEFINITION)) return FloraKeywords.DOT; if (currentToken.equals(FloraKeywords.QUERY_DEFINITION)) return FloraKeywords.DOT; if (currentToken.equals(FloraKeywords.PARENTHESIS_OPEN)) return FloraKeywords.PARENTHESIS_CLOSE; if (currentToken.equals(FloraKeywords.SQUARE_BRACKET_OPEN)) return FloraKeywords.SQUARE_BRACKET_CLOSE; if (currentToken.equals(FloraKeywords.CURLY_BRACKET_OPEN)) return FloraKeywords.CURLY_BRACKET_CLOSE; for (String inc : FloraKeywords.getValueReferenceConectives()) if (currentToken.equals(inc)) return FloraKeywords.COMMA; return null; } COM: <s> returns the decreaser for a increaser </s>
funcom_train/7275181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private GGEP addAddress(GGEP ggep, IpPort address) { byte[] payload = new byte[6]; System.arraycopy(address.getInetAddress().getAddress(), 0, payload, 0, 4); ByteOrder.short2leb((short) address.getPort(), payload, 4); ggep.put(GGEP.GGEP_HEADER_IPPORT, payload); return ggep; } COM: <s> adds the address ggep </s>
funcom_train/21225163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VPRelativeTime getRelativeTime() throws IllegalStateException { switch (getFormat()) { case RELATIVE_TIME: return new VPRelativeTime(data[0], VPF.RELATIVE_FORMAT); default: throw new IllegalStateException( "The VP format does not correspond to Relative Time, see " + "the method getFormat() for more information."); } } COM: <s> this will return a the vprelative time data defined in this enhanced </s>