__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/32060329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: //// public void adaptToConfig(ViewController.GUIConfiguration guicon){ //// //// int index = guis.indexOf( guicon ); //// //// if( index > -1 ) { //// setVisible(true); //// setRectangle( rects.get(index) ); //// setNeedsRepaint(); //// } else { //// setVisible(false); //// } //// } COM: <s> to be overridden by the class that inherits form this one </s>
funcom_train/5219028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String extractTitle(){ String found = null; String prefix = "<h2>"; // uses the reluctant quantifier instead of the greedy quantifier // greedy is looking for the last occurrence of postfix and reluctant // takes the // first occurrence, what we want here // docu: // http://java.sun.com/docs/books/tutorial/essential/regex/quant.html String aimedString = "(.*?)"; String postfix = "</h2>"; Pattern pattern = Pattern.compile(prefix + aimedString + postfix); Matcher m = pattern.matcher(this.page); if (m.find()) { found = Helper.replaceHTMLCharactersToChars(this.page.substring(m.start(1), m.end(1))); } return found; } COM: <s> get the title of a press item </s>
funcom_train/46008908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Simulation giveMeSim() { Simulation simulation = new Simulation(); if (sim_id == null) { return simulation; } try { simulation = Simulation.getById(schema, sim_id); } catch (Exception e) { OSPErrors.storeInternalWarning( "Error encountered trying to get simulation in SOB " + e.getMessage(), this); simulation = new Simulation(); } if (simulation == null) { simulation = new Simulation(); } return simulation; } COM: <s> returns the simulation based on what sim id is currently stored in this </s>
funcom_train/31042368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getTreeControl(Composite parent) { if (list == null) { list = new List(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); list.addSelectionListener(new SelectionListener() { public void widgetSelected(SelectionEvent event) { listSelectionChanged(); } public void widgetDefaultSelected(SelectionEvent event) { listSelectionChanged(); } }); } return list; } COM: <s> method get tree control </s>
funcom_train/32610565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPlugin(IPlugin plugin) throws IllegalArgumentException{ plugin.setController(this.controller); plugin.setup(this.settings); plugins.put(plugin.getPluginInfos(), plugin); tableModel .addRow(new Object[]{plugin.getPluginInfos().getName(), plugin.getVersion(), plugin.getPluginInfos()}); } COM: <s> adds the plugin </s>
funcom_train/17854888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Image getImageFromQualifiers(Flags flags, Image[] images) { if (flags.isPrivate()) return images[1]; else if (flags.isProtected()) return images[2]; else if (flags.isPublic()) return images[3]; else return images[0]; } COM: <s> get image based on the public protected private qualifier </s>
funcom_train/8075357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setInstancesFromURL(URL u) { try { Reader r = new BufferedReader(new InputStreamReader(u.openStream())); setInstances(new Instances(r)); r.close(); } catch (Exception ex) { JOptionPane.showMessageDialog(this, "Couldn't read from URL:\n" + u, "Load Instances", JOptionPane.ERROR_MESSAGE); } } COM: <s> loads instances from a url </s>
funcom_train/10657098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetParagraphElement01() { checkOffsets(doc.getParagraphElement(-1), 0, 1); checkOffsets(doc.getParagraphElement(0), 0, 1); checkOffsets(doc.getParagraphElement(1), 0, 1); checkOffsets(doc.getParagraphElement(2), 0, 1); checkOffsets(doc.getParagraphElement(9), 0, 1); } COM: <s> tests get paragraph element when calling on empty document </s>
funcom_train/48211746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StackedTab addTab(String title, Component comp, boolean closeable) { final StackedTab tab = new StackedTab(title, comp, closeable); tab.subComponent.setVisible(false); tabs.add(tab); add(tab.tabComponent, "grow 100 0, push 100 0"); add(tab.subComponent, "grow 100 100, push 100 100"); return tab; } COM: <s> adds a new tab to the bottom of the stack </s>
funcom_train/40105793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(org.dom4j.Document d) { chapters = new LinkedList<Chapter>(); r = new RangeSearch(); Element root = d.getRootElement(); keywordsMap.put(KEYWORD.TITLE, root.elementTextTrim("name")); //$NON-NLS-1$ keywordsMap.put(KEYWORD.AUTHOR, root.elementTextTrim("author")); //$NON-NLS-1$ rootChapter = new Chapter(getHeader(), "", root, Chapter.CHAPTER_STR + " "); //$NON-NLS-1$ //$NON-NLS-2$ update(); } COM: <s> creates a source document from a source xml </s>
funcom_train/38474177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String fieldFromName(String methodName) { String result; if (methodName.substring(0, 2).equals("rem")) { result = methodName.substring(8, methodName.length()); } else { result = methodName.substring(5, methodName.length()); } return result; } COM: <s> method field from name </s>
funcom_train/50346350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(java.beans.PropertyChangeEvent evt) { if (log.isDebugEnabled()) log.debug("propertyChange "+evt.getPropertyName()+"= "+evt.getNewValue()); if (evt.getPropertyName().equals("Power")) { setPowerIcons(); } } COM: <s> implement a property change listener for power and throttle </s>
funcom_train/17892471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getCustomizer() { Component customizer = null; if (beanDescriptor != null) { final Class cls = beanDescriptor.getCustomizerClass(); if (cls != null) { try { customizer = (Component)cls.newInstance(); } catch (final Exception ex) { // XXX - debug System.out.println("PropertyTableModel: Instantiation exception creating Customizer"); } } } return customizer; } COM: <s> gets the customizer for the current object </s>
funcom_train/39915002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLabel17() { System.out.println("getLabel17"); Page1 instance = new Page1(); Label expResult = null; Label result = instance.getLabel17(); 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 label17 method of class timesheetmanagement </s>
funcom_train/2859573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Header init(IniFile inifile, String section) throws Exception { String hedr = inifile.getValue(section, "hedr"); if (hedr == null) { System.out.println("Cannot find IHB hedr name"); return null; } String hdir = inifile.getValue(section, "hdir"); if (hdir == null) { System.out.println("Cannot find IHB hdir name"); return null; } return new Header(hedr, hdir, null); } COM: <s> do the actual work of opening an ihb file </s>
funcom_train/18504462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawRectangle(Point position, Point size, boolean filled, int color, int borderWidth) { Point absPos=this.getAbsolutePosition(); absPos.x+=position.x; absPos.y+=position.y; if (display != null) display.drawRectangle(absPos, size, filled, color,borderWidth); else log.error("Control.drawRectangle failed, display is null (class " + this.getClass().getName() + ")"); } COM: <s> draw a rectangle </s>
funcom_train/48046053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ZoneRulesBuilder setFixedSavingsToWindow(Period fixedSavingAmount) { checkNotNull(fixedSavingAmount, "Fixed savings amount must not be null"); if (windowList.isEmpty()) { throw new IllegalStateException("Must add a window before setting the fixed savings"); } TZWindow window = windowList.get(windowList.size() - 1); window.setFixedSavings(fixedSavingAmount); return this; } COM: <s> sets the previously added window to have fixed savings </s>
funcom_train/445723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDLInvalidDisjunction() throws Exception { createAxiomDef("?x memberOf Man or ?x memberOf Person."); WsmlDLValidator v = new WsmlDLValidator(leFactory); boolean b = v.isValid(ontology, errors, warnings); // printWarning(warnings); // printError(errors); assertFalse(b); removeAxiomDef(); } COM: <s> this test checks an invalid dl logical expression </s>
funcom_train/19392085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(String[] userFile) throws IOException { int length = userFile.length; if (length == 0) throw new IllegalArgumentException(); File f = new File(System.getProperty("user.home")); for (int i=0; i<length; i++){ f = new File(f, userFile[i]); if (i == length - 2 && !f.exists()){ f.mkdirs(); } } OutputStream out = new FileOutputStream(f); save(out); out.close(); } COM: <s> save these properties from a user file </s>
funcom_train/5032170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dumpDerivedMethods(PrintStream out) { for (Entry<String, Method> entry : derivedMethods.entrySet()) { out.println("Name : " + entry.getKey() + " Type : " + entry.getValue().getDeclaringClass().getSimpleName() + " Method : " + entry.getValue().getName()); } } COM: <s> output all the derived methods </s>
funcom_train/41461540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAudio(URL url, AudioFormat amrFormat) { try { // System.out.println("url = " + url); mpegPresentation = new MpegPresentation(url); assertNotNull(mpegPresentation); assertNotNull(mpegPresentation.getAudioForamt()); assertEquals(amrFormat, mpegPresentation.getAudioForamt()); // System.out.println("AudioFormat = " + mpegPresentation.getAudioForamt()); } catch (IOException e) { fail("Caught exception"); } } COM: <s> test of get media types method of class media player impl </s>
funcom_train/13298198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReceivedByPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Message_receivedBy_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Message_receivedBy_feature", "_UI_Message_type"), NegotiationPackage.Literals.MESSAGE__RECEIVED_BY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the received by feature </s>
funcom_train/31093939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDefaultHttpServerPort() throws Exception { WebRequest wr = new GetMethodWebRequest( "http://localhost/simple" ); HttpServletRequest request = new ServletUnitHttpRequest( NULL_SERVLET_REQUEST, wr, _context, new Hashtable(), NO_MESSAGE_BODY ); int serverPort = request.getServerPort(); assertEquals( "default http server port", serverPort, 80 ); } COM: <s> test for get server port and get server name by antoine vernois </s>
funcom_train/2286683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int countExclusiveLocksInProject(CmsProject project) { int count = 0; Iterator itLocks = OpenCms.getMemoryMonitor().getAllCachedLocks().iterator(); while (itLocks.hasNext()) { CmsLock lock = (CmsLock)itLocks.next(); if (lock.getEditionLock().isInProject(project)) { count++; } } return count; } COM: <s> counts the exclusive locked resources in a project </s>
funcom_train/1956834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFirmwarePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BlinkM_firmware_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BlinkM_firmware_feature", "_UI_BlinkM_type"), BlinkmPackage.Literals.BLINK_M__FIRMWARE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the firmware feature </s>
funcom_train/39911345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetListbox1() { System.out.println("getListbox1"); Page1 instance = new Page1(); Listbox expResult = null; Listbox result = instance.getListbox1(); 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 listbox1 method of class timesheetmanagement </s>
funcom_train/9235126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doShowRaw(final InputWindow origin, final boolean isSilent) { if (origin == null || origin.getContainer() == null || origin.getContainer().getServer() == null) { sendLine(origin, isSilent, FORMAT_ERROR, "Cannot show raw window here."); } else { origin.getContainer().getServer().addRaw(); } } COM: <s> attempts to show the servers raw window </s>
funcom_train/42822519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getAboutCommand() { if (aboutCommand == null) {//GEN-END:|82-getter|0|82-preInit // write pre-init user code here aboutCommand = new Command("About", Command.SCREEN, 0);//GEN-LINE:|82-getter|1|82-postInit // write post-init user code here }//GEN-BEGIN:|82-getter|2| return aboutCommand; } COM: <s> returns an initiliazed instance of about command component </s>
funcom_train/19318585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection getConnection() throws SQLException { // since the pool.getConnection() throws out exception, so I have to catch it. // Please Young consider about the excpetion handler meshiasm. try { return pool.getConnection(); } catch(SQLException sqle) { throw sqle; } catch(Exception e) { e.printStackTrace(); throw new SQLException(e.getMessage()); } } COM: <s> get usable connection from datasource </s>
funcom_train/5599901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OWSExceptionCode getExceptionCode() { if (exception != null && !exception.getException().isEmpty()) { String code = exception.getException().get(0).getExceptionCode(); return OWSExceptionCode.valueOf(code); } else { return null; } } COM: <s> returns the code of the first exception in the report </s>
funcom_train/51724539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void store(String txt) { p_Chartplus2.addval("states", System.currentTimeMillis(), 2 * CENTER, "" + txt); p_Chartplus2.addval("states", System.currentTimeMillis() + 10, 0, "" + txt); } COM: <s> store cumul value in the courbs </s>
funcom_train/17699251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copy() { Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); String text = textArea.getSelectedText(); if (text == null) text = textArea.getText(); StringSelection selection = new StringSelection(text); clipboard.setContents(selection, null); } COM: <s> copies the selected text to the system clipboard </s>
funcom_train/22279202
/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.encodeObject(RULES_KEY,rules); encoder.encodeObject(DEFAULT_CONTAINER_CLASS_NAME_KEY,defaultContainerClassName); encoder.encodeObject(DEFAULT_MARKER_CLASS_NAME_KEY,defaultMarkerClassName); } COM: <s> encodes the htmlparsing rules instance </s>
funcom_train/44850507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParameter(String inName, String inValue) { VSys.assertNotNull(Assert.ERROR, this, "setParameter", inName); VSys.assertNotNull(Assert.ERROR, this, "setParameter", inValue); parameters().put(inName, inValue); } COM: <s> sets the specified parameter with the specified value to the context </s>
funcom_train/45254570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disposePerspective(Perspective persp, boolean notify) { // Get rid of perspective. perspList.remove(persp); if (notify) { window.firePerspectiveClosed(this, persp.getDesc()); } persp.dispose(); stickyViewMan.remove(persp.getDesc().getId()); } COM: <s> dispose a perspective </s>
funcom_train/23827343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void guessConfiguration(String ffmpegFormats) { for (String candidate : MP3_CODECS) { if (ffmpegFormats.contains(candidate)) { mp3codec = candidate; } } for (String candidate : FLV_CODECS) { if (ffmpegFormats.contains(candidate)) { flvcodec = candidate; } } for (String candidate : MPEG_CODECS) { if (ffmpegFormats.contains(candidate)) { mpegcodec = candidate; } } } COM: <s> guess configuration from ffmpeg formats standard output </s>
funcom_train/11390797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addRow() { BloomFilter[] tmp = new BloomFilter[matrix.length + 1]; for (int i = 0; i < matrix.length; i++) { tmp[i] = matrix[i]; } tmp[tmp.length-1] = new BloomFilter(vectorSize, nbHash, hashType); matrix = tmp; } COM: <s> adds a new row to i this i dynamic bloom filter </s>
funcom_train/35512861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addObject(IActorDelegate actorDelegate, int x, int y){ // Setting actor's coords actorDelegate.getCoordinates().x = x; actorDelegate.getCoordinates().y = y; // Creating & adding ActorDelegator on the previous ActorDelegate ActorDelegator<IActorDelegate> d = new ActorDelegator<IActorDelegate>(actorDelegate); actorDelegate.setGreenfootActor(d); addObject(d, x, y); } COM: <s> allows to add an actor delegate object to the scene </s>
funcom_train/19054098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleBegin(Node inNode) { NodeList nList = inNode.getChildNodes(); for (int i = 0; i < nList.getLength(); i++) { Node n = nList.item(i); if (n.getNodeName().equals("#cdata-section")) { StructureBegin strBegin = new StructureBegin(n.getNodeValue()); codeList.add(strBegin); } } } COM: <s> this method handles the begin node </s>
funcom_train/32790340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IteratorExp createIteratorExp(OclExpression src, String name, VariableDeclaration itVar, OclExpression body) throws WellFormednessException{ IteratorExp itExp = factory.createIteratorExp(); itExp.setNameA(name); itExp.setSource(src); itExp.getIterators().add(itVar); itExp.setBody(body); typeEvl.getType(itExp); return itExp; } COM: <s> creates an instance of iterator exp </s>
funcom_train/38318555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Filter getFilterProperty (String sClassName, Filter defaultFilter) { final String sValue= LogManager.getLogManager().getProperty(sClassName); try { if (sValue != null) { Class clz= ClassLoader.getSystemClassLoader().loadClass(sValue); return (Filter) clz.newInstance(); } } catch (Exception e) { // Ignore exceptions and return default. } return defaultFilter; } COM: <s> returns the filter property for the specified class name </s>
funcom_train/13551622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setP3_(int value) { if ((portDir & 0x08)!=0) { // output port ? if (((portDataOut & value)^value)!=0) remember|=0x08; } if (value!=0) portDataOut|=value; else portDataOut&=~0x08; } COM: <s> set the value of output port 3 by internal operation </s>
funcom_train/38288703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Attr createXmlnsAttribute(Element e, String namespaceUri) { if (StringUtils.isEmpty(namespaceUri)) return null; if (DOMUtils.equalsURI(namespaceUri, XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) return null; if (DOMUtils.equalsURI(namespaceUri, XMLConstants.XML_NS_URI)) return null; final String prefix = getPrefix(namespaceUri); if (prefix == null) return null; final Attr result = DOMMutils.createXmlnsAttribute(e,namespaceUri,prefix); return result; } COM: <s> creates an code xmlns code attribute that maps known namespace to </s>
funcom_train/12187953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private XMLFilter retrieveResponseFilter(String contentType) { XMLPipelineContext context = getPipelineContext(); Script script = (Script) context.getProperty(Script.class); XMLFilter responseFilter = null; if (script != null) { responseFilter = configuration.retrieveScriptFilter(script.getRef(), contentType); } else { responseFilter = new XMLFilterImpl(); } return responseFilter; } COM: <s> if there is a script associated with this operation for the content type </s>
funcom_train/3091537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void launch(DataModel model) { final AttackToleranceAlgorithm algorithm = new AttackToleranceAlgorithm(model); final GUIBuilder gui = GUIBuilder.createGUI(DESCRIPTION, "", algorithm); gui.addSelectionListener(new SelectionListener() { public void widgetSelected() { IVC.getInstance().getScheduler().schedule(algorithm); gui.close(); }}); gui.open(); } COM: <s> launches the attack tolerance plugin </s>
funcom_train/24939433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(SignalValue v) { // any one a shortcut? if ((isX()) || (isZ()) || (v.isX()) || (v.isZ())) { // shortcut case .. all the is's must be the same return ((v.isX() == isX()) && (v.isZ() == isZ())); } return v.getValue() == getValue(); } COM: <s> test equality with another signal value </s>
funcom_train/14275991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFace(Edge e) { ScanTriangle t; if(!tempFaces.empty()) { t = (ScanTriangle)tempFaces.pop(); t.reshape(e); heap.update(t); } else { t = new ScanTriangle(this); t.reshape(e); triangles.addElement(t); heap.insert(t); } } COM: <s> adds the face left of the given edge to the triangle structure </s>
funcom_train/18010570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl(Composite parent) { ImageCache.getInstance().addImageUser(parent); viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); drillDownAdapter = new DrillDownAdapter(viewer); viewer.setContentProvider(new ViewContentProvider()); viewer.setLabelProvider(new ViewLabelProvider()); // viewer.setSorter(new NameSorter()); setInput("java.util.ArrayList"); makeActions(); hookContextMenu(); hookDoubleClickAction(); contributeToActionBars(); } COM: <s> this is a callback that will allow us </s>
funcom_train/25529255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write() throws IOException { System.out.println( "Serializing to file " + fileName ); FileOutputStream fileOut = new FileOutputStream( fileName ); ObjectOutputStream out = new ObjectOutputStream( fileOut ); out.writeObject( vgraph ); out.flush(); out.close(); } COM: <s> serialize the visual graph to a file </s>
funcom_train/31906555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GVTFont deriveFont(float size, AttributedCharacterIterator aci) { SVGFontElementBridge fontBridge = (SVGFontElementBridge)ctx.getBridge(fontElement); Element textElement = (Element)aci.getAttributes().get (GVTAttributedCharacterIterator.TextAttribute.TEXT_COMPOUND_DELIMITER); return fontBridge.createFont(ctx, fontElement, textElement, size, fontFace); } COM: <s> derives a gvtfont object of the correct size </s>
funcom_train/31231133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object aValue, int rowIndex, int columnIndex) { switch (columnIndex) { case 0: // can't reset the keys... //getProperties().keySet().toArray()[rowIndex] = // aValue.toString(); break; case 1: _TABLE.put(_TABLE.keySet().toArray()[rowIndex].toString(), aValue.toString()); break; } this.fireTableDataChanged(); } COM: <s> sets the value at attribute of the key value table model object </s>
funcom_train/18095510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel1() { if (jPanel1 == null) { GridLayout gridLayout1 = new GridLayout(); gridLayout1.setRows(1); jPanel1 = new JPanel(); jPanel1.setLayout(gridLayout1); HelperPanel.formatPanelWithBorder(jPanel1, Msg.getString("PanelImageDisplayEdit.BORDER_TITEL_PREVIEW")); //$NON-NLS-1$ // jPanel1.add(image, gridBagConstraints); jPanel1.add(getJScrollPane(), null); } return jPanel1; } COM: <s> this method initializes j panel1 </s>
funcom_train/47672998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet executeQuery(String sql) throws SQLException { log.debug("select : "+sql); //NOTA BENE: qui posso lavorare sull'sql con i "?" da mettere a posto nel caso di query precalcolate o come si dice .. PResultSet res = this.currentDatabase.executeQuery(sql); return new PrologResultSet(sql,res,this.currentDatabase, null); } COM: <s> select type query </s>
funcom_train/8491910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { last = System.currentTimeMillis(); // CurrentTime = LastTime = System.currentTimeMillis(); ElaspedTime = 0; core.init(); // creation while (ASincroL.loop) { if (!Display.isCloseRequested()) { // chiude all'ALT + F4 core.coreRender(); Display.sync(ASincroL.fps); Display.update(); fps(); } else core.endGame(); } core.cleanup(); } COM: <s> main loop of game </s>
funcom_train/26535633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setData(DataRepository data, boolean handleExisting) { if (this.data != null) throw new IllegalStateException(); this.data = data; if (handleExisting) { for (Iterator i = instructions.iterator(); i.hasNext();) { AbstractInstruction instr = (AbstractInstruction) i.next(); handleAddedInstruction(instr); } } } COM: <s> save a reference to the data repository </s>
funcom_train/8196925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearDomainAxes() { for (int i = 0; i < this.domainAxes.size(); i++) { CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i); if (axis != null) { axis.removeChangeListener(this); } } this.domainAxes.clear(); notifyListeners(new PlotChangeEvent(this)); } COM: <s> clears the domain axes from the plot and sends a </s>
funcom_train/1325481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContext(final String context) { // Assertions. if (context == null) { String msg = "Argument 'context' cannot be null."; throw new IllegalArgumentException(msg); } if (this.context != null) { String msg = "Property 'context' may only be set once."; throw new RuntimeException(msg); } this.context = context; } COM: <s> sets the code context code url from which a relative </s>
funcom_train/18026363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDataSetSizeLimit(int dataSetSizeLimit) { int oldDataSetSizeLimit = this.dataSetSizeLimit; this.dataSetSizeLimit = dataSetSizeLimit; refreshImage(); propertyChangeSupport.firePropertyChange("dataSetSizeLimit", oldDataSetSizeLimit, dataSetSizeLimit ); } COM: <s> setter for property data set size limit </s>
funcom_train/5260678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMakesOperativePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Mission_makesOperative_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Mission_makesOperative_feature", "_UI_Mission_type"), BmmPackage.Literals.MISSION__MAKES_OPERATIVE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the makes operative feature </s>
funcom_train/24075949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void output(String message, StringBuilder out, boolean error) { if (out != null) { out.append(message); } if (error) { System.err.println("FlatFile: " + message); } else { System.out.println("FlatFile: ERROR: " + message); } } COM: <s> appends the output to the stringbuilder and also prints it out </s>
funcom_train/20321388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCmdExibirRecado() { if (backCmdExibirRecado == null) {//GEN-END:|26-getter|0|26-preInit // write pre-init user code here backCmdExibirRecado = new Command("Voltar", Command.BACK, 0);//GEN-LINE:|26-getter|1|26-postInit // write post-init user code here }//GEN-BEGIN:|26-getter|2| return backCmdExibirRecado; } COM: <s> returns an initiliazed instance of back cmd exibir recado component </s>
funcom_train/18859951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initModuleResources(IPath visualizerPath) { DiagramCanvas diagram = getDiagram(); List modules = diagram.getModules(); for (Iterator iter = modules.iterator(); iter.hasNext();) { StrutsConfigModule module = (StrutsConfigModule) iter.next(); String moduleName = module.getName(); String pathString = module.getPath(); IPath modulePath = convertFromProjectRelative(visualizerPath, new Path(pathString)); loadModuleResource(moduleName, modulePath); } } COM: <s> initializes the modules and the resources that contain the strutsconfig </s>
funcom_train/37422385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GlobalActivity findGlobalActByName(String pName, long pIdPrj) throws ClassNotFoundException, SQLException { Vector tVect = findGlobalActByQuery("select * from globalactivity where name = '" + Utility.Replace(pName) + "' and idproject="+pIdPrj); if (tVect.size() > 0) return (GlobalActivity)tVect.firstElement(); else return null; } COM: <s> finds a global activity in the database using its name </s>
funcom_train/50158913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getFullTitle() throws Exception { List nodes = xmlDoc.selectNodes("//*[local-name()='general']/*[local-name()='fullTitle']"); if (nodes.size() != 1) throw new Exception("Unable to get Full Title. Wrong number of elements: " + nodes.size()); Element element = (Element) nodes.get(0); return element.getText(); } COM: <s> returns the full title for the collection </s>
funcom_train/7281284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUpFullTime() { clock.setNow(MSECS_PER_DAY); //optional Statistics stats=new Statistics(clock); clock.addNow(MSECS_PER_DAY*8); assertEquals(1.0f, stats.calculateFractionalUptime(), DELTA); assertEquals(24*60*60., (float)stats.calculateDailyUptime(), DELTA); } COM: <s> run for a huge period of time </s>
funcom_train/50220464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int viewToModel(int a) { int b; if (getScale() == 1.0) b = a; else b = (int) Math.round(a * getScale()); if (gridOn() && (gridMode() != GridEvent.gridOff)) { b = (b / gridSize()) * gridSize(); } return b; } COM: <s> convert the int to the model coodinate system i </s>
funcom_train/18576015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List unregisterServices(String moduleName) { LinkedList serviceNames = new LinkedList(); Service service; String serviceModule; for (int i = 0; i < services.size(); i++) { service = (Service) services.get(i); serviceModule = (String) moduleMap.get(service.getName()); if ((serviceModule != null) && (serviceModule.equals(moduleName))) { serviceNames.add(service.getName()); services.remove(service); i--; } } return serviceNames; } COM: <s> unregister services after a module has shut down </s>
funcom_train/21285442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addChildToContext(String inProperty, Object inoutObject) { List children = (List) context.get(inProperty); if(children == null) { context.put(inProperty, new ListProperties()); children = (List) context.get(inProperty); } if(inoutObject instanceof Replaceable) { children.add(new NotReplaceable((Replaceable) inoutObject)); } else { children.add(inoutObject); } } COM: <s> associates the given child object with the given property </s>
funcom_train/49206762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String extractClassName(final String[] classNameParts) { for (int i = classNameParts.length - 1; i >= 0; i--) { if (StringUtils.isNumeric(classNameParts[i])) { // try next part } else { return classNameParts[i]; } } return classNameParts[classNameParts.length - 1]; } COM: <s> extract the last class name from an array of a class path parts </s>
funcom_train/28750184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContinueiffail(Long newVal) { if ((newVal != null && this.continueiffail != null && (newVal.compareTo(this.continueiffail) == 0)) || (newVal == null && this.continueiffail == null && continueiffail_is_initialized)) { return; } this.continueiffail = newVal; continueiffail_is_modified = true; continueiffail_is_initialized = true; } COM: <s> setter method for continueiffail </s>
funcom_train/31110468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Item loadItemFromElement(final Element element) { Item item; if (element == null) { throw new IllegalArgumentException("Argument element is null."); } if (!element.getName().equals("item")) { throw new IllegalArgumentException("Element is not an item element."); } item = new Item(element.getAttributeValue("name")); item.setDescription(element.getAttributeValue("description")); item.setWeight(Double.parseDouble(element.getAttributeValue("weight"))); return item; } COM: <s> load an item from a xml element </s>
funcom_train/3095930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enqueue(Object o, long timeout) throws QueueException{ System.out.println("enqueue called by:" +Thread.currentThread().getName()+" at: "+System.currentTimeMillis()); this.enqueueBlocker.QueueWait(timeout); this.impl.enqueue(o); this.dequeueBlocker.freeOldestBlocked(); } COM: <s> enqueue the given object into the queue </s>
funcom_train/50877980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Style getStyle(String inStyleName){ for (int i=0; i<myStyles.size(); i++){ Style tempStyle = (Style) myStyles.elementAt(i); if (inStyleName.equalsIgnoreCase(tempStyle.getStyleName())){ return tempStyle; } } return null; } COM: <s> retrieve the style with this name from the list of available styles </s>
funcom_train/44712547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Event generateAssociationEvent(ObjectType type, int eventType) { if (type == null) { return null; } Event event = null; if (eventType == CompoundType.UPDATE) { event = generateAssociationUpdate(type); } else { event = generateEvent(type, eventType); } if (event != null) { type.setEvent(eventType, event); } return event; } COM: <s> this generates events specifically for associations </s>
funcom_train/3596640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeFinishedAnnotations(List elems) { int i = 0; while (i < elems.size()) { NOMWriteElement elem = (NOMWriteElement)elems.get(i); if (!Double.isNaN(elem.getEndTime())) elems.remove(i); else i++; } } COM: <s> p removes all finished annotations with an end time from the specified </s>
funcom_train/42851520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected URL getURLFromXML(Node parent, String path) throws MalformedURLException, XMLParserException { URL value = getURLFromXMLOrNull(parent,path); if (value==null) { throw new XMLParserNotFoundException(MessageFormat.format(Messages.getString("XMLParser.UNABLE_FIND_PATH"),path)); //$NON-NLS-1$ } return value; } COM: <s> used to read a url from the xml </s>
funcom_train/34609166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Stemmer getFastestStemmer(final Locale locale) throws MorphologyException { if (locale == null) { throw new IllegalArgumentException("The 'loc' argument cannot be null."); } Stemmer component = (Stemmer) fastestStemmers.get(locale); if (component == null) { throw new MorphologyException("Cannot find stemmer for locales : " + locale.toString()); } return component; } COM: <s> returns the fastest stemmer for the given language </s>
funcom_train/22237944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getDataPortNamesForProtocol(String protocol) { Vector result = new Vector(); Enumeration portNames = lsidDataPorts.keys(); while (portNames.hasMoreElements()) { String portName = (String) portNames.nextElement(); LSIDDataPort ldp = (LSIDDataPort) lsidDataPorts.get(portName); if (ldp.getProtocol().equals(protocol)) result.add(portName); } return result.elements(); } COM: <s> get the keys of all the ports for the given protocol </s>
funcom_train/25028012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public BigInteger xor(BigInteger a, BigInteger b) { // xor(A,B) = (A | B) & (~ (A & B)) BigInteger a_or_b = a.or(b); BigInteger not_a_and_b = a.and(b).not(); return a_or_b.and(not_a_and_b); } COM: <s> xor operation for big integer </s>
funcom_train/5381265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateScale() { if (scale != null && !scale.isDisposed()) { scale.setMinimum(getMinimum()); scale.setMaximum(getMaximum()); scale.setIncrement(getIncrement()); scale.setPageIncrement(getPageIncrement()); } } COM: <s> update the scale particulars with set values </s>
funcom_train/15609615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void transitionObsoleted(CuratedFeature entity) { if (DEBUG_CLASS) { System.out.println("Transition Obsolete called."); } ChangeTrace aChangeTrace = this.getChangeForWorkspaceOid( entity.getOid()); if (aChangeTrace == null) { return; } aChangeTrace.obsolete(entity); this.setWasDirtied(); } COM: <s> track the obsoleted transition of a change trace </s>
funcom_train/10279471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean samePattern(Variable var){ return var != null && (name() == var.name() || name() != null && name().equals(var.name())) && (type() == var.type() || type() != null && type().equals(var.type())) && constant() == var.constant() && access() == var.access() && (stack() == null || var.stack() == null || stack() == var.stack()); } COM: <s> everything but not nessessarily the value equals </s>
funcom_train/7661196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTimedInvokeAny2() { ExecutorService e = new ScheduledThreadPoolExecutor(2); try { e.invokeAny(new ArrayList<Callable<String>>(), MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS); } catch (IllegalArgumentException success) { } catch(Exception ex) { unexpectedException(); } finally { joinPool(e); } } COM: <s> timed invoke any empty collection throws iae </s>
funcom_train/18810465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeAnnotation(XYAnnotation annotation) { if (annotation == null) { throw new IllegalArgumentException("Null 'annotation' argument."); } if (this.annotations != null) { boolean removed = this.annotations.remove(annotation); notifyListeners(new PlotChangeEvent(this)); return removed; } else { return false; } } COM: <s> removes an annotation from the plot and sends a </s>
funcom_train/43490519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AlephMediator getAlephMediator() throws ILSException{ if (getXServerName()==null||getXServerPort()==null){ StrictNcipError error = new StrictNcipError(true, "NCIP General Processing Error", "Temporary Processing Failure", "NCIPMessage", null); throw new ILSException("Aleph X-Server Name and/or port are not set","0201",error); } if (alephMediator==null){ alephMediator = AlephMediatorFactory.getAlephMediator(getXServerName(), getXServerPort()); } return alephMediator; } COM: <s> get the aleph mediator </s>
funcom_train/44166856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePlayer(Player player) { boolean updateCurrentPlayer = (currentPlayer == player); players.remove(players.indexOf(player)); Nation nation = getSpecification().getNation(player.getNationID()); nationOptions.getNations().put(nation, NationState.AVAILABLE); player.dispose(); if (updateCurrentPlayer) { currentPlayer = getFirstPlayer(); } } COM: <s> removes the specified player from the game </s>
funcom_train/21653545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features diagramEClass = createEClass(DIAGRAM); createEReference(diagramEClass, DIAGRAM__POLYGONS); polygonEClass = createEClass(POLYGON); createEReference(polygonEClass, POLYGON__CONNEXIONS); connexionEClass = createEClass(CONNEXION); createEReference(connexionEClass, CONNEXION__BEGINNING); createEReference(connexionEClass, CONNEXION__ENDING); } COM: <s> creates the meta model objects for the package </s>
funcom_train/45252620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void restoreWorkingSetState(IMemento memento) { IMemento[] children = memento .getChildren(IWorkbenchConstants.TAG_WORKING_SET); for (int i = 0; i < children.length; i++) { IWorkingSet workingSet = restoreWorkingSet(children[i]); if (workingSet != null) { internalAddWorkingSet(workingSet); } } } COM: <s> recreates all working sets from the persistence store </s>
funcom_train/31436366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getItemCount() throws SQLException { int retval = 0; DbConnection dc = new DbConnection(); ResultSet rowCount = dc.execute("SELECT COUNT(itemid) FROM items WHERE event =" + eventId); if (rowCount.next()) { retval = rowCount.getInt(1); } dc.close(); return retval; } COM: <s> returns a count of items for the current event </s>
funcom_train/7386151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object resetEdge(Object edge) { mxGeometry geo = model.getGeometry(edge); if (geo != null) { // Resets the control points List<mxPoint> points = geo.getPoints(); if (points != null && !points.isEmpty()) { geo = (mxGeometry) geo.clone(); geo.setPoints(null); model.setGeometry(edge, geo); } } return edge; } COM: <s> resets the control points of the given edge </s>
funcom_train/43326467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public double pctID() { if ((seq==null) || (fold==null)) throw new IllegalArgumentException("pctID called with unknown seq/fold"); int alLength = Math.min(seq.nMonomers(), fold.nMonomers()); if (alLength==0) return 0.0; return (double)nID() / (double)alLength * 100.0; } COM: <s> returns the percent identical residues in the alignment </s>
funcom_train/48095980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initFont(){ Display display = PlatformUI.getWorkbench().getDisplay(); //entryFont = new Font(display, new FontData("lucida console", 9, SWT.NORMAL)); entryFont = new Font(display, new FontData("arial", 9, SWT.NORMAL)); // FontData [] fonts = display.getFontList(null, true); // for(int i=0; i<fonts.length; i++){ // System.err.println(fonts[i]); // } } COM: <s> fixed font like courier would look better but it makes the text area </s>
funcom_train/10522938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGenKeysReturnTypeMapping4() throws Exception { try { /*ResultSet rs = */testCtrl.getGenKeys6("genmeanotherkey6"); fail("This feature has not been impelented in Derby yet (1/1/2005), need to add test case once it has."); } catch (Exception e) { assertTrue(true); } } COM: <s> get the generated keys from the sql statement with specified column indexes </s>
funcom_train/45803303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void bindVariables() throws JspTagException { for (int i = 0; i < columnNames.length; i++) { Object currentValue = queryResult.getValue(columnNames[i]); contextManager.setValue(columnNames[i], currentValue == null ? Collections.EMPTY_LIST : currentValue); } } COM: <s> bind the variables of a result set to the current row </s>
funcom_train/13503954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDSMDClass() { if (m_dsType == DS_TYPE.INLINE_XML) return ((DatastreamXMLMetadata)m_ds).DSMDClass; else if (m_dsType == DS_TYPE.MANAGED) return ((DatastreamManagedContent)m_ds).DSMDClass; else // coding error if trying to use other datastream type throw new RuntimeException("XML datastreams must be of type Managed or Inline"); } COM: <s> get the dsmdclass of the datastream wrapped by this class </s>
funcom_train/8655052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XPathMatcher activateField(Field field, int initialDepth) { ValueStore valueStore = fValueStoreCache.getValueStoreFor(field.getIdentityConstraint(), initialDepth); XPathMatcher matcher = field.createMatcher(valueStore); fMatcherStack.addMatcher(matcher); matcher.startDocumentFragment(); return matcher; } // activateField(Field):XPathMatcher COM: <s> request to activate the specified field </s>
funcom_train/39163581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doRemove(){ Object[] selectedItems = targetList.getSelectedValues(); for (int i = 0 ; i < selectedItems.length; i ++){ sourceListModel.addElement(selectedItems[i]); targetListModel.removeElement(selectedItems[i]); }// end for }// doRemove(); COM: <s> called when user press remove button </s>
funcom_train/23235683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AnimatedSprite getAnimatedSprite(Sprite sprite, int row, int frameCount, double width, double height, long delay, boolean animating) { return new AnimatedSprite(getSprites(sprite, row, frameCount, width, height), delay, animating); } COM: <s> create an animated sprite from a tile sprite </s>
funcom_train/31980258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logToDebug(String logString) { if ( null == System.getProperty("JTella.Debug") ) { // debug mode off return; } if (null == logFile) { // open file try { logFile = new RandomAccessFile("jtella.log", "rw"); logFile.seek(logFile.length()); } catch (IOException io) { io.printStackTrace(); } } log(logFile, logString); } COM: <s> writes a log to the debug log </s>
funcom_train/50029703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCountSolutions(Grid grid) { new Solver(grid).rebuildPotentialValues(); grid.copyTo(grid1); if (!analyse(grid1, false)) return 0; // no solution grid.copyTo(grid2); analyse(grid2, true); if (grid1.equals(grid2)) return 1; // one unique solution else return 2; // more than one solution } COM: <s> get information about the number of solutions of the given </s>