__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/1575669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PrjFileReader openPrjReader(final String shpFileStr) throws IOException { ShpFiles shpFile = null; String path = shpFileStr.substring(0, shpFileStr.length() - 3) + "prj"; File file = new File(path); if ( !file.exists() ) { return null; } shpFile = new ShpFiles(path); // if ( shpFile == null ) { return null; } return new PrjFileReader(shpFile); } COM: <s> this function allows to load a </s>
funcom_train/16556216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getNextCloser(StreamTokenizer tokenizer) throws IOException, ParseException { String nextWord = getNextWord(tokenizer); if (nextWord.equals(")")) { return nextWord; } throw new ParseException("Expected ')' but encountered '" + nextWord + "'"); } COM: <s> returns the next in the stream </s>
funcom_train/4123831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addGoodsTradeItem(Player source, Goods goods) { Player destination; if (source == otherPlayer) { destination = player; } else { destination = otherPlayer; } agreement.add(new GoodsTradeItem(getGame(), source, destination, goods, settlement)); } COM: <s> adds a code goods trade item code to the list of trade items </s>
funcom_train/23980801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isUsedFile(String file) { String[] usedFiles = getUsedFiles(); for (int i=0; i<usedFiles.length; i++) { if (usedFiles[i].equals(file) || usedFiles[i].equals(new Location(file).getAbsolutePath())) { return true; } } return false; } COM: <s> returns true if the given file name is in the used files list </s>
funcom_train/37820380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void undoBooleans() { if (this.oldRunningStatus) myModel.enableAlgorithmRunning(); else myModel.disableAlgorithmRunning(); if (this.oldFinishedStatus) myModel.enableAlgorithmFinished(); else myModel.disableAlgorithmFinished(); if (this.wasPositionBehindElem) myModel.enablePositionBehind(); else myModel.disablePositionBehind(); if (this.oldFinishedWithSuccessStatus) myModel.enableFinishedWithSuccess(); else myModel.disableFinishedWithSuccess(); } COM: <s> method can be used to reset some booleans during undo </s>
funcom_train/43246164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEmailAddress() { System.out.println("setEmailAddress"); String emailAddress = ""; AddlDemographicsObject instance = new AddlDemographicsObject(); instance.setEmailAddress(emailAddress); // 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 email address method of class org </s>
funcom_train/2504837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void broadcastButtonActionPerformed(java.awt.event.ActionEvent event) { Thread.currentThread().setName(configuration.getNodeID() + "#Application"); log.info("Message sent from the application."); sepp.sendMessage(messageInput.getText().getBytes(), Constants.ALL_PEERS, new MessageType(MessageType.CHAT_APPLICATION)); addMessage(configuration.getNodeID(), messageInput.getText().getBytes()); messageInput.setText(""); } COM: <s> if the broadcast button is pressed this peer sends the text written in </s>
funcom_train/1344154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void aClientHasLeftTheGame( final int clientIndex ) { clientsPlayers .removeElementAt( clientIndex ); clientsPlayerModels.removeElementAt( clientIndex ); if ( ourClientIndex > clientIndex ) ourClientIndex--; for ( int i = clientIndex; i < clientsPlayers.size(); i++ ) for ( final Player player : clientsPlayers.get( i ) ) player.setClientIndex( i ); } COM: <s> this method is called when a client leaves the game </s>
funcom_train/1883670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getAllRadioButton() { if (this.allRadioButton == null) { this.allRadioButton = new JRadioButton(); this.allRadioButton.setText("Search using all tags"); this.allRadioButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { TagCloudBrowserPanel.this.invokeTagSearch(); } }); } return this.allRadioButton; } COM: <s> this method initializes all radio button </s>
funcom_train/12926057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDefaultAccountFromCombo(CAccountElement elem) { // Default account String newValue = getDefaultAccountComboValue(); CDefAcctTableModel tModel = (CDefAcctTableModel)defAcctTable.getModel(); tModel.setAssignment(elem,newValue); elem.setDefaultAccount(newValue); } COM: <s> sets the default account of the account element elem to the current value </s>
funcom_train/23721755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties getDynamicVersionInfo() throws SvnException { int sandboxRevision = getSubversionInfo(null); int headRevision = getSubversionInfo("HEAD"); Properties props = new Properties(); props.setProperty(DANNO_SANDBOX_REV_PROP, Integer.toString(sandboxRevision)); props.setProperty(DANNO_HEAD_REV_PROP, Integer.toString(headRevision)); return props; } COM: <s> get dynamic version info by probing with svn info </s>
funcom_train/45601350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public Token_mxJPO getToken(int index) { Token_mxJPO t = token; for (int i = 0; i < index; i++) { if (t.next != null) t = t.next; else t = t.next = token_source.getNextToken(); } return t; } COM: <s> get the specific token </s>
funcom_train/47282275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getCustomColour(Color initial) { if (initial == null) { initial = Color.BLACK; } colourChooser.setColor(initial); ColorTracker ok = new ColorTracker(colourChooser); JDialog dialog = JColorChooser.createDialog(getFrame(), "Choose a custom colour", true, colourChooser, ok, null); dialog.setVisible(true); return ok.getColor(); } COM: <s> opens a dialog for the user to choose a custom colour </s>
funcom_train/25130668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUIMap(Map<String, String> uiMap) { if (this.uiMap != null) { this.uiMap.putAll(uiMap); } else { // need to do this instead of just this.uiMap = uiMap, to avoid to change // the default UIs if we just define UIs for a particular UIDEfinition this.uiMap = new HashMap<String, String>(uiMap); } } COM: <s> add a ui mapping for a ui definition </s>
funcom_train/29919472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableCellEditor getCellEditor(int row, int column) { int modelColumn = convertColumnIndexToModel(column); if (modelColumn == 1 && (row == 4 || row == 5)) return (TableCellEditor) editors[row]; else return super.getCellEditor(row, column); } COM: <s> determine editor to be used by row </s>
funcom_train/29768552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logAllEntries() { Enumeration<? extends ZipEntry> entriesIter = getOfficeFile().entries(); while (entriesIter.hasMoreElements()) { ZipEntry entry = entriesIter.nextElement(); _log.info("logAllEntries", new Object[] { entry.getName() }); } } COM: <s> logs all entries of the word document zip file using </s>
funcom_train/46718620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public E getByLanguage(String language) { E result = null; int bestMatch = -1; for (Iterator<E> it = iterator(); it.hasNext();) { E thisEntry = it.next(); int thisMatch = LanguageDictionary.compareLanguages(language,thisEntry.getLanguage()); if (thisMatch > bestMatch) { result = thisEntry; bestMatch = thisMatch; } } return result; } COM: <s> get the entry of the list that best matches a given language code </s>
funcom_train/46123454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Language getDefaultSpokenLanguage(Map<Language, Boolean> pUserSpokenLanguages) { if(pUserSpokenLanguages == null) { return null; } for(Map.Entry<Language, Boolean> userSpokenLanguage : pUserSpokenLanguages.entrySet()){ if(userSpokenLanguage.getValue() == true) { return userSpokenLanguage.getKey(); } } return null; } COM: <s> finds and returns a users default spoken language </s>
funcom_train/18575666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ParameterType convertSimpleType (String sbwType) throws EInvalidSBWType { if (sbwType.equals("byte")) return ParameterType.BYTE; else if (sbwType.equals("int")) return ParameterType.INTEGER; else if (sbwType.equals("double")) return ParameterType.DOUBLE; else if (sbwType.equals("boolean")) return ParameterType.BOOLEAN; else if (sbwType.equals("string")) return ParameterType.STRING; else if (sbwType.equals("void")) return ParameterType.VOID; else if (sbwType.equals("{}")) return ParameterType.LIST; // something of a kludge else throw new EInvalidSBWType(sbwType); } COM: <s> convert a simple parameter type into its gum parameter type equivalent </s>
funcom_train/46858657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnUndelete() { if (btnUndelete == null) { btnUndelete = new JButton(); btnUndelete.setIcon(new ImageIcon(getClass().getResource("/resources/icons/undelete.png"))); btnUndelete.setToolTipText("Undelete"); btnUndelete.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getMapDisplay().UndeleteSelectedObjects(); } }); } return btnUndelete; } COM: <s> this method initializes btn undelete </s>
funcom_train/47031459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createFieldEditors() { super.createFieldEditors(); addField(new StringFieldEditor(IPreferenceConstants.CSSEDITOR_INITIAL_FILE_NAME, Messages.GeneralPreferencePage_DefaultFileName, getFieldEditorParent())); TextFieldEditor contents = new TextFieldEditor(IPreferenceConstants.CSSEDITOR_INITIAL_CONTENTS, Messages.GeneralPreferencePage_InitialFileContents, TextFieldEditor.UNLIMITED, TextFieldEditor.VALIDATE_ON_KEY_STROKE, getFieldEditorParent(), SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); addField(contents); } COM: <s> creates the field editors </s>
funcom_train/18186843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUser(User user) { if (user == null) { throw new IllegalArgumentException("Parameter user cannot be null"); } applicationStateManager.set(User.class, user); UserLogoutListener listener = new UserLogoutListener(user, userController); request.getSession(true).setAttribute(USER_LOGOUT_LISTENER_ATTRIBUTE, listener); } COM: <s> invokes application state manager </s>
funcom_train/7506048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invokePluginContextDestroyed(ServletContextEvent evt) { for (ApplicationContextPlugin plugin : getApplicationContextPlugins()) { for (ContextLoaderListener listener : plugin.getContextLoaderListeners()) { try { listener.contextDestroyed(evt); } catch (Exception e) { log.error("error in contextDestroyed for plugin '" + plugin.getName() + "'", e); } } } } COM: <s> invokes context destroyed for every registered plugin </s>
funcom_train/11733236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QNodeDefinition getDefinition() throws RepositoryException { if (def == null) { EffectiveNodeType ent = getParent().getEffectiveNodeType(); def = ent.getApplicableChildNodeDef(getName(), nodeState.getNodeTypeName(), ntReg); } return def; } COM: <s> returns the qnode definition for this state </s>
funcom_train/13246763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyTyped(KeyEvent e) { // !e.isControlDown() && // if (e.getKeyChar() != KeyEvent.CHAR_UNDEFINED // && e.getKeyChar() != KeyEvent.VK_ESCAPE) { // if (!getHasTextAreaChanged()) // JOptionPane.showMessageDialog(e.getComponent(), "KeyTyped"); // setHasTextAreaChanged(true); // clearSavedPosition(); // } } COM: <s> invoked when a key has been typed </s>
funcom_train/43145033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addGraph(String label, int color) { GraphData graph = new GraphData(); graph.color = color; graph.label = label; graph.signal = new Signal(); graph.data = new double[(int )content.getWidth()]; graphs.put(label, graph); setLabelBottomHeight((graphs.size() * Fonts.LINE_HEIGHT) + Fonts.LINE_SPACING); } COM: <s> adds a graph that will be drawn periodically </s>
funcom_train/41621861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processRelative() { this.transform.loadIdentity(); if(this.parent >= 0) this.transform.set(this.modelNode.getJoint(this.parent).getTransform()); else this.transform.set(this.getBaseTransform()); this.transform.multLocal(new TransformMatrix(this.orientation, this.translation), new Vector3f()); } COM: <s> process the relative transforms of this code joint code </s>
funcom_train/41831453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isZoneToggleOn(String zNameIn) { boolean pressed = false; for (int i = 0; i < tzone.length; i++) { if (tzone[i] != null) { if (tzone[i].name.equals(zNameIn) && tzone[i].touches % 2 == 1) pressed = true; } } return pressed; } COM: <s> determine the toggle state of the zone </s>
funcom_train/38851747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double modularity(){ double q = 0; double m2 = (double)graph.getTotal_weight(); for( int i = 0; i < this.network_size; i++ ){ if( tot.get(i) > 0 ){ q += (double) in.get(i) / m2 - ((double) tot.get(i) / m2) * ((double) tot.get(i) / m2); } } return q; } COM: <s> calculates the modularity of the community graph </s>
funcom_train/15606426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getOIDValueForGA(String gaName) { // Check: starts with prefix? // This converter assumes that if the prefix is not there, this // input string is still a GA name. if (gaName.startsWith(GA_PREFIX)) gaName = gaName.substring(GA_PREFIX.length()); return gaSuffixToOIDLong(gaName); } // End method: getOIDSringForGA COM: <s> converts a ga name with or without prefix to an oid numeric suffix </s>
funcom_train/43100738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getModule(String key) { ListIterator iterator = moduleClasses.listIterator(); while (iterator.hasNext()) { Object obj = iterator.next(); if (obj instanceof ArgoModule) { if (key.equals(((ArgoModule) obj).getModuleKey())) { return obj; } } } return null; } COM: <s> locates a module by key </s>
funcom_train/9646395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validate() { config.setMinItemLifeTime(minLifeTime.getSelection()); config.setMaxItemLifeTime(maxLifeTime.getSelection()); config.setItemCreationProbability( (double)creationProbability.getSelection() / 100.0); config.setPartSize(partSize.getSelection()); config.setMaxItemsOnField(maxItems.getSelection()); } COM: <s> reads the data from the gui into the model config </s>
funcom_train/5512278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getInputCommand(String received) { System.out.println("Received " + received); if(received.equals("Run")) { MakeRun(); } else if(received.equals("Jump")) { MakeJump(); } else if(received.equals("Freeze")) { MakeFreeze(); } else if(received.equals("Walk")) { MakeWalk(); } } COM: <s> maps input strings to related methods </s>
funcom_train/28996353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeChannel(Channel c) { if (getChannels().length > 0) { Vector cs = new Vector(Arrays.asList(channels)); cs.remove(c); channels = (Channel[]) cs.toArray(new Channel[0]); for (int i = 0; i < channels.length; i++) { channels[i].setPosition(i); } } } COM: <s> removes the channel specified from the array of channels </s>
funcom_train/21483240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLoadConfigurationFromInvalidXMLFileWithDefaultCacheNameUsed() throws Exception { File file = new File(TEST_CONFIG_DIR + "ehcache-withdefaultset.xml"); try { Configuration configuration = ConfigurationFactory.parseConfiguration(file); } catch (CacheException e) { assertTrue(e.getMessage().contains("The Default Cache has already been configured")); } } COM: <s> tests that you cannot use the name default for a cache </s>
funcom_train/3013248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void execScriptAsync(final Script script, final BSFManager bsf) { Runnable r = new Runnable() { public void run() { initNDC(); execScript(script, bsf); removeNDC(); } }; Thread t = new Thread(r, script.getFile() + "@" + r.hashCode()); t.setDaemon(true); t.start(); } COM: <s> execute the given script asynchronously </s>
funcom_train/11687177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deployMediatorExtensions() { log.info("Loading mediator extensions..."); AxisConfigurator configurator = configurationContext.getAxisConfiguration().getConfigurator(); if (configurator instanceof DeploymentEngine) { ((DeploymentEngine) configurator).getRepoListener().checkServices(); } else { log.warn("Unable to access the repository listener. Custom extensions will " + "not get loaded now!"); } } COM: <s> deploys the mediators in the mediator extensions folder </s>
funcom_train/802789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCompletionTimePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SoftwareType_completionTime_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SoftwareType_completionTime_feature", "_UI_SoftwareType_type"), MzdataPackage.Literals.SOFTWARE_TYPE__COMPLETION_TIME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the completion time feature </s>
funcom_train/51299392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canDelete() { String sql = "SELECT can_delete FROM document WHERE id = " + "(SELECT max(id) FROM document)"; ResultSet res = null; try { res = DBAccessor.getInstance().makeSelect(sql); if (res.next()) return res.getBoolean("can_delete"); return false; } catch (Exception e) { e.printStackTrace(); return false; } finally { DBAccessor.getInstance().releaseConnection(res); } } COM: <s> checks whether doc may be deleted </s>
funcom_train/21224212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getConnectionSignal(PortInstance port) { if (port instanceof InPortInstance) { return (port.getTargetConnections().isEmpty()) ? getUnconnectedSignal(port) : getConnectedSignal(port); } else { return (port.getSourceConnections().isEmpty()) ? getUnconnectedSignal(port) : getConnectedSignal(port); } } COM: <s> returns the signal to use for the specified </s>
funcom_train/28362813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override protected void wrapPVs( final String[] pvs ) { List<ChannelBufferWrapper> wrappers = new ArrayList<ChannelBufferWrapper>(pvs.length); for ( int index = 0 ; index < pvs.length ; index++ ) { ChannelBufferWrapper wrapper = new ChannelBufferWrapper(pvs[index]); wrapper.addConnectionListener(_connectionHandler); wrappers.add(wrapper); } _channelWrappers = wrappers.toArray(new ChannelBufferWrapper[wrappers.size()]); } COM: <s> create channel wrappers for the specified pvs </s>
funcom_train/20900367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disposeServiceCollectors() { logger.finer("disposeServiceCollectors()"); synchronized (serviceCollectors) { for (Iterator i=serviceCollectors.values().iterator(); i.hasNext(); ) { ServiceCollector collector = (ServiceCollector) i.next(); removeServiceListener(collector.type, collector); } serviceCollectors.clear(); } } COM: <s> this method disposes all service collector instances which have been </s>
funcom_train/21189216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String lookupValue(Element log) throws CruiseControlException { if (!wasValidated) { throw new IllegalStateException( "This child was not validated." + " Should not be calling lookupValue() unless it has first been validated."); } if (value != null) { return value; } else { try { return evaluateXpath(log); } catch (Exception e) { throw new CruiseControlException(e); } } } COM: <s> looks up the appropriate value based on how the class is being used </s>
funcom_train/39853287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object put(Object key, Object value) { KeyAndValue kv = (KeyAndValue)this.map.put( ((String)key).toLowerCase(), new KeyAndValue(key,value)); if (kv == null) { return null; } else { return kv.getValue(); } } COM: <s> associates the specified value with the specified key </s>
funcom_train/13576096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(int Iter) throws IOException { this.out.write(Iter + "\t" + this.personCnt + "\t" + this.licensedCnt + "\t" + this.licensedPtUserCnt + "\t" + getLicensedPtRate() + "\t" + this.licensedCarUserCnt + "\t" + getLicensedCarRate() + "\t" + this.licensedOtherModalCnt + "\t" + getLicensedOtherModalRate() + "\n"); this.out.flush(); } COM: <s> writes public transit user amount and fraction into </s>
funcom_train/16532386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAllProxies(HashMap<String, ProxyInterface> proxies) { /* first, remove all existing proxies from the DOM tree */ String[] proxyNames = settingsHandler.getAllProxyNames(); for(int i=0; i< proxyNames.length; i++) { try { settingsHandler.removeProxy(proxyNames[i]); } catch(NoSuchSettingException e) { // do nothing - all names have been explicitly requested } } Iterator<ProxyInterface> i = proxies.values().iterator(); while(i.hasNext()) { settingsHandler.setProxy(i.next()); } } COM: <s> sends a collection of proxies to the settings file </s>
funcom_train/5462095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlFreeBusyProperty(Property property, Resource parentNode, RDFContainer rdfContainer) { List<Node> valueList = getMultipleRdfPropertyValues(rdfContainer, property, IcalDataType.PERIOD); for (Node node :valueList) { Resource resource = node.asResource(); addStatement(rdfContainer,parentNode, NCAL.freebusy,resource); addStatement(rdfContainer,resource,RDF.type,NCAL.FreebusyPeriod); } } COM: <s> crawls the freebusy property </s>
funcom_train/19849102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHeaders() { String value = ""; Entry<String, String> entry; value += "Status: " + this.status + "\r\n"; value += "Reason: " + this.reason + "\r\n"; Iterator<Entry<String, String>> iterator = this.hashmap.entrySet() .iterator(); while (iterator.hasNext()) { entry = iterator.next(); value += entry.getKey() + ": " + entry.getValue() + "\r\n"; } return value + "\r\n"; } COM: <s> it organizes the header value as header value and returns the string </s>
funcom_train/22064335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getResults() { if (results == null) { GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); gridBagConstraints1.fill = GridBagConstraints.BOTH; gridBagConstraints1.weighty = 1.0; gridBagConstraints1.weightx = 1.0; results = new JPanel(); results.setLayout(new GridBagLayout()); results.add(getJScrollPane(), gridBagConstraints1); } return results; } COM: <s> this method initializes results </s>
funcom_train/10345763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIssuerDN(Principal iss) { if (iss instanceof codec.x501.Name) { issuer = (codec.x501.Name) iss; TBSCertList.set(2, iss); } else { try { issuer = new codec.x501.Name(iss.toString(), -1); } catch (BadNameException e) { throw new RuntimeException("bad principal name:" + e.getMessage()); } } } COM: <s> sets this issuer </s>
funcom_train/10482510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String recipientType(Message.RecipientType type) throws MessagingException { if (type == Message.RecipientType.TO) { return "TO"; } if (type == Message.RecipientType.CC) { return "CC"; } if (type == Message.RecipientType.BCC) { return "BCC"; } throw new SearchException("Unsupported RecipientType"); } COM: <s> translate a recipient type into its string name equivalent </s>
funcom_train/44283737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void requestPatchDump(int bankNum, int patchNum) { patchNum += 96; send(SYS_REQ.toSysexMessage(getChannel(), new SysexHandler.NameValue("channel", getChannel()), new SysexHandler.NameValue("patchNum", patchNum) ) ); } COM: <s> requests a dump of the system info message </s>
funcom_train/34564744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String string() { while(args.charAt(c) == ' ') if(++c == args.length()) return ""; final int i = args.indexOf(' ', c); final String s = args.substring(c, i); c = i; return s.trim(); } COM: <s> returns the next string </s>
funcom_train/36933026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bufferData(CCBufferTarget theTarget, int theSize, Buffer theData, CCUsageFrequency theUsageFrequency, CCUsageTYPE theUsageType){ bind(theTarget); if(theData != null)theData.rewind(); _mySize = theSize; CCGraphics.currentGL().glBufferData(theTarget.glId, theSize, theData, glUsage(theUsageFrequency, theUsageType)); unbind(); } COM: <s> creates a new data store for the buffer object currently bound to target </s>
funcom_train/19138033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { super.clear(); int[] keys = _set; float[] vals = _values; byte[] states = _states; for (int i = keys.length; i-- > 0;) { keys[i] = (int)0; vals[i] = (float)0; states[i] = FREE; } } COM: <s> empties the map </s>
funcom_train/39491551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveCollapsibleEndFiller(JXCollapsiblePane collapsiblePane) { Component end = collapsibleEndFiller.get(collapsiblePane); if (end != null) { collapsiblePane.getContentPane().remove(end); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridheight = 1; gbc.gridwidth = 1; gbc.gridx = 0; gbc.gridy = m_gbc.gridy + 1; collapsiblePane.getContentPane().add(end, gbc); } } COM: <s> move the end spacer of the collapsible pane </s>
funcom_train/37613773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeHeaders(StringBuffer response) { response.append("HTTP/1.0 200 OK\r\n"); for (NVPair pair : m_headers) { response.append(pair.getName()).append(": ").append(pair.getValue()); response.append("\r\n"); } } COM: <s> subclass httprequest handler to change these default headers </s>
funcom_train/8311726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Vector evaluatePredicates(Vector contextNodeSet, ContextSupport support) throws JaxenException { if ((predicates.size()) == 0) { return contextNodeSet; } Enumeration predIter = predicates.elements(); Vector nodes2Filter = contextNodeSet; while (predIter.hasMoreElements()) { nodes2Filter = applyPredicate(((Predicate) (predIter.nextElement())), nodes2Filter, support); } return nodes2Filter; } COM: <s> p returns all of the supplied nodes that satisfy </s>
funcom_train/3176025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNoOfFams() { int result = 0; for (int i=0,j=getNoOfProperties();i<j;i++) { Property prop = getProperty(i); if ("FAMS".equals(prop.getTag())&&prop.isValid()) result++; } return result; } COM: <s> returns the number of families in which the individual is a partner </s>
funcom_train/31438210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImageIndex(int pIndex) { if (pIndex >= mSourceImages.length) { throw new IndexOutOfBoundsException(); } if (pIndex != mImageIndex) { final int oldIndex = mImageIndex; mImageIndex = pIndex; firePropertyChange(INDEX_PROPERTY, oldIndex, pIndex); } } COM: <s> set which image index to display in the canvas </s>
funcom_train/3976860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Color getColor (Object item) { if (colorTable.containsKey(item)) return colorTable.get(item); Color color = new Color(Color.HSBtoRGB(random.nextFloat(), 1.0f, 1.0f)); colorTable.put(item, color); return color; } COM: <s> get the color for the spcified item generate a new color if necessary </s>
funcom_train/3985821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void transpose() { float temp; temp = m01; m01 = m10; m10 = temp; temp = m02; m02 = m20; m20 = temp; temp = m03; m03 = m30; m30 = temp; temp = m12; m12 = m21; m21 = temp; temp = m13; m13 = m31; m31 = temp; temp = m23; m23 = m32; m32 = temp; } COM: <s> transpose this matrix </s>
funcom_train/1953604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeIntegerToByteArray(int value) { byte[] intBytes = new byte[4]; intBytes[3] = (byte)value; value>>>=8; intBytes[2] = (byte)value; value>>>=8; intBytes[1] = (byte)value; value>>>=8; intBytes[0] = (byte)value; try { stream.write(intBytes); } catch (IOException e) { throw new RuntimeException("You're screwed: IOException writing to a ByteArrayOutputStream"); } } COM: <s> convert an integer to byte array </s>
funcom_train/35133138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int copyStart(byte[] to, int atOffset) { int availableSpace = to.length - atOffset; int n = Math.min(this.getLength(), availableSpace); System.arraycopy(buffer.getInnerByteBuffer(), 0, to, atOffset, n); return n; } COM: <s> copy the the buffer at the destination offset of the provided array </s>
funcom_train/5165489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValid(final Gene[] a_case, final Supergene a_forSupergene) { throw new Error("For " + getClass().getName() + ", override " + " isValid (Gene[], Supergene) or set an" + " external validator."); } COM: <s> test the given gene list for validity </s>
funcom_train/48233562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws NetworkException { Logger.log("NetworkHandler", "start", "Begin"); if (this.serverSocket != null) { return; } try { activedSocketList = new HashMap<Integer, SocketConnection>(); serverSocket = new ServerSocket(NetConfig.STADIUM_PORT_CLIENT_LISTEN); new Thread(this).start(); } catch (Exception e) { throw new NetworkException("Unable to start listenning NetworkHandler on Port " + NetConfig.STADIUM_PORT_CLIENT_LISTEN); } Logger.log("NetworkHandler", "start", "End"); } COM: <s> call to start to listen incoming connections </s>
funcom_train/3413483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processInputMethodEvent(InputMethodEvent e) { InputMethodListener listener = inputMethodListener; if (listener != null) { int id = e.getID(); switch (id) { case InputMethodEvent.INPUT_METHOD_TEXT_CHANGED: listener.inputMethodTextChanged(e); break; case InputMethodEvent.CARET_POSITION_CHANGED: listener.caretPositionChanged(e); break; } } } COM: <s> processes input method events occurring on this component by </s>
funcom_train/46190233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSingleEmailAddress() { blog.setProperty(Blog.EMAIL_KEY, "me@mydomain.com"); assertEquals("me@mydomain.com", blog.getEmail()); assertEquals(1, blog.getEmailAddresses().size()); assertEquals("me@mydomain.com", blog.getEmailAddresses().iterator().next()); } COM: <s> tests setting a single e mail address </s>
funcom_train/41385613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJcbRevista() { if (jcbRevista == null) { jcbRevista = new JCheckBox(); jcbRevista.setBounds(new Rectangle(30, 65, 20, 20)); jcbRevista.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { selectAnyOne(jcbRevista, jcbCarrera, jcbFechas, jcbProveedor); } }); } return jcbRevista; } COM: <s> this method initializes jcb revista </s>
funcom_train/1151924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand22() { if (itemCommand22 == null) {//GEN-END:|411-getter|0|411-preInit // write pre-init user code here itemCommand22 = new Command("Escuchar", Command.ITEM, 0);//GEN-LINE:|411-getter|1|411-postInit // write post-init user code here }//GEN-BEGIN:|411-getter|2| return itemCommand22; } COM: <s> returns an initiliazed instance of item command22 component </s>
funcom_train/21116890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetBosMu() { System.out.println("setBosMu"); boolean bosMu = true; Zaman instance = new Zaman(); instance.setBosMu(bosMu); // 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 bos mu method of class persistence </s>
funcom_train/15911320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFullAlias(Slot s) { String da = getAlias(s.owner); String ds = getAlias(s); // REMOVE if (da == null) da = "??"; if (ds == null) ds = s.getName(); if (da != null && ds != null) return da + "." + ds; else return null; } COM: <s> returns the full slot alias dev alias </s>
funcom_train/23868555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void compare(final String sentence, final String [] expectedTokens, final String [] resultingTokens) { assertEquals("Wrong number of tokens for sentence:" + sentence, expectedTokens.length, resultingTokens.length); for (int i = 0; i < resultingTokens.length; i++) { assertEquals("Wrong token for sentence:" + sentence, expectedTokens[i], resultingTokens[i]); } } COM: <s> for the supplied sentence string this method compares the expected </s>
funcom_train/5864702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPagingPosition(String pagingPosition) { if (pagingPosition == null || (!pagingPosition.equals("top") && !pagingPosition.equals("bottom") && !pagingPosition.equals("both"))) throw new WrongValueException("Unsupported position : "+pagingPosition); if(!Objects.equals(_pagingPosition, pagingPosition)){ _pagingPosition = pagingPosition; invalidate(); } } COM: <s> sets how to position the paging of grid at the client screen </s>
funcom_train/47160452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeFact(String name, String...arguments) { ArrayList<String[]> occ = facts.get(name); if (occ == null) { occ = new ArrayList<String[]>(); facts.put(name, occ); } occ.add(arguments); } COM: <s> stores prolog facts with a given name and arguments in hash map until </s>
funcom_train/46525516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected BinaryNode insert(Comparable x, BinaryNode t) { if (t == null) t = new BinaryNode(x); else if (x.compareTo(t.element) < 0) t.left = insert(x, t.left); else if (x.compareTo(t.element) > 0) t.right = insert(x, t.right); else throw new DuplicateItemException(x.toString()); // Duplicate return t; } COM: <s> internal method to insert into a subtree </s>
funcom_train/14181070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddSpectator() { Game g = new Game(u1, "type", "name", 10, true); assertTrue(g.addSpectator(u1)); Game g2 = new Game(u1, "type", "name", 10, false); assertFalse(g2.addSpectator(u1)); } COM: <s> tests the add spectator method </s>
funcom_train/46457839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FunctionPanel renamePanel(String prevName, String newName) { FunctionPanel panel = getPanel(prevName); if (panel != null) { panels.remove(prevName); panels.put(newName, panel); panel.prevName = prevName; panel.setName(newName); refreshSpinner(newName); } return panel; } COM: <s> renames a function panel </s>
funcom_train/12273338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processStoredFile(DiskDeviceContext context, FileState state, FileSegment segment) { try { Debug.println("## TestFileProcessor Storing file=" + state.getPath() + ", fid=" + state.getFileId() + ", cache=" + segment.getTemporaryFile()); } catch (Exception ex) { } } COM: <s> process a cached file just before it is to be stored </s>
funcom_train/1550229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeEntry(HashEntry<K, V> entry, int hashIndex, HashEntry<K, V> previous) { LinkEntry<K, V> link = (LinkEntry<K, V>) entry; link.before.after = link.after; link.after.before = link.before; link.after = null; link.before = null; super.removeEntry(entry, hashIndex, previous); } COM: <s> removes an entry from the map and the linked list </s>
funcom_train/8080159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Instance makeInstance(double margin, int current, int cumulative) { int count = 0; double [] vals = new double[3]; vals[count++] = margin; vals[count++] = current; vals[count++] = cumulative; return new Instance(1.0, vals); } COM: <s> creates an instance object with the attributes calculated </s>
funcom_train/25365710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addHiddenroomfoundPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RoomEvent_hiddenroomfound_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RoomEvent_hiddenroomfound_feature", "_UI_RoomEvent_type"), LeveleditorPackage.Literals.ROOM_EVENT__HIDDENROOMFOUND, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the hiddenroomfound feature </s>
funcom_train/3528369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (getNamespace() == null) { return getName(); } else { StringBuffer buffer = new StringBuffer(getNamespace()); buffer.append(":"); if (getName() != null) { buffer.append(getName()); } return buffer.toString(); } } COM: <s> returns a string representation of the property name </s>
funcom_train/4015190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadForms(List<FormDef> forms, int selFormId){ if(forms == null || forms.size() == 0) return; tree.clear(); this.formDef = null; for(FormDef formDef : forms){ loadForm(formDef,formDef.getId() == selFormId,true); if(formDef.getId() == selFormId){ this.formDef = formDef; //A temporary hack to ensure top level object is accessed. fireFormItemSelected(this.formDef); } } } COM: <s> loads a list of forms and selects one of them </s>
funcom_train/50688586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTransform( String file_or_resource ) throws TransformerConfigurationException, FileNotFoundException { File file = new File( file_or_resource ); if( file.exists()) addTransform( new FileInputStream( file )); else addTransform( getClass().getResourceAsStream("/" + file_or_resource)); } COM: <s> specify a transform as a filename or resource name </s>
funcom_train/2386084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateStatusReqMessage() { IChatMessage statusReqMessage = messageFactory.createStatusReqMessage(0, iSender); assertNotNull(statusReqMessage); assertEquals(iSender, statusReqMessage.getSender()); String[] params = statusReqMessage.getParameters(); assertNotNull(params); assertEquals(0, params.length); } COM: <s> tests status req message creation </s>
funcom_train/49602140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBAP(byte[] keySeed) throws CardServiceException { if (keySeed.length < 16) { throw new IllegalStateException("Key seed too short"); } try { putData((byte) 0, KEYDOC_TAG, keySeed); } catch (Exception ioe) { throw new CardServiceException(ioe.toString()); } } COM: <s> initiates the driving license with key seed string sai string </s>
funcom_train/1958341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExtractHeaderAtPosition0() { byte [] header = PacketEncoding.extractHeader(0, headerLen, testBytes); assertTrue("byte array mismatch, "+bytesAsString(header)+", should be "+ bytesAsString(goodHeader0),sameBytes(header,goodHeader0)); } COM: <s> test of extract header method with header start at position 0 </s>
funcom_train/47677271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractSaddleSubComponent getActiveSubComponent() { if (this.tabbedPane != null) { return (AbstractSaddleSubComponent) this.tabbedPane.getSelectedComponent(); } else { return (getComponents().length > 0 ? (AbstractSaddleSubComponent) this.getComponents()[0] : null); } } COM: <s> gets the component which is currently selected in the jtabbed pane </s>
funcom_train/45500571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean relabelApplicable( Node v ) { // if( !isActive( v ) ) // return false; // // //ArrayList<Edge> el = incidentEdges.get( v ); // for( Edge e : el /*residualNetwork.outgoingEdges( v )*/ ) { // if( pushApplicable( e ) ) { // return false; // } // } // return true; } COM: <s> decides whether relabel is applicable to a certain node </s>
funcom_train/10906720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PDFLink makeLink(Rectangle2D rect, String page, String dest) { PDFLink link = new PDFLink(rect); getDocument().registerObject(link); PDFGoTo gt = new PDFGoTo(page); gt.setDestination(dest); getDocument().registerObject(gt); PDFInternalLink internalLink = new PDFInternalLink(gt.referencePDF()); link.setAction(internalLink); return link; } COM: <s> make an internal link </s>
funcom_train/18503598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(String value) { String newPass; if (value != null && value.trim().length() == 0) //Set empty password as null newPass = null; else //Else get an hash of the password newPass = SHA(value); //Check if the value has been changed if (!isEqual(newPass, password)) setChanged(true); //Set the value password = newPass; } COM: <s> set an new value </s>
funcom_train/19000113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addbutton(int button,String l,GridBagConstraints c,JPanel p) { b[button] = new JButton(l); b[button].setBackground(Color.black); b[button].setForeground(Color.white); b[button].addActionListener(new CommTraceListener(this)); b[button].addKeyListener(new CommTraceListener(this)); gridbag.setConstraints(b[button],c); p.add(b[button]); } COM: <s> adds the button to the specified panel </s>
funcom_train/3582692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRenderer(Renderer r) { this.renderer = r; if(renderer instanceof PluggableRenderer) { PluggableRenderer pr = (PluggableRenderer)renderer; pr.setScreenDevice(this); pr.setViewTransformer(getViewTransformer()); if(pickSupport instanceof ShapePickSupport) { ((ShapePickSupport)pickSupport).setHasShapes((HasShapeFunctions)renderer); } } r.setPickedKey(pickedState); repaint(); } COM: <s> sets the showing renderer to be the input renderer </s>
funcom_train/18088800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void invalidate() { // Invalidate the whole dialog and have it reposition all components. if (screen != null) { if (screen instanceof Dialog) { final Dialog d = (Dialog) screen; d.invalidate(); } } // Erase any knowledge this component has of its position. x = y = width = height = 0; } COM: <s> signals that the components size needs to be updated </s>
funcom_train/30005066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getCommentLabel() { if (this.commentLabel == null) { this.commentLabel = new JLabel(LanguageController.getInstance().getString(this.plugin, "Test_Execution_Child_Sequence_End_Panel_Comment_Label")); } return this.commentLabel; } COM: <s> gets the comment label </s>
funcom_train/39486606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matchesAll (String s){ if (s != null) { if (hasAnyPattern && pattern.length == 1) { return true; // no need to check } for (int i=0; i<pattern.length; i++){ Pattern p = pattern[i]; Matcher m = matcher[i]; m.reset(s); if (!m.matches()){ return false; } } return true; } else { return false; } } COM: <s> does s match all of our patterns </s>
funcom_train/5263195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getJList() { if (jList == null) { jList = new JList(treeMap.keySet().toArray()); jList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { listSelectionChanged(); } }); } return jList; } COM: <s> this method initializes j list </s>
funcom_train/4922357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBrowse_SingleByte() throws IOException { // Add a byte this.outputStream.write('a'); // Ensure can browse the single byte InputStream browseStream = this.input.getBrowseStream(); assertEquals("Incorrect browsed byte", 'a', browseStream.read()); assertEquals("Should be end of stream", BufferStream.END_OF_STREAM, browseStream.read()); // Ensure content still available to read this.assertInputStreamRead(new byte[] { 'a' }); // Close stream this.input.close(); } COM: <s> ensure able to browse a single byte </s>
funcom_train/17080494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JComponent buildContentPane() { JComponent center = buildContent(); center.setBorder(getDialogBorder()); header = buildHeader(); if (header == null) return center; JPanel panel = new JPanel(new BorderLayout()); panel.add(header, BorderLayout.NORTH); panel.add(center, BorderLayout.CENTER); return panel; } COM: <s> builds and returns the content pane sets the border and </s>