__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/9238168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean callGotNetwork() { final String networkName = myParser.sNetworkName; final String ircdVersion = myParser.getIRCD(false); final String ircdType = myParser.getIRCD(true); final CallbackOnGotNetwork cb = (CallbackOnGotNetwork)getCallbackManager().getCallbackType("OnGotNetwork"); if (cb != null) { return cb.call(networkName, ircdVersion, ircdType); } return false; } COM: <s> callback to all objects implementing the got network callback </s>
funcom_train/28723296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void zoomOut() { if (sourceImage == null) return; Rectangle rect = getClientArea(); int w = rect.width, h = rect.height; double dx = ((double) (w / 2)); double dy = ((double) (h / 2)); if(transform.getScaleX()<ZOOM_LOWER_BOUND || transform.getScaleY()<ZOOM_LOWER_BOUND) return; centerZoom(dx, dy, 1.0/zoom_rate, transform); } COM: <s> zoom out around the center of client area </s>
funcom_train/17025448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BPMNPlane getFirstPlane() { if(this.getDiagram().size() == 0) { BPMNDiagram diagram = new BPMNDiagram(); diagram.setId(SignavioUUID.generate()); this.getDiagram().add(diagram); } BPMNDiagram diagram = this.getDiagram().get(0); if(diagram.getBPMNPlane() == null) { diagram.setBPMNPlane(new BPMNPlane()); } return diagram.getBPMNPlane(); } COM: <s> returns the first </s>
funcom_train/29282858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void tryToHideSoftKeyboard(View view) { InputMethodManager service = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); if (service != null) { service.hideSoftInputFromInputMethod(view.getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY); } } COM: <s> tries to suppress the soft keyboard from popping up automatically for </s>
funcom_train/41524908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File toPng(SeriesImageDicomImpl series) throws ImageException { File result = null; if ((series.getImages() != null) && (!series.getImages().isEmpty())) { int i = series.getImages().size(); if (i > 3) result = toPng(series.getImages().get(i / 2)); else result = toPng(series.getImages().get(0)); } return result; } COM: <s> obtains a png file from the one single image of the series </s>
funcom_train/21656517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtMenu() { if (btMenu == null) { btMenu = new JButton(); btMenu.setBounds(new Rectangle(450, 390, 120, 25)); btMenu.setText("Volver al Menu "); btMenu.setMnemonic('v'); btMenu.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ControladorPrincipal.mostrarFichaTecnica(); } }); } return btMenu; } COM: <s> this method initializes bt atras </s>
funcom_train/25564717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Data getChosenData() { //return (Data)((javax.swing.tree.DefaultMutableTreeNode)manager.getTree().getSelectionPath(). //getLastPathComponent()).getUserObject(); //evdokimov: where is null check? javax.swing.tree.TreePath path = manager.getTree().getSelectionPath(); if(path==null)return null; return manager.getData(path); } COM: <s> returns one of the following objects need to be tested </s>
funcom_train/28365252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write( final DataAdaptor adaptor ) throws MissingPrimaryKeyException { validatePrimaryKeys(); Collection<DataAttribute> attributes = attributes(); Iterator<DataAttribute> attributeIter = attributes.iterator(); while ( attributeIter.hasNext() ) { DataAttribute attribute = attributeIter.next(); DataListener attributeWriter = attribute.readerWriter(); adaptor.writeNode(attributeWriter); } } COM: <s> write the schema out to the data adaptor </s>
funcom_train/40455929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(List c) { Object[] a = c.toArray(); int numNew = a.length; ensureCapacity(size + numNew); // Increments modCount System.arraycopy(a, 0, elementData, size, numNew); size += numNew; return numNew != 0; } COM: <s> appends all of the elements in the specified collection to the end of </s>
funcom_train/12812128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dropAxeToRealWord(int axe) throws Exception { if (Messenger.debug_mode) Messenger.printMsg(Messenger.DEBUG, "Set default projection parameters to axe #" + (axe+1)); this.CRPIX[axe] = 0; this.CRVAL[axe] = 0; this.setMatrix(axe, axe, 1); for( int axe2=0 ; axe2<this.NAXIS ; axe2++) { if( axe2 != axe ) { this.setMatrix(axe2, axe, 0); this.setMatrix(axe, axe2, 0); } } } COM: <s> set default projection parameters 1 to 1 on axe </s>
funcom_train/50770109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void registerViewerTag(String name, final Class theClass, final int style) { registerTagFactory(name, new TagFactory() { /** * @see org.apache.commons.jelly.impl.TagFactory#createTag(java.lang.String, org.xml.sax.Attributes) */ public Tag createTag(String name, Attributes attributes) throws JellyException { return new ViewerTag(theClass, style); } }); } COM: <s> register a widget tag for the given name </s>
funcom_train/2272384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public X509Certificate loadCertificate(InputStream in) throws WSSecurityException { X509Certificate cert = null; try { cert = (X509Certificate) getCertificateFactory().generateCertificate(in); } catch (CertificateException e) { throw new WSSecurityException(WSSecurityException.SECURITY_TOKEN_UNAVAILABLE, "parseError"); } return cert; } COM: <s> load a x509 certificate from the input stream </s>
funcom_train/5898282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getResult() { final Desktop desktop = _exec.getDesktop(); try { JSONArray result = ((WebAppCtrl)desktop.getWebApp()) .getUiEngine().finishUpdate(_updctx); return new StringBuffer(512) .append("zAu.doCmds('").append(desktop.getId()).append("',") .append(result.toString()).append(");").toString(); } catch (Exception ex) { //not possible throw UiException.Aide.wrap(ex); } } COM: <s> returns the result in the java script </s>
funcom_train/12804494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDateTime() { Timestamp timestamp = (Timestamp) getValue(); if (timestamp == null) { return ""; } GregorianCalendar calendar = new GregorianCalendar(); calendar.setTime((Date) timestamp); SimpleDateFormat formatter = new SimpleDateFormat (this.COMMON_DATETIME_FORMAT); formatter.setLenient(false); return formatter.format(calendar.getTime()); } COM: <s> retrieves a code string code representation of this domains </s>
funcom_train/49067202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertAfter(InstructionHandle ih, Instruction x) { InstructionHandle nextih = ih.getNext(); // InstructionHandle newih = null; if (nextih != null) { // newih = il.insert(nextih, x); } else { // newih = il.append(x); } // recalTables(ih, newih); } COM: <s> inserts one single instruction after a given instruction </s>
funcom_train/41164339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoEditorReviewerPairSt2 entity) { EntityManagerHelper.log("saving CoEditorReviewerPairSt2 instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co editor reviewer pair st2 </s>
funcom_train/32018244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLabelShape(VisualItem item) { // align the label shape with the coordinates of the item getAlignedPoint(m_pt, item, m_maxWidth, m_height, m_xAlign, m_yAlign); m_labelShape = new Rectangle2D.Double(m_pt.getX(), m_pt.getY(), m_maxWidth, m_height); } COM: <s> compute the shape for the label button </s>
funcom_train/29018721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectAll () { checkWidget (); if ((style & SWT.SINGLE) != 0) return; LVITEM lvItem = new LVITEM (); lvItem.mask = OS.LVIF_STATE; lvItem.state = OS.LVIS_SELECTED; lvItem.stateMask = OS.LVIS_SELECTED; ignoreSelect = true; OS.SendMessage (handle, OS.LVM_SETITEMSTATE, -1, lvItem); ignoreSelect = false; } COM: <s> selects all of the items in the receiver </s>
funcom_train/24121003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(InputStream in) throws IOException { // size and type already read this.region = WMFConstants.readLittleEndianShort(in); this.brush = WMFConstants.readLittleEndianShort(in); this.width = WMFConstants.readLittleEndianShort(in); this.height = WMFConstants.readLittleEndianShort(in); } COM: <s> reads the frameregion record from a stream </s>
funcom_train/24472193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URI load(String resourceID) throws MyLeadException { try { connect(); String uid = this.configuration.getUser(); LEADresourceDocument resourceDocument = this.stub.getCollection( uid, resourceID); String templateID = getWorkflowTemplateID(resourceDocument); return new URI(templateID); } catch (URISyntaxException e) { String message = "Workflow template ID is in wrong format."; throw new MyLeadException(message, e); } catch (RuntimeException e) { throw new MyLeadException(e); } } COM: <s> loads a graph from of a specified workflow template </s>
funcom_train/26126277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IEndPointSession addParticipant(Address participantAddr, IMsrpEndpointApplication endpointApplication) { EndPointSessionImpl endPointSession = new EndPointSessionImpl(this, endpointApplication); Participant p = Participants.getInstance().create(this, endPointSession.getMessageReceiver(), participantAddr, null); endPointSession.setParticipant(p); return endPointSession; } COM: <s> adds a new participant to this endpoint </s>
funcom_train/5866670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onInitLater(Event event) { if (getPage() != null) { final Execution exe = Executions.getCurrent(); final String uuid = getUuid(); if (exe.getAttribute("_zk_columns_menupopup_" + uuid) == null) { if (_menupopup != null) _menupopup.detach(); _menupopup = new Columnmenupopup(this); smartUpdate("z.mpop", _menupopup.getId()); exe.setAttribute("_zk_columns_menupopup_" + uuid, Boolean.TRUE); } } } COM: <s> handles a private event on init later </s>
funcom_train/27843551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActionID(String actionId) { _actionID = actionId; try { if (_actionID == null) { uninstallListeners(); } else { installListeners(); } } catch (ViewException ex) { // This method is called directly from public API methods, so we throw a runtime exception here throw ScopeUtils.createRTException(ex); } } COM: <s> sets the action id </s>
funcom_train/19285149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isItTimeToUpdateTitles() { if (lastUpdatedIssueList==null) return true; Calendar now = Calendar.getInstance(); now.add(Calendar.MINUTE, -10); if (now.getTime().before(lastUpdatedIssueList)) { return false;// we updated in the last few minutes. No need to update again right now. } return true; } COM: <s> has the expiration date of the last loaded tiles passed </s>
funcom_train/17939687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCmdToHistory(String cmd) { String[] cmdHistoryTemp = new String[cmdHistory.length]; for (int i = 0; i < cmdHistory.length-1; i++) cmdHistoryTemp[i + 1] = cmdHistory[i]; cmdHistoryTemp[0] = cmd; // save last cmd as first one this.cmdHistory = cmdHistoryTemp; } COM: <s> adds a command to the list of stored commands </s>
funcom_train/33607934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initPropertyPanel() { PlaneGraphBean pgb = new PlaneGraphBean(activeGraph); propertyRP.add(new PropertySheet(pgb.nodeBean()), "Node Settings"); propertyRP.add(new PropertySheet(pgb.edgeBean()), "Edge Settings"); propertyRP.add(new PropertySheet(pgb.labelBean()), "Label Settings"); } COM: <s> updates the property panel with active graph and energy layout </s>
funcom_train/43789420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void playNextVideo() { Station s = this.stations.get(tunedTo); // To make sure old title goes away quickly. lastStateChange = 0; title.setText(""); video = s.nextVideo(); if (video != null) { Console.log("Loading video " + video.getId()); player.loadVideoById(video.getId(), 0); } else { Console.log("video = null, not playing."); } } COM: <s> plays the next video from the station were tuned to </s>
funcom_train/33717739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displaySizeChange(int l0) { int d = axed.getLineCount() - l0; if (d < -2) { vimBar.showMessage((-d) + " fewer lines.", vimBar.MESSAGE_NORMAL); return; } if (d > 2) { vimBar.showMessage(d + " more lines.", vimBar.MESSAGE_NORMAL); return; } vimBar.showMessage("", vimBar.MESSAGE_NORMAL); } COM: <s> displays the change of the filesize just like vim does </s>
funcom_train/33968830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FMDRequest buildModerationRequest(boolean yes, int storyId) { FMDRequest request = mModerateRequest; if (request == null) { request = new FMDRequest(); } else { request.reset(); } request.state = mAppStateManager.getState(); request.requestType = cREQUEST_SUBMIT_MODERATION; request.method = FMDHTTPConnectionController.cHTTP_GET; request.request.append(sSERVER_ADDRESS); request.request.append(sMODERATE_METHOD); if (yes) { request.request.append("yes/"); } else { request.request.append("no/"); } request.request.append(storyId); request.request.append(appendFMLParametersUri()); return request; } COM: <s> build the request to submit the moderation </s>
funcom_train/13781189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected NodeIterator runQuery(String statement) throws RRepositoryException { try { QueryManager qm = getSession().getWorkspace().getQueryManager(); Query query = qm.createQuery(statement, Query.XPATH); QueryResult qr = query.execute(); return qr.getNodes(); } catch (RepositoryException e) { throw new RRepositoryException("Failed to run query.", e); } } COM: <s> runs query in jcr </s>
funcom_train/554968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateValue(final Object value) { if (value == null) { return false; } try { SnapshotAttributeValue.castValue(value, getDataType()); } catch (final ClassCastException e) { return false; } catch (final NumberFormatException e) { return false; } catch (final Exception e) { logger.error("CRITIC", e); System.out.println("Abnormal case in validateValue"); return false; } return true; } COM: <s> tests whether a value is coherent with the data type </s>
funcom_train/28113798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void response(String line) { StringTokenizer st = new StringTokenizer(line, " ()"); while( st.hasMoreTokens() ) { String word = st.nextToken(); if( word.equalsIgnoreCase("unseen") ) { String num = st.nextToken(); int n = Integer.parseInt(num); biff = (n > 0); break; } } } COM: <s> this implements an </s>
funcom_train/46281663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDocuments(OmmsIdxField field) throws OmmsIndexerException { try { Term term = new Term(field.name(), field.value()); indexWriter().deleteDocuments(term); indexWriter().commit(); m_idxDirty = true; } catch (IOException e) { e.printStackTrace(); throw new OmmsIndexerException(ErrorCondition.internal_server_error , e.getMessage()); } } COM: <s> removes all documents containing the given field </s>
funcom_train/41737568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getDefAngleBtn() { if (defAngleBtn == null) { defAngleBtn = new JButton(); defAngleBtn.setText(""); defAngleBtn.setName("defanglebtn"); defAngleBtn.setToolTipText("Adjust Angle"); defAngleBtn.setIcon(new ImageIcon(getClass().getResource("/icon/gexing_017.png"))); defAngleBtn.setPreferredSize(new Dimension(70, 70)); defAngleBtn.addActionListener(VRMUIEventHandler.get()); } return defAngleBtn; } COM: <s> this method initializes def angle btn </s>
funcom_train/12160886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testProvideWBMPImage() throws Exception { File file = ResourceUtilities.getResourceAsFile(WBMP_IMAGE); ImageData imageData = null; try { imageData = new WBMPImageProvider().provideImage(file); } catch (IOException ioe) { imageData = null; } catch (IllegalArgumentException iaee) { imageData = null; } assertNotNull(imageData); } COM: <s> this tests the wbmpimage provider </s>
funcom_train/10748372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPackage() throws Throwable { Package p = test.getPackage(); assertNotNull("package", p); Annotation[] an = p.getAnnotations(); assertNotNull(an); assertEquals("annotations num", 1, an.length); assertEquals("the package annotation", "AnotherAntn", an[0].annotationType().getSimpleName()); } COM: <s> tests that the defining classloader is used to lookup package annotations </s>
funcom_train/44823525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean filterApplies(String methodName) { boolean filter = false; if ("*".equals(filteredMethodNames)) { filter = true; } else { for (int i=0; !filter && parsedMethodNames != null && i < parsedMethodNames.length; i++) { if (parsedMethodNames[i].equals(methodName)) filter = true; } } return filter; } COM: <s> should this filter be applied to the given method name </s>
funcom_train/32891133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateInfra() { try { Validation v = new Validation(getModel().getInfrastructure()); Vector errors = v.validate(); if (!errors.isEmpty()) { String errorString =""; for (Enumeration e = errors.elements(); e.hasMoreElements();) { errorString+=e.nextElement()+"\n"; } showError("Validation error(s):\n\n" + errorString); return false; } } catch (GLDException e) { reportError(e.fillInStackTrace()); } setStatus("Infrastructure is valid."); view.redraw(); return true; } COM: <s> runs the validator on the current infrastructure </s>
funcom_train/50294921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void order( String preceding_method, String subsequent_method ) { Set preceding_calls; if( _order_constraints.containsKey(subsequent_method) ) { preceding_calls = (Set)_order_constraints.get(subsequent_method); } else { preceding_calls = new HashSet(); _order_constraints.put( subsequent_method, preceding_calls ); } preceding_calls.add( preceding_method ); } COM: <s> define an order between two calls </s>
funcom_train/42727887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GuiObject waitForObject(int timeOut, int step) { String[] obj = this.objectToStringArray(); String[] vec = new String[objLength + 2]; for (int i = 0; i < objLength; i++) { vec[i] = obj[i]; } vec[4] = Integer.toString(timeOut); vec[5] = Integer.toString(step); client.waitForObject(vec); return this; } COM: <s> makes the application wait the objects execution </s>
funcom_train/194745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStringValue() throws java.io.UnsupportedEncodingException{ this.is.setRelativePosition(0); String s = new String(this.is.getBytes(), this.is.getStartOffset(), this.is.getLength(), this.is.getCharSetName()); return s; } COM: <s> gets the string values of the bytes backed by this bridge </s>
funcom_train/593600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAction(String action) { // Use the action resolver to figure out what the appropriate URL binding if for // this path and use that if there is one, otherwise just use the action passed in String binding = StripesFilter.getConfiguration().getActionResolver() .getUrlBindingFromPath(action); if (binding != null) { this.actionWithoutContext = binding; } else { this.actionWithoutContext = action; } } COM: <s> sets the action for the form </s>
funcom_train/27816298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Timestamp getTimestampFromString(String dateString) { Calendar dt = null; Date calendarDate; try { calendarDate = slashFmt.parse(dateString); } catch (ParseException e) { try { calendarDate = dashFmt.parse(dateString); } catch (ParseException ex) { return null; } } return new Timestamp(calendarDate.getTime()); } COM: <s> converts a date from its text string representation to a java timestamp object </s>
funcom_train/1241742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Session createSession(String cooky) { // is there a session already? Session session = null; if (sessions.containsKey(cooky)) { session = (Session) sessions.get(cooky); } else { // no session for this cooky, bummer session = new SimpleSession(); // ADD CLEANUP LOGIC HERE if needed sessions.put(cooky, session); } return session; } COM: <s> demand create a session if there is not already one for the string </s>
funcom_train/37655382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPort(int port) { // if the entered port is outside accepted // port numbers, throw the exception if(port > 65536 || port < 0) throw new IllegalArgumentException(); else { _port = port; String s = Integer.toString(_port); PROPS.put(PORT, s); } } COM: <s> sets the port to connect on </s>
funcom_train/27677224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String decode( final byte[] data ) { try { final CharBuffer characters = this.codepageDecoder.decode( ByteBuffer.wrap( data ) ); return characters.toString(); } catch ( CharacterCodingException ex ) { throw new BIFFAlert( "Failed to decode string data" ).culprit( "data", data ).setParentThrowable( ex ).mishap(); } } COM: <s> returns the string resulting from decoding the specified data using the </s>
funcom_train/26246570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasTradeCode(TradeCode code) { if (tradeCodes == null || tradeCodes.length() == 0) { return false; } String[] codes = tradeCodes.split(" +"); for (int i=0; i < codes.length; i++) { if (codes[i].equals(code.toString())) { return true; } } return false; } COM: <s> does this planet have the requested trade code </s>
funcom_train/324842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File findIndexFile(File dataFile, boolean checkExists) { String filePath = dataFile.getAbsolutePath(); // check that the last 4 characters are "pgdf" int pathLen = filePath.length(); String newPath = filePath.substring(0, pathLen-4) + indexFileType; File newFile = new File(newPath); if (checkExists) { if (newFile.exists() == false) { return null; } } return newFile; } COM: <s> find the index file to match a given data file </s>
funcom_train/38181913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int _index, long _value) { if (_index<0 || _index>=size) throw new IndexOutOfBoundsException("Index: " + _index + " Size: " + size); long[] target = (long[]) root.get(_index >> 7); target[_index & 127] = _value; // _index % 128 } COM: <s> sets a value at a specific position </s>
funcom_train/25824756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Polygon buildPolygon(LinkedList points){ Polygon polygon = null; if(!points.isEmpty()){ polygon = new Polygon(); for(int i=0;i<points.size();i++){ Point2D p = ((Point2D[])points.get(i))[0]; polygon.addPoint((int)p.getX(),(int)p.getY()); } for(int i=(points.size()-1);i>=0;i--){ Point2D p = ((Point2D[])points.get(i))[1]; polygon.addPoint((int)p.getX(),(int)p.getY()); } } return polygon; } COM: <s> this methos allows to build a polygon by using the points list </s>
funcom_train/38833121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String foreignKeyColumnName(String propertyName, String propertyEntityName, String propertyTableName, String referencedColumnName) { String header = propertyName != null ? StringHelper.unqualify(propertyName) : propertyTableName; if (header == null) throw new AssertionFailure("NamingStrategy not properly filled"); return columnName(header + "_" + referencedColumnName); } COM: <s> return the foreign key column name for the given parameters </s>
funcom_train/1715381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void parseResponse(SoapEnvelope envelope, InputStream is) throws XmlPullParserException, IOException { XmlPullParser xp = new KXmlParser(); xp.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); xp.setInput(is, null); envelope.parse(xp); } COM: <s> sets up the parsing to hand over to the envelope to deserialize </s>
funcom_train/29986740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ParamTag getParamTag(final ParamTag originalTag) { if (originalTag == null) { return null; } Object found = get(originalTag); if (found == null) { found = this.factory.createParamTag(originalTag); put(originalTag, found); } return (ParamTag) found; } COM: <s> returns a wrapped instance of the supplied param tag object </s>
funcom_train/8228590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBillingPlanId(UserAccount acct) { int ret = 0; try { Statement stat = conn.createStatement(); String query = "SELECT billingPlanID FROM accounts WHERE " + "acctID = " + acct.acctId; ResultSet rs = stat.executeQuery(query); try { rs.next(); } catch (java.sql.SQLException e) { return 0; } ret = rs.getInt("billingPlanID"); } catch (java.sql.SQLException e) { e.printStackTrace(); } return ret; } COM: <s> get the billing plan associated with the account </s>
funcom_train/51251563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveBroadcasts(List broadcasts, Long channelId) throws PersistenceException { Channel channel = channelDAO.getById(channelId); Iterator iter = broadcasts.iterator(); while (iter.hasNext()) { Broadcast broadcast = (Broadcast) iter.next(); broadcast.setChannel(channel); broadcastDAO.save(broadcast); } } COM: <s> save broadcasts data to db </s>
funcom_train/2756851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(Object object, int rowIndex, int columnIndex) { if (rowIndex < getRowCount()) { QuickDial dial = quickDials.get(rowIndex); switch (columnIndex) { case 0: dial.setQuickdial(object.toString()); break; case 1: dial.setVanity(object.toString()); break; case 2: dial.setNumber(object.toString()); break; case 3: dial.setDescription(object.toString()); break; } fireTableCellUpdated(rowIndex, columnIndex); } } COM: <s> sets a value to a specific position </s>
funcom_train/9082297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int resolveRange(int size, RangeResolver resolver) { int oldPosition = relativePosition.get(); relativePosition.increase(size); if (relativePosition.get() > 0) { if (oldPosition < 0) { resolver.resolve(-oldPosition, otherTarget.rangeCache); } return -oldPosition; } else { resolver.resolve(size, otherTarget.rangeCache); return -1; } } COM: <s> resolves the transformation of a range </s>
funcom_train/45769648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean _getParent(boolean hasParent) { gotten = oObj.getParent(); if (!hasParent) return gotten == null; XNamed the_name = (XNamed) UnoRuntime.queryInterface(XNamed.class,gotten); if (the_name != null) log.println("Parent:"+the_name.getName()); return gotten != null; } COM: <s> test calls the method and checks return value and that </s>
funcom_train/10983390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restore() { reinitialize(); StorageHandler sh = Handlers.get().getStorageHandler(); String attrName = InternalUtils.getScopedAttrName(InternalConstants.FACES_BACKING_ATTR); sh.setAttribute(attrName, this); Map newActionOutputs = InternalUtils.getActionOutputMap(false); if (newActionOutputs != null) _pageInputs = newActionOutputs; onRestore(); } COM: <s> restore this bean set it as the current one from some dormant state </s>
funcom_train/121528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LogoList butFirstF() { if (!empty()) { head = head.next; } else { if (logoErrors) throw new RuntimeException("butfirst does not like " + this.toString() + " as input."); else throw new RuntimeException("Cannot use butfirst on an empty list"); } return this; } COM: <s> removes the first element from the list </s>
funcom_train/1342771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getDefaultPage(File pathIsDirectory) { if (Configuration .getPrefs() .getBoolean(ConfigConstants.HTTP_USE_DEFAULT_PAGES, true)) { // finding a default page String[] allFiles = pathIsDirectory.list( new DefaultFileFilter( Configuration.getPrefs().get( ConfigConstants.HTTP_DEFAULT_PAGE_LIST, "index.htm,index.html,index.shtml"))); if (allFiles.length > 0) { logger.fine("Default page found: " + allFiles[0]); return allFiles[0]; } } logger.fine("Default page not found."); return null; } COM: <s> returns the default page for a given directory </s>
funcom_train/31079460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Attribute getAttribute(String name) { Collection attrs = getAttributesHolder(); Attribute attr; for (Iterator itr = attrs.iterator(); itr.hasNext();) { attr = (Attribute) itr.next(); if (attr.getName().equals(name)) return attr; } return null; } COM: <s> return the attribute with the given name </s>
funcom_train/22367712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IAudioObjectStatistics getOrCreateAudioObjectStatistics(String songPath) { IAudioObjectStatistics stats = statistics.getAudioFilesStats().get(songPath); if (stats == null) { stats = new AudioObjectStats(); statistics.getAudioFilesStats().put(songPath, stats); statistics.setDifferentAudioFilesPlayed(statistics.getDifferentAudioFilesPlayed() + 1); } return stats; } COM: <s> returns audio object statistics or create a new one </s>
funcom_train/31028748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unitSelectedAction(MouseEvent e) { TreePath path = this.unitTree.getPathForLocation(e.getX(), e.getY()); if(path != null) { this.unitTree.setSelectionPath(path); Object selectedObject = path.getLastPathComponent(); if(selectedObject instanceof UnitNode) { selectedNode = (UnitNode)selectedObject; this.editSelected(); } } } COM: <s> called when the user selects a particular unit </s>
funcom_train/8492145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOk() { if (ok == null) { ok = new JButton(); ok.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { //tile.tile.type = tile.type = type.getText(); tile.setType(type.getText()); setVisible(false); } }); ok.setBounds(new java.awt.Rectangle(107, 61, 71, 21)); ok.setText("OK"); } return ok; } COM: <s> this method initializes ok </s>
funcom_train/4257234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText() throws IOException { String result = null; if (isAvailable()) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); write(baos); if (getCharacterSet() != null) { result = baos.toString(getCharacterSet().getName()); } else { result = baos.toString(); } } return result; } COM: <s> converts the representation to a string value </s>
funcom_train/40627497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void joinThreads() throws EventServiceServerThreadingTestException { waitForStarts(myRunningUnits); try { for(RunningUnit theRunningUnit: myRunningUnits) { theRunningUnit.getThread().join(); } } catch(InterruptedException e) { throw new EventServiceServerThreadingTestException("Error on joining threads!", e); } } COM: <s> ensures that all accuired threads are started and joined </s>
funcom_train/9919115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initAttributes(int n) { numAttributes = n; attribVBO = new int[n]; attribName = new String[n]; attribSize = new int[n]; for (int i = 0; i < n; i++) { attribVBO[i] = GLState.createGLResource(GL_VERTEX_BUFFER); } } COM: <s> sets the number of attributes for this model </s>
funcom_train/18876255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDataMapFile(String fn) throws ParserConfigurationException, SAXException, IOException, XPathExpressionException, InvalidDataMapException { String dataMapFile = fn; if (isDataMapFile(fn)) { DataLinkParser dataLinkParser = new DataLinkParser(dataMapFile); dataLinks = dataLinkParser.getLinks(); } else { throw new InvalidDataMapException(fn); } } COM: <s> set the data map file </s>
funcom_train/18065037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getExistFKComboBox() { if (existFKComboBox == null) { existFKComboBox = new JComboBox(); existFKComboBox.addActionListener(this); existFKComboBox.setActionCommand("combo"); Iterator<DbColumn> it = this.cols.iterator(); while (it.hasNext()){ existFKComboBox.addItem(it.next().getIdentifier().getAliasName()); } } return existFKComboBox; } COM: <s> this method initializes exist fkcombo box </s>
funcom_train/37577938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HashMap fetchIDName() throws Exception{ openDB(); HashMap idNameMap = new HashMap(); String qtext = "SELECT pid, indexDir FROM personindex"; ResultSet rs = stmt.executeQuery(qtext); //edges table is not complete while (rs.next()) { String pid = rs.getString("pid"); String indexDir = rs.getString("indexDir"); idNameMap.put(indexDir.toLowerCase(), pid); } rs.close(); closeDB(); return idNameMap; } COM: <s> find the match between a id and its index position </s>
funcom_train/18551457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentDirectory(File pFile) { // Let the action take place, then override the 'Name' field. // This is equivalent to the user typing &quot;.&quot; in the name field. super.setCurrentDirectory(pFile); FileChooserUI ui = getUI(); if (ui instanceof BasicFileChooserUI) { ((BasicFileChooserUI) ui).setFileName("."); } } COM: <s> sets the currect directory </s>
funcom_train/2929215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBooleanProperty(String key) throws ConfigurationException { // we can safely avoid synchronization while (true) { try { for (Iterator<PropertyProviderInterface> i = this.propertyProviderList.iterator(); i .hasNext();) { try { return i.next().getBooleanProperty(key); } catch (ConfigurationException e) { // try next } } // not found throw new ConfigurationException("Property " + key + " not defined"); } catch (ConcurrentModificationException e) { // just retry } } } COM: <s> boolean property getter delegating to backing provider implementations </s>
funcom_train/22290379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveToBack() { InternalWindow bottomWindow; if(!isVisible()) return; bottomWindow = rootView.backWindowWithLayer(layer()); if(bottomWindow != null && bottomWindow != this) { rootView.makeWindowVisible(this,BEHIND,bottomWindow); } } COM: <s> move the window behind all other windows with the same layer </s>
funcom_train/22277459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawInRect(Graphics g, Rect boundsRect) { Rect clipRect; if (g == null || boundsRect == null) { return; } clipRect = g.clipRect(); if( image != null ) { image.drawAt(g,boundsRect.x,boundsRect.y); } } COM: <s> draws the image attachments image </s>
funcom_train/49659781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onClick(Widget sender) { CellHTML cell = (CellHTML)sender; this.lastMonth = date.getMonth(); setDate(getYear(), getMonth(), cell.getDay()); if (date.getMonth() != this.lastMonth) { drawCalendar(); } if (changeListeners != null) { changeListeners.fireChange(this); } } COM: <s> this method responds to a click within the calendar widget </s>
funcom_train/18960024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getNewY(float currentY, float speedY) { // Subtract by a small thread to make sure that it does not cross the bound. if (t > T_EPSILON) { return (float)(currentY + speedY * (t - T_EPSILON)); } else { return currentY; } } COM: <s> return the y position after impact </s>
funcom_train/39911687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEh3() { System.out.println("getEh3"); Page1 instance = new Page1(); TextField expResult = null; TextField result = instance.getEh3(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get eh3 method of class timesheetmanagement </s>
funcom_train/45279357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GameState move(Move m) { Piece piece = board.getPieceAt(m.getSource()); if (piece != null && (piece.isWhite() == isWhiteMoving) && board.isLegalMove(m)) { // notify listeners before modifying board announcePieceMoved(m); board.movePiece(m); isWhiteMoving = !isWhiteMoving; } return getState(); } COM: <s> attempts to perform the given move and returns a representation of </s>
funcom_train/50219829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String key, Object value, int type) { switch (type) { case GraphType.atString: case GraphType.atInteger: preferencesMap.put(key, type + seperator + value.toString()); break; case GraphType.atColor: Color c = (Color) value; preferencesMap.put(key, type + seperator + c.red + seperator + c.green + seperator + c.blue); break; default: System.out.println("Property: " + key + " type: " + type + " not supported"); return; } storePrefs(file); } COM: <s> this routine converts the value of a particular type into a string representation </s>
funcom_train/1060012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDiagramPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DiagramLink_diagram_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DiagramLink_diagram_feature", "_UI_DiagramLink_type"), Di2Package.Literals.DIAGRAM_LINK__DIAGRAM, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the diagram feature </s>
funcom_train/1148435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand8() { if (okCommand8 == null) {//GEN-END:|184-getter|0|184-preInit // write pre-init user code here okCommand8 = new Command("Ok", Command.OK, 0);//GEN-LINE:|184-getter|1|184-postInit // write post-init user code here }//GEN-BEGIN:|184-getter|2| return okCommand8; } COM: <s> returns an initiliazed instance of ok command8 component </s>
funcom_train/2341555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void trimPopulation(List<Individual> operand) { /* Operand stores the original population. It must me sorted to remove non dominated solutions. */ MultiFitness.sortByDominanceAndCrowding(operand); int cnt = operand.size(); final int cut = operand.size() - this.incomingPopulation.size(); while(cnt > cut && cnt > 0) { cnt--; operand.remove(cnt); } } COM: <s> remove the worst individuals from the original population </s>
funcom_train/20504222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCurrentGenres() throws Exception { // setting the expectations List expectedResult = new ArrayList(); daoMock.getCurrentGenres(); daoMockControl.setReturnValue(expectedResult); daoMockControl.replay(); // executing the tested method List result = eventsCalendar.getCurrentGenres(); // assertions & verifications assertSame(expectedResult, result); daoMockControl.verify(); } COM: <s> tests the get current genres method of the events calendar service </s>
funcom_train/8331812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Menu getMenu(java.awt.Component component, int x, int y, int xAbsolute, int yAbsolute) { checkWidget(); Menu menu = SwtPopupRegistry.getInstance().findMenu(component, x, y, xAbsolute, yAbsolute); if (menu == null) { // Fallback: The menu set through the SWT API on this Control. menu = getMenu(); } return menu; } COM: <s> returns the popup menu to be used on a given component </s>
funcom_train/13596948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnEditPhoneme() { if (btnEditPhoneme == null) { btnEditPhoneme = new JButton(); btnEditPhoneme.setText(Messages.getString("GeneralUI.ButtonEdit")); // Generated // //$NON-NLS-1$ btnEditPhoneme .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { editPhoneme(); } }); } return btnEditPhoneme; } COM: <s> this method initializes btn edit phoneme </s>
funcom_train/35606461
/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("[").append(this.getClass().getName()).append("]") .append("id=").append(getId()); return sb.toString(); } COM: <s> returns a multi line string with key value pairs </s>
funcom_train/32874450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { if (webServerThread != null) { synchronized (threads) { while (!threads.isEmpty()) { ((Worker) threads.elementAt(0)).stop(); threads.removeElementAt(0); } try { ss.close(); } catch (IOException e) { Logger.warning("WebServer: ServerSocket was already closed!?!", e); } } webServerThread = null; } } COM: <s> passivates web server </s>
funcom_train/29869957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displaySearchResults(NoteList r) { results = r; String[] data = {"no results found"}; if ((results!=null)&&(results.getNumNotes()>0)) { data= new String[results.getNumNotes()]; for (int i=0;i<results.getNumNotes();i++) data[i] = results.getTitle(i) + " : " + results.getFirstLine(i); } getJSearchResultList().setListData(data); } COM: <s> displays the specified notelist as the search results </s>
funcom_train/3329344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createToJavaObjectCode(String variableName) { if (SourceGenerator.usePrimitiveWrapper()) return super.createToJavaObjectCode(variableName); else { StringBuffer sb = new StringBuffer("new Double("); sb.append(variableName); sb.append(")"); return sb.toString(); } } //-- toJavaObject COM: <s> returns the string necessary to convert an instance of this xstype </s>
funcom_train/38542730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFloat(int parameterIndex, float x) throws SQLException { try { ((PreparedStatement) this.realStatement) .setFloat(parameterIndex, x); if (parameterIndex <= this.currentParams.length) { this.currentParams[parameterIndex - 1] = new Double(x); } } catch (SQLException e) { manageException(e); throw generateException(e); } } COM: <s> sets the designated parameter to the given java code float code </s>
funcom_train/1116090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getDoneDelButton() { if (doneDelButton == null) { doneDelButton = new JButton(); ResourceHelper.setText(doneDelButton, "Done_(Delete)"); doneDelButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { dtcommon(true); } }); doneDelButton.setIcon(new ImageIcon(getClass().getResource( "/resource/Delete16.gif"))); } return doneDelButton; } COM: <s> this method initializes done del button </s>
funcom_train/28278425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Calendar setScheduledEndOfDay(Calendar calendar) { // Calendar now = Calendar.getInstance(); // if (now.get(Calendar.HOUR_OF_DAY) >= scheduledEndHour) { // setSecheduledIn(calendar, 1); // } calendar.set(Calendar.HOUR_OF_DAY, scheduledEndHour); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar; } COM: <s> will schedule for today if past work days end </s>
funcom_train/13345602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServiceHandler createServiceHandler(String name){ if(name == null) return null; if(InitializationService.SERVICE_NAME.equals(name)){ return initService; }else if (GafDbOperationsService.SERVICE_NAME.equals(name)){ return new GafDbOperationsService(); }else if (GoldDbOperationsService.SERVICE_NAME.equals(name)){ return new GoldDbOperationsService(); }else if(ReasoningService.SERVICE_NAME.equals(name)){ return reasoningService; }else if(PhyloTreeLoaderService.SERVICE_NAME.equals(name)){ return new PhyloTreeLoaderService(); }else if(LoginService.SERVICE_NAME.equals(name)){ return new LoginService(); } return null; } COM: <s> this method return a service object </s>
funcom_train/3771775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Date parseDate(String dateValue) { // TODO: move to the common util package related to http. Date date = null; for (int i = 0; (date == null) && (i < formats.length); i++) { try { synchronized (formats[i]) { date = formats[i].parse(dateValue); } } catch (ParseException e) { } } return date; } COM: <s> parse the code java </s>
funcom_train/32305748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Edge remove() { assert this.next.length == 1; assert this.prev.length == 1; this.removeHandlers(this.handlers()); Edge in = this.prev[0], out = this.next[0]; Edge result = addEdge((Quad)in.from(), in.which_succ(), (Quad)out.to(), out.which_pred()); this.prev[0] = this.next[0] = null; return result; } COM: <s> remove this quad from the graph </s>
funcom_train/5725027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof SystemStatisticInfo)) { return false; } final SystemStatisticInfo that = (SystemStatisticInfo) object; if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) { return false; } return true; } COM: <s> returns code true code if the argument is an system statistic info </s>
funcom_train/26510602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int distance(Rectangle r1, Rectangle r2) { return Math.max(Math.max(r2.x-r1.x-r1.width, r1.x-r2.x-r2.width ), Math.max(r2.y-r1.y-r1.height, r1.y-r2.y-r2.height)); } COM: <s> computes the distance between two rectangles </s>
funcom_train/10778099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tearDown() throws Exception { super.tearDown(); if (emf == null) return; try { clear(emf); } catch (Exception e) { // if a test failed, swallow any exceptions that happen // during tear-down, as these just mask the original problem. if (testResult.wasSuccessful()) throw e; } finally { closeEMF(emf); emf = null; } } COM: <s> closes the entity manager factory </s>
funcom_train/3277678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D) g; g2.setStroke(stroke); if (selected) { g2.setColor(parentView.getSelectedEffectColor()); if ( gripper != null ) { g2.fill(gripper); } } else { g2.setColor(parentView.getEffectFGColor()); } g2.draw(line); g2.fill(pointer); } COM: <s> paints full effect component </s>