__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/11320356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFormCopyBigDecimal() { MockContext.initContext(Locale.US); Form form = new Form("form"); DoubleField decimalField = new DoubleField("decimalField"); String decimalValue = "0.1"; decimalField.setValue(decimalValue); form.add(decimalField); MyObj obj = new MyObj(); form.copyTo(obj); assertEquals(decimalValue, obj.decimalField.toString()); } COM: <s> test that the fix for double big decimal conversion work </s>
funcom_train/37790564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(Naked anObject, Field asField, NakedView parentView, ViewFactory.ViewStyle aStyle) { super.init(anObject, asField, parentView, aStyle); if (parentView != null) { parent = parentView.getObject(); } } COM: <s> initializes the gui </s>
funcom_train/49199997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addImagePathPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor( ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LocalImage_imagePath_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LocalImage_imagePath_feature", "_UI_LocalImage_type"), ExhibitionPackage.Literals.LOCAL_IMAGE__IMAGE_PATH, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null) { @Override public boolean canSetProperty(Object object) { return false; } }); } COM: <s> this adds a property descriptor for the image path feature </s>
funcom_train/36993473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildObjects() { LayerObjGridDrawer s = new LayerObjGridDrawer("Living Programs", model.world); // 4 = pixels of the cell display = new LayeredSurfaceFrame(model.worldXSize, model.worldYSize, 4); display.addLayer(s); addSimWindow(display); } COM: <s> creates the display information of the agents </s>
funcom_train/19357500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DIGReasonerIdentity getIdentity() throws DIGReasonerException { // Format the request - a simple <getIdentifier/> request Document request = translator.createDIGDocument(Vocab.GET_IDENTIFIER); // Send the request to the reasoner and get the response Document response = performRequest(request); // Create a new DIGReasonerIdentity object that we // can parse the response into DIGReasonerIdentity id = new DIGReasonerIdentity(); id.parseIdentityDescrtiption(response); return id; } COM: <s> gets the identity of </s>
funcom_train/21647784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRow(String[] row) { int rowCount = getRowCount(); resize( rowCount+1, getColumnCount() ); setRow( rowCount - FIRST_ROW, row ); for( int i=0; i<getColumnCount(); i++) { getCellFormatter().setStyleName( rowCount, i, "cells"); } } COM: <s> adds new row including resize of table </s>
funcom_train/9238155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean callChannelAwayStateOther(final ChannelInfo channel, final ChannelClientInfo channelClient, final boolean state) { final CallbackOnChannelAwayStateOther cb = (CallbackOnChannelAwayStateOther)myParser.getCallbackManager().getCallbackType("OnChannelAwayStateOther"); if (cb != null) { return cb.call(channel, channelClient, state); } return false; } COM: <s> callback to all objects implementing the on channel away state other callback </s>
funcom_train/37854636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endTarget(long revision) { try { myTargetPath = null; if (revision >= 0) { addAttribute(REVISION_ATTR, revision + ""); openTag(AGAINST_TAG); closeTag(AGAINST_TAG); } closeTag(TARGET_TAG); } catch (SAXException e) { getDebugLog().logSevere(SVNLogType.DEFAULT, e); } } COM: <s> closes the formatted xml with the revision against which </s>
funcom_train/35843797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateElementListeners(Set<Object[]> listenerSet) { Set<Object[]> removes = new HashSet<Object[]>(listeners); removes.removeAll(listenerSet); removeElementListeners(removes); Set<Object[]> adds = new HashSet<Object[]>(listenerSet); adds.removeAll(listeners); addElementListeners(adds); } COM: <s> update the set of registered listeners to match the given set using </s>
funcom_train/5857633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String ejbFindByPrimaryKey (String key) throws FinderException, HeroException { log.debug("ejbFindByPrimaryKey key="+key); boolean result; try{ result=ProjectDAO.findByPrimaryKey(key); }catch (java.sql.SQLException se) { throw new FinderException ("SQL Exception in find by primary key"); } if (result) { return(key); } else { throw new FinderException("Row for id " + key + " not found. "); } } COM: <s> describe code ejb find by primary key code method here </s>
funcom_train/22284680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Vector getElements() { Vector result = new Vector(); int daypos = getDayPos(); int monthpos = getMonthPos(); int yearpos = getYearPos(); // add the elements in the correct order for (int pos = 0; pos < 3; pos++) { if (daypos == pos) { result.addElement(dayElement); } else if (monthpos == pos) { result.addElement(monthElement); } else if (yearpos == pos) { result.addElement(yearElement); } } return result; } COM: <s> returns the day month and year elements in </s>
funcom_train/17028566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DateRange getDateRange() { DateRange dr = new DateRange(); if (startEMilliSecs != null) { dr.setStartDate(new Date(startEMilliSecs.longValue())); } if (endEMilliSecs != null) { dr.setEndDate(new Date(endEMilliSecs.longValue())); } return dr; } COM: <s> return start and end time parsed from the flat file </s>
funcom_train/48991565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setYear(String year) { this.year = (year == null) ? "N/A" : year.trim(); // do some validation - should be 4 places & numeric if (this.year.matches("^\\d{4}(.*)?")) { this.year = this.year.substring(0, 4); } else { this.year = "N/A"; } } COM: <s> sets the year of release </s>
funcom_train/24641950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMarkAllHighlightColor(Color color) { Color old = (Color)markAllHighlightPainter.getPaint(); if (old!=null && !old.equals(color)) { markAllHighlightPainter.setPaint(color); if (markedWord!=null) repaint(); // Repaint if words are highlighted. firePropertyChange(MARK_ALL_COLOR_PROPERTY, old, color); } } COM: <s> sets the color used for mark all </s>
funcom_train/18569985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCanRecordArgMatcher() { // use a nice control to avoid EasyMock failing comparison on internally created arrays ArgMatcher argMatcher = new EqualsMatcher(); ArgMatcher[] argMatchers = new ArgMatcher[] {argMatcher}; mockCallManager.recordArgMatchers(argMatchers); controlCallManager.setDefaultMatcher(MockControl.ARRAY_MATCHER); controlCallManager.replay(); vm.recordArgMatcher(argMatcher); } COM: <s> tests the various record arg matcher method </s>
funcom_train/50501254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name) { if(name == null || name.trim().length() == 0) { throw new IllegalArgumentException("Invalid name"); } String oldName = this.name; this.name = name; firePropertyChange("description",oldName,name); } COM: <s> sets the name attribute of the abean object </s>
funcom_train/32740256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String htmlEscape(String s) { // TODO: use internal java class?! // we NEED to have this replacement first, otherwise we will replace the '&' from the &lt; and &gt; s = s.replaceAll("&", "&amp;"); s = s.replaceAll("<", "&lt;"); s = s.replaceAll(">", "&gt;"); return s; } COM: <s> escapes a string to html conform format </s>
funcom_train/1156810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getTruncatedParagraphAt(int index) { Element root = buffer.getRootElements()[0]; assert root.getElementCount() > 0; try { Element child = root.getElement(root.getElementIndex(index)); int end = child.getEndOffset(); return buffer.getText(index, end - index); } catch (Exception ex) { throw new IllegalArgumentException(ex); } } COM: <s> text from a paragraph truncated to start at index </s>
funcom_train/49605603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Answer createAnswer(Element element, Question question) { Answer answer = AnswerFactory.createAnswer(question.getType()); answer.setCode(Integer.parseInt(element.getAttribute("code"))); answer.setTotalAnswers(Integer.parseInt(element.getAttribute("total-answers"))); Element description = (Element) element.getChildNodes().item(0); answer.setDescription(description.getChildNodes().item(0).getNodeValue()); answer.setQuestion(question); return answer; } COM: <s> method responsible for building a new answer </s>
funcom_train/22279994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setElementAt(Object element, int index) { if (index >= count) { throw new ArrayIndexOutOfBoundsException(index + " >= " + count); } if (element == null) { throw new NullPointerException( "It is illegal to store nulls in Vectors."); } array[index] = element; } COM: <s> sets the element at b index b to b element b </s>
funcom_train/3714069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGraphicsAttributes (Map attributes) { if (attributes != null && !edited) { String key = (String) getSpectrumList().nextElement(); GraphicsAttributes ga = (GraphicsAttributes) attributes.get(key); stroke = ga.getStroke(); symbol = ga.getSymbol(); size = ga.getSymbolSize(); edited = false; } } COM: <s> sets a list of graphics attributes </s>
funcom_train/29771287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDisplayedColumnName() { System.out.println("getDisplayedColumnName"); NameColumns instance = null; String expResult = ""; String result = instance.getDisplayedColumnName(); 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 displayed column name method of class io </s>
funcom_train/14088719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeEntry(String chunkId, String type) { try { Entry entry = rootNode.getEntry("__substg1.0_" + chunkId + type); if(entry.delete()) System.out.println("Deleted"); header.removeChunk(Long.parseLong(chunkId, 16)); } catch (FileNotFoundException e) { //we don't care, this just means the node didn't exist already } } COM: <s> removes a node from the imessages poifs </s>
funcom_train/13995901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSpace() { assertValidationMessageCount("fo @fi.de", "spaces are not allowed", 1); assertValidationMessageCount("fo@f i.de", "spaces are not allowed", 1); assertValidationMessageCount("fo@fi. de", "spaces are not allowed", 1); } COM: <s> tests that validation fails if the email adress contains space </s>
funcom_train/34851568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsEnabledPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Breakpoint_isEnabled_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Breakpoint_isEnabled_feature", "_UI_Breakpoint_type"), PetriPackage.Literals.BREAKPOINT__IS_ENABLED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is enabled feature </s>
funcom_train/38808477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_TCM__String_toString() throws JHuPeDOMException { Element element = jhupeDomFactory.newElement("element"); DocType docType = jhupeDomFactory.newDocType("element"); Document doc = jhupeDomFactory.newDocument(element, docType, "doc"); String buf = new String( "[Document: [DocType: <!DOCTYPE element>], Root is [Element: <element/>]]"); assertEquals("incorrect root element returned", buf, doc.toString()); } COM: <s> test that the to string method returns the expected result </s>
funcom_train/1033946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name) { if (name == null) { this.name = name; } else { this.name = name.intern(); } // Capture the const/volatile attributes at the time of typedef so // we don't redundantly repeat them in the CV attributes string typedefedCVAttributes = cvAttributes; hasTypedefName = true; } COM: <s> set the name of this type used for handling typedefs </s>
funcom_train/25280988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DecompressionPlan calculate() throws DiveException { IAlgorithmExecutor executor = null; switch (algorithm) { case BUHLMANN_ZHL16A: executor = new BuhlmannExecutor(BuhlmannZHL16AHalfTimeTable.getInstance()); break; case BUHLMANN_ZHL16B: executor = new BuhlmannExecutor(BuhlmannZHL16BHalfTimeTable.getInstance()); break; case BUHLMANN_ZHL16C: executor = new BuhlmannExecutor(BuhlmannZHL16CHalfTimeTable.getInstance()); break; case VPMB: //execute VPMB break; } if(executor == null) { throw new DiveException("Invalid algorithm. Calculate your schema yourself!"); } return executor.Calculate(dive); } COM: <s> start the calculation of the decompression scheme </s>
funcom_train/21500487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getVisiblePlayers(MuObject object) { Vector<MuPcInstance> _list = new Vector<MuPcInstance>(); Collection t = getVisibleObjects(object); for (Iterator it = t.iterator(); it.hasNext();) { Object object1 = it.next(); if (object1 instanceof MuPcInstance) { _list.add((MuPcInstance) object1); } } return _list; } COM: <s> get all plyers nearto obiect </s>
funcom_train/22718458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeKeyConnection(ForeignKeyConnection connection) throws IOException { writeStartElement(FileOpener.XML_ELEMENT_TABLE, FileOpener.ATTRIBUTE_TABLE_NAME, connection.getTable().getName(), FileOpener.ATTRIBUTE_FK_TYPE, "0"); writeConnectionField(connection.getField()); writeEndElement(FileOpener.XML_ELEMENT_TABLE); } COM: <s> write out the foreign key connection in xml format </s>
funcom_train/19130591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableImage() throws CommPortException { MICEnableImageCommand cmd = new MICEnableImageCommand(); try { port.addCommPortEvent(cmd); port.open(); port.write(cmd.getSendBytes(), false); } finally { if (port != null) { port.removeCommPortEvent(); port.close(); } } } COM: <s> sends the enable image command </s>
funcom_train/39982995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validateForm() { String name = nameTxt.getText().trim(); String descr = descrTxt.getText().trim(); nameTxt.removeStyleName(CustomLabel.CSS_ERROR_CLASS); descrTxt.removeStyleName(CustomLabel.CSS_ERROR_CLASS); boolean correct = true; if(name.equals("")){ nameTxt.setStyleName(CustomLabel.CSS_ERROR_CLASS); correct=false; } if(descr.equals("")){ descrTxt.setStyleName(CustomLabel.CSS_ERROR_CLASS); correct=false; } if(!correct){ errorLabel.setMessage("Values incorrect!", CustomLabel.CSS_ERROR_CLASS,CustomLabel.TIMER_SHORT); } return correct; } COM: <s> this method validates fields from the form </s>
funcom_train/13477489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setJars(String s) { PatternSet patset = new PatternSet(); patset.setIncludes(s); String[] jarNames = patset.getIncludePatterns(getProject()); for (int i = 0; i < jarNames.length; i++) { File f = new File(jarNames[i]); mJarAttrs.add(f); } } COM: <s> setter for the jars attribute required if no jarfileset is present </s>
funcom_train/46760454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InvoiceFormatModel getInvoiceFormat(final long invoiceFormatId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return BillingData.getInvoiceFormat(invoiceFormatId, chain, call); }}; return (InvoiceFormatModel) call(method, call); } COM: <s> same transaction return the single invoice format model for the primary key </s>
funcom_train/1479626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNextDamage() { NPC n = Server.engine.npcs[p.attackNpc]; if (p == null || n == null || n.isDead || n.currentHP <= 0) { p.attackNpc = 0; p.requestFaceTo(65535); p.resetAttack(); return; } if (p.nextDamageDelay == 0) { n.appendHit(getRandom(getMaxhit()), 0); } p.nextDamageDelay = -1; } COM: <s> magic shortbow second damage </s>
funcom_train/42417214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInside(Term tt) { if (from.getTime() / 1000 > tt.from.getTime() / 1000) { return false; } if (to != null && tt.to != null && to.getTime() / 1000 < tt.to.getTime() / 1000) { return false; } if (to != null && tt.to == null) { return false; } return true; } COM: <s> checks if the suplied term is anywhere inside this timespan </s>
funcom_train/11379114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void purgeFileIndex() { Iterator<String> fileIter = fileIndex.keySet().iterator(); while(fileIter.hasNext()) { String file = fileIter.next(); if (fileIndex.get(file).isExpired()) { fileIter.remove(); } } } COM: <s> purge expired jobs from the file index </s>
funcom_train/29886408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Draw_event(Graphics2D g) { if (sprite != null) { g.drawImage(sprite.imshow(), null, (int) x - sprite.sprite_xoffset, (int) y - sprite.sprite_yoffset); } else { //System.out.println("sprite is null"); } } COM: <s> override with the draw event of the actor but dont call this method </s>
funcom_train/29080161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sizeColumnsToFit() { ArrayList<Column> columns = new ArrayList<Column>(); for (Column column : mModel.getColumns()) { if (column.isVisible()) { int width = column.getPreferredWidth(this); if (width != column.getWidth()) { column.setWidth(width); columns.add(column); } } } if (!columns.isEmpty()) { processColumnWidthChanges(columns); } } COM: <s> sets the width of all visible columns to their preferred width </s>
funcom_train/17521703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int print(Graphics g, PageFormat format, int p) throws PrinterException { g.translate((int) format.getImageableX(), (int) format.getImageableY()); int w = (int) format.getImageableWidth(); int h = (int) format.getImageableHeight(); return printPanel(g, w, h, p); } COM: <s> overrides the print method of component </s>
funcom_train/9644402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setTarget(SGTarget newTarget) { UndoableSubgroupEdit undo = new UndoableSubgroupEdit( "vikamine.currentSG.undoable.setTarget"); getSubgroup().setTarget(newTarget); recreateSubgroupStatistics(); root.setUserObject(newTarget); Object[] path = new Object[] { getRoot() }; int[] index = new int[0]; fireTreeNodesChanged(this, path, index, null); getEventForwarder().fireStructureChangedEvent(); undo.storeNewSG(); fireUndoableEditEvent(undo); } COM: <s> sets the target </s>
funcom_train/46992970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getNullStrippedString(String rawString){ String nullRemovedString = null; int null_position = rawString.indexOf(0); if (null_position >= 0){ // string is terminated by the null nullRemovedString = rawString.substring(0, null_position); } else { // not null-termiated (sometimes space-paddded, instead) nullRemovedString = rawString; } return nullRemovedString; } COM: <s> returns a new null character free code string code object </s>
funcom_train/8621157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PessoaVO findPessoaByCpf(Long nrCpf) throws DatabaseException, BusinessException { try { PessoaDAO dao = new PessoaDAO(getConnection()); PessoaVO pessoa = dao.findByCpf(nrCpf); if(pessoa.getIdPessoa() == null) { throw new BusinessException("Nenhum registro encontrado."); } return pessoa; } finally { closeConnection(); } } COM: <s> busca pessoa por cpf </s>
funcom_train/3720904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUsage(String usage) throws ProfileException { String oldUsage = this.usage; try { vetoableChangeSupport.fireVetoableChange("usage", oldUsage, usage); } catch (Exception e) { throw new ProfileException(null, e); } this.usage = usage; propertyChangeSupport.firePropertyChange("usage", oldUsage, usage); } COM: <s> setter for property usage </s>
funcom_train/17927199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getElementsByName ( String requestString ) throws org.xml.sax.SAXException { requestString = requestString.replaceAll( " " , "" ) ; String [] requestArray = requestString.split(",") ; Vector responseVector = new Vector(); responseVector = this.ProcessgetElementsByName( this.initElement, requestArray, responseVector, 0 ) ; return responseVector; } COM: <s> retrieve elements from an xml dom tree </s>
funcom_train/28209421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void export(final File file) throws Throwable { ExportProcessor.export(null, getReportViewer().getDocument(), file, new ExportProcess() { public void export(String type, JasperPrint document, File file, JRExportProgressMonitor monitor) throws Throwable { exportWithProgress(file, monitor); } }); } COM: <s> subclasses can override this method to implement an export method </s>
funcom_train/2800545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDouble(String pProperty) throws RaccoonException { try { /** Try to return the value of the property */ return Double.parseDouble(mProperties.getString(pProperty)); } catch (java.util.MissingResourceException e) { /** Property not found throwing exception */ throw new RaccoonException(ErrorCodes.RESOURCE_NOT_FOUND, getMissingPropertyMsg(pProperty), e); } } COM: <s> reads the value of the propery and converts it to a double </s>
funcom_train/26206461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeBytes(final String value) throws EOFException { final int length = value.length(); writeShort(JobObjectStream.classIdOfByteArray); writeShort(length); for (int i = 0; i < length; i++) { write(value.charAt(i)); } } COM: <s> writes a string to the output stream </s>
funcom_train/41509936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enableButtons(boolean okButton, boolean mergeButton) { if(this.okButton != null) { this.okButton.setEnabled(okButton); } if(this.mergeButton != null) { this.mergeButton.setEnabled(mergeButton); } if(this.mergeHelpLabel != null) { this.mergeHelpLabel.setEnabled(mergeButton); } } COM: <s> enables the ok button and the merge options </s>
funcom_train/1488165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer mapToCode(String raw) throws MappingNotDefinedException { Integer code = null; String processed = StringUtils.trimToNull(raw); if (processed != null) { processed = processed.replaceAll(" ", "").toUpperCase(); code = (Integer) map.get(processed); } if (code == null) { code = defaultCode; } if (code == null) { throw new MappingNotDefinedException("No mapping for raw string \"" + raw + "\""); } return code; } COM: <s> map supplied string to a code value </s>
funcom_train/1152027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand23() { if (itemCommand23 == null) {//GEN-END:|419-getter|0|419-preInit // write pre-init user code here itemCommand23 = new Command("Escuchar", Command.ITEM, 0);//GEN-LINE:|419-getter|1|419-postInit // write post-init user code here }//GEN-BEGIN:|419-getter|2| return itemCommand23; } COM: <s> returns an initiliazed instance of item command23 component </s>
funcom_train/40322449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToolBar getJJToolBarBar() { if (jJToolBarBar == null) { jJToolBarBar = new JToolBar(); jJToolBarBar.setBounds(new Rectangle(0, 0, 372, 33)); jJToolBarBar.add(getJMenuItem()); jJToolBarBar.add(getJMenuItem1()); } return jJToolBarBar; } COM: <s> this method initializes j jtool bar bar </s>
funcom_train/40222196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (numCards == 0) return "[BuildablePile:" + getName() + ":<empty>]"; StringBuffer sb = new StringBuffer ("[BuildablePile:" + getName() + ":"); for (int i = 0; i < numCards; i++) { sb.append (cards[i].toString()); if (i < numCards-1) sb.append (","); } sb.append ("]"); return sb.toString(); } COM: <s> return string representation of buildable pile </s>
funcom_train/11118388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Transport getTransport(String className) { Transport transport = null; Class transportClass = null; // If a Transport class name isn't supplied use // the default Transport implementation. if (className == null) className = DEFAULT_TRANSPORT_CLASS; try { // instruct class loader to load the TransportFactory transportClass = getClassForName(className); } catch (ClassNotFoundException cnfex) { throw new RuntimeException(cnfex); } try { // try to instantiate the TransportFactory transport = (Transport) transportClass.newInstance(); } catch (Exception ex) { throw new RuntimeException(ex); } return transport; } COM: <s> returns an implementation of transport based on the class name passed in </s>
funcom_train/10635727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUp() { if (doLog) { System.out.println(""); System.out.println("========================"); System.out.println("====== Running the test: " + getName()); } } COM: <s> sets up the test case </s>
funcom_train/46062240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initForm(String noAccessString) { noAccessExplanation = new WikiMarkupTextAreaElement( "form.noAccessExplanation", 4, 40, (noAccessString==null? "": noAccessString)); addFormElement("noAccessExplanation", noAccessExplanation); if(constructorInitCall){ addSubmitKey("save", "save"); setCancelButton(); constructorInitCall=false; } } COM: <s> initialise the form with the given string </s>
funcom_train/43884453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rwalk(XSDTypeDefinition base, Visitor visitor) { List types = types(base); for (int i = types.size() - 1; i > -1; i--) { XSDTypeDefinition type = (XSDTypeDefinition) types.get(i); //do the visit, if visitor returns false, break out if (!visitor.visit(type)) { break; } } } COM: <s> walks from the top of the type hierachy to the bottom </s>
funcom_train/41101426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addComponent(IReconfigurableComponent a) { AddComponentCommand acc = new AddComponentCommand(); try { RequestSender myRequestSender = RequestSender.lookup("ReconfigurationEngine"); acc.setComponent(a); ReplyEnvelope reply = myRequestSender.send(acc); reply.checkForRuntimeException(); } catch (Exception e) { e.printStackTrace(); } } COM: <s> registers an application with the reconfiguration engine </s>
funcom_train/129956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Shape getBasicArrowTip() { Polygon arrowTip = new Polygon(); arrowTip.addPoint(-4, -8); arrowTip.addPoint(0, 0); arrowTip.addPoint(4, -8); arrowTip.addPoint(0, 0); return arrowTip; } COM: <s> vends a basic triangular arrow tip that is suitable for use as an </s>
funcom_train/17393523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDescription() { if (fullDescription == null) { if (description == null || isExtensionListInDescription()) { fullDescription = description == null ? "(" : description + " ("; // build the description from the extension list Iterator extensions = filters.keySet().iterator(); fullDescription += "." + extensions.next(); while (extensions.hasNext()) { fullDescription += ", ." + extensions.next(); } fullDescription += ")"; } else { fullDescription = description; } } return fullDescription; } COM: <s> returns the human readable description of this filter </s>
funcom_train/44998893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(java.lang.Object o1, java.lang.Object o2) { if (o1==null || o2==null) throw new NullPointerException(); if (!getType().getJavaType().isInstance(o1) || !getType().getJavaType().isInstance(o2)) { throw new IllegalArgumentException(); } String s1 = (String) getValue(o1); String s2 = (String) getValue(o2); return s1.compareTo(s2); } COM: <s> compares two strings </s>
funcom_train/35299214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static private String getSystemProperty(final String propName) { String property = null; try { property = AccessController.doPrivileged(new PrivilegedAction<String>() { public String run() { return System.getProperty(propName); } }); } catch (SecurityException se) { if (debug) { se.printStackTrace(); } } return property; } COM: <s> returns the requested system property </s>
funcom_train/3062534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String makeMethodName(final String prefix, final String property) { final StringBuffer retval = new StringBuffer(); retval.append(property); retval.setCharAt(0, Character.toUpperCase(property.charAt(0))); retval.insert(0, prefix); return retval.toString(); } COM: <s> returns a method name for a property </s>
funcom_train/2965037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void consoleReport() { if(LOGGER.isLoggable(Level.INFO)) { //status s logMsg.appendStatus(status.getName()); //solution v if( isFeasible == Boolean.TRUE) { //display best solution final String values = getValuesMessage(); if(values != null) { logMsg.appendValues(values.replaceAll("\n", "\nv ")); } } //diagnostics and configuration d/c logOnDiagnostics(); logOnConfiguration(); LOGGER.info(logMsg.getLoggingMessage()); } } COM: <s> the default console report as described in http www </s>
funcom_train/32112141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMapCount() { // check if we are rendering if(selectedSubmesh == null) { throw new IllegalStateException("beginRendering must be called " + "before \"getMapCount\""); } // get the core material CoreMaterial coreMaterial; coreMaterial = model.getCoreModel().getCoreMaterial(selectedSubmesh.getCoreMaterialId()); if(coreMaterial == null) { return 0; } return coreMaterial.getMapCount(); } COM: <s> returns the number of maps </s>
funcom_train/7803453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasMoreFixedGroups(long time) { long nextTime = -1L; Iterator ifg = fixedGroups.iterator(); while (ifg.hasNext()) { FixedGroup fg = (FixedGroup) ifg.next(); long fgtime = fg.getFixedTime(); // if we havnt already past its latest start time count it if (fgtime + fixedGroupPostStartLapseTime > time) { if (fgtime > nextTime) { nextTime = fgtime; } } } if (nextTime > 0) return true; return false; } COM: <s> returns true if there are any executable fixed groups after time </s>
funcom_train/18805760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Image getImage(Plot plot, int series, int item, double x, double y) { // should this be added to the plot as well ? // return plot.getShape(series, item, x, y, scale); // or should this be left to the user - like this: return null; } COM: <s> returns the image used to draw a single data item </s>
funcom_train/4577127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _testGetBeanDesc1() throws Exception { Lucy lucy = getLucy(); DefaultBeanDescStrategyImpl strategy = new DefaultBeanDescStrategyImpl( lucy); BeanDesc<Parent> bd1 = new BeanDescImpl<Parent>(Child1.class); BeanDesc<Parent> bd2 = new BeanDescImpl<Parent>(Child2.class); List<BeanDesc<Parent>> list = CollectionsUtil.newArrayList(); list.add(bd1); list.add(bd2); try { strategy.getBeanDesc(Parent.class, list); fail(); } catch (TooManyRegistrationException expected) { success(); } } COM: <s> todo suspects this behavior </s>
funcom_train/37076523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean handleFeatureSelectionEvent (FeatureSelectionEvent evt) { if (!canHandleSelection(evt,this)) return false; // now we do something, canHanSel filters for GenAnnIs AnnotatedFeatureI gai = (AnnotatedFeatureI)evt.getFeatures().getFeature(0); displayAnnot(getTransOrOneLevelAnn(gai)); translationViewer.repaint(); return true; } COM: <s> handle the selection event </s>
funcom_train/26151961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int countChildrenOf(IResource resource) throws CoreException { if (resource.getType() == IResource.FILE) return 1; int count = 0; if (resource.isAccessible()) { IResource[] children = ((IContainer) resource).members(); for (int i = 0; i<children.length; i++) count += countChildrenOf(children[i]); } return count; } COM: <s> returns the number of children for the given resource </s>
funcom_train/22224157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCount(int count) throws DataSourceException { try { if (channel == null) return -1; count = 0; for (int tmp = readRecord(); tmp != -1; tmp = readRecord()) count += tmp; } catch (IOException ioe) { count = -1; // What now? This seems arbitrarily appropriate ! throw new DataSourceException("Problem reading shapefile record", ioe); } return count; } COM: <s> parses the shpfile counting the records </s>
funcom_train/12810760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPatternFill(final PdfPatternPainter p, final BaseColor color) { if (ExtendedColor.getType(color) == ExtendedColor.TYPE_SEPARATION) setPatternFill(p, color, ((SpotColor)color).getTint()); else setPatternFill(p, color, 0); } COM: <s> sets the fill color to an uncolored pattern </s>
funcom_train/51207915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dupe(Hashtable record) { System.out.println("DazioModel.dupe()"); record.put(RS.UNIQUEIDKEY, "DAZmobile" + new Long(System.currentTimeMillis()).toString()); record.put(RS.VERSIONNUMKEY, "0"); save(record); } COM: <s> this function will duplicate a data entry in the records </s>
funcom_train/4151562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BitmapText createStageTitle(String name) { BitmapText stage = new BitmapText(FontUtils.neuropol, false); stage.setText(name); stage.setName("stageTitle_" + name); stage.setDefaultColor(ColorRGBA.white); stage.setSize(fontSize); stage.update(); stage.setLocalTranslation(210 - stage.getLineWidth() / 2, baseHeight / 2 - 256 / 2, 0); return stage; } COM: <s> creates an individual stage title </s>
funcom_train/37513982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addExceptionClass(ClassDoc d) { MjClassDoc mjd = (MjClassDoc)classes.get(d.name()); if (d instanceof MjClassDoc) { int c = ((MjClassDoc)d).compare(mjd); if (c == 1) return; if (c == -1) { exceptionClasses.remove(mjd); classesInOrder.remove(mjd); } } classes.put(d.name(),d); exceptionClasses.add(d); classesInOrder.add(d); } COM: <s> registers an mj class doc object as an exception class </s>
funcom_train/49329954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean fitsOnOnePage (Dimension pageSize, double wImage, double hImage) { double wPage = pageSize.getWidth(); double hPage = pageSize.getHeight(); int wRatio = (int) Math.ceil(wImage / wPage); int hRatio = (int) Math.ceil(hImage / hPage); return wRatio <= 1.0d && hRatio <= 1.0d; } COM: <s> determine if the image will fit on the given page </s>
funcom_train/1517583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Sprite getSpriteCollision(Sprite sprite) { // run through the list of Sprites Iterator i = map.getSprites(); while (i.hasNext()) { Sprite otherSprite = (Sprite)i.next(); if (isCollision(sprite, otherSprite)) { // collision found, return the Sprite return otherSprite; } } // no collision found return null; } COM: <s> gets the sprite that collides with the specified sprite </s>
funcom_train/44222913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadData() { try { this.copyCurrentVIToLocalImp(); Diagrammar localImp = (Diagrammar)this.get_plugin().get_localImp(); localImp.get_basePanel().get_canvas().unzip(); } catch (Exception ex) { ex.printStackTrace(); } this.loadEmbededImages(); } COM: <s> p load data from vpdmf system into local application </s>
funcom_train/3919821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Role getRoleByIdentifier(String idref) { if(idref == null) { return null; } Role role = (Role)getLearnerGroup().getChildByIdentifer(idref, true); if(role == null) { role = (Role)getStaffGroup().getChildByIdentifer(idref, true); } return role; } COM: <s> get a role given its identifier or null if not found </s>
funcom_train/20644768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { jp = new JPanel(); jp.setLayout(new BorderLayout(0,0)); JLabel jb = new JLabel("Fixed amount that will be charged : "); BC.langManager.register(jb, "Fixed Amount Description"); jp.add(jb, BorderLayout.NORTH); jp.add(getMoneyEditor(), BorderLayout.CENTER); } COM: <s> this method initializes this </s>
funcom_train/2890658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIgnoredHeader() throws IOException { Options options = new Options(); options.addOption(new URI("http://localhost/ignored"), "test", false); DeploymentDescriptorType dd = operation.createSmartFrogDescriptor( DeploySmartFrogTest.SIMPLE_DESCRIPTOR); URI uri = deploy(null, dd, options, null); undeploy(uri); } COM: <s> test that ignored headers dont raise trouble </s>
funcom_train/21407061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showProgress(String title, String message){ Alert alert = new Alert(title,message,null, null); alert.setTimeout(Alert.FOREVER); Gauge indicator = new Gauge(null, false,Gauge.INDEFINITE,Gauge.CONTINUOUS_RUNNING); alert.setIndicator(indicator); alert.addCommand(DefaultCommands.cmdCancel); alert.setCommandListener(this); display.setCurrent(alert,prevScreen); alertMode = true; progressAlert = alert; } COM: <s> displays a progress window </s>
funcom_train/49200425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGenerateSequencePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BranchingPointChoice_generateSequence_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BranchingPointChoice_generateSequence_feature", "_UI_BranchingPointChoice_type"), TransformedPackage.Literals.BRANCHING_POINT_CHOICE__GENERATE_SEQUENCE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the generate sequence feature </s>
funcom_train/101732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rebuild() { // delete the layout panel.removeAll(); GridBagConstraints c = new GridBagConstraints(); c.gridx = 0; c.gridy = 0; c.ipady = 4; // now, add everything to our layout for(SearchParameterPanel searchPanel : parameters) { panel.add(searchPanel, c); c.gridy++; } c.anchor = GridBagConstraints.LINE_START; panel.add(addButton, c); // revalidate our panel, we changed the layout panel.revalidate(); } COM: <s> rebuild our panel relayout everything </s>
funcom_train/13246446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getButtonsPanel() { if (buttonsPanel == null) { JPanel northPanel = new JPanel(); northPanel.add(getRadioButtonsPanel()); JPanel southPanel = new JPanel(); southPanel.add(getContinueButton()); southPanel.add(getCancelButton()); buttonsPanel = new JPanel(); buttonsPanel.setLayout(new BorderLayout()); buttonsPanel.add(northPanel, BorderLayout.NORTH); buttonsPanel.add(southPanel, BorderLayout.SOUTH); } return buttonsPanel; } COM: <s> returns the bottom panel containing the radio buttons and continue button </s>
funcom_train/11371528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getEncodedUgiParameter() { StringBuilder ugiParamenter = new StringBuilder( ServletUtil.encodeQueryValue(ugi.getShortUserName())); for(String g: ugi.getGroupNames()) { ugiParamenter.append(","); ugiParamenter.append(ServletUtil.encodeQueryValue(g)); } return ugiParamenter.toString(); } COM: <s> get encoded ugi parameter string for a url </s>
funcom_train/49319761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSilentTimeLineNode(TimeLineNode node) { if (!_nodes.contains(node)) { node.setParent(this); _nodes.add(node); node.addVetoableChangeListener(_myChildListener); addVetoableChangeListener(node); _model.addTimeLineNode(node.getModel()); } } COM: <s> add a time line node to the time line without checking its legality </s>
funcom_train/11675600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNonMatchingContract() throws Exception { URIResolver resolver = new DataURIResolver(); Source src; src = resolver.resolve("http://xmlgraphics.apache.org/fop/index.html", null); assertNull(src); src = resolver.resolve("index.html", "http://xmlgraphics.apache.org/fop/"); assertNull(src); } COM: <s> test the uriresolver contract if the protocol doesnt match </s>
funcom_train/8078948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateWeights(double l, double m) { //the action the subclasses should perform is upto them //but if they coverride they should make a call to this to //call the method for all their inputs. if (!m_weightsUpdated) { for (int noa = 0; noa < m_numInputs; noa++) { m_inputList[noa].updateWeights(l, m); } m_weightsUpdated = true; } } COM: <s> call this function to update the weight values at this unit </s>
funcom_train/1613019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setComparison(Operator op, ComparableOperand op1, ComparableOperand op2, Class type){ expressions[current] = createComparison(op, op1, op2, type); /*if( type == String.class ) expressions[current] = facade.createStringComparison((StringComparisonOperator)op, (StringComparableOperand)op1, (StringComparableOperand)op2); else expressions[current] = facade.createDefaultComparison((DefaultComparisonOperator)op, op1, op2);*/ } COM: <s> sets a comparison </s>
funcom_train/4349246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prepareBoard(Board b) { b.setStone(3, 5, GameLogic.PLAYER_ONE); b.setStone(3, 4, GameLogic.PLAYER_ONE); // for (int i = 0; i < GameLogic.COLS; i++) { // for (int j = 0; j < GameLogic.ROWS; j++) { // b.setStone(i, j, GameLogic.PLAYER_ONE); // } // } // } COM: <s> prepares the board for the get best move test </s>
funcom_train/42548459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSiteCount() { if (this.getApexData() != null) { if (getSeriesCount() > 0) { //System.out.println(getApexData().size() + " - " + turnedOffSites.size()); return getApexData().size() - turnedOffSites.size(); } } return 0; } COM: <s> returns the number of categories in the dataset </s>
funcom_train/24117531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseReleased(MouseEvent e) { if (mousePoint != null && mousePoint.equals(e.getPoint()) && e.getButton() == MouseEvent.BUTTON1) { int column = getTableHeader().columnAtPoint(e.getPoint()); sortColumn(column, (lastSortedColumn != getColumnModel().getColumn(column).getModelIndex())); } } COM: <s> sort the column where the mouse is released if the point where the </s>
funcom_train/36906697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String connect(String host, int port) throws UnknownHostException, IOException { //initiate connection to FTP server ftpSocket = new Socket(host, port); //initiate PrintStream to send info from client to FTP server serverSender = new PrintStream(ftpSocket.getOutputStream()); //initiate BufferedReader to receve info from FTP server serverReader = new BufferedReader(new InputStreamReader(ftpSocket.getInputStream())); return getResponseMessage().toString(); } COM: <s> connect establish connection between client and ftp server </s>
funcom_train/22782390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Image o1, Image o2) { if (o1 == null || o1.getDescription() == null) { if (o2 == null || o2.getDescription() == null) return 0; return -1; } if (o2 == null || o2.getDescription() == null) return 1; return o1.getDescription().compareTo(o2.getDescription()); } COM: <s> the compare method uses the compare to method of the string class to </s>
funcom_train/3598153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGreaterThan() { try { List results = engine.search(nom, "($w word):duration($w)>'0.301'"); results.remove(0); // remove list of vars Collections.sort(results, new SearchResultIDComparator()); assertTrue(results.size()==3); NOMElement r1 = (NOMElement)((List)results.get(0)).get(0); assertTrue(r1.getID().equals("w_2")); } catch (Throwable ex) { ex.printStackTrace(); fail("GreaterThan test failed!"); } } COM: <s> check is correct and the opposite of </s>
funcom_train/8305561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { if (hashCode == 0) { hashCode = 17; hashCode = 37 * hashCode + getClass().hashCode(); hashCode = 37 * hashCode + min.hashCode(); hashCode = 37 * hashCode + max.hashCode(); } return hashCode; } COM: <s> p gets a hash code for the range </s>
funcom_train/22949947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double calculateNetInput(){ double netInput = 0; Iterator<Synapse> iterator = this.incomingSynapses.iterator(); while (iterator.hasNext()){ Synapse synapse = iterator.next(); netInput += synapse.weight() * synapse.transmittedValue(); } return this.currentValues.netInput = netInput; } COM: <s> calculates weighted sum of inputs </s>
funcom_train/8775705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String assign(String text) { // Create begin tag StringBuffer tagBegin = new StringBuffer(); tagBegin.append("<" + name); for(HtmlAttribute attribute : attributes) { tagBegin.append(" " + attribute.toString()); } tagBegin.append(">"); // Create end tag StringBuffer tagEnd = new StringBuffer(); tagEnd.append("</" + name + ">"); return tagBegin.toString() + text + tagEnd.toString(); } COM: <s> assigns the html tag with attributes to the specified text </s>
funcom_train/31251143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String buildSelect(String attrib, String table, String where) { StringBuffer query = new StringBuffer("SELECT ") .append(attrib).append(" FROM ").append(table); if (where != null && where.length() > 0) { query.append(" WHERE ").append(where); } return query.toString(); } COM: <s> since this is used all over the place might as well </s>