__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/12193921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object createInstance(Object[] arguments) { if (null != this.initializationException) { throw this.initializationException; } try { return this.constructor.newInstance(arguments); } catch (Exception e) { throw new UndeclaredThrowableException(e, EXCEPTION_LOCALIZER.format( "failed-to-create-class", constructor.getName())); } } COM: <s> create an instance of the class using the specified parameters to the </s>
funcom_train/5242900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getPortLabel() { if (portLabel == null) { portLabel = new JLabel(); portLabel.setText("Port:"); portLabel.setSize(40, 20); portLabel.setLocation(160, LobbyPanel.PANEL_HIEGHT - 20); portLabel.setForeground(GUIConstants.WHITE); portLabel.setHorizontalAlignment(SwingConstants.RIGHT); } return portLabel; } COM: <s> this method initializes port label </s>
funcom_train/40942843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void logout() throws AxisFault { // first, we need to logout the previous session OMElement logoutMethod = callFactory.createLogoutCall(sessionId); OMElement logoutResult = sender.sendReceive(logoutMethod); Boolean logoutSuccess = Boolean.parseBoolean(logoutResult .getFirstChildWithName(LOGOUT_RETURN).getText()); if (!logoutSuccess) { throw new RuntimeException("Error logging out"); } sessionId = null; } COM: <s> logout from service throws logout exception if failed </s>
funcom_train/24379340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTypeAsXML(ItemBodyType type) { String sXML=""; if (type!=null){ QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "itemBody"); JAXBElement<ItemBodyType> jaxbe = new JAXBElement<ItemBodyType>(qname, ItemBodyType.class, type); sXML = getXML(jaxbe); } return sXML; } COM: <s> gets the item body type as an xml string </s>
funcom_train/8008348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addActionEntry(String entryName, String actionName, String actionEntry) { String key = entryName + "-+-" + actionName; _actionMap.put(key, actionEntry); String allEntries = (String) _actionMap.get(entryName); if (allEntries == null) allEntries = ""; String lookup = actionName + "|"; if (allEntries.indexOf(lookup) == -1) { allEntries += lookup; _actionMap.put(entryName, allEntries); } } COM: <s> adds an action to a site map entry </s>
funcom_train/51152381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setStyle(Graphics g, String content, String styleName) { if (styleName.compareTo(currentStyleName) != 0) { currentStyle = XProjectManager.getStyleManager() .getStyle(styleName); currentStyleName = styleName; applyStyle(g); } renderText(g, content); } COM: <s> changes the current style </s>
funcom_train/31337127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getLastVisibleNews() { Item lastVisibleNews = null; synchronized (fLock) { for (int i = 0; i < fItemList.size(); i++) { Item item = fItemList.get(i); if (item instanceof Group) continue; if (isNewsVisible(item.getId())) lastVisibleNews = item; else break; } } return lastVisibleNews != null ? lastVisibleNews.getId() : -1; } COM: <s> returns the last news that is visible or code 1 code if none </s>
funcom_train/17007490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReceiveInOrder(int ordTemplateId) throws ServiceException { if (templateId != 0) { if (templateId != ordTemplateId) { throw new ServiceException(moduleName + "Specified templateId [" + ordTemplateId + "] different from previously " + "specified templateId of " + templateId); } receiveInOrder = true; } templateId = ordTemplateId; receiveInOrder = true; } COM: <s> enable ordered delivery of events corresponding to this template </s>
funcom_train/2883772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getStub() throws BindException { if (startTime == -1) { startTime = System.currentTimeMillis(); } Iterator<String> iter = hosts.iterator(); while (iter.hasNext()) { try { Object stub = getStub(iter.next()); startTime = -1; return stub; } catch (Exception e) { // drop the exception - just failed to bind } } throw new BindException("Failed to bind to any host "); } COM: <s> get the stub by trying an sf resolve of the reference on </s>
funcom_train/43245354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNOKOnePhoneNumber() { System.out.println("getNOKOnePhoneNumber"); EmergencyContactObject instance = new EmergencyContactObject(); String expResult = ""; String result = instance.getNOKOnePhoneNumber(); 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 nokone phone number method of class org </s>
funcom_train/46654620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showTestsVoted() { // Tests voted if (alias.equalsIgnoreCase(Global.currentUser.getAlias())) { noElementString = Global.constantsTest.noTestsVotedByMe(); } else { noElementString = Global.constantsTest.noTestsVotedByUser(alias); } searchOptions = new SearchOptions(); searchOptions.setTestautogenerated(0); searchOptions.setTestexam(1); searchOptions.setTestnormal(1); searchOptions.setQuestionsindividual(0); searchOptions.setVoter(alias); content.add(new TestsPaging(searchOptions, noElementString)); } COM: <s> show tests voted </s>
funcom_train/11728200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJCRSQL2() throws RepositoryException { String stmt = "SELECT * FROM [" + testNodeType + "]"; Query q = session.getWorkspace().getQueryManager().createQuery(stmt, Query.JCR_SQL2); assertEquals("Query returns wrong language.", Query.JCR_SQL2, q.getLanguage()); } COM: <s> tests if a jcr sql2 query returns </s>
funcom_train/33731170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Point touchPadCornerToCenter(Point touchPadCorner) { double x = touchPadCorner.getX() - (TP_VMAX - TP_VMIN) / 2; double y = touchPadCorner.getY() - (TP_HMAX - TP_HMIN) / 2; return new Point((int) x, (int) y); } COM: <s> translate the touch pad points with origin at the top left corner to </s>
funcom_train/7618084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPixel(int x, int y, int color) { checkRecycled("Can't call setPixel() on a recycled bitmap"); if (!isMutable()) { throw new IllegalStateException(); } checkPixelAccess(x, y); nativeSetPixel(mNativeBitmap, x, y, color); } COM: <s> write the specified </s>
funcom_train/5693776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int get(int from, int to) { if(bits == null) throw new IllegalStateException(); int dec = 0; int pow = 1; for(int i = from; i <= to; i++) { dec += bits[i] * pow; pow *= 2; } return dec; } COM: <s> extracts a series of bits as an int </s>
funcom_train/28362975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int row, int column) { ChannelSnapshot channelSnapshot = _filteredChannelSnapshots[row]; switch(column) { case SIGNAL_COLUMN: return channelSnapshot.getPV(); case TIMESTAMP_COLUMN: return channelSnapshot.getTimestamp(); case VALUE_COLUMN: double[] arrayValue = channelSnapshot.getValue(); if ( arrayValue.length == 1 ) { return new Double(arrayValue[0]); } else { return ArrayTool.asString(arrayValue); } case STATUS_COLUMN: return new Integer( channelSnapshot.getStatus() ); case SEVERITY_COLUMN: return new Integer( channelSnapshot.getSeverity() ); default: return ""; } } COM: <s> get the value of the item to display in the specified table cell </s>
funcom_train/8039526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testISO8601Format() { DateFormat format = new ISO8601DateFormat(); Calendar calendar = Calendar.getInstance(); calendar.clear(); calendar.set(1970, 0, 1, 0, 0, 0); String actual = format.format(calendar.getTime()); assertEquals("1970-01-01 00:00:00,000", actual); } COM: <s> tests is08601 date format class </s>
funcom_train/31825522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawPoint (int x, int y) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (data.gdipGraphics != 0) { initGdip(true, false); int brush = Gdip.Pen_GetBrush(data.gdipPen); Gdip.Graphics_FillRectangle(data.gdipGraphics, brush, x, y, 1, 1); destroyGdipBrush(brush); return; } OS.SetPixel (handle, x, y, OS.GetTextColor (handle)); } COM: <s> draws a pixel using the foreground color at the specified </s>
funcom_train/7336413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Observable o, Object arg) { if (o instanceof PluginContainer) { if (arg == null) { // no argument means release all actionMap = null; actionsGuest = null; actionsEditors = null; actionsAdmins = null; log.info("All plugin references released."); } else { PluginEvent event = (PluginEvent) arg; log.debug("Update received: isregister=" + event.getIsRegister() + ", plugin=" + event.getPlugin().getClass().getName()); reloadActionMap(); } } } COM: <s> this method is called by the plugin container on register unregister of a </s>
funcom_train/5348532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { try { _ss.close(); } catch (IOException e) { } for(Iterator i = _sockets.iterator(); i.hasNext(); ) { try { Socket s = (Socket)i.next(); if(s != null ) s.close(); } catch (IOException e) {} } } COM: <s> frees any resources </s>
funcom_train/44167674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getProduction() { ProductionInfo info = getProductionInfo(); if (info == null) return 0; List<AbstractGoods> production = info.getProduction(); if (production == null || production.isEmpty()) { return 0; } else { return production.get(0).getAmount(); } } COM: <s> returns the actual production of this building </s>
funcom_train/13274877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPreviousPageEnabled(boolean previousPageEnabled) { if (previousPageEnabled != this.previousPageEnabled) { this.previousPageEnabled = previousPageEnabled; this.propertyChangeSupport.firePropertyChange(Property.PREVIOUS_PAGE_ENABLED.name(), !previousPageEnabled, previousPageEnabled); } } COM: <s> sets whether a previous page is available or not </s>
funcom_train/9689238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BinPackage getSuperPackage() { BinPackage result = null; String qualifiedName = getQualifiedName(); int index = qualifiedName.lastIndexOf("."); if (index != -1) { result = getProject().getPackageForName(qualifiedName.substring(0, index)); } return result; } COM: <s> returns package for which this is direct subpackage based on qualified name </s>
funcom_train/4272537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeStyle(ValueChangeEvent e) throws java.io.IOException{ tempStyle = (String)e.getNewValue(); if (!currentStyle.equalsIgnoreCase(tempStyle)) { currentStyle = tempStyle; FacesContext.getCurrentInstance().getExternalContext().redirect("/banco-war/index.jsp"); } } COM: <s> applies temp style to to the current style and image directory and </s>
funcom_train/25648728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateItemStatus(String id, int activeRepetition, int passed, int failed, int skipped) { int[] results = new int[]{passed, failed, skipped}; for(TestSetItem item : items) { if(item.getId().equalsIgnoreCase(id) && activeRepetition > 0) { item.addRepetitionResults(activeRepetition, results); } } } COM: <s> updates testsetitems results </s>
funcom_train/2447825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitAllCheckBoxNodes(CheckBoxNodeVisitor v) { if (v.isDone()) { return; } for (Object node : new BreadthFirstTraverser(tree.getModel())) { if (node instanceof CheckBoxNode) { v.visit((CheckBoxNode) node); if (v.isDone()) { return; } } } } COM: <s> visits all check box nodes in this tree in breadth first order </s>
funcom_train/43220035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText(Object arg0) { /* Get the name of the file */ String text = ((IFile)arg0).getName(); /* If name is blank, get the path */ if(text.length() == 0) { text = ((IFile)arg0).getPath(); } /* Check the case settings before returning the text */ return text; } COM: <s> gets the text to display for a node in the tree </s>
funcom_train/2855252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object pop () { Object o = null; if (top != null) { if (top == base) base = null; o = top.value; top.value = null; // do our bit for garbage collection top = top.next; // element below in the stack; may be null count--; } return o; } COM: <s> pop the object at the top of the stack if any </s>
funcom_train/36108863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getValueIfAny(String row, int columnIndex, String rowId, int rowIndex) throws ExternalException { if (rowId == null || rowId.equals("")) { if (lineCounter == rowIndex) return getValueAt(row, columnIndex); } else { if (isRowContainValue(row, rowId, rowIndex)) return getValueAt(row, columnIndex); } return null; } COM: <s> getting value from current row if this row contains needed value </s>
funcom_train/45504769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void computeAndAddStaticPotentials( EvacuationCellularAutomaton convertedCA ) { //calculate and defineByPoints staticPotentials to CA PotentialController pc = new SPPotentialController( convertedCA ); for( ArrayList<ExitCell> cells : convertedCA.clusterExitCells() ) { StaticPotential sp = pc.createStaticPotential( cells ); convertedCA.getPotentialManager().addStaticPotential( sp ); // Bestimme die angrenzenden Save-Cells saveCellSearch( cells, sp ); } pc.generateSafePotential(); } COM: <s> private method that calculates the static potentials for a </s>
funcom_train/11016557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(RecordStream rs) { List temp = _mergedRegions; while (rs.peekNextClass() == MergeCellsRecord.class) { MergeCellsRecord mcr = (MergeCellsRecord) rs.getNext(); int nRegions = mcr.getNumAreas(); for (int i = 0; i < nRegions; i++) { CellRangeAddress cra = mcr.getAreaAt(i); temp.add(cra); } } } COM: <s> reads zero or more consecutive </s>
funcom_train/7280465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStringQueryKeyConstructor() throws InvalidSecurityTokenException { AddressSecurityToken key = new AddressSecurityToken(GUID.makeGuid(), macManager); QueryRequest qr = queryRequestFactory.createQueryKeyQuery("test", key); runStandardChecks(qr, false, Collections.EMPTY_SET, key); assertEquals("unexpected query", "test", qr.getQuery()); assertNull("unexpected xml query", qr.getRichQuery()); } COM: <s> tests constructor that only takes a string and a query key </s>
funcom_train/18112111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRecordOfPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Record_RecordOf_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Record_RecordOf_feature", "_UI_Record_type"), BioDBPackage.Literals.RECORD__RECORD_OF, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the record of feature </s>
funcom_train/47017676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getSystem() { if (system == null) {//GEN-END:|132-getter|0|132-preInit // write pre-init user code here system = new StringItem(getLocalizedString("System"), System.getProperty("microedition.platform"));//GEN-LINE:|132-getter|1|132-postInit // write post-init user code here }//GEN-BEGIN:|132-getter|2| return system; } COM: <s> returns an initiliazed instance of system component </s>
funcom_train/49351155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getServiceName(int pServiceId) throws BasicException { String serviceName = null; switch (pServiceId) { case JDBC_POOL: serviceName = JDBC_POOL_JNDINAME; break; default: log.error("PoolJDBCServiceLocator, method getServiceName: Error resolving service name"); throw new BasicException("Error resolving service name", "errorResolvingServiceName"); } return serviceName; } COM: <s> return the jndi address for various services located in this model </s>
funcom_train/12655331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SpanningJTable getJTable() { if (jTable == null) { jTable = new SpanningJTable(); jTable.setCellSelectionEnabled(true); jTable.setRowSelectionAllowed(false); jTable.setIntercellSpacing(new Dimension(1, 1)); jTable.setRowHeight(20); jTable.setColumnSelectionAllowed(false); jTable.setRowMargin(1); jTable.getColumnModel().setColumnMargin(1); } return jTable; } COM: <s> this method initializes j table </s>
funcom_train/37011225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttachmentCacheDir(File attachmentCacheDir) { Assert.notNull(attachmentCacheDir, "'attachmentCacheDir' must not be null"); Assert.isTrue(attachmentCacheDir.isDirectory(), "'attachmentCacheDir' must be a directory"); Assert.isTrue(attachmentCacheDir.canWrite(), "'attachmentCacheDir' must be writable"); this.attachmentCacheDir = attachmentCacheDir; } COM: <s> sets the directory where soap attachments will be stored </s>
funcom_train/39212867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void minimize() { Composite com = view.getParent().getParent().getParent().getParent(); if(com != null && com instanceof SashForm) { SashForm parent = (SashForm)com; parent.setWeights(new int[]{100,0}); parent.layout(); } } COM: <s> minimize the view </s>
funcom_train/43636619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(TreeSelectionEvent e) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent(); if (node == null) return; Object nodeInfo = node.getUserObject(); if (node.isLeaf()) { StoryInfo story = (StoryInfo)nodeInfo; displayURL(story.url); } } COM: <s> required by tree selection listener interface </s>
funcom_train/18058837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFieldNumber(UID objectId, String fieldName) throws RemoteException { synchronized(SO) { SO.rmcCount++; CategorySource cat = (CategorySource) SO.objectMap.get(objectId); try { return cat.getFieldNumber(fieldName); } catch(PerformanceException e) { throw new RemoteException(e.getMessage()); } } } COM: <s> return the field number given the field name </s>
funcom_train/45761037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePropertyChangeListener(java.beans.PropertyChangeListener listener) { if (--propertyChangeListenerCount == 0) { Window.this.removeComponentListener(accessibleComponentHandler); accessibleComponentHandler = null; Window.this.removeContainerListener(accessibleContainerHandler); accessibleContainerHandler = null; } super.removePropertyChangeListener(listener); } COM: <s> remove a property change listener from the listener list </s>
funcom_train/44559775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEditingAllowed(DcField field) { if (isAdmin()) return true; ModulePermission mp = modulePermissions.get(Integer.valueOf(field.getModule())); Permission permission = mp != null ? mp.getPermision(field.getIndex()) : null; return permission == null ? false : permission.isEditingAllowed(); } COM: <s> indicates if the user is allowed to edit the specified field </s>
funcom_train/48612229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addListBoxChangeHandlers() { display.getSelectedClient().addChangeHandler(new ChangeHandler() { @Override public void onChange(ChangeEvent event) { // when client is changed // refresh the divisions and location for that client String clientId = getSelectedClientId(); display.getAddDivisionClientLabel().setText(clientId); display.getAddLocationClientLabel().setText(clientId); refreshDivisionsDropDown(clientId); } }); } COM: <s> add the change handlers for the drop down list boxes </s>
funcom_train/25709581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verifies() { Digest ctx = SHA1.getInstance(); hashUpdate(ctx, new String[] {"Signature"}); BigInteger m = Util.byteArrayToMPI(ctx.digest()); return DSA.verify(getPublicKey(), getSignature(), m); } COM: <s> checks the signature using the public key </s>
funcom_train/15695082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reallyquit() { Object[] options = { "Quit", "BACK" }; sound.loopMp3("sounds/boo.wav", false); if (JOptionPane.showOptionDialog(gui, "Really Quit?", "Question", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]) == 0) { System.exit(0); } sound.stop(); } COM: <s> ask the user if he wants to exit the programm </s>
funcom_train/6347461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testByte() throws IOException { PropertyStorageFactory f = PropertyStorageFactoryCreator.createXMLPropertyStorageFactory(); PropertyStorageExtended store = f.createPropertyStorage(TESTFILE); store.storeByte("bytekey", TEST_BYTES[0]); assertEquals(store.getByte("bytekey"), TEST_BYTES[0]); } COM: <s> tests storing and loading of byte values </s>
funcom_train/42364632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void avoidDefeat() { Player p = new DummyPlayer(oppositePlayerSymbol,board); Memento actualState = board.getMemento(); for (int i = 0; i < IBoard.COLUMN_COUNT; i++) { try { board.insertCoin(p, i); if (board.isWinner(p)){ evaluatedColumn = i; board.setMemento(actualState); System.out.println("Avoid defeat, insert at col " + i); return; } else { board.setMemento(actualState); } } catch (GameException e) { e.printStackTrace(); } } } COM: <s> method that looks for a possibility in which the opposite player can win </s>
funcom_train/28296160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXMLFragment(String iXML) { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - setXMLFragment"); System.out.println(" ::--> " + iXML); } mXML = iXML; if (_Debug) { System.out.println(" :: SeqActivity --> END - setXMLFragment"); } } COM: <s> set this activitys xml fragment of sequencing information </s>
funcom_train/3435167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ClientRequestInfoImpl peekClientRequestInfoImplStack() { RequestInfoStack infoStack = (RequestInfoStack)threadLocalClientRequestInfoStack.get(); ClientRequestInfoImpl info = null; if( !infoStack.empty() ) { info = (ClientRequestInfoImpl)infoStack.peek(); } else { throw wrapper.clientInfoStackNull() ; } return info; } COM: <s> convenience method to get the client request info impl object off the </s>
funcom_train/19275159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initializeJavaClassMap(Map<String, Class<? extends DataObjectView>> name2javaClass) { name2javaClass.put(DataObjectView.CLASS_TITLE, DataObjectView.class); name2javaClass.put(DataReflectionObject.CLASS_TITLE, DataReflectionObject.class); name2javaClass.put(DataClass.CLASS_TITLE, DataClass.class); name2javaClass.put(DataField.CLASS_TITLE, DataField.class); } COM: <s> this method initializes the default </s>
funcom_train/41241970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int inputChoice(int limit){ while(true){ IO.prompt("Which option would you like to choose (number)"); int choice = -1; try { choice = Integer.parseInt(IO.br.readLine()); } catch (NumberFormatException e) { IO.error("Invalid choice. Please try again."); continue; } catch (IOException e) { e.printStackTrace(); } if(choice > limit || choice < 0){ IO.error("Invalid choice. Please try again."); continue; }else{ return choice; } } } COM: <s> gets input from user as choice for multiple choice questions </s>
funcom_train/20368770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void listChanged(ListEvent<E> listChanges) { while(listChanges.next()) { int index = listChanges.getIndex(); int type = listChanges.getType(); if (type == ListEvent.INSERT || type == ListEvent.UPDATE) { process(listChanges.getSourceList(), listChanges.getSourceList().get(index)); } } } COM: <s> when the source is changed process all updated elements </s>
funcom_train/4577428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _test4() throws Exception { final Lucy lucy = getLucy(); BeanDesc<Hogemoge> bd = new BeanDescImpl<Hogemoge>(Hogemoge.class); MethodDesc methodDesc = bd.getMethodDesc("inject4"); Config config = methodDesc.findConfig(PropertiesInject.class); PropertiesInjectBehavior behavior = new PropertiesInjectBehavior(bd, methodDesc, config); Hogemoge hogemoge = new Hogemoge(); behavior.execute(hogemoge, lucy); assertNotNull(hogemoge.getProp()); assertEquals("AAA", hogemoge.getProp().getProperty("aaa")); } COM: <s> todo something wrong with maven2 </s>
funcom_train/49200417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCssPathPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SlideTemplate_cssPath_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SlideTemplate_cssPath_feature", "_UI_SlideTemplate_type"), TransformedPackage.Literals.SLIDE_TEMPLATE__CSS_PATH, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the css path feature </s>
funcom_train/22048446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JMADesktop getDesktop() { if ((currentDesktop == null) && (BirMailClient.getApp() != null) && (BirMailClient.getApp().getMainFrame() != null)) { return BirMailClient.getApp().getMainFrame().getDesktopPane(); } return currentDesktop; } COM: <s> gets the desktop area for windows to be added to from this menu </s>
funcom_train/5895910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSizedByContent() { String s = (String) getAttribute("sized-by-content"); //backward-compatibility if (s == null) { s = (String) getAttribute("fixed-layout"); //backward-compatibility return s != null ? !"true".equalsIgnoreCase(s) : _sizedByContent; } else return "true".equalsIgnoreCase(s); } COM: <s> returns whether sizing grid listbox tree column width by its content </s>
funcom_train/46759024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InterfaceTransactionModel getInterfaceTransaction(final long interfaceTransactionId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return InterfacesData.getInterfaceTransaction(interfaceTransactionId, chain, call); }}; return (InterfaceTransactionModel) call(method, call); } COM: <s> same transaction return the single interface transaction model for the primary key </s>
funcom_train/31825889
/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 == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (path.handle == 0) 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/19794416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaskMail(int rows, JTable tbListMail,int Mask) throws SQLException{ MailStructureDTO mail = ((TableMailDataDTO) tbListMail.getModel()).getRealData().get(rows); int IDMail = mail.getIdMail(); _mailTmp.setMaskMail(IDMail, Mask); _model.setTypeMail(Mask, rows); } COM: <s> set mark for mail </s>
funcom_train/19433025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init() { final QueryProcessor processor = this; Runnable getter = new Runnable() { public void run() { try { processor.setCacheResult(myCache.get(myQuery)); } catch (CacheException e) { processor.declareException("Problem getting data from cache", e); } } }; thread(getter); } COM: <s> performs startup tasks called by constructor </s>
funcom_train/50428657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEvidenceTable(Hashtable tbl) { for (Enumeration e = tbl.keys(); e.hasMoreElements(); ) { String name = (String) e.nextElement(); BBNNode n = (BBNNode) getNode(name); n.setEvidenceValue(tbl.get(name)); } } COM: <s> set the evidence values based on the table </s>
funcom_train/10671067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Result testUppercaseProperty() { try { int i = findProperty("URL"); assertEquals(propertyDescriptors[i].getReadMethod().getName(), "getURL"); return passed(); } catch (Exception e) { e.printStackTrace(); return failed(e.getMessage()); } } COM: <s> verify that introspector finds property which name consists of </s>
funcom_train/40627403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeUser(UserInfo aUserInfo) { myDomainUserMapping.removeUser(aUserInfo); if(myUserManager.removeUser(aUserInfo.getUserId()) != null) { LOG.debug("User \"" + aUserInfo + "\" removed."); } } COM: <s> removes a user from all domains </s>
funcom_train/43245744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsUtilizationReviewRequired() { System.out.println("isUtilizationReviewRequired"); InsuranceDG1Object instance = new InsuranceDG1Object(); boolean expResult = true; boolean result = instance.isUtilizationReviewRequired(); 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 is utilization review required method of class org </s>
funcom_train/3409262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof X509CRL)) { return false; } try { byte[] thisCRL = X509CRLImpl.getEncodedInternal(this); byte[] otherCRL = X509CRLImpl.getEncodedInternal((X509CRL)other); return Arrays.equals(thisCRL, otherCRL); } catch (CRLException e) { return false; } } COM: <s> compares this crl for equality with the given </s>
funcom_train/39889069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommandExit() { if (commandExit == null) {//GEN-END:|18-getter|0|18-preInit // Insert pre-init code here commandExit = new Command("\u00C7IKI\u015E", Command.EXIT, 1);//GEN-LINE:|18-getter|1|18-postInit // Insert post-init code here }//GEN-BEGIN:|18-getter|2| return commandExit; } COM: <s> returns an initiliazed instance of command exit component </s>
funcom_train/26665830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getZoom() { if( hHeight < 0.0001 ) throw new IllegalArgumentException("Region height must be larger than 0.0001."); double zoom = Math.log( hHeight * 2 ) / LOG_ZOOM_EXPONENT; log.info("zoomPan getZoom hHeight="+hHeight+" dbl zoom="+zoom); int izoom = (int) Math.round(zoom); if( izoom < 0 ) return 0; if( izoom >= 250 ) return 250; return izoom; } COM: <s> gets the zoom level as computed from the region </s>
funcom_train/34498597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getTextInsets() { Rectangle place = new Rectangle(textInset, textInset, 2*textInset, 2*textInset); int midle_height = wrapper.getLineHeight() * wrapper.getLineCount(); place.x += midle_height / 4; place.width += midle_height / 2; return place; } COM: <s> get text place </s>
funcom_train/29918240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reInitToken() throws TokenException { PKCS11Factory.getPKCS11Module().finalize(null); PKCS11Factory.getPKCS11Module().initialize(null); tokens = new HashMap<String, Token>(); Slot[] slots = PKCS11Factory.getPKCS11Module().getSlotList(Module.SlotRequirement.ALL_SLOTS); Token token = null; for (Slot slot : slots) { if(slot.getSlotID() == slotId){ token = slot.getToken(); } } init(useVirtualSlots, token); } COM: <s> method used to reinitialize the token </s>
funcom_train/7511162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setTransactionMode(TestTransactionMode value) throws PersistentException { boolean res = this.setCommonParameterImpl(PARAM_TRANSACTION_MODE, this.getTransactionMode() .name(), value.name()); this.currentTransactionMode = value; return res; // if (res) { // //AppHelper.setDatabaseTransactionMode(value); // return true; // } else { // return false; // } } COM: <s> set new test transaction mode </s>
funcom_train/44865338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getDate() { Calendar cal = Calendar.getInstance(); cal.set(Calendar.MONTH, Integer.parseInt(m_month)); cal.set(Calendar.YEAR, Integer.parseInt(m_year)); cal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(m_day)); return cal.getTime(); } COM: <s> constructs a date from the string fields </s>
funcom_train/37833554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void tellAboutQuest() { final List<String> questTrigger = new LinkedList<String>(ConversationPhrases.QUEST_MESSAGES); final List<String> additionalTrigger = concreteQuest.getAdditionalTriggerPhraseForQuest(); if (additionalTrigger != null) { questTrigger.addAll(additionalTrigger); } concreteQuest.getNPC().add(ConversationStates.ATTENDING, questTrigger, new QuestNotStartedCondition(concreteQuest.getSlotName()), ConversationStates.QUEST_OFFERED, concreteQuest.respondToQuest(), null); } COM: <s> player asks about quest </s>
funcom_train/41516728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getToolTipText(MouseEvent e) { TreePath path; MibNode node; if (getRowForLocation(e.getX(), e.getY()) == -1) { return null; } path = getPathForLocation(e.getX(), e.getY()); node = (MibNode) path.getLastPathComponent(); return node.getToolTipText(); } COM: <s> returns the tool tip text for a specified mouse event </s>
funcom_train/8198802
/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 == this) { return true; } if (!(obj instanceof TimePeriod)) { return false; } TimePeriod that = (TimePeriod) obj; if (!this.start.equals(that.getStart())) { return false; } if (!this.end.equals(that.getEnd())) { return false; } return true; } COM: <s> tests this time period instance for equality with an arbitrary object </s>
funcom_train/44385404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HookTask createRuntimeHook(String mode) { HookTask result = new HookTask(); result.setProject(this.getProject()); result.setAction(HookTask.APPEND_LAST); result.setName(RUNTIME_HOOK); result.setTarget(HOOK_PREFIX + mode); if (switchAttribute != null) { result.setIf(switchAttribute); } return result; } COM: <s> create a hook declaration to add emma support </s>
funcom_train/44847089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mergeNotes(File file) throws SAXException, IOException { NoteXMLHandler handler = parse(file); Noteable[] notes = handler.getParsedNotes(); for (Noteable note : notes) { list.add(note); } // XXX: option to merge quicknotes y/n? StringBuffer b = new StringBuffer(getQuickNote()); b.append(handler.getQuickNote()); setQuickNote(b.toString()); setChanged(); notifyObservers(LIST_PARSED); } COM: <s> merges existing notes from a specified file to the current list </s>
funcom_train/44881298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File getDestinationFile(JavaClass javaClass) { String packagePath = getDestinationPackage(javaClass).replace('.', '/'); File dir = new File(getDestdirFile(), packagePath); String filename = getDestinationFilename(javaClass); return new File(dir, filename); } COM: <s> returns a file object representing the destination file represented </s>
funcom_train/22099428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValue() { String res; if (_bundle == null) { return "** No bundle for class " + _implClass + " **"; } res = _bundle.getString(_localeProp); if (res == null) { return "** Property [" + _localeProp + "] not found in bundle [" + _bundle.toString() + "]"; } return res; } COM: <s> returns the localized value of this enumeration </s>
funcom_train/21688885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hightSnippetNode() { DefaultMutableTreeNode snippetNode = (DefaultMutableTreeNode) rootNode.getChildAt(0).getChildAt(currentCodeSnippetIndex); TreePath path = new TreePath(snippetNode.getPath()); resultsTree.getSelectionModel().setSelectionPath(path); } COM: <s> hight snippet node </s>
funcom_train/29547324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getConceptResourceAnnotationsDirectoryName(String notebookUri, String conceptUri) { if(notebookUri!=null && conceptUri!=null) { String notebookNcName=Utils.getNcNameFromUri(notebookUri); String conceptFilename= notebooksDirectory+File.separator+ notebookNcName+File.separator+ NotebookCustodian.DIRECTORY_ANNOTATIONS+File.separator; return conceptFilename; } else { return null; } } COM: <s> get directory where to save load other annotations like jarnal </s>
funcom_train/17977944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean renameRobot(String name, String newName){ if(nameToIds.containsKey(newName))//already has the new name! return false; if(!nameToIds.containsKey(name)) return false; int id = nameToIds.get(name); int robotId = nameToRobotId.get(name); DynamicObject robot = idToDynamicObject.get(robotId); nameToIds.remove(name); nameToIds.put(newName, id); nameToRobotId.remove(name); nameToRobotId.put(newName, robotId); robot.name = newName; return true; } COM: <s> returns false if there is already an object with the same new name </s>
funcom_train/10858230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEdgeNGramTokenizer() throws Exception { Reader reader = new StringReader("test"); Map<String,String> args = new HashMap<String,String>(); EdgeNGramTokenizerFactory factory = new EdgeNGramTokenizerFactory(); factory.init(args); Tokenizer stream = factory.create(reader); assertTokenStreamContents(stream, new String[] { "t" }); } COM: <s> test edge ngram tokenizer factory </s>
funcom_train/19338484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeProgram (String nameFile) { if (nameFile != "") { initMediaSystem (nameFile); } else { MediaSystem.setDb (new DataBase ()); db = MediaSystem.getDb (); showCategories (db.getCategories ()); showItemsOfCategory (null); currentFile = ""; } } COM: <s> initialize the program </s>
funcom_train/39186092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getCValue(int value) { if (function==NONE) return value; if (function>=STRAIGHT_LINE && function<=GAMMA_VARIATE && coefficients!=null) return CurveFitter.f(function, coefficients, value); if (cTable==null) makeCTable(); if (cTable!=null && value>=0 && value<cTable.length) return cTable[value]; else return value; } COM: <s> converts a raw pixel value to a density calibrated value </s>
funcom_train/29723514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getJTextAreaServerOutput() { if (jTextAreaServerOutput == null) { jTextAreaServerOutput = new JTextArea(); jTextAreaServerOutput.setBackground(new Color(241, 243, 242)); jTextAreaServerOutput.setEditable(false); jTextAreaServerOutput.setText(""); } return jTextAreaServerOutput; } COM: <s> this method initializes j text area server output </s>
funcom_train/12146163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String loadDomainConfig( InputStream in ) throws IOException { StringBuffer sbuf = new StringBuffer(); InputStreamReader rin = new InputStreamReader( in ); char[] cbuf = new char[BUFFER_SIZE]; int iChars; while ( ( iChars = rin.read( cbuf, 0, cbuf.length ) ) != -1 ) { sbuf.append( cbuf, 0, iChars ); } rin.close(); return sbuf.toString(); } COM: <s> reads domain config file into string </s>
funcom_train/44842846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _processChunkFromRemoveExpiredStatements(String idList) throws SQLException { // the actual ID of the update will be added to UPDATE_TABLE later in _processChangedTriples RDBMS().executeUpdate( "UPDATE "+ TRIPLES_HIST_TABLE + " SET DiedAt = "+ (getStateUid()+1) + " WHERE id IN " + idList ); } COM: <s> it is invoked from super </s>
funcom_train/13304308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAdmissionRequestPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AdmissionResponse_admissionRequest_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AdmissionResponse_admissionRequest_feature", "_UI_AdmissionResponse_type"), NegotiationPackage.Literals.ADMISSION_RESPONSE__ADMISSION_REQUEST, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the admission request feature </s>
funcom_train/5304832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void group() { Object[] cells = currentGraph.jgraph.getSelectionCells(); if (!currentGraph.jgraph.isSelectionEmpty() && currentGraph.jgraph.getSelectionCells().length > 1) { DSIVertex group = new DSIVertex(null, null); ParentMap pm = new ParentMap(cells, group); currentGraph.currentLayoutCache.edit(null, null, pm, null); currentGraph.currentLayoutCache.insertGroup(group, cells); } } COM: <s> group more that one selected cell in a given graph </s>
funcom_train/9533491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanupTestFilesStructure() { testLoadFile.delete(); testPurgeFile.delete(); testLoadDirectory.delete(); File[] files = testArchiveDir.listFiles(); if (files != null) for (File file : files) { file.delete(); } testArchiveDir.delete(); } COM: <s> remove test directories after the tests are done </s>
funcom_train/2489341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getTargetDirectory() { if (targetDirectory == null) { String abspath0 = fileList.get(0).getAbsolutePath(); targetDirectory = Application.getController().askForTargetDirectory(new File(abspath0.substring(0, abspath0.length() - currentAlgorithm.getSuffix().length()))); } return targetDirectory; } COM: <s> call to get the directory the decrypted files should be stored in </s>
funcom_train/46477888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAccessRequiredFromPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Asset_AccessRequiredFrom_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Asset_AccessRequiredFrom_feature", "_UI_Asset_type"), SecurityContextPackage.Literals.ASSET__ACCESS_REQUIRED_FROM, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the access required from feature </s>
funcom_train/29038373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void valueChanged() { final boolean oldState = isValid; refreshValidState(); if (isValid != oldState) { fireStateChanged(IS_VALID, oldState, isValid); } if (isValid) { final int newValue = Integer.parseInt(textField.getText()); if (newValue != oldValue) { fireValueChanged(VALUE, oldValue, newValue); oldValue = Integer.parseInt(textField.getText()); } } } COM: <s> indicates that this field editors value has been modified </s>
funcom_train/8074224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int select() { int i; double r,partsum; partsum = 0; r = m_random.nextDouble() * m_sumFitness; for (i=0;i<m_popSize;i++) { partsum += m_population[i].getFitness(); if (partsum >= r) { break; } } return i; } COM: <s> selects a population member to be considered for crossover </s>
funcom_train/50504140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResourceEnvRef addResourceEnvReference(String name, String type) { if (getResourceEnvReference(name) != null) { throw new IllegalArgumentException("Invalid resource env reference, already existing."); } ResourceEnvRef ref = new ResourceEnvRef(name, type, this); resourceEnvReferences.add(ref); ref.addBeanListener(this); fireChildBeanAdded(ref); return ref; } COM: <s> adds a resource env reference to the </s>
funcom_train/41298785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void outputItemPrefixSubtree() { int flag; System.out.println("PREFIX SUBTREE FROM HEADER TABLE"); for(int index=1;index<headerTable.length;index++) { System.out.println("Header = " + reconvertItem(headerTable[index].itemName)); flag = outputItemPrefixTree(headerTable[index].nodeLink); if (flag!=1) System.out.println(); } System.out.println(); } COM: <s> commences process of outputting the prefix sub tree to the screen </s>
funcom_train/24590977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTotalTimeDoneTextField() { if (jTotalTimeDoneTextField == null) { jTotalTimeDoneTextField = new JTextField(); jTotalTimeDoneTextField.setBounds(new Rectangle(280, 70, 100, 20)); jTotalTimeDoneTextField.setEditable(false); } return jTotalTimeDoneTextField; } COM: <s> this method initializes j total time done text field </s>
funcom_train/35005465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long createAccount(String username, String password, String server) { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_USERNAME, username); initialValues.put(KEY_PASSWORD, password); initialValues.put(KEY_SERVER, server); return mDb.insert(DATABASE_TABLE, null, initialValues); } COM: <s> create a new account using the user pass and server provided </s>
funcom_train/44575300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JmlSignalsClause defaultSignalsClause(TokenReference where) { // !FIXME! define a constant for "jml$e" JmlPredicate pred = new JmlPredicate(new JmlSpecExpression( new JBooleanLiteral(where, false))); AspectUtil.getInstance().appendDefaultSignalsClauseTokenRefereces(pred.getTokenReference().toString()); return new JmlSignalsClause(where, false, CStdType.Exception, "jml$e", pred, false); } COM: <s> returns a default signals clause for a normal specification </s>
funcom_train/7270386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void installResources() { GUIMediator.safeInvokeAndWait(new Runnable() { public void run() { //stopwatch.resetAndLog("wait for event queue"); ResourceManager.instance(); //stopwatch.resetAndLog("ResourceManager instance"); } }); //stopwatch.resetAndLog("come back from evt queue"); } COM: <s> sets up resource manager </s>