__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/35678127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String extractNamespace() { try { Class < ? > packageInfoClass = ClassUtil .loadClass(getJaxbPackageName() + ".package-info"); XmlSchema xmlSchema = packageInfoClass .getAnnotation(XmlSchema.class); return xmlSchema.namespace(); } catch (ClassNotFoundException e) { return null; } } COM: <s> extract the xml schema namespace associated with the jaxb package </s>
funcom_train/8166261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String reconstructText(String[] textElements, int startIndex, String separator){ String reconstructedText = EMPTY_STRING; for (int textElementIndex = startIndex; textElementIndex < textElements.length; textElementIndex++){ if (textElementIndex > startIndex){ reconstructedText += separator; } reconstructedText += safeGetStr(textElements, textElementIndex); } return reconstructedText; } COM: <s> method to reconstruct text that has been split up using split </s>
funcom_train/19388109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AdapterNode getAdapterNode() { try { checkWellFormedness(); } catch (SAXParseException e) { } catch (SAXException e) { } catch (ParserConfigurationException e) { } catch (IOException e) {} return m_adapterNode; }//}}} //{{{ newAdapterNode() COM: <s> returns the adapter node object for the root of the xml document </s>
funcom_train/806821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(EventObject e) { try { // logger.debug("State Change: " + ac.toString()); } catch (Exception ex) { StringWriter strWr = new StringWriter(); PrintWriter prWr = new PrintWriter(strWr); ex.printStackTrace(prWr); logger.debug(strWr.toString()); } fireChange(e.getSource()); isModified = true; } COM: <s> method to notify this cdkchange listener if something has changed in another </s>
funcom_train/21612707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getContextSequencesLongDescription() { StringBuilder sb = new StringBuilder(); for( Map.Entry<String,Overload> entry : sequenceMap.entrySet() ) { for( Invocable invocable : entry.getValue().getInvocables() ) { fillSequenceDescription(sb, entry.getKey(), invocable ); } } return sb.toString(); } COM: <s> returns a string listing the invocable objects in </s>
funcom_train/2911732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public KeyPair generateKeys() { KeyPairGenerator keyGen; KeyPair pair = null; try { keyGen = KeyPairGenerator.getInstance("DSA", "SUN"); SecureRandom random = SecureRandom.getInstance("SHA1PRNG", "SUN"); keyGen.initialize(1024, random); pair = keyGen.generateKeyPair(); } catch (Exception e) { e.printStackTrace(); } return pair; } COM: <s> generates key pair both private and public </s>
funcom_train/45051573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tag getLastTag(PageContext pc,Tag tag) { // Get the stack Stack stack = getTagsStack(pc.getRequest()); // Get the position of the tag int i = this.getTagPosition(pc,tag); // Return null if there is no last tag if (i - 1 < 0) { return null; } return (Tag) stack.get(i - 1); } COM: <s> gets the tag on top of the stack </s>
funcom_train/14226082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAddress(Address address) { setAddressId(address.getId()); setStreet1(address.getStreet1()); setStreet2(address.getStreet2()); setState(address.getState()); setCity(address.getCity()); setPostalCode(address.getPostalCode()); setContactType(address.getContactType()); } COM: <s> stores data from an address into this object </s>
funcom_train/33610667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFunction(UnivariateRealFunction f) { if (f != null && f != func) { if (this.func instanceof ChangeBroadcaster) ((ChangeBroadcaster)this.func).removeChangeListener(this); this.func = f; if (f instanceof ChangeBroadcaster) ((ChangeBroadcaster)f).addChangeListener(this); firePlottableChanged(); } } COM: <s> set function used to generate the graph </s>
funcom_train/10687585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void seek(long pos) throws IOException { if (pos < 0) { // seek position is negative throw new IOException(Messages.getString("luni.BB")); //$NON-NLS-1$ } openCheck(); synchronized (repositionLock) { fileSystem.seek(fd.descriptor, pos, IFileSystem.SEEK_SET); } } COM: <s> moves this files file pointer to a new position from where following </s>
funcom_train/13259428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRegionCustomerConstraint(Object regionKey, Integer maxJobs) { if (!blockingRegionsKeyset.contains(regionKey)) { return; } if (!((BlockingRegionData) blockingDataHM.get(regionKey)).maxJobs.equals(maxJobs)) { save = true; } ((BlockingRegionData) blockingDataHM.get(regionKey)).maxJobs = maxJobs; } COM: <s> sets a global customer number constraint for a given region </s>
funcom_train/50916952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CMLAtom getMappedAtom(CMLMap map, CMLAtom atom0, Direction toFrom) { CMLAtom targetAtom = null; String targetId = (atom0 == null || map == null) ? null : map.getRef( atom0.getId(), toFrom); if (targetId != null) { targetAtom = this.getAtomById(targetId); } return targetAtom; } COM: <s> get matched atom </s>
funcom_train/14461188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNewName(String oldname, String newname) { if(oldname.equals(newname))return; // same name Object old = nameshash.get(oldname); if(old == null)return; // new name? nameshash.remove(oldname); nameshash.put(newname,old); } COM: <s> rename the named range in the lookup map </s>
funcom_train/38388605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isSeqSeq(PyObject object) { if (isSeq(object) && (object.__len__() > 0)) { for (int i = 0; i < object.__len__(); i++) { if (!isSeq(object.__finditem__(i))) { return false; } } return true; } return false; } COM: <s> method is seq seq </s>
funcom_train/28464346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendErrorEvent(int type, Exception e) { ErrorEvent event = new ErrorEvent(prov, type); event.setException(e); Iterator i = listeners.iterator(); while (i.hasNext()) { CopyTableListener listener = (CopyTableListener)i.next(); listener.handleError(event); } } COM: <s> send an error event message to all copy table listeners </s>
funcom_train/44019242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getEditFindNextMenuItem() { if (editFindNextMenuItem == null) { editFindNextMenuItem = new JMenuItem(); editFindNextMenuItem.setText("Find Next"); editFindNextMenuItem.setMnemonic('N'); editFindNextMenuItem.setDisplayedMnemonicIndex(5); editFindNextMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_G, MENU_SHORTCUT_KEY_MASK)); editFindNextMenuItem.addActionListener(eventHandler); } return editFindNextMenuItem; } COM: <s> return the edit find next menu item </s>
funcom_train/48749582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("WeatherPort".equals(portName)) { setWeatherPortEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/5339722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if( variantName != null && !variantName.toLowerCase().equals("international") && !variantName.equals("") ) return display + ", " + variantName + " (" + countryName + ")"; else return display + " (" + countryName + ")"; } COM: <s> returns a description of this language </s>
funcom_train/44829065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getToken(Enumeration enum) throws IOException { while (true) { if ((_tokenizer == null) || (!_tokenizer.hasMoreTokens())) { if (!enum.hasMoreElements()) { throw new IOException(); } String line = (String) enum.nextElement(); _tokenizer = new StringTokenizer(line); } if (_tokenizer.hasMoreTokens()) { return _tokenizer.nextToken(); } } } COM: <s> get the next token which might require reading a new line </s>
funcom_train/48422946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dictionary getTerm(int websiteId, String term) { Dictionary param = new Dictionary(); param.setWebsiteId(websiteId); param.setTerm(term); SqlSession session = sqlSessionFactory.openSession(); try { DictionaryMapper mapper = session.getMapper(DictionaryMapper.class); Dictionary dictTerm = mapper.selectTerm(param); return dictTerm; } finally { session.close(); } } COM: <s> gets the dictionary term </s>
funcom_train/101296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAbsolutelyDated() { ITridasSeries series = getSeries(); // no interpretation or no dating -> Relative dating if(!series.isSetInterpretation() || !series.getInterpretation().isSetDating()) return false; switch(series.getInterpretation().getDating().getType()) { case ABSOLUTE: case DATED___WITH___UNCERTAINTY: case RADIOCARBON: return true; case RELATIVE: return false; default: new Bug(new IllegalArgumentException("Dating type " + series.getInterpretation().getDating() + " not supported")); return false; } } COM: <s> return true if the sample is absolutely dated else false </s>
funcom_train/3701556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPath(String path) { if (pathSet) throw new UnsupportedOperationException("EntityTypePath already initialized"); pathString = path; if (path != null) { StringTokenizer st = new StringTokenizer(path,DELIMITER); while(st.hasMoreTokens()) { typePath.add(st.nextToken()); } } pathSet = true; } COM: <s> method to specify path as a </s>
funcom_train/35157573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tick() { // Map a pixel to a row and column in the texture. // Copy the pixel from the texture to the frame buffer. int tmp; int index = frame.pixels.length; while (index > 0) { int x = columns[--index]; int y = rows[index]; frame.pixels[index] = texture.pixels[y * texture.width + x]; } } COM: <s> generate the next frame </s>
funcom_train/32056228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Transferable createTransferable( JComponent comp ) { System.out.println( "create transferable" ); source = (JList)comp; index = source.getSelectedIndex(); GPDocument doc = (GPDocument)source.getSelectedValue(); GPDocTransferable tr = new GPDocTransferable( doc.getGraph().getArchiveableState() ); return tr; } COM: <s> create a transferable for the component to be tranfered </s>
funcom_train/20211133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSchedule(Schedule schedule) { if (!(schedule instanceof Schedule)) { throw new ClassCastException( "ContinuumDatabase.removeSchedules(schedule) parameter must be instanceof " + Schedule.class.getName()); } getSchedules().remove(schedule); } // -- void removeSchedule(Schedule) COM: <s> method remove schedule </s>
funcom_train/13551790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void cycleIsCAccess() { // section 3.7.2. VC and RC // "3. If there is a Bad line condiction in cycles 12-54, BA is set low // and the c-acesses are started..." if (badLine) { // bad line condiction? setBA(0); // BA is now low } } COM: <s> cycle code for bad line </s>
funcom_train/4300871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(32 + elementCount * 3); sb.append("List : size="); sb.append(elementCount); sb.append(' '); sb.append('{'); Iterator it = iterator(); while (it.hasNext()) { sb.append(it.next()); if (it.hasNext()) { sb.append(','); sb.append(' '); } } sb.append('}'); return sb.toString(); } COM: <s> returns a string representation </s>
funcom_train/11014376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateFormulasAfterCellShift(FormulaShifter shifter, int externSheetIndex) { getRowsAggregate().updateFormulasAfterRowShift(shifter, externSheetIndex); if (condFormatting != null) { getConditionalFormattingTable().updateFormulasAfterCellShift(shifter, externSheetIndex); } // TODO - adjust data validations } COM: <s> updates formulas in cells and conditional formats due to moving of cells </s>
funcom_train/7275913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MetaWriter getAudioEditorForFile(String name) { if (LimeXMLUtils.isMP3File(name)) return new MP3DataEditor(); if (LimeXMLUtils.isOGGFile(name)) return new OGGDataEditor(); if (LimeXMLUtils.isM4AFile(name)) return new M4ADataEditor(); if (LimeXMLUtils.isFLACFile(name)) return new FlacDataEditor(); return null; } COM: <s> returns the audio editor for the file if an editor exists </s>
funcom_train/3907832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeIndexElement(LD_Component component) { Element elIndex = getElement().getChild(LD_Core.INDEX, getElement().getNamespace()); removeRef(component, elIndex, LD_Core.INDEX_ELEMENT, LD_Core.INDEX); } COM: <s> remove an index element as a component </s>
funcom_train/3516379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createRPDirectoryStructure(String rpName) throws IOException { File rpsDir = Resources.getRemoteParticipantsDir(projectName); File rpBaseDir = getRPBaseDir(rpName, rpsDir.getAbsolutePath()); if (!rpBaseDir.exists()) { rpBaseDir.mkdirs(); } } COM: <s> creates the directory structure for the specified remote participant </s>
funcom_train/6347783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawLine(int x1, int y1, int x2, int y2) { java.awt.Graphics graphics = screen.getGraphics(); graphics.drawLine(x1, y1, x2, y2); } // drawLine(int x1, int y1, int x2, int y2) COM: <s> draws a line </s>
funcom_train/2561854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOriginalReferenceTextPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Publication_OriginalReferenceText_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Publication_OriginalReferenceText_feature", "_UI_Publication_type"), PublicationsPackage.Literals.PUBLICATION__ORIGINAL_REFERENCE_TEXT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the original reference text feature </s>
funcom_train/35743874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServiceMonitorFilter addServiceMonitorFilter(ServiceMonitorFilter serviceMonitorFilter) throws MonitorFilterException { ModuleClassID moduleClassID = serviceMonitorFilter.getModuleClassID(); if (serviceMonitorFilters.get(moduleClassID) != null) { throw new MonitorFilterException("Attempt to add a second Monitor Filter for: " + moduleClassID); } serviceMonitorFilters.put(moduleClassID, serviceMonitorFilter); return serviceMonitorFilter; } COM: <s> add a service monitor filter to this monitor filter </s>
funcom_train/17193455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanelBarra() { if (panelBarra == null) { barraProgreso = new JLabel(); barraProgreso.setBounds(new java.awt.Rectangle(0,0,124,24)); barraProgreso.setText(""); barraProgreso.setIcon(new ImageIcon("./data/progressBar.gif")); panelBarra = new JPanel(); panelBarra.setLayout(null); panelBarra.setBounds(new java.awt.Rectangle(180,210,123,24)); panelBarra.add(barraProgreso, null); } return panelBarra; } COM: <s> this method initializes panel barra </s>
funcom_train/50884841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rewind() { while(!list.isFirst()) list.priorPanel(true); IWizardPanel wp = list.currentPanel(); if(wp != null) { CardLayout cl = (CardLayout)cardPanel.getLayout(); cl.show(cardPanel, wp.getTitle()); wp.willEnter(); updateState(true); } } COM: <s> moves to the first panel </s>
funcom_train/41163266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoMatrixExr2User entity) { EntityManagerHelper.log("saving CoMatrixExr2User 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 matrix exr2 user entity </s>
funcom_train/4207516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AudioClip loadClipForURL(String clipOfURL) { final URL url = SoundsRes.getURL(clipOfURL); AudioClip clip = null; try { clip = Applet.newAudioClip(url); } catch (Exception e) { Log.error("Unable to load sound url: " + url + "\n\t: " + e); } return clip; } COM: <s> creates an audio clip from a url </s>
funcom_train/50395997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String waitUntilDone(int timeout) throws Exception{ StatusType.Enum status=StatusType.UNDEFINED; long start=System.currentTimeMillis(); long elapsed=0; while(true){ if(timeout>0 && elapsed>timeout)break; elapsed=System.currentTimeMillis()-start; status=getStatus(); if(status.equals(StatusType.SUCCESSFUL)) break; else if(status.equals(StatusType.FAILED)){ throw new Exception("Job failed"+(statusDescription!=null?". The error was: "+statusDescription:"")); } Thread.sleep(500); } return status.toString(); } COM: <s> convenience method that waits until a job has finished </s>
funcom_train/28108362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParameterLabel(int index) { if (index < 0 || index >= getParameterCount()) { throw new IndexOutOfBoundsException("valid parameter range is 0.." + Integer.toString(getParameterCount() - 1)); } return parameterDescriptors[index].getNaturalName(); } COM: <s> returns the label for the given parameterindex </s>
funcom_train/14307058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unregisterFiles(VPTDirectory dir, VPTProject proj) { Enumeration e = dir.children(); while (e.hasMoreElements()) { VPTNode n = (VPTNode) e.nextElement(); if (n.isDirectory()) { unregisterFiles((VPTDirectory)n, proj); } else { proj.unregisterNodePath(n); if (n.isFile()) { addRemovedFile((VPTFile)n); } } } } //}}} //{{{ addRemovedFile(VPTFile) COM: <s> recursively unregisters the files below the given directory from the </s>
funcom_train/35947593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Text toLowerCase() { if (_data == null) // Composite. return Text.newComposite(_head.toLowerCase(), _tail.toLowerCase()); Text text = Text.newPrimitive(_count); for (int i = 0; i < _count;) { text._data[i] = Character.toLowerCase(_data[i++]); } return text; } COM: <s> converts the characters of this text to lower case </s>
funcom_train/22508652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTextBox() { String currentText = this.isPassword ? this.passwordText : this.text; this.midpTextBox = new javax.microedition.lcdui.TextBox( this.title, currentText, this.maxSize, this.constraints ); //TODO add i18n support this.midpTextBox.addCommand(StyleSheet.OK_CMD); if (!this.isUneditable) { this.midpTextBox.addCommand(StyleSheet.CANCEL_CMD); } this.midpTextBox.setCommandListener( this ); } COM: <s> creates the text box used for the actual input mode </s>
funcom_train/29417053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStatusBarVisible(boolean bVisible) { try { bStatusBarVisible = setToolVisible("StatusBarVisible", "private:resource/statusbar/statusbar", bStatusBarVisible, bVisible); } catch (java.lang.InterruptedException aExc) { logger.fine("setStatusBarVisible.\n" + aExc.getStackTrace()); bMenuBarVisible = bVisible; } } COM: <s> sets the status function bar visibilty </s>
funcom_train/42718953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getIndexOfVariableName(String variableName) { for(int index=0;index<this.variableNames.size();index++) { String testVariableName=this.variableNames.get(index); if(testVariableName.equals(variableName)) return index; } return -1; } COM: <s> returns the index of variable name in this scope </s>
funcom_train/17828609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConfigurationDirectory(String name) { configDirectories.add(name); File dir = new File(name); if (dir.isDirectory()) { loadConfigDirectory(dir, false); } else { System.err.println("WARNING: Configuration directory " + dir.toString() + " does not exist or is not a directory"); } } COM: <s> adds an additional configuration directory to be processed </s>
funcom_train/14181021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tearDown() throws Exception { super.tearDown(); if (DataProvider.getInstance().getHibernateSessionFactory() != null) { DataProvider.getInstance().destroy(); } // clears the game list. List<Game> list = glist.getAll(); for (Game elem : list) { glist.remove(elem.getSession()); } } COM: <s> cleans up after a test </s>
funcom_train/38473052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildUI() { if (root.children.size() > 0) { Shell shell = Application.getDefault().getMainWindow().getShell(); Menu bar = new Menu(shell, SWT.BAR); buildMenuBar(shell, bar, root); shell.setMenuBar(bar); } } COM: <s> method build ui </s>
funcom_train/17006532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeAllComponents() { setSize(new Dimension(800, 600)); setJMenuBar(getTopMenu()); getContentPane().setLayout(new BorderLayout()); getContentPane().add(screenPanel, BorderLayout.CENTER); getContentPane().add(screenPanel.getLowerScreenPanel(), BorderLayout.SOUTH); } COM: <s> adds three components of the frame </s>
funcom_train/13593446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Node getNearestNodes(Coord coord, double dist) { Collection<Node> nodes = net.getNearestNodes(coord, dist); double minDist = Double.MAX_VALUE; Node selectedNode = null; for(Node node:nodes) { double curDist = CoordUtils.calcDistance(coord, node.getCoord()); if(curDist < minDist) { selectedNode = node; minDist = curDist; } } return selectedNode; } COM: <s> gets the nearest nodes to a coordinate in a radius of dist distance </s>
funcom_train/36982849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addPoint(double[] row, double tolerance) { if(row.length != dimensions) { System.out.println("Error: Dataset is " + dimensions + "dimensional, added data is " + row.length + " dimensional"); return false; } if (isUniquePoint(row, tolerance) == true) { dataset.add(row); return true; } return false; } COM: <s> add a new datapoint to the dataset </s>
funcom_train/11641119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T call() throws SQLException { ResultSet rs = null; T ret = null; try { rs = wrap(ps.executeQuery()); ret = rsh.handle(rs); } catch (SQLException e) { rethrow(e, sql, params); } finally { try { close(rs); } finally { close(ps); if (closeConn) { close(conn); } } } return ret; } COM: <s> the actual call to </s>
funcom_train/3369988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAccessibleName() { String name = accessibleName; if (name == null) { name = (String)getClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY); } if (name == null) { name = AbstractButton.this.getText(); } if (name == null) { name = super.getAccessibleName(); } return name; } COM: <s> returns the accessible name of this object </s>
funcom_train/13446278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getLineWidth(Element line) { int p0 = line.getStartOffset(); int p1 = line.getEndOffset(); int w; Segment s = SegmentCache.getSharedSegment(); try { line.getDocument().getText(p0, p1 - p0, s); w = Utilities.getTabbedTextWidth(s, metrics, tabBase, this, p0); } catch (BadLocationException ble) { w = 0; } SegmentCache.releaseSharedSegment(s); return w; } COM: <s> calculate the width of the line represented by </s>
funcom_train/18895635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readReallocateBlock(int blockId) throws IOException { if (reallocateBlock != null) { if (blockId == (int) reallocateBlock.getBlockId()) { return; } releaseReallocateBlock(); } reallocateBlock = findBlock(blockId); if (reallocateBlock == null) { reallocateBlock = blockFile.readBlock(objectPool, blockId); } reallocateBlockDirty = false; } COM: <s> reads the reallocate block from block file </s>
funcom_train/20843155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator containers() { int size = getInnerContainerCount(); List l = new ArrayList(size); for (Iterator it = container.iterator(); it.hasNext();) { Any anyElement = (Any) it.next(); int j = anyElement.getSchemaIdentifier(); if (j == XSD_ALLMODEL || j == XSD_CHOICEMODEL || j == XSD_SEQUENCEMODEL) { l.add(anyElement); } } return l.iterator(); } COM: <s> returns an iterator of containers inside this container </s>
funcom_train/10871004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDoc4_Query4_All_Slops_Should_match() throws Exception { for (int slop=0; slop<30; slop++) { int numResultsExpected = slop<1 ? 0 : 1; checkPhraseQuery(DOC_4, QUERY_4, slop, numResultsExpected); } } COM: <s> test doc 4 and query 4 </s>
funcom_train/47552083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ExtendedFor_c reconstruct(List varDecls, Expr expr, Stmt body) { if (! CollectionUtil.allEqual(varDecls, this.varDecls) || expr != this.expr || body != this.body) { ExtendedFor_c n = (ExtendedFor_c) copy(); n.varDecls = varDecls; n.expr = expr; n.body = body; return n; } return this; } COM: <s> reconstruct the statement </s>
funcom_train/785825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnProjection(ColumnProjection colFilter) { if ( m_colFilter != null ) { m_colFilter.removeProjectionListener(m_listener); } m_colFilter = colFilter==null ? new AcceptAllColumnProjection() : colFilter; m_colFilter.addProjectionListener(m_listener); filterColumns(); } COM: <s> sets the column projection determining which columns of the </s>
funcom_train/48266133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String encodeParameter(String parameterName) { // paramEncoder has been already instantiated? if (this.paramEncoder == null) { // use the id attribute to get the unique identifier this.paramEncoder = new ParamEncoder(this.tableModel.getId()); } return this.paramEncoder.encodeParameterName(parameterName); } COM: <s> encode a parameter name to be unique in the page using param encoder </s>
funcom_train/51301872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateLevelQuota(int removedRows) { switch (removedRows) { case 4: decreaseFourRows(removedRows); break; case 3: decreaseThreeRows(removedRows); break; case 2: decreaseTwoRows(removedRows); break; case 1: decreaseOneRows(removedRows); break; default: break; } } COM: <s> updates level quota </s>
funcom_train/41164538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CoScoreExercises1 update(CoScoreExercises1 entity) { EntityManagerHelper.log("updating CoScoreExercises1 instance", Level.INFO, null); try { CoScoreExercises1 result = getEntityManager().merge(entity); EntityManagerHelper.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { EntityManagerHelper.log("update failed", Level.SEVERE, re); throw re; } } COM: <s> persist a previously saved co score exercises1 entity and return it or a </s>
funcom_train/15552161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJCheckBoxSwitch() { if (jCheckBoxSwitch == null) { jCheckBoxSwitch = new JCheckBox(); jCheckBoxSwitch.setToolTipText("Toggle filter on/off"); jCheckBoxSwitch.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { regex.setActive(getJCheckBoxSwitch().isSelected()); } }); } return jCheckBoxSwitch; } COM: <s> this method initializes j check box switch </s>
funcom_train/28158168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadResources() throws GameException { // sprites URL bfile = getResourceURL("sprites.res"); if (bfile != null) { loadSprites(bfile); } // tilesets bfile = getResourceURL("tilesets.res"); if (bfile != null) { loadTileSets(bfile); } } COM: <s> load all resources from the batch files in the res directory </s>
funcom_train/31208245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFetchSize() throws SQLException { try { if(Trace.isDetailed()) Trace.trace(getId()); checkClosed(); int result=fetchSize; if(Trace.isDetailed()) Trace.traceResult(result); return result; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> gets the number of rows suggested to read in one step </s>
funcom_train/3814332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getProbabilityID(int nthFollower) { int nthPosition = 0; nthPosition = nthFollower * LargeNGramModel.BYTES_PER_NMAXGRAM * ((is32bits()) ? 4 : 2); setPosition(nthPosition + ((is32bits()) ? 4 : 2)); // to skip the word ID return readBytesAsInt(); } COM: <s> returns the ngram probability of the nth follower </s>
funcom_train/41325879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkRank1(Matrix C) { if (!isSquare()) throw new IndexOutOfBoundsException("!A.isSquare"); if (numRows != C.numRows()) throw new IndexOutOfBoundsException("A.numRows != C.numRows (" + numRows + " != " + C.numRows() + ")"); } COM: <s> checks that a matrix rank1 update is possible for the given matrix </s>
funcom_train/28752942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPredictyield(Long newVal) { if ((newVal != null && this.predictyield != null && (newVal.compareTo(this.predictyield) == 0)) || (newVal == null && this.predictyield == null && predictyield_is_initialized)) { return; } this.predictyield = newVal; predictyield_is_modified = true; predictyield_is_initialized = true; } COM: <s> setter method for predictyield </s>
funcom_train/19321562
/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 instanceof MBeanFeatureInfo)) { return false; } MBeanFeatureInfo tmp = (MBeanFeatureInfo) obj; EqualsBuilder builder = new EqualsBuilder(); builder.append(getName(), tmp.getName()) .append(getDescription(), tmp.getDescription()); return builder.isEquals(); } COM: <s> compare this mbean feature info to another </s>
funcom_train/15462493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleRemoteException(RemoteException e) { Client.commandLine.println("Remote exception occured with server, shutting down processing core: " + e.getMessage()); try { Client.stopProcessingCore(); } catch (Exception e1) { // Do nothing, logging off from server will most likely crash, we do not care. // The server will handle on its side. } } COM: <s> on an exception we update the gui and stop outself </s>
funcom_train/18756195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(Component c, int index) { Vector components = getAllSubComponents(); removeAll(); // Boundary Condition - insert degrading into an add if (index >= components.size()) { addComponent(c); } for (int i = 0; i < components.size(); i++) { if (i == index) { addComponent(c); } addComponent((Component)components.elementAt(i)); } } COM: <s> insert at index if index menusize append item </s>
funcom_train/19063865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEncryptStreamString() throws Exception { JSCFConnection pgpCon = null; JSCFResultSet res = null; pgpCon = JSCFDriverManager .getConnection("jscf:gpg::/usr/bin/gpg:testid:test"); JSCFStatement stmt = pgpCon.createStatement(); ByteArrayInputStream message = new ByteArrayInputStream("testmessage" .getBytes()); res = stmt.executeEncrypt(message, "testid"); assertEquals(false, res.isError()); assertEquals(0, ((GPGResultSet) res).getReturnValue()); assertEquals(true, (res.getResultStream() != null)); } COM: <s> tests if encrypt stream string works as expected </s>
funcom_train/41575398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCorrespondingLineNumber(File f, int n) { for (int i = 0, len = files.length; i < len; i++) { if (f.equals(files[i])) { return offsets[i] + n; } } throw new IllegalArgumentException("No code from " + f + " in this classfile"); } COM: <s> returns the fictitious line number corresponding to a line </s>
funcom_train/3913481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExplicitPropertyDef getExplicitPropertyDef(int uolId, String propId) throws PropertyException { //try to find find the property definition try { PropertyDefFacade pdf = new PropertyDefFacade(uolId, propId); return createExplicitPropertyDef(uolId, propId, pdf.getDto()); } catch (FinderException ex) { throw new PropertyException(ex); } } COM: <s> returns an explicit property def instance based of the passed parameters </s>
funcom_train/10516043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean startsWithLocalFileHeader() throws IOException { archive.seek(0); final byte[] start = new byte[WORD]; archive.readFully(start); for (int i = 0; i < start.length; i++) { if (start[i] != ZipOutputStream.LFH_SIG[i]) { return false; } } return true; } COM: <s> checks whether the archive starts with a lfh </s>
funcom_train/22543052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeStoreStatus(Collection<? extends Entry<KUID, Status>> status) throws IOException { writeCollectionSize(status); for (Entry<KUID, Status> e : status) { writeKUID(e.getKey()); writeByte(e.getValue().toByte()); } } COM: <s> writes the given contact to the output stream </s>
funcom_train/13630036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SDLSurface convertSurface(SDLPixelFormat fmt, long flags) throws SDLException { SDL_Surface s = SWIG_SDLVideo.SDL_ConvertSurface(swigSurface, fmt.getSwigPixelFormat(), flags); if (s == null) { throw new SDLException(SDLMain.getError()); } return new SDLSurface(s); } COM: <s> creates a new surface of the specified format and then copies and maps </s>
funcom_train/20215218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand() { if (exitCommand == null) {//GEN-END:|24-getter|0|24-preInit // write pre-init user code here exitCommand = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|24-getter|1|24-postInit // write post-init user code here }//GEN-BEGIN:|24-getter|2| return exitCommand; } COM: <s> returns an initiliazed instance of exit command component </s>
funcom_train/5374583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPath(Path path) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (path.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); //TODO - expose connect? // Gdip.GraphicsPath_AddPath(handle, path.handle, false); // currentPoint.X = path.currentPoint.X; // currentPoint.Y = path.currentPoint.Y; } COM: <s> adds to the receiver the path described by the parameter </s>
funcom_train/27927500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean removeMessage(int type) { boolean removed = false; synchronized(sendQueue) { Iterator it = sendQueue.iterator(); while (it.hasNext()) { Message m = (Message)it.next(); if (m.type == type) { it.remove(); removed = true; } } } return removed; } COM: <s> removes a particular message type from the queue </s>
funcom_train/25528244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void train(String sTrainingText) { // Update graph sgOverallGraph.setDataString(sTrainingText + (new StringBuffer().append((char)StreamTokenizer.TT_EOF)).toString()); // Reset cache clLocator.resetCache(); // Calculate delimiters getDelimiters(); } COM: <s> train the statistics of the chunker from a given text </s>
funcom_train/14180375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSpectators() { String[] specs1 = {"5", "6"}; String[] empty = new String[0]; assertTrue(compare(specs1, server.getSpectators("game1"))); assertTrue(compare(empty, server.getSpectators("game2"))); assertTrue(compare(empty, server.getSpectators("game3"))); } COM: <s> testet get spectators game id </s>
funcom_train/18345024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept( File f ) { if ( f != null ) { if ( f.isDirectory() ) return true; String name = f.getName().toLowerCase(); if (nameFilters.get(name) != null) return true; String extension = getExtension( f ); if ( extension != null && filters.get( extension ) != null ) return true; } return false; } COM: <s> return true if this file should be shown in the directory pane </s>
funcom_train/1845225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(final String title, final String name, final String defaultViewURI) { this.title = title; this.name = name; this.defaultViewURI = defaultViewURI; viewCache.clear(); final NativeDocument view = GoGoNativeDocument.newNativeDocument(); view.get(defaultViewURI, new SimpleSuccessCallback() { public void onSuccess(String result) { cacheView(defaultViewURI, view); } }); } COM: <s> updates this file with the latest changes as opposed to refreshing the </s>
funcom_train/20799001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFullRuleName(String ruleName) throws GrammarException { /* * RuleReference rname = ruleGrammar.resolve(new * RuleReference(ruleName)); return rname.getRuleName(); *//** * @todo review this implementation; our implementation of base * engines not implementation resolve method */ return ruleName; } COM: <s> gets the fully resolved rule name </s>
funcom_train/39194077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRelativePath(File imageFile) { try { if (settings.getImageDirectoryRoot().getCanonicalPath().equals(imageFile.getCanonicalPath())) return new String(); return imageFile.getCanonicalPath().substring( (int) settings.getImageDirectoryRoot().getCanonicalPath().length() + 1); } catch (IOException e) { throw new RuntimeException("Could not compute relative path for " + imageFile, e); } } COM: <s> get files path relative to the root image directory </s>
funcom_train/40670991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMethod findObjectOverride(JMethod method) { Set<JMethod> overrides = program.typeOracle.getAllRealOverrides(method); JMethod objectOverride = null; for (JMethod override : overrides) { if (override.getEnclosingType() == program.getTypeJavaLangObject()) { objectOverride = override; break; } } return objectOverride; } COM: <s> finds the object method this method overrides </s>
funcom_train/21850015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disableChildFocusCycleRoots(Container cc) { if (cc == null) return; for (int index = 0; index < cc.getComponentCount(); index++) { Component comp = cc.getComponent(index); if (comp instanceof StandardComponent || comp instanceof FormPanel) { ((Container) comp).setFocusCycleRoot(false); disableChildFocusCycleRoots((Container) comp); } else if (comp instanceof Container) { disableChildFocusCycleRoots((Container) comp); } } } COM: <s> sets the focus cycle root to false for any child forms </s>
funcom_train/41302827
/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 (!(obj instanceof Rectangle2D)) return false; Rectangle2D r = (Rectangle2D) obj; return r.getX() == getX() && r.getY() == getY() && r.getWidth() == getWidth() && r.getHeight() == getHeight(); } COM: <s> tests this rectangle for equality against the specified object </s>
funcom_train/33146071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeActions() { this.zoomInAction = new ZoomInAction(((ScalableFreeformRootEditPart) this.viewer.getViewer().getRootEditPart()).getZoomManager()); this.zoomOutAction = new ZoomOutAction(((ScalableFreeformRootEditPart) this.viewer.getViewer().getRootEditPart()).getZoomManager()); } COM: <s> creates the menu and toolbar actions </s>
funcom_train/46966604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { final StringBuffer sb = new StringBuffer(); sb.append("SimpleElement"); sb.append("{id='").append(id).append('\''); sb.append(", size=").append(size); sb.append('}'); return sb.toString(); } COM: <s> returns a string representation of this element containing the id and size </s>
funcom_train/8372108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMessage(OutgoingMessage message) { byte[] sign = null; ByteBuffer signbuf; try { synchronized(signer) { Iterator<ByteBuffer> iterator = message.getPayload().iterator(); while(iterator.hasNext()) { ByteBuffer buffer = iterator.next(); buffer.mark(); signer.update(buffer); buffer.reset(); } sign = signer.sign(); } signbuf = ByteBuffer.allocate(sign.length + 4); signbuf.putInt(sign.length); signbuf.put(sign); signbuf.flip(); message.prependContent(signbuf); pubkey.reset(); message.prependContent(pubkey); broker.sendMessage(message); } catch(SignatureException e) { assert(false); } } COM: <s> sends a signed message </s>
funcom_train/35762299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean imageUpdate(Image img, int flags, int x, int y, int width, int height) { if ((flags & (FRAMEBITS|ALLBITS)) != 0) { AnimatedIcon animIcon = ref.get(); if (animIcon != null) { animIcon.repaint(); } else original.setImageObserver(null); } // Return true if we want to keep painting return (flags & (ALLBITS|ABORT)) == 0; } COM: <s> queue repaint requests for all known painted areas </s>
funcom_train/29720672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getIsVisibleRoleInstanciationPanel() { Project project = this.projectService .getProject((String) WebSessionService .getAttribute(WebSessionService.PROJECT_ID)); Process process = this.projectService.getProcessFromProject(project); if (process != null) { this.isVisibleRoleInstanciationPanel = true; } else { this.isVisibleRoleInstanciationPanel = false; } return this.isVisibleRoleInstanciationPanel; } COM: <s> getter of is visible role instanciation panel boolean attribute </s>
funcom_train/41164626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoMatrixExercises1 entity) { EntityManagerHelper.log("saving CoMatrixExercises1 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 matrix exercises1 </s>
funcom_train/25797041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addToPlaylist(INotifiableManager manager, Album album, int sortBy, String sortOrder) { return mConnection.getBoolean(manager, "AddToPlayListFromDB", LIBRARY_TYPE + ";" + getSongsCondition(album) + songsOrderBy(sortBy, sortOrder)); } COM: <s> adds an album to the current playlist </s>
funcom_train/46459081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LaunchNode getChildNode(String childFileName) { Enumeration e = breadthFirstEnumeration(); while(e.hasMoreElements()) { LaunchNode next = (LaunchNode) e.nextElement(); if(childFileName.equals(next.fileName)) { return next; } } return null; } COM: <s> gets a child node specified by file name </s>
funcom_train/13969363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void alertStatus (final String text) { statusLabel.setFont(new Font("Arial", Font.BOLD, 9)); statusLabel.setForeground(Color.RED); if (text.length() == 0) { statusLabel.setText(" "); } else { statusLabel.setText(text); } } COM: <s> sets new red and bold highlighted status bar </s>
funcom_train/39534167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createModuleObjects(){ Object obj=null; for(String current : moduleClasses){ if(current!=null && ! current.equals("")){ try{ Class<?>[] classargs={Editor.class}; Object[] args={editor}; //creates instances of each static module obj=Class.forName(current).getConstructor(classargs).newInstance(args); //if it is a shape module, it is added to the list of the shape module if(obj instanceof AbstractShape) { shapeModules.add((AbstractShape)obj); } modules.add((Module)obj); }catch (Exception ex){ex.printStackTrace();} } } } COM: <s> creates the objects corresponding to the modules </s>
funcom_train/37779278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FormKey do_Next_Clicked() { RequestPasswordForm myForm = (RequestPasswordForm) form; RequestPasswordComponent myComp = (RequestPasswordComponent) myForm.getComponent(); if (invokeDoValidateForScreen(myComp.getCurrentScreenCounter())) { myComp.determineAndSetNextScreen(); } return myComp.determineFormKey(); } COM: <s> this will invoke the do validate method for the current screen </s>