__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/49790030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetSync() throws Exception { beginAtSitemapThenPage("Home"); String test = "test1 " + new Date(); String source = getLabelIDForText("source"); assertLabeledFieldEquals(source, ""); setLabeledFormElementField(source, test); String sync1 = getLabelIDForText("sync1"); assertLabeledFieldEquals(sync1, test); String sync2 = getLabelIDForText("sync2"); assertLabeledFieldEquals(sync2, test); } COM: <s> set source to a value should set the other fields </s>
funcom_train/19036172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reloadAccount() { this.usernameField.setText(this.dataModel.getAccount().getUsername()); this.emailField.setText(this.dataModel.getAccount().getEmail()); this.accountTypeField.setText(this.dataModel.getAccount().getType().getName()); } COM: <s> reloads all the information in the account into this dialog </s>
funcom_train/45872824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { Quaternion q = new Quaternion(); q.fromAxes(Vector3f.UNIT_X, Vector3f.UNIT_Y,Vector3f.UNIT_Z); invZoom = 1.0f; this.getCamera().setFrustum(1.0f, 1000.0f, -0.55f * invZoom, 0.55f * invZoom, 0.4125f*invZoom, -0.4125f*invZoom); //this.getCamera().update(); this.setLocalRotation(q); } COM: <s> reset the position and rotation of the camera to a default </s>
funcom_train/51535145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RasterImage createImage(int[] imageData, int width, int height, boolean processAlpha) { int type = processAlpha ? BufferedImage.TYPE_INT_ARGB : BufferedImage.TYPE_INT_RGB; BufferedImage img = new BufferedImage(width, height, type); img.setRGB(0, 0, width, height, imageData, 0, width); return new RasterImageImpl(img); } COM: <s> creates a raster image from an int array containing the pixel data </s>
funcom_train/39301072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addExpectedParameters(Object[] args) { if (args != null && args.length != myParameterValues.length) { throw new IllegalArgumentException(method.toString() + ": got wrong number of parameters"); } for (int i = 0; i < args.length; i++) { myParameterValues[i].addExpected(args[i]); } } COM: <s> sets up the next excpected arguments for the method </s>
funcom_train/37451607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete( Object obj ) throws IntactException { // Only delete it if it is persistent. if ( !isPersistent( obj ) ) { return; } try { dao.remove( obj ); } catch ( TransactionException de ) { String msg = "intact helper: failed to delete object of type " + obj.getClass().getName(); throw new IntactException( msg, de ); } } COM: <s> this method provides a delete operation </s>
funcom_train/8987746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printFontFileName(JspWriter out, String sFileName, String sStyle) throws Exception{ if(sStyle!=null) { out.print("<font class='"); out.print(sStyle); out.print("'>"); out.print(sFileName); out.print("</font>"); }else{ out.print(sFileName); } } COM: <s> print font of file name </s>
funcom_train/24595169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet executeNativeSQLQuery(String query) throws SQLException, HibernateException { logger.debug("Executing SQL query: " + query); //Get Session Session session = HibernateUtil.currentSession(); //Get Connection Connection connection = session.connection(); //Create SQL & Execute Statement s = connection.createStatement(); //System.out.println(query); s.execute(query); //Get Resultset ResultSet rs = s.getResultSet(); return rs; } COM: <s> executes a native sql query </s>
funcom_train/25870800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setServiceName(final String serviceName) { if(serviceName == null) throw new IllegalArgumentException("The " + "service name must not be null."); if(serviceName.length() == 0) throw new IllegalArgumentException("The" + " service name length must not be 0."); this.serviceName = serviceName; } COM: <s> set the name of this bus service </s>
funcom_train/3421704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String dateToString(DateTimeData date) { StringBuffer message = new StringBuffer(6); message.append('-'); message.append('-'); message.append('-'); append(message, date.day, 2); append(message, (char)date.utc, 0); return message.toString(); } COM: <s> converts g day object representation to string </s>
funcom_train/37840476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onAction(User user, RPAction action) { MarboardZone zone = user.getZone(); // create a copy of the list to prevent ConcurrentModificationException List<Shape> shapes = new LinkedList<Shape>(); for (RPObject object : zone) { if (object instanceof Shape) { shapes.add((Shape) object); } } // remove all shapes for (Shape shape : shapes) { zone.remove(shape.getID()); } } COM: <s> clears the board </s>
funcom_train/959998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBeanInit() { Mitarbeiter mitarbeiter = (Mitarbeiter) xbf.getBean("MAHansMueller"); assertNotNull(mitarbeiter); assertEquals(1L, mitarbeiter.getId()); assertEquals("Hans", mitarbeiter.getVname()); assertEquals("Mueller", mitarbeiter.getNname()); assertEquals("testpw", mitarbeiter.getPasswort()); assertEquals(0, mitarbeiter.getVorgesetzter()); assertEquals("IT", mitarbeiter.getAbteilung()); assertEquals(1, mitarbeiter.getRechte()); assertEquals(false, mitarbeiter.isKrank()); } COM: <s> test student bean initialisation </s>
funcom_train/39196308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onDnD(AjaxRequestTarget target, MarkupContainer srcContainer, int srcPos, MarkupContainer destContainer, int destPos) { if (logger().isDebugEnabled()) { logger().debug("srcContainer={}, srcPos={}, destContainer={}, destPos={}", new Object[]{srcContainer, srcPos, destContainer, destPos}); } return false; } COM: <s> call when a component has been moved on client side to be overwrited </s>
funcom_train/7496635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String stripFrom(CharSequence source, boolean matches) { StringBuilder result = new StringBuilder(); for (int pos = 0; pos < source.length();) { int inside = findIn(source, pos, !matches); result.append(source.subSequence(pos, inside)); pos = findIn(source, inside, matches); // get next start } return result.toString(); } COM: <s> strips code points from source </s>
funcom_train/32057328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testViewRedirectorGetMapping() { System.out.println("testViewRedirectorGetMapping"); JGraph g = new JGraph(); GPOverviewPanel x = new GPOverviewPanel(g); GraphLayoutCache lc = new GraphLayoutCache(new DefaultGraphModel(), new JGraph()); GPOverviewPanel.ViewRedirector view = x.new ViewRedirector( new JGraph(), lc); assertNotNull(view.getMapping(new Object(), true)); } COM: <s> test of the view redirector nest class functions get mapping and </s>
funcom_train/26563530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() { File toDir = null; if (_datadir == null) { toDir = new File(_prefix, SHARE); } else { toDir = _datadir; } File fromDir = new File(_from, SHARE); copyTree(fromDir, toDir, _perm); } COM: <s> install the contents of the b share b direcotry of the builds output </s>
funcom_train/21606334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitBeanDefinition(BeanDefinition beanDefinition) { visitParentName(beanDefinition); visitBeanClassName(beanDefinition); visitFactoryBeanName(beanDefinition); visitFactoryMethodName(beanDefinition); visitScope(beanDefinition); visitPropertyValues(beanDefinition.getPropertyValues()); ConstructorArgumentValues cas = beanDefinition.getConstructorArgumentValues(); visitIndexedArgumentValues(cas.getIndexedArgumentValues()); visitGenericArgumentValues(cas.getGenericArgumentValues()); } COM: <s> traverse the given bean definition object and the mutable property values </s>
funcom_train/37081402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addField(SeqFeatureI feat, XMLElement xml) { String type = xml.getType(); String value = xml.getCharData(); if (!ChadoXmlWrite.isSpecialProperty(type)) // Mark it as being a field so that it can be written out properly value = FIELD_LABEL + value; feat.addProperty(type, value); } COM: <s> add a flat field e </s>
funcom_train/853435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeDefaults() { IPreferenceStore store = getPreferenceStore(); store.setDefault(P_BOOLEAN, true); store.setDefault(P_CHOICE, "choice2"); /* * store.setDefault(P_URL, "localhost"); store.setDefault(P_PORT, 5555); */ } COM: <s> sets the default values of the preferences </s>
funcom_train/5420115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String encodeURLToParameter(String url) { int codeAsk = (int)'?'; String ask = "x" + codeAsk; int codeAnd = (int)'&'; String and = "x" + codeAnd; return url.replaceAll("[?]", ask).replaceAll("[&]",and); } COM: <s> encodes an url to be passed as parameter at other url </s>
funcom_train/9978045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createComposite2() { GridLayout gridLayout6 = new GridLayout(); gridLayout6.numColumns = 1; GridData gridData14 = new GridData(); gridData14.horizontalAlignment = GridData.FILL; gridData14.grabExcessHorizontalSpace = true; gridData14.horizontalSpan = 3; gridData14.verticalAlignment = GridData.CENTER; composite2 = new Composite(group2, SWT.NONE); createGroup1(); composite2.setLayout(gridLayout6); composite2.setLayoutData(gridData14); } COM: <s> this method initializes composite2 </s>
funcom_train/40091565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeAllWindows() { for (DatasetWindow datasetWindow : datasetWindowList) { datasetWindow.hide(); } for (DatafileWindow datafileWindow : datafileWindowList) { datafileWindow.hide(); } for (DownloadWindow downloadWindow : downloadWindowList) { downloadWindow.hide(); } for (ParameterWindow parameterWindow : parameterWindowList) { parameterWindow.hide(); } } COM: <s> closes all windows that are open </s>
funcom_train/2459531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVoice(String voice, String userType) throws UMException { s.userTypes.add(userType, new UTypeVals()); //fails if userType already exists ((UTypeVals)(s.userTypes.getVal(userType))).voice = voice; } COM: <s> set the desired voice e </s>
funcom_train/47812434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadTeamHeadList() { final HeaderLabel name = new HeaderLabel("team.name", localization.get("name")); name.setSort(SortOrder.ASC); final Button delete = new Button("Delete"); delete.addClickHandler(new ClickHandler() { @Override public void onClick(final ClickEvent event) { delete(); } }); tableTeam.setColumnHeaderWidget(3, delete); tableTeam.setColumnHeaderWidget(1, new Label("Actions")); tableTeam.setColumnHeaderLabel(0, name); } COM: <s> this method writes the headline of te table </s>
funcom_train/39911291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBody1() { System.out.println("getBody1"); Page1 instance = new Page1(); Body expResult = null; Body result = instance.getBody1(); 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 body1 method of class timesheetmanagement </s>
funcom_train/13646602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AS2Message createMDNProcessed( AS2MessageInfo releatedMessageInfo, String senderId, String receiverId) throws Exception{ AS2Message mdn = this.createMDN( releatedMessageInfo, senderId, receiverId, "processed", "AS2 message received." ); mdn.getMessageInfo().setState( AS2Message.STATE_FINISHED ); return( mdn ); } COM: <s> creates an mdn that could be returned to the sender and indicates that </s>
funcom_train/597097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readUTF8(int index, final char[] buf) { int item = readUnsignedShort(index); String s = strings[item]; if (s != null) { return s; } index = items[item]; return strings[item] = readUTF(index + 2, readUnsignedShort(index), buf); } COM: <s> reads an utf8 string constant pool item in </s>
funcom_train/1216886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { Collection<String> elementList = new ArrayList<String>(); String props = PropertyReader.getProperty(ELEMENTS_TO_BE_SKIPPED); if (null != props) { StringTokenizer token = new StringTokenizer(props, ";"); while (token.hasMoreElements()) { elementList.add((String) token.nextElement()); } } elementsToBeSkipped = elementList.toArray(new String[] {}); } COM: <s> load the elements to be skipped from the property file </s>
funcom_train/3882962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSourcePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TaxonpathType_source_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TaxonpathType_source_feature", "_UI_TaxonpathType_type"), ImsMdRootv1p1Package.Literals.TAXONPATH_TYPE__SOURCE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the source feature </s>
funcom_train/15616473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMail(String from, String to, String subject, String body) { try { MimeMessage message = new MimeMessage(session); InternetAddress internetAddress = new InternetAddress(from); message.setFrom(internetAddress); message.setReplyTo(new InternetAddress[]{internetAddress}); message.setRecipient(Message.RecipientType.TO, new InternetAddress(to)); message.setSubject(subject); message.setText(body); message.setSentDate(new Date()); message.saveChanges(); Transport.send(message); } catch (MessagingException e) { logger.warn("Mail error", e); } } COM: <s> send mail via smtp </s>
funcom_train/23453129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addValueTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Binding_valueType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Binding_valueType_feature", "_UI_Binding_type"), ProcessPackage.Literals.BINDING__VALUE_TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the value type feature </s>
funcom_train/31084701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void simplify () { if (_simplified) // Already simplified return; if (n == 0) { // This is zero, so make it 0/1 d = 1; } else { if (d < 0) { // denominator is negative. n = - n; d = - d; } int g = gcd (n, d); n = n / g; d = d / g; } _simplified = true; } COM: <s> if simplified is true this does nothing </s>
funcom_train/24492725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean exists(Object o) { boolean result = true; if (o instanceof AbstractMultipleWrapper) { IWorkspaceRoot wr = ResourcesPlugin.getWorkspace().getRoot(); if (!wr.exists(new Path(((AbstractMultipleWrapper) o).getPath()))) { result = false; } } return result; } COM: <s> checks whether the file represented by the given abstract multiple wrapper exists </s>
funcom_train/2289540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRfsPrefix(String vfsName) { if (vfsName != null) { Iterator it = m_rfsRules.iterator(); while (it.hasNext()) { CmsStaticExportRfsRule rule = (CmsStaticExportRfsRule)it.next(); if (rule.getSource().matcher(vfsName).matches()) { return rule.getRfsPrefix(); } } } return m_rfsPrefix; } COM: <s> returns the prefix for exported links in the real file system </s>
funcom_train/38224162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Concept getPathComponent(int element) { int pathLength = getPathCount(); if(element < 0 || element >= pathLength){ throw new IllegalArgumentException("Index " + element + " is out of the specified range"); } ConceptPath path = this; for(int i = pathLength-1; i != element; i--) { path = path.parentPath; } return path.lastPathComponent; } COM: <s> returns the path component at the specified index </s>
funcom_train/1602499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newAppointment() { view.setAppointmentId(0); view.setInputTitle(""); view.setInputStartDateTime(2010, 01, 01, 01, 00); view.setInputEndDateTime(2010, 01, 01, 01, 00); view.setInputLocation(""); view.setInputContactPerson(""); view.setInputDescription(""); view.setInputCategory(null); view.setInputIsWholeDays(false); view.resetErrors(); view.showNewOrEditAppointmentOnBool(true); } COM: <s> this opens up the appointment frame and sets it to the state of </s>
funcom_train/18789709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPoBox(String poBox) { if (((this.poBox != null) && !this.poBox.equals(poBox)) || ((this.poBox == null) && (poBox != null))) { this.poBox = poBox; setModified(true); } } COM: <s> sets the new value of the simple property po box </s>
funcom_train/2915005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertNoErrorMarkers (final IPath tpl) { final IMarker[] markers = env.getMarkersFor(tpl); for (IMarker marker : markers) { try { if (marker.isSubtypeOf(IMarker.PROBLEM)) { fail(getDescription(marker)); } } catch (CoreException e) { throw new RuntimeException(e); } } } COM: <s> asserts that no markers with severity error are attached to a file </s>
funcom_train/934299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DataSource getDataSource(HttpServletRequest request, String key) { // Identify the current module ServletContext context = getServlet().getServletContext(); ModuleConfig moduleConfig = RequestUtils.getModuleConfig(request, context); // Return the requested data source instance return ( (DataSource) context.getAttribute(key + moduleConfig.getPrefix())); } COM: <s> return the specified data source for the current module </s>
funcom_train/36821318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean nodeExists(String goal) { if (robot.getArena().nodeMap.containsKey(goal) && robot.getArena().nodeMap.get(goal).getColor() != Node.DELETED && !robot.getArena().nodeMap.get(goal).isOccupied) { return true; } return false; } COM: <s> checks whether a node exists within the grid </s>
funcom_train/4138811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void menuAboutToShow(IMenuManager manager) { if( selection != null && !selection.isEmpty() ) { String domType = DOM_TYPES[selection.getSelectedNode().getNodeType()]; boolean enabled = types.equals(DOM_TYPES[0]) || types.indexOf(domType) != -1; setEnabled(enabled); } else { setEnabled(false); } } COM: <s> menu listener that sets whether this action is enabled for the current </s>
funcom_train/18742278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean doRenumber() throws IOException { start(); try { boolean result = false; if (getStore() instanceof DefaultFileSystemStore) { ((DefaultFileSystemStore) getStore()).renumber(); changeGrammar(true); result = true; } return result; } finally { finish(); } } COM: <s> renumbers the nodes in all graphs from </s>
funcom_train/39888667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(final Sequence sequence) { final String s = sequence.getSequence(); final int len = s.length(); for (int i = 0; i < len; i++) switch (s.charAt(i)) { case 'A': case 'a': case 'T': case 't': case 'G': case 'g': case 'C': case 'c': break; default: return false; } return true; } COM: <s> tests whether or not the specified sequence should be accepted </s>
funcom_train/34671522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { // Take some care not to mess up any formatting in the fields. If line1 was "Small Fellows, Flat 2b" we don't want to mess // with the internal ",". String ret=nn(line1)+",\07"+nn(line2)+",\07"+nn(line3)+",\07"+nn(line4)+",\07"+nn(line5)+",\07"+nn(town)+",\07"+nn(county)+",\07"+nn(country)+".\07"+nn(postcode); return ret.replaceAll("\07,", "").replaceAll(",\07[.]\07", ". ").replaceAll("\07", " "); } COM: <s> return the address formatted on a single line with comma seperated fields </s>
funcom_train/23278778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LaunchSponsor getLaunchSponsor(long id){ List objects = getHibernateTemplate().findByNamedQueryAndNamedParam("launchSponsor.getbyId", "id", id); if (objects.size()!=1) return null; return (LaunchSponsor) objects.get(0); } COM: <s> returns the launch sponsor related to the given id </s>
funcom_train/15867527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPlayer(MissionPlayer mp) { players.add(mp); // add ag in the agents committed to the goal of the mission for (Goal gs: mp.getMission().getGoals()) { GoalInstance ig = getGoal(gs); ig.committed(mp.getPlayer()); } } COM: <s> adds a mission player for this sch </s>
funcom_train/22496812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changePoint(int index) { if (notesIndex != -1) { PointData currentData = data.get(notesIndex); currentData.setKeyword(keywordText.getText()); } if (!(index < 0 || index >= data.size())) { PointData pointData = data.get(index); topic.setText(pointData.getTopic()); keywordText.setText(pointData.getKeyword()); pointData.buildOutlineStyledText(notesText); notesIndex = index; updateButtons(); } } COM: <s> this method changes the point being looked at to the given index </s>
funcom_train/23898206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String escapeString(String text) { //First backup allready escaped &'s String result = text.replaceAll("&amp;", "%amp;"); // Replace left-overs result = result.replaceAll("&", "&amp;"); //Then replace back "backuped" **amps; result = result.replaceAll("%amp;", "&amp;"); return result; } COM: <s> escape all not escaped s in the string </s>
funcom_train/27904699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Symbol createFunction(String ident,String returnType) { int stype = -1; if(returnType.equals("integer")) { stype = Function.TYPE_INT; } else if(returnType.equals("boolean")) { stype = Function.TYPE_BOOL; } return new Function(ident,stype,null); } COM: <s> factory method to create a new function symbol </s>
funcom_train/32978369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delFile(String fullFileName) { /* delFile */ try { File f= new File(fullFileName); if(f!=null) f.delete(); } catch (Exception e) { logMsg("Can't delete file ["+fullFileName+"]",Color.red); return(false); } return(true); } /* delFile */ COM: <s> del file delete specifile file specified with full path </s>
funcom_train/4385799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getAuthorityScore(String url) { Long id = (Long) (url_to_id.get(new Long(((Object) (url.toString())).hashCode()))); Double aux = (Double) (url_authority_score.get(id)); return (aux == null) ? -1 : aux.doubleValue(); } COM: <s> gets the authority score attribute of the related object </s>
funcom_train/14089006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readHtmlHead() { StringBuffer output = new StringBuffer(); if (content != null && content.length() > 0) { Matcher m = Resources.Regex.head.matcher(content); if (m.find()) { output.append(content.substring(0, m.start())); set_(SettingsLocalE.head, m.group(1)); output.append(content.substring(m.end(), content.length())); content = output; } } } COM: <s> reads the head content if available </s>
funcom_train/45451108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateDouble() throws Exception { double sampleValue = 42.0; SampleSet testSampleSet = new SampleSet(sampleValue); assertEquals("N inconsistent", 1, testSampleSet.getN()); assertEquals("Average inconsistent", sampleValue, testSampleSet.getAverage(), Double.MIN_VALUE); } COM: <s> test creating a sample set with a double value </s>
funcom_train/25217942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void propagate() throws IOException { if (column >= lineLength + 2) { w.write(sep); column = in + buffer.length(); } int length = buffer.length(); if (length != 0) { w.write(buffer.toString()); buffer.delete(0, length); } } COM: <s> pass the buffer contents to the encapsulated writer </s>
funcom_train/1192615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand() { if (backCommand == null) {//GEN-END:|41-getter|0|41-preInit // write pre-init user code here backCommand = new Command(LocalizationSupport.getMessage("BACKCOMMAND2"), Command.BACK, 0);//GEN-LINE:|41-getter|1|41-postInit // write post-init user code here }//GEN-BEGIN:|41-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/12214132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addObservation(String obs) { // If the reference to the observation list is equal to null, then: if (observations == null) { // Create a new list of observations and the variable called obs is // added to the new list. observations = new ListAg(obs); // If the reference to the observation is different to null, then } else { // Add the observation to the observation list. observations.add(obs); } } COM: <s> this method adds an observation to the agents observation list </s>
funcom_train/7656020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIssuers(Collection<X500Principal> issuers) { if (issuers == null) { issuerNames = null; issuerPrincipals = null; return; } issuerNames = new ArrayList<String>(issuers.size()); issuerPrincipals = new ArrayList<X500Principal>(issuers); for (X500Principal issuer: issuers) { issuerNames.add(issuer.getName(X500Principal.CANONICAL)); } } COM: <s> sets the criterion for the issuer distinguished names </s>
funcom_train/36883993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printNewMessage(PrivateMessage message) { StringBuilder builder = new StringBuilder(messages.getText()); builder.append("\n"); builder.append(session.getNode().getName()); builder.append(" :\n"); builder.append(message.getText()); builder.append("\n"); messages.setText(builder.toString()); } COM: <s> print to the messages the new distant node message </s>
funcom_train/11510339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List getMethodOrConstructorAttributeBundle (Map map, String signature, int numSlots) { List bundle = (List) map.get (signature); if (bundle == null) { bundle = new ArrayList (); map.put (signature, bundle); for (int i = 0; i < numSlots; i++) { bundle.add (new HashSet ()); } } return bundle; } COM: <s> convenience method to get and initialize an enry in the method or </s>
funcom_train/7621626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void measureChildren(int widthMeasureSpec, int heightMeasureSpec) { final int size = mChildrenCount; final View[] children = mChildren; for (int i = 0; i < size; ++i) { final View child = children[i]; if ((child.mViewFlags & VISIBILITY_MASK) != GONE) { measureChild(child, widthMeasureSpec, heightMeasureSpec); } } } COM: <s> ask all of the children of this view to measure themselves taking into </s>
funcom_train/10417990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWrapperLifecycle(String listener) { synchronized (wrapperLifecycles) { String results[] =new String[wrapperLifecycles.length + 1]; for (int i = 0; i < wrapperLifecycles.length; i++) results[i] = wrapperLifecycles[i]; results[wrapperLifecycles.length] = listener; wrapperLifecycles = results; } fireContainerEvent("addWrapperLifecycle", listener); } COM: <s> add the classname of a lifecycle listener to be added to each </s>
funcom_train/25798237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getShares(final DataResponse<ArrayList<FileLocation>> response, final int mediaType, final Context context) { mHandler.post(new Command<ArrayList<FileLocation>>(response, this) { @Override public void doRun() throws Exception { response.value = info(context).getShares(InfoManager.this, mediaType); } }); } COM: <s> returns all defined shares of a media type </s>
funcom_train/10748835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPrintStackTracePrintStream() { Throwable th; ByteArrayOutputStream ba = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(ba); th = prepareThrowables(); th.printStackTrace(ps); assertEquals("incorrect info printed in stack trace", printOutput, ba.toString()); } COM: <s> method under test </s>
funcom_train/27780265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBit(int num) { int bl = getBlock(num); // was the block allocated? if (bl < blocks.length) { // get it if (blocks[bl] != null) { blocks[bl].setBit(num & MASK); dirty = true; return; } } Block b = new Block(); b.setBit(num & MASK); dirty = true; add(bl, b); } COM: <s> set the bit at index code num code to 1 </s>
funcom_train/41813101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeToStage(MMBWorkspace workspace) throws IOException { if (!workspace.getMetadataStageDir().exists()) { workspace.getMetadataStageDir().mkdirs(); } File archiveFile = new File(workspace.getMetadataStageDir(), metadataName + "_archive.csv"); File updateFile = new File(workspace.getMetadataStageDir(), metadataName + "_update.csv"); if (archiveFile.isFile()) { write(updateFile); } else { write(archiveFile); updateFile.delete(); updateFile.createNewFile(); } } COM: <s> write update metadata to staging area </s>
funcom_train/33556740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onMultiSelection(List<Integer> modelIndexes, List<Integer> viewIndexes, List<T> newSelection) { if (AbstractBbTableMasterForm.LOGGER.isDebugEnabled()) { AbstractBbTableMasterForm.LOGGER.debug("Selected rows " + ArrayUtils.toString(viewIndexes)); } AbstractBbTableMasterForm.this.handleSelectionChange(modelIndexes, viewIndexes, newSelection); } COM: <s> called when multiple entities get selected </s>
funcom_train/118735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateProgress4Movements() { // adds the current loop count movements.add(new Integer(movementsCurrentLoop)); iteration++; // if the current loop count is higher than the max movements count // memorize the new max if (movementsCurrentLoop > movementsMax) { movementsMax = movementsCurrentLoop; } // Calculate the new progress if (movements.size() > 1) { dlgProgress.setValue(movements.size() - 1); } } COM: <s> updates the progress based on the movements count </s>
funcom_train/9689934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int distance(Object object1, Object object2) { ensureDistances(); int index1 = nodes.indexOf(object1); int index2 = nodes.indexOf(object2); if(index1 == -1 || index2 == -1) { return INFINITY; } byte distance = matrix[index1][index2]; return distance; } COM: <s> finds the shortest path between two nodes </s>
funcom_train/44713282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (o instanceof com.arsdigita.db.Statement) { if (m_stmt == null) { return super.equals(o); } else { Statement s = (com.arsdigita.db.Statement)o; return m_stmt.equals(s.m_stmt); } } return false; } COM: <s> two statements are equal if they wrap the same </s>
funcom_train/3704994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canHandleAddress(String strAddress) { String strProtocol = UrlLib.getProtocol(strAddress); String[] strSupported = getProtocols(); for (int i = 0; i < strSupported.length; i++) { if (strSupported[i].equals(strProtocol)) { return (true); } } return (false); } // of method COM: <s> converts the string into a url and checks </s>
funcom_train/3762281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { int i=0; while ( true ) { m_progressBar.setValue(i%110); try { if ( m_isRunning ) { sleep(800); } yield(); } catch ( Exception e ) { CAT.error("The run method of the class ProgressBarRunner" + " failed."); } i += 10; } } COM: <s> runs the progress bar </s>
funcom_train/37483266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFormattedTextField getTbServiceCost() { if (tbServiceCost == null) { try { costFormat = NumberFormat.getCurrencyInstance(); tbServiceCost = new JFormattedTextField(costFormat); tbServiceCost.setValue(new Double("0")); tbServiceCost.setColumns(10); } catch (Exception e) { // Do Nothing } } return tbServiceCost; } COM: <s> this method initializes tb service cost </s>
funcom_train/19672546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rotateY(float radians) { float cos = (float)Math.cos(radians); float sin = (float)Math.sin(radians); direction.x = (direction.x * cos) + (direction.z * sin); direction.z = (direction.x * -sin) + (direction.z * cos); } // method COM: <s> rotating the view around the y axis can be achieved by multiplying the </s>
funcom_train/28754431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAmountofrnalabeled(Long newVal) { if ((newVal != null && this.amountofrnalabeled != null && (newVal.compareTo(this.amountofrnalabeled) == 0)) || (newVal == null && this.amountofrnalabeled == null && amountofrnalabeled_is_initialized)) { return; } this.amountofrnalabeled = newVal; amountofrnalabeled_is_modified = true; amountofrnalabeled_is_initialized = true; } COM: <s> setter method for amountofrnalabeled </s>
funcom_train/5338746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnvelopeShape(int value) { if (envelopeThread == null) { envelopeThread = new Thread(this); envelopeThread.start(); } envShape = value & 0xf; if ((envShape & ATTACK_MASK) == 0) { envCount = 15; envStep = -1; } else { envCount = 0; envStep = 1; } } COM: <s> set envelope shape </s>
funcom_train/41822340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String parseFromArrayToString(ArrayList<PatientRecord> record) { StringBuffer sb = new StringBuffer(); if (!(record == null)) { for (int i = 0; i < record.size(); i++) { sb.append(record.get(i).toClientString()); if (i != (record.size() - 1)) { sb.append(";"); } } return sb.toString(); } return ""; } COM: <s> creates a string from an arraylist which contains patient records </s>
funcom_train/7667179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SSLSession getSession() { try { startHandshake(); } catch (IOException e) { Logger.getLogger(getClass().getName()).log(Level.WARNING, "Error negotiating SSL connection.", e); // return an invalid session with // invalid cipher suite of "SSL_NULL_WITH_NULL_NULL" return SSLSessionImpl.NULL_SESSION; } return sslSession; } COM: <s> the ssl session used by this connection is returned </s>
funcom_train/4114510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnConvert() { if (btnConvert == null) { btnConvert = new JButton(); btnConvert.setBounds(new Rectangle(370, 91, 100, 25)); btnConvert.setText("Convert"); btnConvert.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { convert(); } }); } return btnConvert; } COM: <s> this method initializes btn convert </s>
funcom_train/12189664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected XMLPipelineConfiguration createPipelineConfiguration() { XMLPipelineConfiguration config = super.createPipelineConfiguration(); DynamicProcessConfiguration dynamicConfig = (DynamicProcessConfiguration) config.retrieveConfiguration(DynamicProcessConfiguration.class); NamespaceRuleSet namespaceRules = dynamicConfig.getNamespaceRules( Namespace.PIPELINE.getURI(), true); namespaceRules.addRule("for-each", new ForEachRule()); return config; } COM: <s> override the configuration creation method to register the </s>
funcom_train/22202402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mergeMaps(TopicMapReferenceImpl tmr, String src) throws PanckouckeStoreException{ // If it is not possible to start merging, we leave // the TopicMapReference untouched try{ tmr.startMerging(); } catch (IllegalStateException e) { e.printStackTrace(); throw new PanckouckeStoreException(e); } try { MergeAction ma = new MergeAction(tmr, src); addToLoadQueue(ma); } catch (LocatorFactoryException e) { e.printStackTrace(); tmr.setStateCORRUPTED(null, e.getMessage()); throw new PanckouckeStoreException(e); } } COM: <s> merging two topicmaps </s>
funcom_train/25098071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features identifiableEClass = createEClass(IDENTIFIABLE); createEAttribute(identifiableEClass, IDENTIFIABLE__CATEGORY); createEAttribute(identifiableEClass, IDENTIFIABLE__SHORT_NAME); createEAttribute(identifiableEClass, IDENTIFIABLE__UUID); systemEClass = createEClass(SYSTEM); identifiableInstanceRefEClass = createEClass(IDENTIFIABLE_INSTANCE_REF); createEReference(identifiableInstanceRefEClass, IDENTIFIABLE_INSTANCE_REF__PATH); createEReference(identifiableInstanceRefEClass, IDENTIFIABLE_INSTANCE_REF__TYPE); } COM: <s> creates the meta model objects for the package </s>
funcom_train/22053130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean pointInProvince(int iXLoc, int iYLoc) { Polygon poly = new Polygon(); for (int i = 0; i < iPoint_X.get_size(); i++) { poly.addPoint(iPoint_X.int_value_at(i), iPoint_Y.int_value_at(i)); } return poly.contains(iXLoc, iYLoc); } COM: <s> returns true if the location passed is within the province boundry </s>
funcom_train/43388034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BeanInfo getBeanInfo(int i) { if (beanInfos[i] != null) { return beanInfos[i]; } else { Object b = getInstance(beanNames[i]); if (b != null) { Class c = b.getClass(); BeanInfo bi; try { bi = Introspector.getBeanInfo(c); } catch (Exception ex) { System.err.println("JarInfo: couldn't find BeanInfo for "+c+"; caught "+ex); return null; } beanInfos[i] = bi; return bi; } return null; } } COM: <s> get the bean info for the ith bean in this jar file </s>
funcom_train/4745431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteKeypair(String name) { // initialize the interface Jec2 ec2 = new Jec2(getCredentials().getAwsAccessKeyId(), getCredentials().getSecretAccessKey()); try { ec2.deleteKeyPair(name); return true; } catch (Exception ex) { Logger logger = Logger.getLogger(this.getClass().getName()); logger.log(Level.SEVERE, "Deleting keypair failed: " + ex.getMessage()); return false; } } COM: <s> delete a keypair </s>
funcom_train/12263431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object newInstance(Class c) throws SQLException { try { return c.newInstance(); } catch (InstantiationException e) { throw new SQLException("Cannot create " + c.getName() + ": " + e.getMessage()); } catch (IllegalAccessException e) { throw new SQLException("Cannot create " + c.getName() + ": " + e.getMessage()); } } COM: <s> returns a new instance of the given class </s>
funcom_train/28757656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBufferid(Long newVal) { if ((newVal != null && this.bufferid != null && (newVal.compareTo(this.bufferid) == 0)) || (newVal == null && this.bufferid == null && bufferid_is_initialized)) { return; } this.bufferid = newVal; bufferid_is_modified = true; bufferid_is_initialized = true; } COM: <s> setter method for bufferid </s>
funcom_train/15878437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void downgradeTransferProcessing( NetworkConnection peer_connection ) { if( peer_connection.isLANLocal() ) { lan_upload_processor.downgradePeerConnection( peer_connection ); lan_download_processor.downgradePeerConnection( peer_connection ); } else { upload_processor.downgradePeerConnection( peer_connection ); download_processor.downgradePeerConnection( peer_connection ); } } COM: <s> downgrade the given connection back to a normal speed network transfer handling </s>
funcom_train/24941344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClockDomain getClockDomain(String domainSpec) { ClockDomain domain = clockDomains.get(domainSpec); if (domain == null) { domain = new ClockDomain(domainSpec); addComponentToDesign(domain.getClockPin()); if (domain.getResetPin() != null) { addComponentToDesign(domain.getResetPin()); } addComponentToDesign(domain.getGSR()); clockDomains.put(domainSpec, domain); } return domain; } COM: <s> code get clock domain code returns the appropriate </s>
funcom_train/4233718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BufferedImage getDisplayedImage() { if (displayedImageData == null) { return null; } InputStream in = new ByteArrayInputStream(displayedImageData); BufferedImage bufferedImage = null; try { bufferedImage = ImageIO.read(in); } catch (IOException e) { log.error("Failed to decode displayed image."); e.printStackTrace(); } return bufferedImage; } COM: <s> gets the displayed image </s>
funcom_train/4536516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changePresence(Presence presence) { // Fire Presence Listeners for (PresenceListener listener : new ArrayList<PresenceListener>(this.presenceListeners)) { listener.presenceChanged(presence); } // Do NOT send presence if disconnected. if (SparkManager.getConnection().isConnected()) { // Send Presence Packet SparkManager.getConnection().sendPacket(presence); } } COM: <s> update the current availability of the user </s>
funcom_train/36680786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveCursorToPreviousLocation() { if (canMoveInCursorTraversalMode()) { if (cursorTraversalPos - 1 < 0) { cursorTraversalPos = restrictedCursorRange.size() - 1; } else { cursorTraversalPos--; } Location previousLocation = restrictedCursorRange.get(cursorTraversalPos); moveCursor(previousLocation); } } COM: <s> move the cursor to the previous location in </s>
funcom_train/29656451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateValues() { try { if (parameterable instanceof GraphicalStandAloneObject) { ((GraphicalStandAloneObject) parameterable).setUIParameterValue(uiParameter); } else { ((GeneralUIParameter) uiParameter).updateParameter(parameterable); } } catch (IncorrectParameterTypeException e) { e.printStackTrace(); } } COM: <s> updates the parameters of embedded parametrable from ui values </s>
funcom_train/1958100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFail() { System.out.println("** trace < dsfjkldsioewewjndsfkjldsfkjldsf.ch > ** "); // this host should not exists and therefore it is unreachable ie result == -1 try { tr.traceRoute(30, 2000, "dsfjkldsioewewjndsfkjldsfkjldsf.ch"); fail("Expected exception to be thrown when trying to traceroute to an nonexisting host"); } catch (TraceRouteException e) { //this is expected. } } COM: <s> test a traceroute object with target host </s>
funcom_train/35730076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node proceed() throws TexyException { // TBD: How would this happen? if( ! this.iterator.hasNext() ) throw new IllegalStateException("No more handlers."); AroundEventListener handler = this.iterator.next(); Node res = handler.onEvent( this.event ); if( null == res ) //throw new TexyInvocationException log.warning( "Event handler '"+handler.getClass().getName() +"' for '"+handler.getEventClass()+ "' returned null."); return res; } COM: <s> calls next handler in the queue </s>
funcom_train/37445666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int columnAtPoint(final Point point) { int lockedWidth = lockedTable.getWidth(); if (point.x < lockedWidth) { return lockedTable.columnAtPoint(point); } else { Point p = new Point(point.x - lockedWidth, point.y); return frozenColumns + scrollTable.columnAtPoint(p); } } COM: <s> returns the index of the column that code point code lies in </s>
funcom_train/13864968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getDigit(char ch) { if ('0' <= ch && ch <= '0' + 9) { return (ch - '0'); } else { char zeroChar = numberConstants.zeroDigit().charAt(0); return ((zeroChar <= ch && ch <= zeroChar + 9) ? (ch - zeroChar) : -1); } } COM: <s> this method return the digit that represented by current character it </s>
funcom_train/23794673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void storeHelper(AvExCache cache, Instruction inst) { FieldOperand loc = ((HasField)inst).getField(); if (loc.mayBeVolatile()) return; // don't optimize volatile fields // look up the expression in the cache AvailableExpression ae = cache.find(inst); if (ae == null) { // did not find a match: insert new entry in cache cache.insert(inst); } } COM: <s> process a store instruction </s>
funcom_train/3430113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeContent(Node node) { NodeList list = node.getChildNodes(); if (list.getLength() > 0) { Node n = list.item(0); if (null != n) { n.getParentNode().removeChild(n); } removeContent(node); } } COM: <s> removes the contents of a code node code </s>
funcom_train/8470271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveToLine(int lineNum) throws IOException { // If we are trying to go backward in the stream, close it and // restart from the beginning if (lineNum < currentLineNumber) { reset(); } for (int i = currentLineNumber; i < lineNum; ++i) { current.readLine(); } // Update to the new line number currentLineNumber = lineNum; } COM: <s> move the reader to the specified line number </s>
funcom_train/37587130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePendingRequest (DocumentDebugAction<?> action) { String className = action.getClassName(); Vector<DocumentDebugAction<?>> actions = _pendingActions.get(className); if (actions == null) { return; } actions.remove(action); // check if the vector is empty if (actions.size() == 0) { _pendingActions.remove(className); } } COM: <s> called if a breakpoint is set and removed before its class is prepared </s>