__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3364970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void installKeyboardActions() { InputMap km = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); SwingUtilities.replaceUIInputMap(comboBox, JComponent. WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, km); LazyActionMap.installLazyActionMap(comboBox, BasicComboBoxUI.class, "ComboBox.actionMap"); } COM: <s> adds keyboard actions to the jcombo box </s>
funcom_train/13390371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testToString() throws Exception { String ids[] = new String[]{"", "watch", "abc"}; for (String id : ids) { Watch watch = construct1(id); Assert.assertEquals(id, watch.toString()); Utils.close(watch.getWatchDataSource()); } } COM: <s> tests the code to string code method of the class under test </s>
funcom_train/44869511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ifSimplePropertyUsesTypeConversion(String template) throws XDocletException { if (snapshotSimplePropertyTransformer() != null && (modelSimplePropertyTransformer() != null || "false".equalsIgnoreCase(getCurrentMethodTag().getAttributeValue( PROPERTY_COPY_TO_MODEL_PARAM)))) { generate(template); } } COM: <s> runs the contained template if this current property tag requires type </s>
funcom_train/37035079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() throws LifecycleException { if (!started) throw new LifecycleException (sm.getString("accessLogValve.notStarted")); lifecycle.fireLifecycleEvent(STOP_EVENT, null); started = false; try { if (ps != null) ps.close(); if (conn != null) conn.close(); } catch (SQLException e) { throw new LifecycleException(e); } } COM: <s> invoked by tomcat on shutdown </s>
funcom_train/3083257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertNodeInto(MutableTreeNode newChild, MutableTreeNode parent, int index) { // Remove new node from parent first if (newChild.getParent() != null) { removeNodeFromParent(newChild); } parent.insert(newChild, index); int[] newIndexs = new int[1]; newIndexs[0] = index; nodesWereInserted(parent, newIndexs); } COM: <s> invoked this to insert new child at location index in parents children </s>
funcom_train/27782611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCells() { Iterator i = cells.keySet().iterator(); int size = 0; for (; i.hasNext(); ) { Character c = (Character) i.next(); Cell e = at(c); if (e.cmd >= 0 || e.ref >= 0) { size++; } } return size; } COM: <s> return the number of cells in use </s>
funcom_train/36683740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCircleIntersection() { GeometricParameters bodyA = new GeometricParameters(ShapeFactory .JavaCircle(5), new Vector2f(0, 0)); GeometricParameters bodyB = new GeometricParameters(ShapeFactory .JavaCircle(5), new Vector2f(5, 5)); JavaShapeIntersector intersector = new JavaShapeIntersector(bodyA, bodyB); List<Vector2f> list = intersector.findIntersections(); System.out.println(list); } COM: <s> tests the intersection of circles </s>
funcom_train/3445053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAllEdgeLabels() { int col; Table edges = graph.getEdgeTable(); for (col = 0; col < edges.getColumnCount(); col++) { Column c = edges.getColumnAt(col); if (c.isInternal() || namedType(c) == null) { continue; } addEdgeLabel(c.getName()); } } COM: <s> adds all the edge attributes in the edge labels </s>
funcom_train/13099155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void enableButtons() { m_M_AttributeSetInstance_ID = -1; if (m_PAttributeButton != null) { int row = p_table.getSelectedRow(); boolean enabled = false; if (row >= 0) { Object value = p_table.getValueAt(row, INDEX_PATTRIBUTE); enabled = Boolean.TRUE.equals(value); } m_PAttributeButton.setEnabled(enabled); } super.enableButtons(); } // enableButtons COM: <s> enable pattribute if row selected changed </s>
funcom_train/45272449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object value) { if (value != null && !type.isAssignableFrom(value.getClass())) { throw new ClassCastException(value.getClass().getName()); } if (buffer != null) { buffer.insertLast(value); } else { this.value = value; } count++; } COM: <s> set the value of the output port </s>
funcom_train/44480961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Server evaluate(HttpServletRequest request) { Iterator itr = getServerIterator(); ServerContainer currentContainer = null; boolean currentMatches = false; while (itr.hasNext() && !currentMatches) { currentContainer = (ServerContainer) itr.next(); currentMatches = currentContainer.getRule().matches(request); } if (currentMatches) { return currentContainer.getServer(request); } else { return null; } } COM: <s> evaluates the given request to see if </s>
funcom_train/23874317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createActions() { tableViewAction = new TableViewAction(getViewSite().getShell().getDisplay().getData(), tabFolder, "Table View") ; kiviatView = new KiviatAction(getViewSite().getShell().getDisplay().getData(), tabFolder, "Kiviat View"); // Create the actions } COM: <s> create the actions </s>
funcom_train/24933796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(final Object object1, final Object object2) { final int firstPosition = ((MAssociation) object1).getPositionInModel(); final int secondPosition = ((MAssociation) object2).getPositionInModel(); return compareUtil.compareInt(firstPosition, secondPosition); } COM: <s> compares two associations by the order the use file provides </s>
funcom_train/50399535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected EndpointReferenceType createRUS(Map<String,Object> initParam)throws Exception{ String id=Kernel.getKernel().getServiceHome("RUSService").createWSRFServiceInstance(null); EndpointReferenceType epr = AddressingUtil.newEPR(); epr.addNewAddress().setStringValue(Utilities.makeAddress("RUSService",id)); AddressingUtil.addUGSRefparamToEpr(epr,id); return epr; } COM: <s> create new rus and return its epr </s>
funcom_train/29290119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkSurveyIsExpire(String survey_id, Date close_date, Integer survey_status_id) throws EJBException { boolean check = false; try { Collection coll = getSurveyCMPLocalHome().findCheckSurveyIsExpire(survey_id, close_date, survey_status_id); if(coll.size() >0) check = true; } catch (FinderException e) { // TODO Auto-generated catch block e.printStackTrace(); } return check; } COM: <s> check survey is expire </s>
funcom_train/16912228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { while (isRunning) { dialog.setUpdateCompleted(false); SwingUtilities.invokeLater(iterate); while (!dialog.isUpdateCompleted()) { sleep(10); } } } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> run the thread </s>
funcom_train/17848632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaximumLineCount(int maxLineCount) { if (mMaxLineCount != maxLineCount) { mMaxLineCount = maxLineCount; if ((mTextLineArr != null) && (mTextLineArr.length >= mMaxLineCount)) { setText(mText); } } } COM: <s> sets the maximum linecount </s>
funcom_train/35805031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int delete(int respuestapk)throws SQLException{ PreparedStatement ps = null; con = conexion.abrirConexion(); int resultado = 0; try { ps = con.prepareStatement("delete from RESPUESTA where idRespuesta = ?"); ps.setInt(1, respuestapk); resultado = ps.executeUpdate(); }catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } finally{ conexion.cerrarConexionBaseDatos(con); if(ps != null) ps.close(); } return resultado; } COM: <s> method deletes a record from table respuesta </s>
funcom_train/26379702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isDigit(char c) { char validDigits[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' }; for (int count = 0; count < validDigits.length; count++) { if (c == validDigits[count]) return true; } return false; } COM: <s> returns true if the character is a valid digit </s>
funcom_train/22353593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initLayout() { setLayout(new BorderLayout()); content = new JPanel(new GridBagLayout()); gridBagConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.FIRST_LINE_START, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0); initialized = true; this.add(content, BorderLayout.NORTH); } COM: <s> called by add panel if necessary </s>
funcom_train/23633943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValidAnnotation(Annotation annotation) { String annotationName = RuntimeAnnotationsHelper .getAnnotationName(annotation.type); boolean isValidAnnotation = true; if (annotationName.equals(DOCUMENTED) || annotationName.equals(RETENTION) || annotationName.equals(TARGET) || annotationName.equals(DOMAIN_ANNOTATION)) { isValidAnnotation = false; } return isValidAnnotation; } COM: <s> informs whether an annotation is valid or not </s>
funcom_train/47977578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setForegroundImage(File f) throws IOException{ Image img = ImageIO.read(f); img = img.getScaledInstance(849, 548, Image.SCALE_FAST); BufferedImage bimage = new BufferedImage(849, 548, BufferedImage.TYPE_INT_RGB); bimage.getGraphics().drawImage(img, 0, 0, null); setForegroundImage(bimage); } COM: <s> reads the image file f and scales it for fitting in the area </s>
funcom_train/46332177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getAngle(int numstrikes) { if (numstrikes<3) { return (Math.PI/180.0)*8.0; } else if (numstrikes<8) { return (Math.PI/180.0)*4.0; } else { return (Math.PI/180.0)*2.0; } } COM: <s> get the angle to leave between adjacent radial lines for the specified </s>
funcom_train/36147681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char charAt(int arg0) { if ((getBufferEnd() == null) || (arg0 < (getBuffer().length() - 1))) { return getBuffer().charAt(arg0); } else { return getBufferEnd().charAt(arg0 - (getBuffer().length())); } } COM: <s> find the character at an position </s>
funcom_train/12647198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AudioClip getAudioClip(URL url) { checkConnect(url); synchronized (audioClips) { AudioClip clip = (AudioClip) audioClips.get(url); if (clip == null) { audioClips.put(url, clip = new AppletAudioClip(url)); } return clip; } } COM: <s> get an audio clip </s>
funcom_train/26147746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addProperties(final Properties properties) { if (properties == null) { throw new IllegalArgumentException("properties can not be null"); } Set<Map.Entry<Object, Object>> entries = properties.entrySet(); for (Map.Entry<Object, Object> property : entries) { this.properties.put(property.getKey(), property.getValue()); } } COM: <s> p adds the given tt properties tt to this </s>
funcom_train/2580944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void zoom(double percent) { if (percent > 0.0) { double range = getRangeAxis().getRange().getLength(); double scaledRange = range * percent; getRangeAxis().setRange(this.anchorValue - scaledRange / 2.0, this.anchorValue + scaledRange / 2.0); } else { getRangeAxis().setAutoRange(true); } } COM: <s> zooms in or out on the plots value axis </s>
funcom_train/9978353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resultTypeItemSelected(Element elt) { // Fill menu openEditResultTypePanel(elt); MenuItem addItem = new MenuItem(popupMenu, SWT.PUSH); addItem.setText("Remove result-type"); addItem.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { model.deleteResultType((Element) tree.getSelection()[0].getData()); tree.getSelection()[0].dispose(); } }); } COM: <s> called when result type item has been selected </s>
funcom_train/17961693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(final PropertyChangeEvent event) { final int r = this.spinner.getValue(); final double angle = Math.PI * 2.0 * (r / 360.0); this.drawStringPanel2.setAngle(angle); this.drawStringPanel2.invalidate(); this.drawStringPanel2.repaint(); } COM: <s> receives property change events </s>
funcom_train/29532649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object retrieve(String key) throws IndivoException { Object result = this.retrieveInternal(key); if (result == null){ return null; } if (!objectType.isAssignableFrom(result.getClass())){ throw new IndivoException("Somehow, a bad object snuck in"); } return result; } COM: <s> the public method for retrieving an object </s>
funcom_train/19972853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateView() { /* If we don't have displayed values then use the * current number else find the correct value in the * displayed values for the current number. */ mText.setText(formatNumber(mCurrent)); mText.setSelection(mText.getText().length()); } COM: <s> updates the view of this number picker </s>
funcom_train/34268643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGoodDataWidgetStateFor(FmsInputFieldInterface anFmsInputField) { for (int i = 0; this.getFormWidgetList().size() > i; i++) { ((JComponent) this.getFormWidgetList().get(i)).setEnabled(true); } } COM: <s> sey all widgets to enabled on the form </s>
funcom_train/9082924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tick(int ticks) { globalTicks += ticks; Set<Integer> tickerView = ImmutableSet.copyOf(tickers.keySet()); for (int i : tickerView) { if (i <= globalTicks) { for (Runnable doneEvent : tickers.get(i)) { doneEvent.run(); } tickers.removeAll(i); } } } COM: <s> advance the global tick counter and run finished events </s>
funcom_train/43244884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testVariantToObjectType() { System.out.println("VariantToObjectType"); Variant va = null; Class cls = null; Object expResult = null; Object result = BeanTools.VariantToObjectType(va, cls); 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 variant to object type method of class org </s>
funcom_train/27737987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private GGEP addLocale(GGEP ggep, String locale, int slots) { byte[] payload = new byte[3]; byte[] s = locale.getBytes(); payload[0] = s[0]; payload[1] = s[1]; payload[2] = (byte) slots; ggep.put(GGEPKeys.GGEP_HEADER_CLIENT_LOCALE, payload); return ggep; } COM: <s> adds the locale ggep </s>
funcom_train/4628784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void customizeDocumentCommand(IDocument d, DocumentCommand c) { if (c.length == 0 && c.text != null && endsWithDelimiter(d, c.text)) smartIndentAfterNewLine(d, c); else if ("}".equals(c.text)) { smartInsertAfterBracket(d, c); } COM: <s> method declared on iauto indent strategy </s>
funcom_train/49651172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand2() { if (backCommand2 == null) {//GEN-END:|75-getter|0|75-preInit // write pre-init user code here backCommand2 = new Command("Back", Command.BACK, 0);//GEN-LINE:|75-getter|1|75-postInit // write post-init user code here }//GEN-BEGIN:|75-getter|2| return backCommand2; } COM: <s> returns an initiliazed instance of back command2 component </s>
funcom_train/3698653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rename(String sOldNickName,String sNewNickName){ for(int i=0;i<channelList.size();i++){ try { HandleChannel.renameUser(sOldNickName,sNewNickName,getChannelAt(i)); } catch (IRCException e) {} } } COM: <s> to rename the user in all the channels </s>
funcom_train/9132652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRulesets() { String[] values = getProject().getConfiguration().getStringArray(RULESETS_ARGUMENT_KEY); if (values != null && values.length > 0) { return StringUtils.join(values, ','); } return DEFAULT_RULESET_ARGUMENT; } COM: <s> gets the rulesets </s>
funcom_train/44734070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set2DfullscreenProjection() { glViewport(0, 0, screenW, screenH); glMatrixMode(GL_PROJECTION);// projection matrix mode glPushMatrix();// store previous matrix glLoadIdentity(); gluOrtho2D(0, screenW, 0, screenH);// set a 2D orthographic projection glMatrixMode(GL_MODELVIEW);// modelview matrix mode glPushMatrix(); glLoadIdentity(); } COM: <s> set the drawing mode in 2 d for drawing in the full screen </s>
funcom_train/22031615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int parseInt (int digits) throws IOException { if (digits > 1024) throw new IOException("Attempt to read more than 1024 bytes from file"); try { in.read(array, 0, digits); } catch (IOException e) { throw new IOException("Couldn't read integer from file"); } pos += digits; return Integer.parseInt((new String(array, 0 , digits)).trim()); } COM: <s> reads in and returns a dem style integer from the current file position </s>
funcom_train/22439459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createCheckBox(Composite parent) { Composite composite = new Composite(parent, SWT.NULL); GridLayout layout = new GridLayout(2, false); layout.marginWidth = 0; layout.marginHeight = 0; GridData data = new GridData(GridData.GRAB_HORIZONTAL); composite.setLayout(layout); composite.setLayoutData(data); Label label = new Label(composite, SWT.WRAP); label.setText("Same comment for all:"); label.setToolTipText(SAME_COMMENT_TOOL_TIP); _checkBox = new Button(composite, SWT.CHECK | SWT.LEFT); _checkBox.setToolTipText(SAME_COMMENT_TOOL_TIP); } COM: <s> method create check box </s>
funcom_train/2339424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed( MouseEvent e ) { int modifier = e.getModifiers(); console.disableTextField(); updateMousedCoordinates( e ); if ( ( modifier & e.BUTTON1_MASK ) != 0 ) { // left console.applyMouseClickLeft( mousedGlobalCoordinates ); } if ( ( modifier & e.BUTTON3_MASK ) != 0 ) { // right console.applyMouseClickRight( mousedGlobalCoordinates ); } } COM: <s> if the left mouse button has been pressed tell the event generator </s>
funcom_train/25662578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActivityListObject removeActivity(JFrame owner, int index) { int answer = JOptionPane.showConfirmDialog(owner, "Delete This Activity?", "Confirm Delete", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (answer != JOptionPane.YES_OPTION) return null; return (ActivityListObject) super.removeElementAt(index); } COM: <s> convenience method to remove an activity </s>
funcom_train/25801112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float animToClock(float animTime, boolean convertMin, float animLength) { // Get the raw time. final float raw = animTime/(animLength/24); // Convert minute. if(convertMin) { final int hr = (int)raw; final float rawMin = raw - hr; float min = (rawMin*60)/100; if(min >= 0.6f) min = 1; float time = hr + min; if(time >= 24) time = 0; return time; } else return raw; } COM: <s> convert the given animation time to clock time </s>
funcom_train/36258946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireChangeEvent() { if (changeListeners == null) { return; } final ChangeEvent event = new ChangeEvent(this); for (int n = 0; n < changeListeners.size(); n++) { // pairs of listener and change mask ((ChangeListener) changeListeners.get(n)).stateChanged(event); } } COM: <s> execute the change event </s>
funcom_train/48910016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtActualizar() { if (btActualizar == null) { btActualizar = new JButton(); btActualizar.setBounds(new Rectangle(271, 52, 228, 27)); btActualizar.setText("Actualizar"); btActualizar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { actualizar(); } }); } return btActualizar; } COM: <s> this method initializes bt actualizar </s>
funcom_train/18743780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T previous() { if (DEBUG) { Groove.message("History.previous() at index " + this.index); } if (hasPrevious()) { this.index--; return this.log.get(this.index); } else { throw new NoSuchElementException("No previous element in history"); } } COM: <s> returns the previous element in the history log </s>
funcom_train/20818187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateDietTable() throws NumberFormatException, Exception { CustomDietService ds = new CustomDietService(); JTable dietas = ds.fillCustomDietTable(ds.findByPatient(new PatientService().getById(new Long(txtId.getText())))); if (dietas == null) { createTable(); } else { createTable(dietas); } pack(); } COM: <s> update diet table </s>
funcom_train/34633122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TMergeNode addTMergeRole(final Node core, final Tree<TMergeNode> tTree){ if (core == null) throw new ArgumentNullException("core"); if (tTree== null) throw new ArgumentNullException("tTree"); return new TMergeNodeImpl(core, tTree); } COM: <s> adds the t merge role </s>
funcom_train/41576107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getInputField() { if (inputField == null) {//GEN-END:|98-getter|0|98-preInit // write pre-init user code here inputField = new TextField("Input:", "", 32, TextField.ANY);//GEN-LINE:|98-getter|1|98-postInit // write post-init user code here }//GEN-BEGIN:|98-getter|2| return inputField; } COM: <s> returns an initiliazed instance of input field component </s>
funcom_train/44556617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void convolve(float[] kernel, int kernelWidth, int kernelHeight) { ImageProcessor ip2 = convertToFloat(); ip2.setRoi(getRoi()); new net.sf.ext.ij.plugin.filter.Convolver().convolve(ip2, kernel, kernelWidth, kernelHeight); ip2 = ip2.convertToByte(false); byte[] pixels2 = (byte[])ip2.getPixels(); System.arraycopy(pixels2, 0, pixels, 0, pixels.length); } COM: <s> performs a convolution operation using the specified kernel </s>
funcom_train/43245422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTmpCity() { System.out.println("getTmpCity"); PatientDemographicsDG5Object instance = new PatientDemographicsDG5Object(); String expResult = ""; String result = instance.getTmpCity(); 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 tmp city method of class org </s>
funcom_train/49469014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endElement(QName element, Augmentations augs) throws XNIException { super.endElement(element, augs); if (element.localpart != null) { if (grabElement != null && grabElement.equalsIgnoreCase(element.localpart)) if (grabContent) grabbedContent = stopEatChars(); } else { _logger.error("Found a closing null element.localpart whilst checking XML"); checkedOk = false; } } COM: <s> override the end element from xerces document parser </s>
funcom_train/23411285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSceneIDPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Scene_sceneID_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Scene_sceneID_feature", "_UI_Scene_type"), OMPackage.Literals.SCENE__SCENE_ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the scene id feature </s>
funcom_train/40765987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write( File owlFile ) { FileOutputStream out; try { out = new FileOutputStream( owlFile ); OWLOntologyOutputTarget target = new StreamOutputTarget( out ); manager.saveOntology( ontology, new DefaultOntologyFormat(), target ); out.close(); } catch( RuntimeException e ) { throw e; } catch( Exception e ) { throw new RuntimeException( e ); } } COM: <s> write the ontology </s>
funcom_train/3421646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException { try{ return parse(content); } catch(Exception ex){ throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "gMonthDay"}); } } COM: <s> convert a string to a compiled form </s>
funcom_train/31650617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void dispatchCommand(String command, HttpServletRequest parameters) throws Exception{ try{ dispatch(command, parameters); }catch(Exception ex){ fireDispatchEvent(context, command, parameters, ex); throw ex; } fireDispatchEvent(context, command, parameters, null); } COM: <s> template method to handle command dispatch and dispatch listener notification </s>
funcom_train/46440320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startPhaseStats(Phase phase, EngineContext context) { final Feed feed = context.getFeed(); if (!checkCollectPhasStats(feed)) { return; } final FeedPhaseStats stats = context.getPhaseStatsMap().get(phase.getName()); stats.setStartTime(System.currentTimeMillis()); } COM: <s> initalizes the phase stats for the given phase </s>
funcom_train/13547735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeEdge(Edge edge) { Node node; node = edge.getSource(); if (node != null) node.getOutEdges().remove(edge); node = edge.getSink(); if (node != null) node.getInEdges().remove(edge); _edgeSet.remove(edge); } COM: <s> removes this given edge edge from this graph </s>
funcom_train/32057588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUninstallListeners() { System.out.println("testUninstallListeners"); JGraph jg=new JGraph(); BasicGraphUI x = new BasicGraphUI(); GraphLayoutCache g = new GraphLayoutCache( new DefaultGraphModel(),jg ); x.installUI(jg); x.installListeners(); x.uninstallListeners(); } COM: <s> test of uninstall listeners method of class basic graph ui </s>
funcom_train/39364081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWavelet( float flc, float flp, float fhp, float fhc ) { int nf = 1 + fftParms.getFftLength()/2; float df = fftParms.getSampleFrequency(); cw = CosineBellWavelet.createComplexWavelet(nf, 0, df, flc, flp, fhp, fhc); } COM: <s> define a band pass wavelet with cosine tapers </s>
funcom_train/26678691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRepeatedRestOpAsArg() throws Exception { String templates = "group test;" +newline+ "root(names) ::= \"$other(rest(names))$\""+newline+ "other(x) ::= \"$x$, $x$\""+newline ; StringTemplateGroup group = new StringTemplateGroup(new StringReader(templates), DefaultTemplateLexer.class); StringTemplate e = group.getInstanceOf("root"); e.setAttribute("names", "Ter"); e.setAttribute("names", "Tom"); String expecting = "Tom, Tom"; assertEquals(expecting, e.toString()); } COM: <s> fixme bug iterator is not reset from first to second x </s>
funcom_train/51246298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRightIndexEqual(int index){ Integer key = new Integer(index); Boolean result = (Boolean) isRightIndex.get(key); if (result == null) { Iterator it = equalColumns.iterator(); while (it.hasNext()) { SqlTabResultsIndexEquals.Field c = (SqlTabResultsIndexEquals.Field) it.next(); if (c.rightIndex == index) { isRightIndex.put(key, new Boolean(true)); return true; } } isRightIndex.put(key, new Boolean(false)); return false; } return result.booleanValue(); } COM: <s> describe an index where the row on the right is equal to </s>
funcom_train/13188565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getKeys() { List result = new java.util.ArrayList(); Iterator iterator = this.data.iterator(); while (iterator.hasNext()) { KeyedValue kv = (KeyedValue) iterator.next(); result.add(kv.getKey()); } return result; } COM: <s> returns the keys for the values in the collection </s>
funcom_train/50155191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String trimWhitespace( String str ) { if ( str != null ) { if ( str.indexOf( "\n" ) > -1 || str.indexOf( "\t" ) > -1 ) { str = str.replaceAll( "[\n\t]", " " ); } while ( str.indexOf( " " ) > -1 ) { str = str.replaceAll( " ", " " ); } return str.trim(); } return ""; } COM: <s> remove newlines tabs multiple and leading whitespace </s>
funcom_train/38737585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CategoryData dialog () { selectMode = true; CategoryIO cio = new CategoryIO(cid); categories = cio.load(); createContent(); shell.open(); fillList(); while (isRunning) if ( !Display.getDefault().readAndDispatch() ) Display.getDefault().sleep(); shell.dispose(); return currentCategory; } COM: <s> open the window as a dialog instead of a standalone application </s>
funcom_train/25585674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printTag(String p_name,String p_contents) { writeOffset(); write('<'); // we do not use openTag() to avoid CR write(p_name); write('>'); printEncoded(p_contents); write("</"); write(p_name); writeln('>'); } COM: <s> prints an xml tag </s>
funcom_train/34526200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Element buildContentRootElement(OdtResource odtResource) { Element el = null; try { String content = new String(odtResource.getResource(CONTENT_FILENAME), "UTF-8"); el = XmlHelper.parseDocument(content).getDocumentElement(); } catch(Exception ex) { String msg = "Unable to parse the ODT document's content."; throw new DocumentException(msg, ex); } return el; } COM: <s> reads the content root element from the odt resource </s>
funcom_train/19971321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCompare() { BlockID a = new BlockID(1, 3); BlockID b = new BlockID(1, 1); assertEquals(a.compareTo(b), 1); BlockID c = new BlockID(3, 1); BlockID d = new BlockID(1, 1); assertEquals(a.compareTo(c), -1); assertEquals(b.compareTo(d), 0); } COM: <s> block id object compare </s>
funcom_train/4507160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateMultiUserChatService(String cursubdomain, String newsubdomain, String description) throws NotFoundException { Long serviceID = getMultiUserChatServiceID(cursubdomain); if (serviceID == null) throw new NotFoundException(); updateMultiUserChatService(serviceID, newsubdomain, description); } COM: <s> updates the configuration of a muc service </s>
funcom_train/31526021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printSelf(PrettyPrinter printout) throws IOException { SymTabAST type = nodeToPrint.getFirstChildOfType(JavaTokenTypes.TYPE); SymTabAST rest = (SymTabAST)type.getNextSibling(); printOpenParen(printout); PrinterFactory.makePrinter(type).print(printout); printCloseParen(printout); PrinterFactory.makePrinter(rest).print(printout); } COM: <s> prints a type cast to the printer </s>
funcom_train/18439486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean login() { String uname = username.getText(); //noinspection deprecation String pword = password.getText(); jj_auth jjLogin = new jj_auth(uname, pword); boolean result; // check if ssl is enabled if (ssl.isSelected()) result = jjLogin.SecureCheckAccount(); else result = jjLogin.checkAccount(); // if login was successful, init update panel return result; } COM: <s> calls login method </s>
funcom_train/9920328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone(){ try{ CirclePlayer clone= (CirclePlayer) super.clone(); clone.toHisLeft= null; clone.toHisRight= null; clone.ai= null; clone.AIsHand= (Hand)AIsHand; return clone; } catch(CloneNotSupportedException e){return null;} } COM: <s> you shouldnt really be able to use this you never have an original </s>
funcom_train/26133436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void search(final Object o) { while (theItem != null) { if (equal.relation(o, theItem.datum)) return ; theParent = theItem ; if (order.relation(o, theItem.datum)) { theItem = theItem.left ; isLeft = true ; } else { theItem = theItem.right ; isLeft = false ; } } } COM: <s> go searching for an item </s>
funcom_train/25026880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storePlugInsPrefs() { plugInsPrefs.putBoolean(ALL_PLUG_INS, allPlugInsChk.isSelected()); plugInsPrefs.put(INCLUDE_PLUG_INS, getListAsString(includePlugInsList)); plugInsPrefs.put(IGNORE_PLUG_INS, getListAsString(ignorePlugInsList)); } COM: <s> stores the plug ins preferences </s>
funcom_train/9352231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeAxisXTop(final IAxis axisX) { boolean result = this.m_axesXTop.remove(axisX); this.unlistenToAxis(axisX); this.firePropertyChange(Chart2D.PROPERTY_AXIS_X, axisX, null); this.setRequestedRepaint(true); return result; } COM: <s> removes the given x axis from the list of internal top x axes </s>
funcom_train/26216383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getLocation() { if (container == null) { return new Point(bounds.getLocation()); } return new Point(bounds.getLocation().x + container.getLocation().x, bounds.getLocation().y + container.getLocation().y); } COM: <s> returns the location of the component </s>
funcom_train/23182873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopShipPlotterTask() { logger.info("stopShipPlotterTask() - Entry"); if (this.shipPlotterClientTask != null) { this.shipPlotterClientTask.cancel(); this.timer.purge(); this.shipPlotterActive = false; this.shipPlotterClientTask = null; this.updateCoreProfile(); logger.debug("stopShipPlotterTask() - stopped"); } logger.info("stopShipPlotterTask() - Exit"); } COM: <s> this method stops the freeais ship plotter client </s>
funcom_train/41593041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBookPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_RentRecord_book_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_RentRecord_book_feature", "_UI_RentRecord_type"), LibraryPackage.Literals.RENT_RECORD__BOOK, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the book feature </s>
funcom_train/15676937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Polyline2D createCap(Point2D center, double theta, double dist) { Point2D p1 = Point2D.createPolar(center, dist, theta-Math.PI/2); Point2D p4 = Point2D.createPolar(center, dist, theta+Math.PI/2); Point2D p2 = Point2D.createPolar(p1, dist, theta); Point2D p3 = Point2D.createPolar(p4, dist, theta); return new Polyline2D(new Point2D[]{p1, p2, p3, p4}); } COM: <s> portion of code shared by the two public methods </s>
funcom_train/18051321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteGroup(int index) throws KeydbLockedException { passLock(); byte[] groups = new byte[this.header.numGroups]; byte[] entries = new byte [this.header.numEntries]; KeydbUtil.fill(groups, (byte)0); KeydbUtil.fill(entries, (byte)0); this.markGroupDeleted(index, groups, entries); this.purge(groups, entries); } COM: <s> delete group from database recursively </s>
funcom_train/43567864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doAttrInterleaves(Document grammar) throws Exception { Nodes interleaves = grammar.getRootElement().query("./rng:define//rng:element/rng:interleave", Constants.namespaces); for (int i = 0; i < interleaves.size(); i++) { Element interleave = (Element) interleaves.get(i); if(isAttrInterleave(interleave)) { replaceByChildren(interleave); } } } COM: <s> remove element interleave that only contain atomic attr refs </s>
funcom_train/33282379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void jsxFunction_setStartAfter(final Node refNode) { if (refNode == null) { throw Context.reportRuntimeError("It is illegal to call Range.setStartAfter() with a null node."); } startContainer_ = refNode.getParent(); startOffset_ = getPositionInContainer(refNode) + 1; } COM: <s> sets the start of the range to be after the node </s>
funcom_train/45801451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSymmetric() { TopicMap tm = getTopicMap(); TopicIF aType = OntopolyModelUtils.getTopicIF(tm, PSI.ON_IS_SYMMETRIC); TopicIF rType = OntopolyModelUtils.getTopicIF(tm, PSI.ON_ASSOCIATION_TYPE); TopicIF player = getTopicIF(); return OntopolyModelUtils.isUnaryPlayer(tm, aType, player, rType); } COM: <s> indicates whether the association type is symmetric </s>
funcom_train/13402445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long write( MarshalledEntry entry, long duration) { struct.store( entry); if ( duration != Lease.FOREVER) { EntryRemovalTask rmTask = new EntryRemovalTask( struct, entry); timer.schedule( rmTask, duration); entry.setRemovalTask( rmTask); } return duration; } COM: <s> write inserts the specified entry into this lease store for a specified </s>
funcom_train/50164367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disableSet(String setUid) { try { ArrayList setInfos = this.getSetInfos(); int index = getIndexOfSetInfo(setUid, setInfos); prtln("disabling set: " + index); ((SetInfo) setInfos.get(index)).setEnabled("false"); adminData.update(Keys.SET_INFOS, setInfos); this.resetSetsData(); } catch (Throwable e) { return; } } COM: <s> disabled the given set of files from discovery </s>
funcom_train/47490828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getPollerLoginCommand() { if (pollerLoginCommand == null) {//GEN-END:|28-getter|0|28-preInit // write pre-init user code here pollerLoginCommand = new Command("Encuestador", Command.CANCEL, 0);//GEN-LINE:|28-getter|1|28-postInit // write post-init user code here }//GEN-BEGIN:|28-getter|2| return pollerLoginCommand; } COM: <s> returns an initiliazed instance of poller login command component </s>
funcom_train/6488985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void syncPolarNodeStates() { Component[] components = getComponents(); for (int i=0; i<components.length; i++) { if (components[i] instanceof PolarNode) { PolarNode node = (PolarNode) components[i]; Alternative alt = node.getResultEntry().getAlternative(); node.setSelected(selectionModel.isSelected(alt)); } } } COM: <s> synchronize the selected states of the polar nodes with the selection </s>
funcom_train/18502386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNewLocalSimilarity() { CBRLocalSimilarity localSim; String name, className, paramsType; name = "local sim " + contSim; contSim++; className = ""; paramsType = SimpleAttributeTypeRegistry.getInstance().getDefaultType(); localSim = new CBRLocalSimilarity(name, className, paramsType); tableModel.addLocalSimilarity(localSim); } COM: <s> adds a new local similarity function </s>
funcom_train/43913312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void print( Document dom ) throws Exception { TransformerFactory txFactory = TransformerFactory.newInstance(); Transformer tx = txFactory.newTransformer(); tx.setOutputProperty( OutputKeys.INDENT, "yes" ); tx.transform( new DOMSource( dom ), new StreamResult( System.out ) ); } COM: <s> utility method to print out a dom </s>
funcom_train/14237254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetToPreferredSize() { topNode.resetToPreferredSize(); bottomNode.resetToPreferredSize(); int width = findWidthCompromise(topNode, bottomNode); int topWidth = topNode.getSize().width; int bottomWidth = bottomNode.getSize().width; topNode.adjustSize(new Dimension(width - topWidth, 0)); bottomNode.adjustSize(new Dimension(width - bottomWidth, 0)); } COM: <s> make this node its original preferred size stretching as necessary </s>
funcom_train/19431572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDiscardedSkat(final Player player, final CardList skatBefore, final CardList discardedSkat) { AbstractHandPanel playerPanel = getPlayerPanel(player); for (int i = 0; i < 2; i++) { Card skatCard = skatBefore.get(i); takeCardFromSkat(player, skatCard); } for (int i = 0; i < 2; i++) { Card skatCard = discardedSkat.get(i); putCardIntoSkat(player, skatCard); } } COM: <s> sets the discarded skat </s>
funcom_train/29978683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeaderMessageIdType(java.lang.String param){ if (org.apache.axis2.databinding.utils.ConverterUtil.convertToString(param).matches("[0-9]{12}[a-z0-9]{8}[E|R|D]?")) { this.localHeaderMessageIdType=param; } else { throw new java.lang.RuntimeException(); } } COM: <s> auto generated setter method </s>
funcom_train/15624142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintComponent(@NotNull final Graphics graphics, final boolean isSnapshot, final boolean checkClip) { graphics.setColor(getBackground()); graphics.fillRect(0, 0, getWidth(), getHeight()); paintMap(graphics, checkClip); if (!isSnapshot) { paintMapGrid(graphics); paintMapSelection(graphics); } } COM: <s> paints this component </s>
funcom_train/43620517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int convertModelToRow(int index) { int size = getElementCount(); if ((index < 0) || (index >= size)) { return -1; } if (layoutOrientation != JList.VERTICAL && columnCount > 1 && rowsPerColumn > 0) { if (layoutOrientation == JList.VERTICAL_WRAP) { return index % rowsPerColumn; } return index / columnCount; } return index; } COM: <s> returns the row that the model index code index code will be </s>
funcom_train/26484105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean readReport(String fileName, String databasePassword) { report = new Report(); String url = getAppletViaCheapTrick().getReportURL(); try { if (url != null && url.length() > 0) report.read(new InputSource(url)); } catch (Exception e) { ErrorHandler.error(e); } reportFilePath = null; return false; // No password needed } COM: <s> reads the named report file or if its code null code creates </s>
funcom_train/12192043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test() throws Exception { HttpStatusCode code; code = HttpStatusCode.getStatusCode(200); assertSame(code, HttpStatusCode.OK); code = HttpStatusCode.getStatusCode(404); assertSame(code, HttpStatusCode.NOT_FOUND); code = HttpStatusCode.getStatusCode(900); assertSame(code, HttpStatusCode.RESPONSE_TIMED_OUT); } COM: <s> ensure that it creates codes properly </s>
funcom_train/51615803
/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[] array, Object value) throws IllegalArgumentException { Integer index = (Integer)map.get(name); if (index == null) throw new IllegalArgumentException(name + " is not a valid attribute"); array[index.intValue()] = value; } COM: <s> set the value of a named attribute within an array </s>
funcom_train/22279295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseMoved(java.awt.event.MouseEvent e) { // panel.addEvent(new MouseEvent(e.getWhen(),netscape.application.MouseEvent.MOUSE_MOVED,e.getX(),e.getY(),e.getModifiers())); e.consume(); } COM: <s> invoked when the mouse button has been moved on a component </s>