__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/2724322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateSystemsTable(Connection connection, String date, String systemCode) throws SQLException { String stmt = "UPDATE Systems SET \"Date\" = ? WHERE SystemCode = ?"; PreparedStatement ps = connection.prepareStatement(stmt); ps.setString(1, date); ps.setString(2, systemCode); ps.executeUpdate(); ps.close(); } COM: <s> updates the date for go in the systems table </s>
funcom_train/25231899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int convertUnixNumberToPerms( int l_unixCode ) { int result = 0; for ( int idx = 0; idx < 3; idx++ ) { result = result | ( ((l_unixCode / (int) Math.pow( 10, idx )) % 10) << idx*3 ); } return result; } COM: <s> converts unix permissions to the permissions used by the jsch permissions </s>
funcom_train/13897498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printInfo() { System.out.print("["); write(getStreet()); write(getCity() + ", " + getState()); write(getZIP()); write(getPrice()); write(getAppraisedValue()); write(getEquity()); write(getIndexLink(), false); System.out.println("]"); } COM: <s> prints information about the house to stdout </s>
funcom_train/9449439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String name, float value) throws IllegalArgumentException { ObjectSlot slot = findSlot(name, Float.TYPE); if (slot == null) { throw new IllegalArgumentException("no float field '" + name + "'"); } slot.fieldValue = Float.valueOf(value); slot.defaulted = false; // No longer default value } COM: <s> find and set the float value of a given field named </s>
funcom_train/13334073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onClickOpenDefinitionsPopup() { int rowNumber = OntologyGenerationComponent.this.definitionTable.getSelectedRow(); DefinitionsPopup<T, R> definitionsPopup = new DefinitionsPopup<T, R>(guiComponent, this); definitionsPopup.initPopup(definitionTable.getModel().getDefinitionAt(rowNumber)); definitionsPopup.setVisible(true); } COM: <s> opens a popup showing the urls for the definition and its similar </s>
funcom_train/1189040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Cursor fetchTop9Analysis(int month, int year) { String sql = "SELECT " + ANALYSIS_ROWID + " FROM " + TABLE_ANALYSIS + " WHERE " + ANALYSIS_MONTH + "=" + month + " AND " + ANALYSIS_YEAR + "=" + year + " ORDER BY " + ANALYSIS_AMOUNT + " desc LIMIT 9"; return mDb.rawQuery(sql, null); } COM: <s> fetches top 9 analysis entries </s>
funcom_train/41411780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Solution executeIterated(){ Solution bestx = problem.getInitialSolution(); double bestEval = problem.getCostEvaluator().eval(bestx); for(int i = 0; i < maxIterations2; i++){ Solution thisx; if(type == ITERATED_DEFAULT) { thisx = executeDefault(); } else { thisx = executeStochastic(); } double thisEval = problem.getCostEvaluator().eval(thisx); bestEval = problem.getCostEvaluator().eval(bestx); if(thisEval < bestEval){ bestx = thisx; } } return bestx; } COM: <s> executes the iterated hill climbing </s>
funcom_train/16300900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSpacerWrapper_addCommand() { SpacerWrapper sw = new SpacerWrapper(1, 10); try { addCommandToWrapper(sw, "action"); fail("Adding a command to a Spacer should throw an exception."); } catch (IllegalStateException ex){ // Ok } } COM: <s> verifies the add command method in spacer wrapper </s>
funcom_train/41179099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notAnalysableTest() throws Exception { // Bouml preserved body begin 00065DFB increaseTrialCounter(); if (this.trial_counter<3) { this.stat = AnalysisState.ToDo; } else { // if (this.trial_counter==3) this.stat = AnalysisState.Interpreted; this.result = "not analysable"; this.interpretation = "not analysable"; Batch my_batch = API_bdd.loadBatch(this); my_batch.checkAnalysis(); } // Bouml preserved body end 00065DFB } COM: <s> this method is call when first reader or validator cant read corrects results </s>
funcom_train/36640040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getMinorTickValue(int minorTickIndex, int majorTickIndex) { if (!isCalibrated) calibrate(); if (majorTickIndex==-1) return minTick-((minorTickIndex+1)*(minTick/10)); else return (minorTickIndex+2)*getMajorTickValue(majorTickIndex); // This last line is the equivalent of: // return ((minorTickNo+1)*getMajorTick(majorTickNo))+getMajorTick(majorTickNo); } COM: <s> returns the value of the minor tick indexth minor tick </s>
funcom_train/7866880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int rowIndex, int columnIndex) { Object o = null; AbstractTableRow row = iMediator.getTableRow(rowIndex); if (columnIndex == 0) { o = row.getName(); } else if (columnIndex == 1) { o = iTableRows.get(row); } return o; } COM: <s> returns the value for the cell at code column index code and </s>
funcom_train/2302153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeMultipleCharacterLabelsFromAutomaton (Automaton automaton) { Transition[] transitions = automaton.getTransitions(); for (int k = 0; k < transitions.length; k++) { FSATransition transition = (FSATransition) transitions[k]; String label = transition.getLabel(); if (label.length() > 1) { handleLabel(transition, automaton); } } } COM: <s> changes all transitions in code automaton code into transitions </s>
funcom_train/51336559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_create_emptyFile() throws IOException { final File file = File.createTempFile(getName(), Options.JNL); final Properties properties = new Properties(); properties.setProperty(Options.BUFFER_MODE, BufferMode.DiskRW.toString()); properties.setProperty(Options.FILE, file.toString()); properties.setProperty(Options.WRITE_CACHE_ENABLED, "" + writeCacheEnabled); final Journal journal = new Journal(properties); try { assertEquals(file, journal.getFile()); } finally { journal.destroy(); } } COM: <s> unit test verifies that </s>
funcom_train/12587667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Catalog buildCatalog(CatalogRepository itemCatalog) { Catalog catalog = new Catalog(); catalog.setIdentity(itemCatalog.getIdentity()); List<CatalogEntry> entries = itemCatalog.getCatalogEntries(); for (CatalogEntry itemEntry : entries) { SchemaDeclarationType schemaType = new SchemaDeclarationType(); schemaType.setSchemeAlias(itemEntry.getAlias()); try { schemaType.setSchemeURI(new URI(itemEntry.getScheme())); } catch (URISyntaxException e) { e.printStackTrace(); } catalog.addSchemeDeclaration(schemaType); } return catalog; } COM: <s> build nar catalog object from persistent object item catalog </s>
funcom_train/23333583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LevelStatistic getLevelStatistic(int levelSetId, int playerId, int levelId){ if((_levelSetStatistic == null)||( (levelSetId!=_levelSetStatId)&&(playerId != _playerStatId) )){ _levelSetStatistic = getLevelSetStatistic(levelSetId, playerId); } return _levelSetStatistic.get(levelId); } COM: <s> gets statistic for given level level set and player </s>
funcom_train/10599170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayAllContinuations() { if (getLogger().isDebugEnabled()) { Set forest = getForest(); getLogger().debug("WK: Forest size: " + forest.size()); for (Iterator iter = forest.iterator(); iter.hasNext();) { getLogger().debug(iter.next().toString()); } } } COM: <s> dump to log file all code web continuation code s </s>
funcom_train/27710061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File dir, String name) { // Is it a directory? try { if (new File(dir, name).isDirectory()) return true; } catch (Throwable th) {} // Test the extension. if (name.length() < extLen) return false; return (name.substring(name.length() - extLen). equalsIgnoreCase(extension)); } COM: <s> determines whether or not a file will pass through this filter </s>
funcom_train/9810417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void NotifyTransportStreamListeners(SIChangeEvent event) { if (event == null) return; SIElement element = event.getSIElement(); if (element == null || !(element instanceof TransportStream)) return; TransportImpl transport = (TransportImpl) transports[transports.length - 1]; if (transport == null) return; SIChangeType ct = event.getChangeType(); TransportStreamChangeEvent sdce = new TransportStreamChangeEvent( transport, ct, (TransportStream) element); transport.notifyTransportStreamListeners(sdce); } COM: <s> notify the transport stream listeners </s>
funcom_train/36913540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setContentPane(getJContentPane()); this.setSize(640, 480); this.setTitle(XMLParser.getClientMsg("guiTitle")); this .setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); this.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent e) { doExit(); } }); this.setVisible(true); } COM: <s> this method initializes this </s>
funcom_train/35671665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String changeEnding(String ing) { char letter; if(ing.length()>1) { // make sure it's not a 1 letter word (originally 3 letters word) letter = ing.charAt(ing.length()-1); switch (letter) { case 'נ' : return (ing.subSequence(0,ing.length()-2)+"ן"); case 'מ' : return (ing.subSequence(0,ing.length()-2)+"ם"); case 'צ' : return (ing.subSequence(0,ing.length()-2)+"ץ"); case 'פ' : return (ing.subSequence(0,ing.length()-2)+"ף"); case 'כ' : return (ing.subSequence(0,ing.length()-2)+"ך"); } } return ing; } COM: <s> change from in line letter to final letter </s>
funcom_train/31148625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setActionsFromFullScreenState(boolean blnFullScreenState) { // Set icon based on state if (blnFullScreenState) { actionToggleFullScreen.putValue(Action.SMALL_ICON, getIcon("ZoomOut24.gif")); } else { actionToggleFullScreen.putValue(Action.SMALL_ICON, getIcon("ZoomIn24.gif")); } } COM: <s> sets actions enabled states and icons based on full screen state </s>
funcom_train/2151688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createCenter() { BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER); centerData.setMargins(new Margins(0, 2, 0, 2)); configTabPanel.setTabScroll(true); configTabPanel.setAnimScroll(true); configTabPanel.setBorderStyle(false); add(configTabPanel, centerData); } COM: <s> creates the center </s>
funcom_train/15493480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopThreads() { try { if (threadGroup.isTerminated() == false) { threadGroup.terminate(); } } catch(Exception ex) { log.error("Failed to unload the beans [" + deploymentLoader.getFile().getPath() + "] because : " + ex.getMessage(),ex); } } COM: <s> this method stops the bean processing </s>
funcom_train/29773551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RequestAnswer removeAll() throws YahooManagerException { try { return ((com.funambol.yahoo.items.dao.YahooCalendarDAO) dao).removeAllCalendar((SyncItemKey[]) allSyncItemkeys.values().toArray(new SyncItemKey[0])); } catch (RequestException ex) { throw new YahooManagerException(ex.getMessage()); } } COM: <s> removes all the items in the yahoo server </s>
funcom_train/10384763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeService(String name) throws Exception { if (!(container instanceof Server)) { throw new Exception(); } // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); Service service = getService(oname); ((Server) container).removeService(service); } COM: <s> remove an existing service </s>
funcom_train/10592218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getConfigurations(String name) { Vector configurations = new Vector(); org.apache.avalon.framework.configuration.Configuration[] childs = this.configuration.getChildren(name); for (int i = 0; i<childs.length; i++) { configurations.addElement(new SlideConfigurationAdapter(childs[i])); } return configurations.elements(); } COM: <s> return an code enumeration code of code configuration code </s>
funcom_train/43268959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { boolean isEqual = false; if (object == this) { isEqual = true; } else if ((object != null) && (object.getClass() == this.getClass())) { isEqual = this.compareTo(object) == 0; } return isEqual; } COM: <s> tests this code link template code with another code link template code </s>
funcom_train/42097995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prepareLocalJobQueues(int m) { localJobs = new ArrayList<Queue<JobRequest>>(m); for (int i = 0; i < m; ++i) { localJobs.add(new LinkedBlockingQueue<JobRequest>(2000)); } //randomize jobs into local queues int counter = 0; while(!jobQueue.isEmpty()) { JobRequest j = jobQueue.poll(); if (j != null) { counter++; int index = counter % m; localJobs.get(index).add(j); } } } COM: <s> prepare m new job queues for m threads </s>
funcom_train/39949920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJRadioButtonLDM() { if (jRadioButtonLDM == null) { jRadioButtonLDM = new JRadioButton(); jRadioButtonLDM.setText("LDM"); jRadioButtonLDM.setToolTipText("Limited Discoverable mode"); jRadioButtonLDM.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setDeviceClass(); } }); } return jRadioButtonLDM; } COM: <s> this method initializes j radio button ldm </s>
funcom_train/49200760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOriginalIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Scene_originalId_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Scene_originalId_feature", "_UI_Scene_type"), TransformedPackage.Literals.SCENE__ORIGINAL_ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the original id feature </s>
funcom_train/36859409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setWithdrawModeToItem() { if (!isOpen()) return false; if (methods.getSetting(Constants.SETTING_BANK_TOGGLE_WITHDRAW_MODE) != 0) { methods.atInterface(Constants.INTERFACE_BANK, Constants.INTERFACE_BANK_BUTTON_ITEM); methods.wait(methods.random(500, 700)); } return methods.getSetting(Constants.SETTING_BANK_TOGGLE_WITHDRAW_MODE) == 0; } COM: <s> sets the bank withdraw mode to item </s>
funcom_train/33667035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isANumber(char ch) { return (ch == '0' || ch == '1' || ch == '2' || ch == '3' || ch == '4' || ch == '5' || ch == '6' || ch == '7' || ch == '8' || ch == '9' || ch == SWT.DEL || ch == SWT.BS || ch == SWT.CR || ch == SWT.TAB); } COM: <s> check if a char is a number or del bs cr </s>
funcom_train/18660876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getLowresFile() { if ( lowresLocation.equals( "" ) ) { return null; } try { return new File( new URI( lowresLocation ) ); } catch ( URISyntaxException x ) { logger.info( "Conversion of " + lowresLocation + " to URI failed: " + x.getMessage() ); return null; } } COM: <s> returns the file handle to the lowres picture </s>
funcom_train/3512599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Border createOptionBorder(String title) { Border border = BorderFactory.createCompoundBorder( BorderFactory.createTitledBorder( BorderFactory.createBevelBorder(BevelBorder.LOWERED), title, TitledBorder.CENTER, TitledBorder.TOP ), BorderFactory.createEmptyBorder(0, 3, 1, 1) ); return border; } COM: <s> creates the border of the option panels </s>
funcom_train/50140480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List getTransactionLocks(ITransaction ta) { List talocks = (List) locksByTransactions.get(ta); if (talocks == null) { talocks = new LinkedList(); locksByTransactions.put(ta, talocks); } //log@debug("Get ta locks (TA=" + ta + ", " + talocks.size() + " locks."); return talocks; } COM: <s> gets the transaction locks attribute of the lock engine object </s>
funcom_train/1238647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setInputBodyType(Operation operation, Use inputBodyType) { OperationAttr attr = (OperationAttr) attributes.get(operation); if (attr == null) { attr = new OperationAttr(); attributes.put(operation, attr); } attr.setInputBodyType(inputBodyType); if (inputBodyType == Use.LITERAL) { setHasLiteral(true); } } // setInputBodyType COM: <s> set the input body type for the given operation </s>
funcom_train/37018058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getFileName(){ String fileName= Language.labelMgt[19]; if(theFileName != null){ fileName= theFileName; }else if(theURL != null){ fileName= theURL.toString(); fileName= fileName.substring(fileName.lastIndexOf("/") + 1); } return fileName; } COM: <s> get the file name with the extension </s>
funcom_train/18739735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reportLTS() { println("\n\tStates:\t\t\t" + this.gts.nodeCount()); int spuriousStateCount = this.gts.openStateCount(); if (spuriousStateCount > 0) { println("\tExplored:\t\t" + (this.gts.nodeCount() - spuriousStateCount)); } println("\tTransitions:\t" + this.gts.edgeCount()); } COM: <s> reports data on the lts generated </s>
funcom_train/38806651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GanttPolygon createDiamondShape(int topX, int topY, int radius) { int[] xPoints = new int[]{topX, topX + radius, topX, topX - radius}; int[] yPoints = new int[]{topY, topY + radius, topY + radius * 2, topY + radius}; return new GanttPolygon(xPoints, yPoints, 4); } COM: <s> create diamond shape for task group </s>
funcom_train/35321610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Builder setLanguageTag(String languageTag) { ParseStatus sts = new ParseStatus(); LanguageTag tag = LanguageTag.parse(languageTag, sts); if (sts.isError()) { throw new IllformedLocaleException(sts.getErrorMessage(), sts.getErrorIndex()); } localeBuilder.setLanguageTag(tag); return this; } COM: <s> resets the builder to match the provided ietf bcp 47 </s>
funcom_train/21728033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Position getRandomSpawnPosition() { int maxX = world.getMap().getWidth(); int maxY = world.getMap().getHeight(); while(true) { double x = Math.random() * maxX; double y = Math.random() * maxY; Position position = new Position(x,y); if(isPossibleForSpawn(position)) { return position; } } } COM: <s> method to get a random spawn position </s>
funcom_train/18014955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testEndOfContextAutoCommitLevel_rollback() { controller.immediateCommitLevel = LogEntry.LOG4J_FATAL; controller.maxUnCommitedMessages =1000 ; controller.endOfContextAutoCommitLevel = LogEntry.LOG4J_WARN; context.checking(new Expectations() {{ never(publisher).publish(with(any(List.class))); ignoring(persister); }}); controller.createContext(TRANSACTION_TOKEN, new CodeBlock() { public void execute() { controller.addLogMessage(TRANSACTION_TOKEN, ENTRY_W); controller.rollBack(TRANSACTION_TOKEN); } } ); } COM: <s> make sure we never auto commit at the end of context by </s>
funcom_train/50490488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearExpired() { synchronized (lock) { Iterator iter = map.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); Rss rss = (Rss) entry.getValue(); if (rss.isExpired()) { iter.remove(); } } } } COM: <s> clears all expired entries in the cache </s>
funcom_train/19911736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setSize(new Dimension(81, 21)); this.setText(LangageManager.getProperty("play")); this.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { onPlay(); } }); } COM: <s> this method initializes this </s>
funcom_train/48058043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setApplicantFirstName(final String newFirstName) throws SQLException, AuthorizeException { if (validateModification(newFirstName, _delegate.getSubmitter().getName().getFirstName(), "")) { getDao().getSubmitterDao().updateFirstName(_delegate, newFirstName); logModMessage("First name", ModType.CHANGED, newFirstName, SubmissionLogEntry.EVENT_BIOGRAPHICAL_DATA_CHANGE); } } COM: <s> sets the submitters first name </s>
funcom_train/5376620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class forName(final String name) throws ClassNotFoundException { if (System.getSecurityManager() == null) return Class.forName(name); try { return (Class) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws Exception { return Class.forName(name); } }); } catch (PrivilegedActionException e) { if (e.getException() instanceof ClassNotFoundException) throw (ClassNotFoundException) e.getException(); throw (RuntimeException) e.getException(); } } COM: <s> returns a class </s>
funcom_train/20155434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receiveBlitzInMessage(BlitzIn mock) { final short codeNum = plugInToBlitzInBuffer.getShort(); MessageCodePlugInToBlitzIn type = MessageCodePlugInToBlitzIn .lookup(codeNum); MessageFormat format = type.getMessageFormat(); Object messageBody = format.readMessageBody(plugInToBlitzInBuffer); type.dispatch(localListener, messageBody); type.dispatch(mock, messageBody); } COM: <s> allows unit tests to pickup messages intended for blitz in </s>
funcom_train/50576041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printLabel() { try { PrinterJob printJob = PrinterJob.getPrinterJob(); printJob.setPageable(makeBook()); if (printJob.printDialog()) { printJob.print(); } } catch (Exception ex) { Tuneology.logException(ex, "printLabel"); } } COM: <s> actually prints the label </s>
funcom_train/27837513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageIcon getIcon() { ImageIcon result = (ImageIcon)icons.get(model.getClass()); if (result != null) { return result; } String iconFile = (String)iconMap.get(model.getClass()); if (iconFile == null) iconFile = DEFAULT_ICON; ImageIcon icon = new ImageIcon(iconFolder + iconFile); icons.put(model.getClass(), icon); return icon; } COM: <s> return an icon associated with the uml element </s>
funcom_train/2577361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LegendTitle getLegend(int index) { int seen = 0; Iterator iterator = this.subtitles.iterator(); while (iterator.hasNext()) { Title subtitle = (Title) iterator.next(); if (subtitle instanceof LegendTitle) { if (seen == index) { return (LegendTitle) subtitle; } else { seen++; } } } return null; } COM: <s> returns the nth legend for a chart or code null code </s>
funcom_train/13275421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCeilingColor(Integer ceilingColor) { if (ceilingColor != this.ceilingColor) { Integer oldCeilingColor = this.ceilingColor; this.ceilingColor = ceilingColor; this.propertyChangeSupport.firePropertyChange(Property.CEILING_COLOR.name(), oldCeilingColor, ceilingColor); setCeilingPaint(RoomPaint.COLORED); } } COM: <s> sets the edited color of the ceiling </s>
funcom_train/21637506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendActivatioEMail(User user) throws MessageNotSentException { String code = UserHelper.getInstance().saveActivation(user); String msg = ResourceDispatcher.getInstance().getBundle("bundles.pub.Register").getString("pub.register.activationMail") + code; sendMessage(user.getEmail(), "Activation", msg); } COM: <s> sends activation email to user </s>
funcom_train/12562899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void installSuite() { try { MIDletSuiteUtils.execute(MIDletSuite.INTERNAL_SUITE_ID, DISCOVERY_APP, Resource.getString(ResourceConstants.INSTALL_APPLICATION)); } catch (Exception ex) { displayError.showErrorAlert(Resource.getString( ResourceConstants.INSTALL_APPLICATION), ex, null, null); } } COM: <s> discover and install a suite </s>
funcom_train/15622536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getOneOfList() throws M4Exception { Constraint theOneOfConstr = this.getMyConstraintOfType(Constraint.TYPE_ONE_OF); if (theOneOfConstr == null) { return new Vector(); } else { String valuesAsList = theOneOfConstr.getObj2(); StringTokenizer st = new StringTokenizer(valuesAsList, " ,;\t\n\r\f"); Vector theList = new Vector(); while (st.hasMoreTokens()) { theList.add(st.nextToken()); } return theList; } } COM: <s> this method makes sense only if code is one of code returns true </s>
funcom_train/35140032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStatelessContext2() { SemanticContext ctx = factory.getContext(Config .getRuleSessionFactory(), null, Config .getExternalContext(), null, false); super.assertNotNull(ctx); super.assertNotNull(ctx.getExternalContext()); super.assertNotNull(ctx.getRuleSession()); super.assertNull(ctx.getSessionVariable("test")); super.assertNotNull(ctx.getExternalContext().getObject("1")); } COM: <s> test stateless context2 </s>
funcom_train/36987992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPatternMatcher() throws Exception { NavigationHandlerImpl h = new NavigationHandlerImpl(); assertEquals(-1,h.matchPattern("abc","xyz")); assertEquals(0,h.matchPattern("*","xyz")); assertEquals(3,h.matchPattern("abc","abc")); assertEquals(2,h.matchPattern("ab*","abxyz1234")); assertEquals(5,h.matchPattern("abcde*","abcde")); assertEquals(-1,h.matchPattern("abcde*","abcdr")); } COM: <s> test the pattern matching code in navigation handler </s>
funcom_train/44707640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateURL(BigDecimal itemId, BigDecimal taskId) { if (itemId == null || taskId == null) { return ""; } StringBuffer url = new StringBuffer (ContentItemPage.getItemURL(itemId, ContentItemPage.WORKFLOW_TAB)); // XXX task, approve, and action were constants; restore them url.append("&action=finish&task=").append(taskId.toString()); return url.toString(); } COM: <s> generates a link to the finish task panel under the workflow tab </s>
funcom_train/22168511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String reformulate(String query) { int inipos = query.indexOf(' '); inipos = getUpperLetterPosition(query, inipos + 1); int endpos = getLastUpperLetterPosition(query, inipos + 1); endpos = getPositionOfNoLetter(query, endpos + 1); String newQuery = ',' + query.substring(inipos, endpos) + ','; verboseMessage("Replacing '" + query + "' for '" + newQuery + "'."); return newQuery; } COM: <s> make the question reformulation for person questions </s>
funcom_train/1479241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNPCDescription(int npcId) { if (npcId == -1 || npcId >= maxListedNPCs) { return new String("An NPC."); } if (npcLists[npcId] != null) { return (npcLists[npcId].examine); } return new String("NPC " + npcId); } COM: <s> returns the description of npc id </s>
funcom_train/20238278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdOKLogin() { if (cmdOKLogin == null) {//GEN-END:|76-getter|0|76-preInit // write pre-init user code here cmdOKLogin = new Command("Ok", Command.OK, 0);//GEN-LINE:|76-getter|1|76-postInit // write post-init user code here }//GEN-BEGIN:|76-getter|2| return cmdOKLogin; } COM: <s> returns an initiliazed instance of cmd oklogin component </s>
funcom_train/45226574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GearLocation getLocation() { if (location == null) location = new GearLocation(GearLocation.Type.CELL_ID, CellIDReader.getCellID(),GearLocation.Reliability.ACTUAL_LOCATION); else location.setLocation(GearLocation.Type.CELL_ID, CellIDReader.getCellID()); location.setReliability(GearLocation.Reliability.ACTUAL_LOCATION); return location; } COM: <s> this method returns the current location </s>
funcom_train/16176548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawRectBorder(BasicStroke stroke, Color color) { drawInit(color); if (rect == null) { rect = new Rectangle(curX, curY, curWidth, curHeight); } rect.setFrame(curX, curY, curWidth, curHeight); Stroke oldStroke = g2.getStroke(); g2.setStroke(stroke); g2.draw(rect); g2.setStroke(oldStroke); } COM: <s> draws an rectangular border using the current drawing parameters </s>
funcom_train/43232803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArg(final SearchExpression arg) throws CycleException { if (arg == null) { if (this.arg != null) { this.arg.deleteObserver(this); } this.arg = null; this.notifyObservers(); this.changed(); } else { if (!arg.contains(this)) { if (this.arg != null) { this.arg.deleteObserver(this); } this.arg = arg; this.arg.setParent(this); this.arg.addObserver(this); this.notifyObservers(); this.changed(); } else { throw new CycleException(); } } } COM: <s> changes the search expression </s>
funcom_train/5403032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reloadProperties() { SourceEditor[] editors = resourcesFactory.getSourceEditors(); for (int i = 0; i < editors.length; i++) { SourceEditor editor = editors[i]; if (editor.isCacheDirty()) { bundleGroup.addBundle( editor.getLocale(), PropertiesParser.parse(editor.getContent())); editor.resetCache(); } } } COM: <s> reloads the properties files parse them </s>
funcom_train/42944218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object remove(Object key) { Object k = this.keyCaseFilter(key); if ((this.ignoredCaseMap != null) && (key instanceof String)) { this.ignoredCaseMap.remove(((String) key).toLowerCase()); } this.keyOrder.remove(k); return super.remove(k); } COM: <s> removes the mapping for this key from this map if it is present </s>
funcom_train/46111156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close () { if ( writer != null ) { if ( !hasFile ) { writeStartFile(original, dataType, skeletonPath, fwConfigId, fwInputEncoding, null); } if ( inFile ) { writeEndFile(); } writer.writeEndElementLineBreak(); // xliff writer.writeEndDocument(); writer.close(); writer = null; } fwConfigId = null; fwInputEncoding = null; skeletonPath = null; } COM: <s> writes the end of this the document and close it </s>
funcom_train/44573044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void combineSpecifications() { CClass clazz = (JmlBinarySourceClass) member; CMethodSet methodSet = clazz.methods(); ArrayList tempList = new ArrayList(methodSet.size()); CAbstractMethodSet.Iterator iter = methodSet.iterator(); while (iter.hasNext()) { JmlSourceMethod meth = (JmlSourceMethod) iter.next(); tempList.add(meth.getAST()); } methods = new JmlMemberDeclaration[tempList.size()]; tempList.toArray(methods); } COM: <s> this method collects the asts for the binary methods </s>
funcom_train/18100204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanUpPlayer() { this.userJ2MeLevel = -1; //#if !polish.android //# if (this.player != null) { //# this.player.deallocate(); //# this.player.close(); // necessary for some Motorola devices //# this.player = null; //# } //#else if (this.androidPlayer != null) { this.androidPlayer.release(); this.androidPlayer = null; } //#endif } COM: <s> closes and deallocates the player </s>
funcom_train/14016411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Event bind(RequestContext context) throws Exception { if (logger.isDebugEnabled()) { logger.debug("Executing bind"); } Object formObject = getFormObject(context); DataBinder binder = createBinder(context, formObject); doBind(context, binder); putFormErrors(context, binder.getBindingResult()); return binder.getBindingResult().hasErrors() ? error() : success(); } COM: <s> bind incoming request parameters to allowed fields of the form object </s>
funcom_train/46055929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeCPOfflineReadable(File unzippedDir, File targetZip, File cpOfflineMat) { writeOfflineCP(unzippedDir); //assign default mat if not specified if(cpOfflineMat == null) cpOfflineMat = new File(WebappHelper.getContextRoot() + "/static/" + CPOFFLINEMENUMAT); zipOfflineReadableCP(unzippedDir, targetZip, cpOfflineMat); } COM: <s> used for migration purposes </s>
funcom_train/51452067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getExitMenuItem() { if (exitMenuItem == null) { exitMenuItem = new JMenuItem(); exitMenuItem.setText("Exit"); exitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, Event.CTRL_MASK, true)); exitMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { closeApplication(); } }); } return exitMenuItem; } COM: <s> this method initializes j menu item </s>
funcom_train/12126613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setKeyActionsDisabled(boolean disable) { if (disable && this.disableKeyActions != disable) { this.disableKeyActions = disable; disableKeyActions(); } else if (!disable && this.disableKeyActions != disable) { this.disableKeyActions = disable; installCustomKeyActions(); } } COM: <s> disable or enable key actions on this pscroll pane </s>
funcom_train/41331529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSubComponents() { iconButton.setName("InternalFrameTitlePane.iconifyButton"); maxButton.setName("InternalFrameTitlePane.maximizeButton"); closeButton.setName("InternalFrameTitlePane.closeButton"); add(iconButton); add(maxButton); add(closeButton); } COM: <s> add the buttons </s>
funcom_train/7497022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setRoundingDouble() { if (roundingIncrementICU == null) { roundingDouble = 0.0d; roundingDoubleReciprocal = 0.0d; } else { roundingDouble = roundingIncrementICU.doubleValue(); setRoundingDoubleReciprocal( BigDecimal.ONE.divide(roundingIncrementICU, BigDecimal.ROUND_HALF_EVEN) .doubleValue()); } } COM: <s> centralizes the setting of the rounding double and rounding double reciprocal </s>
funcom_train/16631278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getButton_show_object_properties() { if (button_show_object_properties == null) { button_show_object_properties = new JButton(); button_show_object_properties.setText("objectP"); button_show_object_properties.setActionCommand("show_object_properties"); button_show_object_properties .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { map.show_object_properties(); } }); } return button_show_object_properties; } COM: <s> this method initializes button show object properties </s>
funcom_train/14333461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParamInteger getIntegerParam(String name) throws BatchException { try { ParamInteger p = (ParamInteger) params.get(name); if (p == null) { throw new BatchException("Parameter " + name + " not found"); } else { return p; } } catch (ClassCastException e) { throw new BatchException("Parameter " + name + " is not of type Integer"); } } COM: <s> get an integer parameter by name </s>
funcom_train/2630333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validateFullPaint() { if (getPaintInvalid()) { repaint(); setPaintInvalid(false); } if (getChildPaintInvalid()) { final int count = getChildrenCount(); for (int i = 0; i < count; i++) { final PNode each = (PNode) children.get(i); each.validateFullPaint(); } setChildPaintInvalid(false); } } COM: <s> repaint this node and any of its descendants if they have invalid paint </s>
funcom_train/4933649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doParseN3() throws ParserException, IOException { n3ParseTimestamp = System.currentTimeMillis(); // nanoTime(); Logger logger = Logger.getLogger("eulergui.cache"); logger.info( "N3Source.manageParseN3(): before N3 parse: " + getURI() + " Thread " + Thread.currentThread().getName() ); parseResult = new ParserLink().parse(this); logger.info( "N3Source.manageParseN3(): N3 parsed: " + getURI()); } COM: <s> unconditionally parse n3 </s>
funcom_train/7980020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getAttributeUnchecked(String name) { Object result = null; try { result = super.getAttribute(name); } catch (AttributeNotFoundException e) { logger.warning(e.getLocalizedMessage()); } catch (MBeanException e) { logger.warning(e.getLocalizedMessage()); } catch (ReflectionException e) { logger.warning(e.getLocalizedMessage()); } return result; } COM: <s> version of get attributes that catches and logs exceptions </s>
funcom_train/46824783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRoundScoreAndBags(int[] scores, int[] bags) { Object[] data = { scores[0] + " (" + bags[0] + ")", scores[1] + " (" + bags[1] + ")" }; this.scoreAndBagsModel.addRow(data); this.model.setScore(scores); this.model.setBags(bags); this.model.resetRound(); } COM: <s> set score and bags from server response </s>
funcom_train/50148912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void installUI(Component c) { super.installUI(c); if(!(c instanceof Frame)) throw new IllegalStateException("installUI on WWWFrameUI called with a Component other than Frame"); target=(Frame)c; // Sets the appropriate values of Font and Color on this LookAndFeel getContext().FrameCreated(this); } COM: <s> installs the ui delegate for the specified component </s>
funcom_train/1589111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Chronology getChronology(Object object, Chronology chrono) { if (chrono != null) { return chrono; } Calendar cal = (Calendar) object; DateTimeZone zone = null; try { zone = DateTimeZone.forTimeZone(cal.getTimeZone()); } catch (IllegalArgumentException ex) { zone = DateTimeZone.getDefault(); } return getChronology(cal, zone); } COM: <s> gets the chronology </s>
funcom_train/37835821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateDef() { // def uses 10 levels shifted starting point final int next = Level.getXP(def - 9) - defxp; final String text = "DEF: " + def + "×" + (1 + itemDef) + " (" + next + ")"; SwingUtilities.invokeLater(new Runnable() { public void run() { panel.setDef(text); } }); } COM: <s> called when def defxp or item def changes </s>
funcom_train/50578982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while ( ! stopped ) { Runnable task = (Runnable) queue.remove(); if ( task != null ) { try { task.run(); } catch (Throwable t) { monitor.handleThrowable(this.getClass(), task, t); } } } } COM: <s> the method ran by the pool of background threads </s>
funcom_train/18335554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int hashString(String s, int hk) { // This is a fairly stupid hash function. This could certainly be improved. int hv = hk; for(int i = 0; i<s.length(); ++i) { hv = (hv * hk) ^ s.charAt(i) + hk; } return hv; } COM: <s> compute a hash value for a string </s>
funcom_train/46056409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getReferencesTo(OLATResourceable target) { OLATResourceImpl targetImpl = (OLATResourceImpl)resManager.findResourceable(target); if (targetImpl == null) return new ArrayList(0); return DBFactory.getInstance().find( "select v from org.olat.resource.references.ReferenceImpl as v where v.target = ?", targetImpl.getKey(), Hibernate.LONG); } COM: <s> list all sources which hold references to the target </s>
funcom_train/48932688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int setClassName(String className) { int result = Adapter_I.CONST_FAIL; try { String oldName = cont.getClassName(); // if the new uri is already blocked if (!exists()) { // do nothing } else { kb.getRDFResource(oldName).setName(className); cont.setClassName(oldName); result = Adapter_I.CONST_OK; } } catch (Exception e) { e.printStackTrace(); } return result; } COM: <s> set the name only if it does not exist yet </s>
funcom_train/8092637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double computeGini(double[] dist, double total) { if (total==0) return 0; double val = 0; for (int i=0; i<dist.length; i++) { val += (dist[i]/total)*(dist[i]/total); } return 1- val; } COM: <s> compute and return gini index for a given distribution of a node </s>
funcom_train/31817967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveSize() { java.awt.Rectangle bounds = getBounds(); Resource res = Resource.getResourceFor("tahiti"); res.setResource("tahiti.window.x", String.valueOf(bounds.x)); res.setResource("tahiti.window.y", String.valueOf(bounds.y)); res.setResource("tahiti.window.width", String.valueOf(bounds.width)); res.setResource("tahiti.window.height", String.valueOf(bounds.height)); res.setResource("tahiti.window.shrinked", "false"); } COM: <s> saves the size of the window so that it can be restored </s>
funcom_train/51640223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getTooltipAffordanceString() { if (fBindingService == null || !JavaPlugin.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SHOW_TEXT_HOVER_AFFORDANCE)) return null; String keySequence= fBindingService.getBestActiveBindingFormattedFor(IJavaEditorActionDefinitionIds.SHOW_JAVADOC); if (keySequence == null) return null; return Messages.format(JavaHoverMessages.JavaTextHover_makeStickyHint, keySequence); } COM: <s> returns the tool tip affordance string </s>
funcom_train/10204955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MNamedElement_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MNamedElement_name_feature", "_UI_MNamedElement_type"), ClassDiagramPackage.Literals.MNAMED_ELEMENT__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the name feature </s>
funcom_train/3419089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (o == null) return false; if (this == o) return true; if (!(o instanceof UnixNumericGroupPrincipal)) return false; UnixNumericGroupPrincipal that = (UnixNumericGroupPrincipal)o; if (this.getName().equals(that.getName()) && this.isPrimaryGroup() == that.isPrimaryGroup()) return true; return false; } COM: <s> compares the specified object with this </s>
funcom_train/47108107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemArmor21() { JMenuItem menuItem = new JMenuItem(); menuItem.setText(Armor.A_21.getItemName()); menuItem.setEnabled(false); menuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { controller.setPlrReadiedArmor(Armor.A_21); } }); return menuItem; } COM: <s> creates the twenty second choice for the armor menu </s>
funcom_train/27779687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void store(java.io.DataOutput dis) throws java.io.IOException { java.util.Enumeration e = data.keys(); dis.writeInt(data.size()); while (e.hasMoreElements()) { Object o = e.nextElement(); Object v = data.get(o); dis.writeUTF(o.toString()); dis.writeUTF(v.toString()); } } COM: <s> write this doc metadatas hashtable keys and values to the given </s>
funcom_train/35035977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void preFlightChecks() throws Exception { if (!Configuration.configPresent()) { String jnzbHome = Configuration.getJNZBHome(); if (jnzbHome.equals("")) { throw new Exception( "Configuration file is not present - cannot start.\nHave you defined JNZB_HOME? See docs."); } else { throw new Exception( "Configuration file is not present - cannot start.\nJNZB_HOME=" + jnzbHome); } } } COM: <s> performs checks for mandatory things before starting the app </s>
funcom_train/3112351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doOpenCommand() { if (showSaveChanges()) { if (seFileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) { if (seFileChooser.getSelectedFile().exists()) { open(seFileChooser.getSelectedFile()); } } } } COM: <s> this method is excecuted when the option open is called </s>
funcom_train/1164654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getWeeklyTrendsAsync(WeiboListener listener) { getDispatcher().invokeLater(new AsyncTask(WEEKLY_TRENDS, listener , null) { public void invoke(WeiboListener listener, Object[] args) throws WeiboException { listener.gotWeeklyTrends(getWeeklyTrends()); } }); } COM: <s> returns the top 30 trending topics for each day in a given week </s>
funcom_train/24243067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSON getTemplateByTemplateType(String id) throws DBException { JSON getTemplateList = null; TemplateManager mTemplate = new TemplateManager(DbSource.getConnection()); try { getTemplateList = mTemplate.getTemplateByTemplateType(Integer.valueOf(id)); } finally { mTemplate.release(); mTemplate = null; } return getTemplateList; } COM: <s> return the template list </s>
funcom_train/36757066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { if(CreateGUI.score.getCombo()>20) g.drawImage(insane, 0, 0, null); else if(CreateGUI.score.getCombo()>10) g.drawImage(sick, 0, 0, null); else if(CreateGUI.score.getCombo()>5) g.drawImage(perfect, 0, 0, null); g.drawImage(null, 0, 0, null); } COM: <s> paints the arrow depending on the static combo variable </s>
funcom_train/49636598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkRecords () throws IOException { if (records.size() == 0 && next) { try { List<Record> recs = iteratorHolder.next(key, maxQueueSize); if (recs.size() < maxQueueSize) { next = false; } records.addAll(recs); } catch (NoSuchElementException e) { next = false; } } } COM: <s> download next batch of records if applicable and set the next state </s>