__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/45762139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getByName(String name) throws NoSuchElementException{ if (name.equals("XMLIsCorrect")) return new Boolean(this.check()); else if (name.equals("XMLCode")) { return writer.getBuffer().toString(); } else throw new NoSuchElementException(); } COM: <s> get an element by its name </s>
funcom_train/34105003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEdge(Edge edge) { // If either or both of the source and target of // the edge are in the palette, add this edge to // to list of edges to be added to the diagram. if (sourceInPalette(edge) || targetInPalette(edge)) { addEdge(edge.getSource(), edge, true); addEdge(edge.getTarget(), edge, edge.targetIsMethod()); } } COM: <s> associates the given edge with both its source </s>
funcom_train/34341940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCantidadProducto1() { if (cantidadProducto1 == null) {//GEN-END:|33-getter|0|33-preInit // write pre-init user code here cantidadProducto1 = new TextField("Cantidad del Producto 1", null, 5, TextField.NUMERIC);//GEN-LINE:|33-getter|1|33-postInit // write post-init user code here }//GEN-BEGIN:|33-getter|2| return cantidadProducto1; } COM: <s> returns an initiliazed instance of cantidad producto1 component </s>
funcom_train/32829771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isCustomCreateMethod(Method method) { Class<?>[] argumentTypes = method.getParameterTypes(); if (argumentTypes.length > 1) { return false; } if (argumentTypes.length == 1 && argumentTypes[0] != List.class) { return false; } return getCustomCreateMethodReturnType().isAssignableFrom(method.getReturnType()); } COM: <s> checks whether the given method is a custom create method </s>
funcom_train/40731292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAuthenticationPort(final String port) { createAuthenticationClientFactory(); if (LOGGER.isLoggable(Level.CONFIG)) LOGGER.config("AUTHENTICATION PORT: " + port); propertyValidators.add(new PropertyValidator() { void validate() { authenticationClientFactory.setPort(Integer.parseInt(port)); } }); } COM: <s> sets the port to use </s>
funcom_train/4291099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInstancePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IdentificationModel_instance_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IdentificationModel_instance_feature", "_UI_IdentificationModel_type"), IdentificationPackage.Literals.IDENTIFICATION_MODEL__INSTANCE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the instance feature </s>
funcom_train/8878026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { ChangeEvent evt; fireEditingStopped(); SelectedRow = table.getSelectedRow(); MainGUI Main = MainGUI.getInstance(); Main.DeleteRow(SelectedRow); ViewButtonColumn buttonColumn = new ViewButtonColumn(table, 5); DeleteButtonColumn deletebutton = new DeleteButtonColumn(table, 6); } COM: <s> if the button is clicked </s>
funcom_train/8405798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator valueIterator() { final Iterator iter = keyIterator(); return new Iterator() { public boolean hasNext() { return iter.hasNext(); } public Object next() { Object key = iter.next(); return get(key); } public void remove() { throw new UnsupportedOperationException( "remove() not supported for BeanMap" ); } }; } COM: <s> convenience method for getting an iterator over the values </s>
funcom_train/4508830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateSubsequentDomain(Element dbResult) { ServerDialback method = new ServerDialback(getConnection(), getServerName()); if (method.validateRemoteDomain(dbResult, getStreamID())) { // Add the validated domain as a valid domain addValidatedDomain(dbResult.attributeValue("from")); return true; } return false; } COM: <s> returns true if the request of a new domain was valid </s>
funcom_train/44020998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getOptionsRecalculateCpuConstantMenuItem() { if (optionsRecalculateCpuConstantMenuItem == null) { optionsRecalculateCpuConstantMenuItem = new JMenuItem(); optionsRecalculateCpuConstantMenuItem.setText("Recalculate CPU constant"); optionsRecalculateCpuConstantMenuItem.setMnemonic('e'); optionsRecalculateCpuConstantMenuItem.setDisplayedMnemonicIndex(1); optionsRecalculateCpuConstantMenuItem.addActionListener(eventHandler); } return optionsRecalculateCpuConstantMenuItem; } COM: <s> return the options recalculate cpu constant menu item </s>
funcom_train/4405278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void registerPlayer(NetworkPlayer player, GameBoard board) { if (!seatTable.containsKey(player)) { // Broadcast information broadcast(ServerResponse.JOIN + " " + player.id()); for (NetworkPlayer nplayer : getPlayers()) { player.getCommunicator().post(ServerResponse.JOIN + " " + nplayer.id()); } seatTable.put(player, board); } } COM: <s> register the player in this room with its participating game board </s>
funcom_train/32062110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void randomizeName() { if(Math.random() > 0.5f) { name = getRandomString(ScienceShipNames); } else if(Math.random() > 0.5f) { name = getRandomString(SpyShipNames); } else { name = getRandomString(WarShipNames ); } } COM: <s> creates a random name for the starship </s>
funcom_train/4347883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JsonWriter array() { if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') { this.push(null); this.append("["); this.comma = false; return this; } throw new JsonException("Misplaced array."); } COM: <s> begin appending a new array </s>
funcom_train/7284501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDatabase(Transaction txn, final Database database) { if (txn != null) { txn.addTxn(this, new Txn() { public void commit(Transaction txn) { removeDatabaseP(txn, database); } }); } else { removeDatabaseP(txn, database); } } COM: <s> removes database from this library </s>
funcom_train/25656484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void report() { crawllog.info(server.toString() + " traversed, " + numberLoaded + "(" + pages.size() + ") page acquired, avg load time was " + averageDownloadTime() + " ticks, crawl delay = " + server.getPolitenessDelay() + ", reset and start over."); crawllog.info("Restart at " + new Date(restartTime)); } COM: <s> report activity on the server to the crawllog </s>
funcom_train/5317881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addUser (String hashedID, String nick) { UserLookupList list = status.getUserLookupList (); String lname = list.getNickname (hashedID); if (lname != null) { if (lname.equals (nick)) return true; else { System.err.println ("*WW* multiple user identities."); return false; } } list.insertPair (hashedID, nick); return true; } COM: <s> add a user to the lookup list </s>
funcom_train/25649197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTestSetCount() { assertTrue(instance.getTestSetCount() == NUMBER_OF_TEST_SETS); int i = 1; while(!instance.isEmpty()) { instance.removeTestSet(0); assertTrue(instance.getTestSetCount() == (NUMBER_OF_TEST_SETS - i)); i++; } } COM: <s> test of get test set count method of class com </s>
funcom_train/14172053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWriteToFile() throws IOException { // Create and set up file String dataFileName = FILE_TEST; RandomAccessFile file = getRandomAccessFile(dataFileName); //write data to the file byte[] buffer = new byte[1024]; for (int i = 0; i < 100; i++) { file.write(buffer); } assertEquals(1024 * 100, file.length()); } COM: <s> tests how data is written to a random access file </s>
funcom_train/5317965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMessage (JID toAddress, FileshareComponentBuilder builder) { MessageBuilder mb = new MessageBuilder (); mb.setToAddress (toAddress); mb.setType ("chat"); builder.setHashedID (status.getHashedID ()); try { mb.addExtension (builder.build ()); connBean.send (mb.build ()); } catch (InstantiationException e) { System.err.println ("*EE* Could not send message: " + e); return; } } COM: <s> sends a jay share packet </s>
funcom_train/22003324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void finished() { try { deactivateGlassPane(); doUIUpdateLogic(); } catch (RuntimeException e) { // Do nothing, simply cleanup below log.log(Level.WARNING, "SwingWorker error", e); } finally { // Allow original component to get the focus if (getAComponent() != null) { getAComponent().requestFocus(); } } } COM: <s> called on the event dispatching thread not on the worker thread after </s>
funcom_train/37820090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseWheelMoved(MouseWheelEvent e) { javax.swing.JScrollBar scrollbar = scrollPane.getVerticalScrollBar(); if (e.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL) { int totalScrollAmount = e.getUnitsToScroll() * 4; scrollbar.setValue(scrollbar.getValue() + totalScrollAmount); } } COM: <s> faster scrolling realised via this method </s>
funcom_train/18052926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPasswordField getJPasswordFieldPassword() { if (jPasswordFieldPassword == null) { jPasswordFieldPassword = new JPasswordField(); jPasswordFieldPassword.setBounds(new Rectangle(312, 645, 130, 20)); jPasswordFieldPassword.setFont(new Font("Tahoma", Font.BOLD, 12)); } return jPasswordFieldPassword; } COM: <s> this method initializes j password field password </s>
funcom_train/41266435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Mngdoc entity) { EntityManagerHelper.log("deleting Mngdoc instance", Level.INFO, null); try { entity = getEntityManager().getReference(Mngdoc.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent mngdoc entity </s>
funcom_train/8886699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateMessages(ACESnippet snippet) { List<Message> messages = snippet.getMessages(); int errorMessageCount = getErrorMessageCount(messages); panelMessages.setTitle(PANEL_MESSAGES_TITLE + ": " + "Errors: " + errorMessageCount + " " + "Warnings: " + (messages.size() - errorMessageCount)); messagesTableModel.setMessages(messages); } COM: <s> p updates the messages panel </s>
funcom_train/45483963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setPreferredSize(new Dimension(220, 500)); //this.setSize(300, 568); this.setLayout(null); this.setSize(new Dimension(220, 500)); this.add(getJPanelKeyControl(), null); this.add(getJPanelFiles(), null); } COM: <s> this method initializes this </s>
funcom_train/17805025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCommunicationComponentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CommunicationComponent_CommunicationComponent_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CommunicationComponent_CommunicationComponent_feature", "_UI_CommunicationComponent_type"), CtbPackage.Literals.COMMUNICATION_COMPONENT__COMMUNICATION_COMPONENT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the communication component feature </s>
funcom_train/33645076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UniverseContext createEmptyRandom(AllParameters parameters) { UniverseContextStateFactory universeContextStateFactory = new UniverseContextStateFactory(); UniverseContextState universeContextState = universeContextStateFactory .createEmptyRandomUniverseContextState(parameters); BasicUniverseContext universeContext = new BasicUniverseContext(universeContextState); universeContext.init(); return universeContext; } COM: <s> create an empty random universe context from parameters </s>
funcom_train/44556172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNextString() { String theText; if (stringField==null) return ""; TextField tf = (TextField)(stringField.elementAt(sfIndex)); theText = tf.getText(); if (macro) { String label = (String)labels.get(tf); theText = Macro.getValue(macroOptions, label, theText); //IJ.write("getNextString: "+label+" "+theText); } if (recorderOn) recordOption(tf, theText); sfIndex++; return theText; } COM: <s> returns the contents of the next text field </s>
funcom_train/12804034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLPropertyManager getNewPropertyManager() { if (!(manager instanceof XMLPropertyManager)) { throw new EnvironmentalException("Cannot retrieve the new-style (XML-based) property manager, " + "since old-style property management is still in use."); } return (XMLPropertyManager) manager; } COM: <s> returns the new style property manager which allows access to all of the </s>
funcom_train/33149300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void push(String name, String replacementValue, boolean convertToHtml) { StringUtilities.validateNonZeroLength(name); if (replacementValue == null) throw new IllegalArgumentException("replacementValue was null for '" + name + "'"); replacements.add(new String[] { name, convertToHtml ? HtmlUtils.convertToHtml(replacementValue) : replacementValue }); } COM: <s> push a placeholder code and replacement value onto the stack with </s>
funcom_train/14307873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireStructureChanged() { TreeModelEvent evt = new TreeModelEvent(this, new TreePath(getRoot())); for(int i = 0; i < listeners.size(); i++) ((TreeModelListener)listeners.get(i)).treeStructureChanged(evt); } COM: <s> fired an event notifying listeners that the tree structure has changed </s>
funcom_train/4362220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConfigHome(String dir){ if( dir==null ) return; File f=new File(dir); if(!f.isDirectory()){ throw new IllegalArgumentException( "BaseConfig.setConfigHome(): "+ "Configuration Home must be a directory! : "+dir); } configHome = f; } COM: <s> set a path to the parent directory of the </s>
funcom_train/1460711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(byte[] buffer, int offset, int length) { if (closed) { return -1; } int totalBytesRead = 0; while (totalBytesRead < length) { int numBytesRead = super.read(buffer, offset + totalBytesRead, length - totalBytesRead); if (numBytesRead > 0) { totalBytesRead += numBytesRead; } else { reset(); } } return totalBytesRead; } COM: <s> reads code length code bytes from the array </s>
funcom_train/5232223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addEnterKeyBinding(JButton button) { Action action = button.getAction(); if (action != null) { button.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), action.getValue(Action.NAME)); button.getActionMap().put(action.getValue(Action.NAME), action); } } COM: <s> binds the enter key to the action when the button has focus </s>
funcom_train/43602857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String searchString) { if (searchString == null || searchString.trim().length() == 0) { return; } int lastIndex = recentSearches.indexOf(searchString); if (lastIndex != -1) { recentSearches.remove(lastIndex); } recentSearches.add(0, searchString); if (getLength() > getMaxRecents()) { recentSearches.remove(recentSearches.size() - 1); } save(); fireChangeEvent(); } COM: <s> add a search string as the first element </s>
funcom_train/2381175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IPlexGroup getParentGroupForNewEntry() { // Get selected tree node IStructuredSelection selection = (IStructuredSelection)_peopleGroupTreeViewer.getSelection(); Object obj = selection.getFirstElement(); // Parent Group IPlexGroup parentGroup = null; if(obj instanceof IPlexGroup) { parentGroup = (IPlexGroup)obj; } return parentGroup; } COM: <s> determine the parent group for a new person depending on what </s>
funcom_train/31105039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DOMError modifyDOMError(String message, short severity){ fDOMError.reset(); fDOMError.setMessage(message); fDOMError.setSeverity(severity); fDOMError.setLocator(new DOMLocatorImpl(-1, -1, -1, fCurrentNode, null)); return fDOMError; } COM: <s> the method modifies global dom error object </s>
funcom_train/41880129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public View getView(int position, View convertView, ViewGroup parent) { ImageView iv = new ImageView(mContext); //iv.setImageResource(mThumbIds[position]); iv.setAdjustViewBounds(true); iv.setLayoutParams(new Gallery.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); //iv.setBackgroundResource(R.drawable.picture_frame); return iv; } COM: <s> todo access to a serve via the internet to get files and dynamically </s>
funcom_train/23340174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getBoundaryEventsCheckBox() { if (boundaryEventsCheckBox == null) { boundaryEventsCheckBox = new JCheckBox(); boundaryEventsCheckBox.setText("Boundary Events"); boundaryEventsCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { toggleCheckBox(boundaryEventsCheckBox); } }); } return boundaryEventsCheckBox; } COM: <s> this method initializes boundary events check box </s>
funcom_train/26600943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFetched(Object key,boolean after) throws DException { if(key == null) return false; if(! status.containsKey(key)) return true; Object values = status.get(key); boolean[] afterBefore = (boolean[])values; return after ? afterBefore[1]: afterBefore[0] ; } COM: <s> if key not found in hashmap then return true </s>
funcom_train/4360466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setServletClass(String servletClass) { String oldServletClass = this.servletClass; this.servletClass = servletClass; support.firePropertyChange("servletClass", oldServletClass, this.servletClass); if (Constants.JSP_SERVLET_CLASS.equals(servletClass)) { isJspServlet = true; } } COM: <s> set the fully qualified servlet class name for this servlet </s>
funcom_train/9726877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readComment() { int c = nextChar(); while ((c >= 0) && !((c == '*') && (peekChar() == '/'))) c = nextChar(); if (c >= 0) c = nextChar(); //read off the '/' we peeked. } COM: <s> move the pointer past a c style comment </s>
funcom_train/18886637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modifyEntry(int index, int newValue) { if (index < 0 || index > size - 1) { throw new IndexOutOfBoundsException(); } // ((int[]) bufferArrayList.get((int) (index / pageSize)))[index % pageSize] = ((int[]) bufferArrayList.get((index >> exp)))[index & r] = newValue; } COM: <s> assigns a new int value to location index of the buffer instance </s>
funcom_train/3329920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name) { if ((name == null) || (ValidationUtils.isNCName(name))) { _name = name; } else { String err = "error: '" + name + "' is not a valid NCName."; throw new IllegalArgumentException(err); } } //-- setName COM: <s> sets the name of the element that this element definition defines </s>
funcom_train/4536121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertMessage(Message message) { // Fire Message Filters SparkManager.getChatManager().filterIncomingMessage(this, message); SparkManager.getChatManager().fireGlobalMessageReceievedListeners(this, message); addToTranscript(message, true); fireMessageReceived(message); SparkManager.getWorkspace().getTranscriptPlugin().persistChatRoom(this); } COM: <s> the main entry point when receiving any messages </s>
funcom_train/31079828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeProperty(String name) { if (name == null || _properties == null) return false; Property prop; for (int i = 0; i < _properties.size(); i++) { prop = (Property) _properties.get(i); if (prop.getName().equals(name)) { prop.invalidate(); _properties.remove(i); return true; } } return false; } COM: <s> remove the property with the given name </s>
funcom_train/44439399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createSidebar() { JPanel sidebar = new JPanel(); BoxLayout box = new BoxLayout(sidebar, BoxLayout.Y_AXIS); sidebar.setLayout(box); sidebar.add(new DatePickerPane()); sidebar.add(new NoteOperationsPane()); sidebar.setMaximumSize(sidebar.getPreferredSize()); return sidebar; } COM: <s> arranges the side bar including a </s>
funcom_train/36770542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateTesterList() { if (target == null) return; User selectedTester = getDefect().getTester(); testerBox.removeAllItems(); testerBox.addItem("Unassigned"); for (User tester : Controller.getInstance().getTesters()) { testerBox.addItem(tester); if (selectedTester instanceof User && selectedTester.equals(tester)) { testerBox.setSelectedItem(tester); } } } COM: <s> refreshes the list of testers and reselects the previously selected tester if any </s>
funcom_train/49789282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InternetApplication createInternetApplication() { ResourceSet set = new ResourceSetImpl(); URI uri = URI.createFileURI("queue.iaml"); Resource resource = set.createResource(uri); // create the model InternetApplication root = ModelFactory.eINSTANCE.createInternetApplication(); assertNotNull(root); assertNotEqual(root.getName(), "created successfully"); resource.getContents().add(root); assertNotNull(root.eResource()); return root; } COM: <s> create an internet application and make sure it is contained within </s>
funcom_train/24931234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean lock(File file, boolean block) { boolean flag = false; RandomAccessFile raf = null; logger.info("Getting lock on " + file.getAbsolutePath()); try { raf = new RandomAccessFile(file, "rw"); if (block) { raf.getChannel().lock(); flag = true; } else { if (null != raf.getChannel().tryLock()) { flag = true; } } } catch (Exception e) { System.err.println(e); } if (flag) { logger.info("Got lock!"); } return flag; } COM: <s> obtains a file lock </s>
funcom_train/28355739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setupPVText() { String s1 = "Connected PVs:\n\n"; Iterator itr = theDoc.getMPSPVSet().connectedPVs.iterator(); while (itr.hasNext()) { s1 += (String) itr.next() + "\n"; } pvView1.append(s1); String s2 = "Not Connected PVs:\n\n"; itr = theDoc.getMPSPVSet().badPVs.iterator(); while (itr.hasNext()) { s2 += (String) itr.next() + "\n"; } pvView2.append(s2); } COM: <s> setup the pv text area </s>
funcom_train/3329978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setParent(Structure parent) { if (parent != null) { switch (parent.getStructureType()) { case Structure.COMPLEX_TYPE: case Structure.GROUP: case Structure.MODELGROUP: case Structure.SCHEMA: break; default: String error = "Invalid parent for group"; throw new IllegalArgumentException(error); } } _parent = parent; } //-- setParent COM: <s> sets the parent for this group </s>
funcom_train/41761617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildXML(StringBuilder sb) { sb.append("<Element type=\"" + getType().name() + "\" id=\"" + id); sb.append("\" value=\"" + getAnswer()); sb.append("\" concept=\"" + getConcept()); sb.append("\"/>\n"); } COM: <s> make text element text into an xml string for storing or transmission </s>
funcom_train/40433705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(final String message) { String response = null; response = transport.send(message); // This is a very naive check to verify if the command was sucessful. It is // compatible with XML and name/value. if (-1 == response.indexOf("request-received")) { throw new RuntimeException("Unexpected response from GBuy: " + response); } } COM: <s> sends a message to the gbuy server corresponding to one of the order </s>
funcom_train/40873763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelection(ArrayList<Object> s) { /* it's necessary to remove the listener in order to avoid a "selection propagation loop" that will cause an overflow */ viewer.removeSelectionChangedListener(listener); if(s != null) { StructuredSelection temp = new StructuredSelection(s); viewer.setSelection(temp, true); } else { viewer.setSelection(null, false); } viewer.addSelectionChangedListener(listener); } COM: <s> set the selection of the object explorer </s>
funcom_train/44106124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAlbumThumbnail(ControllerContext ctx, Integer albumId, Integer thumbId) { Connection c = null; try { c = DBUtil.getConnection(); Statement st = c.createStatement(); st.execute("update album set thumbnail = " + thumbId + " where id = " + albumId); st.close(); } catch (SQLException se) { throw new RuntimeException("unable to set thumbnail: " + se); } finally { DBUtil.closeConnection(c); } } COM: <s> setzt das thumbnail f r das bergebene album </s>
funcom_train/10671226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void verifyThatBeanInfoInvoked(Class beanInfo) throws Exception { BeanInfoStatus myBeanInfo = (BeanInfoStatus)beanInfo.newInstance(); if (!myBeanInfo.getIsInvokedAndChangeToNotInvoked()) { throw new LocationException("wasn't invoked " + beanInfo); } } COM: <s> verify that get property descriptors method of code bean info code </s>
funcom_train/1164604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StatusStream getRetweetStream() throws WeiboException { try { return new StatusStream(http.post(getStreamBaseURL() + "1/statuses/retweet.json" , new PostParameter[]{}, true)); } catch (IOException e) { throw new WeiboException(e); } } COM: <s> returns a stream of all retweets </s>
funcom_train/25648393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File disposeImage(String name) { File disposed = null; File image = new File(this.directory, name); if (image.exists()) { log.debug("Renaming file " + name + " for later disposal.."); disposed = new File(this.directory, name.concat(".trash")); image.renameTo(disposed); } return disposed; } COM: <s> marks an image file for disposal by renaming it with filename extension </s>
funcom_train/15487550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonRestart() { if (jButtonRestart == null) { jButtonRestart = new JButton(Application.messages.getString("OPTIONS_PANEL_RESTART")); jButtonRestart.setBounds(new java.awt.Rectangle(247,269,170,25)); jButtonRestart.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { validateSettings(); Application.restart(); setVisible(false); } }); } return jButtonRestart; } COM: <s> this method initializes j button restart </s>
funcom_train/26280353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resize(int newWidth, int newHeight, int x_offset, int y_offset) throws JGimpException { m_App.callProcedure("gimp_image_resize", this, new JGimpInt32(newWidth), new JGimpInt32(newHeight), new JGimpInt32(x_offset), new JGimpInt32(y_offset)); } COM: <s> resizes the image </s>
funcom_train/4631710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(UserTO userTO){ setId(userTO.getId()); setFirstName(userTO.getFirstName()); setLastName(userTO.getLastName()); setUserName(userTO.getUserName()); setPassword(userTO.getPassword()); setStatus(userTO.getStatus()); } COM: <s> update user entity from a user to transfer object </s>
funcom_train/37831941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean nextTo(final int x, final int y, final double step) { final Rectangle2D thisArea = new Rectangle2D.Double(area.getX() - step, area.getY() - step, area.getWidth() + 2 * step, area.getHeight() + 2 * step); return thisArea.contains(x, y); } COM: <s> checks whether a certain point is near this entity </s>
funcom_train/15907289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceException(int rank, UmlTypeSpec t) throws RuntimeException { UmlCom.send_cmd(identifier_(), OnInstanceCmd.replaceExceptionCmd, rank, t); UmlCom.check(); if (defined_()) _exceptions[rank] = t.clone_it(); } COM: <s> replaces the exception at the given rank 0 </s>
funcom_train/1549617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(E element) { if (fast) { synchronized (this) { ArrayList<E> temp = (ArrayList<E>) list.clone(); boolean result = temp.add(element); list = temp; return (result); } } else { synchronized (list) { return (list.add(element)); } } } COM: <s> appends the specified element to the end of this list </s>
funcom_train/18721484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(List pointList) { String offset = OFFSET_PATH + "/" + DESCRIPTOR_TAG + "/"; String coords = mpeg7Convert.pointList2String(pointList); String dim = "" + pointList.size() * 2; setDomAttribute(offset, mpeg7Namespace, "dim", dim, xmlnsNamespace); setDomValue(offset, mpeg7Namespace, coords, ""); } COM: <s> use this for set shape </s>
funcom_train/14462482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { for (int i=0;i<chartArr.size();i++) { BiffRec b = (BiffRec)chartArr.get(i); if (b.getOpcode()==SERIESTEXT) { SeriesText st = (SeriesText) b; return st.toString(); } } return "undefined"; } COM: <s> return the string associated with this text disp object </s>
funcom_train/48119121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void keepClean(Statement statement, Connection con) { // You don't need to care about commit and close if you always keep the // house cleaned! That's nice, huh? try { if (con != null) { con.commit(); } } catch (SQLException e) { this.logger.warn("Error closing statement.", e); } try { if (statement != null) { statement.close(); } } catch (SQLException e) { this.logger.warn("Error closing statement.", e); } } COM: <s> keep house clean it means commit any modification to db and close the </s>
funcom_train/18150007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAdmissionReferralSourceCode(CE admissionReferralSourceCode) { if(admissionReferralSourceCode instanceof org.hl7.hibernate.ClonableCollection) admissionReferralSourceCode = ((org.hl7.hibernate.ClonableCollection<CE>) admissionReferralSourceCode).cloneHibernateCollectionIfNecessary(); _admissionReferralSourceCode = admissionReferralSourceCode; } COM: <s> sets the property admission referral source code </s>
funcom_train/18807882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDateConstructor1() { final TimeZone zone = TimeZone.getTimeZone("GMT"); final Millisecond m1 = new Millisecond(new Date(1016729759122L), zone); final Millisecond m2 = new Millisecond(new Date(1016729759123L), zone); assertEquals(122, m1.getMillisecond()); assertEquals(1016729759122L, m1.getLastMillisecond(zone)); assertEquals(123, m2.getMillisecond()); assertEquals(1016729759123L, m2.getFirstMillisecond(zone)); } COM: <s> in gmt the 4 </s>
funcom_train/28982782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NeighboorEntry getElement(long address){ int i = 0; boolean find = false; NeighboorEntry entry = null; while(i < nodes.size() && !find){ entry = (NeighboorEntry) nodes.elementAt(i); find = entry.getAddress() == address; i++; } if (!find) entry = null; return entry; } COM: <s> gets the entry which is composed by the following address </s>
funcom_train/22092900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendTo(DataOutputStream output) throws IOException { if (_method == CHUNKED) { if (_contentLength != 0) { output.writeBytes(Integer.toString(_contentLength, 16)); output.writeBytes("\r\n"); output.write(_buffer, 0, _contentLength); output.writeBytes("\r\n"); } output.writeBytes("0\r\n\r\n"); } else { if (_contentLength != 0) { output.write(_buffer, 0, _contentLength); } } } COM: <s> send to the output stream the http body in chunked content </s>
funcom_train/11728726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBoolean() throws RepositoryException { try { property.setValue(true); node.save(); fail("Property.setValue(boolean) must throw a VersionException " + "immediately or on save if the parent node of this property " + "is checked-in."); } catch (VersionException e) { // success } } COM: <s> tests if set value boolean throws a version exception immediately </s>
funcom_train/51226958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createArchVersionCombo() { GridData gridData3 = new GridData(); gridData3.widthHint = 250; gridData3.verticalAlignment = GridData.CENTER; gridData3.horizontalIndent = 0; gridData3.grabExcessHorizontalSpace = true; gridData3.horizontalAlignment = GridData.FILL; archVersionCombo = new Combo(this, SWT.READ_ONLY); archVersionCombo.setLayoutData(gridData3); } COM: <s> this method initializes arch version combo </s>
funcom_train/3371309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getBackground() { AccessibleContext ac = getCurrentAccessibleContext(); if (ac instanceof AccessibleComponent) { return ((AccessibleComponent) ac).getBackground(); } else { Component c = getCurrentComponent(); if (c != null) { return c.getBackground(); } else { return null; } } } COM: <s> get the background color of this object </s>
funcom_train/10361407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected FileType doGetType() throws Exception { if (fileObject != null) { return fileObject.getType(); } if (!file.exists() && file.length() < 1) { return FileType.IMAGINARY; } if (file.isDirectory()) { return FileType.FOLDER; } return FileType.FILE; } COM: <s> returns the files type </s>
funcom_train/37587558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _resumeHelper(boolean fromStep) throws DebugException { try { ThreadReference thread = _suspendedThreads.pop(); _log.log("In resumeThread()"); _resumeThread(thread, fromStep); } catch (NoSuchElementException e) { throw new DebugException("No thread to resume."); } } COM: <s> resumes execution of the currently suspended thread </s>
funcom_train/13393809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getExpires() { Object ret = getProperty(EXPIRES); if(ret == null) { return 0; } else if(ret instanceof Long) { return ((Long)ret).longValue(); } else if(ret instanceof String) { try { return Long.parseLong((String)ret); } catch (Exception ex) { ex.printStackTrace(); } } return 0; } COM: <s> get the expires for this object </s>
funcom_train/21984000
/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 == null ) { return false; } if (!( other instanceof TaxBucket )) { return false; } TaxBucket rhs = (TaxBucket)other; return ((EqualsUtil.areEqual( this.billingId, rhs.billingId )) && (EqualsUtil.areEqual( this.tax, rhs.tax )) && (EqualsUtil.areEqual( this.taxAmount, rhs.taxAmount ))); } COM: <s> returns true when the billing id the tax and the </s>
funcom_train/9049929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getTimeInterval() { double timeInterval = 0.00; try { String param = commandLine.getOptionValue(WAKEUP); timeInterval = Double.valueOf(param); } catch (NumberFormatException e) { System.out.println("A number was not entered. Enter a number."); } return timeInterval; } COM: <s> obtains parameter for wakeup argument </s>
funcom_train/42954274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); sb.append(this.getLatitudeString()); sb.append(PointSeparator); sb.append(this.getLongitudeString()); long ft = this.getFixtime(); if (ft > 0L) { sb.append(PointSeparator); sb.append(ft); } return sb.toString(); } COM: <s> returns string representation of the current geo point </s>
funcom_train/33986967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processLastPage(List productsOnLastPage) { if (productsOnLastPage.size() >= this.productsPerPage) return; List dummyProducts = new ArrayList(); int diff = this.productsPerPage - productsOnLastPage.size(); for (int i=0; i<diff; i++) { dummyProducts.add(new ProductBean()); } productsOnLastPage.addAll(dummyProducts); } COM: <s> add dummy products for the last page to simplify the presentation </s>
funcom_train/44099406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFuzzy(final double tolerance) { // TODO check this!! final double e = doubleValue() != 0.0 ? tolerance / doubleValue() : tolerance; final double epsilon = Math.max(Math.abs(e), getBound()); if (signum() == 0) // Note cannot use isZero() because then // recursion would occur return epsilon > 0; return Double.isNaN(epsilon) || epsilon >= 1; } COM: <s> method to determine if this object is of uncertain value due to fuzziness </s>
funcom_train/14073453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setEnableForGroup(Composite group, boolean enabled) { Control[] childs = group.getChildren(); for(Control child : childs) if(child instanceof Composite) { setEnableForGroup((Composite) child, enabled); } else if(!(child instanceof Label)) { child.setEnabled(enabled); } group.setEnabled(enabled); } COM: <s> enables disables a group and all its child controls </s>
funcom_train/4194719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onDlgNotify(SubscriberDialog dialog, NameAddress target, NameAddress notifier, NameAddress contact, String state, String content_type, String body, Message msg) { printLog("onDlgNotify()",LogLevel.MEDIUM); listener.onPaNotificationRequest(this,target,notifier,state,content_type,body); } COM: <s> when an incoming notify is received </s>
funcom_train/2894207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateWorkTypeSelectBox(String name, List worktypes, int iSize, String curValue) { List values = new ArrayList(); values.add(curValue); return generateWorkTypeSelectBox(name, worktypes, iSize, values, false); } COM: <s> worktype select box with multiple select disabled and one current value </s>
funcom_train/31158173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getElementName(IFXObject obj) throws IFXException { String elementName = bundle.getString(obj.getClass().getName()); if (elementName == null) { throw new IFXException("No element found for " + obj.getClass().getName()); } return elementName; } COM: <s> gets the element name from the object class name </s>
funcom_train/25305011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attachToHost(VirtualHost host) { if (getBaseRef() != null) { final String path = getBaseRef().getPath(); if (path == null) { host.attach("", this); } else { host.attach(path, this); } } else { getLogger() .warning( "The WADL application has no base reference defined. Unable to guess the virtual host."); } } COM: <s> attaches the application to the given host using the wadl base reference </s>
funcom_train/18335409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open() throws Exception { //Let the super class do its initialization job super.open(); //Get the operator configuration reputationManagementConfig BlackBoard bl = BlackBoard.getBlackBoard(); RequestParameter requestParameter = (RequestParameter) bl.get("RequestParameter"); reputationManagementConfig=(ReputationManagementConfig) requestParameter.getParameter("ReputationManagementConfig"); //Get the transaction Monitor object transactionMonitor = TransactionMonitor.getTransactionMonitor(); } COM: <s> the initialization method for the dishonest detection operator </s>
funcom_train/4920085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRawObject() throws Throwable { final MockRawObject dependency = new MockRawObject(); final AutoWire autoWire = new AutoWire(MockRawType.class); // Add the raw object dependency this.source.addObject(dependency, autoWire); // Record this.recordRawObjectType(dependency); this.recordOffice(autoWire); OfficeFloorManagedObject mo = this .recordRawObject(dependency, autoWire); this.recordOfficeObject(mo, autoWire); // Test this.doSourceOfficeFloorTest(); } COM: <s> ensure can load with a raw object </s>
funcom_train/37654238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleASTTypeChildren(Node node) { for (int x = 0; x < node.jjtGetNumChildren(); x++) { Node sNode = node.jjtGetChild(x); if (sNode instanceof ASTType) { Node nameNode = sNode.jjtGetChild(0); checkVariableType(nameNode, nameNode.getImage()); } } } COM: <s> convience method to handle hierarchy </s>
funcom_train/1294925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setStandardAttributes(Element activityElement, Activity activity) { // Set name Attr name = activityElement.getAttributeNode("name"); if (name != null && name.getSpecified()) activity.setName(name.getValue()); // Set suppress join failure Attr suppressJoinFailure = activityElement.getAttributeNode("suppressJoinFailure"); if (suppressJoinFailure != null && suppressJoinFailure.getSpecified()) activity.setSuppressJoinFailure(new Boolean(suppressJoinFailure.getValue().equals("yes"))); } COM: <s> sets the standard attributes name join condition and suppress join failure </s>
funcom_train/5806475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void forward(char ch) throws IOException { try { if (m_out != null) { m_out.write((int) ch); } } catch (IOException e) { if (log().isDebugEnabled()) { log().debug("An I/O error occured: " + e, e); } throw e; } } COM: <s> forwards the characters to the attached pipe </s>
funcom_train/6489207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLongDescription(String longDesc) { if (longDesc == null) longDesc = BLANK_STRING; if (!longDesc.equals(this.longDesc)) { this.longDesc = longDesc; evG.fireEvent(new DetailedChangeEvent(this, LONG_DESC)); } } COM: <s> set the long description of this object </s>
funcom_train/20294963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HtmlSelect getHtmlSelect() { HtmlSelect listSelect = new HtmlSelect(); if (emptyHtmlSelectRecord != null) { listSelect.addItem(-1, emptyHtmlSelectRecord); } for (Project thisProject : this) { listSelect.addItem( thisProject.getId(), thisProject.getTitle()); } return listSelect; } COM: <s> gets the html select attribute of the project list object </s>
funcom_train/2293982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getEntryType(int flags, boolean all) { for (int i = 0; i < getTypes(all).length; i++) { if ((flags & getTypesInt()[i]) > 0) { return getTypes(all)[i]; } } return UNKNOWN_TYPE; } COM: <s> determines the type of the current access control entry </s>
funcom_train/17789509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBlockHeight(int component) { int height = -1; if ((cocParametersList != null) && cocParametersList.containsKey(component)) { height = 1 << cocParametersList.get(component).blockHeight; } else if (codParameters != null) { height = 1 << codParameters.blockHeight; } else { assert (true); } return height; } COM: <s> returns the block height for the component code component code </s>
funcom_train/50464906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object work() { try { for(int i=5;i>=0;i--) { super.busyGlassPane.getBusyPanel().setText("Working "+i); Thread.currentThread().sleep(1000); //wait 1 second; } } catch(Exception exp) { exp.printStackTrace(); } return null; } COM: <s> do some work </s>
funcom_train/12476441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDropTargetEventDropTargetContext() { // Regression test for HARMONY-2430 try { new DropTargetEvent(null); fail("NPE was not thrown"); } catch (NullPointerException ex) { // passed } final DropTarget dt = new DropTarget(); final DropTargetEvent e = new DropTargetEvent(dt.getDropTargetContext()); assertSame(dt, e.getSource()); } COM: <s> test method for </s>
funcom_train/20270919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Charset getInputCharset() throws FlagUsageException { if (!config.charset.isEmpty()) { if (!Charset.isSupported(config.charset)) { throw new FlagUsageException(config.charset + " is not a valid charset name."); } return Charset.forName(config.charset); } return Charsets.UTF_8; } COM: <s> query the flag for the input charset and return a charset object </s>