__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/11096981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TransactionManager getTransactionManager() throws GBeanNotFoundException { Set listGBeans = kernel.listGBeans(transactionManagerName); AbstractName tmName = (AbstractName) listGBeans.iterator().next(); TransactionManager tm = (TransactionManager) kernel.getGBean(tmName); return tm; } COM: <s> determines the tm from geronimo </s>
funcom_train/20883129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean lineToSpeech(String file) { boolean ok = true; voice.startBatch(); try { BufferedReader reader = new BufferedReader( new FileReader(file) ); String line; while ((line = reader.readLine()) != null && ok) ok = textToSpeech(line); reader.close(); } catch (IOException ioe) { voice.error("Can't process " + file, ioe); } voice.endBatch(); return ok; } COM: <s> read the given file and render each individual line as speech </s>
funcom_train/37562420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWordWrap(boolean wrap) { checkWidget(); if (wrap != wordWrap) { ScrollBar horizontalBar = getHorizontalBar(); wordWrap = wrap; if (wordWrap) { logicalContent = content; content = new WrappedContent(renderer, logicalContent); } else { content = logicalContent; } calculateContentWidth(); horizontalScrollOffset = 0; if (horizontalBar != null) { horizontalBar.setVisible(!wordWrap); } setScrollBars(); setCaretLocation(); super.redraw(); } } COM: <s> sets whether the widget wraps lines </s>
funcom_train/37645928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getMeasuredUpstreamBandwidth() { float sum=0.f; List connections=getInitializedConnections(); for (Iterator iter=connections.iterator(); iter.hasNext(); ) { ManagedConnection mc=(ManagedConnection)iter.next(); sum+=mc.getMeasuredUpstreamBandwidth(); } return sum; } COM: <s> returns the upstream bandwidth between the last two calls to </s>
funcom_train/32273728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getClueList() { if (clueList == null) { clueList = new JList(); clueList.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent arg0) { if(clueList.getSelectedIndex() > -1) getRemoveClueButton().setEnabled(true); else getRemoveClueButton().setEnabled(false); } }); } return clueList; } COM: <s> this method initializes j list </s>
funcom_train/51043066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addWindowMenu(Shell parent) { MenuItem menu_window = MenuFactory.createWindowMenuItem(menuBar); Menu windowMenu = menu_window.getMenu(); MenuFactory.addMinimizeWindowMenuItem(windowMenu); MenuFactory.addZoomWindowMenuItem(windowMenu); MenuFactory.addSeparatorMenuItem(windowMenu); MenuFactory.addBringAllToFrontMenuItem(windowMenu); MenuFactory.addSeparatorMenuItem(windowMenu); MenuFactory.appendWindowMenuItems(windowMenu); } COM: <s> creates the window menu and all its children </s>
funcom_train/12910239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(PrintWriter pw) { if( sig.writes() ) { sig.write(pw, this); } else if( writeChildren && children != null ) { for( Block child : children ) { child.write(pw); } } else if( translation != null ) { pw.println( translation ); } } COM: <s> writes the blocks translation to the output stream </s>
funcom_train/45750169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsImmutablePartPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Meronymic_isImmutablePart_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Meronymic_isImmutablePart_feature", "_UI_Meronymic_type"), OntoUMLPackage.Literals.MERONYMIC__IS_IMMUTABLE_PART, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is immutable part feature </s>
funcom_train/25419400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CswClient getCswClient() { if(cswClient == null){ CswClient client = new CswClient(); client.setConnectTimeout(SearchConfig.getConfiguredInstance().getTimeOut()); client.setReadTimeout(client.getConnectTimeout() * 10); this.setCswClient(client); } return cswClient; } COM: <s> gets the csw client </s>
funcom_train/29322300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addedFile(String text, NetworkAddress address) { // add file to list, _files.add(text); // update servers FMtoNSmsg toSend = MESSAGE_FACTORY.getFMtoNSmessage( FMtoNSMsgType.ADD_FILE, text, MY_ADDRESS); notifyAll(toSend, false); // print message System.out.println("success: File Downloaded Successfully from" + address.getName() + ":" + address.getPort()); } COM: <s> update everyone regarding addition of file </s>
funcom_train/48668500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeLeftComponent(JComponent c) { if(leftPanel != null) { for(int i = 0; i < leftPanel.getComponentCount(); ++i) { JComponent container = (JComponent)leftPanel.getComponent(i); if(container.isAncestorOf(c)) { leftPanel.remove(container); break; } } if(leftPanel.getComponentCount() == 0) { remove(leftPanel); leftPanel = null; } } } COM: <s> removes the component from the left hand side of the status bar </s>
funcom_train/34998710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveGroups(int userId, int... groupIds) { if (groupIds != null && groupIds.length > 0) { User user = this.userRepository.get(userId); user.getGroups().clear(); for (int groupId : groupIds) { Group group = this.groupRepository.get(groupId); user.addGroup(group); } this.userRepository.update(user); } } COM: <s> save the gropus for the user </s>
funcom_train/21689679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expr build(Reader reader) throws IOException { tokenizer = new StreamTokenizer(reader); tokenizer.ordinaryChar('-'); tokenizer.ordinaryChar('/'); token = tokenizer.nextToken(); Expr e = expr(); if (token == StreamTokenizer.TT_EOF) return e; else throw new XLException("trailing garbage"); } COM: <s> the code build code method returns an code expr code representation </s>
funcom_train/34758302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getPropertyCacheEnabled() { if (propertyCacheEnabled == null) { propertyCacheEnabled = new Boolean(new IlsProperties("core.properties") .getPropertyNoCache("propertyCacheEnabled", "true").trim().equalsIgnoreCase("true")); } return propertyCacheEnabled.booleanValue(); } COM: <s> if null it reads core </s>
funcom_train/17053504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand() { if (itemCommand == null) {//GEN-END:|35-getter|0|35-preInit // write pre-init user code here itemCommand = new Command("How to play", Command.ITEM, 0);//GEN-LINE:|35-getter|1|35-postInit // write post-init user code here }//GEN-BEGIN:|35-getter|2| return itemCommand; } COM: <s> returns an initiliazed instance of item command component </s>
funcom_train/43621810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBannerText(String text) { if (text == null) { text = ""; } if (!text.equals(this.bannerText)) { String oldText = this.bannerText; this.bannerText = text; //fix the login banner this.banner.setImage(createLoginBanner()); firePropertyChange("bannerText", oldText, text); } } COM: <s> set the text to use when creating the banner </s>
funcom_train/18214066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addHostnamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DatabaseAccessConfiguration_hostname_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DatabaseAccessConfiguration_hostname_feature", "_UI_DatabaseAccessConfiguration_type"), EvaluationmodelPackage.Literals.DATABASE_ACCESS_CONFIGURATION__HOSTNAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the hostname feature </s>
funcom_train/43199162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String isGodparent(Person person) { String gp = ""; if (id == person.getBirthGodMotherID() || id == person.getBirthGodFatherID()) { gp = "birthGodParent"; } else if (id == person.getBirthGodMotherID() || id == person.getBirthGodFatherID()) { gp = "marriageGodParent"; } return gp; } COM: <s> check if i am a god parent of this person </s>
funcom_train/20875290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double avgNrRequests() { double totalRequests = 0.0; int totalStudents = 0; for (Student student : getStudents()) { if (student.nrRequests() == 0) continue; totalRequests += student.nrRequests(); totalStudents++; } return totalRequests / totalStudents; } COM: <s> average number of requests per student see </s>
funcom_train/47732714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeSetTransform(AffineTransform transform) throws IOException { try { AffineTransform deltaTransform = new AffineTransform(transform); deltaTransform.concatenate(oldTransform.createInverse()); writeTransform(deltaTransform); } catch (NoninvertibleTransformException e) { // ignored... System.err.println("Warning: (ignored) Could not invert matrix: "+oldTransform); } } COM: <s> clears any existing transformation and sets the a new one </s>
funcom_train/41187611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RenderingContext newRenderingContext() { RenderingContext result = _sharedContext.newRenderingContextInstance(); result.setFontContext(new ITextFontContext()); result.setOutputDevice(_outputDevice); _sharedContext.getTextRenderer().setup(result.getFontContext()); result.setRootLayer(_root.getLayer()); return result; } COM: <s> implementation routine new rendering context </s>
funcom_train/10349256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void scrollToSelection() { if (super.getSelectedRow() != -1) { Rectangle rect = getVisibleRect(); Rectangle cRect = getCellRect(super.getSelectedRow(), 0, true); rect.y = cRect.y; rect.height = cRect.height; scrollRectToVisible(rect); } } COM: <s> sets the scroll to the selection </s>
funcom_train/44011538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCustLastName() { System.out.println("getCustLastName"); CustomerBO instance = null; String expResult = ""; String result = instance.getCustLastName(); 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 cust last name method of class edu </s>
funcom_train/44297057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCoordinate(final double... ordinates) { assertFalse("This DirectPosition shall not be modified.", unmodifiable); assertEquals("Unexpected dimension.", this.ordinates.length, ordinates.length); System.arraycopy(ordinates, 0, this.ordinates, 0, ordinates.length); } COM: <s> sets all ordinate values </s>
funcom_train/10388404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendNotification(Notification notification) { synchronized (entries) { Iterator<BaseNotificationBroadcasterEntry> items = entries.iterator(); while (items.hasNext()) { BaseNotificationBroadcasterEntry item = items.next(); if ((item.filter != null) && (!item.filter.isNotificationEnabled(notification))) continue; item.listener.handleNotification(notification, item.handback); } } } COM: <s> send the specified notification to all interested listeners </s>
funcom_train/16982026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(double x1, double y1, double w, double h) { double x2 = x1 + w; double y2 = y1 + h; return contains(x1, y1) && contains(x1, y2) && contains(x2, y1) && contains(x2, y2); } COM: <s> return true if the given rectangle is entirely inside </s>
funcom_train/43245916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPlaceOfBirthState() { System.out.println("getPlaceOfBirthState"); PatientDataObject instance = new PatientDataObject(); String expResult = ""; String result = instance.getPlaceOfBirthState(); 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 place of birth state method of class org </s>
funcom_train/14012389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireValueChanged() { ChangeEvent e = new ChangeEvent(this); EventListener[] listeners = listenerList.getListeners(ChangeListener.class); for (int index = 0; index < listeners.length; ++index) { ((ChangeListener) listeners[index]).stateChanged(e); } } COM: <s> notifies code change listener code s that the selection has </s>
funcom_train/51412694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createColorEditor(String title, CColor color) { ColorButton cButton = new ColorButton(color); cButton.addActionListener(this); cButton.setPreferredSize(new Dimension(70, 25)); colorButtons.add(cButton); JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER)); panel.add(cButton); return GUITools.createDetailPanel(title, panel, 250); } COM: <s> creates a panel to edit a color </s>
funcom_train/30238533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object translate(Object o) throws ObjectTranslationException { try { if (isDto(o)) { o = getApplicationObject(o); } else if (isApplicationObject(o)) { o = getDto(o); } return o; } catch (DtoException e){ throw new ObjectTranslationException(e); } } COM: <s> object translator interface implementation </s>
funcom_train/45239827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JComboBox getJComboBoxFormato() { if (jComboBoxFormato == null) { jComboBoxFormato = new JComboBox(); jComboBoxFormato.setBounds(new Rectangle(39, 218, 133, 24)); jComboBoxFormato.addItem("Seqüencial"); jComboBoxFormato.addItem("Intercalado"); jComboBoxFormato.setCursor(new Cursor(Cursor.HAND_CURSOR)); } return jComboBoxFormato; } COM: <s> this method initializes j combo box formato </s>
funcom_train/23883556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XPathValue executeXPath(XPathExpression xpathExpression) throws ClxValidationException { try { return xpathExecutionUnit.execute(xpathExpression); } catch (XPathXdvException e) { throw new ClxValidationException("Error while executing xpath expression: " + xpathExpression.getAsString(), e); } } COM: <s> executes given xpath expression </s>
funcom_train/36684832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createOptions() { JPanel result = new JPanel(); JButton create = new JButton("Test AI"); create.setMnemonic(KeyEvent.VK_ENTER); create.setActionCommand("Test AI"); create.addActionListener(myListener); result.add(create); result.setBackground(BACKGROUND_COLOR); return result; } COM: <s> creates a jpanel containing a button with an action listener </s>
funcom_train/18437514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Player nextPlayer(Player player) { // Get the index of this player in the list Vector players = this.config.getPlayers(); int index = players.indexOf(player); // If it is the last player, returns the first if (index == players.size() - 1) { index = -1; } // Returns the next player return (Player) players.elementAt(++index); } COM: <s> helper method that returns the player that should be the next </s>
funcom_train/45252432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkInterfaceHierarchy(Class interfaceToCheck) { if (interfaceToCheck.getName().equals(className)) { return true; } Class[] superInterfaces = interfaceToCheck.getInterfaces(); for (int i = 0; i < superInterfaces.length; i++) { if (checkInterfaceHierarchy(superInterfaces[i])) { return true; } } return false; } COM: <s> check the interfaces the whole way up </s>
funcom_train/44859822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEmpty(Object obj) { if (obj == null) { return true; } if (obj instanceof String) { return ((String) obj).length() == 0; } if (obj instanceof Map) { return ((Map) obj).isEmpty(); } if (obj instanceof Collection) { return ((Collection) obj).isEmpty(); } return false; } COM: <s> useful implementation of the jstl empty function </s>
funcom_train/25702553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updatePosition () { // Initialize translation, rotation and size fields of the wrapper double [] position = new double[3]; float [] rotation = new float [4]; float [] size = new float [3]; entity.getPosition(position); entity.getRotation(rotation); entity.getSize(size); entityX3DTransform.setTranslation(new float [] {(float)position[0], (float)position[1], (float)position[2] }); entityX3DTransform.setRotation(rotation); } COM: <s> update the position fields with the properties from the entity </s>
funcom_train/22525197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void uninstall() { if (fIsInstalled) { if (sourceViewer instanceof ITextViewerExtension) { ITextViewerExtension e= (ITextViewerExtension) sourceViewer; e.removeVerifyKeyListener(this); } else if (sourceViewer != null) { StyledText text= sourceViewer.getTextWidget(); if (text != null && !text.isDisposed()) text.removeVerifyKeyListener(fActivationCodeTrigger); } fIsInstalled= false; fKeyBindingService= null; } } COM: <s> uninstalls this trigger from the editors text widget </s>
funcom_train/28672857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInitMethodPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BeanType_initMethod_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BeanType_initMethod_feature", "_UI_BeanType_type"), BeansPackage.Literals.BEAN_TYPE__INIT_METHOD, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the init method feature </s>
funcom_train/23011228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWebLink(Layer lyr, Record rec){ //Project project = map.getProject(); //Vector recs = new Vector(); //recs.addElement(rec); return lyr.getWebLink( ((lyr.linkMain!=null) ? lyr.linkMain : linkMain), rec, null, null, null); } COM: <s> returns the web link for layers object based on main url template </s>
funcom_train/20847965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close(String channelId) { ChannelBusMessageDispatcher dispatcher = null; synchronized (channelDispatchers) { dispatcher = (ChannelBusMessageDispatcher) channelDispatchers.remove(channelId); } if (dispatcher != null) { dispatcher.setActive(false); synchronized (dispatcherPool) { dispatcherPool.add(dispatcher); } } } COM: <s> closes given channel </s>
funcom_train/11390000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { if (other == this) { return true; } if (other == null || !(other instanceof FileChecksum)) { return false; } final FileChecksum that = (FileChecksum)other; return this.getAlgorithmName().equals(that.getAlgorithmName()) && Arrays.equals(this.getBytes(), that.getBytes()); } COM: <s> return true if both the algorithms and the values are the same </s>
funcom_train/20351592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteRequiredFile(final String filename) { boolean result = false; if (getRequiredFiles() == null) { return result; } for (int i = 0; i < getRequiredFiles().size(); i++) { final String temp = getRequiredFiles().get(i); if (temp.equals(filename)) { getRequiredFiles().remove(i); result = true; break; } } return result; } COM: <s> deletes the given filename from the list </s>
funcom_train/48507831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCloseOperation(String newOperation) { if(newOperation.equals(NOTHING)) super.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); else if (newOperation.equals(HIDE)) super.setDefaultCloseOperation(HIDE_ON_CLOSE); else if (newOperation.equals(DISPOSE)) super.setDefaultCloseOperation(DISPOSE_ON_CLOSE); else if (newOperation.equals(EXIT)) super.setDefaultCloseOperation(EXIT_ON_CLOSE); else throw new java.lang.IllegalArgumentException(); } COM: <s> determines how the window will close </s>
funcom_train/4154587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyReleased( final KeyEvent ke ) { final int keyCode = ke.getKeyCode(); try { for ( int controlKeyIndex = 0; controlKeyIndex <CONTROL_KEYS.length; controlKeyIndex++ ) if ( keyCode == CONTROL_KEYS[ controlKeyIndex ] ) { remotePlayer.setControlKeyState( controlKeyIndex, false ); break; } } catch ( RemoteException re ) { } } COM: <s> to handle keyreleased events implementing key listener interface </s>
funcom_train/24294490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String nextBlock(UserInfoInterface userInfo, ProcessData procData) { long start = System.currentTimeMillis(); String retObj = this.nextBlock(userInfo, procData, false, 0, false); long end = System.currentTimeMillis(); Logger.trace("FlowBean","nextBlock", "Block transition took "+(end-start)+" ms"); return retObj; } COM: <s> this method advances to the next block of the flow </s>
funcom_train/22286638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Graphics g) { // Paint the widget itself paint(g, -tx, -ty, width, height); // Paint the children if (nwidgets > 0) { for (int i = 0 ; i < nwidgets ; i++) { Widget w = widgets[i]; if (w != null) { w.paintAll(g, -tx, -ty, width, height); } } } } COM: <s> update the widget </s>
funcom_train/40730060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONWrapper get(String key) { if (value == null) { return INVALID; } JSONObject obj = value.isObject(); if (obj == null) { return INVALID; } JSONValue retval = obj.get(key); if (retval == null) { return INVALID; } return new JSONWrapper(retval); } COM: <s> get the item that corresponds to the code key code in the map </s>
funcom_train/37598038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInterface(Class class_, Class interf, boolean is_recursive) { if (class_ == null) return false; logger.info("isInterface: " + class_.getName()); if (isInterface(class_, interf)) return true; return isInterface(class_.getSuperclass(), interf, true); } COM: <s> if the object or its super classes implement a named interface </s>
funcom_train/16824326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addRecord(int score, String name, boolean isNew) { Record r = new Record(); r.setName(name); r.setNew(isNew); r.setScore(score); if (mRecords.containsKey(r.getScore())) { mRecords.get(r.getScore()).add(r); } else { List<Record> lr = new ArrayList<Record>(); lr.add(r); mRecords.put(r.getScore(), lr); } } COM: <s> adds a record to the internal data structure </s>
funcom_train/19971914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void newPassage() { // Create a blank new passage, and add it to the provider. ContentValues values = new ContentValues(); values.put(VesselSchema.Passages.NAME, "New Passage"); passageUri = contentResolver.insert( VesselSchema.Passages.CONTENT_URI, values); // Show the new item. getLoaderManager().restartLoader(LOADER_ITEM, null, itemLoaderCallbacks); } COM: <s> create a new passage </s>
funcom_train/43900259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setQuery(final Query query) { if (query == null) { throw new NullPointerException("must provide a Query. Do you mean Query.ALL?"); } // be prudent this.query = new DefaultQuery(query); fireMapLayerListenerLayerChanged(new MapLayerEvent(this, MapLayerEvent.FILTER_CHANGED)); } COM: <s> sets a definition query for this layer </s>
funcom_train/12782373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T next() throws NoSuchElementException { if (!hasNext()) { throw new NoSuchElementException(); } T result = Q.get(index); index++; if (currentHops < k && index == boundary[currentHops]) { currentHops++; } if (hasNext()) { T N = Q.get(index); visitChildren(N); } return result; } COM: <s> find the next graph node in discover time order </s>
funcom_train/20844448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { if (!stopRunning) { return; } Runnable r = new Runnable() { /* * (non-Javadoc) * @see java.lang.Runnable#run() */ public void run() { while (true) { try { deliverMessages(); if (stopRunning) { return; } } catch (Throwable t) { Log.error("MessageInformer: uncaught exception broke out: " + t); } } } }; stopRunning = false; // get thread from platform toolkit / thread pool DPWSFramework.getThreadPool().execute(r); } COM: <s> starts the message delivery loop of this message informer instance </s>
funcom_train/44854230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String render(Locale inLocale, ActorGroupState inState) { StringBuilder outMenu = new StringBuilder(); outMenu.append(renderBegin(inLocale)); outMenu.append(renderMain(inLocale, inState)); outMenu.append(renderEnd(inLocale, inState)); return String.format(TMPL_UL, NL, outMenu); } COM: <s> renders the initial menu as html code in the specified language </s>
funcom_train/44575419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doDefaultConstructor(ArrayList methods) { int s = methods.size() - 1; for (; s >= 0; --s) { if (methods.get(s) instanceof JConstructorDeclarationType) return; } print("// Default Constructor"); printAnnotationStart(); print("public " + ident + "();"); newLine(); newLine(); } COM: <s> checks if there are any constructors if not adds a default constructor </s>
funcom_train/10820133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Path determineFirstFile(String location) throws IOException { Path path = new Path(location); FileStatus status = fileSystem.getFileStatus(path); if (status.isDir()) { // get the first file. path = getFirstFile(fileSystem, path); if (path == null) { throw new FrontendException(path + " has no files"); } } return path; } COM: <s> if location is a directory the first file found is returned </s>
funcom_train/25328865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(BaseNode[] values) { org.gdi3d.vrmlloader.impl.BaseNode[] implNodes = new org.gdi3d.vrmlloader.impl.BaseNode[values.length]; for (int i = 0; i < values.length; i++) { implNodes[i] = Field.getImpl(values[i]); } impl.setValue(implNodes); } COM: <s> sets the value attribute of the mfnode object </s>
funcom_train/2842033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLoad() throws DataSetException { String filename = "/xml/dataSetTest.xls"; IDataSet ds = loader.load(filename); assertTrue("No tables found in dataset.", ds.getTableNames().length > 0); // DataSet loading tests verify data accuracy } COM: <s> test can load the specified file </s>
funcom_train/16532154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean authenticate() throws ProxyAuthException { if(retryCount > MAX_RETRIES) { //System.out.println("Max retries reached to authenticate " + proxyName); return false; } //System.out.println("Attempt " + retryCount + " to authenticate " + proxyName); if(username == null || password == null) { throw new ProxyAuthException(proxyName); } // There are login details present return true; } COM: <s> method checks if there is a username and password to authenticate with </s>
funcom_train/27823353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ConceptInfo getConceptInfo(String entityURI,int conceptVersion) { ConceptInfo result=(ConceptInfo)m_conceptInfos.get(entityURI); if (result==null) { result=new ConceptInfo(entityURI,conceptVersion); m_conceptInfos.put(entityURI,result); } return result; } COM: <s> returns the concept info object with given uri </s>
funcom_train/4283982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypedModelPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Domain_typedModel_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Domain_typedModel_feature", "_UI_Domain_type"), QVTBasePackage.Literals.DOMAIN__TYPED_MODEL, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the typed model feature </s>
funcom_train/12917416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean initialise(String name, HashMap params) { myName=name; configName=(String)params.get("playlistsFile"); if (configName == null) { logger.error("playlistFile parameter must be defined for this provider"); return(false); } if (readConfig()) { return(buildPlaylists()); } else return(false); } COM: <s> the elf server will call this method upon startup </s>
funcom_train/44011480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetDiscountTaken() { System.out.println("setDiscountTaken"); double discountTaken = 0.0; TransLineBO instance = new TransLineBO(); instance.setDiscountTaken(discountTaken); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set discount taken method of class edu </s>
funcom_train/12839138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertDatabaseSingleton(String tableName) throws PersistenceFacilitiesException { if (StringUtils.isBlank(tableName)) { logger.error("insertDatabaseSingleton: Null or blank tableName argument."); return; } logger.info("Inserting database singleton row into table [" + tableName + "]."); TableAgent ta = getTableAgent(tableName); ta.insertSingletonRow(); } COM: <s> if the argument table name is defined as a database singleton </s>
funcom_train/14653478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProcedureChunk getProcedureChunk() { ChunkType chunkType = ChunkTypeConstants.PROCEDURE.getChunkType();// Constants.PROCEDURE_CHUNKTYPE; ProcedureChunk greatest = null; for (Chunk chunk : chunks) { if ((greatest == null || chunk.greaterThan(greatest)) && chunk.getChunkType().equals(chunkType)) { greatest = (ProcedureChunk) chunk; } } return greatest; } COM: <s> get procedure chunk </s>
funcom_train/22354047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePlugIns() { if (plugIns != null && plugIns.size() > 0) { for (MagellanPlugIn plugIn : plugIns) { try { plugIn.init(getData()); } catch (Throwable t) { ErrorWindow errorWindow = new ErrorWindow(this, t.getMessage(), "", t); errorWindow.setVisible(true); } } } } COM: <s> updates the plugins after game data change </s>
funcom_train/8090595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveWeights() { // copy the current weights System.arraycopy(m_weights, 0, m_bestWeights, 0, m_weights.length); // tell inputs to save weights for (int i = 0; i < m_numInputs; i++) { m_inputList[i].saveWeights(); } } COM: <s> call this to have the connection save the current </s>
funcom_train/18721835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToolBarEntry(JComponent component1) { JToolBar toolBar = new JToolBar(component1.getName()); toolBar.add(component1); //toolbarEntries.put(component1.getName(), toolBar); //mainFrame.getContentPane().add(toolBar, BorderLayout.NORTH); toolBarContainer.add(toolBar); toolBar.validate(); toolBar.repaint(); } COM: <s> add a component to the menuebar without actionlistener and menuentry </s>
funcom_train/44659004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Component createContentPane() { JPanel content = new JPanel(new BorderLayout()); Component component = super.createContentPane(); if(component != null) content.add(component); JProgressBar progressBar = getProgressBar(); progressBar.setIndeterminate(isIndeterminate()); progressBar.setStringPainted(isShowProgressLabel()); content.add(progressBar, BorderLayout.SOUTH); return content; } COM: <s> returns a component that displays an image above a progress bar </s>
funcom_train/7384818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encodeCell(mxICell cell, Node node, boolean includeChildren) { node.appendChild(encode(cell)); if (includeChildren) { int childCount = cell.getChildCount(); for (int i = 0; i < childCount; i++) { encodeCell(cell.getChildAt(i), node, includeChildren); } } } COM: <s> encoding of cell hierarchies is built into the core but is a </s>
funcom_train/37648361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object value, int rowIndex, int columnIndex) { if (columnIndex == 0) { ruleSet[rowIndex].setInclude(((Boolean)value).booleanValue()); if (ruleSet[rowIndex].include()) { Iterator it = ruleSet[rowIndex].getRules().iterator(); Rule rule = null; while (it.hasNext()) { rule = (Rule) it.next(); rule.setInclude(true); } } fireTableCellUpdated(rowIndex, columnIndex); } } COM: <s> sets the value in the cell at code column index code </s>
funcom_train/44296990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void forbidden(final String message, final Object value) { if (enforceForbiddenAttributes) { if (value instanceof Collection<?>) { assertTrue(message, ((Collection<?>) value).isEmpty()); } else { assertNull(message, value); } } else if (value != null && !isEmptyCollection(value)) { WarningMessage.log(logger, message, false); } } COM: <s> invoked when the existence of a forbidden attribute needs to be checked </s>
funcom_train/12802442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void replace(K key) { if(t1.size() >= 1 && ((b2.containsKey(key) && t1.size() == t1TargetSize) || t1.size() > t1TargetSize)) b1.put(pollEldest(t1), THOMBSTONE); else b2.put(pollEldest(t2), THOMBSTONE); } COM: <s> subroutine replace p </s>
funcom_train/40655862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isRoomAbove(Position position) { int row = position.getRow(); int col = position.getCol(); for (int r=row-1; r>=0; r--) { if (isCellEmpty(r, col)) { return true; } } return false; } COM: <s> returns true if theres an empty cell in the same column in a </s>
funcom_train/3474195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean handleEvent (EventObject event) { Window window = ((WindowEvent) event).getWindow (); for(int i = 0; i < waitingInstances.size(); i++) { WindowActivationCatcherObserver observer = waitingInstances.get(i); observer.handleActivation (window); } return true; } COM: <s> this method is called when a window pops up </s>
funcom_train/36667668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendSignal(String portName){ ConnectionAnchor in = oppossitePort.get(portName); ConnectionAnchor out = new ConnectionAnchor(this, portName); try{ eventQueue.put(new SynchroEvent(out, in)); } catch(InterruptedException ie){ log.error(msg("Trying to send synchro event when event queue is already dead."), ie); } } COM: <s> create synchro event to send signal from a port to an opposite </s>
funcom_train/47135439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Double getPrice(PriceType priceType) { Double result = null; if ((this.transientPriceMap == null) || (this.priceValues.size() != this.transientPriceMap.size())) { this.recalculatePricesMap(); } if ((this.transientPriceMap != null) && (this.transientPriceMap.containsKey(priceType))) { result = this.transientPriceMap.get(priceType).getValue(); } return result; } COM: <s> gets the price </s>
funcom_train/22279413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeItem(String title) { ListItem nextItem; int i; if (title == null) { return; } i = popupList.count(); while (i-- > 0) { nextItem = (ListItem)itemAt(i); if (title.equals(nextItem.title())) { hidePopupIfNeeded(); popupList.removeItemAt(i); return; } } } COM: <s> removes the list item with title b title b from the popup </s>
funcom_train/7292115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private short nameGroupOffsetToIndex(short offset) { for (short i=0; i<nameGroup_map.length; ++i) { if (nameGroup_map[i] == offset) { return i; } } throw new RuntimeException("Can't map name group offset " + offset + " to index"); } COM: <s> convert an offset into the name group pool into a </s>
funcom_train/14519830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IPublisherQueueSessionLocal getPublisherQueueSession() { if (pubqueuesession == null) { try { IPublisherQueueSessionLocalHome pqhome = (IPublisherQueueSessionLocalHome) getLocator().getLocalHome(IPublisherQueueSessionLocalHome.COMP_NAME); pubqueuesession = pqhome.create(); } catch (CreateException e) { throw new EJBException(e); } } return pubqueuesession; } //getPublisherQueueSession COM: <s> gets connection to publisher queue session bean </s>
funcom_train/36658717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEmpty() { if (isLeafNode() && size == 0) { return true; } else { ScalableHashMap<K, V> cur = leftMost(); if (cur.size > 0) { return false; } while (cur.rightLeafRef != null) { cur = cur.rightLeafRef.get(); if (cur.size > 0) { return false; } } return true; } } COM: <s> returns whether this map has no mappings </s>
funcom_train/9283220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private short getSQLAllowedInProcedure() { RoutineAliasInfo routineInfo = ((MethodCallNode)methodCall.getJavaValueNode()).routineInfo; // If this method is called before the routine has been resolved, routineInfo will be null if (SanityManager.DEBUG) SanityManager.ASSERT((routineInfo != null), "Failed to get routineInfo"); return routineInfo.getSQLAllowed(); } COM: <s> this method checks the sql allowed by the called procedure </s>
funcom_train/5219135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean loadRelations(Crime_subDistricts crime){ String strname = crime.getAddressString(); if (strname.indexOf(CornerCase_subDistricts.SEPARATOR)!=-1){ System.out.println("CrimeItemCreator: "+strname); strname = strname.split("\\"+CornerCase_subDistricts.SEPARATOR)[0]; } String s = SubDistrictDAO.findIdSubdistrictForStreetNameForDistrictName(cn, crime.getDistrictName(), strname); if (s==null) return false; crime.setIdDistrict(s); return true; } COM: <s> set crime item relation for database </s>
funcom_train/3424196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Vector cloneMap(Vector list){ if (list == null) { list = new Vector(5, 10); } list.setSize(0); if (nodes != null) { for (int i=0; i<nodes.size(); i++) { list.insertElementAt(nodes.elementAt(i), i); } } return list; } COM: <s> non dom copy content of this map into the specified vector </s>
funcom_train/46476352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getBottomPanel() { if (bottomPanel == null) { GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); gridBagConstraints1.insets = new Insets(4, 4, 4, 4); bottomPanel = new JPanel(); bottomPanel.setLayout(new GridBagLayout()); bottomPanel.add(getCloseButton(), gridBagConstraints1); } return bottomPanel; } COM: <s> this method initializes bottom panel </s>
funcom_train/28672737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRef1PropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PropertyType_ref1_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PropertyType_ref1_feature", "_UI_PropertyType_type"), BeansPackage.Literals.PROPERTY_TYPE__REF1, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the ref1 feature </s>
funcom_train/11702658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkForErrors() throws ResourceConfigurationException { if (cpeDescriptor == null) { throw new ResourceConfigurationException(new Exception(CpmLocalizedMessage .getLocalizedMessage(CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_EXP_no_cpe_descriptor__WARNING", new Object[] { Thread .currentThread().getName() }))); } } COM: <s> checks if cpe description has been created </s>
funcom_train/11164078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeListener(IWizardListener listener) { synchronized(listeners) { Iterator lisIte = listeners.values().iterator(); while(lisIte.hasNext()) { IWizardListener wizardListener = (IWizardListener) lisIte.next(); if (wizardListener == listener) { lisIte.remove(); } } } } COM: <s> removes a listener for state change event </s>
funcom_train/9352008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAxisXTop(final AAxis axisX) { this.ensureUniqueAxis(axisX); this.m_axesXTop.add(axisX); axisX.setChart(this, Chart2D.X, Chart2D.CHART_POSITION_TOP); this.listenToAxis(axisX); this.firePropertyChange(Chart2D.PROPERTY_AXIS_X, null, axisX); this.setRequestedRepaint(true); } COM: <s> adds the given x axis to the list of internal top x axes </s>
funcom_train/36124200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) { //System.out.println("Device discovered: "+btDevice.getBluetoothAddress()); //add the device to the vector if(!vecDevices.contains(btDevice)){ vecDevices.addElement(btDevice); // sterm.joro.append(btDevice.getBluetoothAddress(), null); } } COM: <s> this call back method will be called for each discovered bluetooth devices </s>
funcom_train/1240719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QName getType() { // Try to get the type from our target if we're a reference... if (typeQName == null && href != null && context != null) { MessageElement referent = context.getElementByID(href); if (referent != null) { typeQName = referent.getType(); } } return typeQName; } COM: <s> get the elements type </s>
funcom_train/32018766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMenuItem getJMenuPrint() { if (jMenuPrint == null) { jMenuPrint = new JMenuItem("Imprimer", new ImageIcon(getClass().getResource("/Icon/printer.png"))); jMenuPrint.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_P, InputEvent.CTRL_MASK)); } return jMenuPrint; } COM: <s> this method initializes j menu item4 </s>
funcom_train/4814057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getScore(int fromX, int fromY, int toX, int toY) { Tile movingTile = getTile(fromX, fromY); if (movingTile == null) throw new IllegalArgumentException("No tile at 'from' location"); return getScore(movingTile, toX, toY); } COM: <s> returns the point value of moving the tile from to the given coordinates </s>
funcom_train/51451830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean createOutputFiles() { boolean error = false; for (int i=0; i<fileExtension.size(); i++) { try { fileWriter.add(new BufferedWriter(new FileWriter(projectDirectory+"html/"+fileName+"_"+fileExtension.get(i)+".html"))); } catch (IOException e) { error = true; break; // e.printStackTrace(); } } return !error; } COM: <s> creates for each language extension an output file </s>
funcom_train/13548104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HashSet gatherBlockNames(BlockGraph graph) { HashSet set = new HashSet(); for(Iterator bIt = graph.getAllNodes().iterator(); bIt.hasNext(); ) { BlockNode bn = (BlockNode) bIt.next(); set.add(bn.getLabel().getFullName()); } return set; } COM: <s> return a set of all block names in the block graph </s>
funcom_train/40312381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsNullable_InvalidColumn1() { try { ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry); resMetaData.isNullable(-1); fail("SQLException is expected."); } catch(SQLException e) { //ensure the SQLException is thrown by isNullable method. assertEquals("The sqlstate mismatches", "22003", e.getSQLState()); } } COM: <s> tests is nullable with negative column index </s>
funcom_train/1719184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long length() throws IOException { if (lengthOfData() < 0) { return -1; } ByteArrayOutputStream overhead = new ByteArrayOutputStream(); sendStart(overhead); sendDispositionHeader(overhead); sendContentTypeHeader(overhead); sendTransferEncodingHeader(overhead); sendEndOfHeader(overhead); sendEnd(overhead); return overhead.size() + lengthOfData(); } COM: <s> return the full length of all the data </s>
funcom_train/8197079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLabelType(int type) { // FIXME: this attribute is never used - deprecate? if ((type != NO_LABELS) && (type != VALUE_LABELS)) { throw new IllegalArgumentException( "MeterPlot.setLabelType(int): unrecognised type."); } if (this.labelType != type) { this.labelType = type; notifyListeners(new PlotChangeEvent(this)); } } COM: <s> sets the label type either </s>
funcom_train/40884965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translate (float xAmount, float yAmount) { if (xAmount == 0 && yAmount == 0) return; if (integer) { xAmount = (int)xAmount; yAmount = (int)yAmount; } x += xAmount; y += yAmount; float[] vertices = this.vertices; for (int i = 0, n = idx; i < n; i += 5) { vertices[i] += xAmount; vertices[i + 1] += yAmount; } } COM: <s> sets the position of the text relative to its current position </s>