__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/44297796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addXmlElement(XcXmlElement subElement) throws FatalException { if (pcdata != null) throw new FatalException(this, "This implementation cannot accept pcdata and sub-element"); if (subElement == null) throw new FatalException(this, "Cannot add a null sub-element"); lstSubXmlCode.add(subElement); } COM: <s> add a sub element into this element </s>
funcom_train/24640159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(LanguageFactoryObject o) { if (o instanceof Constant) return this.contains((Constant) o); if (o instanceof GeneralizedPredicate) return this.containsPredicate((GeneralizedPredicate) o); if (o instanceof Functor) return this.contains((Functor) o); if (o instanceof Sort) return this.contains((Sort) o); return false; } COM: <s> checks if the given object is contained in this language </s>
funcom_train/7980765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void progressStatisticsEvent(final EventObject e) { // Default is to do nothing. Subclass if you want to catch this event. // Later, if demand, add publisher/listener support. Currently hacked // in so the subclass in CrawlJob added to support JMX can send // notifications of progressStatistics change. } COM: <s> called whenever progress statistics logging event </s>
funcom_train/5597462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int search(String word){ int offset = searcher.search(word); if (offset != -1) { lastSearch = word; h = viewer.getHighlighter().getHighlights(); index = 0; offset = h[index].getStartOffset(); try { scrollRectToVisible(viewer.modelToView(offset)); } catch (BadLocationException e) {} return h.length; } return 0; } COM: <s> searches the document for the given word and </s>
funcom_train/32960908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(PublicKey aPublicKey) { if (x509EncodedKeySpec != null || algorithm != null) throw new IllegalStateException(INITIALIZED); X509EncodedKeySpec keySpec = new X509EncodedKeySpec(aPublicKey.getEncoded()); x509EncodedKeySpec = keySpec.getEncoded(); algorithm = aPublicKey.getAlgorithm(); } COM: <s> initialize tolven public key with a public key </s>
funcom_train/19542873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invokeNamedScript(String name, String function, Object[] params) { InvokableScript script = namedScripts.get(name); if (script == null) throw new IllegalArgumentException("There isn't a script named '" + name + "'"); return script.invoke(function, params); } COM: <s> invoke a function from one of the named scripts </s>
funcom_train/17779267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onPrivateMessage(String sender, String login, String hostname, String message) { logger.debug("Adding message to the pool."); Message m = new Message("IRC", sender, message); m.setMachine(hostname); pooledMessages.add(m); } COM: <s> on receipt of a private message pass on the information to ircmanager </s>
funcom_train/20029420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Font getFont() { if (font == null) {//GEN-END:|61-getter|0|61-preInit // write pre-init user code here font = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_LARGE);//GEN-LINE:|61-getter|1|61-postInit // write post-init user code here }//GEN-BEGIN:|61-getter|2| return font; } COM: <s> returns an initiliazed instance of font component </s>
funcom_train/50367726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove (Object item) { Messenger.debug("Removing an item from the list named \""+mListname+"\"."); if (mList == null) { return; } if (mList.contains(item)) { mList.removeElement(item); } else { Messenger.debug("item \""+item.toString()+"\" does not exist in the list "+mListname); } } COM: <s> removes an object from the list </s>
funcom_train/10637126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(IntBuffer otherBuffer) { int compareRemaining = (remaining() < otherBuffer.remaining()) ? remaining() : otherBuffer.remaining(); int thisPos = position; int otherPos = otherBuffer.position; int thisByte, otherByte; while (compareRemaining > 0) { thisByte = get(thisPos); otherByte = otherBuffer.get(otherPos); if (thisByte != otherByte) { return thisByte < otherByte ? -1 : 1; } thisPos++; otherPos++; compareRemaining--; } return remaining() - otherBuffer.remaining(); } COM: <s> compare the remaining code int code s of this buffer to another int </s>
funcom_train/50390574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public V call() throws Exception { try{ if(logger.isDebugEnabled())logger.debug("Start task at "+epr.getAddress().getStringValue()); runningTasks.incrementAndGet(); if(!isAccessible()){ String msg="Service "+epr.getAddress().getStringValue()+" is not accessible."; logger.debug(msg); throw new InaccessibleServiceException(msg); } return task.run(this); }finally{ runningTasks.decrementAndGet(); } } COM: <s> this default implementation of call will check </s>
funcom_train/2288354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVersionHistorySettings(boolean historyEnabled, int historyVersions, int historyVersionsAfterDeletion) { m_historyEnabled = historyEnabled; m_historyVersions = historyVersions; if (historyVersionsAfterDeletion < 0) { m_historyVersionsAfterDeletion = historyVersions; } else { m_historyVersionsAfterDeletion = historyVersionsAfterDeletion; } } COM: <s> vfs version history settings are set here </s>
funcom_train/4506741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMember(Agent agent) { if (!agents.contains(agent)) { boolean added = addAgentToDb(agent.getID(), Boolean.FALSE); if (added) { agents.add(agent); // Ask the new agent to notify the other agents of the queue of the new addition agent.sendAgentAddedToAllAgents(this); } } } COM: <s> adds an individual agent to the request queue </s>
funcom_train/8539776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawSubstring(final Graphics g, final String str, final int offset, final int len, final int x, final int y, final int anchor) { drawChars(g, str.toCharArray(), offset, len, x, y, anchor); } COM: <s> paints the substring as specified </s>
funcom_train/32759779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initEventActions(){ // We need this empty listener to fire actions ActionListener lsnEmpty = new ActionListener(){ public void actionPerformed(ActionEvent e){ } }; this.addActionListener( lsnEmpty ); this.addMouseListener( new MouseAction(this) ); this.addFocusListener( new FocusAction(this) ); this.getDocument().addDocumentListener( new EditAction() ); } COM: <s> creates and adds all the swing event responses </s>
funcom_train/50576432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String compoundPrefix( String tagname, char sep ){ if ( compoundField == null ){ return null; } StringBuffer buff = new StringBuffer(); Iterator it = compoundField.iterator(); while ( it.hasNext() ){ FieldDoc field = (FieldDoc)it.next(); Tag[] tags = field.tags( tagname ); String name = tags.length>0 ? tags[0].text() : fieldName(field); buff.append( name ); buff.append( sep ); } return buff.toString(); } COM: <s> return the prefix of the current compound field </s>
funcom_train/14463013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSmallBlockBytes(byte[] b) { Block[] bs = BlockFactory.getBlocksFromByteArray(b, Block.SMALL); if (myblocks != null) { myblocks.clear(); lastblock = null; } else { myblocks = new ArrayList(bs.length); } for (int d = 0; d < bs.length; d++) this.addBlock(bs[d]); } COM: <s> sets bytes on a smallblock storage </s>
funcom_train/7899618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws Exception { long[][] startMatrix = new long[weightMatrix.length][weightMatrix.length]; System.arraycopy(weightMatrix, 0, startMatrix, 0, weightMatrix.length); TSPState startState = new TSPState(startMatrix, null); TSPState left = startState.leftSplit(); leftMap.put(left.getLowerBound(), left); TSPState right = startState.rightSplit(); rightMap.put(right.getLowerBound(), right); run(); } COM: <s> initializes the solving routine </s>
funcom_train/19295993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel1() { if (jPanel1 == null) { jPanel1 = new JPanel(); jPanel1.setLayout(new BorderLayout()); jPanel1.add(getJPanel(), java.awt.BorderLayout.NORTH); jPanel1.add(getJPanel2(), java.awt.BorderLayout.CENTER); } return jPanel1; } COM: <s> this method initializes j panel1 </s>
funcom_train/20043957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean check_getIsVisible() { XSimpleText oText = (XSimpleText) UnoRuntime.queryInterface(XSimpleText.class, anno); oText.setString("XSheetAnnotation"); anno.setIsVisible(true); boolean bVis = anno.getIsVisible(); return bVis; } COM: <s> sets the string of annotation then makes it visible and </s>
funcom_train/40099520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel4() { if (jPanel4 == null) { FlowLayout flowLayout = new FlowLayout(); flowLayout.setHgap(5); jPanel4 = new JPanel(); jPanel4.setLayout(flowLayout); jPanel4.add(getDagBox(), null); jPanel4.add(getMaandBox(), null); jPanel4.add(getJaarBox(), null); } return jPanel4; } COM: <s> this method initializes j panel4 </s>
funcom_train/2480657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { //esb_component = new ESBComponent(); //esb_component.connect2JMS(); running = true; Enumeration en_sensors = sensors.elements(); Sensor sensor; while (en_sensors.hasMoreElements()) { sensor = (Sensor) en_sensors.nextElement(); sensor.onStart(); } } COM: <s> this method initialize the frame and all the sensors inserted into it </s>
funcom_train/40451992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdEliminarProducto() { if (cmdEliminarProducto == null) {//GEN-END:|137-getter|0|137-preInit // write pre-init user code here cmdEliminarProducto = new Command("Eliminar producto", Command.OK, 0);//GEN-LINE:|137-getter|1|137-postInit // write post-init user code here }//GEN-BEGIN:|137-getter|2| return cmdEliminarProducto; } COM: <s> returns an initiliazed instance of cmd eliminar producto component </s>
funcom_train/2369395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Dimension addOwnSize(final Dimension origin) { origin.width *= this.zoomFactor; origin.height *= this.zoomFactor; origin.width += SelfPaintingCardComponent.SEL_BORDER_WIDTH * this.zoomFactor; origin.height += SelfPaintingCardComponent.SEL_BORDER_HEIGHT * this.zoomFactor; return origin; } COM: <s> convenience method which alters the given dimension object by scaling to </s>
funcom_train/42076656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean bit(String key, boolean exist) { Object value = super.get(key); if (value == null) { return false; } else if (value instanceof Boolean) { return ((Boolean) value).booleanValue(); } else if (value instanceof String) { if(exist) return true; String s = (String) value; if(s.equalsIgnoreCase("true") || s.equalsIgnoreCase("on") || s.equalsIgnoreCase("yes")) return true; return false; } throw new ClassCastException(); } COM: <s> returns the boolean value with a twist though </s>
funcom_train/3362266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArray (int parameterIndex, Array array) throws SQLException { checkParamIndex(parameterIndex); if (params == null){ throw new SQLException("Set initParams() before setArray"); } params.put(new Integer(parameterIndex - 1), new SerialArray(array)); } COM: <s> sets the designated parameter to an code array code object in the </s>
funcom_train/32876081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getPKCS11ParamsObject() { CK_SKIPJACK_PRIVATE_WRAP_PARAMS params = new CK_SKIPJACK_PRIVATE_WRAP_PARAMS(); params.pPassword = password_; params.pPublicData = publicData_; params.pRandomA = randomA_; params.pPrimeP = primeP_; params.pBaseG = baseG_; params.pSubprimeQ = subprimeQ_; return params ; } COM: <s> get this parameters object as an object of the </s>
funcom_train/27780234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { docs.close(); terms.close(); if (rf != null) { rf.close(); rf = null; } try { if (writer != null) { writer.close(); writer = null; } } catch (java.io.IOException x) { logger.log(Level.WARNING, "close", x); } } COM: <s> close this stream and mark resources for garbage collection </s>
funcom_train/18393211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isSelected(String name, LinkedRemoteFileInterface file) { if (_selectors != null) { for (int i = 0; i < _selectors.length; i++) { if (!_selectors[i].isSelected(_basedir, name, file)) { return false; } } } return true; } COM: <s> tests whether a name should be selected </s>
funcom_train/18644030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected EndpointReference initializeEndpoint(org.w3c.dom.Element mesg) { EndpointReference ret=null; org.w3c.dom.Node endpointNode=XMLUtils.getChild(mesg, null, AbstractServiceTracker.ENDPOINT_NODE); if (endpointNode != null && endpointNode.getFirstChild() != null) { try { String text=XMLUtils.getText(endpointNode.getFirstChild()); ret = new DefaultEndpointReference(text); } catch(Exception e) { logger.severe("Failed to extract endpoint reference: "+e); } } return(ret); } COM: <s> this method initializes the endpoint references associated </s>
funcom_train/1540034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putWait(K key, V value) { put(key, value); // = send try { synchronized (theList) { while (!value.equals(theList.get(key))) { //System.out.print("#"); theList.wait(100); } } } catch (InterruptedException e) { Thread.currentThread().interrupt(); e.printStackTrace(); } } COM: <s> put object to the distributed hash table </s>
funcom_train/46630981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void alg_Move_Pist_Left(){ internal_rate.value = 10; Out_Pist_X.value = Temp_X.value - internal_rate.value ; Out_Pist_Y.value = Temp_Y.value ; Pist_X_C.value = Out_Pist_X.value; Pist_Y_C.value = Out_Pist_Y.value; Temp_X.value = Out_Pist_X.value; Temp_Y.value = Out_Pist_Y.value; } COM: <s> algorithm move pist left in java </s>
funcom_train/37637648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackground(int row, int column, Color color){ bgColor.setElementAt(row, column, color); AttributeModelEvent e = new AttributeModelEvent(this, AttributeModelEvent.CELLS_UPDATED, row, column, 1, 1); fireDataChanged(e); } COM: <s> set the background color of cell row column </s>
funcom_train/15607213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PickedList pick(GraphicContext gc, Rectangle rect) { Rectangle2D.Double bounds = gc.tempRectangle(); bounds.setRect(x(), y(), width() + gc.pixelWidth(), height() + gc.pixelHeight()); return gc.hit(rect, bounds, false) ? super.pick(gc, rect) : null; } COM: <s> forward pick to its children but only if the bounds </s>
funcom_train/12183128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getColumnTextRule(BeanProxy rule, int i) { String stringValue = ""; if (i == COLUMN_PROPERTY) { ListProxy proxy = (ListProxy) rule.getPropertyProxy(Rule.SELECTORS); List list = (List) proxy.getModelObject(); stringValue = selectorToString(list); } return stringValue; } COM: <s> returns the text for a column for a given rule </s>
funcom_train/45934007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyPermissions(final String _perms) { if (_perms.length() == 0) { // TBD: do not remove values, but replace them with a 'Forbidden' value? if (this.values != null) this.values.clear(); /* remove snapshot, we are read-only */ this.snapshot = null; } } COM: <s> subclasses should override this method to remove protected values from the </s>
funcom_train/31672588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static EntUseAdapter trigger_enable = new EntUseAdapter() { public String getID(){ return "trigger_enable"; } public void use(edict_t self, edict_t other, edict_t activator) { self.solid = Defines.SOLID_TRIGGER; self.use = Use_Multi; GameBase.gi.linkentity(self); } }; COM: <s> quaked trigger multiple </s>
funcom_train/43451079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FeedSource getFeedSource() throws FeedException { FeedSource result = null; try { final String impl = FeedConfig.singleton().getSourceImpl(); log.trace("FeedSource: " + impl); result = (FeedSource) Class.forName(impl).newInstance(); } catch (Exception e) { throw new FeedException(e); } return result; } COM: <s> returns instance of a feed source </s>
funcom_train/8496172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean create(TaxonConcept tc) throws Exception { if (tc == null) { throw new IllegalArgumentException( "Supplied TaxonConcept was null."); } if (tc.getGuid() == null) { throw new IllegalArgumentException( "Supplied TaxonConcept has a null Guid value."); } return storeHelper.putSingle(TC_TABLE, TC_COL_FAMILY, ColumnType.TAXONCONCEPT_COL.getColumnName(), tc.getGuid(), tc); } COM: <s> fixme switch to using a single column for taxon concept </s>
funcom_train/26329200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector add_data(Vector result,Vector added_data) { Vector temp_result = null; Vector local_temp_row = null; if (result == null) temp_result = new Vector(); else temp_result = result; if (added_data==null) return temp_result; if (added_data.size() >0) { for (int i=0;i<added_data.size();i++) { local_temp_row = (Vector) added_data.elementAt(i); temp_result.addElement(local_temp_row); } } return temp_result; } COM: <s> allows two query resultsets from immediate mode queries to be merged </s>
funcom_train/17914927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IdentUnit getIdentUnit(String id) { for (int i = 0; i < size(); i++) { IdentUnit unit = (IdentUnit) elementAt(i); String unitId = unit.getId(); if (unitId != null && unitId.equals(id)) { return unit; } } return null; } COM: <s> get the identification unit form this set list </s>
funcom_train/3885102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLangPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StringType_lang_feature"), getString("_UI_PropertyDescriptor_description", "_UI_StringType_lang_feature", "_UI_StringType_type"), ImsmdRootv1p2p1Package.Literals.STRING_TYPE__LANG, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the lang feature </s>
funcom_train/647503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyMutation(int index, double a_percentage) { double range = (m_upperBounds - m_lowerBounds) * a_percentage; if (getAllele() == null) { setAllele(new Integer( (int) range + m_lowerBounds)); } else { int newValue = (int) Math.round(intValue() + range); setAllele(new Integer(newValue)); } } COM: <s> see interface gene for description </s>
funcom_train/20519007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createFieldEditors() { addField( new StringFieldEditor(PreferenceConstants.P_USERNAME, "Username:", getFieldEditorParent())); StringFieldEditor editor = new StringFieldEditor(PreferenceConstants.P_PASSWORD, "Password:", getFieldEditorParent()); editor.getTextControl(getFieldEditorParent()).setEchoChar('*'); addField(editor); } COM: <s> creates the field editors </s>
funcom_train/651889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void valueChanged(final boolean checked, boolean store) { setChecked(checked); BusyIndicator.showWhile(getTreeViewer().getControl().getDisplay(), new Runnable() { public void run() { getTreeViewer().setSorter(checked ? sorter : null); } }); if (store) { CssUI plugin = CssUI.getDefault(); plugin.getPreferenceStore().setValue( CssUIPreferences.OUTLINE_SORT_LEXICALLY, checked); } } COM: <s> updates the sorting of the outline </s>
funcom_train/41435673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initSlee() throws InvalidStateException { if (sleeState != null) { throw new InvalidStateException("slee in "+sleeState+" state"); } // slee init beforeModulesInitialization(); for (Iterator<SleeContainerModule> i = modules.iterator(); i .hasNext();) { i.next().sleeInitialization(); } afterModulesInitialization(); sleeState = SleeState.STOPPED; } COM: <s> initiates the slee container </s>
funcom_train/19407936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SetValue difference(SetValue v) { if (!v.elemType().isSubtypeOf(elemType())) throw new IllegalArgumentException("type mismatch"); if (v.isEmpty()) return this; SetValue res = new SetValue(elemType()); // add elements of this set to result Iterator it = fElements.iterator(); while (it.hasNext()) { Value elem = (Value) it.next(); if (!v.includes(elem)) res.fElements.add(elem); } return res; } COM: <s> return a new set which is the difference of this and v </s>
funcom_train/18036499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IntArrayList getAnnotationSpanningAtOffset(int offset) { checkOffset(offset); IntArrayList spanning_annotations = new IntArrayList(); for (int i = 0; i < annotations.size(); i++) { if (startAnchorsByAnnotationIndex.getQuick(i) < offset && endAnchorsByAnnotationIndex.getQuick(i) > offset) { spanning_annotations.add(i); } } return spanning_annotations; } COM: <s> get all the annotations spanning at a given offset </s>
funcom_train/25372733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() throws IOException { m_structure = null; setRetrieval(NONE); if (m_File != null && !(new File(m_File).isDirectory())) { setFile(new File(m_File)); } else if (m_URL != null && !m_URL.equals("http://")) { setURL(m_URL); } } COM: <s> resets the loader ready to read a new data set or the </s>
funcom_train/11007289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMissingCoreRecords() throws Exception { ppe = new PowerPointExtractor(slTests.openResourceAsStream("missing_core_records.ppt")); String text = ppe.getText(true, false); String nText = ppe.getNotes(); assertNotNull(text); assertNotNull(nText); // Notes record were corrupt, so don't expect any assertEquals(nText.length(), 0); // Slide records were fine assertTrue(text.startsWith("Using Disease Surveillance and Response")); } COM: <s> test that when presented with a ppt file missing the odd </s>
funcom_train/46994828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOctaveArgsRemove() { if (octaveArgsRemove == null) { octaveArgsRemove = new JButton(); octaveArgsRemove.setEnabled(false); octaveArgsRemove.setText("Remove"); octaveArgsRemove.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ((javax.swing.DefaultListModel)octaveArgs.getModel()).remove(octaveArgs.getSelectedIndex()); updateButtonState(); } }); } return octaveArgsRemove; } COM: <s> this method initializes octave args remove </s>
funcom_train/31742495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndAngle(int newEndAngle) { int oldEndAngle = endAngle; endAngle = newEndAngle; generalShape = createEllipse(); generalShape.transform(getAffineTransform()); // primSetGeneralShape(createEllipse()); // getGeneralShape().transform(getAffineTransform()); clearBounds(); firePropertyChange(PROP_END_ANGLE, oldEndAngle, endAngle); } COM: <s> sets the end angle of the ellipse draw component in degrees </s>
funcom_train/25982322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putAll(Map<? extends String, ? extends Object> toMerge) { for (Map.Entry<? extends String, ? extends Object> entry : toMerge.entrySet()) { String key = entry.getKey(); checkKey(key); put(key, entry.getValue()); } } COM: <s> code put all code is implemented using code map </s>
funcom_train/20351141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processOtherEvent(SimEvent ev){ if (ev == null){ Log.printLine(getName() + ".processOtherEvent(): " + "Error - an event is null."); return; } Log.printLine(getName() + ".processOtherEvent(): " + "Error - event unknown by this DatacenterBroker."); } COM: <s> overrides this method when making a new and different type of broker </s>
funcom_train/31036218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ensureCapacity(int minCapacity) { int oldCapacity = elementData.length; if (minCapacity > oldCapacity) { Object[] oldData = elementData; int newCapacity = (oldCapacity * 3)/2 + 1; if (newCapacity < minCapacity) newCapacity = minCapacity; elementData = new Object[newCapacity]; System.arraycopy(oldData, 0, elementData, 0, size); } } COM: <s> increases the capacity of this tt array list tt instance if </s>
funcom_train/27747013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTopRight(Control c) { checkWidget(); if (c != null && c.getParent() != this) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } if (this.topRight != null && !this.topRight.isDisposed()) { this.topRight.setBounds(OFFSCREEN, OFFSCREEN, 0, 0); } this.topRight = c; layout(); } COM: <s> set the control that appears in the top right corner of the pane </s>
funcom_train/22233274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBaseLevel(int baseLevel) { if (isLiveOrCompiled()) { if (!this.getCapability(ALLOW_LOD_RANGE_WRITE)) { throw new CapabilityNotSetException( J3dI18N.getString("Texture32")); } } if (isLive()) { ((TextureRetained)this.retained).setBaseLevel(baseLevel); } else { ((TextureRetained)this.retained).initBaseLevel(baseLevel); } } COM: <s> specifies the base level for this texture object </s>
funcom_train/3812264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActivationMode(int mode) throws IllegalArgumentException { if ((mode != GLOBAL) && (mode != RECOGNIZER_MODAL) && (mode != RECOGNIZER_FOCUS)) { throw new IllegalArgumentException("Invalid ActivationMode"); } else if (mode != activationMode) { //sjagrammarChanged=true; activationMode = mode; } } COM: <s> set the activation mode of this grammar </s>
funcom_train/11653920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String groupDisplayName(String group) { try { ResourceBundle b = (ResourceBundle) beanInfo.getBeanDescriptor().getValue(RESOURCE_BUNDLE); if (b == null) { return group; } return b.getString(group + ".displayName"); } catch (MissingResourceException e) { return group; } } COM: <s> obtain a groups display name </s>
funcom_train/13754328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Range getOverallRange() { // hack to get the ending cp of the document, Have to revisit this. PropertyNode p = _tpt.getTextPieces().get(_tpt.getTextPieces().size() - 1); return new Range(0, p.getEnd(), this); } COM: <s> returns the range that covers all text in the </s>
funcom_train/18661100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String tryToGetTag( Directory directory, int tag, String defaultValue ) { String searchString; try { searchString = directory.getDescription( tag ); } catch ( MetadataException x ) { searchString = null; } if ( searchString == null ) { searchString = defaultValue; } return searchString; } COM: <s> this method tries to get a tag out of the exif data </s>
funcom_train/1437433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTickLabelFontFamily(String cssFontFamily) { chartDecorationsChanged = true; Curve c = getSystemCurve(ticksId); int nPoints = c.getNPoints(); for (int i = 0; i < nPoints; i++) c.getPoint(i).setAnnotationFontFamily(cssFontFamily); tickLabelFontFamily = cssFontFamily; } COM: <s> specifies the css font family of this </s>
funcom_train/45484177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonMoveDown() { if (jButtonMoveDown == null) { jButtonMoveDown = new JButton(); jButtonMoveDown.setBounds(new Rectangle(494, 137, 86, 26)); jButtonMoveDown.setText("Down"); jButtonMoveDown.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { } }); } return jButtonMoveDown; } COM: <s> this method initializes j button move down </s>
funcom_train/37571836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFileAttachment(String path, String id) throws SOAPException, MalformedURLException { File file = new File(path); if (!file.exists()) throw new NullPointerException("The path supplied to 'addFileAttachment()' did not locate a valid local file."); URL url = file.toURL(); addAttachment(new DataHandler(url), null, id); } COM: <s> add a soap attachment containing the the contents of a local file path </s>
funcom_train/17868785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStyle (int style) { switch (style) { case DOT: style_ = "Dot"; break; case DASH_DOT: style_ = "DashDot"; break; case DASH: style_ = "Dash"; break; case SOLID: // Fall through default: style_ = "Solid"; break; } }; COM: <s> set the style of the line that represents the serie </s>
funcom_train/8643112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Writer getWriter(String path, String encoding) throws Exception { Writer writer; if (encoding == null || encoding.length() == 0 || encoding.equals("8859-1") || encoding.equals("8859_1")) { writer = new FileWriter(path); } else { writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path), encoding)); } return writer; } COM: <s> returns a writer based on encoding and path </s>
funcom_train/24531525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ClassLoader getClassLoader(ClassLoader cl) throws TemplatesException { if (fClassLoader != null) return fClassLoader ; URL[] destUrl = null; try { destUrl = new URL[] { fDestinationPath.toFile().toURL() }; } catch (MalformedURLException e) { throw new TemplatesException(e); } fClassLoader = java.net.URLClassLoader.newInstance(destUrl, cl); return fClassLoader ; } COM: <s> create a new class loader that includes our destination path </s>
funcom_train/37835798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateLevel() { final int next = Level.getXP(level + 1) - xp; // Show "em-dash" for max level players rather than // a confusing negative required xp. final String nextS = (next < 0) ? "\u2014" : Integer.toString(next); final String text = "Level: " + level + " (" + nextS + ")"; SwingUtilities.invokeLater(new Runnable() { public void run() { panel.setLevel(text); } }); } COM: <s> called when xp or level has changed </s>
funcom_train/16915930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void terminate() { if (getServer().getServerState() == IServer.STATE_STOPPED) return; try { setServerState(IServer.STATE_STOPPING); if (Trace.isTraceEnabled()) Trace.trace(Trace.FINER, "Killing the Tomcat process"); ILaunch launch = getServer().getLaunch(); if (launch != null) { launch.terminate(); stopImpl(); } } catch (Exception e) { Trace.trace(Trace.SEVERE, "Error killing the process", e); } } COM: <s> terminates the server </s>
funcom_train/35668949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void timeToSpeech(int hour, int min) { if (hour < 0 || hour > 23) { throw new IllegalArgumentException("Bad time format: hour"); } if (min < 0 || min > 59) { throw new IllegalArgumentException("Bad time format: min"); } String theTime = TimeUtils.timeToString(hour, min); synthesizer.speakPlainText(theTime, null); } COM: <s> speaks the time given the hour and minute </s>
funcom_train/42135020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getClockRate() { String packetType = getPacketTypes(); if (packetType == null) { packetType = DEFAULT_PACKET_TYPE; } // String clockRate = (String) Server.getClockRates().get( // Integer.valueOf(packetType)); // if (clockRate != null) { // return Integer.parseInt(clockRate); // } return 0; } COM: <s> returns the clock rate of the stream </s>
funcom_train/26131806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPreconditions() { assertTrue("center button should be right of left button", mLeftButton.getRight() < mCenterButton.getLeft()); assertTrue("right button should be right of center button", mCenterButton.getRight() < mRightButton.getLeft()); assertTrue("left button should be focused", mLeftButton.isFocused()); } COM: <s> the name test preconditions is a convention to signal that if this </s>
funcom_train/326800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TargetMotionModel findModelByName(String modelName, boolean shortLength) { if (modelName == null || modelName.length() == 0) { return null; } String name; for (int i = 0; i < models.size(); i++) { name = models.get(i).getName(); if (name.equals(modelName)) { return models.get(i); } if (shortLength) { if (name.startsWith(modelName)) { return models.get(i); } } } return null; } COM: <s> find a model by its name </s>
funcom_train/50925476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Real2Range getBoundingBox() { // double fontWidthFactor = DEFAULT_FONT_WIDTH_FACTOR; double fontWidthFactor = 1.0; double halfWidth = getEstimatedHorizontalLength(fontWidthFactor) / 2.0; double height = this.getFontSize(); Real2Range boundingBox = new Real2Range(); Real2 center = getXY(); boundingBox.add(center.plus(new Real2(halfWidth, 0.0))); boundingBox.add(center.plus(new Real2(-halfWidth, height))); return boundingBox; } COM: <s> extent of text </s>
funcom_train/51299740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int lookupForParent(int objId) throws NoParentException { String sql = "SELECT " + parentColumnName + " FROM " + table + " WHERE " + childColumnName + " = " + objId; ResultSet res = null; try { res = DBAccessor.getInstance().makeSelect(sql); if (res.next()) return res.getInt(parentColumnName); throw new NoParentException(); } catch (SQLException e) { e.printStackTrace(); throw new NoParentException(); } } COM: <s> search for property parent </s>
funcom_train/3032023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean waitPut() { udebug.dprintln("waitPut: element=" + element); boolean first = true; while ((element != null) && (! done)) { if (first) udebug.dprintln("WARNING: still working on: " + element); first = false; tcWait(); } udebug.dprintln("element=" + element + ", done=" + done); return done; } COM: <s> wait until it is ready for a put returning done </s>
funcom_train/24134181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void log(String line) { if (_verbose) { String time = new java.util.Date().toString(); //RappeScriptBotTool.textAreaMsgLog.append(time + " " + line + RappeScriptBotTool.NEW_LINE); System.out.println(time + " " + line); } } COM: <s> adds a line to the log </s>
funcom_train/14306818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getProjects() { ArrayList lst = new ArrayList(); for (Iterator it = projects.values().iterator(); it.hasNext(); ) { lst.add(((Entry)it.next()).project); } return lst.iterator(); } //}}} //{{{ +isLoaded(String) : boolean COM: <s> returns an iterator that points to the ordered list of project names </s>
funcom_train/17009347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getExchangeType(byte[] exchangeBytes) { /* * if (exchangeBytes == null) { String errorReport = * "Specified byte[] for reconstruction is NULL"; * throwMarshallingException(errorReport); } */ /* the first 4 bytes are reserved for the length of the base class */ int exchangeType = marshallingUtil.getInt(exchangeBytes, 4); return exchangeType; } COM: <s> retrieves the exchange type information from a stream of bytes </s>
funcom_train/9409450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTimedPollDelayed() { DelayQueue q = new DelayQueue(); q.add(new NanoDelay(LONG_DELAY_MS * 1000000L)); try { assertNull(q.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS)); } catch (Exception ex) { unexpectedException(); } } COM: <s> timed poll of a non empty queue returns null if no expired elements </s>
funcom_train/49659649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void registerUsers() throws Exception { String testPost = "TestRegisterUser@" + sensorbase.getServerProperties().get(TEST_DOMAIN_KEY); for (int i = 0; i < 10; i++) { SensorBaseClient.registerUser(getSensorBaseHostName(), testPost); } } COM: <s> tests multiple register users </s>
funcom_train/25335694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentMunicipalityPane() { if (jContentMunicipalityPane == null) { jContentMunicipalityPane = new JPanel(); jContentMunicipalityPane.setLayout(new GridBagLayout()); GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.fill = GridBagConstraints.BOTH; gridBagConstraints.insets = new Insets(10,10,10,10); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; jContentMunicipalityPane.add( getjComuniPane(), gridBagConstraints); } return jContentMunicipalityPane; } COM: <s> this method initializes j content search pane </s>
funcom_train/4751997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void toMathML(final String inputExpression, final Writer out) { IExpr parsedExpression = null; ASTNode node; if (inputExpression != null) { try { node = fParser.parse(inputExpression); parsedExpression = AST2Expr.CONST.convert(node); } catch (final Throwable e) { return; // parsedExpression == null ==> fError occured } } toMathML(parsedExpression, out); } COM: <s> converts the input expression string into a math ml expression and writes the </s>
funcom_train/10368238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GerPatternType findPattern() { XmlObject[] patterns = getXmlObject().selectChildren(new QName(GerPatternType.type.getName().getNamespaceURI(), "pattern")); if(patterns.length == 0) { return null; } return (GerPatternType)patterns[0]; } COM: <s> gets the pattern child of this element or null if there is none </s>
funcom_train/6225988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openSpan(String description, PrintWriter out) throws IOException { if (translateStyles.containsKey(description)){ description = (String)translateStyles.get(description); } if (!ignoreStyles.contains(description)){ out.print("<span class=" + description + ">"); } } COM: <s> open a span if needed for the given style </s>
funcom_train/28024644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDocument(JEditSyntaxDocument _document) { if (this.document == _document) return; if (this.document != null) this.document.removeDocumentListener(documentHandler); this.document = _document; _document.addDocumentListener(documentHandler); select(0, 0); updateScrollBars(); painter.repaint(); } COM: <s> sets the document this text area is editing </s>
funcom_train/17162847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Screen genEntryScr() { if(entryScr == null) { entryScr = new Form("Übersetzung"); entryScr.addCommand(exitC); entryScr.addCommand(backC); entryScr.setCommandListener(controller); // getData = new TextField("Gib ein Wort ein", null, 30, TextField.PLAIN); } // getData.delete(0, getData.size()); return entryScr; } COM: <s> display textfield showing the translation for the vocab selected by the user </s>
funcom_train/27722939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isScenarioInstanceAlreadyDetected(Element doElement) { HashMap scenarioInstances = (HashMap) (scenarioInstanceMaps.get(currentScenarioElement)); return scenarioInstances.containsKey(getOwnerInstanceID(doElement)) || scenarioInstanceIDs.containsKey(getOwnerInstanceName(doElement)) || scenarioInstanceIDs.containsValue(getOwnerInstanceID(doElement)); } COM: <s> returns true if the the instance corresponding to the do element </s>
funcom_train/374198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int transferStateAndDataTo(PcapPacket packet) { JBuffer buffer = packet.getMemoryBuffer(this.getTotalSize()); int o = header.transferTo(buffer, 0); packet.header.peerTo(buffer, 0); packet.state.peerTo(buffer, o, state.size()); o += state.transferTo(packet.state); packet.peer(buffer, o, size()); o += this.transferTo(buffer, 0, size(), o); return o; } COM: <s> deep copy of the this packet to the supplied packet </s>
funcom_train/46859515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMnuitmLayerSelectVehicleTypes() { if (mnuitmLayerSelectVehicleTypes == null) { mnuitmLayerSelectVehicleTypes = new JMenuItem(); mnuitmLayerSelectVehicleTypes.setText("Select vehicle types..."); mnuitmLayerSelectVehicleTypes.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { SelectRandomTrafficLayerVehicleTypes(); } }); } return mnuitmLayerSelectVehicleTypes; } COM: <s> this method initializes mnuitm layer select vehicle types </s>
funcom_train/15885335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { ProtocolLayer layer = (new TcpSessionStarter(null, new IpSessionId( "localhost", 9999))).connect().getProtocolLayer(); try_connect_and_disconnect_ok(layer); layer.doClose(); } catch (ProtocolException e) { fail(e.getMessage()); } catch (UnknownHostException ue) { fail(ue.getMessage()); } } COM: <s> the main execution method calls try connect and disconnect </s>
funcom_train/4462126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() { boolean inGuiMode = true; // Are we in 'command line' mode or 'GUI' mode? // For now, there's only GUI mode if(inGuiMode) { // warn the user about unknown options // are there any files specified? if(files.size() == 0) new SpeciesIdentifier(); else { Iterator i = files.iterator(); while(i.hasNext()) { SpeciesIdentifier td = new SpeciesIdentifier(); td.loadFile((File)i.next(), null); } } } } COM: <s> uses the information gathered from parsing the </s>
funcom_train/45751959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean existsNote(int noteId) throws SQLException { Cursor cursor = mDatabase.query(TABLE_NOTES, new String[] { KEY_NOTE_ID }, KEY_NOTE_ID + "=" + noteId, null, null, null, null); boolean exists = cursor.moveToNext(); cursor.close(); return exists; } COM: <s> returns whether a note with a given id exists </s>
funcom_train/3784236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Test suite() { TestSuite suite = new TestSuite(); // FIXME: Pull in the class names using a PropertyFile or ResourceBundle. // By doing this, we don't have to re-compile every time we add a new test. suite.addTestSuite(CalendarUtilsTest.class); suite.addTestSuite(EventCalendarTest.class); return suite; } COM: <s> creates a junit test suite for jackalope </s>
funcom_train/25132866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSearchString() { if (!searchType.isSelected()) { if (!(regexCheck.isSelected())) { if (tf.getText().length() == 0) { return "*"; } else { return tf.getText(); } } else { return tf.getText(); } } else { return tf.getText(); } } COM: <s> return the search string </s>
funcom_train/40655438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public File getWellKnownDirPath(WellKnownDir type) { if (userDirsProps == null) { initUserDirsProps(); } String pathname = userDirsProps.getProperty("XDG_" + type + "_DIR"); String property = expandEnv(pathname != null ? pathname : type.getDefaultPath()); File path = new File(property); return path.exists() ? path : null; } COM: <s> retrieve the path of well known user directories like the desktop </s>
funcom_train/39049932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeNodeIdFromChannel(final long nodeId) { try { channelService.runTransactionalTask( new AbstractKernelRunnable("removeNodeIdFromChannel") { public void run() { ChannelImpl channel = getChannel(); if (channel != null) { channel.removeServerNodeId(nodeId); } } }); } catch (Exception e) { // Transaction scheduler will print out warning. } } COM: <s> removes the specified </s>
funcom_train/40927510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand() { if (cancelCommand == null) {//GEN-END:|184-getter|0|184-preInit // write pre-init user code here cancelCommand = new Command("Rechazar", Command.CANCEL, 0);//GEN-LINE:|184-getter|1|184-postInit // write post-init user code here }//GEN-BEGIN:|184-getter|2| return cancelCommand; } COM: <s> returns an initiliazed instance of cancel command component </s>
funcom_train/5244571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRuleMemoizationCacheSize() { int n = 0; for (int i = 0; state.ruleMemo!=null && i < state.ruleMemo.length; i++) { Map ruleMap = state.ruleMemo[i]; if ( ruleMap!=null ) { n += ruleMap.size(); // how many input indexes are recorded? } } return n; } COM: <s> return how many rule input index pairs there are in total </s>
funcom_train/13958083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { WOApplication app = WOApplication.application(); setResult(null); _done = false; log.debug("creating computation thread"); // called to start new thread try { setResult(performAction()); } catch (Exception localException) { setException(localException); log.error("long response thread raised : "+localException.getMessage(), localException); } finally { ERXEC.unlockAllContextsForCurrentThread(); _thread = null; } log.debug("exiting computation thread"); _done = true; } COM: <s> implementation of the </s>