__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/29986767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ThrowsTag getThrowsTag(final ThrowsTag originalTag) { if (originalTag == null) { return null; } Object found = get(originalTag); if (found == null) { found = this.factory.createThrowsTag(originalTag); put(originalTag, found); } return (ThrowsTag) found; } COM: <s> returns a wrapped instance of the supplied throws tag object </s>
funcom_train/26488705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processHooks() { if (getContext().getDevice().isWmlDevice() && !StringUtil.isEmpty(getParameter("la"))) { String language = getParameter("la"); getContext().setSessionAttribute("language", language); this.language = language; } } COM: <s> the process hooks method is executed first of all in the run method </s>
funcom_train/9116595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateInfo() { // update cPos odo.getPosition(cPos); synchronized (vectorLock) { // compute unitH unitH[0] = Math.sin(cPos[2]); unitH[1] = Math.cos(cPos[2]); // compute targV targV[0] = targPos[0] - cPos[0]; targV[1] = targPos[1] - cPos[1]; } } COM: <s> gets called by timed out updates the relevant vectors from current </s>
funcom_train/48762396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (!stopCollecting) { try { Observation obs = subscriber.receive(); obs.collectedTimestamp = System.currentTimeMillis(); engine.getRecordCollection(collectionName).setRecord( obs.requestId + obs.sequenceNum + "_" + obs.collectedTimestamp, new Record(obs)); } catch (Exception e) { e.printStackTrace(); } } worker = null; } COM: <s> loops collecting observations from the observation subscriber </s>
funcom_train/10859383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String storedToIndexed(IndexableField f) { // right now, the transformation of single valued fields like SortableInt // is done when the Field is created, not at analysis time... this means // that the indexed form is the same as the stored field form. return f.stringValue(); } COM: <s> given the stored field return the indexed form </s>
funcom_train/48498962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMode (String mode) { String persistentMode = getMode(); setProperty("application.mode", mode); // If modus switched off from product support, make // sure to turn off the product sla option if (persistentMode.equals("PRODUCT") && !mode.equals("PRODUCT") && isSwitchedOn("ISSUE")) setProductSLA(false); } COM: <s> change the mode of the application </s>
funcom_train/65052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSashForm() { GridData gridData = new org.eclipse.swt.layout.GridData(); gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; gridData.grabExcessHorizontalSpace = true; gridData.grabExcessVerticalSpace = true; gridData.verticalAlignment = org.eclipse.swt.layout.GridData.FILL; sashForm = new SashForm(top, SWT.NONE); sashForm.setOrientation(org.eclipse.swt.SWT.VERTICAL); sashForm.setLayoutData(gridData); createTopComposite(); createBottomComposite(); } COM: <s> this method initializes sash form </s>
funcom_train/19837803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BigInteger getUpper(int n) { int len = mag.length; if (len <= n) return ZERO; int upperLen = len - n; int upperInts[] = new int[upperLen]; System.arraycopy(mag, 0, upperInts, 0, upperLen); return new BigInteger(trustedStripLeadingZeroInts(upperInts), 1); } COM: <s> returns a new big integer representing mag </s>
funcom_train/46455456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(DrawingPanel panel, Graphics g) { if(text==null || text.equals(""))return; Font oldFont = g.getFont(); if(this.pixelXY) { drawWithPix(panel, g); } else { drawWithWorld(panel, g); } g.setFont(oldFont); } COM: <s> draws the text line </s>
funcom_train/11088837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String uninstallSharedLibrary(String name) throws Exception { try { getInstallationService().doUninstallSharedLibrary(name); return ManagementSupport.createSuccessMessage("uninstallSharedLibrary", name); } catch (Throwable e) { throw ManagementSupport.failure("uninstallSharedLibrary", name, e); } } COM: <s> uninstalls a previously installed shared library </s>
funcom_train/45864128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int add(Positionable item) { int n = 0; for (; n < used; n++) { if (bucket[n] == item) { break; } } active[n] = true; if (used == n) { used++; bucket[n] = item; } if (DEBUG) { System.out.println("Adding: " + item + " at: " + n + " (total: " + used + ")"); } return n; } COM: <s> adds a new item to the container </s>
funcom_train/10708317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValueOfDoubleNeg() { double a = -65678765876567576.98788767; BigDecimal result = BigDecimal.valueOf(a); String res = "-65678765876567576"; int resScale = 0; assertEquals("incorrect value", res, result.toString()); assertEquals("incorrect scale", resScale, result.scale()); } COM: <s> create a big decimal from a negative double value </s>
funcom_train/46058059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NewBGController createNewBGController(UserRequest ureq, WindowControl wControl, UserActivityLogger ual,boolean minMaxEnabled, BGContext bgContext){ return createNewBGController(ureq, wControl, ual, minMaxEnabled, bgContext, false, null); } COM: <s> create controller for new business group creation </s>
funcom_train/32157786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar getMyMenuBar() { if (myMenuBar == null) { myMenuBar = new JMenuBar(); myMenuBar.add(getFileMenu()); myMenuBar.add(getSimulationMenu()); myMenuBar.add(getDebugMenu()); myMenuBar.add(getGeneratorsMenu()); myMenuBar.add(getExperimentsMenu()); myMenuBar.add(getResultsMenu()); myMenuBar.add(getThemesMenu()); myMenuBar.add(getHelpMenu()); } return myMenuBar; } COM: <s> this method initializes my menu bar </s>
funcom_train/32793724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void constraintDataChanged(ConstraintChangeEvent cce) { // TODO: Deal with fields. if (cce.getIndex() == m_jtConstraintList.getSelectedRow()) { m_jtpConstraintEditor.setText(cce.getNew().getData()); m_jtpConstraintPreview.setText(cce.getNew().getData()); m_fConstraintChanged = true; } } COM: <s> update the editor if the currently selected constraint changed </s>
funcom_train/46578888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyStartDate(Date startDate) { if (startDate == null) { return; } if (periodWeek.getSelectedDays().size() > 0) { return; } Calendar calendar = Calendar.getInstance(); calendar.setTime(startDate); selectDay(calendar.get(Calendar.DAY_OF_WEEK)); } COM: <s> receives notification of the start date so that a default week day can </s>
funcom_train/12188907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSubstringOfNumber() throws ExpressionException { final Function function = new SubstringFunction(); Value result = function.invoke(expressionContextMock, new Value[]{factory.createIntValue(123456), factory.createIntValue(3), factory.createIntValue(2)}); assertTrue(result instanceof StringValue); assertEquals("34", ((StringValue) result).asJavaString()); } COM: <s> tests if number passed to function is casted to string </s>
funcom_train/19326794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double traitStress(final FObj fobj, final FoContext context) { final AbstractAudioDial property = (AbstractAudioDial) getProperty( FoProperty.STRESS); if (property != null) { return property.getValue(context, fobj); } return AbstractAudioDial.getValueNoInstance(context, fobj, FoProperty.STRESS); } COM: <s> returns the stress property </s>
funcom_train/13209507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintPiecesForSelection(Piece[] pieceList, CuatroState state, Graphics g) { int[] selection = state.getSelection(); if (selection!=null) { for (int i = 0; i < selection.length; i++) { if (selection[i] == CuatroBasic.TRUE) { Point pos = getPositionOfSelection(i); drawPart(pos.x, pos.y, pieceList[i], g); } } } } COM: <s> paint the pieces that remain for selection </s>
funcom_train/40389068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer getLineNumber(Member member) { Preconditions.checkArgument(type == member.getDeclaringClass(), "Member %s belongs to %s, not %s", member, member.getDeclaringClass(), type); return lines.get(memberKey(member)); } COM: <s> get the line number associated with the given member </s>
funcom_train/25581853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultDomain(DomainLink link) throws IOException, URISyntaxException { List<Link> domain = new ArrayList<Link>(); domain.add(link); if (!this.filename.equals("default")) { this.setFilename("default"); } this.writeLinkListToFile(domain, "lemming"); } COM: <s> set a domain as default so that when lemming is loaded this domain </s>
funcom_train/17059871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void newRole() { ServiceHubRole role = new ServiceHubRole(); role.setRoleName(roleName.getText()); try { store.createRole(role); } catch (Exception ex) { ServiceHub.logStackTrace(ex, getClass()); } endRoleEdit(); } COM: <s> create the role whose name is entered in the role name control </s>
funcom_train/10209457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayPluginLoadErrorMsg(Throwable t, Extension ext) { String message = "Failed to load Plugin: " + ext.getParameter("class").valueAsString(); if(t.getCause()!=null) message += "Caused by:" + t.getCause(); if(t.getMessage() != null) message += t.getMessage(); JOptionPane.showMessageDialog(null, (Object) message, "Error", JOptionPane.ERROR_MESSAGE); Logger log = Logger.getLogger(this.getClass()); log.fatal(message, t); } COM: <s> displays an error message in the case of a failure during plugin loading </s>
funcom_train/36492187
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SimpleNumberSpinner setMinusButtonIcon(int drawableIcon) { for (int i = 0; i < mba.size(); i++) { ((TextView) mba.get(i)).setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(drawableIcon), null, null, null); } MINUS_BUTTON = drawableIcon; return this; } COM: <s> sets the minu button icon </s>
funcom_train/125833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void tsquarterly() throws ParseException { Token x; jj_consume_token(QUARTER); x = jj_consume_token(INTEGER); int subPeriod = Double.valueOf(x.image).intValue(); TSDate mainDate = (TSDate) argStack.pop(); argStack.push(new TSDate(mainDate.mainPeriod(), subPeriod, 4)); } COM: <s> quarterly 1960 q3 </s>
funcom_train/28342978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMonitorEventListener( final MonitorEventListener listener ) { synchronized( _eventLock ) { _messageCenter.registerTarget( listener, this, MonitorEventListener.class ); // immediately notify the new listener of the current status if ( _channel != null ) { listener.connectionChanged( _channel, isConnected() ); if ( _lastRecord != null ) { listener.valueChanged( _channel, _lastRecord ); } } } } COM: <s> register the listener as a receiver of channel events from this controller </s>
funcom_train/50091128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean allHeavyAtomsPlaced(IAtomContainer ac) { for (int i = 0; i < ac.getAtomCount(); i++) { if (!ac.getAtom(i).getFlag(CDKConstants.ISPLACED) & !(ac.getAtom(i).getSymbol().equals("H"))) { return false; } } return true; } COM: <s> true is all the atoms in the given atom container have been placed </s>
funcom_train/34733927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelAndView createAgentDetailsModelAndView(Agent agent) { // view is given by agent details view name ModelAndView modelAndView = new ModelAndView(agentDetailsView); // add common model data to ModelAndView addCommonModelData(modelAndView); // add agent itself to ModelAndView modelAndView.addObject("agent", agent); return modelAndView; } COM: <s> construct model and view for agent details page </s>
funcom_train/20775918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeLine(String data) { File file = new File(this.path); try { BufferedWriter out = new BufferedWriter(new FileWriter(this.path, true)); out.write(data); out.newLine(); out.close(); } catch(IOException e) {} } COM: <s> writes the data to the file and adds a new line </s>
funcom_train/45544562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTextFlags() { fTextFlags = 0; if (getFlag(SHOW_RETURN_TYPE)) { fTextFlags |= JSCElementLabels.M_APP_RETURNTYPE; } if (getFlag(SHOW_PARAMETERS)) { fTextFlags |= JSCElementLabels.M_PARAMETER_TYPES; } if (getFlag(SHOW_EXCEPTION)) { fTextFlags |= JSCElementLabels.M_EXCEPTIONS; } if (getFlag(SHOW_POST_QUALIFIED)) { fTextFlags |= JSCElementLabels.M_POST_QUALIFIED; } return fTextFlags; } COM: <s> gets the text flags </s>
funcom_train/45320680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJt33() { if (jt33 == null) { jt33 = new JTextField(); jt33.setBounds(62, 55, 28, 25); jt33.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent e) { jugadorColoca(jt33, (byte) 2, (byte) 2); } }); } return jt33; } COM: <s> this method initializes j text field8 </s>
funcom_train/43395613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setActionButton(String[] _text) { actionButton = new JButton[_text.length]; for (int i = 0; i < _text.length; i++) { actionButton[i] = new JButton(); actionButton[i].addActionListener(this); actionButton[i].setText(_text[i]); buttonPanel.add(actionButton[i]); } } COM: <s> sets the text to be displayed on action buttons </s>
funcom_train/41772638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getCurrentUserByRPC() { AsyncCallback<Personne> callback = new AsyncCallback<Personne>() { public void onFailure(Throwable t) { SC.say("fail to load"); } public void onSuccess(Personne result) { ConstantsMercato.initCurrentUser(result); if (result != null) { System.out.println(result.getPerNom()); } //TODO generate different layout according to the role information, especially for human resource logins initLayout(); } }; UserService.Util.getInstance().getCurrentUser(callback); } COM: <s> retrieve the current logged person </s>
funcom_train/33395798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeSelectable(boolean a,boolean b,boolean c,boolean d,boolean e, boolean f){ jCheckBox1.setEnabled(a); jCheckBox2.setEnabled(b); jCheckBox3.setEnabled(c); jCheckBox4.setEnabled(d); jCheckBox5.setEnabled(e); jCheckBox6.setEnabled(f); } COM: <s> this makes certain check boxes enable depending on the parameters entered </s>
funcom_train/50215068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSecure(boolean secure) { if(this.secure != secure) { if(secure == false) { FreeMarkerPermission.checkPermission(this, new FreeMarkerPermission("setSecure")); } this.secure = secure; // Clearing the template cache so that templates are reloaded with // expected code sources. clearTemplateCache(); } } COM: <s> sets whether templates are secured </s>
funcom_train/3361325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFileTypeSupported(AudioFileFormat.Type fileType, AudioInputStream stream) { AudioFileFormat.Type types[] = getAudioFileTypes( stream ); for(int i=0; i<types.length; i++) { if( fileType.equals( types[i] ) ) { return true; } } return false; } COM: <s> indicates whether an audio file of the type specified can be written </s>
funcom_train/7971601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open(String file) { try { Document doc = XMLTools.readXML( file ); ballot = Ballot.parseXML( doc.getDocumentElement() ); } catch (ParserConfigurationException e) { throw new BallotOpenException( e ); } catch (SAXException e) { throw new BallotOpenException( e ); } catch (IOException e) { throw new BallotOpenException( e ); } } COM: <s> opens and loads a ballot from an xml file </s>
funcom_train/1960042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePacket(int seq) { Vector removeList = new Vector(); Iterator iter = iterator(); while (iter.hasNext()) { TCPPacket packet = (TCPPacket) iter.next(); if (packet.getSeq() == seq) { removeList.add(packet); } } removeAll(removeList); } COM: <s> removes a packet with a given sequence number from the buffer </s>
funcom_train/40403045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddItems() { String[] items = new String[] { "Select a Number", "One", "Two", "Three", "Four", "Five" }; listBox.addItems(items); // assert for (int i = 0; i < listBox.getItemCount(); i++) { assertEquals(listBox.getItemText(i), items[i]); } } COM: <s> test to see that the items are added into the list box correctly </s>
funcom_train/9777292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void holdArgument(String aVariable) { int i; int nrc = iParameters.size(); for (i = 0; i < nrc; i++) { if (((FunctionParameter) iParameters.get(i)).iParameter == aVariable) { ((FunctionParameter) iParameters.get(i)).iHold = true; } } } COM: <s> put an argument on hold </s>
funcom_train/34733785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateAgencies(Agency... agencies) { Collection<Agency> allAgencies = dao.findAllAgencies(); for (Agency agency : agencies) { // validate lookup by id assertEquals(dao.findAgencyById(agency.getId()), agency); // validate lookup by name assertEquals(dao.findAgencyByName(agency.getName()), agency); // validate that agency appears in list of all agencies assertTrue(allAgencies.contains(agency)); } } COM: <s> validate persistence of a set of agencies </s>
funcom_train/47139715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Catalog getCatalog (DataBasket db) { if ((m_dbCatalogValidator == null) || // All DataBaskets OK (m_dbCatalogValidator == db)) { // Only one specific DataBasket may pass return m_ciCatalog; } else throw new DataBasketConflictException ("Cannot access catalog that is currently being edited in another transaction."); } COM: <s> get the catalog associated to this stock </s>
funcom_train/45115633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addHierarchyList(String title,boolean isRoot){ HtmlTreeTestList tmpContainer = new HtmlTreeTestList(resultDirectory,null); tmpContainer.setRootScenario(isRoot); tmpContainer.setTarget(TEST_FRAME); tmpContainer.setTitle(title); tmpContainer.setContainerSummaryReport(new ContainerSummaryReport(new File(resultDirectory,generator.getName()),title)); containersStack.push(currentContainer); currentContainer.addReport(tmpContainer); currentContainer = tmpContainer; } COM: <s> add an html list object and update hierarchy </s>
funcom_train/15624140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintSquare(@NotNull final MapSquare<GameObject, MapArchObject, Archetype> square) { final Point pos = square.getMapLocation(); updateSquare(pos); repaint(0L, borderOffset.x + pos.x * IGUIConstants.SQUARE_WIDTH, borderOffset.y + pos.y * IGUIConstants.SQUARE_HEIGHT, IGUIConstants.SQUARE_WIDTH, IGUIConstants.SQUARE_HEIGHT); } COM: <s> paints one square </s>
funcom_train/7581783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getInformationPane() { if (informationPane == null) { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(2); gridLayout.setVgap(5); gridLayout.setHgap(0); informationPane = new JPanel(); informationPane.setBorder(new EmptyBorder(10, 0, 10, 0)); informationPane.setLayout(gridLayout); informationPane.add(getMessageHeader(), 0); informationPane.add(getDescriptionPane(), null); } return informationPane; } COM: <s> this method initializes information pane </s>
funcom_train/10803091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage() { if (_localizedMessageFound) return MessageFormat.format(_localizedMessage, _subs); else if (_subs == null || _subs.length == 0) return "localized message key: " + _localizedMessage; else return "localized message key: " + _localizedMessage + "; substitutions: " + Arrays.asList(_subs).toString(); } COM: <s> the localized message </s>
funcom_train/39537290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleServerSocket() { serverThread=new Thread(){ @Override public void run() { //whether the socket has been opened boolean socketOpened=false; while(! socketOpened) { try{ serverSocket=new ServerSocket(port); socketOpened=true; }catch (Exception ex){ try{ if(serverSocket!=null) { serverSocket.close(); } }catch (Exception e) {} port++; } try{ sleep(250); }catch(Exception ex){} } while(true){ //creating the socket input stream try { Socket socket=serverSocket.accept(); handleSocket(socket); }catch (Exception ex) {} try{ sleep(250); }catch(Exception ex){} } } }; serverThread.start(); } COM: <s> handles the socket </s>
funcom_train/27973029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createGUI(){ setProperties(); getContentPane().add(bottomControls,BorderLayout.SOUTH); getContentPane().add(simulationbox,BorderLayout.CENTER); controls.getContentPane().add(catchAll); pack(); setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); controls.pack(); controls.setVisible(true); } COM: <s> create the gui </s>
funcom_train/26571692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveGame (List commandList){ // If a game is not in progress, exit if (gc == null) { //System.out.println ("Input error: no game in progress"); displayInputError(); return; } String filename = (String) commandList.get(1); gc.saveGameToFile (filename); System.out.println ("Game saved"); } COM: <s> saves a game </s>
funcom_train/11734630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof EventImpl) { EventImpl other = (EventImpl) obj; return this.eventState.equals(other.eventState) && this.session.equals(other.session) && this.timestamp == other.timestamp && equals(this.userData, other.userData); } return false; } COM: <s> returns code true code if this code event code is equal to another </s>
funcom_train/41071137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPort(Integer port) throws java.beans.PropertyVetoException { Integer oldPort = this.port; vetoableChangeSupport.fireVetoableChange(PROP_PORT, oldPort, port); this.port = port; propertyChangeSupport.firePropertyChange(PROP_PORT, oldPort, port); } COM: <s> set the value of port </s>
funcom_train/32752242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void measure() { double val = 0.; if (mpv.isGood()) { val = phase_wrap(mpv.getValue()); } gd_val.setPoint(1, gd_val.getX(0), val); gd_dif.setPoint(1, gd_dif.getX(0), phase_wrap(gd_val.getY(1) - gd_ref.getY(1))); } COM: <s> sets the current value from pv </s>
funcom_train/18321117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createOutputPackageComposite() { GridData gridData1 = new GridData(); gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; outputPackageComposite = new Composite(this, SWT.BORDER); outputPackageComposite.setLayout(new GridLayout()); createOutputPackageRuleControl(); outputPackageLabel = new Label(outputPackageComposite, SWT.NONE); outputPackageLabel.setText("Custom Java package:"); outputPackageText = new Text(outputPackageComposite, SWT.BORDER); outputPackageText.setLayoutData(gridData1); } COM: <s> this method initializes output package composite </s>
funcom_train/7690101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double makeValid() { double total = 0; for (int i = 0; i < dimension; i++){ double sum = 0.0; for (int j = 0; j < dimension; j++) { if (i != j) { sum += rate[i][j]; } } rate[i][i] = -sum; total+=frequency[i]*sum; } return total; } COM: <s> make it a valid rate matrix make sum of rows 0 </s>
funcom_train/5164871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int result = 0; for (int i = 0; i < m_value.length; i++) { if (m_value[i] == 0) { result += 31 * result + 47; } else { result += 31 * result + 91; } } return result; } COM: <s> modified hash code function to return different hashcodes for differently </s>
funcom_train/3913555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LearningObjectProperty getLearningObject(Uol uol, Run run, User user, String propId) throws PropertyException { String key = getKey(uol, propId); LearningObjectProperty property = (LearningObjectProperty) fetchFromCache(key); if (property == null) { property = new LearningObjectProperty(uol, run, user, propId); addToCache(key, property); } return property; } COM: <s> return a learning object property based on the passed parameters </s>
funcom_train/25333145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddSpecies_Collection() { Collection<CollectionSpecies> spp = new ArrayList<CollectionSpecies> (); DBCollectionSpecies sp = new DBCollectionSpecies(); spp.add(sp); DBCollection instance = new DBCollection(); assertTrue(instance.getSpecies().isEmpty()); instance.addSpecies(spp); assertFalse(instance.getSpecies().isEmpty()); assertTrue(instance.getSpecies().contains(sp)); } COM: <s> test of add species method of class dbcollection </s>
funcom_train/3113879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLineJoin(int newLineJoin) { //// 1. Set the value. Creating a new object because BasicStroke is //// missing modifier methods. drawStroke = new SatinStroke(getLineWidth(), getEndCap(), newLineJoin, getMiterLimit(), getDashArrayImpl(), getDashPhase()); } // of method COM: <s> set the line join for the pen used to draw with this style </s>
funcom_train/22924482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAssignFramesToMasterPages() throws Throwable { InDesignDocument doc = new InDesignDocument(); doc.load(inxData2); Spread master; Rectangle rect; Page page; master = doc.getMasterSpread("LT-BB Left"); assertNotNull(master); page = master.getOddPage(); assertNotNull(page); Collection<Rectangle> rects = page.getRectangles(); assertEquals("Wrong number of frames on page", 12, rects.size()); } COM: <s> tests the correct assignment of frames to pages within a master </s>
funcom_train/6220839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLineGapSize(ConstantSize lineGapSize) { RowSpec rowSpec = FormFactory.createGapRowSpec(lineGapSize); // No longer supported in version 1.0.4/1.0.5 which are the oldest available versions in maven // central repo // //this.lineGapSpec = rowSpec.asUnmodifyable(); this.lineGapSpec = rowSpec ; } COM: <s> sets the size of gaps between component lines using the given </s>
funcom_train/3931548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createFile(String file) throws BusinessDelegateException { try { PrintWriter writeFile = new PrintWriter(new BufferedWriter( new FileWriter(file))); String content = org.j2eebuilder.util.UtilityBean .getContentAsString(this.getUrl()); if (content != null) writeFile.print(content); // writeFile.print(this.getLetterTemplateString()); writeFile.close(); } catch (IOException e) { log.printStackTrace(e, LogManager.ERROR); throw new BusinessDelegateException(e); } return "Successful"; } COM: <s> create jsp file from the content stored in letter template clob and </s>
funcom_train/25135266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SynthStyle getDefaultStyle() { if (_defaultStyle == null) { _defaultStyle = new DefaultSynthStyle(); ((DefaultSynthStyle) _defaultStyle).setFont(new FontUIResource("Dialog", Font.PLAIN, 12)); } return _defaultStyle; } COM: <s> returns the style to use if there are no matching styles </s>
funcom_train/14640112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createMetaScript(Vector file_names) { StringBuffer ret = new StringBuffer(); Enumeration en = file_names.elements(); while (en.hasMoreElements()) { String nm = (String)en.nextElement(); ret.append("source "+nm+";\n"); } return ret.toString(); } COM: <s> will return a string holding source xxx lines suitable for a script that </s>
funcom_train/22383633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void clicked(ZZCell win, ZZScene xi, Point pt) { Flob[] fs = new Flob[1]; ((FlobSet)xi).getObjectAt(pt.x, pt.y, fs); Flob f = fs[0]; if(f == null || f.applitude == null) return; setWindowApp(win, f.applitude); } COM: <s> change applitude of window according to clicked flob </s>
funcom_train/17772347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPersistent(Field field, boolean persist){ Object[] elements = right.toArray(); FilteredField li; for (int j=0; j<elements.length; j++){ li = (FilteredField) elements[j]; if (li.getField() == field){ li.setMovable(!persist); break; } } } COM: <s> sets whether a given field must always be present in the associated tab </s>
funcom_train/50373467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean filter(ServiceProxy service) { if(isbManager.getViewerFrame().inputTabsPane.filterPanel.showSingleLevel()) { return root_service.equals(service.getIServiceInstance()) || service.isThisVesselOfMe(root_service); } else { return root_service.equals(service.getIServiceInstance()) || service.isThisVesselOfMeRecursive(root_service); } } COM: <s> additional filter that only passes services that are contained by this </s>
funcom_train/45385132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTask(String t) { if (t != null) tasks.add(t); this.setString(tasks.size() + " " + ResourceManager.getResource("tasks_pending")); if (tasks.size() > 0) { this.setValue(tasks.size()); this.setIndeterminate(true); this.setVisible(true); } } COM: <s> adds new task to list </s>
funcom_train/36475666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSubCommand(Command childCommand, Command parentCommand) { if(this.menuItemStyle != null) { addSubCommand(childCommand, parentCommand, this.menuItemStyle); } else { //#style menuitem, menu, default addSubCommand(childCommand, parentCommand, de.enough.polish.ui.StyleSheet.menuStyle ); } } COM: <s> adds the given command as a subcommand to the specified parent command </s>
funcom_train/8322707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setTableCellFocus(int row) { propertyTable.editCellAt(row, 1); TableCellEditor editor = propertyTable.getCellEditor(row, 1); Component comp = editor.getTableCellEditorComponent(propertyTable, propertyTable.getValueAt(row, 1), true, row, 1); } COM: <s> several methods are called e </s>
funcom_train/46114709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ StringBuilder sb = new StringBuilder(); sb.append("-----TmxTu-----\n"); sb.append("Skeleton Before: "+skelBefore+"\n"); for (Property p : propsBefore) sb.append("Property Name: "+p.getName()+" Property Value: "+p.getValue()+"\n"); for (TmxTuv tuv : tuvs){ sb.append(tuv.toString()); } sb.append("Skeleton After: "+skelAfter+"\n"); return sb.toString(); } COM: <s> to string for debugging purposes </s>
funcom_train/11345270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttribute(Attribute att) { String name = att.getName().toLowerCase(); if (att.getNameSpace() != null) { name = att.getNameSpace().toLowerCase() + ":" + name; } m_attributes.put(name, att); } COM: <s> adds a attribute </s>
funcom_train/50925939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CMLScalar createDate(String name, String value) { EntryTool.checkEmptyName(name); String canonicalValue = Util.getCanonicalDate(value); if (canonicalValue == null) { throw new RuntimeException("Cannot parse as date: " + value); } CMLScalar scalar = createScalar(name); scalar.setDataType(XSD_DATE); scalar.setXMLContent(value); return scalar; } COM: <s> add scalar date to a cmlelement </s>
funcom_train/17981989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(IAction action) { System.out.println(Platform.getLocation().toOSString()); System.out.println(PlatformUI.getWorkbench().toString()); String result = null; try { result = Class.forName("org.apache.derby.jdbc.EmbeddedDriver").getSimpleName(); } catch (ClassNotFoundException e) { result = e.getMessage(); } MessageDialog.openInformation( window.getShell(), "Elysion UI Plug-in", "Hello, Eclipse world: " + result); } COM: <s> the action has been activated </s>
funcom_train/31800834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Reminder findDB(String reminderId) throws DAOException { String queryString = "select reminder " + " from Reminder as reminder " + "where reminder.reminderId = '" + reminderId + "'"; Reminder temp = null; temp = (Reminder) getOne(queryString); logger.info("Found object: " + temp.getReminderId()); return temp; } COM: <s> method for finding reminder with given id </s>
funcom_train/30171844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImageDimension(Dimension d) { image_dim = d; image_dirty = true; scale_dirty = true; // set dimension, only if the new dimension is different from the old one. // if image_dim is null (first time thru?) then set the dimension to a constant 1 million. } COM: <s> set method for member variable image dim </s>
funcom_train/18726136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show() { this.importedGraph = null; setupFileFormatComboBox(); final JPanel optionsPanel = getOptionsPanel(); updateSelectedImport(); dialog.getContentPane().removeAll(); dialog.getContentPane().add(optionsPanel); dialog.getContentPane().add(getButtonPanel(), BorderLayout.PAGE_END); updateLanguage(); dialog.pack(); dialog.setLocationRelativeTo(parent); dialog.setVisible(true); } COM: <s> shows the import panel </s>
funcom_train/50501284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getTagValues() { List result = new ArrayList(tags.size()); Iterator iter = tags.iterator(); while(iter.hasNext()) { DocletTag item = (DocletTag) iter.next(); if(item.getValue() != null) { result.add(item.getValue()); } } return result; } COM: <s> gets the tag values attribute of the doclet tags object </s>
funcom_train/48233074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startAD() throws IOException, ParseException { ASN1Syntax2DTD a2d = new ASN1Syntax2DTD(); Reader in = new FileReader(src); Writer out = new PrintWriter(System.out); if (des != null) { out = new FileWriter(des); } a2d.translate(in, out); } COM: <s> translates an asn </s>
funcom_train/33944320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object value){ try { this.value = new Double(value.toString()).doubleValue(); } catch(Exception e) { String help = value.toString(); while(help.indexOf('.') != -1) { help = help.substring(0,help.indexOf('.')) + help.substring(help.indexOf('.')+1); } help = help.replace(',','.'); try { this.value = new Double(help).doubleValue(); } catch(NumberFormatException ex) { } } } COM: <s> sets the value of the argument </s>
funcom_train/310966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setZone(int z) { zoneNo = z; if (zoneView && zoneGroup!=null) zoneGroup.detach(); zoneGroup = new BranchGroup(); // Show one zone HealSphere zone = new ZoneSphere(nside,z); zoneGroup.addChild(zone); zoneGroup.setCapability(BranchGroup.ALLOW_DETACH); objTrans.addChild(zoneGroup); if (!zoneView) zoneGroup.detach(); } COM: <s> sets the zone </s>
funcom_train/5343344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean enqueue(BTMessage m) { if (LOG.isDebugEnabled()) LOG.debug("sending message of type " + m.getType() + " to " + _connection.toString() + " : " + m.toString()); if (_queue.size() > MAX_QUEUE_SIZE) return false; _queue.addLast(m); if (_channel != null) _channel.interest(this, true); return true; } COM: <s> enqueues another message for the remote host </s>
funcom_train/18799754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ZName visitExistsPred(ExistsPred p) { FlatPredList sch = new FlatPredList(zlive_); sch.addExistsSchText(p.getZSchText()); FlatPredList body = new FlatPredList(zlive_); body.addPred(p.getPred()); flat_.add(new FlatExists(sch, body)); return null; } COM: <s> todo see if we can optimize more aggressively here </s>
funcom_train/38306844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItalicFont(byte[] ttfAfm) throws IOException, DocumentException { // creating base font this.italicFont = BaseFont.createFont( name + "-italic.ttf", BaseFont.IDENTITY_H, embedded, cached, ttfAfm, null ); } COM: <s> setter method for the the property italic font </s>
funcom_train/22405452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void serializeContainerChildren(Container container, SContainer sContainer) { Widget[] widgets= container.getWidgets(); if (widgets.length > 0) { sContainer.widgets= new ISerializedWidget[widgets.length]; for (int i= 0; i < sContainer.widgets.length; i++) { sContainer.widgets[i]= ToolkitSerialization.serializeWidget(widgets[i], sContainer); } } } COM: <s> serializes the children of a container </s>
funcom_train/1309317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void axis() { Graphics g = offscreen.getGraphics(); g.setColor(WorkSpace.color); g.drawLine(width/2, 0, width/2, height); g.drawLine(0, height/2, width, height/2); repaint(); serviceRepaints(); } COM: <s> draw two orthogonal lines </s>
funcom_train/20978847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getPreferredSize(JScrollBar scrollbar) { Dimension dimension = null; if (skina.getScrollbar() != null) { dimension = skina.getScrollbar().getPreferredSize(scrollbar); } if ((dimension == null) && (skinb.getScrollbar() != null)) { dimension = skinb.getScrollbar().getPreferredSize(scrollbar); } return dimension; } COM: <s> gets the preferred size attribute of the compound scrollbar object </s>
funcom_train/5164093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processDBLoginAccept(MsgDBReplyLoginAccept m) { Candidate c = m.getCandidate(); int userID = m.getUserID(); User u = getUser(userID); u.postLogIn(c.getClientBeanOutput().getClientBean(), m.isInvisible()); c.getClientBeanOutput().getSync().wake(new LoginData(userID, "success", m.getDisplayName(), m.isInvisible())); } COM: <s> process database reply login accept </s>
funcom_train/24926961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void isActiveCommand(String uuid, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { RemoteClient client = getRemoteClientManager(request).getRemoteClient(uuid); response.setContentType("text/html"); if (client != null && client.isRemoteActive()) { response.getWriter().print("1"); } else { response.getWriter().print("0"); } } COM: <s> produces a text response with a 1 if the client manager is active </s>
funcom_train/12560905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lSetValue(int oldValue, int newValue) { // little optimization to avoid calling into native // in cases where unnecessary if (nativeId != DisplayableLFImpl.INVALID_NATIVE_ID) { // Only update native resource if it exists. setValue0(nativeId, newValue, gauge.maxValue); lRequestInvalidate(true, true); } } COM: <s> notifies l amp f of a value change in the corresponding </s>
funcom_train/9984546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StylesheetStore getStylesheetStore() { if ( fStylesheetStore == null ) { fStylesheetStore = new StylesheetStore( getPreferenceStore(), STYLESHEETS_KEY ); try { fStylesheetStore.load(); } catch (IOException e) { log(e); } fStylesheetStore.startListeningForPreferenceChanges(); } return fStylesheetStore; } COM: <s> returns the template store for the java editor templates </s>
funcom_train/38560399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix nonZeroIndices() { Matrix x = new Matrix(m, n); for (int i = 0; i < m; i++){ for (int j = 0; j < n; j++){ if (get(i, j) == 0 ) { x.set(i, j, 0); } else { x.set(i, j, i+1); } } } return x; } COM: <s> form a matrix with columns the row indices of non zero elements </s>
funcom_train/35622129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TypeMatcher buildMatcher() { final Set<TerritoryType> allowedTypes = new HashSet<TerritoryType>(); for (Iterator<Map.Entry<TerritoryType, JCheckBox>> iter = typeCheckBoxes .entrySet().iterator(); iter.hasNext();) { Map.Entry<TerritoryType, JCheckBox> entry = iter.next(); if (entry.getValue().isSelected()) allowedTypes.add(entry.getKey()); } return new TypeMatcher(allowedTypes); } COM: <s> returns a type matcher which matches territories if their type is one of </s>
funcom_train/5037113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMajorCompareTo() { Version version2_4_0 = new Version("2.4.0"); Version version2_5_1 = new Version("2.5.1"); assertTrue(version2_4_0.compareTo(version2_5_1) < 0); assertTrue(version2_5_1.compareTo(version2_4_0) > 0); } COM: <s> version numbers from different major versions can be compared to each </s>
funcom_train/29018427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMenu (Menu menu) { checkWidget (); /* Check to make sure the new menu is valid */ if ((style & SWT.CASCADE) == 0) { error (SWT.ERROR_MENUITEM_NOT_CASCADE); } if (menu != null) { if (menu.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT); if ((menu.style & SWT.DROP_DOWN) == 0) { error (SWT.ERROR_MENU_NOT_DROP_DOWN); } if (menu.parent != parent.parent) { error (SWT.ERROR_INVALID_PARENT); } } setMenu (menu, false); } COM: <s> sets the receivers pull down menu to the argument </s>
funcom_train/3099008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse (String text) { for (int i = 0; i < templates.size(); i++) { String templateExpression = ((Template) templates.get(i)).getTemplateExpression(); // Divide up the template expression into exact match chunks with the // text capturing variables in between. // A match happens if the text contains all of the exact match chunks, in an // orderly non-overlapping manner. } } COM: <s> parses the given text string using the first matching template </s>
funcom_train/29915906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getRevokeAndEreaseButton() { if (revokeAndEreaseButton == null) { revokeAndEreaseButton = new JButton(); revokeAndEreaseButton.setBounds(new Rectangle(387, 304, 279, 45)); revokeAndEreaseButton.setText(UIHelper.getText("otheractions.revokeanderase")); revokeAndEreaseButton.setHorizontalAlignment(SwingConstants.LEFT); revokeAndEreaseButton.setIcon(UIHelper.getImage("blockcard.gif")); } return revokeAndEreaseButton; } COM: <s> this method initializes revoke and erease button </s>
funcom_train/16291511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp(Map map) throws Exception{ dbDriver = getValue(map, DB_DRIVER, null); dbServer = getValue(map, DB_SERVER, null); dbLogin = getValue(map, DB_LOGIN, null); dbPassword = getValue(map, DB_PASSWORD, null); mapStatements = !FALSE.equals(getValue(map, MAP_STATEMENTS, TRUE)); useCount=0; } COM: <s> main initialization function </s>
funcom_train/5374312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTopPixel () { checkWidget (); /* * Note, EM_GETSCROLLPOS is implemented in Rich Edit 3.0 * and greater. The plain text widget and previous versions * of Rich Edit return zero. */ /* int [] buffer = new int [2]; int code = OS.SendMessage (handle, OS.EM_GETSCROLLPOS, 0, buffer); if (code == 1) return buffer [1]; */ return getTopIndex () * getLineHeight (); } COM: <s> returns the top pixel </s>
funcom_train/23827602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void postWindowOpen() { getWindowConfigurer().getWindow().getShell().setMaximized(true); final Job checkJob = new Job("Check phase") { @Override public IStatus run(IProgressMonitor monitor) { ApplicationPlugin.getDefault().beginCheckPhase(); return Status.OK_STATUS; } }; checkJob.schedule(); } COM: <s> resize to full screen and spawn check phase </s>
funcom_train/46702750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UjoProperty getBaseProperty() { UjoProperty result = null; for (ValueCriterion eval : values) { if (eval.getLeftNode()!=null) { result = eval.getLeftNode(); break; } } while(result!=null && !result.isDirect() ){ result = ((CompositeProperty)result).getFirstProperty(); } return result; } COM: <s> returns the first direct property </s>