__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/35317764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Window getGlobalActiveWindow() throws SecurityException { synchronized (KeyboardFocusManager.class) { if (this == getCurrentKeyboardFocusManager()) { return activeWindow; } else { if (focusLog.isLoggable(PlatformLogger.FINER)) { focusLog.finer("This manager is " + this + ", current is " + getCurrentKeyboardFocusManager()); } throw new SecurityException(notPrivileged); } } } COM: <s> returns the active window even if the calling thread is in a different </s>
funcom_train/9550624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextField getJTextFieldGenre() { if (jTextFieldGenre == null) { jTextFieldGenre = new JTextField(); jTextFieldGenre.setBounds(new java.awt.Rectangle(107,102,183,17)); jTextFieldGenre.setFont(new java.awt.Font("SansSerif", java.awt.Font.PLAIN, 10)); } return jTextFieldGenre; } COM: <s> this method initializes j text field </s>
funcom_train/3122436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Action getOnEnterAction(String strPrevState) { Action action = (Action) mapOnEnterActions.get(strPrevState); if (action == null) { action = (Action) mapOnEnterActions.get(ALL_TRANSITION); } if (action == null) { action = Action.EMPTY; } return (action); } // of method COM: <s> get the action that takes place when we enter this state from </s>
funcom_train/23867594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAndExpression(final String leftOperand, final String rightOperand) { CDebug.checkParameterNotEmpty(leftOperand, "leftOperand"); CDebug.checkParameterNotEmpty(rightOperand, "rightOperand"); addExpression("(" + leftOperand + " AND " + rightOperand + ")"); } COM: <s> adds a boolean and expression to this where clause that is created from </s>
funcom_train/27844935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIconConstructor() { _label = new SLabel(getDefaultWindowIcon()); _label.setTextPointer(PointerFactory.getPointer("stringProperty")); _controller.setView(_label); _controller.startup(); assertEquals(_model.getStringProperty(), _label.getText()); assertEquals(SwingConstants.CENTER, _label.getHorizontalAlignment()); } COM: <s> test icon constructor </s>
funcom_train/34558608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPaddings(int top, int left, int right, int bottom) throws IllegalStateException { Paddings paddings = new Paddings(top, left, right, bottom); String style = paddings.getStyleString(); String bodyStyle = getBodyStyle(); if (bodyStyle == null) { setBodyStyle(style); } else { setBodyStyle(bodyStyle + style); } } COM: <s> set paddings to panel </s>
funcom_train/19357509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearKnowledgeBase(String kbURI) throws DIGReasonerException { Document doc = translator.createDIGDocument(Vocab.TELLS, kbURI); Element element = doc.createElement(Vocab.CLEAR_KNOWLEDGE_BASE); doc.getDocumentElement().appendChild(element); performRequest(doc); } COM: <s> clears the knowledge base </s>
funcom_train/18856857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean eof() { if (line == null) { return true; } else { while (line != null && line.length() == 0) { try { line = reader.readLine(); } catch (IOException e) { return true; } } return (line == null); } } COM: <s> checks if the end of the file or stream is reached </s>
funcom_train/18218187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addParentNodesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_QualityNode_parentNodes_feature"), getString("_UI_PropertyDescriptor_description", "_UI_QualityNode_parentNodes_feature", "_UI_QualityNode_type"), QualityModelPackage.Literals.QUALITY_NODE__PARENT_NODES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the parent nodes feature </s>
funcom_train/33393407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isNextCharacterEscapedQuote(String nextLine, boolean inQuotes, int i) { return inQuotes // we are in quotes, therefore there can be escaped // quotes in here. && nextLine.length() > (i + 1) // there is indeed another // character to check. && format.isDelimiter(nextLine.charAt(i + 1)); } COM: <s> precondition the current character is a quote or an escape </s>
funcom_train/46070700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLookAndFeel() { try { PlasticLookAndFeel.setPlasticTheme(new SkyKrupp()); UIManager.setLookAndFeel(new PlasticXPLookAndFeel()); SwingUtilities.updateComponentTreeUI(this); } catch (UnsupportedLookAndFeelException e) { // ignore exception, i.e. use default look and feel } } COM: <s> sets the look and feel of the ols dialog </s>
funcom_train/8602337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int row, int column, Scalar element) { if (element == null) throw new NullPointerException(); element = element.mergeNumbers(scalarFactory); matrix[row][column] = scalarFactory.add(element); if (elementChangeListener != null) for (ElementChangeListener l : elementChangeListener) l.elementChanged(row, column, element); } COM: <s> sets the element of the matrix at the specified position </s>
funcom_train/40732170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNonErroneousUploads() { int ret = 0; for (IUploader u : uploaders) { if (u.getStatus() == Status.SUCCESS || u.getStatus() == Status.INPROGRESS || u.getStatus() == Status.QUEUED || u.getStatus() == Status.SUBMITING) { ret++; } } return ret; } COM: <s> return the number of uploads that have a non erroneous status </s>
funcom_train/17892785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJSelectAllNonePanel() { if (jSelectAllNonePanel == null) { jSelectAllNonePanel = new JPanel(); jSelectAllNonePanel.setLayout(new FlowLayout(FlowLayout.CENTER, 10, 5)); ButtonGroup group = new ButtonGroup(); JRadioButton button0 = getJRadioButtonAll(); JRadioButton button1 = getJRadioButtonNone(); group.add(button0); group.add(button1); button0.setSelected(true); jSelectAllNonePanel.add(button0, null); jSelectAllNonePanel.add(button1, null); } return jSelectAllNonePanel; } COM: <s> this method initializes j select all none panel </s>
funcom_train/31823935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItem (int index, String string) { checkWidget (); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); int selection = OS.SendMessage (handle, OS.CB_GETCURSEL, 0, 0); remove (index); if (isDisposed ()) return; add (string, index); if (selection != -1) { OS.SendMessage (handle, OS.CB_SETCURSEL, selection, 0); } } COM: <s> sets the text of the item in the receivers list at the given </s>
funcom_train/22023592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsProject readProject(CmsDbContext dbc, int id) throws CmsDataAccessException { CmsProject project = null; project = (CmsProject)m_projectCache.get(new Integer(id)); if (project == null) { project = m_projectDriver.readProject(dbc, id); m_projectCache.put(new Integer(id), project); } return project; } COM: <s> reads a project given the projects id </s>
funcom_train/37238180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(String fieldName, int order) { this.fieldName = fieldName.toLowerCase(); if ((order != ORDER_ASCENDING) && (order != ORDER_DESCENDING)) { throw (new IllegalArgumentException("FieldComparator order must be either FieldComparator.ORDER_ASCENDING or FieldComparator.ORDER_DESCENDING.")); } this.order = order; } COM: <s> initializes a new field comparator for the specified field in the </s>
funcom_train/22359689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(HotSpot h) throws IOException { if (h == null) return; write("HOTSPOT " + h.getID().toString(" ")); newLine(); writeQuotedTag(h.getName(), "name"); writeQuotedTag(h.getCenter().toString(" "), "coord"); } COM: <s> write the cr representation of a hot spot to the underlying stream </s>
funcom_train/40746429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItemCount(int count) { checkWidget(); setRedraw(false); if (count < 0) count = 0; if (count < items.size()) { //TODO delete and clear items if necessary } while (count > items.size()) { new GridItem(this, SWT.NONE); } setRedraw(true); } COM: <s> sets the number of items contained in the receiver </s>
funcom_train/38524282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer str = new StringBuffer(); str.append("Element name: " + name + "\n" ); if(value != null) str.append("value: " + value + "\n"); if (hasAttributes()) str.append("Attributes: \n"); HashMap at = getAttributes(); Set keys = at.keySet(); Iterator it = keys.iterator(); while (it.hasNext()){ str.append(at.get(it.next()) + "\n"); } return str.toString(); } COM: <s> outputs the name and value of the method and attributes </s>
funcom_train/35050841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPane() { if (jTabbedPane == null) { jTabbedPane = new JTabbedPane(); jTabbedPane.addTab("CBR Resilience Service", null, getJPanelCbrResilience(), null); jTabbedPane.addTab("Resilience Query Sender", null, getJPanelQuerySender(), null); } return jTabbedPane; } COM: <s> this method initializes j tabbed pane </s>
funcom_train/24428772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void gameOverMessage(Graphics g) { String msg = "Game Over. Your Score: " + mScore; int x = (mPWidth - mMetrics.stringWidth(msg)) / 2; int y = (mPHeight - mMetrics.getHeight()) / 2; g.setColor(Color.red); g.setFont(mFont); g.drawString(msg, x, y); } COM: <s> center the game over message </s>
funcom_train/7616729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getBackground() { toolkit.lockAWT(); try { // ???AWT /* * if ((backColor == null) && (parent != null)) { return * parent.getBackground(); } */ return backColor; } finally { toolkit.unlockAWT(); } } COM: <s> gets the background color for this component </s>
funcom_train/2577436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getToolTipText(int series, int item) { String result = null; if (series < getListCount()) { List tooltips = (List) this.toolTipSeries.get(series); if (tooltips != null) { if (item < tooltips.size()) { result = (String) tooltips.get(item); } } } return result; } COM: <s> returns the tool tip text for an item </s>
funcom_train/5524823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String wrapline (int columns) { int n=N,good=N; String s=""; while (n<L) { if (C[n]=='\n') { if (n>N) s=new String(C,N,n-N); N=n+1; break; } if (C[n]==' ' || C[n]=='\t' || C[n]=='\n') { good=n; } n++; if (n-N>=columns && good>N) { s=new String(C,N,good-N); N=good+1; break; } if (n>=L) { if (n>N) s=new String(C,N,n-N); N=n; break; } } if (N>=L) Error=true; return s; } COM: <s> return a string which is parsed from words with limited length </s>
funcom_train/27947647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void expandAllNodes() { int lastRowCount = -1; while (lastRowCount != tree.getRowCount()) { lastRowCount = tree.getRowCount(); for (int i = 0; i < tree.getRowCount(); i++) { tree.expandRow(i); } } } COM: <s> expand all the nodes of the tree </s>
funcom_train/47536745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset(double[] direction){ //Copy initial values System.arraycopy(o.getParameters(), 0, originalParameters, 0, o.getNumParameters()); System.arraycopy(direction, 0, searchDirection, 0, o.getNumParameters()); //Initialize variables nrIterations = 0; steps.clear(); values.clear(); gradients.clear(); values.add(o.getValue()); gradients.add(ArrayMath.dotProduct(o.getGradient(),direction)); steps.add(0); } COM: <s> called whenever we start a new iteration </s>
funcom_train/43664015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addXClassPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BService_xClass_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BService_xClass_feature", "_UI_BService_type"), XmdlboPackage.Literals.BSERVICE__XCLASS, false, false, false, null, getString("_UI_BaseModelPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the xclass feature </s>
funcom_train/26441476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void allowOnlyNickname() { bNick.setEnabled(true); bKick.setEnabled(false); bList.setEnabled(false); bTopic.setEnabled(false); bJoin.setEnabled(false); bNames.setEnabled(false); bQuery.setEnabled(false); bBan.setEnabled(false); } COM: <s> allow the user only to set is nickname </s>
funcom_train/11319994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NumberFormat getNumberFormat() { if (numberFormat == null) { Locale locale = getContext().getLocale(); numberFormat = NumberFormat.getInstance(locale); if (getPattern() != null && numberFormat instanceof DecimalFormat) { ((DecimalFormat) numberFormat).applyPattern(getPattern()); } } return numberFormat; } COM: <s> return the number format for formatting parsing the field value </s>
funcom_train/23928622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkForCorrespondence( Evaluable o ) throws InfeasibleEvaluatorException { if( !(o instanceof Correspondence<?>) ) { final String errMsg = "Base matchers are only applicable to correspondences. " + "Received " + o.getClass(); logger.warn( errMsg ); throw new InfeasibleEvaluatorException( errMsg ); } } COM: <s> checks whether the given object is of type </s>
funcom_train/8008400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean replaceComponent(HtmlComponent comp, Object compToReplace) { if (_componentsVec == null) { return false; } // get the index of the comp so we can replace it int replaceIndex = _componentsVec.indexOf(compToReplace); if (replaceIndex != -1) { // add componet contained _componentsVec.setElementAt(comp, replaceIndex); comp.setParent(this); return true; } else { MessageLog.writeDebugMessage(" HtmlContainer replaceComponent failed to replace the component ", this); return false; } } COM: <s> replaces a html component with another one that you pass in </s>
funcom_train/50092048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testSetElectronCount_Integer() { IElectronContainer ec = (IElectronContainer)newChemObject(); ec.setElectronCount(3); Assert.assertEquals(2, ec.getElectronCount().intValue()); ec.setElectronCount(null); Assert.assertEquals(2, ec.getElectronCount().intValue()); } COM: <s> the electron count of an lp is always exactly 2 </s>
funcom_train/49608709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteWaitingPersons(String username,EntityManager em,int peopleId) throws Throwable { try { Query q = em.createQuery("delete from WaitingPerson wp where wp.pk.peopleId=?1"); List<Object> params = new ArrayList<Object>(); params.add(peopleId); JPAMethods.executeUpdate(username, q, params); em.flush(); } catch (Throwable ex) { Logger.error(null, ex.getMessage(), ex); throw ex; } } COM: <s> phisically delete all waiting person objects related to the specified person </s>
funcom_train/35832255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update( Observable o, Object arg ) { try { BingoBall b = (BingoBall)arg; playSquare(b.getValue()); } catch (ClassCastException e) { String order = (String)arg; if (order.equals("D")) { playEngine.deleteObserver( this ); dispose(); //got the message to destroy self playEngine.observerDestroyed(); } else if (order.equals("C")) { clearCard(); playFreeSquare(); } } } COM: <s> updates the card </s>
funcom_train/34593776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getGenerateXCCDFXsl() { if (rtProps.getProperty("generate.xccdf.xsl.file") == null) { rtProps.setProperty("generate.xccdf.xsl.file", getXslDir() + File.separator + "generateXCCDF.xsl"); } return getInstallDir() + File.separator + rtProps.getProperty("generate.xccdf.xsl.file"); } COM: <s> return the generate xccdf xsl </s>
funcom_train/19294841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkBoxS2S_ItemStateChanged() { CardLayout card = (CardLayout) getJPanel3().getLayout(); if (getCheckBoxS2S().isSelected()) card.show(getJPanel3(), getBetaResSpecPanel().getName()); else card.show(getJPanel3(), getEquationPanel().getName()); } COM: <s> show panel to input restrictions </s>
funcom_train/37822610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSearchText(String searchtext) { if(searchtext.equals("") || searchtext == null) phasetwoscreen.phasetwoshowPane.setSearchText(""); controller.setLoad(false); modconn.setSaveStatus(SaveStatus.CHANGES_TO_SAVE); controller.setSearchText(searchtext); phasetwoscreen.infotabbedPane.setSearchText(controller.getSearchText()); if(controller.getPhase() == 2) initPhaseTwo(); } COM: <s> the method is called to set the searchext </s>
funcom_train/35233009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStatus(int status,int timeRemain, OmniNotifyListener.NotifyType notifyType) { if (status != this.raw_status || forceChange(timeRemain,notifyType, op_pending)) { this.raw_status = status; op_pending = (notifyType == NotifyType.ChangeRequest); rawStatusChanged(timeRemain, notifyType); } } COM: <s> update the state and time remaining for the unit </s>
funcom_train/41461437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void register() { //registering all sockets in the queue while (!registerQueue.isEmpty()) { //extract socket from queue RtpSocketImpl socket = registerQueue.poll(); try { //registering socket.register(receiver.getSelector()); } catch (ClosedChannelException e) { //unable to register, notify socket socket.notify(e); } } } COM: <s> registers sockets in the receiver </s>
funcom_train/3438381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopListening(ListenKey listener) throws IOException { if (!(listener instanceof SocketListenKey)) { throw new IllegalArgumentException("Invalid listener"); } synchronized (listener) { ServerSocket ss = ((SocketListenKey)listener).socket(); // if the ServerSocket has been closed it means // the listener is invalid if (ss.isClosed()) { throw new IllegalArgumentException("Invalid listener"); } ss.close(); } } COM: <s> stop the listener </s>
funcom_train/43214421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireFailedCallback(RemoteCallback rc) { ServerCallbackEvent sce = new ServerCallbackEvent(IOUtil.createURL(this), rc.getID(), ServerCallbackEvent.TYPE_FAILED, rc.getName(), rc.getDescription()); for (RemoteTrancheServerListener l : getListeners()) { try { l.requestFailed(sce); } catch (Exception e) { } } } COM: <s> p notify server listeners that a server request failed </s>
funcom_train/40449057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { TabPanel tp=new TabPanel(); tp.add(new Button("1"), "1"); tp.add(new Button("2"), "2"); tp.add(new Button("3"), "3"); RootPanel.get().add(tp); } COM: <s> the entry point method called automatically by loading a module </s>
funcom_train/3457459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() throws CloneNotSupportedException { TimeContainer duplicate = new TimeContainer(); duplicate = (TimeContainer) super.clone(); //Calendar newcal = Calendar.getInstance(TimeZone.getTimeZone("EST")); Calendar newcal = (Calendar) calendar.clone(); //System.out.println("Cloning Calendar"); duplicate.calendar = (Calendar) calendar.clone(); return duplicate; } COM: <s> clone this object </s>
funcom_train/33665725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAlg(String urn, RuleCombAlg alg) { ruleCombAlgs.put(urn, alg); if (log.isLoggable(Level.CONFIG)) { log.config("successfully added to algorithm list (urn,fn): " + urn + ", " + alg.getClass().getName()); } } COM: <s> adds combining algorithm to the factory </s>
funcom_train/49018246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStringValue(String sKey) { String out = (String) getProperties().get(sKey); // look at properties to check the given property is known if (out == null) { // no? take property default return (String) getDefaultValue(sKey); } return out; } COM: <s> return string value for string type values </s>
funcom_train/4360296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sameFile(URL other) { if (!compare(protocol, other.getProtocol())) return (false); if (!compare(host, other.getHost())) return (false); if (port != other.getPort()) return (false); if (!compare(file, other.getFile())) return (false); return (true); } COM: <s> compare two urls excluding the ref fields </s>
funcom_train/19308915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(final String s) throws PdfException { try { try { this.out.write(s.getBytes(PDFDocument.ENCODING)); } catch (final UnsupportedEncodingException ue) { this.out.write(s.getBytes()); } } catch (final IOException ex) { throw new PdfException(ex); } } COM: <s> append data to the stream </s>
funcom_train/4631898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String updateSale(){ System.out.println("updating sale status"); String returnStatus = CommonConstants.FORM_RETURNCODE_FAILED; try { SaleTO saleTO = this.getSale(); returnStatus = CommonConstants.FORM_RETURNCODE_SUCCESS; } catch (Exception e) { e.printStackTrace(); } System.out.println(returnStatus); return returnStatus; } COM: <s> update the status of the sale to processing approved or rejected </s>
funcom_train/42944538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean quoteValue() { if (this.isCLOB()) { return true; } else if (this.isBLOB()) { // This assumes that the value is presented in raw hex form. // If the value is presented in hex, quoting will procude invalid results. return true; } else { String t = this.getDataType().toUpperCase(); return t.startsWith(TYPE_STRING); } } COM: <s> checks if quote value is ok </s>
funcom_train/28368631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Double distanceInMeter(final LatLonPoint from, final LatLonPoint to) { final Double radDistance = new Double(GreatCircle.spherical_distance( from.radlat_, from.radlon_, to.radlat_, to.radlon_)); return ((Float) Length.METER.fromRadians(radDistance.floatValue())).doubleValue(); } COM: <s> compute the distance between two lat lon point in meters </s>
funcom_train/16829437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getHashCodeForRow(int rowIndex) { int ret = 0; Object[] row = new Object[getColumnCount()]; for (int i = 0; i < getColumnCount(); i++) { ret += getValueAt(i, rowIndex).hashCode(); } return ret; } COM: <s> returns a hashcode for the specified row </s>
funcom_train/44181354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeHeritable(String key) { @SuppressWarnings("unchecked") HashSet<String> heritableKeys = (HashSet<String>)data.get(A_HERITABLE_KEYS); if (heritableKeys == null) { heritableKeys = new HashSet<String>(); heritableKeys.add(A_HERITABLE_KEYS); data.put(A_HERITABLE_KEYS, heritableKeys); } heritableKeys.add(key); } COM: <s> make the given key heritable meaning its value will be </s>
funcom_train/12138415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClientProxy IF(Expression expression, ClientProxy toExecuteIfTrue, ClientProxy executeifFalse) { StringBuilder builder = new StringBuilder(); builder.append("if(").append(expression.getExpression()).append("){").append(toExecuteIfTrue.getCompleteJQuery()).append("}"); if(executeifFalse != null) { builder.append("else{").append(executeifFalse.getCompleteJQuery()).append("}"); } this.appendJSFragment(builder.toString()); return this; } COM: <s> this method provides possibility to make a conditional statement </s>
funcom_train/22233025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getStencilEnable() { if (isLiveOrCompiled()) { if (!this.getCapability(ALLOW_STENCIL_ATTRIBUTES_READ)) { throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes17")); } } return ((RenderingAttributesRetained)this.retained).getStencilEnable(); } COM: <s> retrieves the stencil buffer enable flag for this rendering attributes </s>
funcom_train/647259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDefaultMessage() { clearParent(); // add message String message = Messages.getString("DatabaseStructureView.NoSession"); Label label = new Label(_parent, SWT.FILL); label.setText(message); label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false)); _parent.layout(); _parent.redraw(); } COM: <s> set a default message this method is called when no sessions are </s>
funcom_train/5011421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void grow(Dot newDot) { // Validate if snake is moving over itself (tail end does not count): if (snakeBody.subList(1, snakeBody.size()).contains(newDot)) { dead = true; return; } rotationLocked = false; // Move snake (cut tail and grow head) snakeBody.add(newDot); } COM: <s> grows snake in a specified order </s>
funcom_train/42651684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String parseQuery(Criteria criteria, Map extraParametersMap) { PersistenceUnit unit = getUnit(); QueryLanguage language = unit.getSupportedQueryLanguages().get(query.getLanguageId()); return language.restrictQuery(unit, query.getQueryString(), criteria, extraParametersMap); } COM: <s> private helper that parses the query defined by the associated bookmark </s>
funcom_train/51161924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyStart () { attributes = new SolutionAttributes (problem.getName (), problem.getAuthor (), getName ()); if (solution_manager != null) solution_manager.notifyStart (problem, this, attributes); if (step_manager != null) step_manager.notifyStart (problem); } COM: <s> notify the solution manager that a solving is beginning </s>
funcom_train/14001680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StringBuffer getFrameInfoAfterDiscrimination() { NumberFormat nf = NumberFormat.getInstance(); nf.setMaximumFractionDigits(6); nf.setMinimumFractionDigits(6); // I work with StringBuffer since its faster than String StringBuffer info = new StringBuffer("%\tParticles after non-particle discrimination ("); info.append(this.real_particles_number); info.append(" particles):\n"); for (int i = 0; i<this.particles.length; i++) { info.append("%\t\t"); info.append(nf.format(this.particles[i].x)); info.append(" "); info.append(nf.format(this.particles[i].y)); info.append("\n"); } return info; } COM: <s> generates a ready to print string with all the </s>
funcom_train/33518946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Long verifyHandicap(String initialHandicap) throws InvalidParameterException { try { Long handicap = Long.valueOf(initialHandicap); if (handicap.compareTo(new Long(0)) < 0) { throw new InvalidParameterException("Handicap cant be negative"); } return handicap; } catch (NumberFormatException e) { throw new InvalidParameterException("Must provide initial player handicap"); } } COM: <s> this method is responsible for verifying if the handicap is valid </s>
funcom_train/9522881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DiABluBTConnection (StreamConnection conn,INWatcher out, DiABluID clientID){ this.clientConnection = conn; this.clientDID = clientID; this.clientUUID = clientDID.getUUID(); this.clientFNAME = clientDID.getFName(); this.outInfo = out; } COM: <s> creates a new instance of di ablu btconnection </s>
funcom_train/44019250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getEditReplaceMenuItem() { if (editReplaceMenuItem == null) { editReplaceMenuItem = new JMenuItem(); editReplaceMenuItem.setText("Replace..."); editReplaceMenuItem.setMnemonic('R'); editReplaceMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H, MENU_SHORTCUT_KEY_MASK)); editReplaceMenuItem.addActionListener(eventHandler); } return editReplaceMenuItem; } COM: <s> return the edit replace menu item </s>
funcom_train/32945925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(final Target aTarget) { txTemplate.execute( new TransactionCallback() { public Object doInTransaction(TransactionStatus ts) { try { log.debug("Before Deleting Object"); getSession().delete(aTarget); log.debug("Object deleted successfully"); } catch(Exception ex) { log.error("Setting Rollback Only"); ts.setRollbackOnly(); } return null; } } ); } COM: <s> delete a pending target </s>
funcom_train/26102351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void assertEquals(Object actual, Object expected, String message) { if ((expected == null) && (actual == null)) { return; } if ((expected != null) && expected.equals(actual)) { return; } failNotEquals(actual, expected, message); } COM: <s> asserts that two objects are equal </s>
funcom_train/39915813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTextField33() { System.out.println("getTextField33"); Page1 instance = new Page1(); TextField expResult = null; TextField result = instance.getTextField33(); 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 text field33 method of class timesheetmanagement </s>
funcom_train/44457908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logUnusedRuntimeProperties() { if (_runtimeProperties != null) { Set<String> unused = _runtimeProperties.getUnused().keySet(); for (String unusedName : unused) { if (!unusedName.startsWith("log4j.")) { Log.log_3434(unusedName); } } } } COM: <s> logs the unused runtime properties </s>
funcom_train/36807364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void weightsSet(int[] nmlzer_AllVar, float[] wt_AllVar, int[] sd) { if (wt_AllVar != null) this.allWt = wt_AllVar; if (nmlzer_AllVar != null) this.allNorVarIdx = nmlzer_AllVar; if (sd != null) { setSelectedDimensions(sd); if ((!enableAggregate) || (!aggregate)) weightsSetMultiple(); else weightsSetAggregate(); } } COM: <s> automatic setting and prepare datacells </s>
funcom_train/17248110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void load(InputStream source, URL textureDirectory) { model = new Node(name); resourceLibrary = new HashMap<String, Object>(); this.textureDirectory = textureDirectory; COLLADASchemaDoc doc = new COLLADASchemaDoc(); try { COLLADAType root = new COLLADAType(doc.load(source)); LoggingSystem.getLogger().info("Version: " + root.getversion().getValue()); processCollada(root); } catch (Exception ex) { ErrorManager.getInstance().addError(Level.WARNING, "Unable to load Collada file. " + ex.getMessage()); return; } } COM: <s> load is called by the static load method creating an instance of the </s>
funcom_train/18057881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void erase() { if (topFrame != null) { topFrame.setVisible(false); topFrame.dispose(); } topFrame = null; topTabbedPane = null; topCmdBox = null; topWindows.clear(); topWindows = null; topProps = null; topCommands.clear(); topCommands = null; topClusters.clear(); topClusters = null; } COM: <s> unlink references so gc can collect memory </s>
funcom_train/21343425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GalleryItem getItem(Point coords) { checkWidget(); if (DEBUG) System.out.println("getitem " + coords.x + " " + coords.y); int pos = vertical ? (coords.y + translate) : (coords.x + translate); GalleryItem group = this.getGroup(coords); if (group != null) return groupRenderer.getItem(group, new Point(vertical ? coords.x : pos, vertical ? pos : coords.y)); return null; } COM: <s> get item at pixel position </s>
funcom_train/45060118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getJComboBox() { if (jComboBox == null) { jComboBox = new JComboBox(); jComboBox.setBounds(new Rectangle(37, 26, 330, 24)); for (int i = 0; i < listOfSeparators.length; i++) { jComboBox.addItem(listOfSeparators[i]); } jComboBox.setEditable(true); } return jComboBox; } COM: <s> this method initializes j combo box </s>
funcom_train/5724581
/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 LdapServerInfo)) { return false; } final LdapServerInfo that = (LdapServerInfo) 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 ldap server info instance </s>
funcom_train/4519136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawSelectionRect(Graphics g) { if (_delegate.getSelectionRect() != null) { // normalize and remember _delegate.setLastSelRect(normalizeRectangle(_delegate.getSelectionRect())); Rectangle lastSelRect = _delegate.getLastSelRect(); _miscRenderer.renderSelectionRect(g, this._timeBarViewer, lastSelRect); } } COM: <s> draws the selection rectangle if present </s>
funcom_train/44300759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SchemaValue getSchemaValue(MtSchemaColumn col) throws FatalException { for (int i=0; i < lst.size(); i++) { SchemaValue val = (SchemaValue) lst.get(i); if (val.getSchemaColumn() == col) return val; } throw new FatalException(this, "column <" + col + "> is unknown"); } COM: <s> return the code schema value code that have the parameter column </s>
funcom_train/2448339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setIcon(Icon icon) { Icon old = getIcon(); if (icon == old) { return false; } if (icon == null && overlay == null) { return false; } if (overlay == null) { overlay = new TextOverlay(tc); } overlay.setIcon(icon); return true; } COM: <s> sets the icon </s>
funcom_train/4268886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setVolume(float volume) { try { float adjustedVolume = (float) (volume/20 + 0.5); if (synthesizer != null) { synthesizer.getSynthesizerProperties().setVolume (adjustedVolume); this.volume = volume; return true; } else { this.volume = volume; return false; } } catch (PropertyVetoException pve) { try { synthesizer.getSynthesizerProperties().setVolume(this.volume); } catch (PropertyVetoException pe) { pe.printStackTrace(); } return false; } } COM: <s> sets the volume in the range of 0 to 10 </s>
funcom_train/42977651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTargetPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ConstraintDescription_target_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ConstraintDescription_target_feature", "_UI_ConstraintDescription_type"), ConstraintPackage.Literals.CONSTRAINT_DESCRIPTION__TARGET, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the target feature </s>
funcom_train/22232588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConcentration(float concentration) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_CONCENTRATION_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("SpotLight2")); if (isLive()) ((SpotLightRetained)this.retained).setConcentration(concentration); else ((SpotLightRetained)this.retained).initConcentration(concentration); } COM: <s> sets spot light concentration </s>
funcom_train/50575482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TuneologyFile newFromURL(String url, boolean isTemp, TuneologyStatus pm) throws Exception { if (url.startsWith("file://")) { return LocalFile.newFromURL(url, isTemp); } else if (url.startsWith("cdda:")) { return CDContents.newFromURL(url, isTemp, pm); } else throw new MalformedURLException(); } COM: <s> create a new file object given an url </s>
funcom_train/34340053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSalir_aplicacion() { if (salir_aplicacion == null) {//GEN-END:|18-getter|0|18-preInit // write pre-init user code here salir_aplicacion = new Command("SALIR", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit // write post-init user code here }//GEN-BEGIN:|18-getter|2| return salir_aplicacion; } COM: <s> returns an initiliazed instance of salir aplicacion component </s>
funcom_train/9959861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getLocalCategories() { Set local = new TreeSet(new CategoryComparator()); Iterator it = categories.iterator(); while (it.hasNext()) { Category c = (Category) it.next(); if (c.getType() == Category.LOCAL) local.add(c); } return local; } COM: <s> returns local categories associated with the given blog </s>
funcom_train/20978705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTable getLstScoreList() { if (tableScoreList == null) { tableScoreList = new JTable(); tableScoreList.setIntercellSpacing(new Dimension(0, 0)); tableScoreList.setShowVerticalLines(false); tableScoreList.setShowHorizontalLines(false); // tableScoreList.setBackground(Color.WHITE); } return tableScoreList; } COM: <s> this method initializes lst score list </s>
funcom_train/43213429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireRowUpdated(String host, boolean affectsConnectivity, boolean affectsHashSpans) { StatusTableEvent spe = new StatusTableEvent(host, affectsConnectivity, affectsHashSpans); for (StatusTableListener l : getListeners()) { try { l.rowsUpdated(spe); } catch (Exception e) { } } } COM: <s> p fires an event for having updated a row </s>
funcom_train/38514884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(ContenderAttribute contenderAttribute) { String[] contenderAttributeNames = getContenderAttributeNames(); boolean contains = false; int i; //Check if ContenderAttribute given matches with any attribute //stored into this ContenderAttributeSet. for (i = 0; i < contenderAttributeNames.length; i++) { if (contenderAttribute.matches(contenderAttribute)) { contains = true; } } return contains; } COM: <s> returns true if this contender attribute set contains a contender attribute that </s>
funcom_train/37587498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DCacheAdapter register(OpenDefinitionsDocument odd, DDReconstructor rec) { DocManager mgr = new DocManager(rec, odd.isUntitled()); notifyRegistrationListeners(odd, mgr); // runs synchronously; only used in tests // System.err.println("register(" + odd + ", " + rec + ") called"); return mgr; } COM: <s> returns a cache adapter corresponding to the owner of the given reconstructor </s>
funcom_train/50485486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unlockSelect() { requery(); setRowNumber(lockSelectRowNumber); refreshControllers(); // Force total refresh of JTables. fireTableModelListener(new javax.swing.event.TableModelEvent(this, javax.swing.event.TableModelEvent.HEADER_ROW)); } COM: <s> un obtain the select object wrapped by this row </s>
funcom_train/17493827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getURL() { try { return new URL("http://cs.joensuu.fi/jeliot/"); } catch (Exception eee) { // There is no reason at all that this should trow exception... System.out.println("Jeliot extension: getURL: Exception=" + eee.getMessage()); return null; } } COM: <s> returns a url where you can find info on this extension </s>
funcom_train/35184895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resizeFromPane(final PaneChangeEvent e) { final Dimension newPanelSize = new Dimension(e.getSource().getWidth(), e.getSource().getHeight()); final JPAZPanel that = this; synchronized (JPAZUtilities.getJPAZLock()) { SwingUtilities.invokeLater(new Runnable() { public void run() { that.setPreferredSize(newPanelSize); that.revalidate(); } }); } } COM: <s> changes the preferred size of this panel after the size of the associated </s>
funcom_train/35157469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected float readPercentage(Chunk c) throws IOException { float value = 0; readChunkHeader(tempChunk); if (tempChunk.id == TYPE_PERCENT_I) { value = (float)readShort(c) / 100.0f; } else if(tempChunk.id == TYPE_PERCENT_F) { value = readFloat(c); } c.bytesRead += tempChunk.bytesRead; return value; } COM: <s> reads a percentage value from the input file </s>
funcom_train/2288475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addImportVersionClass(I_CmsImport importVersionClass) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key( Messages.LOG_IMPORTEXPORT_ADDED_IMPORT_VERSION_1, importVersionClass)); } m_importVersionClasses.add(importVersionClass); } COM: <s> adds a import version class name to the configuration </s>
funcom_train/33351908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int kValue(double a, double b, Instant instant, boolean after) { double days = instant.getYear() * 365.2425 + instant.getDayOfYear(); double t = (days - a + 1721060.0)/b; return (int) (after ? Math.ceil(t) : Math.floor(t)); } COM: <s> meeus eqn 35 </s>
funcom_train/2288673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addXmlPreprocessingDigesterRules(Digester digester) { digester.addCallMethod(CmsImportExportManager.N_EXPORT + "/" + N_FILES + "/" + N_FILE, "increaseTotalFiles"); digester.addCallMethod(CmsImportExportManager.N_EXPORT + "/" + CmsImportExportManager.N_INFO + "/" + CmsImportExportManager.N_VERSION, "setVersion", 0); } COM: <s> adds the xml digester rules for pre processing a single import file </s>
funcom_train/25811140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T pop() { if (mFirst == -1) return null; T popped = mBuffer[mFirst]; mBuffer[mFirst] = mExtra; mExtra = popped; if (mFirst == mLast) { reset(); } else { mFirst++; if (mFirst == mBuffer.length) mFirst = 0; } return popped; } COM: <s> returns the first action and discard it if any </s>
funcom_train/17732682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMillisRollover() { logger_.info("Running testMillisRollover..."); ElapsedTime elapsed = new ElapsedTime(0, ElapsedTime.SECOND); ElapsedTime compare = new ElapsedTime(0, 0, 0, 1, 0); assertEquals("seconds is incorrect", compare, elapsed); logger_.debug(elapsed); } COM: <s> tests millisecond rollover 1000ms 1 sec </s>
funcom_train/9057237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void input(int offset) throws IOException { String temp[]; String input; temp = new String[10]; System.out.print("> "); input = this.readInput(); if (input.contains(" ")) { temp = input.split(" "); } else { temp[0] = input; } for (int rotation = 0; temp.length >= rotation + offset + 1; rotation++) { indtastet[offset + rotation] = temp[rotation]; } } COM: <s> this is the method which receives the input from the keyboard </s>
funcom_train/16791889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Directory createDirectory(String name) { AbstractFile<?> sd = this.find(name); if (sd != null && !(sd instanceof Directory)) throw new IllegalArgumentException("File " + name + " already exists in " + this.getPath()); if (sd == null) { sd = new Directory(this, name + "/"); this.contents.add(sd); } return (Directory) sd; } COM: <s> create a subdirectory with a specific name </s>
funcom_train/2414750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSolveMaze() throws Exception { Vector<Point> vec = SolveMaze.solveMaze(testMaze); //Optimized solution vector should look like: //(1,2),(2,2),(3,2),(4,2),(5,2) assertEquals(new Point(1,2), vec.get(0)); assertEquals(new Point(2,2), vec.get(1)); assertEquals(new Point(3,2), vec.get(2)); assertEquals(new Point(4,2), vec.get(3)); assertEquals(new Point(5,2), vec.get(4)); } COM: <s> ensure that solve maze results in an optimized solution vector </s>
funcom_train/14402045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeKeyValue(K pKey, V pValue) { boolean removed = false; w.lock(); try { List<V> valueList = getValues(pKey); removed = valueList.remove(pValue); // delete mapping when list is empty if (valueList.isEmpty()) { iMap.remove(pKey); } else { iMap.put(pKey, valueList); } return removed; } finally { w.unlock(); } } COM: <s> removes the passed value from the code list code associated with its </s>
funcom_train/25764887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long countLines() { FileInputStream fis = null; InputStreamReader isr = null; LineNumberReader lnr = null; try { fis = new FileInputStream(this.file); isr = new InputStreamReader(fis); lnr = new LineNumberReader(isr); while ((lnr.readLine()) != null) { // go to the end of the file } return lnr.getLineNumber(); } catch (IOException e) { throw new IOError(e); } finally { close(fis, isr, lnr); } } COM: <s> return the newline counts </s>