__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/45864044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDefaultConfirmScreen(int lableIdx, int textIdx, boolean hasTick, boolean hasBack, boolean flashOkay) { createDefaultScreen(strings.get(lableIdx), true, hasTick, hasBack); textView.add(strings.get(textIdx)); textView.setPosition(halfW, viewHQ1, Graphics.BASELINE | Graphics.HCENTER); textView.reset(); container.add(textView); if (flashOkay) { container.add(charOkay); } } COM: <s> creates a default confirmation screen </s>
funcom_train/38311910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isEmptyContent() { StringBuffer cnt = content; if (cnt == null) { return true; } int len = cnt.length(); for (int i = 0; i < len; i++) { char c = cnt.charAt(i); if (!Character.isWhitespace(c)) { return false; } } return true; } COM: <s> checks if the content contains no or no real data </s>
funcom_train/38350835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Genotype getRandomGenotype() { BitSet bs = new BitSet(dimension); RandomElement re = schedule.getRandomElement(); if (re == null) throw new NullPointerException("no random element"); for (int i = 0; i < dimension; i++) { if (re.choose(2)==1) bs.set(i); } return new BitStringGenotype(bs, dimension); } COM: <s> returns a random generated genotype of size dimension </s>
funcom_train/3464530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void customize() { showFinishButton(false); if(0 == countFrames()) { showPreviousButton(false); } setTitle("Select Style: Choose Colors"); centerPanel.setLayout(new BorderLayout()); JLabel image = new JLabel(new ImageIcon(getClass().getResource("Style.gif"))); centerPanel.add(image, BorderLayout.WEST); selection = new SelectionPanel(); readIniFile(); selection.init(); centerPanel.add(selection, BorderLayout.CENTER); } COM: <s> set up the layout </s>
funcom_train/38524579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void done() throws java.io.FileNotFoundException,IOException { String name = null; if (deletion!=null) { for (Iterator it=deletion.iterator();it.hasNext();) { DepClass dclass = (DepClass)it.next(); if (dclass!=null) { dclass.delete(); } } } // end of if () if (cacheFile != null) { cache(); } // end of if () } COM: <s> we are done with this object </s>
funcom_train/11758236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ StringBuffer st = new StringBuffer(name); if (args.length>0){ st.append("("+args[0]); for (int i=1; i<args.length; i++){ st.append(","); st.append(args[i]); } st.append(")"); } return st.toString(); } COM: <s> get a representation of the memo as label arg0 arg1 </s>
funcom_train/33280685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void focus() { final HtmlPage page = (HtmlPage) getPage(); page.setFocusedElement(this); final WebClient webClient = page.getWebClient(); if (webClient.getBrowserVersion().hasFeature(BrowserVersionFeatures.WINDOW_ACTIVE_ELEMENT_FOCUSED)) { final HTMLElement jsElt = (HTMLElement) getScriptObject(); jsElt.jsxFunction_setActive(); } } COM: <s> sets the focus on this element </s>
funcom_train/26514917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MailBox waitForSetUp() { MailBox mbox = context.MailBox(); while ( mbox == null ) { try { sleep(300); // sleep until mbox is built mbox = context.MailBox(); } catch(InterruptedException e) { e.printStackTrace(); } } return mbox; } COM: <s> refactored to help readability this method loops until it gets </s>
funcom_train/3516825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnectRemoteParticipant(String rpName) throws IOException { String projectName = getLogicDSS().getProjectName(); ServicesManager.getInstance(projectName).destroyLocalRPJavaSpace(rpName); File rpsDir = Resources.getRemoteParticipantsDir(projectName); File rpDir = new File(rpsDir, rpName); IOUtil.delete(rpDir); } COM: <s> disconnects a remote participant </s>
funcom_train/9873858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector getVRamaHybTreatCy5( Vector ramaHybs ) { Vector vReturn = new Vector(); for( int h = 0; h < ramaHybs.size(); h ++ ) { RHyb hyb = ( RHyb ) ramaHybs.elementAt( h ); if( hyb.controlCy3() ) { vReturn.add( hyb ); } } return vReturn; }// COM: <s> creates a vector of rama hybs where control cy3 treated cy5 </s>
funcom_train/40418759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { for (Entry<Searcher,IndexAccessor> iae : this.multiSearcherAccessors.entrySet()) { IndexAccessor ia = iae.getValue(); if(ia.isOpen()) ia.close(); } for (Entry<IndexReader,IndexAccessor> iae : this.multiReaderAccessors.entrySet()) { IndexAccessor ia = iae.getValue(); if(ia.isOpen()) ia.close(); } } COM: <s> closes all index accessors contained in the multi accessor </s>
funcom_train/25685250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { Map<String, ClassDefinition> classDefinitions = this.loadClassDefinitions(getMode(), modelsDirectory); this.loadTemplateFiles(); for (TemplateGenerator templateGenerator : this.templateGenerators) { templateGenerator.setClassDefinitions( new ArrayList<ClassDefinition>((classDefinitions.values()))); templateGenerator.setTemplatesCache( this.templateFilesCache.get(templateGenerator.getFileFilter())); templateGenerator.generate(); } } COM: <s> walks through all the defined generators in template generators property and </s>
funcom_train/37557634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(ChangeEvent e) { // Something changed in the model, or new tab was selected // rerun the query of the selected selector (tab) System.out.println("SelectorHandler.stateChanged event:" + e.toString()); ((Selector) this.getSelectedComponent()).runQuery(); } COM: <s> invoked when the target of the listener has changed its state </s>
funcom_train/21333835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onRandom(SshAgentRandom msg) throws IOException { if (msg.getLength() > 0) { byte[] random = new byte[msg.getLength()]; ConfigurationLoader.getRND().nextBytes(random); sendRandomData(random); } else { sendAgentFailure(SshAgentFailure.SSH_AGENT_ERROR_FAILURE); } } COM: <s> called when the remote side sends a random message </s>
funcom_train/4365593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isELReserved(String id) { int i = 0; int j = reservedWords.length; while (i < j) { int k = (i + j) / 2; int result = reservedWords[k].compareTo(id); if (result == 0) { return true; } if (result < 0) { i = k + 1; } else { j = k; } } return false; } COM: <s> test if an id is a reserved word in el </s>
funcom_train/32615151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addMetadata_with_cookie(Set<TripleEntry> metadata, URI space, String signature) throws TSAPIException { List<Object> parameters = new LinkedList<Object>(); // first field is space parameters.add(space); // second field is metadata parameters.add(metadata); return Utils.readManagement(parameters, ManagementOperation.AddMetadata, securityCertificate,securityCookie,securityAssertions,signature).first; } COM: <s> create metadata for the space with space uri </s>
funcom_train/28125942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testChopString() { assertEquals("Mike Grant", _utilities.chopString("Mike Grant", 80, "..")); assertEquals("Mike...", _utilities.chopString("Mike Grant", 4, "...")); assertEquals("Mike is cool", _utilities.chopString ("Mike Grant", 5, "is cool")); } COM: <s> tests the chop string method </s>
funcom_train/45864249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean pressImpl(boolean u, boolean d, boolean l, boolean r) { if (u) { if (showingFrom > 0 || wrapV) { showingFrom--; if (showingFrom < 0) { showingFrom = usedRows - 1; } } } if (d) { if (showingFrom + visibleRows < usedRows || wrapV) { showingFrom++; if (showingFrom >= usedRows) { showingFrom = 0; } } } updateList(); return u || d; } COM: <s> handles scrolling one line at a time </s>
funcom_train/29829404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Icon getIconForPresence(JID jid) { // *** what about people who are not in roster !!! BSPresenceInfo pi = getPresenceBean().getResourcePresence(jid); if (pi == null) pi = new BSPresenceInfo(jid, false, null, null); Icon icon = BSJIDLabel.getIconForPresence(pi); return icon; } COM: <s> returns icon for given presence with emphasis as required </s>
funcom_train/45896463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int headerOut(Packet op) { Buffer opb = new Buffer(); opb.writeinit(); if (pack(opb) != 0) { return OV_EIMPL; } op.packetBase = new byte[opb.bytes()]; op.packet = 0; op.bytes = opb.bytes(); System.arraycopy(opb.buffer(), 0, op.packetBase, 0, op.bytes); op.beginOfStream = 0; op.endOfStream = 0; op.granulepos = 0; return 0; } COM: <s> write header out </s>
funcom_train/251476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openNewConnection() { if (openSockets < 500) { try { OpenConnectionTask socketTask = new OpenConnectionTask( "sockethandler", hostname, port); nioEnqueue(socketTask); openSockets++; } catch (IOException e) { e.printStackTrace(); } catch (TaskQueueException e) { e.printStackTrace(); } catch (UnknownTaskQueueException e) { e.printStackTrace(); } } logger.fine("OpenSockets: " + openSockets); } COM: <s> asks the selector thread to open up a new socket connection </s>
funcom_train/3085006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStyleSheet(Component c) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); cssWriter.setClassCommentsGenerated(chkClassComments.isSelected()); cssWriter.setDetailCommentsShown(chkDetailComments.isSelected()); cssWriter.setMostSpecificClassOrder(chkMostSpecific.isSelected()); cssWriter.createCssStyleSheet(c, pw); textStyleSheet.setText(sw.toString()); lblErrors.setText(""); } COM: <s> called to update the representation of the component css style sheet </s>
funcom_train/31686006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLookAndFeel() { try { UIManager.setLookAndFeel(m_sClassName); SwingUtilities.updateComponentTreeUI(DisplayManager.getInstance().getMainWindow()); SwingUtilities.updateComponentTreeUI(this.m_dialog); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (UnsupportedLookAndFeelException e) { e.printStackTrace(); } } COM: <s> sets the content manager look and feel to this option </s>
funcom_train/26318741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int calculateWalk() { if (isPrimitive()) { double rating = getEngine().getRating(); rating /= 1.2; if ((rating % 5) != 0) { return (int) ((rating - (rating % 5)) + 5) / (int) weight; } return (int) (rating / (int) weight); } return getEngine().getRating() / (int) weight; } COM: <s> used to set this mechs original walk mp </s>
funcom_train/10600424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getSelectorContext(Map objectModel, Parameters parameters) { String name = parameters.getParameter("header-name", this.headerName); if (name == null) { this.getLogger().warn("No header name given -- failing."); return null; } return ObjectModelHelper.getRequest(objectModel).getHeader(name); } COM: <s> p return the value of the header identified by the configured header </s>
funcom_train/22550997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addReply(FileDesc fd, LimeXMLDocument replyDoc) { assert getSchemaURI().equals(replyDoc.getSchemaURI()); URN hash = fd.getSHA1Urn(); synchronized(mainMap){ dirty = true; mainMap.put(hash,replyDoc); addKeywords(replyDoc); } fd.addLimeXMLDocument(replyDoc); } COM: <s> adds a reply into the main map of this collection </s>
funcom_train/50982809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLengthLimitedDocument_null() throws Exception { try { DocumentUtil.lengthLimitedDocument( null, 4 ); fail("Expected exception for null document length"); } catch( final DetailedNullPointerException e ) { assertEquals( "delegate", e.getArgumentName() ); } } COM: <s> test length limited document with a null document </s>
funcom_train/21633087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDeviceString(final int param) { final byte[] buffer = new byte[255]; final long[] len = new long[1]; CL.clGetDeviceInfo(this.device, param, buffer.length, Pointer .to(buffer), len); final String value = new String(buffer, 0, (int) len[0]); return value; } COM: <s> get a config string from the device </s>
funcom_train/51782722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connectStartPointToNode1() { double x = getNode1().getAbsCenterX(), y = getNode1().getAbsCenterY(); getPoints().get(0).setLocation(x, y); Line2D segment = getSegments().get(0); getNode1().calculateIntersection(segment, getPoints().get(0)); } COM: <s> connects the start point to node 1 </s>
funcom_train/23011905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String get(String key) { if(Strings.isNullOrBlank(key)){ return Const.EMPTY; } Properties rr = (Properties) resources.get(lang); if(rr == null){ return key; } String s = rr.getProperty(key.toLowerCase()); return (Strings.isNullOrBlank(s)) ? key : s; } COM: <s> gets resource string </s>
funcom_train/20904575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBnNull() { if (bnNull == null) { bnNull = new JButton(); bnNull.setText("NULL"); bnNull.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getTable().getSelectionModel().clearSelection(); dispose(); } }); } return bnNull; } COM: <s> this method initializes bn null </s>
funcom_train/23666025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean SetupImport(){ externalDataHandler = null; ExternalFileDialog fileDialog = new ExternalFileDialog(null, false, this.context); manager.showModal(fileDialog); if (fileDialog.getModalResult() == JOptionPane.CANCEL_OPTION) return false; externalDataHandler = fileDialog; externalDataHandler.beginImport(); refreshScreen(); validateButtons(); return true; } COM: <s> sets up the import method </s>
funcom_train/2345099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireTextSet() { if (!fIsForwarding) return; TextChangedEvent event = new TextChangedEvent(this); if (fTextChangeListeners != null && fTextChangeListeners.size() > 0) { Iterator e= new ArrayList(fTextChangeListeners).iterator(); while (e.hasNext()) ((TextChangeListener) e.next()).textSet(event); } } COM: <s> sends a text set event to all registered listeners </s>
funcom_train/41566759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel12() { if (jPanel1 == null) { GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); gridBagConstraints1.fill = GridBagConstraints.VERTICAL; gridBagConstraints1.insets = new Insets(0, 0, 0, 5); gridBagConstraints1.weightx = 1.0; jPanel1 = new JPanel(); jPanel1.setLayout(new GridBagLayout()); jPanel1.add(getJTextField(), gridBagConstraints1); } return jPanel1; } COM: <s> this method initializes j panel1 </s>
funcom_train/15493901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBooleanValue() throws XMLConfigurationException { if (type == null) { throw new XMLConfigurationException( "The type has not been initialized"); } else if (XMLConfigurationType.BOOLEAN_VALUE == type.getType()) { return booleanValue; } else { throw new XMLConfigurationException( "The value is not of type [boolean]."); } } COM: <s> the getter method for the boolean value </s>
funcom_train/40528832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkHeadless() { if (Boolean.getBoolean("test.headless")) { assertTrue("test.headless==true in non-headless environment", GraphicsEnvironment.isHeadless()); System.err.println(getName() + " skipped in headless testing"); return true; } assertFalse("test.headless==false in headless environment", GraphicsEnvironment.isHeadless()); return false; } COM: <s> returns true in headless testing environments </s>
funcom_train/51210432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeDatalistHead() { // Remove datasets wich were cached the longes time ago: if (dataSets instanceof RemoveRangeArrayList) { ((RemoveRangeArrayList) dataSets).removeRangeint(0, CACHE_SIZE - TAIL_BALANCE_SIZE); } else { while (TAIL_BALANCE_SIZE > dataSets.size()) dataSets.remove(0); } if (dataSets instanceof ArrayList) ((ArrayList) dataSets).ensureCapacity(CACHE_SIZE); // Rebuild the extreme values cache: resetExtremeValues(); for (DataSet ds : dataSets) includeExtremeValues(ds); } COM: <s> removes the oldest datasets in this cache </s>
funcom_train/16829497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel makeButtons(final Context context) { JPanel ret = new JPanel(new FlowLayout()); JButton cancel = new JButton("Save"); cancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { context.handleResolution("SAVE"); } }); ret.add(cancel); return ret; } COM: <s> makes a panel containing action buttons </s>
funcom_train/2950140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (this == obj) { return true; } if (obj != null && getClass() == obj.getClass()) { Block bl = (Block) obj; if (!(name == null? (bl.getName() == null) : name.equals(bl.getName()))) { return false; } else { return true; } } return false; } COM: <s> tests whether the parameter object is equal to the block </s>
funcom_train/49350024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getBackButton() { if (backButton == null) { backButton = new JButton(); backButton.setText(resource.getString("back")); backButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { NewGraphicWizardController controller = NewGraphicWizardController.instance(); controller.doBack(); } }); } return backButton; } COM: <s> this method initializes back button </s>
funcom_train/2985453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void publishAndWait(EventObject event) { fireEventPublished( event ); final EventDispatcher dispatcher = new EventDispatcher( event ); if (!SwingUtilities.isEventDispatchThread()) { try { SwingUtilities.invokeAndWait( dispatcher ); } catch (Exception t) { fireEventError(event, t); } } else { dispatcher.run(); } } COM: <s> publish supplied event but block until event subscribers have </s>
funcom_train/51226854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPages() { projectPage = new MavenizedNewProjectCreationPage("New AppFuse project"); projectPage.setTitle("New AppFuse project"); projectPage.setDescription("Give a name and (optionally) a location " + "where the project will be created."); mavenPage = new AppFuseProjectPage(); addPage(projectPage); addPage(mavenPage); } COM: <s> adding the page to the wizard </s>
funcom_train/18116138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLength() { if(workingDate.compareTo(createDate) < 0) { return 0; } else if (notes.size() < 1) { System.out.println("getlength " + text.length()); return text.length(); } int size = 0; for (int i = 0; i < notes.size(); i++) { MutableTextNote note = (MutableTextNote) notes.elementAt(i); if(note.isDeleted()) continue; size += note.getLength(); } return size; } COM: <s> should be finished </s>
funcom_train/7638634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node prepareCommit() { if (getDescriptor().isMandatory()) { createXmlNode(); // The new XML node has been created. // We don't need to refresh using loadFromXmlNode() since there are // no attributes or elements that need to be loading into this node. } return getXmlNode(); } COM: <s> called by attributes when they want to commit their value </s>
funcom_train/20597886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void silentlyResetIgnoreCount() throws CoreException { IgnoreCountData data = getIgnoreCountData(); if (data.getState() == IgnoreCountData.State.RESET || data.getValue() <= 0) { return; } data.setState(IgnoreCountData.State.RESET); setIgnoreCountData(data); } COM: <s> resets ignore count so that its effective value becomes </s>
funcom_train/2369616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getGuessed(final Player player) { final RoundInfo currentInfo = this.getCurrentInfo(); int result = -1; if (currentInfo != null) { final int index = currentInfo.getPlayers().indexOf(player); if (index >= 0) { result = currentInfo.getGuessed().get(index).intValue(); } } return result; } COM: <s> returns the guess of given player in the latest round </s>
funcom_train/12541357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void disposeFileInfo(Object element, FileInfo info) { IFileBufferManager manager= FileBuffers.getTextFileBufferManager(); try { info.fTextFileBuffer.releaseSynchronizationContext(); IPath location= info.fTextFileBuffer.getLocation(); manager.disconnect(location, getProgressMonitor()); } catch (CoreException x) { handleCoreException(x, "FileDocumentProvider.disposeElementInfo"); //$NON-NLS-1$ } } COM: <s> releases all resources described by given elements info object </s>
funcom_train/14587419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int blockingFumble(Play[] play, int blocking, boolean tryAttempt) { // yardage change in the fumble // blocking usually neg, so yardage normally negative int yardChange = (int)(.05 * blocking); yardline += yardChange; // assumes negative yardChange means offensive loss ydsToGo += yardChange; return fumble(play, yardChange, tryAttempt); } COM: <s> front end for fumbles behind the line of scrimmage fumbles that </s>
funcom_train/51210491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetScreenDataBuffer() { synchronized(screenDataBufferLock) { showAtLeastOneSeries = false; screenDataBuffer = new SeriesScreenData[dataCache.countDataSeries()]; for (int s = 0; s < screenDataBuffer.length; s++) { screenDataBuffer[s] = new SeriesScreenData(s); screenDataBuffer[s].colour = seriesSetts.getColour(s); updateSeriesTransformer(s); } } } COM: <s> reallocates the screen data buffer </s>
funcom_train/2384031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void squarify(Stack<RectangleElement> elements, MapRow row) { assert elements != null : "elements is null"; assert row != null : "row is null"; if (elements.size() > 0) { while (elements.size() > 0 && row.shouldAddElement(elements.peek())) { row.addElement(elements.pop()); } Rectangle2D.Float newBounding = row.layout(); if (elements.size() > 0) squarify(elements, new MapRow(newBounding, row.getAreaFactor())); } } COM: <s> this is the algorithm it self </s>
funcom_train/33556750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void terminateTest() { // (JAF), 20101123, take into account tests with multiple windows // this.getActiveWindow().getControl().dispose(); for (ApplicationWindow applicationWindow : Application.instance().getWindowManager().getWindows()) { applicationWindow.getControl().dispose(); } } COM: <s> terminates the test </s>
funcom_train/25422361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getNewUser() { if (_newUser == null) { IdentityConfiguration idConfig = getIdentityConfiguration(); _newUser = new User(); _newUser.setCredentials(new UsernamePasswordCredentials()); _newUser.setProfile(new UserAttributeMap(idConfig.getUserAttributeMap())); } return _newUser; } COM: <s> gets the user associated with new registration requests </s>
funcom_train/44328918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int compare(int i, int j, int column) { Object io = realModel.getValueAt(i, column); Object jo = realModel.getValueAt(j, column); if (io instanceof Comparable && jo instanceof Comparable) { return ((Comparable)io).compareTo(jo); } else { int c = jo.toString().compareTo(io.toString()); return (c < 0) ? -1 : ((c > 0) ? 1 : 0); } } COM: <s> compares the two column values of the given row indexes by invoking the </s>
funcom_train/18802617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsValue(final Object value) { final Iterator e = this.table.values().iterator(); boolean found = false; while (e.hasNext() && !found) { final ArrayList v = (ArrayList) e.next(); found = v.contains(value); } return found; } COM: <s> tests whether this map contains the given value </s>
funcom_train/7697088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTargetClass(String qualifying_method_name, int instrNo) { byte[] args = this.getArgs(qualifying_method_name, instrNo); int index = (args[0] << 8) | (args[1]); int class_index = this.constPoolEntries[index]; int tmp = this.constPoolEntries[class_index]; tmp = this.UtfsPos[tmp]; String class_name = new String((byte[]) this.Utfs.elementAt(tmp)); return class_name; } COM: <s> returns the name of the target class of the given program point </s>
funcom_train/44660669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addActionKeyBinding(KeyStroke key, String actionKey) { if (actionKey == finishCommand.getId()) { addActionKeyBinding(key, actionKey, finishCommand.getActionAdapter()); } else if (actionKey == cancelCommand.getId()) { addActionKeyBinding(key, actionKey, cancelCommand.getActionAdapter()); } else { throw new IllegalArgumentException("Unknown action key " + actionKey); } } COM: <s> add an action key binding to this dialog </s>
funcom_train/13771835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addTypes(CompiledOpenClass dependency) throws OpenLCompilationException { Map<String, IOpenClass> dependentModuleTypes = dependency.getOpenClass().getTypes(); for (String typeNamespace : dependentModuleTypes.keySet()) { add(typeNamespace, dependentModuleTypes.get(typeNamespace)); } } COM: <s> add datatypes from dependent modules to this one </s>
funcom_train/9920804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int winnerIndex(){ int winnerIndex = -1; for (int i=0; i<player.length; i++){ if ((player[i] != null) && (player[i].active)){ if (getPlayerHandValue(i) == getValueOfBestHand()){ winnerIndex = i; } } } return winnerIndex; } COM: <s> returns the index of the winner for this hand </s>
funcom_train/40456684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContent(Widget widget) { Widget currentContent = this.content.getWidget(); if (currentContent != null && (currentContent instanceof PanelLayoutAware)) { ((PanelLayoutAware) currentContent).beforePanelLayoutDetach(this); } this.content.setWidget(widget); if (widget instanceof PanelLayoutAware) { ((PanelLayoutAware) widget).afterPanelLayoutAttached(this); } } COM: <s> sets the main content of this layout </s>
funcom_train/25707743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetLastBackloadUpdateFinishedMillis() { final Enumeration<AbstractNode> e = getRoot().breadthFirstEnumeration(); while (e.hasMoreElements()) { final AbstractNode child = e.nextElement(); if (child.isBoard()) { ((Board)child).setLastBackloadUpdateFinishedMillis(0); } } } COM: <s> called if user changed the days to download backward in options </s>
funcom_train/3740081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEventAss(Event event, AllUser assignee) throws HibernateException, EventManagerException { HibernateUtil.currentSession(); AssignedEvent ass = new AssignedEvent(event, assignee); Set assignees = event.getAssignedEvents(); try { Session sess = HibernateUtil.currentSession(); Transaction tx = null; try { tx = sess.beginTransaction(); sess.saveOrUpdate(ass); assignees.add(ass); event.setAssignedEvents(assignees); sess.save(event); tx.commit(); } catch (HibernateException he) { if (tx != null) tx.rollback(); throw he; } finally { } } catch (HibernateException he) { throw new EventManagerException(); } } COM: <s> add given event and assign it to the given user </s>
funcom_train/7708004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String readResponse(InputStream is) throws IOException { String r = ""; String str = ""; BufferedReader reader = new BufferedReader(new InputStreamReader(is)); while (null != ((str = reader.readLine()))) { r += str + "\n"; } reader.close(); return r; } COM: <s> reads response string from inputstream </s>
funcom_train/12831899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean generateKeystoreAndPrivateKey(HashMap<String, String> keystoreData) { // -storetype JCEKS try { KeyStore ks = KeyStore.getInstance("JCEKS", "SunJCE"); } catch (KeyStoreException e) { return false; } catch (NoSuchProviderException e) { return false; } return true; } COM: <s> generates a keystore with a new private key </s>
funcom_train/19270616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringTransformerChain extend(StringTransformerRule... additionalRules) { StringTransformerRule[] newRules = new StringTransformerRule[this.rules.length + additionalRules.length]; System.arraycopy(this.rules, 0, newRules, 0, this.rules.length); System.arraycopy(additionalRules, 0, newRules, this.rules.length, additionalRules.length); return new StringTransformerChain(newRules); } COM: <s> this method extends this chain with code additional rules code </s>
funcom_train/31299886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encode(Image img, OutputStream out) throws IOException{ int iw = img.getWidth(this); int ih = img.getHeight(this); BufferedImage bi = new BufferedImage(iw,ih,BufferedImage.TYPE_INT_RGB); Graphics2D big = bi.createGraphics(); big.drawImage(img,0,0,iw,ih,this); JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi); param.setQuality(1.0f, false); encoder.setJPEGEncodeParam(param); encoder.encode(bi); } COM: <s> encode a image to the output stream using jpeg </s>
funcom_train/3547473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getBody(Article article, HeliumContext context) throws HeliumException { PrintWriter actualWriter = context.getWriter(); StringWriter tmpWriter = new StringWriter(); context.setWriter(new PrintWriter(tmpWriter)); doBody(article, context); context.setWriter(actualWriter); return tmpWriter.toString(); } COM: <s> renders the body of an article and returns it as a string </s>
funcom_train/50576090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getKey(String path) throws Exception { DiscInfo discInfo = ((CDDrive) ((CDDevice) Tuneology.getApp().factory.findDevice(path)).getDrive()).getDiscInfo(); return (discInfo != null) ? discInfo.getDiscId() : -1; } COM: <s> returns the freedb id of the cd in the specified drive </s>
funcom_train/2582471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getIntervalWidth() { if (isAutoWidth() && !Double.isInfinite(this.autoIntervalWidth)) { // everything is fine: autoWidth is on, and an autoIntervalWidth // was set. return this.autoIntervalWidth; } else { // either autoWidth is off or autoIntervalWidth was not set. return this.fixedIntervalWidth; } } COM: <s> returns the interval width </s>
funcom_train/4536501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flashWindow(Window window) { final Iterator alertNotifier = ModelUtil.reverseListIterator(nativeHandlers.listIterator()); while (alertNotifier.hasNext()) { final NativeHandler alert = (NativeHandler)alertNotifier.next(); boolean handle = alert.handleNotification(); if (handle) { alert.flashWindow(window); break; } } } COM: <s> flash the given window </s>
funcom_train/41403254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NFAClosure getClosure(Object input_) { Set<NFAState> targetStates = new HashSet<NFAState>(); for (NFAState state : _states) { if (state.getState(input_) != null) { // needs to be skipped targetStates.add(state.getState(input_)); } } return (!targetStates.isEmpty()) ? new NFAClosure(targetStates) : null; } COM: <s> returns the target closure of this closure for the give input object </s>
funcom_train/4370439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onPreWindowOpen(ApplicationWindowConfigurer configurer) { // If you override this method, it is critical to allow the superclass // implementation to run as well. super.onPreWindowOpen(configurer); // Uncomment to hide the menubar, toolbar, or alter window size... // configurer.setShowMenuBar(false); // configurer.setShowToolBar(false); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension d =new Dimension(screenSize.width,screenSize.height-100); configurer.setInitialSize(d); } COM: <s> this method is called prior to the opening of an application window </s>
funcom_train/46660018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean tableExists(String table) throws DatabaseException { boolean result = false; Statement stmt = null; try { stmt = connection.createStatement(); stmt.execute("SELECT count(*) FROM information_schema.system_tables WHERE table_schem = 'public' AND table_name = '" + table + "'"); } catch (SQLException e) { throw (new DatabaseException(e)); } finally { if (stmt != null) { try { stmt.close(); } catch (SQLException e) { } } } return result; } COM: <s> determine if a table exists </s>
funcom_train/2760478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Flow getFlow(Class flowLogic, boolean mustExist) { Flow flow = (Flow) _flowsByClass.get(flowLogic); if(flow != null) { return flow; } if(mustExist) { throw new FlowException("No flow exist for logic("+flowLogic.getName()+")["+_flowsByClass.keySet()+"]."); } return null; } COM: <s> returns the flow that the supplied class represents </s>
funcom_train/24607140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _generateAFaculty(int index) { writer_.startSection(CS_C_FACULTY, _getId(CS_C_FACULTY, index)); _generateAFaculty_a(CS_C_FACULTY, index); writer_.endSection(CS_C_FACULTY); } COM: <s> generates a faculty instance </s>
funcom_train/49045609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBoxInvert() { if (jCheckBoxInvert == null) { jCheckBoxInvert = new JCheckBox(); jCheckBoxInvert.setText("Invert Input Image"); jCheckBoxInvert.setToolTipText("inverts input image if necessary (the code searches for dark objects in bright background)"); jCheckBoxInvert.addActionListener(this); jCheckBoxInvert.setActionCommand("parameter"); } return jCheckBoxInvert; } COM: <s> this method initializes j check box invert </s>
funcom_train/21848344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateComponents(java.util.EventObject evt) { JETAController controller = getController(); if (controller == null) { // try the controller on the primary panel if (m_primaryPanel != null && m_primaryPanel instanceof JETAPanel) { controller = ((JETAPanel) m_primaryPanel).getController(); } } if (controller != null) { controller.updateComponents(evt); } } COM: <s> updates the components in the dialog based on the model state </s>
funcom_train/32056918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetJList() { GPGraphpad graphpad = new GPGraphpad(); graphpad.addDocument( new TPGraphModelProvider() ); TPDocument tpdoc = (TPDocument)graphpad.getCurrentDocument(); assertNotNull( tpdoc ); assertEquals( 1, tpdoc.getListModel().size() ); assertNotNull( tpdoc.getJList() ); } COM: <s> this function tests get jlist function of tpdocument class </s>
funcom_train/32748469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Channel getChannel( final String signalName, final ValueTransform transform ) { final String channelID = Channel.generateId( signalName, transform ); if ( !channelMap.containsKey( channelID ) ) { final Channel channel = newChannel( signalName, transform ); channelMap.put( channelID, channel ); return channel; } else { final Channel channel = (Channel)channelMap.get( channelID ); return channel; } } COM: <s> get a channel associated with the signal name and transform </s>
funcom_train/42668218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printDB() { try { Connection connection = this.datasource.getConnection(); Statement st = connection.createStatement(); st.execute("select * from VALUECACHE"); ResultSet rs = st.getResultSet(); while(rs.next()) { System.out.println(rs.getObject(1) + " " + rs.getObject(2)); } } catch (SQLException e) { e.printStackTrace(); } } COM: <s> print the content of the in memory database cache for debugging </s>
funcom_train/21445931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dump() { System.out.println("id: " + id + " type: " + type); for (String key : values.keySet()) { String value = values.get(key); System.out.printf(" %s: %s\n", key, value); } System.out.println(""); } COM: <s> dumps the document </s>
funcom_train/22782572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedImage getImage(ImageQuality quality) { // check if there is a better quality (from best to worst) for (int i = 0; i <= quality.ordinal(); i++) { // get image SoftReference<BufferedImage> current = images[i]; // if it's not empty, we have a hit if (current != null && current.get() != null) { return current.get(); } } // so, there was no entry for this return null; } COM: <s> get an imager out of this container with at least the given quality </s>
funcom_train/25289656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBoundaryModeR(int boundaryModeR) { checkForLiveOrCompiled(); switch (boundaryModeR) { case Texture.CLAMP: case Texture.WRAP: case Texture.CLAMP_TO_EDGE: case Texture.CLAMP_TO_BOUNDARY: break; default: throw new IllegalArgumentException(Ding3dI18N.getString("Texture31")); } ((Texture3DRetained)this.retained).initBoundaryModeR(boundaryModeR); } COM: <s> sets the boundary mode for the r coordinate in this texture object </s>
funcom_train/1176409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClearCartas() { System.out.println("clearCartas"); ColecaoCartas instance = new CartasSecretas(3); instance.addCarta(new Carta(12)); instance.addCarta(new Carta(11)); instance.addCarta(new Carta(6)); instance.clearCartas(); assertEquals(0, instance.getQuantidadeCartas()); } COM: <s> test of clear cartas method of class caraacara </s>
funcom_train/3100803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static private void resource(AResource resource) { if (resource.isAnonymous()) System.out.print("_:j" + resource.getAnonymousID() + " "); else { System.out.print("<"); System.out.print(resource.getURI()); System.out.print("> "); } } COM: <s> displays the given rdf resource </s>
funcom_train/1064490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configureSourceViewer(OpaqueBehavior opaqueBehaviorElement, String text, String language) { editionArea.unconfigure(); Document document = new Document(text); // getEditor for this language configuration = DirectEditorsUtil.findEditorConfiguration(language, "org.eclipse.uml2.uml.OpaqueBehavior"); configuration.setLanguage(language); editionArea.configure(configuration.getSourceViewerConfiguration()); editionArea.setDocument(document); } COM: <s> configure the source viewer </s>
funcom_train/44478592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCategoryContent(JSONArray items, Subject category) { JSONObject obj = new JSONObject(); items.add(obj); obj.put("type", "Category"); obj.put("label", PreviewHelper.cleanStringForJson(category.getLabel())); obj.put("parent", category.getLabel()); obj.put("uri", category.getURI()); obj.put("description", category.getDescription()); } COM: <s> add category to json </s>
funcom_train/1064105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Stereotype getApplicableStereotype(String stereotypeName) { Iterator i = uml2Element.getApplicableStereotypes().iterator(); boolean found=false; Stereotype currentStereotype = null; while (i.hasNext() && !found ){ currentStereotype = (Stereotype)i.next(); found = (currentStereotype.getName().equals(stereotypeName) ); } if(!found){ currentStereotype=null; } return currentStereotype; } COM: <s> get the applicable code org </s>
funcom_train/18088707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWidthOfScreen(final double percentageOfScreen) { if ((percentageOfScreen < 0.0) || (percentageOfScreen > 1.0)) { // The percentage must be between 0.00 and 1.00. throw new IllegalArgumentException(String .valueOf(percentageOfScreen)); } widthPercentage = percentageOfScreen; } COM: <s> sets how far across the screen the line extends </s>
funcom_train/50849636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPossiblePosition(int iX, int iY, int iWid, int iHei) { if (iX < 160 || iY < 160 || iX + iWid > 800 || iY + iHei > 640) { return false; } return oDataWorld.isPossibleGroundPosition(iX, iY, iWid, iHei); } COM: <s> indicates whether a position is possible </s>
funcom_train/44222113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getAddr( String key ) throws Exception { String addr = (String) this.addresses.get(key); if( addr == null ) throw new Exception("Address key: " + key + " not found in model " + this.vd.get_top().get_umlModel().get_Name() ); return addr; } COM: <s> returns the address in the view instance of the desired variable </s>
funcom_train/1170775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String removeFoundNumberCard(String rStr, String Number) { int a; int temp; a = rStr.indexOf(Number); temp = rStr.codePointAt(a + 1); if (temp >= 48 && temp <= 57) { return rStr.substring(a + 2); } else { return rStr.substring(a + 1); } } COM: <s> p remove found number card </s>
funcom_train/51104344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initCayenneStack(Map properties) { Configuration cayenneConfig = new DefaultConfiguration( Configuration.DEFAULT_DOMAIN_FILE); try { cayenneConfig.initialize(); cayenneConfig.didInitialize(); } catch (Exception ex) { throw new CayenneRuntimeException("Error starting Cayenne", ex); } // TODO (Andrus 10/15/2005) this assumes that mapping has a single domain... // do something about multiple domains this.domain = cayenneConfig.getDomain(); } COM: <s> sets up cayenne stack </s>
funcom_train/3475237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRecordablesToVector (VectorStructureElement v) { if (this instanceof Recordable) { v.add (this); } else { StructureElement[] children = getChildren(); for(int i = 0; i < children.length; i++) { StructureElement child = children[i]; child.addRecordablesToVector (v); } } } COM: <s> adds all leave nodes belonging to the nodes subtree to the given vector </s>
funcom_train/47184163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HospitalBean getHospital(String id) throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("SELECT * FROM Hospitals WHERE HospitalID = ?"); ps.setString(1, id); ResultSet rs = ps.executeQuery(); if (rs.next()) return hospitalLoader.loadSingle(rs); return null; } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } COM: <s> returns a particular hospital given its id </s>
funcom_train/25093059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJRadioButtonWcso(){ if(jRadioButtonWcso == null){ jRadioButtonWcso = new JRadioButton(); jRadioButtonWcso.setToolTipText("WCSO algorithm: using above algorithm"); jRadioButtonWcso.setText("Wcso"); jRadioButtonWcso.setSelected(false); jRadioButtonWcso.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e){ fireAlgoChanged(); } }); } return jRadioButtonWcso; } COM: <s> this method initializes j radio button wcso </s>
funcom_train/43524417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void close(){ if (rs != null) { try { rs.close(); } catch (SQLException sqlEx) { // ignore } rs = null; } if (stmt != null) { try { stmt.close(); } catch (SQLException sqlEx) { // ignore } stmt = null; } } COM: <s> releases resources in reverse order </s>
funcom_train/3786310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void clearHash() { /* clearHash */ for(int i=0;i<sizeHashPrime;i++) { hXYtbl[i]= 0; /* Not required since only need to kill the keys */ //hIdxTbl[i]= 0; } } /* clearHash */ COM: <s> clear hash clear the pix hash table by writing zero into the table </s>
funcom_train/15617001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parse(JFlexLexer lexer, String raw, Object... args) throws ParserException { if (logger.isTraceEnabled()) { logger.trace("javascript: " + raw + " (" + lexer.yystate() + ")"); } if (StringUtils.isBlank(raw)) { return raw; } return this.parseScriptTag(lexer, raw, lexer.getMode()); } COM: <s> parse a mediawiki html link of the form script </s>
funcom_train/50872825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsValid() { OMApplication application = new OMApplication(); application.addElement(new OMSymbol("a", "b")); application.addElement(new OMSymbol("b", "c")); assertTrue(application.isValid()); } COM: <s> test of is valid method of class omapplication </s>
funcom_train/5437156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addChecksum(PacketInputStream input, PacketAnalysisDescriptor root) { try { int offset = input.getOffset(); int checksum = input.readShort(); addNode("Checksum: 0x" + Integer.toHexString(checksum), offset, offset + 1, root); } catch (IOException e) { // Drop it. } } COM: <s> adds the checksum entry in the udp header to the analysis information </s>