__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/17048517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SearchResult search(QueryContainer queryContainer, int maxHits, LuceneFields luceneFields) throws IOException { final SearchHitCallback searchHitCallback = new SearchHitCallback(luceneFields); final SearchResult searchResult = search(queryContainer, maxHits, searchHitCallback); searchResult.setSearchHits(searchHitCallback.getSearchHits()); return searchResult; } COM: <s> submit the query containers query collecting stored fields in up to </s>
funcom_train/16392732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getAdjacentVertices( List vertices ) { HashSet adjacentVertices = new HashSet( this.getAdjacentVertices( (Vertex) vertices.get(0)) ); int i, size = vertices.size(); for( i = 1; i < size; i++ ) { adjacentVertices.retainAll( this.getAdjacentVertices( (Vertex) vertices.get(i))); } return Collections.unmodifiableSet(adjacentVertices); } COM: <s> returns the vertices adjacent to all the vertices in the given </s>
funcom_train/39535246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColorValue(String colorString) { if(colorString!=null && ! colorString.equals("")) { SVGHandle handle=Editor.getEditor().getHandlesManager().getCurrentHandle(); if(handle!=null) { Color color=Editor.getColorChooser().getColor(handle, colorString); if(color!=null) { currentColor=color; colorStr=colorString; } } } repaint(); } COM: <s> sets the new color value </s>
funcom_train/32761029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void validate() { if ( !_summaryController.validate() ) { throw new EntryValidationException( _summaryController.getValidationText() ); } else if ( !_imageController.validate() ) { throw new EntryValidationException( _imageController.getValidationText() ); } else if ( !_attachmentController.validate() ) { throw new EntryValidationException( _attachmentController.getValidationText() ); } } COM: <s> validate all parts of the entry for publication </s>
funcom_train/49456339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void activateModule(Db db) throws Exception { try { db.enter(); PreparedStatement active = db.prepareStatement("UPDATE e_module SET active=true WHERE class_name = ?"); active.setString(1, getClass().getName()); int res = db.executeUpdate(active); if(res != 1) throw new Exception("Fail to activate module "+getName()); _logger.warn("Module "+getName()+" successfully activated." ); } finally { db.exit(); } } COM: <s> mark the module as active so it can be accessed </s>
funcom_train/9537777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer open() { // Create the dialog window Shell shell = new Shell(getParent(), getStyle()); shell.setText(getText()); createContents(shell); shell.pack(); shell.open(); Display display = getParent().getDisplay(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } // Return the entered value, or null return input; } COM: <s> opens the dialog and returns the input </s>
funcom_train/18131176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPort(String name) { if(language.hasVariablePrefix()){ boolean found = false; Iterator<String> iterator = language.getVariablePrefixes().iterator(); while(!found && iterator.hasNext()){ String prefix = iterator.next(); if(name.startsWith(prefix)){ name = name.substring(prefix.length()); found = true; } } } return portNames.contains(name); } COM: <s> method for checking whether the name represents an input port </s>
funcom_train/39102659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(String viewableClassName, LayoutItem layout, boolean isEditor) { Hashtable table = (isEditor ? editorCreatorTable : viewerCreatorTable); CreatorMapEntry entry = (CreatorMapEntry) table.get(viewableClassName); if (entry == null) { entry = new CreatorMapEntry(viewableClassName, layout, isEditor); table.put(viewableClassName, entry); } entry.setLayoutItem(layout); } COM: <s> register a layout for the specified data model identifier </s>
funcom_train/28353168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addLabeledItem( final Container container, final String label, final Component item, final Color itemColor ) { container.add( new JLabel( label, RIGHT ) ); final Box itemBox = new Box( BoxLayout.X_AXIS ); itemBox.add( Box.createHorizontalGlue() ); if ( itemColor != null ) { item.setForeground( itemColor ); } itemBox.add( item ); container.add( itemBox ); } COM: <s> add the specified componenent to the specified container along with the specified label </s>
funcom_train/7866070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillArtistCombo() throws SQLException { ResultSet rs = JSongOrganizer.getArtistCombo(); if (artistCombo.getItemCount() != 0) { while (artistCombo.getItemCount() > 1) { artistCombo.removeItemAt(artistCombo.getItemCount() - 1); } } else { artistCombo.addItem(" select artist"); } while (rs.next()) { artistCombo.addItem(rs.getString(1)); } } COM: <s> metoda naplni aktualne hodnoty pre combobox interpretov </s>
funcom_train/8407557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf(Object key) { key = convertKey(key); int i = 0; for (LinkEntry entry = header.after; entry != header; entry = entry.after, i++) { if (isEqualKey(key, entry.key)) { return i; } } return -1; } COM: <s> gets the index of the specified key </s>
funcom_train/19081327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIdCard(int oldIdCard) { if (activated) { if (next != null) { return ((IdCardModifier) next).getIdCard(op.process(oldIdCard, idCard .getValue(ability, to, null))); } return op.process(oldIdCard, idCard.getValue(ability, to, null)); } if (next != null) { return ((IdCardModifier) next).getIdCard(oldIdCard); } return oldIdCard; } COM: <s> return the modified id card </s>
funcom_train/3360004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void login() throws LoginException { loginSucceeded = false; if (subject == null) { subject = new Subject(); } try { if (configProvided) { // module invoked in doPrivileged with creatorAcc invokeCreatorPriv(LOGIN_METHOD); invokeCreatorPriv(COMMIT_METHOD); } else { // module invoked in doPrivileged invokePriv(LOGIN_METHOD); invokePriv(COMMIT_METHOD); } loginSucceeded = true; } catch (LoginException le) { try { if (configProvided) { invokeCreatorPriv(ABORT_METHOD); } else { invokePriv(ABORT_METHOD); } } catch (LoginException le2) { throw le; } throw le; } } COM: <s> perform the authentication </s>
funcom_train/29656370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInitData(GeneralDataParameter dataParameter) throws IncorrectParameterTypeException, ParseParameterException { super.setInitData(dataParameter); if (dataParameter instanceof StringDataParameter) { setStringValue(((StringDataParameter) dataParameter).getValue()); } else { throw new IncorrectParameterTypeException("invalid dataParameter type"); } } COM: <s> parses the string value of tt data parameter tt using </s>
funcom_train/49761552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void contributeToToolBar(IToolBarManager toolBarManager) { toolBarManager.add(getAction(ActionFactory.UNDO.getId())); toolBarManager.add(getAction(ActionFactory.REDO.getId())); toolBarManager.add(getAction(ActionFactory.DELETE.getId())); // toolBarManager.add(getAction(DeployAction.DEPLOY)); } COM: <s> add actions to the given toolbar </s>
funcom_train/49323022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFriendsTimeline() { String message = ""; String url = "/statuses/friends_timeline.xml"; GetMethod get = new GetMethod(url); try { executeAuthenticatedMethod(get); message = message + get.getResponseBodyAsString(); } catch (URIException e) { message = e.getMessage(); } catch (NullPointerException e) { message = e.getMessage(); } catch (IOException e) { message = e.getMessage(); } finally { get.releaseConnection(); } return message; } COM: <s> gets the 20 most recent statuses by friends equivalent to home on the </s>
funcom_train/32138281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(IAction act) { LogManager.logDebug("Start ExportDataSetAction.run", this); File f = null; IDataSet data = getDataSet(); if(null != data) f = getFile(); if(f != null && data != null) data.writeToFile(f); LogManager.logDebug("End ExportDataSetAction.run", this); } COM: <s> this is the main method of the action </s>
funcom_train/7385041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawLine(int x0, int y0, int x1, int y1) { Line2D line = new Line2D.Float(x0, y0, x1, y1); if (g.getClipBounds() == null || line.intersects(g.getClipBounds())) { g.draw(line); } } COM: <s> draws the given line if the line is inside the clipping area </s>
funcom_train/48529596
/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 ((obj == null) || (! (obj instanceof Id))) return false; Id nid = (Id) obj; for (int i = 0; i < nlen; i++) { if (Id[i] != nid.Id[i]) { return false; } } return true; } COM: <s> equality operator for ids </s>
funcom_train/25825855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int processHits(int hits, int selectionBuffer[]) { if (hits > 0) { /* * Have a look at the content of the selection buffer to understand this * formula. */ int pos = (hits * 4) + ((hits * (hits + 1)) / 2); return selectionBuffer[pos - 1]; } else { return 0; } } COM: <s> returns the id of the topmost element inside of the selection buffer </s>
funcom_train/18982461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRadioID() throws RadioException { this.checkDisposed(); Log("Sent radio id request"); byte[] result = this.performCommand(GET_RADIO_ID, (byte)0xb1); Log("Got radio id reply"); if (result.length != 11) { this.Dispose(); throw new RadioException("Radio ID reply length wrong"); } return extractString(result, 3, 8); } COM: <s> gets the radios id number </s>
funcom_train/22278865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTransparent() { Vector sViews; int i, count; sViews = subviews(); count = sViews.count(); for (i = 0; i < count; i++) { if (((View)subviews().elementAt(i)).isTransparent()) { return true; } } return false; } COM: <s> overridden to return b false b unless any of the scroll groups </s>
funcom_train/34501977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConfigurationParameter(String paramName, String paramValue) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key( Messages.ADDING_CONFIGURATION_PARAM_2, paramName, paramValue)); } m_configuration.put(paramName, paramValue); } COM: <s> allows adding configuration parameters to this object </s>
funcom_train/10862718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCapturedContent() { for (Map.Entry<String, StringBuilder> entry : fieldBuilders.entrySet()) { if (entry.getValue().length() > 0) { addField(entry.getKey(), entry.getValue().toString(), null); } } } COM: <s> add the per field captured content to the solr document </s>
funcom_train/9911985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* private void listAllBroad(TreeNode<E> node, Collection<TreeNode<E>> nodes, int curLevel, int level) { if(level > 0 && curLevel >= level) return; if (node != null) { Collection<TreeNode<E>> temp = node.getChildren(); nodes.addAll(temp); for (TreeNode<E> t : temp) { listAllBroad(t, nodes, curLevel + 1, level); } } }*/ COM: <s> for ecursively revoke so that visit all the tree and store them to </s>
funcom_train/44283651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendPatch(Patch p) { p.sysex[SY85Constants.SYSEX_BANK_NUMBER_OFFSET] = (byte) 127; p.sysex[SY85Constants.SYSEX_VOICE_NUMBER_OFFSET] = (byte) 0; calculateChecksum(p); sendPatchWorker(p); try { Thread.sleep(100); } catch (Exception e) { } } COM: <s> store the voice in the voice edit buffer of the sy85 </s>
funcom_train/19241966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPlaylist() throws IOException { if (null == newPlaylistName) { throw new IllegalArgumentException("No new playlist name given"); } MediaManager manager = getManager(); Playlist pl = manager.newPlaylist(newPlaylistName, mediaType); getManager().addPlaylists(new Playlist[] { pl }); } COM: <s> create a new playlist given the current playlist name </s>
funcom_train/35627342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedIndex(int si) { selectedIndex = si; UIItem selItem = comboScreen.mainPanel.getSelectedItem(); if (selItem instanceof UILabel) ((UILabel) selItem).setWrappable(false, -1); comboScreen.mainPanel.setSelectedIndex(si); selItem = comboScreen.mainPanel.getSelectedItem(); if (selItem instanceof UILabel) ((UILabel) selItem).setWrappable(true, UICanvas.getInstance().getWidth() - 20); dirty = true; } COM: <s> sets the selected index in the list </s>
funcom_train/51188971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getAbsoluteResource(String absolutePath) { try { File resourceFile = new File(absolutePath).getCanonicalFile(); if (resourceFile.exists()) { return resourceFile.toURI().toURL(); } } catch (IOException e) { logPathException(absolutePath, e); } return null; } COM: <s> utility to test the existance of a file path </s>
funcom_train/17409904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void percentRam(int f){ switch (f) { case 0: average= (RAMSIZE-Memleft); percent= average/RAMSIZE; System.out.println("Percentage of RAM used: " + percent*100); break; case 1: OSDriver.totalPercent = OSDriver.sumPercent/OSDriver.counter; System.out.println("\tRAM STATS: Total average percent of RAM used: " + OSDriver.totalPercent*100); break; } } COM: <s> computes percentage of ram used by jobs </s>
funcom_train/4233841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void zoomOutDomain(double x, double y) { Plot p = this.chart.getPlot(); if (p instanceof Zoomable) { Zoomable z = (Zoomable) p; z.zoomDomainAxes(this.zoomOutFactor, this.info.getPlotInfo(), translateScreenToJava2D(new Point((int) x, (int) y)), this.zoomAroundAnchor); } } COM: <s> increases the length of the domain axis centered about the given </s>
funcom_train/28759763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBboxbackground(String newVal) { if ((newVal != null && this.bboxbackground != null && (newVal.compareTo(this.bboxbackground) == 0)) || (newVal == null && this.bboxbackground == null && bboxbackground_is_initialized)) { return; } this.bboxbackground = newVal; bboxbackground_is_modified = true; bboxbackground_is_initialized = true; } COM: <s> setter method for bboxbackground </s>
funcom_train/2807816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buf = new StringBuffer(); for (int i = 0; i < structures.length; i++) { if (i == 1) { buf.append(" :- "); } if (i > 1) { buf.append(", "); } buf.append(structures[i].toString()); } return buf.toString(); } COM: <s> returns a string representation of this rule </s>
funcom_train/50335058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDirectionFromSectionAndSeq(Section s, int seq) { for (int i = 0; i<mTransitSectionList.size(); i++) { TransitSection ts = mTransitSectionList.get(i); if ( (ts.getSection() == s) && (ts.getSequenceNumber() == seq) ) { return ts.getDirection(); } } return 0; } COM: <s> gets the direction of a section in the transit from its sequence number </s>
funcom_train/37115687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeRange(int fromIndexInclusive, int toIndexExclusive) { checkRemoveModifiable(); checkRange(fromIndexInclusive, toIndexExclusive); if (fromIndexInclusive == toIndexExclusive) { return false; } System.arraycopy(data, toIndexExclusive, data, fromIndexInclusive, size - toIndexExclusive); size -= (toIndexExclusive - fromIndexInclusive); return true; } COM: <s> removes a range of values from the list </s>
funcom_train/2960736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void filterGTonVar(IntDomainVar vv0, IntDomainVar vv1) throws ContradictionException { if(cste>=0){ int lbv0 = vv0.getSup() - cste; int ubv0 = vv0.getInf() + cste; // remove interval [lbv0, ubv0] from domain of v0 vv1.removeInterval(lbv0, ubv0, this, false); }else{ this.setEntailed(); } } COM: <s> in case of a gt due to a modification on vv0 domain </s>
funcom_train/20577217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invitationTimedOutEventHandler(InvitationTimedOutEventArgs args) { if (args.getInvitation().getSender().getLogin().equals(this.getLogin()) || args.getInvitation().getDestiny().getLogin().equals(this.getLogin())) { this.send(args.getMessage()); } } COM: <s> handles the invitation timed out event </s>
funcom_train/17201321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private short get(int logSize) { switch (logSize) { case 0: return slot0; case 1: return slot1; case 2: return slot2; case 3: return (short)Memory.alignUp(getObjectSize(), MAX_SLOT_SIZE); default: VM.sysFail("Invalid slot"); return -1; } } COM: <s> get the value for a given slot </s>
funcom_train/28686233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File directory, String name) { File file = new File(directory, name); if (file.exists() && (file.isDirectory() || file.isHidden())) { return false; } String filename = name.toUpperCase(); return Character.isLetterOrDigit(filename.charAt(0)) && filename.endsWith(extension.toUpperCase()); } COM: <s> called for every file encountered </s>
funcom_train/23247025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double calculateDistance(final IDataSet aMap, final RoutingStep aLastStep, final RoutingStep step) { myMetric.setMap(aMap); double cost = myMetric.getCost(step); if (aLastStep != null) cost += myMetric.getCost(aLastStep.getStartNode(), step, aLastStep); return cost; } COM: <s> this is the metric we use for dijkstra </s>
funcom_train/49703545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(final File file) { if (file.isDirectory()) { String[] children = file.list(); for (int i=0; i<children.length; i++) { send(new File(file, children[i])); } } else { sendFile(file); } } COM: <s> recursively sends a directory or sends a single file </s>
funcom_train/5375124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillPath (Path path) { if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); /* if (path.handle == null) SWT.error(SWT.ERROR_INVALID_ARGUMENT); initGdip(false, true); int mode = OS.GetPolyFillMode(handle) == OS.WINDING ? Gdip.FillModeWinding : Gdip.FillModeAlternate; Gdip.GraphicsPath_SetFillMode(path.handle, mode); Gdip.Graphics_FillPath(data.gdipGraphics, data.gdipBrush, path.handle); */ } COM: <s> fills the path described by the parameter </s>
funcom_train/34707769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateDB(String query) throws SQLException{ Statement statement=null; boolean insertStatus=false; System.out.println("Update Query is " + query); statement=conn.createStatement(); insertStatus=statement.execute(query); if(insertStatus){ System.out.println("Query="+query+"\n Query Ok! rows affected"); } else{ System.out.println("Query="+query+"\n Query OK! Zero rows affected"); } } COM: <s> modify data from database by introducing a query </s>
funcom_train/49790112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetVisibleFalsePersists() throws Exception { IFile sitemap = beginAtSitemapThenPage("Home"); assertNoProblem(); assertTargetVisible(true); assertButtonPresentWithText("set visibility"); // and a text field to set the value { String id = getLabelIDForText("visibility value"); assertLabeledFieldEquals(id, ""); setLabeledFormElementField(id, "false"); } clickButtonWithText("set visibility"); assertTargetVisible(false); // reload the page reloadPage(sitemap, "Home"); // still hidden assertTargetVisible(false); } COM: <s> check that visibility persists across reloads since we arent </s>
funcom_train/44709340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProgress(PageState state, int p) { if (p < -1 || p >= getStepCount()) { throw new IllegalArgumentException( "Expecting an integer between -1 and " + (getStepCount() - 1) + ", but got " + p ); } state.setValue(m_progressParam, new Integer(p)); } COM: <s> set the current progress </s>
funcom_train/44872240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasControl(int controlCode) { switch (controlCode) { case START_STOP_BUTTON: return (startStopButton != null); case START_BUTTON: return (startButton != null); case STOP_BUTTON: return (stopButton != null); case PAUSE_BUTTON: return (pauseButton != null); case NEXT_BUTTON: return (prevButton != null); case PREV_BUTTON: return (nextButton != null); case SPEED_CHOICE: return (speedChoice != null); case LOOP_CHOICE: return (loopChoice != null); default: return false; } } COM: <s> tells whether the control has been added </s>
funcom_train/3470485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void nextRandomBytes(byte[] bytes) { int numRequested = bytes.length; int numGot = 0; int rand = 0; while (true) { for (int i = 0; i < 4; i++) { if (numGot == numRequested) { return; } rand = i == 0 ? rnd.nextInt() : rand >> 8; bytes[numGot++] = (byte) rand; } } } COM: <s> p generates random bytes and places them into a user supplied </s>
funcom_train/3175173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Color getForeground() { // we cached the color so that it's retrieved only once // instead of using this view's attributes we get the // document's stylesheet and ask it for this view's // attributes if (foreground==null) //foreground = doc.getForeground(getAttributes()); foreground = doc.getForeground(doc.getStyleSheet().getViewAttributes(this)); return foreground; } COM: <s> returns the current fg color </s>
funcom_train/12195166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getFileIndex(File file) { String name = file.getName(); if (name.length() > 1) { // Ignore unknown directory. return -1; } char c = name.charAt(0); if (c < 'a' || c >= ('a' + maxDirsPerDir)) { // Ignore unknown directory. return -1; } return c - 'a'; } COM: <s> get the index for the file name </s>
funcom_train/4422404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectLocation() { final CharSequence[] items = buildItems(); AlertDialog.Builder builder = new AlertDialog.Builder(parent); builder.setTitle(parent.getResources().getString(R.string.select_location)); builder.setItems(items, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { if (item == 0) selectCurrentLocation(); else locationSelected(items[item].toString()); } }); builder.create().show(); } COM: <s> prompts the user to select a location to center the map </s>
funcom_train/32630902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MemoEntryFormat getViewFormat(final DView view) { String name = view.getName(); if (!fViewFormat.containsKey(name)) { MemoEntryFormat format = new MemoEntryFormat(view); fViewFormat.put(name, format); return format; } return (MemoEntryFormat) fViewFormat.get(name); } COM: <s> creates caches and returns the view format of views or folders </s>
funcom_train/13892836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public ElementDialog getNewElementDialog(Component component) { while (component != null && !(component instanceof Frame) && !(component instanceof Dialog)) component = component.getParent(); ElementDialog dialog; if (component == null) dialog = new ElementDialog((Frame)null); else if (component instanceof Dialog) dialog = new ElementDialog((Dialog)component); else dialog = new ElementDialog((Frame)component); dialog.positionDialog(); return dialog; } COM: <s> this function allows to get a new element dialog by giving the </s>
funcom_train/9804311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendProperties(StringBuffer buf) { if (type!=null) { buf.append(" with ").append(type.name().toLowerCase()); super.appendProperties(buf); if (fill!=null && type.filled) fill.appendProperties(buf); } } COM: <s> gather the properties of this style </s>
funcom_train/15609424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addOidToChangeTraceRefs(Set anOidSet, ChangeTrace aChangeTrace) { for (Iterator oidItr = anOidSet.iterator(); oidItr.hasNext();) { this.oidToChangeTrace.put(oidItr.next(), aChangeTrace); } } COM: <s> add a set of oid references to a change trace </s>
funcom_train/9110475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DynamicImageResourceImpl getThumbnailPicture() { if (this.thumbnail == null) { UserUtil.reattach(this.bean); if (this.getBean().getProfilePicture() != null) { // Create thumbnail ImageResize thumb = new ImageResize(this.bean .getProfilePicture().getImage()); this.thumbnail = new DynamicImageResourceImpl(thumb .getThumbnailedImage(25, 25).getImage()); return this.thumbnail; } else { // no profile picture - no thumbnail... return null; } } else { // return cached thumbnail return this.thumbnail; } } COM: <s> requests the thumbnail picture from database </s>
funcom_train/24067996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Message checkBoolean(final int lineCount, final String content) { final Message msg = new Message(); if (!"".equals(content) // may be empty => we will use default value && !"true".equals(content) && !"false".equals(content)) { msg.setMessage("error.import.boolean"); msg.setSystemMessage(composeSystemMessage(lineCount, content)); } return msg; } COM: <s> checks if the string is a valid boolean value </s>
funcom_train/3421944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XSSimpleTypeDefinition getPrimitiveType() { if (fVariety == VARIETY_ATOMIC && fValidationDV != DV_ANYSIMPLETYPE) { XSSimpleTypeDecl pri = this; // recursively get base, until we reach anySimpleType while (pri.fBase != fAnySimpleType) pri = pri.fBase; return pri; } else { // REVISIT: error situation. runtime exception? return null; } } COM: <s> if variety is code atomic code the primitive type definition a </s>
funcom_train/41174338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void center(Shell shell) { Rectangle shellBounds = shell.getDisplay().getPrimaryMonitor().getBounds(); Point winSize = shell.getSize(); shell.setLocation(shellBounds.x + (shellBounds.width - winSize.x) / 2, shellBounds.y + (shellBounds.height - winSize.y) / 2); } COM: <s> move the shell to the center of the screen </s>
funcom_train/42554554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFishEyeFocus(Point p){ myFocusPoint = p; int result = (p.y-this.getY())/myFilesDefaultSize; //System.out.println("FileList : setFishEyeFocus --> y="+getY()+" , result="+result); setFocusFile(myFileList.get(result)); } COM: <s> gives the file on which the fish eye is made </s>
funcom_train/41523720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String accPrepareGroupPatientsToDelete() { if(getSession().getGroup() != null){ Command cmd = getCommand(LoadGroup.class); ((LoadGroup) cmd).setGroupId(getSession().getGroup().getCode()); cmd = runCommand(cmd); toDelete = new ArrayList<Patient>(((LoadGroup) cmd).getResult().getPatients()); } return preparePatientDeletion(); } COM: <s> delete existing patient </s>
funcom_train/29829294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BSPresenceInfo getJIDPresence(JID jid) { if (jid == null || !this.jid.equals(jid.getSimpleJID()) || presences.isEmpty()) return null; String resource = jid.getResource(); if (resource == null || resource.equals("")) return getBestPresence(); BSPresenceInfo result = (BSPresenceInfo) presences.get(resource); return result; } COM: <s> returns code bspresence info code of jid </s>
funcom_train/39024167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClearNestedCriteria() { System.out.println("clearNestedCriteria"); BasicSearchCriteria instance = new BasicSearchCriteria(); instance.addNestedCriterion(new BasicSearchCriteria()); instance.clearNestedCriteria(); if (instance.nestedCriteria != null && instance.nestedCriteria.size() != 0) { fail("-nested criteria are not cleared."); } } COM: <s> test of clear nested criteria method of class basic search criteria </s>
funcom_train/34270632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void verify() throws AuthenticationException { openConnectionOnce(VERIFY_PREAMBLE, VERIFY_POSTAMBLE); if (currentURLConnection == null) { return; } try { close(); } catch (Throwable t) { String locMessage = "AuthenticationException.Throwable"; throw new AuthenticationException("General error", t, locMessage); } } COM: <s> authenticate with the server </s>
funcom_train/31678687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FloatingPoint divide(FloatingPoint that) { if (that._significand.isZero()) return NaN; int pow10 = DIGITS.get() + that._significand.digitLength(); LargeInteger dividend = _significand.times10pow(pow10); return FloatingPoint.valueOf(dividend.divide(that._significand), this._exponent - pow10 - that._exponent).normalize(); } COM: <s> returns this floating point number divided by the one specified </s>
funcom_train/17540242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties createPropertiesFromQuery(String query) { Properties properties = new Properties(); for (String pair : query.split(",")) { String[] array = pair.split("="); properties.put(array[0], array[1]); } return properties; } COM: <s> create a properties object from a string containing a comma separated </s>
funcom_train/51294732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFocusTransferEnterAction(final JComponent comp) { comp.getActionMap().put("enterAction", new AbstractAction() { public void actionPerformed(ActionEvent e) { comp.transferFocus(); } }); comp.getInputMap(JComponent.WHEN_FOCUSED).put( KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "enterAction"); } COM: <s> constructor that allows set component to handle event </s>
funcom_train/33519459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDateFormat() throws InvalidParameterException { if (!configurations.containsKey(Util.FORMAT_CONFIG)) { throw new InvalidParameterException("No configuration is defined"); } Configuration configuration = configurations.get(Util.FORMAT_CONFIG); if (configuration.getConfigValue().length() <= 0) { throw new InvalidParameterException("No configuration is defined"); } return configuration.getConfigValue(); } COM: <s> this method returns the date format being used by the system </s>
funcom_train/49626589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getLocaleInfo() { Element locales = new Element("locales"); Collection<java.util.Locale> activeLocales = Lifecycle .getActiveLocales(); for (java.util.Locale locale : Lifecycle.getKnownLocales()) { Element localeElement = new Element("locale").setText(locale .toString()); if (activeLocales.contains(locale)) { localeElement.setAttribute("active", "true"); } locales.addContent(localeElement); } return locales; } COM: <s> returns the known locales and marks the active locales </s>
funcom_train/45347350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double unpack(final int r, final int c, final double[][] packed) { final int index = getIndex(r, c); if (index >= 0) { return packed[index / columns][index % columns]; } else if (index > Integer.MIN_VALUE) { return -packed[(-index) / columns][(-index) % columns]; } else { return ZERO; } } COM: <s> returns the specified fourier mode of the transformed data </s>
funcom_train/42350593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void send(String message, IoSession session) { if (log.isDebugEnabled()) { StringBuilder sb = new StringBuilder("Sending message \'"); sb.append(message); sb.append("\' to ").append(session.getRemoteAddress()); log.debug(sb.toString()); } session.write(message); session.close(); } COM: <s> send text message using the given io session </s>
funcom_train/42188612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJRadioButton11() { if (jRadioButton11 == null) { jRadioButton11 = new JRadioButton(); jRadioButton11.setText("Porcentual"); jRadioButton11.setVisible(false); jRadioButton11.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { jRadioButton1.setSelected(false); jPanel51.setVisible(false); jPanel5.setVisible(true); } }); } return jRadioButton11; } COM: <s> this method initializes j radio button11 </s>
funcom_train/46012983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveLastSimEdited() { if ((user_id != null) && (sim_id != null)) { User user = User.getById(schema, user_id); user.setLastSimEdited(sim_id); user.saveJustUser(schema); } else { Logger.getRootLogger().warn( "attempted to save non-existant sim or user, user/sim:" + user_id + "/" + sim_id); } } COM: <s> saves which sim the user last edited to the database </s>
funcom_train/3003205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectScript() { Component c = XPontusComponentsUtils.getTopComponent() .getDisplayComponent(); int rep = chooser.showOpenDialog(c); if (rep == JFileChooser.APPROVE_OPTION) { try { String path = chooser.getSelectedFile().getAbsolutePath(); view.getModel().setXsl(path); } catch (Exception e) { e.printStackTrace(); } } } COM: <s> select a script or a xsl stylesheet </s>
funcom_train/39382988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setLanguage(Locale locale) { super.setTitle(Configuration.getString(getClass(),0,locale)); lblAdhocMessage.setText(Configuration.getString(getClass(),1,locale)); this.invalidate(); frame.validate(); } COM: <s> sets the language as configured </s>
funcom_train/1090485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compensationComplete() { // typically called by AeActivityCompensateImpl. via comp.Handler when the // compHandler has completed its execution. AeCompensationHandler handler = getCompensationHandler(); getScope().getCoordinationContainer().removeCompensationHandler(handler); handler.setCallback(null); handler.setCompInfo(null); setEnabled(false); } COM: <s> removes the compensation info from the scope and compensation handler after </s>
funcom_train/2609987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void triggerResolveEnd() { Iterator iter = getListenersList().iterator(); while (iter.hasNext()) { TransportResolverListener trl = (TransportResolverListener) iter.next(); if (trl instanceof TransportResolverListener.Resolver) { TransportResolverListener.Resolver li = (TransportResolverListener.Resolver) trl; li.end(); } } } COM: <s> trigger a event notifying the obtention of all the candidates </s>
funcom_train/16141832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteDataSourceDatabase(String dataSourceDBName) throws Exception { File dataSourceDB = new File(this.dbPath+"/"+ dataSourceDBName + DATA_SOURCE_DB_OBJ_ID); dataSourceDB.delete(); logger.debug("Deleted Data Source Database with name "+dataSourceDBName); } COM: <s> delete the berkeley db storage for the data source data </s>
funcom_train/23069492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializAvailability(InterviewerDateTuple tuple) { InterviewerAvailability availability = ramSchedulerService.getAvailability(tuple.interviewer, tuple.date, true); List list = getDefaultTimeSlots(tuple.interviewer.getTimeSlotType()); for (Iterator iter = list.iterator(); iter.hasNext();) { ActivityTimeSlot slot = (ActivityTimeSlot) iter.next(); availability.addInterviewSlot(slot); } availabilityMap.put(tuple, availability); } COM: <s> for the given tuple create load the availability </s>
funcom_train/20768897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void acquireDevice() throws HardwareInterfaceException { log.log(Level.INFO, "{0} acquiring device for exclusive access", this); int status = gUsbIo.acquireDevice(); if (status != 0) { throw new HardwareInterfaceException("Unable to acquire device for exclusive use: " + UsbIo.errorText(status)); } } COM: <s> acquire a device for exclusive use other processes cant open the device anymore </s>
funcom_train/51098838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reportError(String title, Throwable th) { th = Util.unwindException(th); logObj.info("Error in " + getClass().getName(), th); JOptionPane.showMessageDialog(getView(), th.getMessage(), title, JOptionPane.ERROR_MESSAGE); } COM: <s> utility method to provide a visual indication an execution error </s>
funcom_train/48524392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // protected void closeSocket(InetSocketAddress addr) { // synchronized (sockets) { // if (sockets.containsKey(addr)) { // ((SocketManager) sockets.get(addr)).shutdown(); // } else { // if (logger.level <= Logger.SEVERE) logger.log( "(SCM) SERIOUS ERROR: Request to close socket to non-open handle to path " + addr); // } // } // } COM: <s> method which cloeses a socket to a given remote node handle and updates </s>
funcom_train/8084498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyBatchClustererListeners(BatchClustererEvent ce) { Vector l; synchronized (this) { l = (Vector)m_batchClustererListeners.clone(); } if (l.size() > 0) { for(int i = 0; i < l.size(); i++) { ((BatchClustererListener)l.elementAt(i)).acceptClusterer(ce); } } } COM: <s> notify all batch clusterer listeners of a batch clusterer event </s>
funcom_train/27761560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScope(String scope) { if (StringUtils.isNotEmpty(scope) && !scope.equals(APPLICATION_SCOPE) && !scope.equals(SESSION_SCOPE) && !scope.equals(REQUEST_SCOPE) && !scope.equals(PAGE_SCOPE)) { throw new IllegalArgumentException(ILLEGAL_SCOPE); } this.scope = scope; } COM: <s> sets the scope attribute of the property tag object </s>
funcom_train/28262929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeNodes(BNode n) { p.called("removeNodes:"); String[] keys = n.getKeys(); for (String key : keys) { if (key.length() > 0) { String temp = key + "#" + n.getServiceName(); p.out("removed: " + temp, true); advertisedItem.x.remove(temp); } } } COM: <s> remove the related advertised items from the list </s>
funcom_train/19307401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean execute(final PsName nameObject) throws PsOperatorException, PsInterpreterException4a { if (!nameObject.isExecutable()) { return false; } if (super.execute(this.interpreter, nameObject)) { return true; } final PsOperator operator = PsOperator.mapNameToEnum(nameObject.getValue()); if (operator == null) { return false; } return executeOperator(operator); } COM: <s> tries to execute an executable object </s>
funcom_train/10298752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActivationObject(Object comp) { debug("setActivationObject"); while (comp instanceof MenuComponent) { comp = ((MenuComponent)comp).getParent(); } Window owner = null; if (comp instanceof Frame) { owner = (Window)comp; } else if (comp instanceof Component) { owner = SwingUtilities.windowForComponent((Component)comp); } setActivationWindow(owner); } COM: <s> set the activation window from given component or menu item </s>
funcom_train/49656826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matches(Tree t) { reset(); if (!rootPattern.descriptionPattern.matcher(t.label().value()).matches()) { return false; } else { while (find()) { if (t == getMatch()) { return true; } } return false; } } COM: <s> attempts to match the input </s>
funcom_train/38501066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAccelerationFactor(int accelerationFactor) { if (_status != Status.STOPPED) { throw new IllegalStateException(); } if (accelerationFactor < 1 || accelerationFactor > 16) { throw new IllegalArgumentException("Acceleration factor must be a value from 1 to 16."); } _accelerationFactor = accelerationFactor; } COM: <s> sets the acceleration factor </s>
funcom_train/5205132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Command getCommand() { @SuppressWarnings("unchecked") List<IGraphicalEditPart> objects = createOperationSet(); if (objects.isEmpty()){ return null; } for (Object next : objects){ if (next instanceof ConnectionEditPart){ //connections are sync'ed in U2T return null; } if (next instanceof DiagramEditPart){ return null; } } CompoundCommand result = new CompoundCommand(getLabel()); for (IGraphicalEditPart next : objects){ result.add(next.getCommand(getTargetRequest())); } return result; } COM: <s> in addition to default gmf delete from diagram action behavior </s>
funcom_train/973584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTextField() { if (textField == null) {//GEN-END:|123-getter|0|123-preInit // write pre-init user code here textField = new TextField("Saved name", "mygame1", 32, TextField.ANY);//GEN-LINE:|123-getter|1|123-postInit // write post-init user code here }//GEN-BEGIN:|123-getter|2| return textField; } COM: <s> returns an initiliazed instance of text field component </s>
funcom_train/26382229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FilerFileProperties getFileProperties(String file) throws FilerCommunicationException, FilerTimeoutException { FilerPacket p=Request(CMD_ASK_DIR,file.toCharArray()); p=Request(CMD_GET_DIR,dummy); if(p.endOfDir) return null; return new FilerFileProperties(p); } COM: <s> retrive properties of file </s>
funcom_train/37885494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultFunctionNamespace(String uri) throws XPathException { //Not sure for the 2nd clause : eXist forces the function NS as default. if (defaultFunctionNamespace != null && !defaultFunctionNamespace.equals(Function.BUILTIN_FUNCTION_NS) && !defaultFunctionNamespace.equals(uri)) throw new XPathException("XQST0066: default function namespace is already set to: '" + defaultFunctionNamespace + "'"); defaultFunctionNamespace = uri; } COM: <s> set the default function namespace </s>
funcom_train/19322523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getValue(ObjectName objectname) { String s = null; try { s = QueryEval.getMBeanServer().getObjectInstance(objectname).getClassName(); } catch (Exception exception) { log.error("error while QueryEval is evaluating", exception); } return s; } COM: <s> get class name as string of the code objectname code </s>
funcom_train/35620543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createRoomObjects(PhysicsSpace physicsSpace) { StaticPhysicsNode roomObjects = physicsSpace.createStaticNode(); roomObjects.setModelBound(new BoundingBox()); roomObjects.setLocalTranslation(new Vector3f(20, getFloorHeight(), 55)); roomObjects.attachChild( ModelUtil.convertMultipleModelToJME(ResourcesPath.MODELS_PATH + "obj/roomObjects.obj")); roomObjects.setMaterial(Material.GHOST); roomObjects.setLocalScale(1f); roomObjects.generatePhysicsGeometry(); this.attachChild(roomObjects); } COM: <s> creates the objects that completes the room </s>
funcom_train/34271924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected WindCell cellWithPoint(final GeoLocation start) throws LocationNotInMap { final Iterator<WindCell> wit = cells.iterator(); while (wit.hasNext()) { final WindCell cell = wit.next(); if (cell.doesContain(start)) return cell; } // - No cell contains this location we have to throw an exception throw new LocationNotInMap("The " + start.toString() + " location is not contained inside the Route Map."); } COM: <s> locate the wind cell in the map that contains the specified location </s>
funcom_train/21498238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupEventingClient() throws AxisFault { String axis2XML = CLIENT_CONFIG_DIR + File.separator + "conf" + File.separator + "axis2.xml"; ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(CLIENT_CONFIG_DIR, axis2XML); ServiceClient serviceClient = new ServiceClient (configContext, null); Options options = new Options (); options.setTo(new EndpointReference (SERVER_ADDRESS)); serviceClient.setOptions(options); serviceClient.engageModule(new QName ("addressing")); eventingClient = new EventingClient (serviceClient); } COM: <s> we use an eventing client to register listeners to the publisher </s>
funcom_train/3990048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNiezdolnosc_do_pracyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_HistoriaChoroby_niezdolnosc_do_pracy_feature"), getString("_UI_PropertyDescriptor_description", "_UI_HistoriaChoroby_niezdolnosc_do_pracy_feature", "_UI_HistoriaChoroby_type"), PrzychodniaPackage.Literals.HISTORIA_CHOROBY__NIEZDOLNOSC_DO_PRACY, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the niezdolnosc do pracy feature </s>
funcom_train/13994102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ValidationMessageClass getHighestPriorityClass() { ValidationMessageClass result = null; for (Iterator it = delegate.iterator(); it.hasNext();) { ValidationMessage message = (ValidationMessage) it.next(); if (result == null) { result = message.getMessageClass(); } if (message.getMessageClass().getPriority() > result.getPriority()) { result = message.getMessageClass(); } } return result; } COM: <s> returns the message class with the highest priority or null if no error </s>
funcom_train/32158125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recycleMemory(ByteBuffer buffer) { if (isPreallocationMode()) { int remaining = buffer.remaining(); if (remaining >= getPreallocatedMinBufferSize()) { synchronized (memoryBuffer) { if (LOG.isLoggable(Level.FINE)) { LOG.fine("recycling " + DataConverter.toFormatedBytesSize(buffer.remaining())); } memoryBuffer.add(new SoftReference<ByteBuffer>(buffer)); } } } } COM: <s> recycle free memory </s>
funcom_train/3024875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object removeMethod(SimpleNode node) { int loop = node.jjtGetNumChildren(); for (int ndx = 0; ndx < loop; ndx++) { SimpleNode next = (SimpleNode) node.jjtGetChild(ndx); SimpleNode possible = (SimpleNode) next.jjtGetFirstChild(); if (isFound(possible)) { removeSingle(node, next, ndx); return next; } } return null; } COM: <s> remove the method if it is the correct one </s>