__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/14387179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLElement getChild(String name) { XMLElement[] kids = (XMLElement[]) getChildren().toArray(new XMLElement[0]); for (int i = 0; i < kids.length; i++) { if (kids[i].getName().equals(name)) { return kids[i]; } } return null; } COM: <s> returns the first child element with this name or null if none matches </s>
funcom_train/13750402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void excludeFamily(byte[] family) { try { //synchronized (conn) { // send excludeFamily command getDataOutputStream().writeByte(CMD_EXCLUDEFAMILY); getDataOutputStream().writeInt(family.length); getDataOutputStream().write(family, 0, family.length); getDataOutputStream().flush(); // check return value for success checkReturnValue(); //} } catch (Exception e) { /* * drain */ } } COM: <s> takes an array of bytes containing family codes to avoid when finding </s>
funcom_train/2688621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document getCurrentSphereDefinition(final Hashtable session) { GetSphereDefinitionCommand command = new GetSphereDefinitionCommand(); command.putArg( SC.SPHERE_ID, (String)session.get( SC.SPHERE_ID ) ); command.putArg( SC.SUPRA_SPHERE, (String)session.get( SC.SUPRA_SPHERE ) ); return command.execute(this, AbstractDocument.class); } COM: <s> gets the sphere definition attribute of the dialogs main cli object </s>
funcom_train/2293783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSelectedItems() { Iterator it = CmsStringUtil.splitAsList(getParamSelItems(), CmsHtmlList.ITEM_SEPARATOR, true).iterator(); List items = new ArrayList(); while (it.hasNext()) { String id = (String)it.next(); items.add(id); } return items; } COM: <s> returns a list of resource ids of the current selected items </s>
funcom_train/40515687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void listen() { new Thread() { public void run() { listening = true; while (listening) { try { rx.receive(dgRx); byte id = dgRx.readByte(); // log("packet: "+ packet +" received from" + dgRx.getAddress()); getHost(id).updateAddress(dgRx.getAddress()); } catch (IOException ex) { ex.printStackTrace(); } } } }.start(); } COM: <s> way to enable all to be powered up simultaneously </s>
funcom_train/21125501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyReceivedEvent(String sEventName, UUID oOriginatingSite, long lTimeReceived) { // iterate through list for(Iterator it = this.m_oEventReceivedListeners.iterator(); it.hasNext(); ) { // call current method in listener ((EventReceivedListener) it.next()).eventReceived(sEventName, oOriginatingSite, lTimeReceived); } } COM: <s> notifies all registered listener that an event was received an will be </s>
funcom_train/8486041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*public ATObject base_new(ATObject[] initargs) throws InterpreterException { // root.new(@initargs) ATObject root = Evaluator.getGlobalLexicalScope(); return root.meta_invoke(root,NATNil._NEW_NAME_,NATTable.atValue(initargs)); }*/ COM: <s> instantiate the tt root tt object </s>
funcom_train/554897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateDisplayFormat() { new Thread() { @Override public void run() { try { AttributeProxy proxy; proxy = new AttributeProxy(attribute_complete_name); display_format = proxy.get_info().format; } catch (final Exception e) { display_format = ""; } finally { if (readValue != null) { readValue.setDisplayFormat(display_format); } if (writeValue != null) { writeValue.setDisplayFormat(display_format); } if (deltaValue != null) { deltaValue.setDisplayFormat(display_format); } } } }.start(); } COM: <s> sets the displa format reading it from tango </s>
funcom_train/28910477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean invalidStandaloneAttDef(QName element, QName attribute) { // REVISIT: This obviously needs to be fixed! -Ac boolean state = true; /* if (fStandaloneReader == -1) { return false; } // we are normalizing a default att value... this ok? if (element.rawname == -1) { return false; } return getAttDefIsExternal(element, attribute); */ return state; } COM: <s> returns true if invalid standalone attribute definition </s>
funcom_train/50327136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String displayMessage(LocoNetMessage l) { forceHex = false; String s = format(l); if (forceHex) s += "contents: " + l.toString() + "\n"; if (showOpCode) s = LnConstants.OPC_NAME(l.getOpCode()) + ": " + s; return s; } // end of public String displayMessage(LocoNetMessage l) COM: <s> this function creates a string representation of a loco net buffer </s>
funcom_train/32631954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDaily1() { Daily options = new Daily(); Calendar calendar = Calendar.getInstance(); calendar.set(2008, Calendar.JANUARY, 1); options.setStartDate(calendar); options.setContinuesforDays(10); SortedSet events = options.getEvents(); logEvents(events); assertContainsEvent(events, calendar, 2008, Calendar.JANUARY, 1); } COM: <s> test setting and getting days </s>
funcom_train/9286104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printStackAndStopMaster(Exception e) { repLogger.logError(MessageId.REPLICATION_LOGSHIPPER_EXCEPTION, e); try { stopMaster(); } catch (StandardException se) { //The stop master threw an exception saying the replication //has been stopped already. repLogger. logError(MessageId.REPLICATION_MASTER_STOPPED, se); } } COM: <s> used to print the error stack for the given exception and </s>
funcom_train/24116954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printAdjMatrix(){ StringBuilder sb = new StringBuilder(150); for(int i = 0; i < adjMatrix.length; i++){ for(int j = 0; j < adjMatrix[i].length; j++){ sb.append(adjMatrix[i][j] + " | "); } logger.info(sb); } } COM: <s> prints the adjacency matrix of the resource graph </s>
funcom_train/1151453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand13() { if (itemCommand13 == null) {//GEN-END:|376-getter|0|376-preInit // write pre-init user code here itemCommand13 = new Command("Escuchar", Command.ITEM, 0);//GEN-LINE:|376-getter|1|376-postInit // write post-init user code here }//GEN-BEGIN:|376-getter|2| return itemCommand13; } COM: <s> returns an initiliazed instance of item command13 component </s>
funcom_train/29869975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJSearchAdvancedMainTextField() { if (jSearchAdvancedMainTextField == null) { jSearchAdvancedMainTextField = new JTextField(); jSearchAdvancedMainTextField.addActionListener(new java.awt.event.ActionListener(){ public void actionPerformed(ActionEvent e){ actionJSearchAdvancedSearchButton(); } }); } return jSearchAdvancedMainTextField; } COM: <s> this method initializes j search advanced main text field </s>
funcom_train/32057585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetMessage() { System.out.println("testSetMessage"); GPStatusBar x = new GPStatusBar(); String s = new String("Test"); x.setMessage(s); assertTrue(x.getMessage() == s); // return void so no assertEquals() needed } COM: <s> test of set message method of class gpstatus bar </s>
funcom_train/3577920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readFileContents(String pathFileName){ String contents = ""; String line; BufferedReader inFile; try { inFile = new BufferedReader( new FileReader(pathFileName)); while((line=inFile.readLine()) != null){ contents = contents.concat(line + "\n"); } inFile.close(); } catch(IOException e){ } //System.out.println("file contents: " + contents + " path: " + pathFileName); return contents; } COM: <s> read the contents of a file </s>
funcom_train/36941165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkInvariants(EmbeddedBrowser browser, CrawlSession session) { if (invariantChecker.getInvariants() != null && invariantChecker.getInvariants().size() > 0 && !invariantChecker.check(browser)) { for (Invariant failedInvariant : invariantChecker.getFailedInvariants()) { CrawljaxPluginsUtil.runOnInvriantViolationPlugins(failedInvariant, session); } } } COM: <s> check the invariants </s>
funcom_train/28298159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean openActualFile() { if (getActualFile()!=null) { err=readFile(getFileName()); if (err==0) { setChanged(false); } else TransBaseText.printError(err,mainPane); return (err==0); } return false; } COM: <s> opens the actual set file </s>
funcom_train/43988679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void itemStateChanged(ItemEvent evt) { addEvent(evt); if (isLogActive()) { System.out.println("Source:" + evt.getSource()); System.out.println("Item: " + evt.getItem()); System.out.println("State change: " + evt.getStateChange()); } } COM: <s> the observed event source has changed the item state </s>
funcom_train/46744595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInsertUserRef(DisplayModel insertUserRef) { if (Converter.isDifferent(this.insertUserRef, insertUserRef)) { DisplayModel oldinsertUserRef= new DisplayModel(this); oldinsertUserRef.copyAllFrom(this.insertUserRef); this.insertUserRef.copyAllFrom(insertUserRef); setModified("insertUserRef"); firePropertyChange(String.valueOf(PORTALUSERS_INSERTUSERREFID), oldinsertUserRef, insertUserRef); } } COM: <s> portal user that created this record </s>
funcom_train/26627006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Query getQuery(String uri) { Query q = (Query) queries.get(uri); if (q == null) { // q = QueryBuilder.buildFromURI(uri); // currently we always return a NullQuery as QueryBuilder does // not work. q = new NullQuery(myProtocol); } return q; } COM: <s> retrieves a query matching the given identifier uri from the cache </s>
funcom_train/10916985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runBareClient() throws Throwable { getClientCaller().runBareInit(); // Catch the exception just to have a chance to log it try { getClientCaller().runTest(); } catch (Throwable t) { // TODO: Move getLogger to this class instead getClientCaller().getLogger().debug("Exception in test", t); throw t; } } COM: <s> introduced for symmetry with </s>
funcom_train/44706897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validateNameUniqueness(Folder parent, FormSectionEvent e) throws FormProcessException { FormData data = e.getFormData(); if ( parent.getItem((String) data.get(NAME), false) != null ) { throw new FormProcessException( (String) GlobalizationUtil.globalize("cms.ui.authoring.an_item_with_this_name_already_exists").localize()); } } COM: <s> ensure that the name of an item is unique within a folder </s>
funcom_train/8492141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getType() { if (type == null) { type = new JTextField(); type.setBounds(new java.awt.Rectangle(164, 27, 151, 16)); type.setText(tile.getType()); type.addCaretListener(new CaretListener() { public void caretUpdate(CaretEvent e) { if (type.getText().length() <= 0) { type.setBackground(Color.PINK); ok.setEnabled(false); } else { type.setBackground(Color.WHITE); ok.setEnabled(true); } } }); } return type; } COM: <s> this method initializes type </s>
funcom_train/48008105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Frame getParentFrame( Component component ) throws KExceptionClass{ // If this is already the frame if( component instanceof Frame ) return( ( Frame ) component ); // scan tree for parent for( Component parent = component; parent != null; parent = parent.getParent() ){ if( parent instanceof Frame ) return( ( Frame ) parent ); }; // if something goes wrong... throw new KExceptionClass( "Error: Parent frame not found." , null ); } COM: <s> get parent frame of an object </s>
funcom_train/50170389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIncludeAdvancedSearch(boolean includeAdvancedSearch) { includeServiceAspects.setIncludeAdvancedSearch(includeAdvancedSearch); if ( includeAdvancedSearch == false) { AdvancedSearchModel advancedSearchModel = new AdvancedSearchModel(); browserConfigurationModel.setAdvancedSearchModel(advancedSearchModel); advancedSearchViewPanel.setAdvancedSearchModel(advancedSearchModel); } //end if () updateVisibleTabs(); } COM: <s> set the value of include advanced search </s>
funcom_train/50923776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CIFLoop getCanonicalizedLoop() { normalize(); String[] canonNames = getCanonicalizedNames(); int[] newCols = new int[canonNames.length]; for (int i = 0; i < canonNames.length; i++) { newCols[i] = this.getColumnNumber(canonNames[i]); } CIFLoop canonicalLoop = null; try { canonicalLoop = selectColumns(newCols); } catch (CIFException e) { CIFUtil.BUG(e); } return canonicalLoop; } COM: <s> create a new canonicalized loop </s>
funcom_train/24219450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDatabaseOnDBInstance() throws IOException, SQLException { if (!this.databaseExists(MecDriverManager.DB_CONFIG)) { //new installation MecDriverManager.createDatabase(MecDriverManager.DB_CONFIG); } if (!this.databaseExists(MecDriverManager.DB_RUNTIME)) { //new installation MecDriverManager.createDatabase(MecDriverManager.DB_RUNTIME); } } COM: <s> check if db exists and create a new one </s>
funcom_train/21995240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findParent(int folder_id, Set folders) throws RpcException { try { authorize(Folders.FIND_PARENT); return getBus().findParent(folder_id, folders); } catch (JRecSecurityException e) { throw new RpcException("security-problem finding parent", e); } catch (BusException e) { throw new RpcException("bus-problem finding parent", e); } } COM: <s> attempt to determine whether or not folder id </s>
funcom_train/31890581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void windowClosed(AbWindow wnd) { // remove contact manager if no windows refer to it synchronized (windows) { synchronized (contactManagers) { ContactManager cm = wnd.getContactManager(); if (cm.decreaseRefCount() == 0) { assert contactManagers.containsKey(cm.getPath()); cm.destroy(); contactManagersById.remove(cm.getDsListenerId()); contactManagers.remove(cm.getPath()); } // remove window windows.remove(wnd.getWindowId()); } } } COM: <s> remove given window form window manager remove contact manger if needed </s>
funcom_train/28262026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() { // Push extra register first, if 32 bit instruction // Double word will be stored as [sp[LSB][MSB] esp[LSB][MSB]] because // stack is counting backwards in memory if (cpu.doubleWord) { cpu.setWordToStack(cpu.esp); } // Get word at SP and assign to SS:SP cpu.setWordToStack(cpu.sp); } COM: <s> this pushes the word in sp onto stack top ss sp </s>
funcom_train/37740168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getOldValueShort () { if (getOldValue() == null) { return null; } if (getOldValue().length() <= 30) { return getOldValue(); } else { return getOldValue().substring(0, 27) + "..."; } } COM: <s> get the start of the old value </s>
funcom_train/45538666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void install(JSCEditor editor, ISourceViewer sourceViewer, SemanticHighlightingPresenter presenter, SemanticHighlighting[] semanticHighlightings, Highlighting[] highlightings) { fPresenter= presenter; fSemanticHighlightings= semanticHighlightings; fHighlightings= highlightings; fEditor= editor; fSourceViewer= sourceViewer; if (fEditor instanceof CompilationUnitEditor) { ((CompilationUnitEditor)fEditor).addReconcileListener(this); } else if (fEditor == null) { fSourceViewer.addTextInputListener(this); scheduleJob(); } } COM: <s> install this reconciler on the given editor presenter and highlightings </s>
funcom_train/4852819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getDeepCombo() { if (deepCombo == null) { deepCombo = new JComboBox(); deepCombo.setMaximumRowCount(5); deepCombo.insertItemAt("1", 0); deepCombo.insertItemAt("2", 1); deepCombo.insertItemAt("3", 2); deepCombo.insertItemAt("4", 3); deepCombo.insertItemAt("5", 4); deepCombo.setSelectedIndex(2); } return deepCombo; } COM: <s> this method initializes deep combo </s>
funcom_train/44489595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Scanner createScanner(final ICharBuffer buf) { final ITokenizer[] tokenScanners = new ITokenizer[factories.length]; for (int i = 0; i < factories.length; i++) tokenScanners[i] = factories[i].getTokenScanner(); return new Scanner(buf, tokenScanners, this); } COM: <s> returns a new scanner that can be used to tokenize the contents </s>
funcom_train/47563338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int setPrepareStatement(PreparedStatement preStat, int idx, Integer[] array) throws java.sql.SQLException{ if (array!=null && array.length>0) { for (int j=0; j<array.length; j++) { this.setPrepareStatement(preStat, idx++, array[j]); } } return idx; } COM: <s> call set prepare statment by a list of interger </s>
funcom_train/36199321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean answer() throws Exception { if (driver == null) { throw new Exception("Driver not set"); } if (waitBusy()) { throw new ModemBusyException("Modem is already executing command"); } busy = true; try { status = 0; dataMode = true; return driver.answer(this); } finally { busy = false; } } COM: <s> answers a data call </s>
funcom_train/50912380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finishMakingElement(Element parent) throws RuntimeException { double[] array = this.getXMLContent(); if (array == null) { throw new RuntimeException("point must not be empty"); } else if (array.length != 3) { throw new RuntimeException("point must have 3 double components"); } } COM: <s> check point is ok </s>
funcom_train/36718186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { try{ blobDetector = new BlobDetector(1, false); //open image file URL url = new URL("http://cs-people.bu.edu/lisap/CS511/TestImages/TWOTEST_0.png"); BufferedImage bi = null; bi = ImageIO.read(url); add(controls = new BlobDetectorControls(bi)); controls.imagepanel.repaint(); blobDetector.detectBlobs(bi); //this call will create background model and return null }catch(Exception e){ System.out.println("Unable to open file " + e.getMessage()); e.printStackTrace(); } } COM: <s> this method sets up the graphical user interface elements </s>
funcom_train/34963714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeHeader() { printHtmlHeader(configuration.getText("doclet.Window_Deprecated_List"), null, true); navLinks(true); hr(); center(); h2(); boldText("doclet.Deprecated_API"); h2End(); centerEnd(); hr(4, "noshade"); } COM: <s> print the navigation bar and header for the deprecated api listing </s>
funcom_train/41109260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String extractText(Holder holder) throws IOException { ByteArrayInputStream is = new ByteArrayInputStream(holder.getContent()); RTFEditorKit kit = new RTFEditorKit(); Document doc = kit.createDefaultDocument(); try { kit.read(is, doc, 0); return doc.getText(0, doc.getLength()); } catch (BadLocationException e) { throw new IOException("RTFEditorKit BadLocationException"); } finally { IOUtils.closeQuietly(is); } } COM: <s> extract the text from a rtf document </s>
funcom_train/22276236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPost(Post post, boolean isUpdate) { delicious.addPost(post.getHref(), post.getDescription(), post.getExtended(), null, post.getTime(), isUpdate, post.isShared()); } COM: <s> adds a post to the delicious site </s>
funcom_train/39220456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeComplete(PySequence seq) { Iterator it = seq.findGraphElements().iterator(); while (it.hasNext()) { GraphElement element = (GraphElement) it.next(); if (element instanceof Node) removeNodeComplete((Node) element); else if (element instanceof Edge) removeEdgeComplete((Edge) element); } lastMod = System.currentTimeMillis() - 1; // invalidate cache } COM: <s> remove nodes and edges completely from the system all states </s>
funcom_train/33895708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String key, String pattern) { mappings.put(pattern, key); if (pattern.indexOf('?') > -1 || (pattern.indexOf("*") > -1 && pattern.length() > 1)) { complexPaths.add(pattern); } } COM: <s> add a key and appropriate matching pattern </s>
funcom_train/3118899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void panCamera(final double dx, final double dy) { final PCamera camera = radarCanvas.getCamera(); camera.translateView( dx * PAN_JUMP / camera.getViewScale(), dy * PAN_JUMP / camera.getViewScale()); rectangle.translate(dx * PAN_JUMP, dy * PAN_JUMP); } COM: <s> pans the radar view </s>
funcom_train/2952713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IConfigItemFactory getConfigItemFactory(String extensionPointId) { for (Iterator it = this.configItemFactories.iterator(); it.hasNext();) { IConfigItemFactory factory = (IConfigItemFactory) it.next(); if (factory.getExtensionPointId().equals(extensionPointId)) { return factory; } } return null; } COM: <s> returns the iconfig item factory object for the given extension point </s>
funcom_train/32753623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare( final ReadbackSetRecord record1, final ReadbackSetRecord record2 ) { if ( record1 == null && record2 == null ) { return 0; } else if ( record1 == null ) { return -1; } else if ( record2 == null ) { return 1; } else { final double position1 = SEQUENCE.getPosition( record1.getNode() ); final double position2 = SEQUENCE.getPosition( record2.getNode() ); return position1 > position2 ? 1 : position1 < position2 ? -1 : 0; } } COM: <s> compare the records based on location relative to the start of the sequence </s>
funcom_train/43269038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCaption(String caption) { // Error handiling to match database schema if ((caption != null) && (caption.length() > 1000)) { caption = caption.substring(0, 1000); log.info("WARNING: Truncating caption to 1000 characters"); } this.caption = caption; } COM: <s> sets the code media code caption attribute </s>
funcom_train/20219360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNextChar() throws IOException{ StringBuffer reader = new StringBuffer(); for(int i = 0; i < 10000; i++) { reader.append(i); } CharStream charStream = new ReaderCharStream(new StringReader(reader.toString())); StringBuffer result = new StringBuffer(); char ch; while(( ch = charStream.nextChar()) != CharStream.END) { result.append(ch); } assertEquals(reader.toString(), result.toString()); } COM: <s> reader char stream </s>
funcom_train/49789543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHasIncomingUserInstance() throws Exception { root = loadAndInfer(UserRoles.class); Session session = assertHasSession(root, "target session"); AccessControlHandler ach = assertHasAccessControlHandler(session, "role-based access"); DomainIterator instance = assertHasDomainIterator(session, "current instance"); Parameter param = assertHasParameter(session, instance, ach); assertGenerated(param); } COM: <s> the access control handler should have an incoming user instance </s>
funcom_train/19839148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SimpleTrackList randomTracks(int num) throws StrandsServiceException { assertNotNegative("num", num); Map<String, String[]> parameter = new HashMap<String, String[]>(); parameter.put("num", new String[] { String.valueOf(num) }); return (SimpleTrackList) request("/random/tracks", parameter); } COM: <s> returns the specified number of randomly selected tracks from the </s>
funcom_train/2296168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initPreview(Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException { String preview = root.attributeValue(APPINFO_ATTR_URI); if (preview == null) { throw new CmsXmlException(Messages.get().container( Messages.ERR_XMLCONTENT_MISSING_PREVIEW_URI_2, root.getName(), contentDefinition.getSchemaLocation())); } m_previewLocation = preview; } COM: <s> initializes the preview location for this content handler </s>
funcom_train/17931918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRow(EFile efile){ Object[] obj = {efile.getName(),efile.getMimetype(), efile.getMd5(), efile.getSize(), efile.getFilelocation(), efile.getExtension(), efile.getId()}; data.addElement(obj); int size = getRowCount(); fireTableRowsInserted(size-1,size-1); } COM: <s> adds an efile object as a new row </s>
funcom_train/47546124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText (String string) { checkWidget (); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); if ((style & SWT.ARROW) != 0) return; text = string; char [] chars = fixMnemonic (string); byte [] buffer = Converter.wcsToMbcs (null, chars, true); OS.gtk_label_set_text_with_mnemonic (labelHandle, buffer); OS.gtk_widget_hide (imageHandle); OS.gtk_widget_show (labelHandle); } COM: <s> sets the receivers text </s>
funcom_train/33368137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeKeyword(int keyID) throws SQLException { dbm.exec("delete from InfoHandoutKeywords where handoutID = '" + getID() + "' and keyID = '" + keyID + "'"); try { Keyword key = Keyword.getKeyword(keyID); if (key.getRefCount() == 0) key.delete(); } catch (NotFoundException nfe) { /* ignore */ } } COM: <s> remove the id of a keyword from the list of associated keywords </s>
funcom_train/37651033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processProjectFiles(IProject project, IProgressMonitor monitor) throws CommandException { ReviewCodeCmd cmd = new ReviewCodeCmd(); cmd.addResource(project); cmd.setTaskMarker(false); cmd.setMonitor(monitor); cmd.performExecute(); // a builder is always asynchronous; execute a command synchronously whatever its processor } COM: <s> process all files in the project </s>
funcom_train/6260619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(Object o) { operationStarted(); try { if (verify(o)) { int index = listIterator.nextIndex() - 1; Object removed = iteratedList.get(index); if (removed == o) { return; } checkAddedElement(o); listIterator.set(o); elementRemoved(index, removed); elementAdded(index, o); } } finally { operationFinished(); } } COM: <s> replaces the last element returned by tt next tt or tt previous </s>
funcom_train/18032159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getButtonDate() { if (m_buttonDate == null) { m_buttonDate = new JButton(".."); //$NON-NLS-1$ m_buttonDate.setEnabled(false); m_buttonDate.setMargin(new Insets(0, 5, 0, 5)); m_buttonDate.setPreferredSize(new Dimension( m_buttonDate.getPreferredSize().width, getTextCustomDate().getPreferredSize().height)); m_buttonDate.addActionListener(new MyActionListener()); } return m_buttonDate; } COM: <s> returns the button for choosing a date </s>
funcom_train/36426683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(final APLElement a){ int oldSize = this.getSize(); if (intentions.remove(a)) { if (this.log.getShowAPL()) this.log.info("removed Element from APL (before " + oldSize + " now " + this.getSize() + " elements)"); } } COM: <s> remove the given element from the apl </s>
funcom_train/24370247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public GeoConicPart CircumcircleArc(String label, GeoPoint A, GeoPoint B, GeoPoint C) { AlgoConicPartCircumcircle algo = new AlgoConicPartCircumcircle(cons, label, A,B, C, GeoConicPart.CONIC_PART_ARC); processCreateCommand(algo.getConicPart()); //VMT modification return algo.getConicPart(); } COM: <s> circle arc from three points </s>
funcom_train/48184959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printEPs() { List<SatOp> preds = edgeFactory.preds; for (int i=0; i < preds.size(); i++) { SatOp lf_i = preds.get(i); out.println("ep[" + i + "]: " + lf_i); } out.flush(); } COM: <s> prints the elementary predications </s>
funcom_train/8811988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NumberField addNumberField(String fieldLabelString, boolean allowBlank) { // Lazy building. if (window == null) { init(); } // Builds the text field. final NumberField field = new NumberField(); field.setAllowBlank(allowBlank); field.setFieldLabel(fieldLabelString); fields.add(new FieldWrapper(field, allowBlank)); addField(field, fieldLabelString); return field; } COM: <s> adds a number field in the window </s>
funcom_train/2710965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fillBuffer() { if (characterInputSource) { char[] nextBuffer = new char[2048]; try { int nChars = source.getCharacterStream().read(nextBuffer); if (nChars>0) { buffer.append(nextBuffer,0,nChars); if (isOriginalTextBuffered()) { inputText.append(nextBuffer, 0, nChars); } } else { inputStreamEmpty = true; } } catch (IOException e) { e.printStackTrace(); } } } COM: <s> put more characters into the buffer that is used for parsing </s>
funcom_train/2878152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(Context params){ if (params != null) { if (cxt == null) { cxt = params; return; } for (Enumeration e = params.keys(); e.hasMoreElements();) { Object key = e.nextElement(); put(key, params.get(key)); } } } COM: <s> puts additional context in the exception context </s>
funcom_train/44862882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendException(Exception e) { if (exception_listeners.size() == 0) { e.printStackTrace(); return; } Iterator iter = exception_listeners.iterator(); while (iter.hasNext()) { ExceptionListener l = (ExceptionListener) iter.next(); l.exceptionOccurred(e,this); } } COM: <s> this method sends an exception to registred listeners </s>
funcom_train/7624417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean onSuggestionsKey(View v, int keyCode, KeyEvent event) { boolean handled = false; // also guard against possible race conditions (late arrival after dismiss) if (mSearchable != null) { handled = doSuggestionsKey(v, keyCode, event); } return handled; } COM: <s> react to the user typing while the suggestions are focused </s>
funcom_train/41471758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load() throws FileNotFoundException { XMLObjectReader reader = null; try { reader = XMLObjectReader.newInstance(new FileInputStream(persistFile.toString())); reader.setBinding(binding); rules = reader.read(RULE, FastMap.class); primaryAddresses = reader.read(PRIMARY_ADDRESS, FastMap.class); backupAddresses = reader.read(BACKUP_ADDRESS, FastMap.class); } catch (XMLStreamException ex) { // this.logger.info( // "Error while re-creating Linksets from persisted file", ex); } } COM: <s> load and create link sets and link from persisted file </s>
funcom_train/22562822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AssessmentPopupController getAssessmentPopupController() { if (this.assessmentPopupController == null) { try { this.assessmentPopupController = new AssessmentPopupController() { @Override public void handleOk() { processAssessmentResult(); } @Override public String getAssessmentId() { return (competence != null && competence.getAssessment() != null) ? competence.getAssessment() .getIdentifier() : null; } }; } catch (Exception e) { PortletUtils.handleError(LOG, e); } } return this.assessmentPopupController; } COM: <s> gets the assessment popup controller </s>
funcom_train/47160843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypeResolver resolveType(String name) { Class<?>[] classes = clazz.getClasses(); for (int i = 0; i < classes.length; i++) { if (classes[i].getSimpleName().equals(name)) { return new TypeResolver(classes[i]); } } throw new UnresolvableNameException(name); } COM: <s> resolves the member type with the given name </s>
funcom_train/32138814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean saveLog(File file) { try { if(!file.exists()) { file.getParentFile().mkdirs(); file.createNewFile(); } FileReader r = new FileReader(outputFile); FileWriter w = new FileWriter(file, true); char[] buffer = new char[BUFFER_SIZE]; int count; while(-1 != (count = r.read(buffer))) w.write(new String(buffer, 0, count)); w.flush(); writer.close(); writer = w; r.close(); outputFile.delete(); outputFile = file; saveLog = true; } catch(IOException ioe) { return false; } return true; } COM: <s> saves the logfile </s>
funcom_train/7553899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void searchNetwork(String query, String uniqueId, MessageReceiver receiver) { logger.debug("User requesting to search the network. Query:: " + query); SearchSession session = c.createSearchSession(query, 0, 10, 0, receiver); //store the open search session so we can close it some day!! openSessions.put(uniqueId, session); logger.debug("JTellaAdapter:exiting search method"); } COM: <s> performs a search on the gnutella network responses by callback of this </s>
funcom_train/5276782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWorkout(Workout workout) { if (workout == null) { log4j.debug("workout is null"); this.workout = null; this.newWorkout = false; } log4j.debug("setWorkout() to " + workout.toString()); this.newWorkout = false; this.workout = workout; resetInternalFields(); // notifying a view and a controller that field "workout" has changed: notifyObservers("workout"); } COM: <s> this method notifies workout view that workout has changed </s>
funcom_train/7524750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receive(Address sender, byte[] data, int offset, int length) { if(receiver != null) { receiver.receive(sender, data, offset, length); } else if(log.isErrorEnabled()) log.error("receiver is null (not set) !"); } COM: <s> calls the receiver callback </s>
funcom_train/24036822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int consume(double ticks) { if (totalParent == 0 || totalForChildren == 0) // this monitor has no available work to report return 0; usedForChildren += ticks; if (usedForChildren > totalForChildren) usedForChildren = totalForChildren; else if (usedForChildren < 0.0) usedForChildren = 0.0; int parentPosition = (int) (totalParent * usedForChildren / totalForChildren); int delta = parentPosition - usedForParent; usedForParent = parentPosition; return delta; } COM: <s> consumes the given number of child ticks given as a double </s>
funcom_train/34890080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawCenterCross(Graphics g) { g.setColor(0xFF0000); short vertCenter = (short) (height / 2); short horCenter = (short) (width / 2); g.drawLine(horCenter, vertCenter - 10, horCenter, vertCenter + 10); g.drawLine(horCenter - 10, vertCenter, horCenter + 10, vertCenter); } COM: <s> draw center cross which indicates position of the user </s>
funcom_train/8690203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addProperties(Properties props) { resolveAllProperties(props); Enumeration e = props.keys(); while (e.hasMoreElements()) { String propertyName = (String) e.nextElement(); String propertyValue = props.getProperty(propertyName); String v = getProject().replaceProperties(propertyValue); if (prefix != null) { propertyName = prefix + propertyName; } addProperty(propertyName, v); } } COM: <s> iterate through a set of properties </s>
funcom_train/3887516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTitlePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EnvironmentType_title_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EnvironmentType_title_feature", "_UI_EnvironmentType_type"), ImsldV1p0Package.Literals.ENVIRONMENT_TYPE__TITLE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the title feature </s>
funcom_train/50812519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData (ClientInfo data) { this.uid.setText(data.getUID()); this.nickname.setText(data.getNickname()); this.name.setText(data.getName()); this.surname.setText(data.getSurname()); this.email.setText(data.getEMailAddress()); this.lastHost.setText(data.getLastHost()); this.lastPort.setText(data.getLastPort()); } COM: <s> sets the text fields in the gui to </s>
funcom_train/5345050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Iterator allConnections() { List normal = RouterService.getConnectionManager().getInitializedConnections(); List leaves = RouterService.getConnectionManager().getInitializedClientConnections(); List buf = new ArrayList(normal.size() + leaves.size()); buf.addAll(normal); buf.addAll(leaves); return buf.iterator(); } COM: <s> returns an iterator of all initialized connections in this including </s>
funcom_train/6343750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setDefaultCompositeCacheAttributes(Properties props) { ICompositeCacheAttributes icca = parseCompositeCacheAttributes(props, "", this.DEFAULT_REGION ); ccMgr.setDefaultCacheAttributes( icca ); if ( debug ) { p( "setting defaultCompositeCacheAttributes to " + icca ); } log.info( "setting defaultCompositeCacheAttributes to " + icca ); } COM: <s> set the default composite cache attributes new caches </s>
funcom_train/25187595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAdditionalItems() throws Exception { System.out.println("getAdditionalItems"); JSchema instance = new JSchema(); JSchema expResult = new JSchema(); assertNull(instance.getAdditionalItems()); instance.setAdditionalItems(expResult); assertEquals(expResult, instance.getAdditionalItems()); } COM: <s> test of get additional items method of class jschema </s>
funcom_train/2898424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClassName(IClassFile file) { IJavaElement parent = file.getParent(); String name = file.getElementName(); int index = name.lastIndexOf(".class"); if (index>0) { className = name.substring(0,index); } if ( parent instanceof IPackageFragment ) { IPackageFragment pFragment = (IPackageFragment)parent; this.className = pFragment.getElementName()+"."+className; } } COM: <s> setter for class name with iclass file type </s>
funcom_train/38527830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resolveOurTransactions(LinkedList list) { Iterator i = list.iterator(); while (i.hasNext()) { GlobalTransaction gt = (GlobalTransaction) i.next(); try { log .info("SIMPLEJTA-SimpleTransactionManager: Resolving transaction " + gt.getXid()); gt.resolve(); transactionLog.deleteTransaction(gt); } catch (SystemException e) { log .error( "SIMPLEJTA-SimpleTransactionManager: Error occurred while resolving transaction " + gt.getXid(), e); } } } COM: <s> resolve those transactions that are identified as ours </s>
funcom_train/1558605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean handleKeyPressed(KeyEvent event) { // GENERAL KEYS: // handle ESC, function keys, zooming with Ctrl +, Ctrl -, etc. if (handleGeneralKeys(event)) { return true; } // SELECTED GEOS: // handle function keys, arrow keys, +/- keys for selected geos, etc. if (handleSelectedGeosKeys(event, app.getSelectedGeos())) { return true; } return false; } COM: <s> the key pressed event is generated when a key is pushed down </s>
funcom_train/37071283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doArticleUnobsoletion() throws SQLException { String query = "update pub_article set is_obsolete='n', " + " updated_by= ?, date_updated=curdate()," + " replaced_by = NULL where id= ? "; PreparedStatement stmt = conn.prepareStatement(query); try { stmt.setString(1, updated_by); stmt.setString(2, article_id); stmt.executeUpdate(); } finally { stmt.close(); } } COM: <s> unobsoletes the article entry in our database </s>
funcom_train/37475939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toXML() { StringBuffer sb = new StringBuffer(); sb.append("\n<Databit name=\"" + name + "\" desc=\"" + description + "\" type=\"" + getType() + "\" value=\"" + value + " \" " + "state=\"" + state + "\" />"); return new String(sb); } COM: <s> returns a xml representing the databit object </s>
funcom_train/25370330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setObject(Object object) { m_dsClusterer = (com.sodad.weka.gui.beans.Clusterer)object; try { m_backup = (com.sodad.weka.clusterers.Clusterer)GenericObjectEditor.makeCopy(m_dsClusterer.getClusterer()); } catch (Exception ex) { // ignore } m_ClustererEditor.setTarget(m_dsClusterer.getClusterer()); } COM: <s> set the clusterer object to be edited </s>
funcom_train/951431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("OK")) { if (this.revocationList.containsCustomer(this.textField.getText())) { if (!this.addMode) this.revocationList.removeEntry(this.textField.getText()); } else { if (this.addMode) this.revocationList.makeEntry(this.textField.getText()); } this.dispose(); } else if (e.getActionCommand().equals("Cancel")) this.dispose(); } COM: <s> reacts on all user actions within the dialog </s>
funcom_train/12299511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getMenuEdit() { if (menuEdit == null) { menuEdit = new JMenu(); menuEdit.setText(Messages.getString("MainWindow.edit")); //$NON-NLS-1$ menuEdit.setMnemonic(KeyEvent.VK_E); menuEdit.setName("MenuEdit"); //$NON-NLS-1$ menuEdit.add(getMenuNavigate()); menuEdit.add(getMenuItemConfig()); menuEdit.add(getCheckBoxMenuItemMangaMode()); } return menuEdit; } COM: <s> this method initializes menu edit </s>
funcom_train/19637955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TestSuite make() { this.result = new TestSuite(); this.prefix = getBaseName(startingClass); result.setName(prefix); BulkTest bulk = makeFirstTestCase(startingClass); ignored = new ArrayList(); String[] s = bulk.ignoredTests(); if (s != null) { ignored.addAll(Arrays.asList(s)); } make(bulk); return result; } COM: <s> makes a hierarchal test suite based on the starting class </s>
funcom_train/14228182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MediaTerminal getAvailableMediaTerminal() { MediaTerminal mt = null; DomainMgr mgr = this.getDomainMgr(); Iterator<String> it = mgr.mediaTerminals(); while (it.hasNext()) { String termName = it.next(); FreeMediaTerminal maybe = (FreeMediaTerminal)mgr.getLazyTerminal(termName, true); TerminalConnection[] tcs = maybe.getTerminalConnections(); if (tcs == null || tcs.length == 0) { mt = maybe; break; } } return mt; } COM: <s> return the first known media terminal with no connections currently on it </s>
funcom_train/3373462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { switch (type) { case '*': return content + "*"; case '?': return content + "?"; case '+': return content + "+"; case ',': case '|': case '&': char data[] = {' ', (char)type, ' '}; String str = ""; for (ContentModel m = (ContentModel)content ; m != null ; m = m.next) { str = str + m; if (m.next != null) { str += new String(data); } } return "(" + str + ")"; default: return content.toString(); } } COM: <s> convert to a string </s>
funcom_train/5865068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFormat(String format) throws WrongValueException { if (!Objects.equals(_format, format)) { final String old = _format; _format = format; smartUpdate("z.fmt", getFormat()); try { smartUpdate("value", getText()); //Yes, the value attribute is changed! (no format attr in client) } catch (WrongValueException ex) { //ignore it (safe because it will keep throwing exception) } } } COM: <s> sets the format </s>
funcom_train/46857453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSpinner getSpnCapacity() { if (spnCapacity == null) { spnCapacity = new JSpinner(); spnCapacity.setPreferredSize(new Dimension(50, 20)); spnCapacity.setModel(new SpinnerNumberModel(1,1,10000,1)); spnCapacity.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { currentSchool.setCapacity((Integer) spnCapacity.getValue()); } }); } return spnCapacity; } COM: <s> this method initializes spn capacity </s>
funcom_train/45256481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readWizards() { if (readAll) { if (!areWizardsRead()) { createEmptyWizardCollection(); IExtensionRegistry registry = Platform.getExtensionRegistry(); readRegistry(registry, plugin, pluginPoint); } } finishCategories(); finishWizards(); finishPrimary(); if (wizardElements != null) { pruneEmptyCategories(wizardElements); } } COM: <s> reads the wizards in a registry </s>
funcom_train/26277277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logBeginOfTransfer() { this._bytesWereRead = true; this._timeWhenFirstByteWasRead = new java.util.Date().getTime(); this._timeOfLastStatusLogging = this._timeWhenFirstByteWasRead; this._ftpConnection.log("[receiving data on data connection}"); COM: <s> display the beginning of the transfer in the ftp connections log </s>
funcom_train/8342558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initComponents() { previous = new JButton(new ArrowIcon(SwingConstants.WEST)); next = new JButton(new ArrowIcon(SwingConstants.EAST)); previous.setToolTipText("<html>Previous Record</html>"); next.setToolTipText("<html>Next Record</html>"); previous.setActionCommand(PREVIOUS); next.setActionCommand(NEXT); next.addActionListener(this); previous.addActionListener(this); } COM: <s> initialize our components </s>
funcom_train/33419516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renderEndingBoundaryComment(Appendable writer, String widgetType, ModelWidget modelWidget) throws IOException { if (modelWidget.boundaryCommentsEnabled()) { writer.append(this.buildBoundaryComment("End", widgetType, modelWidget.getBoundaryCommentName())); } } COM: <s> renders the ending boundary comment string </s>
funcom_train/34765100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writePaint(this.dialBackgroundPaint, stream); SerialUtilities.writePaint(this.needlePaint, stream); SerialUtilities.writePaint(this.valuePaint, stream); SerialUtilities.writePaint(this.tickPaint, stream); SerialUtilities.writePaint(this.tickLabelPaint, stream); } COM: <s> provides serialization support </s>