__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/34343136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getMiMensaje() { if (miMensaje == null) {//GEN-END:|22-getter|0|22-preInit // write pre-init user code here miMensaje = new TextField("Mensaje SMS", null, 32, TextField.ANY);//GEN-LINE:|22-getter|1|22-postInit // write post-init user code here }//GEN-BEGIN:|22-getter|2| return miMensaje; } COM: <s> returns an initiliazed instance of mi mensaje component </s>
funcom_train/35111689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { DynamicPhysicsNode topCylinder = (DynamicPhysicsNode)this.getChild("top cylinder"); topCylinder.clearDynamics(); topCylinder.setLocalRotation(new Quaternion()); topCylinder.setLocalTranslation(0, frameLength/2, 0); torusNode.clearDynamics(); torusNode.setLocalTranslation(0, 0, 0); } COM: <s> reset the swing </s>
funcom_train/44137354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addKeyListener(KeyListener listener) { m_RadioBase.addKeyListener(listener); m_RadioModel.addKeyListener(listener); m_ButtonAdd.addKeyListener(listener); m_ButtonDel.addKeyListener(listener); m_ComboModel.addKeyListener(listener); } COM: <s> adds a keylistener to all components </s>
funcom_train/47928401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void backToCharSelect() { isGameRunning = false; daWindow.setContentPane(charPan); currentScreen = "charSelectScreen"; newGame.killGameInstance(); charPan.animateCharSelect(); charPan.refreshSelections(); bgMus = new threadMP3(threadMP3.menuMus(), true); bgMus.play(); reSize("menu"); focus(); } COM: <s> back to character select screen when match is over </s>
funcom_train/22526829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Browser createBrowser(Composite parent) throws BrowserWidgetNotSupportedException { Browser browser; try { browser = new ExtendedBrowser(parent, SWT.NONE); browser.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true)); } catch(SWTError ex) { throw new BrowserWidgetNotSupportedException(ex); } return browser; } COM: <s> create the browser component </s>
funcom_train/2333645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int minBin(DoubleIHistogram1D h) { int minBin = -1; double minValue = Double.MAX_VALUE; for (int i = h.xAxis().bins(); --i >= 0;) { double value = h.binHeight(i); if (value < minValue) { minValue = value; minBin = i; } } return minBin; } COM: <s> returns the index of the in range bin containing the min bin height </s>
funcom_train/47673437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element createAttributeElement(String p_id, String p_name, String p_value) { Element attribute = null; attribute = document.createElement("attribute"); attribute.setAttribute("id", p_id); attribute.setAttribute("name", p_name); attribute.setAttribute("value", p_value); return attribute; } COM: <s> creates an xml dom element and sets attributes from the parameters </s>
funcom_train/41165451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoMenu entity) { EntityManagerHelper.log("saving CoMenu instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co menu entity </s>
funcom_train/18599659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getValue(Element el, String tag) throws Exception { NodeList nl = el.getElementsByTagName(tag); if (nl != null && nl.item(0) != null) { String value = nl.item(0).getTextContent(); return value.trim(); } // TODO a bit better.... throw new Exception("No value found for " + tag); } COM: <s> gets the value from the node tag from the element el </s>
funcom_train/31078885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equalsInstruction(Instruction other) { if (other == this) return true; if (!super.equalsInstruction(other)) return false; String type = getTypeName(); String otherType = ((LoadInstruction) other).getTypeName(); return type == null || otherType == null || type.equals(otherType); } COM: <s> load instructions are equal if the type they reference the same </s>
funcom_train/28633642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveStateUp() { if (this.stateIndex >= 0) { EditState editState = this.states.remove(this.stateIndex); this.stateIndex--; if (this.stateIndex < 0) { this.stateIndex = 0; } this.states.add(this.stateIndex, editState); // notify about change setChanged(); notifyObservers(); } } COM: <s> moves a state one position up </s>
funcom_train/3099069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultMutableTreeNode getActiveStatesRootedAt (State state) { Iterator activeStatesIter = activeStates.keySet().iterator(); while (activeStatesIter.hasNext()) { State activeState = (State) activeStatesIter.next(); if (state.equals(activeState)) { return (DefaultMutableTreeNode) activeStates.get(activeState); } } return null; } COM: <s> returns the tree at the given active state </s>
funcom_train/31907632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object remove(Object key) { int hash = key.hashCode() & 0x7FFFFFFF; int index = hash % table.length; Entry p = null; for (Entry e = table[index]; e != null; e = e.next) { if ((e.hash == hash) && e.key.equals(key)) { Object result = e.value; if (p == null) { table[index] = e.next; } else { p.next = e.next; } count--; return result; } p = e; } return null; } COM: <s> removes an entry from the table </s>
funcom_train/46610336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(ServletRequest request, Object value, Map<String, Object> expandContext) { AttributeAccessor aa = new AttributeAccessor(name, expandContext, this.attributeName, this.fma, this.needsExpand); aa.put(request, value); } COM: <s> based on name put in servlet request or from list in servlet request </s>
funcom_train/25217857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int compareOne(String[] a1, String[] a2, int i) { if (i >= a1.length) { return (i < a2.length ? LESS : EQUAL); } else if (i >= a2.length) { return GREATER; } return compareStrings(a1[i], a2[i]); } COM: <s> compare two string arrays at a certain position </s>
funcom_train/50942200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void goTo(Account account, Transaction t) { if ( EBEditors.getTxnFrame() != null ) { moveEditorToFront(EBConstants.EDITOR_TXN); // don't use, cause doesn't update menus : txnFrame.moveToFront(); EBEditors.getTxnFrame().goTo(account, t); } } COM: <s> go to a specific transaction open txn editor on the given txns account </s>
funcom_train/13378477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SubsystemCollection getAllSubsystems() { SubsystemCollection retCol = new SubsystemCollection(); for(Enumeration e = subsystemIds.elements(); e.hasMoreElements();) { String id = (String)e.nextElement(); if(id != null) { Subsystem s = this.getSubsystem(id); if(s != null) { retCol.addElement(s); } } } return retCol; } COM: <s> return all subsystems in the model </s>
funcom_train/8284397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WireFeed build(org.w3c.dom.Document document) throws IllegalArgumentException,FeedException { DOMBuilder domBuilder = new DOMBuilder(); try { Document jdomDoc = domBuilder.build(document); return build(jdomDoc); } catch (Exception ex) { throw new ParsingFeedException("Invalid XML",ex); } } COM: <s> builds an wire feed rss or atom from an w3 c dom document </s>
funcom_train/44011459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRevSrc() { System.out.println("getRevSrc"); TransLineBO instance = new TransLineBO(); RevenueSourceBO expResult = null; RevenueSourceBO result = instance.getRevSrc(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get rev src method of class edu </s>
funcom_train/7381984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (true) { Runnable r = obtainJob(); if (r == null) { break; } try { r.run();//执行完了再回到obtainJob();取得任务 } catch (Exception e) { System.err.println("E: " + e); e.printStackTrace(); } } } COM: <s> get a job from the pool run it repeat </s>
funcom_train/37749947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XmlEvent getSaxEvent(int eventType) throws FOPException { XmlEvent ev = source.getEvent(); while (ev != null && ev.type != eventType) { ev = source.getEvent(); } if (ev == null) { throw new NoSuchElementException (XmlEvent.eventTypeName(eventType) + " not found."); } return ev; } COM: <s> get the next event of the given type from the buffer </s>
funcom_train/8763270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToggleButton getSimulationToggle() { if (simulationToggle == null) { simulationToggle = new JToggleButton(); simulationToggle.setText("Simulation "); simulationToggle.setSelected(false); simulationToggle .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { if (simulationToggle.isSelected()) { simulationFrame.setVisible(true); } else { simulationFrame.setVisible(false); } } }); } return simulationToggle; } COM: <s> this method initializes simulation toggle </s>
funcom_train/2033675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRegistrarReserva() { System.out.println("registrarReserva"); Asociado a = new Asociado(); Ejemplar b = new Ejemplar(); Reserva instance = new Reserva(); boolean expResult = false; boolean result = instance.registrarReserva(a, b); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. } COM: <s> test of registrar reserva method of class reserva </s>
funcom_train/18753743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSubdomainsGrouped(DomainNode domain){ boolean result = false; Node[] children = domain.getChildren().getNodes(); for(int i = 0; i < children.length && result == false; i++){ if(children[i] instanceof DomainNode){ result = ((DomainNode) children[i]).isGroupTypes(); } } return result; } COM: <s> checks if all of the child domain nodes are grouped </s>
funcom_train/43245299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetECOnePhoneNumber() { System.out.println("setECOnePhoneNumber"); String eCOnePhoneNumber = ""; EmergencyContactDG3Object instance = new EmergencyContactDG3Object(); instance.setECOnePhoneNumber(eCOnePhoneNumber); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set econe phone number method of class org </s>
funcom_train/9544529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doCustomConfigure(RenderRequest request, RenderResponse response) throws PortletException, IOException { // Set the MIME type for the render response response.setContentType(request.getResponseContentType()); // Invoke the JSP to render PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher(getJspFilePath(request, CONFIG_JSP)); rd.include(request,response); } COM: <s> serve up the custom code config code mode </s>
funcom_train/9271780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPoolable() throws SQLException { try { synchronized (connection_) { if (agent_.loggingEnabled()) { agent_.logWriter_.traceEntry(this, "isPoolable"); } // Assert the statement has not been closed checkForClosedStatement(); return isPoolable; } } catch (SqlException se) { throw se.getSQLException(); } } COM: <s> returns the value of the poolable hint indicating whether </s>
funcom_train/4902349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector generateLabels(){ Vector result = new Vector(numLabels+1); double shift = (labelIncrement-(timeStart%labelIncrement)); result.add(new Integer((int)(shift*xIncrement))); result.add(new Integer((int)(labelIncrement*xIncrement))); for(int i = 0; i < numLabels; ++i){ String t = Double.toString((i*labelIncrement)+timeStart+shift); if(t.length() > 10){ t = t.substring(0,9); } result.add(t); } return result; } COM: <s> generate labels and store into the list </s>
funcom_train/31927207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getGetters(Object[] obj) throws ClassNotFoundException { int i = 0; List _m2assert = null; try { _m2assert = new LinkedList(); for (i = 0; i < obj.length; i++) { Hashtable aux = getGetters(obj[i].getClass()); _m2assert.add(aux); } } catch (ClassNotFoundException cnfex) { throw new ClassNotFoundException("Oops! Class " + obj[i].toString() + " not found."); } return _m2assert; } COM: <s> return a list of hashtables containing all get xxx methods for every </s>
funcom_train/5377314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String aliasProcessor(String processor) { processor = processor.toLowerCase(); if (processorAliasTable == null) { InputStream in = getClass().getResourceAsStream(Constants.OSGI_PROCESSOR_ALIASES); if (in != null) { try { processorAliasTable = initAliases(in); } finally { try { in.close(); } catch (IOException ee) { } } } } if (processorAliasTable != null) { String alias = (String) processorAliasTable.get(processor); if (alias != null) { processor = alias; } } return (processor); } COM: <s> return the master alias for the processor </s>
funcom_train/39184139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearColumnValue2(){ crit3CheckBox.setSelected(false); crit3ComboBox1.setSelectedIndex(0); crit3ComboBox2.setSelectedIndex(0); crit3TextField.setText(""); crit3ComboBox1.setEnabled(false); crit3ComboBox2.setEnabled(false); crit3TextField.setEnabled(false); crit3Label.setEnabled(false); } COM: <s> clears the settings for the second column value criteria </s>
funcom_train/12541327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ISchedulingRule computeSchedulingRule(IResource toCreateOrModify) { if (toCreateOrModify.exists()) return fResourceRuleFactory.modifyRule(toCreateOrModify); IResource parent= toCreateOrModify; do { /* * XXX This is a workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=67601 * IResourceRuleFactory.createRule should iterate the hierarchy itself. */ toCreateOrModify= parent; parent= toCreateOrModify.getParent(); } while (parent != null && !parent.exists()); return fResourceRuleFactory.createRule(toCreateOrModify); } COM: <s> computes the scheduling rule needed to create or modify a resource </s>
funcom_train/12179148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemappableElementsIsNonNull() { final String ssversion = DevicePolicyConstants.CSS_WAP; final DefaultDevice device = createDevice("Master", ssversion, null); final CSSSupportConfigurator configurator = new CSSSupportConfigurator( INTERNAL_DEVICE_FACTORY.createInternalDevice(device)); final Map remappableElements = configurator.getFallbackAttributeExpressions(); assertNotNull(remappableElements); assertTrue(remappableElements.isEmpty()); } COM: <s> verify that empty remappable stuff returns an empty map and not null </s>
funcom_train/45018510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNeXusVersionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXroot_neXusVersion_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXroot_neXusVersion_feature", "_UI_NXroot_type"), NexusPackageImpl.Literals.NXROOT__NE_XUS_VERSION, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the ne xus version feature </s>
funcom_train/3409839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInterface(InetAddress inf) throws SocketException { if (isClosed()) { throw new SocketException("Socket is closed"); } checkAddress(inf, "setInterface"); synchronized (infLock) { getImpl().setOption(SocketOptions.IP_MULTICAST_IF, inf); infAddress = inf; } } COM: <s> set the multicast network interface used by methods </s>
funcom_train/39184952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void zoom(double zoomFactor) { zoomed = zoomed*zoomFactor; ic.setMagnification(zoomed); ic.setImageUpdated(); this.setPreferredSize(new Dimension(Math.round((float)(ip.getWidth()*zoomed)),Math.round((float)(ip.getHeight()*zoomed)))); ic.repaint(); this.repaint(); } COM: <s> zooms on the image by the given factor </s>
funcom_train/44819980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initEntityProvider(IEntityProvider provider) { provider.init(); provider.setFormHolder(this); provider.setEntityManager(getController().getEntityManager()); provider.setServiceFactory(getController().getServiceFactory()); Association association = getAssociationByEntityProvider(provider); if (association == null) { return; } provider.setAssociation(association); initEntityProvider(provider, association); if (provider instanceof TableEntityProvider) { initTableEntityProvider((TableEntityProvider) provider); } } COM: <s> initialize the entity provider </s>
funcom_train/20767068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDisplayMethod(DisplayMethod m) { if (m == null || !getDisplayMethods().contains(m)) { log.warning("Cannot remove DisplayMethod "+m+": no such DisplayMethod " + m + " in the getDisplayMethods() list"); return; } displayMethods.remove(m); displayMethodMenu.remove(m.getMenuItem()); } COM: <s> removes a display method for this chip canvas </s>
funcom_train/13814949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Transferable createTransferable(JComponent c) { log.warn( "createTransferable" ); Collection selection = view.getSelection(); sourcePhotos = new PhotoInfo[selection.size()]; Iterator iter = selection.iterator(); int i = 0; while ( iter.hasNext() ) { sourcePhotos[i] = (PhotoInfo) iter.next(); i++; } log.warn( "" + i + " photos selected" ); PhotoCollection sourceCollection = view.getCollection(); return new PhotoCollectionTransferable( sourcePhotos ); } COM: <s> creates a transferable to use as the source for a data transfer </s>
funcom_train/18895398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getString(Block block) { byte[] len = new byte[1]; block.get(0, len); byte[] strBytes = new byte[ (int) len[0]]; block.get(1, strBytes); try { return new String(strBytes, "UTF-8"); } catch (UnsupportedEncodingException ex) { // Shouldn't happen. return null; } } COM: <s> gets the string attribute of the block file test object </s>
funcom_train/3561445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFlagPos(String flagName) { int i, flagLength, pos; flagLength = flagNames.length; i = 0; pos = -1; while (i < flagLength) { if (flagNames[i].equals(flagName)) { pos = i; i = flagLength; } else i++; } return pos; } COM: <s> returns the position of the flag </s>
funcom_train/33265036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParent(TreeNode parent) { synchronized(getTreeLock()) { if (parent != this.parent) { this.parent = parent; if (parent == null) { root = this; } else { root = (FolderItem)((TreeFolder)parent).getRoot(); } } } } COM: <s> sets the parent of the item </s>
funcom_train/17459248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Friendship addFriend(WebContext ctx, UserAccount friend) { if ((friend == null) || friend.getId().equals(getId())) { return null; } Friendship friendship = getFriend(friend.getId()); if (friendship == null) { friendship = Friendship.createFriendShip(ctx, this, friend, "Friend"); refreshFriends(); friend.refreshFriends(); } return friendship; } COM: <s> adds a friend </s>
funcom_train/11071258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStoreWithCrLf() throws Exception { File testFile = new File(ROOT_DIR, TEST_FILENAME); assertTrue(client.storeFile(TEST_FILENAME, new ByteArrayInputStream( testDataCrLf))); assertTrue(testFile.exists()); TestUtil.assertFileEqual(testData, testFile); } COM: <s> we should always store files with the local line endings ftpserver 184 </s>
funcom_train/17017384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean mkdirs(Pathname path) throws ThriftIOException { try { now = now(); HadoopThriftHandler.LOG.debug("mkdirs: " + path); boolean ret = fs.mkdirs(new Path(path.pathname)); HadoopThriftHandler.LOG.debug("mkdirs: " + path); return ret; } catch (IOException e) { throw new ThriftIOException(e.getMessage()); } } COM: <s> create a directory </s>
funcom_train/34564310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete(final ViewPanel panel) { for(int o = 0; o < comp.length; o++) { if(comp[o].delete(panel)) { if(comp[o] instanceof ViewPanel) { remove(o--); } else { comp[o] = ((ViewAlignment) comp[o]).comp[0]; } } } return comp.length < 2; } COM: <s> deletes the specified panel </s>
funcom_train/5264999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calcNetworkKey() { // byte[] b = accessCfg.getPropertyBytes("network.publicKey", null); byte[] b = accessCfg.getPropertyBytes("network.signature", null); MessageDigest md = CryptoUtils.getMessageDigest(); md.update("secretKey".getBytes()); // make sure the key differs from // other hashes created from the publicKey networkKey = md.digest(b); } COM: <s> calculate the network key used for encryption </s>
funcom_train/3831804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GM_Object getGeometryLiteral() throws FilterEvaluationException { if ( geometryLiteral == null ) { try { geometryLiteral = GMLAdapter.wrap( gmlGeometry ); } catch ( GM_Exception e ) { throw new FilterEvaluationException( "Construction of GM_Object from " + "SpatialOperation literal failed: '" + e.getMessage() + "'!" ); } } return geometryLiteral; } COM: <s> returns the geometry literal used in the operation </s>
funcom_train/17905331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPaneWidth(int position) { switch (position) { case SwingConstants.WEST: if (westContainer != null) { return westContainer.getPaneWidth(); } case SwingConstants.CENTER: if (centerContainer != null) { return centerContainer.getPaneWidth(); } case SwingConstants.EAST: if (eastContainer != null) { return eastContainer.getPaneWidth(); } } return -1; } COM: <s> returns the width of the specified pane </s>
funcom_train/44551607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scheduleRegularGC(long intervalMilliSecs) { if (!done){ if (intervalMilliSecs > 0) { Task task = getInstance(); java.util.Timer scheduler = new java.util.Timer(); scheduler.scheduleAtFixedRate(task, 10, intervalMilliSecs); } done = true; } } COM: <s> tries to reclaim memory every x milliseconds </s>
funcom_train/44713183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSubtree(Tree subtree, Object edge) { Assert.assertNotNull(subtree, "subtree"); Assert.assertTrue(subtree.getParent() == null, "parent must be null"); subtree.m_parent = this; m_children.add(new EdgeTreePair(edge, subtree)); } COM: <s> adds code subtree code to the root node of this tree </s>
funcom_train/28297673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getMessagePart(int index,String msg) { if (msg!=null) { StringTokenizer st=new StringTokenizer(msg,TransBaseSettings.separate); int i=0; while (st.hasMoreTokens()) { String part=st.nextToken(); if (i==index) return part; i++; } } return null; } COM: <s> returns the given part of the message </s>
funcom_train/12119343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC78(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end this.formularioJToolBarButton_ActionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c78 formulario jtool bar button </s>
funcom_train/3712532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeListeners() { if (cursor_on) { WCSCursor.getInstance().deleteObserver(cursor_text); } if (sunits != null) { sunits.cleanInternalReferences(); sunits.dispose(); sunits = null; } if (uw != null) { uw.dispose(); } } COM: <s> remove dependencies with the cursor </s>
funcom_train/13199592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restore(Resource resource) throws TuboResourceException { try { getPool().returnObject(resource); } catch (Exception e) { log.fatal(".restore() - Error returning resource.",e); TuboResourceException ex = new TuboResourceException("Error returning resource",e); throw ex; } } COM: <s> restore resource to pool </s>
funcom_train/9086743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Equipments entity) { EntityManagerHelper.log("saving Equipments instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved equipments entity </s>
funcom_train/50142282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getOutput(String objRef, String message){ String out = "if (!"+getValidation(objRef)+"){\n"; out+="\t\talert(\""+message+"\");\n"; out+="\t\t"+objRef+".focus();\n"; out+="\t\treturn false;\n"; out+="\t}else\n\t\treturn true;\n\n"; return out; } COM: <s> returns a java script validator function as string </s>
funcom_train/29928357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream output) { Image i = generateImage(); try { int pixels[][] = TestQuantize.getPixels(i); // quant int palette[] = Quantize.quantizeImage(pixels, 256); GIFEncoder enc = new GIFEncoder(createImage(TestQuantize.makeImage(palette, pixels))); enc.Write(output); } catch (Exception e) { LogBuffer.println("In GifExportPanel.DendroGifWriter() got exception " + e); } } COM: <s> write a gif image corresponding to the colorbar export panel preview </s>
funcom_train/19743466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Colorization getColorization () { // if (_zation == null) { // _zation = new Colorization(getColorPrint(), cclass.source, // cclass.range, offsets); // } // return _zation; return new Colorization(getColorPrint(), cclass.source, cclass.range, offsets); } COM: <s> returns the data in this record configured as a colorization instance </s>
funcom_train/39973848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix4x4 multiplySelf(double factor) { for (int i = 0; i < 4; i++) { double[] m = matrix[i]; m[0] *= factor; m[1] *= factor; m[2] *= factor; m[3] *= factor; } return this; } COM: <s> in place matrix scalar multiplication </s>
funcom_train/22143055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPassword(String password) { if (password == null) password = ""; try { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(password.getBytes()); byte[] md5 = md.digest(); this.password = hexadecimalConversionMD5(md5); } catch (NoSuchAlgorithmException e) { throw new UnsupportedOperationException(e); } } COM: <s> sets a new password string which becomes an md5 encoded </s>
funcom_train/45741136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Spacer getSpacer () { if (spacer == null) {//GEN-END:|67-getter|0|67-preInit // write pre-init user code here spacer = new Spacer (16, 20);//GEN-BEGIN:|67-getter|1|67-postInit spacer.setPreferredSize (-1, 22);//GEN-END:|67-getter|1|67-postInit // write post-init user code here }//GEN-BEGIN:|67-getter|2| return spacer; } COM: <s> returns an initiliazed instance of spacer component </s>
funcom_train/14275726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shoot(int coordX, int coordY){ //If no target is defined in the template, then [0,0] is the target this.shotX = coordX; this.shotY = coordY; for (int i=0; i < this.dimX; i++) for (int j=0; j < this.dimX; j++) if (get(i,j)==TARGET) { this.shotX = coordX + i; this.shotY = coordY + j; } } COM: <s> the place in the map where the first target is shot </s>
funcom_train/28775962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LuaString getlocalname(int number, int pc) { int i; for (i = 0; i<locvars.length && locvars[i].startpc <= pc; i++) { if (pc < locvars[i].endpc) { /* is variable active? */ number--; if (number == 0) return locvars[i].varname; } } return null; /* not found */ } COM: <s> get the name of a local variable </s>
funcom_train/5905455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private EventQueue lookup0(String name, Scope ctxscope, boolean autoCreate) { Map eqs; synchronized (ctxscope) { eqs = (Map)ctxscope.getAttribute(ATTR_EVENT_QUEUES); if (eqs == null) ctxscope.setAttribute(ATTR_EVENT_QUEUES, eqs = new HashMap(4)); } EventQueue eq; synchronized (eqs) { eq = (EventQueue)eqs.get(name); if (autoCreate && eq == null) eqs.put(name, eq = new ServerPushEventQueue()); } return eq; } COM: <s> looks up a session or application scoped event queue </s>
funcom_train/2801164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setType(String pFieldType) { if ((pFieldType != null) && (pFieldType.length() != 0)) { if (pFieldType.startsWith(JAVA_DOT_LANG_DOT)) { pFieldType = pFieldType.substring(JAVA_DOT_LANG_DOT.length()); } mFieldType = pFieldType; } } COM: <s> defines the fully qualified type of this field </s>
funcom_train/11657715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Digester getDigester() { if (digester == null) { digester = new Digester(); RuleSet ruleSet = getRuleSet(); digester.setNamespaceAware(ruleSet.getNamespaceURI() != null); digester.setUseContextClassLoader(getUseContextClassLoader()); digester.setValidating(false); digester.addRuleSet(ruleSet); } return (digester); } COM: <s> p return the code digester code instance to be used for </s>
funcom_train/43431954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean cycleOrientation(orientationCycleTypes cycleType) { boolean cycled = false; String newOrientation = ""; if (cycleType == orientationCycleTypes.ROTATE) { newOrientation = orientation.getNextRotateOrientation(); } else if (cycleType == orientationCycleTypes.MIRROR) { newOrientation = orientation.getNextMirrorOrientation(); } if (changeOrientation(newOrientation)) cycled = true; return cycled; } COM: <s> cycles rotates or mirrors the components orientation according to its possible orientations </s>
funcom_train/37741742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueComplete() throws SAXException { if (componentsReady()) { if (targets != null) { Enumeration e = targets.elements(); while (e.hasMoreElements()) { Target target = (Target)e.nextElement(); target.set(value); } // Don't need targets any more, so clear them removeValueTargets(); } } } COM: <s> the value complete method is invoked when the </s>
funcom_train/2326283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FloatMatrix1D make(cern.colt.list.tfloat.AbstractFloatList values) { int size = values.size(); FloatMatrix1D vector = make(size); for (int i = size; --i >= 0;) vector.set(i, values.get(i)); return vector; } COM: <s> constructs a matrix from the values of the given list </s>
funcom_train/45382668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxtExportDir() { if (txtExportDir == null) { txtExportDir = new JTextField(); txtExportDir.setPreferredSize(new Dimension(300, 25)); txtExportDir.setName("exportDir"); if (null != lastDir){ try { txtExportDir.setText(lastDir.getCanonicalPath()); } catch (IOException e) { //Just ignore. } } } return txtExportDir; } COM: <s> this method initializes txt export dir </s>
funcom_train/20828331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Style addNewStyle(String name, Color c, boolean bold, boolean italic) { Style newStyle = addStyle(name, getStyle(DEFAULT_STYLE)); StyleConstants.setForeground(newStyle, c); StyleConstants.setBold(newStyle, bold); StyleConstants.setItalic(newStyle, italic); return newStyle; } COM: <s> method add new style </s>
funcom_train/37087635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int disFromPtToLine(int xp,int yp,int x1,int y1,int x2,int y2) { // iont or float it? int dis = (int) (((x2-x1)*(y1-yp) - (x1-xp)*(y2-y1)) / lineLength(x1,y1,x2,y2)); return Math.abs(dis); } COM: <s> better than circle line intersect is distance from line to point and then </s>
funcom_train/4780488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (contentPane == null) { contentPane = new JPanel(new BorderLayout()); contentPane.add(getToolbarPanel(), BorderLayout.NORTH); contentPane.add(getMainTabbedPane(), BorderLayout.CENTER); contentPane.add(getStatusPanel(), BorderLayout.SOUTH); } return contentPane; } COM: <s> this method initializes content pane </s>
funcom_train/9809633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getMediaNanoseconds() { if (getState() == STOPPED) { return mediaTime; } long now = master.getNanoseconds(); if (now > startTime) { // The media has been playing for a while. long t = (long)((double)(now - startTime) * rate) + mediaTime; return validateTime(t); } else { // We haven't reached the scheduled start time yet. return mediaTime; } } COM: <s> get the current media time in nanoseconds </s>
funcom_train/17675263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List values() { ArrayList a = new ArrayList(set.size()); for (Iterator i = set.iterator(); i.hasNext(); ) { WeakReference r = (WeakReference)i.next(); Object o = r.get(); if (o != null) a.add(o); } return a; } COM: <s> get all the objects still in the bag </s>
funcom_train/16147353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addField(String fieldname,String titel,int typ){ column++; dbf = new DataBaseField(); dbf.setFieldName(fieldname); dbf.setFieldTitle(titel); dbf.setFieldType(typ); dbf.setColumnnumber(column); fieldNames.put(fieldname,dbf); fieldSort.put(dbf,fieldname); } COM: <s> adds a field definition manually br </s>
funcom_train/20044282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _hasFrozenPanes() { requiredMethod("freezeAtPosition()"); boolean result = oObj.hasFrozenPanes(); oObj.freezeAtPosition(0,0); result &= !oObj.hasFrozenPanes(); tRes.tested("hasFrozenPanes()", result); } COM: <s> test calls the method checks returned value unfreezes panes calls the </s>
funcom_train/19387918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRow(int row) { try { m_currentNode.removeAttributeAt(row); updateTable(m_currentNode); fireTableChanged(new TableModelEvent(this, row)); } catch (DOMException e) { JOptionPane.showMessageDialog(m_view, e, "XML Error", JOptionPane.WARNING_MESSAGE); } }//}}} //{{{ setAdapterNode() COM: <s> removes a row from the table and removes the attribute </s>
funcom_train/10520351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isIncluded(String name) { for (int i = 0; i < includes.length; i++) { if (matchPath(includes[i].getPattern(), includes[i].getSelectorList(), name, isCaseSensitive)) { return true; } } return false; } COM: <s> tests whether a name matches against at least one include pattern </s>
funcom_train/7465929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "ReplicationManagerStats:" + "\n st_perm_failed=" + st_perm_failed + "\n st_msgs_queued=" + st_msgs_queued + "\n st_msgs_dropped=" + st_msgs_dropped + "\n st_connection_drop=" + st_connection_drop + "\n st_connect_fail=" + st_connect_fail ; } COM: <s> for convenience the replication manager stats class has a to string method </s>
funcom_train/27843848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disposeView() { if (_view == null) { throw new IllegalStateException("No View to hide."); } ViewSupport viewSupport = ViewSupport.getViewSupport(); try { viewSupport.disposeView(_view); } catch (ViewException e) { // Log unchecked exceptions even if app code ignores LOG.error("Failed to hideView: " + _view, e); } } COM: <s> dispose of the view bound to this controller </s>
funcom_train/20518405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private VirtualMachine getVMInfo(String name) { try { List params = new ArrayList(); params.add(name); MethodInvoker mi = new MethodInvoker("DatabaseManagerAgent", "findVM", true, params); return (VirtualMachine) this.mc.invoke(mi); } catch (CleverException e) { logger.error("Error getting VM from name : " + e.getMessage()); return null; } } COM: <s> this method will query the database manager and return a virtual machines data </s>
funcom_train/9918578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTexParameter(String param, GLTexture tex) { int id = tex.getTextureID(); CGparameter p = CgGL.cgGetNamedEffectParameter(effect, param); if( p != null ) CgGL.cgGLSetTextureParameter(p, id); else System.err.println( "GLCgFXEffect: Cant find texture parameter" ); CgGL.cgSetSamplerState(p); } COM: <s> set the given texture for the parameter param </s>
funcom_train/15494538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isDeployed(String context) throws Exception { String[] params = { context }; String[] signature = { "java.lang.String" }; Boolean result = (Boolean) mBeanServer.invoke(oName, "isDeployed", params, signature); return result.booleanValue(); } COM: <s> this method check if the specified object is deployed </s>
funcom_train/46055827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void skipOld() { printstatus = idle; for (; ;) { if (++printoldline > oldInfo.maxLine) break; /* end of file */ if (oldInfo.other[printoldline] < 0) break; /* end of block */ if (blocklen[printoldline] != 0) break; /* start of another */ } } COM: <s> skipold part of printout </s>
funcom_train/22279089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encode(Encoder encoder) throws CodingException { encoder.encodeInt(ROWCOUNT_KEY, rowCount); encoder.encodeInt(COLUMNCOUNT_KEY, columnCount); encoder.encodeInt(HORIZGAP_KEY, horizGap); encoder.encodeInt(VERTGAP_KEY, vertGap); encoder.encodeInt(FLOWDIRECTION_KEY, flowDirection); } COM: <s> decodes the grid layout </s>
funcom_train/34282904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) { updateChildren(changes, a); Rectangle alloc = ((a != null) && isAllocationValid()) ? getInsideAllocation(a) : null; int pos = changes.getOffset(); View v = getViewAtPosition(pos, alloc); if (v != null) v.removeUpdate(changes, alloc, f); } COM: <s> gives notification that something was removed from the </s>
funcom_train/8323187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addAsOldestSibling(List<RolapMember> list, RolapMember member) { int i = list.size(); while (--i >= 0) { RolapMember sibling = list.get(i); if (sibling.getParentMember() != member.getParentMember()) { break; } } list.add(i + 1, member); } COM: <s> adds code member code just before the first element in </s>
funcom_train/37520493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException { g.setColor(selected); Document doc = getDocument(); Segment s = SegmentCache.getSharedSegment(); doc.getText(p0, p1 - p0, s); int ret = Utilities.drawTabbedText(s, x, y, g, this, p0); SegmentCache.releaseSharedSegment(s); return ret; } COM: <s> renders the given range in the model as selected text </s>
funcom_train/20631643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAssignmentItems(AssignmentItemImpl[] items) { if (!fEditable) { return; } itemList.clear(); deletedItemList.clear(); if (items != null) { for (int i = 0; i < items.length; i++) { AssignmentItemImpl assignmentItem = items[i]; itemList.add(assignmentItem); } } fireTableDataChanged(); } COM: <s> this is called the set the current asignment items in an assignment </s>
funcom_train/11005804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addFont(PPFont font) { FontCollection fonts = getDocumentRecord().getEnvironment().getFontCollection(); int idx = fonts.getFontIndex(font.getFontName()); if (idx == -1) { idx = fonts.addFont(font.getFontName(), font.getCharSet(), font.getFontFlags(), font .getFontType(), font.getPitchAndFamily()); } return idx; } COM: <s> add a font in this presentation </s>
funcom_train/624593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExcludes() { Collection intCol = new Vector(); for (int i = 1; i <= 50; i++) { intCol.add(new IntegerInstance(i * 2 - 1)); } OclCollection c = new CollectionInstance(Type.AnInteger, intCol); OclBoolean result = c.excludes(new IntegerInstance(40)); assertTrue(result.equals(BooleanInstance.TRUE)); result = c.excludes(new IntegerInstance(5)); assertTrue(result.equals(BooleanInstance.FALSE)); } COM: <s> tests the ocl excludes operation on collections </s>
funcom_train/4363029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWrapperListener(String listener) { synchronized (wrapperListenersLock) { String results[] =new String[wrapperListeners.length + 1]; for (int i = 0; i < wrapperListeners.length; i++) results[i] = wrapperListeners[i]; results[wrapperListeners.length] = listener; wrapperListeners = results; } fireContainerEvent("addWrapperListener", listener); } COM: <s> add the classname of a container listener to be added to each </s>
funcom_train/4362071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ResourceEntry findResourceInternal(File file, String path){ ResourceEntry entry = new ResourceEntry(); try { entry.source = getURI(new File(file, path)); entry.codeBase = getURL(new File(file, path), false); } catch (MalformedURLException e) { return null; } return entry; } COM: <s> find specified resource in local repositories </s>
funcom_train/10947863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List directoriesOnly(Collection results) { List list = new ArrayList(results.size()); for (Iterator it = results.iterator(); it.hasNext(); ) { File file = (File) it.next(); if (file.isDirectory()) { list.add(file); } } return list; } COM: <s> extract the directories </s>
funcom_train/44181381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeNonHeritable(String key) { HashSet heritableKeys = (HashSet)data.get(A_HERITABLE_KEYS); if(heritableKeys == null) { return; } heritableKeys.remove(key); if(heritableKeys.size()==1) { // only remaining heritable key is itself; disable completely data.remove(A_HERITABLE_KEYS); } } COM: <s> make the given key non heritable meaning its value will </s>
funcom_train/28170740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMask() { System.out.println("getMask"); BezierPath.Node instance = new BezierPath.Node(); int expResult = 0; int result = instance.getMask(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get mask method of class org </s>
funcom_train/14500810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BERTLVObject getSubObject(int tag) { if (this.tag == tag) { return this; } else if (value instanceof BERTLVObject[]) { BERTLVObject[] children = (BERTLVObject[])value; for (int i = 0; i < children.length; i++) { BERTLVObject child = children[i]; BERTLVObject candidate = child.getSubObject(tag); if (candidate != null) { return candidate; } } } return null; } COM: <s> gets the first sub object including this object whose tag equals </s>
funcom_train/31635994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isStatic (String line) { boolean result = false; String trimLine = line.trim(); StringTokenizer st = new StringTokenizer(trimLine, " \t"); String token = st.nextToken(); while (token != null && st.hasMoreTokens()) { if (token.toLowerCase().equals("static")) { result = true; } token = st.nextToken(); } return result; } COM: <s> determines if the variable method is static </s>