__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10875632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IndexWriterConfig setMaxBufferedDeleteTerms(int maxBufferedDeleteTerms) { if (maxBufferedDeleteTerms != DISABLE_AUTO_FLUSH && maxBufferedDeleteTerms < 1) throw new IllegalArgumentException( "maxBufferedDeleteTerms must at least be 1 when enabled"); this.maxBufferedDeleteTerms = maxBufferedDeleteTerms; return this; } COM: <s> determines the minimal number of delete terms required before the buffered </s>
funcom_train/12738292
/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 (object != null && object instanceof QName) { QName qname = (QName)object; if (uri == StringPool.EMPTY_STRING) { return rawname == qname.rawname; } return localpart == qname.localpart && uri == qname.uri; } return false; } COM: <s> returns true if the two objects are equal </s>
funcom_train/13275080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setYStart(Float yStart) { if (yStart != this.yStart) { Float oldYStart = this.yStart; this.yStart = yStart; this.propertyChangeSupport.firePropertyChange(Property.Y_START.name(), oldYStart, yStart); updateLength(); updateDistanceToEndPoint(); } } COM: <s> sets the edited ordinate of the start point </s>
funcom_train/8655842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean useIsSameNode(Node node) { if (node instanceof NodeImpl) { return false; } Document doc = node.getNodeType() == Node.DOCUMENT_NODE ? (Document) node : node.getOwnerDocument(); return (doc != null && doc.getImplementation().hasFeature("Core", "3.0")); } COM: <s> use is same node for testing node identity if the dom implementation </s>
funcom_train/12569249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText(Object element) { Locale defaultLocale = Locale.getDefault(); Locale.setDefault(Locale.ENGLISH); String string = ""; //$NON-NLS-1$ Locale locale = (Locale) element; if (this.fType == Constants.LANGUAGE_TYPE) { string = locale.getDisplayLanguage(); } else if (this.fType == Constants.COUNTRY_TYPE) { string = locale.getDisplayCountry(); } Locale.setDefault(defaultLocale); return string; } COM: <s> return the text for a given object displayed in the country or language </s>
funcom_train/16785502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel12() { if (jPanel12 == null) { jLabel10 = new JLabel(); jLabel10.setText("virtualhost: "); jLabel10.setForeground(Color.GRAY); jPanel12 = new JPanel(); jPanel12.setLayout(new BorderLayout()); jPanel12.add(jLabel10, BorderLayout.WEST); jPanel12.add(getJTextField5(), BorderLayout.CENTER); getJTextField5().setEnabled(false); } return jPanel12; } COM: <s> this method initializes j panel12 </s>
funcom_train/43827479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCodePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MLDeclaration_code_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MLDeclaration_code_feature", "_UI_MLDeclaration_type"), DeclarationPackage.Literals.ML_DECLARATION__CODE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the code feature </s>
funcom_train/13274826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIconYaw(float iconYaw) { if (iconYaw != this.iconYaw) { float oldIconYaw = this.iconYaw; this.iconYaw = iconYaw; this.propertyChangeSupport.firePropertyChange(Property.ICON_YAW.name(), oldIconYaw, iconYaw); } } COM: <s> sets the yaw angle of the piece icon </s>
funcom_train/34993558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle2D getVisibleBounds() { // final PBounds mb = getBounds(); final PBounds mb = getLayer().getFullBounds(); if (mb != null) { final PBounds vb = getCamera().getViewBounds(); Rectangle2D.intersect(vb, mb, vb); return vb; } return null; } COM: <s> bounds of the part of the visualization all of the nodes together that </s>
funcom_train/31723703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printLocations() { String locName; Vector locVec; double[] carr; Set locs = locations.keySet(); Iterator iter = locs.iterator(); if (locations.size() == 0) { System.out.println("No locations defined in room "+ roomName); } else { System.out.println("Defined locations in room "+ roomName +":"); System.out.println("Name\tIndex\tCoord"); while (iter.hasNext()) { locName = (String)iter.next(); printLocation(locName); } } } COM: <s> prints to stdout all the current locations </s>
funcom_train/49760461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel(boolean onlyEdit) { if (jPanel == null) { FlowLayout flowLayout = new FlowLayout(); flowLayout.setAlignment(java.awt.FlowLayout.RIGHT); jPanel = new JPanel(); jPanel.setLayout(flowLayout); jPanel.add(getJButtonRefs(), null); jPanel.add(getJButton2(), null); jPanel.add(getJButtonSair(), null); if (!onlyEdit) { } } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/44011679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetId() { System.out.println("setId"); String id = ""; BusinessObject instance = new BusinessObject(); instance.setId(id); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set id method of class edu </s>
funcom_train/18188333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSubmitted(FacesContext context, CommandLink commandLink) { String clientId = commandLink.getClientId(context); String hiddenField = clientId + SUFFIX_HIDDEN; String value = (String) context.getExternalContext() .getRequestParameterMap().get(hiddenField); if (value == null || value.equals("") || !value.equals(hiddenField)) return false; return true; } COM: <s> this method is used for checking whether </s>
funcom_train/3032788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel1() { if (jPanel1 == null) { FlowLayout flowLayout1 = new FlowLayout(); jPanel1 = new JPanel(); jPanel1.setLayout(flowLayout1); jPanel1.setPreferredSize(new java.awt.Dimension(250,180)); flowLayout1.setHgap(1); flowLayout1.setVgap(1); jPanel1.add(getJScrollPane(), null); jPanel1.add(getSelectAllButton(), null); jPanel1.add(getUploadButton(), null); } return jPanel1; } COM: <s> this method initializes j panel1 </s>
funcom_train/36004189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeEvent(Event event) { if (event != null) { Event toRemove = null; for(Event e:currentEvents) if(event.getEventCode().equals(e.getEventCode())) toRemove = e; currentEvents.remove(toRemove); changed(event); } } COM: <s> removes an event from the list of active events </s>
funcom_train/22845530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testXpath() throws IOException, HttpErrorPage { String src = "<html><title>The header</title><body>The body<br></body></html>"; StringWriter out = new StringWriter(); XpathRenderer tested = new XpathRenderer("/html:html/html:body"); tested.render(null, src, out); assertEquals( "<body xmlns=\"http://www.w3.org/1999/xhtml\">The body<br/></body>", out.toString()); } COM: <s> tests xpath expression evaluation </s>
funcom_train/16414257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean update(GhSong source) { boolean updated = super.update(source); if (this.noteCount != source.noteCount) { this.noteCount = source.noteCount; updated = true; } if (this.tierLevel != source.tierLevel) { this.tierLevel = source.tierLevel; updated = true; } if (this.tierOrder != source.tierOrder) { this.tierOrder = source.tierOrder; updated = true; } updated = setScoreAndCutoffs(source) || updated; return updated; } COM: <s> sets the note count base score and cutoffs of </s>
funcom_train/34501817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showItem (CTabItemSingleControl item) { checkWidget(); if (item == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (item.isShowing()) return; Point size = getSize(); int index = indexOf(item); if (size.x <= borderLeft + borderRight || index < firstIndex) { setFirstItem(index); } else { setLastIndex(index); } } COM: <s> shows the item </s>
funcom_train/24442608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MappingCell copy() { return new MappingCell(getId(),getMappingId(),getInputs(),getOutput(),getScore(),getFunctionID(),getAuthor(),getModificationDate(),getNotes()); } COM: <s> copies the mapping cell </s>
funcom_train/22131276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instruction read(int opcode, Input src, int ofs) throws IOException { switch (opcode) { case WIDE: return readWide(src, ofs); case TABLESWITCH: return readTableSwitch(src, ofs); case LOOKUPSWITCH: return readLookupSwitch(src, ofs); default: return readNormal(src, ofs); } } COM: <s> all opcodes except for tableswitch lookupswitch and wide are considered normal </s>
funcom_train/46056074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteUserData(Identity identity) { getConfigFile(identity.getName()).delete(); FileUtils.deleteDirsAndFiles(getUserHomePageDir(identity.getName()), true, true); Tracing.logDebug("Homepage-config file and homepage-dir deleted for identity=" + identity, this.getClass()); } COM: <s> delete home page config file of a certain user </s>
funcom_train/40762817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JavaStatementMeter measureJavaFile(IFile file) { // Compute number of tests and assertions to this file. ICompilationUnit cu = (ICompilationUnit) JavaCore.create(file); ASTParser parser = ASTParser.newParser(AST.JLS3); parser.setSource(cu); parser.setResolveBindings(true); ASTNode root = parser.createAST(null); JavaStatementMeter counter = new JavaStatementMeter(); root.accept(counter); return counter; } COM: <s> calculates java file unit test information </s>
funcom_train/4253555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MediaDescriptor getMediaDescriptor(String media_type) { for (int i=0; i<media.size(); i++) { MediaDescriptor md=(MediaDescriptor)media.elementAt(i); if (md.getMedia().getMedia().equals(media_type)) return md; } return null; } COM: <s> gets the first media descriptor of a particular media </s>
funcom_train/14640093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate(Collection projects) throws EmeraldjbException { // OK, all fkeys need validating and populating with correct // references based on the raw data they hold. Iterator iter = sections.iterator(); while (iter.hasNext()) { Section s = (Section)iter.next(); s.validate(projects); } } COM: <s> validate the projects eg that the fkeys match real tables </s>
funcom_train/28750431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaterialtypeid(Long newVal) { if ((newVal != null && this.materialtypeid != null && (newVal.compareTo(this.materialtypeid) == 0)) || (newVal == null && this.materialtypeid == null && materialtypeid_is_initialized)) { return; } this.materialtypeid = newVal; materialtypeid_is_modified = true; materialtypeid_is_initialized = true; } COM: <s> setter method for materialtypeid </s>
funcom_train/5080789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void layout() { int wHint = context.getRemainingLineWidth(); if (wHint == Integer.MAX_VALUE) wHint = -1; Dimension prefSize = getPreferredSize(wHint, -1); if (context.isCurrentLineOccupied() && prefSize.width > context.getRemainingLineWidth()) { context.endLine(); prefSize = getPreferredSize(context.getRemainingLineWidth(), -1); } box.setSize(prefSize); context.addToCurrentLine(box); } COM: <s> sizes the content box to be big enough to display all figures </s>
funcom_train/20978365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean accept(File f) { return (f.isDirectory() == false && ((themePackMode && f.getName().endsWith(".zip")) || (f.getName().endsWith("gtkrc") || f.getName() .endsWith("themerc")))); } COM: <s> check if a given file is a skin file </s>
funcom_train/40312326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTableName_InvalidColumn1() { try { ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry); resMetaData.getTableName(-1); fail("SQLException is expected."); } catch(SQLException e) { //ensure the SQLException is thrown by getTableName method. assertEquals("The sqlstate mismatches", "22003", e.getSQLState()); } } COM: <s> tests get table name with negative column index </s>
funcom_train/2292076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUserCreated() { String user = m_resource.getUserCreated().toString(); try { user = getCurrentOuRelativeName(CmsPrincipal.readPrincipalIncludingHistory( getCms(), m_resource.getUserCreated()).getName()); } catch (Throwable e) { LOG.error(e.getLocalizedMessage()); } return user; } COM: <s> returns the name of the user who created the given resource </s>
funcom_train/7686215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Uri save(String calendarName) { Long id = mCalendars.get(calendarName); if (null == id) { return null; } mVCalValues.put(Calendar.Events.CALENDAR_ID, id); return SqliteWrapper.insert(mContext, mResolver, Calendar.Events.CONTENT_URI, mVCalValues); } COM: <s> save the calendar data to local database </s>
funcom_train/41851975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLoginScreen() { RootPanel.get().clear(); MonitoriaServiceAsync.Util.getInstance().getLoggedUser( new AsyncCallback<UserTO>() { public void onFailure(Throwable arg0) { arg0.printStackTrace(); } public void onSuccess(UserTO loggedUser) { if(loggedUser == null){ addToViewport(new LoginScreen()); }else{ setHomeScreen(loggedUser); } } }); } COM: <s> shows log in screen when theres no logged user </s>
funcom_train/44011466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTransactionID() { System.out.println("setTransactionID"); String transactionID = ""; TransLineBO instance = new TransLineBO(); instance.setTransactionID(transactionID); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set transaction id method of class edu </s>
funcom_train/3918722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItemModelType(ItemModelType itemModelType) { _itemModelType = itemModelType; _settingFields = true; String s = itemModelType.getTitle(); _tfTitle.setText(s == null ? "" : s); _itemTreeViewer.setItemContainer(itemModelType.getItemContainer()); _settingFields = false; } COM: <s> set the item model type </s>
funcom_train/26213528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long length() throws IOException { LOG.trace("enter length()"); ByteArrayOutputStream overhead = new ByteArrayOutputStream(); sendStart(overhead); sendDispositionHeader(overhead); sendContentTypeHeader(overhead); sendTransferEncodingHeader(overhead); sendEndOfHeader(overhead); sendEnd(overhead); return overhead.size() + lengthOfData(); } COM: <s> return the full length of all the data </s>
funcom_train/26264970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addActions(String ... qualifiedActions) { for (String qualifiedAction: qualifiedActions) { if (Is.emptyString(qualifiedAction)) continue; MetaAction action = MetaControllers.getMetaAction(qualifiedAction); if (action.isHidden()) { action = action.cloneMetaAction(); action.setHidden(false); } getManager().addMetaAction(action); } } COM: <s> actions add added even if they are hidden </s>
funcom_train/18412525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrimaryKey getUserIDPrimaryKey (String inUserName) { PassPhrase passPhraseObject = null; try { if ((passPhraseObject = PassPhrase.findPassPhraseByUserName(inUserName)) != null) return passPhraseObject.getUserId(); else return null; } catch (BuildingServerException bse) { return null; } } COM: <s> returns the internal bodington user id for the specified user login id </s>
funcom_train/2770587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void warnOfContentChange() { IConsole[] consoles = ConsolePlugin.getDefault().getConsoleManager() .getConsoles(); for (IConsole iConsole : consoles) { if (iConsole instanceof VdmDebugConsole) { VdmDebugConsole vdmC = (VdmDebugConsole) iConsole; vdmC.activate(); } } // if (warn != null) { // ConsolePlugin.getDefault().getConsoleManager() // .warnOfContentChange(warn); // } } COM: <s> send notification of a change of content in this console </s>
funcom_train/22598316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeVertexColorTable(Collection<Vertex> vertices, PrintStream p){ for (Vertex vertex : vertices) { Color fColor = vertex.getFillColor(); p.println("\\definecolor{"+ vertex.toString()+"FILL}{rgb}{" +(fColor.getRed()/255.0)+"," +(fColor.getGreen()/255.0)+"," +(fColor.getBlue()/255.0)+"}"); Color cColor = vertex.getColor(); p.println("\\definecolor{"+ vertex.toString()+"COLOR}{rgb}{" +(cColor.getRed()/255.0)+"," +(cColor.getGreen()/255.0)+"," +(cColor.getBlue()/255.0)+"}"); } } COM: <s> private method to write the necessary color table for the vertices </s>
funcom_train/31739625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getWinnerOfLatestTrick() throws IncompleteTrickException { try { return getLatestTrick().getWinner(contract); } catch (FirstTrickException fte) { throw new IncompleteTrickException(); } catch (TrickException te) { // type muss hier immer TRICK_NOT_COMPLETE sein, weswegen die // Fallunterscheidung weggelassen wird. throw new IncompleteTrickException(); } } COM: <s> returns the winner of the latest trick according to the rules of </s>
funcom_train/51786056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(VictorAction action, Node body) { String nodeId=XmlUtils.getStringFromXPath(body,"node-id"); buildData(action,nodeId); // if the action is not a Reflect action, the template output must be set in the sitemap if(action instanceof ReflectAction) { ReflectAction reflectAction=(ReflectAction)action; reflectAction.setTemplate("get-dyn-tree-datasource"); reflectAction.setTemplateXSL("pass-thru"); } } COM: <s> request to update a part of the tree </s>
funcom_train/131057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetOdometry () { try { sendHeader (PLAYER_MSGTYPE_REQ, PLAYER_POSITION1D_REQ_RESET_ODOM, 0); os.flush (); } catch (IOException e) { throw new PlayerException ("[Position1D] : Couldn't request RESET_ODOM: " + e.toString(), e); } } COM: <s> request reply reset odometry </s>
funcom_train/8221451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cookie getCurrentCookie(String key) { try { _rwl.readLock().acquire(); try { int count = _store.getCookieCount(key); return _store.getCookieAt(key, count - 1); } finally { _rwl.readLock().release(); } } catch (InterruptedException ie) { _logger.severe("Interrupted! " + ie); return null; } } COM: <s> gets the current cookie </s>
funcom_train/29298455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupView() { QTableView table = new QTableView(); table.setModel(model); QItemSelectionModel selectionModel = new QItemSelectionModel(model); table.setSelectionModel(selectionModel); testWidget = new TestWidget(this); tabs = new QTabWidget(); tabs.addTab(table, tr("wordlist")); tabs.addTab(testWidget, tr("test")); setCentralWidget(tabs); } COM: <s> setup the main view </s>
funcom_train/34564985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String name(final Cmd cmd) throws QueryException { consumeWS(); final TokenBuilder tb = new TokenBuilder(); while(letterOrDigit(curr()) || curr('.') || curr('-')) tb.add(consume()); return finish(cmd, tb); } COM: <s> parses and returns a name </s>
funcom_train/38493952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showWelcome () { try { welcomeUserLabel = currentUser.getSubSection("dpass").getAttributeValue("username"); } catch (NullPointerException e) { welcomeUserLabel = "please select a user"; } welcomeWagonLabel.setText(MultiLingual.translateWord(pname, "Welcome to Copernicus") + ", " + MultiLingual.translateWord(pname, welcomeUserLabel) + "."); } COM: <s> shows updates the welcome notice </s>
funcom_train/18070044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRepositoryNameSpace(String newNamespaceQName) throws Exception { Session session = null; try{ session = repoManager.getRepository().login(getCredentials()); // Session session = repoManager.getRepository().login(); Workspace ws = session.getWorkspace(); ws.getNamespaceRegistry().unregisterNamespace(newNamespaceQName); log.debug("NameSpace: "+newNamespaceQName+" removed"); session.save(); }finally { if (session != null) session.logout(); } } COM: <s> remove name space </s>
funcom_train/32829268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void columnSelectionChanged(ListSelectionEvent e) { if (bIgnoreRowColEvents == true || e.getValueIsAdjusting() == true) return; int row = tblDays.getSelectedRow(); int col = tblDays.getSelectedColumn(); if (row == -1 || col == -1) return; rowColChanged(row, col); } COM: <s> fired when the table header detects a column change </s>
funcom_train/31123458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void normalizeAndPrint(String s) { int len = (s != null) ? s.length() : 0; for (int i = 0; i < len; i++) { char c = s.charAt(i); normalizeAndPrint(c); } } // normalizeAndPrint(String) COM: <s> normalizes and prints the given string </s>
funcom_train/44080395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle2D getBounds() { Rectangle2D bounds = GraphConstants.createRect(getLocation(null), 0); bounds.setFrame(bounds.getX() - size / 2, bounds.getY() - size / 2, bounds.getWidth() + size, bounds.getHeight() + size); return bounds; } COM: <s> returns the bounds for the port view </s>
funcom_train/23273382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void print(char[] cbuf, int off, int len) { boolean col = false; for (int i = off + len - 1; i >= off; i -= 1) { if (cbuf[i] == '\n') { line += 1; if (!col) { column = off + len - 1 - i; col = true; } } } if (!col) { column += len; } try { writer.write(cbuf, off, len); } catch (IOException ioe) { throw new RuntimeException(ioe); } } COM: <s> write a sequence of characters </s>
funcom_train/104192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateComboAndSelect(boolean goRemote) { // get the list of stuff that goes in the box List<? extends ITridas> entityList = getEntityList(goRemote); topChooser.setList(entityList); // select what we already have, if it exists ITridas selectedEntity = currentMode.getEntity(s); // otherwise, try to choose something nicely if(selectedEntity == null) selectedEntity = suggestSelectedEntity(currentMode, entityList); selectInCombo(selectedEntity); } COM: <s> populate the combo box with a list </s>
funcom_train/31978731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNote(String name, Object value, boolean jgnotify) { super.setNote(name,value); if ( jgnotify ) { SessionMessage msg = new SessionMessage(SessionMessage.EVT_SET_SESSION_NOTE, null, getId(), name, value, null); sendMessage(msg); } } COM: <s> bind an object to a specified name in the internal notes associated </s>
funcom_train/31478029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateResourceInfo() { logMessage("Updating resource info.", DEBUG); try { ResourceProtocol protocol = getProtocol(); if (protocol == null) return; remotePatchlevel = protocol.updateResourceInfo(this, localPatchlevel); logMessage("Resource info updated ("+nameToResource.size()+" resources)", DEBUG); } catch (ProtocolException e) { logException("While updating resource info", e); } saveInfo(); } COM: <s> updates the resource list from the server </s>
funcom_train/37454500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeBindingType(boolean self) throws IOException { if (self) { writer.write("GO:0042802"); writer.write(WriterUtils.TABULATION); // GoId - protein self binding self = true; } else { writer.write("GO:0005515"); writer.write(WriterUtils.TABULATION); // GoId - protein binding } } COM: <s> write binding type </s>
funcom_train/43531664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(ProductStockHistory entity) { Logger.info(getClass(),"deleting ProductStockHistory instance"); try { //entity = entityManager.getReference(ProductStockHistory.class,entity.getPstockId()); entityManager.remove(entity); Logger.info(getClass(),"delete successful"); } catch (RuntimeException re) { Logger.error(getClass(),"delete failed"); throw re; } } COM: <s> delete a persistent product stock history entity </s>
funcom_train/46322142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void exitCoords(TextPage page) { PVector pos = page.getPosition().get(); PVector rot = page.getRotation().get(); g2.translate(g.width/2.0f, g.height/2.0f); g2.rotate(-rot.z); g2.translate(-g.width/2.0f, -g.height/2.0f); g2.translate(-pos.x, -pos.y); } COM: <s> transform the graphics2 d back into the coordinates given text page </s>
funcom_train/22548891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getIsBusy() throws BadPacketException { parseResults(); switch (_data.getBusyFlag()) { case UNDEFINED: throw new BadPacketException(); case TRUE: return true; case FALSE: return false; default: Assert.that(false, "Bad value for busy flag: " + _data.getBusyFlag()); return false; } } COM: <s> returns true if this has no more download slots </s>
funcom_train/12325880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGenerateValue() { DefaultFrequencyBasedGenerator<Gender> fg = new CherelGenderGenerator(new DefaultFieldDependencyManager()); Map<String,Object> dependencyValues = null; try { assertTrue(fg.generateValue(dependencyValues) != null); } catch (GenerationException e) { String msg = "Failed to generate value with " + (dependencyValues == null ? "null" : dependencyValues.toString()); fail(msg); } } COM: <s> should work with null empty and junk dependencies </s>
funcom_train/9673072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InetAddress getFirstNeighbor(){ InputStreamReader input = new InputStreamReader ( System.in ); BufferedReader buffer = new BufferedReader ( input ); String result; InetAddress ip; messageConsole(); messageConsole("Please specify the ip-address/hostname of your first UniNet neighbor :"); try{ result=buffer.readLine(); ip=InetAddress.getByName(result); } catch (IOException ex){ return null; } System.out.println(""); return ip; } COM: <s> request the first node address to the user </s>
funcom_train/2524833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMessage(Message what) { displayed = what; if (mainbody != null) remove(mainbody); if (what != null) { loadHeaders(); mainbody = getBodyComponent(); } else { headers.setText(""); TextArea dummy = new TextArea("", 24, 80, TextArea.SCROLLBARS_NONE); dummy.setEditable(false); mainbody = dummy; } // add the main body GridBagConstraints gb = new GridBagConstraints(); gb.gridwidth = GridBagConstraints.REMAINDER; gb.fill = GridBagConstraints.BOTH; gb.weightx = 1.0; gb.weighty = 1.0; add(mainbody, gb); invalidate(); validate(); } COM: <s> sets the current message to be displayed in the viewer </s>
funcom_train/8485492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testVarArgInvocation() { try { ATObject result = atTestObject.impl_invoke(atTestObject, AGSymbol.jAlloc("overloadedvararg"), NATTable.atValue(new ATObject[] { NATNumber.ZERO, NATNumber.ONE })); assertEquals(Evaluator.getNil(), result); } catch (InterpreterException e) { fail(e.getMessage()); } } COM: <s> test whether variable arguments work </s>
funcom_train/37586507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int _move(int count, int currentOffset) { if (count == 0) return currentOffset; Iterator it = this; //make copy of cursor and return new iterator? if (count > 0) return it._moveRight(count, currentOffset); return it._moveLeft(- count, currentOffset); // count < 0 } COM: <s> helper function for move int </s>
funcom_train/50034549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getShortestExample(boolean accepted) { if (isSingleton()) { if (accepted) { return singleton; } else if (singleton.length() > 0) { return ""; } else { return "\u0000"; } } return getShortestExample(initial, accepted, new HashMap()); } COM: <s> returns a shortest accepted rejected string </s>
funcom_train/10583733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String createExceptionMessage(Request request) { return "Resolving page envelope failed:" + "\n URI: " + request.getRequestURI() + "\n Context: " + getContext() + "\n Publication ID: " + getPublication().getId() + "\n Area: " + this.document.getArea() + "\n Document UUID: " + this.document.getUUID(); } COM: <s> creates the message to report when creating the envelope failed </s>
funcom_train/14462741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPlotAreaBgColor() { for (int i=0;i<chartArr.size();i++) { BiffRec b = (BiffRec)chartArr.get(i); if (b instanceof Frame) { return ((Frame)b).getBgColor(); } } return FormatHandle.COLOR_WHITE; } COM: <s> returns the plot area background color </s>
funcom_train/39388281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startStepBackward() { //TODO: Check actuator length limit if (!simulateOnly) { setDirectionOutputPins(getLP_PIN(directionPinNumber)); setStepOutputPins(getLP_PIN(stepPinNumber)); } // Note that length ends up wrong if endStep() is not called setExtensionLength (getExtensionLength() - getLengthPerStep()); } COM: <s> begin the process of moving the actuator backward and update length </s>
funcom_train/27784645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName() { // Under Java 1.5 beta if I don't check against graph being NULL I get // a NULL pointer exception. I don't understand why. This whole module // will be upgraded soon so I am not too concerned. if(graph != null) return graph.getName(); else return ""; } COM: <s> return the graph name we are associated with </s>
funcom_train/18351788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean valid(QueryGraph graph) { boolean valid = true; message = ""; valid = emptyCheck(graph); if (valid) { valid = connectedCheck(graph); } if (valid) { valid = leafCheck(graph); } if (valid) { valid = conceptCheck(graph); } if (valid) { valid = childCountCheck(graph); } return valid; } COM: <s> tests whether current query graph construct is valid </s>
funcom_train/37034933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeSession(Session session) throws IOException { if (store == null || !session.isValid() || isSessionStale(session, System.currentTimeMillis())) return; try { store.save(session); } catch (IOException e) { log(sm.getString ("persistentManager.serializeError", session.getId(), e)); throw e; } } COM: <s> write the provided session to the store without modifying </s>
funcom_train/1541942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Font untransform(Font font) { // replace font family Map /*<TextAttribute, ?>*/ attributes = font.getAttributes(); // set default font size attributes.put(TextAttribute.SIZE, new Float(SVGGlyph.FONT_SIZE)); // remove font transformation attributes.remove(TextAttribute.TRANSFORM); attributes.remove(TextAttribute.SUPERSCRIPT); return new Font(attributes); } COM: <s> creates a font based on the parameter </s>
funcom_train/47012893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getJComboBox() { if (jComboBox == null) { jComboBox = new JComboBox(); jComboBox.setMaximumRowCount(4); jComboBox.setPreferredSize(new java.awt.Dimension(31, 25)); } return jComboBox; } COM: <s> this method initializes j combo box </s>
funcom_train/8067318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadDataProperty() { int numDataProperty = parser.getDataPropertyConnectors().size(); FigViewParameter param; for (int i=0; i<numDataProperty; i++){ param = parser.getDataPropertyConnectors().get(i); System.out.println("Valor de la propiedad de objetos " + param); //create the OWL Entitiy OWLDataProperty c = ExampleViewComponent.manager.getOWLDataProperty(param.getOWLEntityName()); //add the pair to the hashtable dataProperties.put(c, param); } } COM: <s> load the data properties declared in the view file </s>
funcom_train/37421226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupCommands(){ exitProgramCommand = new CommandAction( new ExitProgramCommand(),"Exit"); addContactCommand = new CommandAction( new AddContactCommand(),"Add contact"); removeContactCommand = new CommandAction( new RemoveContactCommand(),"Remove contact"); startConversationCommand = new CommandAction( new StartConversationCommand(),"Start conversation"); editProfileCommand = new CommandAction( new EditProfileCommand(),"Edit profile"); helpCommand = new CommandAction(new HelpCommand(),"Help"); } COM: <s> this method sets up commands according to the </s>
funcom_train/44161688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getDrivers() { Collection col = null; ArrayList dataSources = null; try { col = prepareCollection("datasources"); XMLResource document = (XMLResource)col.getResource("datasources"); Document doc = makeDocument(document); dataSources = this.queryMethods.getDrivers(doc); if (col != null) { col.close(); } } catch (Exception e) { e.printStackTrace(); } return dataSources; } COM: <s> get drivers gets drivers </s>
funcom_train/2580731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object obj) { int result = 0; if (obj instanceof PieLabelRecord) { PieLabelRecord plr = (PieLabelRecord) obj; if (this.baseY < plr.baseY) { result = -1; } else if (this.baseY > plr.baseY) { result = 1; } } return result; } COM: <s> compares this object to an arbitrary object </s>
funcom_train/13712405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printButtons(){ if(buttons.size() > 0){ System.out.println("\n<<< available "+name+" buttons: >>>\n"); for (int i = 0; i < buttons.size(); i++){ System.out.print(" "+i+": "); System.out.println(((ControllInput) buttons.get(i)).getName()); } System.out.println("\n<<< >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); } } COM: <s> lists the available button of a device in the console window </s>
funcom_train/9442514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convertCaps(String moji) { String tmp = ""; if (moji != null && moji.length() > 0) { tmp = moji.substring(0, 1).toUpperCase(Locale.JAPAN) + moji.substring(1).toLowerCase(Locale.JAPAN); } return tmp; } COM: <s> convert into both small and capital letter </s>
funcom_train/25377955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double unweightedMicroFmeasure() { double tp = 0; double fn = 0; double fp = 0; for (int c = 0; c < m_NumClasses; c++) { tp += numTruePositives(c); fn += numFalseNegatives(c); fp += numFalsePositives(c); } return 2*tp / (2*tp + fn + fp); } COM: <s> unweighted micro averaged f measure </s>
funcom_train/47107600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemArmor12() { JMenuItem menuItem = new JMenuItem(); menuItem.setText(Armor.A_12.getItemName()); menuItem.setEnabled(false); menuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { controller.setPlrReadiedArmor(Armor.A_12); } }); return menuItem; } COM: <s> creates the thirteenth choice for the armor menu </s>
funcom_train/28997648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPersonalLinks(PersonalLinks aPersLink) { if (getPersonalLinks() == null) { setPersonalLinks(new Vector()); } if ((aPersLink != null) && !getPersonalLinks().contains(aPersLink)) { getPersonalLinks().add(aPersLink); } } COM: <s> add a personal links to the portal </s>
funcom_train/25792022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isStatementOfType(String statement, ArrayList<Class< ? extends StateElement>> statementTypes) { for (Class< ? extends StateElement> statementType : statementTypes) { if (statement.toLowerCase().startsWith(statementType.getSimpleName().toLowerCase())) { return true; } } return false; } COM: <s> compares the given statement to the list of statement types </s>
funcom_train/48422610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scoringGraph(ScoringConfig config, int websiteId1, int websiteId2) throws HttpCommunicateException { Object[] methodParams = { config, websiteId1, websiteId2 }; HttpCommunicate comm = new HttpCommunicate( "org.firebird.graph.service.impl.GraphServiceImpl", "scoringGraph", methodParams); httpClient.execute(comm); } COM: <s> evaluates the scores of the graph </s>
funcom_train/44869027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMVariableJSliderBean getXSlider() { if (xSlider == null) { xSlider = new WCMVariableJSliderBean(); xSlider.setBackground(new Color(238, 238, 238)); Value xMin = getCanvas().getCoordinateRect().getValueObject( CoordinateRect.XMIN); Value xMax = getCanvas().getCoordinateRect().getValueObject( CoordinateRect.XMAX); xSlider.setMin(xMin); xSlider.setMax(xMax); } return xSlider; } COM: <s> this method initializes x slider </s>
funcom_train/19142649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void announceServer() { try { JmDNS jmdns = new JmDNS(); jmdns.registerService( new ServiceInfo("_hedgehog._tcp.local.", java.net.InetAddress.getLocalHost().getHostName() +"._hedgehog._tcp.local.", XML_RPC_PORT, 0, 0, "path=/RPC2") ); } catch (Exception e) { e.printStackTrace(); } } COM: <s> announces this server using rendezvous as </s>
funcom_train/32007288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getGas() { switch (gas) { case 59: return "CH4"; case 89: return "O2"; case -6: return "Temp1"; case -5: return "Temp2"; case -4: return "Temp3"; case -8: return "Batt"; case -7: return "Pump"; default: return ""; } } COM: <s> returns current measured gas as a human readable string </s>
funcom_train/51704457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TimeSeriesFileHeader saveToFileWithHeader(File file) throws IOException{ String h1 = new String(NLS.get("x.timestamp")); //$NON-NLS-1$ for (ColumnInfo<?> ci : this.header) h1 += this.format.colDelim + ci.quantity + ":" + ci.stats.getAbbreviation(); //$NON-NLS-1$ // Convert.removeLastChar(h1); BufferedWriter out = IO.getBufferedWriter(file); out.write(h1); out.newLine(); out.close(); return this.saveToFile(file, true); } COM: <s> saves the time series into a csv file </s>
funcom_train/44705485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void redirectBack(PageState state) { try { String returnURL = (String) state.getValue(m_returnURL); state.getResponse().sendRedirect(returnURL); } catch(IOException e) { s_log.error("IO Error redirecting back", e); // do nothing } } COM: <s> redirect back to wherever the user came from using the value </s>
funcom_train/7821478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createButtons(Composite box) { addDirButton = createPushButton(box, "HACK.addDir");//$NON-NLS-1$ addFileButton = createPushButton(box, "HACK.addFile");//$NON-NLS-1$ removeButton = createPushButton(box, "ListEditor.remove");//$NON-NLS-1$ upButton = createPushButton(box, "ListEditor.up");//$NON-NLS-1$ downButton = createPushButton(box, "ListEditor.down");//$NON-NLS-1$ } COM: <s> creates the add remove up and down button in the given button box </s>
funcom_train/28271736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Double getTotal() { double total = quantity*product.getFinalPrice(); for(ProductsAttributesView attribute:attributes) { String prefix = attribute.getPricePrefix(); if (prefix.equals("+")||prefix.equals("")) { total += quantity*attribute.getOptionsValuesPrice(); } else { total -= quantity*attribute.getOptionsValuesPrice(); } } return total; } COM: <s> gets the total </s>
funcom_train/23853123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MainWindow createWindow(List<View> views) { MainWindow window = session.getViewManager().createMainWindow(session); session.getViewManager().addWindow(window); if (views != null) { for (View view : views) { session.getViewManager().addView(view, window); } } window.setVisible(true); return window; } COM: <s> creates a new main window </s>
funcom_train/13687015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getContents(BinaryContent content, long start, boolean insert) { long total = tryGettingFiles(content, start, insert); if (total >= 0L) return total; total = tryGettingMemoryByteArray(content, start, insert); if (total >= 0L) return total; total = tryGettingFileByteArray(content, start, insert); if (total >= 0L) return total; return 0L; } COM: <s> paste the clipboard contents into a binary content </s>
funcom_train/3091003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void layoutTree() { DendrogramViewNode[] leaves = model.getLeaves(); int x = model.getLevelCoord(model.getLevelCount()-1); for (int i=0; i < leaves.length; i++) { int y=model.getNodeCoord(i); leaves[i].setX(x); leaves[i].setY(y); } model.getRoot().layout(); } COM: <s> cause all the nodes to refigure their x y positions with respect </s>
funcom_train/38473236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireObjectDeletedEvent(Object container, int position, Object removed) { LinkedList containerListeners = (LinkedList) modelListeners.get(container); if (containerListeners == null) return; for (Iterator i = containerListeners.iterator(); i.hasNext();) { IModelChangeListener listener = (IModelChangeListener) i.next(); listener.objectDeleted(container, position, removed); } } COM: <s> method fire object deleted event </s>
funcom_train/48388858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addRecordClickHandler(com.smartgwt.client.widgets.tile.events.RecordClickHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.tile.events.RecordClickEvent.getType()) == 0) setupRecordClickEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.tile.events.RecordClickEvent.getType()); } COM: <s> add a record click handler </s>
funcom_train/20883438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dump() { System.out.println("Name " + name); System.out.println("SampleRate " + sampleRate); System.out.println("NumChannels " + numChannels); System.out.println("lpcMin " + lpcMin); System.out.println("lpcRange " + lpcRange); for (Iterator i = diphoneMap.values().iterator(); i.hasNext(); ) { Diphone diphone = (Diphone) i.next(); diphone.dump(); } } COM: <s> dumps the diphone database </s>
funcom_train/49200026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DigilibImage_wy_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DigilibImage_wy_feature", "_UI_DigilibImage_type"), ExhibitionPackage.Literals.DIGILIB_IMAGE__WY, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the wy feature </s>
funcom_train/10361441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processBeanDefinition(final String beanName, final BeanDefinition beanDefinition, final ElementBuilder builder, final boolean inHolder) { generateBeanDefinitionAttributes(beanDefinition, builder, beanName, inHolder); generateConstructorArguments(beanDefinition, builder); generateProperties(beanDefinition, builder); generateLookupMethods(beanDefinition, builder); builder.up(); } COM: <s> generates declaration for given bean definition </s>
funcom_train/44657625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateControlledObject(Authorizable controlledObject, boolean authorized) { if( logger.isDebugEnabled() ) { logger.debug( "setAuthorized( " + authorized + ") on: " + controlledObject ); } controlledObject.setAuthorized( authorized ); runPostProcessorActions( controlledObject, authorized ); } COM: <s> update a controlled object based on the given authorization state </s>
funcom_train/31251717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String buildHugeTemplate(TemplateLoader loader) { StringBuffer hugeTemplate = new StringBuffer(); TemplateDefs templateDefs = (TemplateDefs) getProperty("template_defs"); if (templateDefs == null) return ""; Iterator it = templateDefs.iterator(); while (it.hasNext()) { TemplateDef tmp = (TemplateDef)it.next(); String fileName = (String)tmp.getProperty("file_path"); String t = loader.loadTemplate(fileName); if (t != null) { // Tack this template onto the end of the huge one hugeTemplate.append(t); } } return hugeTemplate.toString(); } COM: <s> appends all of the templates in order into one huge template </s>
funcom_train/37572228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer("[amount="); sb.append(amount); sb.append(",bidder="); sb.append(bidder); sb.append(",account="); sb.append(account); sb.append("]"); return (sb.toString()); } COM: <s> return a string representation of this object </s>