__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/43245303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetStreetAddr2() { System.out.println("setStreetAddr2"); String streetAddr2 = ""; FamilyDemographicDependentObject instance = new FamilyDemographicDependentObject(); instance.setStreetAddr2(streetAddr2); // 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 street addr2 method of class org </s>
funcom_train/13137523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLocked() { if (!MRole.getDefault(m_vo.ctx, false).isPersonalLock()) return false; if (m_Lock == null) loadLocks(); if (m_Lock == null || m_Lock.isEmpty()) return false; // Integer key = new Integer(m_mTable.getKeyID (m_currentRow)); return m_Lock.contains(key); COM: <s> record is locked </s>
funcom_train/17828626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDriverFile(String name) { driverFiles.add(name); File file = new File(name); if (file.exists()) { driverManager.load(file); } else { System.err.println("WARNING: Could not load driver file '" + file.toString() + "'"); } } COM: <s> adds an additional file in the format of the drivers </s>
funcom_train/3369485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVerticalTextPosition(int textPosition) { if (textPosition == verticalTextPosition) return; int oldValue = verticalTextPosition; verticalTextPosition = checkVerticalKey(textPosition, "verticalTextPosition"); firePropertyChange(VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, oldValue, verticalTextPosition); revalidate(); repaint(); } COM: <s> sets the vertical position of the text relative to the icon </s>
funcom_train/50225165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addInput(Object key, String name) { inputs.addConnector(name, new NetworkInput(name)); SDFInput in = new SDFInput(); in.setName(name); sdfinputs.put(key, in); objects.put(key,in); namedsdfinputs.put(name, in); } COM: <s> add input adds an input to this sdf graph </s>
funcom_train/3561625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showPreviousPane() { if (visiblePane > 0) { wizPanels[visiblePane].setVisible(false); visiblePane--; wizPanels[visiblePane].setVisible(true); butNext.setEnabled(true); if (visiblePane == 0) butBack.setEnabled(false); else butBack.setEnabled(true); initDescription(); } } COM: <s> shows the previous pane </s>
funcom_train/28763328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProcessId(java.lang.String value) throws com.intersys.objects.CacheException { com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value); mInternal.setProperty(ii_ProcessId, jj_ProcessId,kk_ProcessId, com.intersys.objects.Database.RET_PRIM, "ProcessId", dh); return; } COM: <s> sets new value for code process id code </s>
funcom_train/4106215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand1() { if (backCommand1 == null) {//GEN-END:|22-getter|0|22-preInit // write pre-init user code here backCommand1 = new Command("Back", Command.BACK, 0);//GEN-LINE:|22-getter|1|22-postInit // write post-init user code here }//GEN-BEGIN:|22-getter|2| return backCommand1; } COM: <s> returns an initiliazed instance of back command1 component </s>
funcom_train/7309441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void installListeners(AbstractButton b) { super.installListeners(b); PropertyChangeListener listener = new ButtonMarginListener(getPropertyPrefix()); b.putClientProperty(ButtonMarginListener.CLIENT_KEY, listener); b.addPropertyChangeListener(Options.IS_NARROW_KEY, listener); } COM: <s> installs an extra listener for a change of the is narrow property </s>
funcom_train/46701476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void validate(final UJO ujo, String message, Object ... parameters) throws IllegalArgumentException { if (!evaluate(ujo)) { final String msg = parameters!=null && parameters.length>0 ? String.format(message, parameters) : message ; throw new IllegalArgumentException(msg); } } COM: <s> evaluate an object along this criterion </s>
funcom_train/48504901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testKeyFromKindAndName() { Key key = new Key(kind, name); assertEquals(kind, key.getKind()); assertEquals(name, key.getName()); assertNull(key.getParent()); assertEquals(0L, key.getId()); } COM: <s> test key from kind and name </s>
funcom_train/29019165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void internal_dispose_GC (int /*long*/ hDC, GCData data) { checkWidget (); int /*long*/ hwnd = handle; if (data != null && data.hwnd != 0) { hwnd = data.hwnd; } if (data == null || data.ps == null) { OS.ReleaseDC (hwnd, hDC); } else { OS.EndPaint (hwnd, data.ps); } } COM: <s> invokes platform specific functionality to dispose a gc handle </s>
funcom_train/22542887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void banContact(Contact contact) { // Remove all values by this contact for(DHTValueEntity entity: values()) { if(entity.getCreator().equals(contact)) { remove(entity); } } // Ban the Host if possible HostFilter f = filter; if (f != null) { f.ban(contact.getContactAddress()); } } COM: <s> bans the given contact and removes all values the contact </s>
funcom_train/19748137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMenuComponent(MenuComponent menuComponent) { if ( (menuComponent.getName() == null) || (menuComponent.getName().equals("")) ) { menuComponent.setName(this.name + menuComponents.size()); } if ( !menuComponents.contains(menuComponent) ) { menuComponents.add(menuComponent); menuComponent.setParent(this); } } COM: <s> adds a menu component to list of children </s>
funcom_train/45250583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void activate(IWorkbenchPage page, Object selectedItem) { if (selectedItem != null) { if (selectedItem instanceof IEditorReference) { page.setEditorAreaVisible(true); } if (selectedItem instanceof IWorkbenchPartReference) { IWorkbenchPart part = ((IWorkbenchPartReference) selectedItem) .getPart(true); if (part != null) { page.activate(part); } } if (selectedItem instanceof IPerspectiveDescriptor){ IPerspectiveDescriptor persp = (IPerspectiveDescriptor) selectedItem; page.setPerspective(persp); } } } COM: <s> activate the selected item </s>
funcom_train/29018616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelection (int value) { checkWidget (); int [] max = new int [1], min = new int [1]; OS.SendMessage (hwndUpDown , OS.UDM_GETRANGE32, min, max); value = Math.min (Math.max (min [0], value), max [0]); setSelection (value, true, true, false); } COM: <s> sets the em selection em which is the receivers </s>
funcom_train/22031363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { TiffRational q = (TiffRational) o; long diff = (numer * q.denom - q.numer * denom); if (diff > Integer.MAX_VALUE) diff = Integer.MAX_VALUE; else if (diff < Integer.MIN_VALUE) diff = Integer.MIN_VALUE; return (int) diff; } COM: <s> compares this object with the specified object for order </s>
funcom_train/21753448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeEventForm(EventForm defined) { EventFormPK eventFormPK = new EventFormPK(); eventFormPK.setEventId(defined.getEventId()); eventFormPK.setFormId(defined.getFormId()); // delete em.remove(defined); // remove form em.remove(em.find(Form.class, defined.getFormId())); } COM: <s> removes event form and its dependencies </s>
funcom_train/19825272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean containsIgnoreCase(List l, List l2) { for (Iterator i = l.iterator(); i.hasNext(); ) { String s = (String)i.next(); for (Iterator j = l2.iterator(); j.hasNext(); ) { if (s.equalsIgnoreCase((String)j.next())) { return true; } } } return false; } COM: <s> check if a string exists in a list </s>
funcom_train/10767266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OExpression constantExpr(boolean value) { OConstantExpression ce = new OConstantExpression(_oprocess, value ? Boolean.TRUE : Boolean.FALSE); ce.debugInfo = createDebugInfo(_processDef, "Constant Boolean Expression: " + value); ce.expressionLanguage = _konstExprLang; return ce; } COM: <s> produce a boolean </s>
funcom_train/45075807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DynamicAttributeService getDynamicAttribute(String daName) { if (das != null) return das; else { org.omg.CORBA.Object obj = ns.connect(daName); das = DynamicAttributeServiceHelper.narrow(obj); cat.debug("getDynamicAttribute: "+daName+ " obtained from NameService"); } return das; } COM: <s> get the dynamic attribute service </s>
funcom_train/40297193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convertListToString(List<String> strings) { StringBuilder content = new StringBuilder(""); if (strings != null && strings.size() > 0) { for (String description : strings) { content.append(description); } return content.toString(); } return null; } COM: <s> this method concatenates a list of strings into a single string which </s>
funcom_train/46932301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { numSkills = group.getNumSkills(); skills = new CharSkill[numSkills]; int offset = 0; for(Enumeration e=group.getSkills();e.hasMoreElements();) { skills[offset] = (CharSkill)e.nextElement(); if(skills[offset].getTrainingToLevel()>0) { training = skills[offset]; blinkGroup = true; } offset++; } } COM: <s> get information about the groups skills </s>
funcom_train/19338509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showCategories (ArrayList categories) { categoriesList.setValueIsAdjusting (true); listModel.removeAllElements (); for (int i = 0; i < categories.size (); i++) { listModel.addElement (((Category) categories.get (i)).getName ()); } } COM: <s> shows items of a given category in the categories list </s>
funcom_train/3291538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String applyForeignKeyScheme(String fieldName, String fieldType, String reference) { String scheme=applyScheme(getForeignKeyScheme(),fieldName, fieldType, reference); if (scheme==null) { return applyNotNullScheme(fieldName,fieldType); } else { return scheme; } } COM: <s> applies the foreign key scheme if available </s>
funcom_train/9906954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resumeAgent(final String name, final boolean nametype) throws JadeRuntimeException { try { jadeControllerContainer.sendResumeToInfiltratorAgent(name, nametype); } catch (ContentException e) { String errorMessage = format("Failed to execute ResumeAgent for %s", name); logFailedToExecuteMessageAndThrowJadeRuntimeException(errorMessage, e); } } COM: <s> resume an agent on a remote container </s>
funcom_train/3775104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validateField() { validationErrors.clear(); isValid = true; if (validators == null) { return; } Iterator it = validators.iterator(); while (it.hasNext()) { Validator val = (Validator) it.next(); if (!val.isValid(formNode)) { validationErrors.add(val.description()); isValid = false; } } if (isValid) { if (textField != null) { textField.setBackground(Color.white); } errorButton.setVisible(false); } else { textField.setBackground(Color.pink); errorButton.setMessage(validationErrors); errorButton.setVisible(true); } } COM: <s> all validators are asked to validate the field </s>
funcom_train/31127073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getVendorID(){ byte[] buf = new byte[8]; int failed = this.getData(0x08, buf, 8); if(failed!=0) return "failed. "; String str="l:"; for(int i=0; i<8; i++){ str+=(char)buf[i]; } return str; } COM: <s> method used to know the product id </s>
funcom_train/29792318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSubjectContainsFilter() throws Exception { // add message to folder Object uid = addMessage(); // !!! Subject: test // create filter configuration // -> check if <Subject> <contains> pattern <test> MailFilterCriteria criteria = MailFilterFactory .createSubjectContains("test"); // create filter HeaderfieldFilter filter = new HeaderfieldFilter(); // init configuration filter.setUp(criteria); // execute filter boolean result = filter.process(getSourceFolder(), uid); assertEquals("filter result", true, result); } COM: <s> check if subject contains test </s>
funcom_train/37004979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renameMethod(MethodDeclaration methodDeclaration, String newName) throws DuplicateNameException { SimpleName newSimpleName = ast.newSimpleName(newName); if (compilationUnitEx.findMethod(newName) != null) { throw new DuplicateNameException(); } // if preconditions are fine, perform a method rename astRewrite.set(methodDeclaration, MethodDeclaration.NAME_PROPERTY, newSimpleName, null); } COM: <s> this method renames a given method </s>
funcom_train/20117940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean lockConnection() throws RepositoryException { if (!_connectionLocked) { _repository.lockDatabaseConnection(getDatabaseName()); _connectionLocked = true; _question = new QuestionEvent(QuestionEvent.LOG_ACTION, Strings.padWithDots("Locking connection to '" + getDatabaseName() + "'") + "ok\n"); return true; } return false; } COM: <s> lock connection to database </s>
funcom_train/458691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void adjustmentValueChanged(AdjustmentEvent e) { Transform3D rot1 = new Transform3D(); rot1.rotX((mHSlider.getValue() * Math.PI) / mScrollGranularity); Transform3D rot2 = new Transform3D(); rot2.rotY((mVSlider.getValue() * Math.PI) / mScrollGranularity); rot1.mul(rot2); mRotator.setTransform(rot1); } COM: <s> called when the scrollbar is moved </s>
funcom_train/20655229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(getJbClose(), null); // Generated jContentPane.add(getJScrollPane(), null); // Generated } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/4381816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getListControl(Composite parent) { if (list == null) { list = new List(parent, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL); list.setFont(parent.getFont()); list.addSelectionListener(getSelectionListener()); list.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent event) { list = null; } }); } else { checkParent(list, parent); } return list; } COM: <s> returns this field editors list control </s>
funcom_train/886067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void positionCursorAfterCurrentImage() { AttributeSet imageAttributes = getCurrentImageAttributes(); if (imageAttributes != null) { if (imageAttributes instanceof Element) { Element ele = (Element) imageAttributes; int endOfElement = ele.getEndOffset(); getCaret().setDot(endOfElement); getLog().info("jumping to end of image"); //$NON-NLS-1$ } } } COM: <s> set the cursor to the end of the image i </s>
funcom_train/32374866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LocalRoleManager getRoleManager(){ LocalRoleManager localRoleMgr = null; try{ LocalRoleManagerHome localRoleMgrHome = (LocalRoleManagerHome) serviceLocator.getEJBLocalHome(JNDINames.ROLE_MANAGER); localRoleMgr = (LocalRoleManager) localRoleMgrHome.create(); } catch(NamingException ne){ logger.error("NamingException"+ne.getMessage()); } catch(CreateException ce){ logger.error("Could not create LocalRoleManager"+ce.getMessage()); } return localRoleMgr; } COM: <s> method return a local role manager </s>
funcom_train/38388308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void primarykeys(PyObject qualifier, PyObject owner, PyObject table) { clear(); String q = getMetaDataName(qualifier); String o = getMetaDataName(owner); String t = getMetaDataName(table); try { this.fetch.add(getMetaData().getPrimaryKeys(q, o, t)); } catch (SQLException e) { throw zxJDBC.newError(e); } } COM: <s> gets a description of a tables primary key columns </s>
funcom_train/2739861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String le(List<Term> argsTerm) { String left = env.tp.visit(argsTerm.get(0)); String right = env.tp.visit(argsTerm.get(1)); if(Util.simplify) { try { int leftNumber = Integer.parseInt(left); int rightNumber = Integer.parseInt(right); if(leftNumber <= rightNumber) { return Util.trueString; } else { return Util.falseString; } } catch(NumberFormatException e) {} } return Util.setPars(left + " <= " + right); } COM: <s> executes the less than or equal function </s>
funcom_train/23058274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar createMenuBar() { menu.add(createFocusViewMenu()); menu.add(createThemesMenu()); menu.add(createPropertiesMenu()); menu.add(createFileMenu()); menu.add(createServiceMenu()); menu.add(createStyleMenu()); menu.add(createHelpMenu()); return menu; } COM: <s> creates the frame menu bar </s>
funcom_train/4971569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createHideButton(Composite filterCm, final Hide hide) { final Button button = new Button(filterCm, SWT.CHECK); button.setText(hide.label); button.setSelection(hide.enabled); button.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); button.addSelectionListener(new SelectionListener() { public void widgetDefaultSelected(SelectionEvent ev) {} public void widgetSelected(SelectionEvent ev) { boolean selected = button.getSelection(); if (selected) cb.removeHide(hide); else cb.addHide(hide); } }); } COM: <s> create a checkbox hiding some parts of the graph </s>
funcom_train/23267829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetFechaOperacion() { System.out.println("getFechaOperacion"); Movimientos instance = new Movimientos(); String expResult = ""; String result = instance.getFechaOperacion(); 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 fecha operacion method of class capa negocios </s>
funcom_train/5724503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (this == object) { return true; } if (!(object instanceof AuthenticationDomainInfo)) { return false; } final AuthenticationDomainInfo that = (AuthenticationDomainInfo) object; if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) { return false; } return true; } COM: <s> returns code true code if the argument is an authentication domain info </s>
funcom_train/10865736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDontStem() throws IOException { CzechAnalyzer cz = new CzechAnalyzer(TEST_VERSION_CURRENT); assertAnalyzesTo(cz, "e", new String[] { "e" }); assertAnalyzesTo(cz, "zi", new String[] { "zi" }); } COM: <s> test that very short words are not stemmed </s>
funcom_train/51811964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBasicPluggingInOfBean() { ApplicationContext ctx = new ClassPathXmlApplicationContext( "classpath:oranjestad/spring/plugin/BasicPluggingInOfBean.xml"); Broadcaster broadcaster = (Broadcaster) ctx.getBean("extension-point.broadcaster"); List listeners = broadcaster.getListeners(); assertEquals("Wrong number of children in listeners", 2, listeners.size()); } COM: <s> test loads in the external context file and verifies that the right </s>
funcom_train/4787586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWeeksVisible(boolean weeksVisible) { checkWidget(); if ( weeksVisible != this.weeksVisible ) { this.weeksVisible = weeksVisible; GridData data = (GridData) weeksPanel.getLayoutData(); data.exclude = ! weeksVisible; data = (GridData) gridHeader.getLayoutData(); data.horizontalSpan = weeksVisible ? 1 : 2; data = (GridData) grid.getLayoutData(); data.horizontalSpan = weeksVisible ? 1 : 2; layout(true); } } COM: <s> sets the weeks numbers visible or not </s>
funcom_train/10858275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClassicTokenizer() throws Exception { Reader reader = new StringReader("What's this thing do?"); ClassicTokenizerFactory factory = new ClassicTokenizerFactory(); factory.init(DEFAULT_VERSION_PARAM); Tokenizer stream = factory.create(reader); assertTokenStreamContents(stream, new String[] {"What's", "this", "thing", "do" }); } COM: <s> test classic tokenizer factory </s>
funcom_train/16651850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getTaskNodeText(String key) { String msg = messages.get(key); /* if the message can't be retrieved, we get the key back. So if the key does not * equal the message, it's fine. If it does, we don't know the description of the task-node. */ if (!key.equals(msg)) { return msg; } log.warn("Cant retrieve message for key #0", key); return "unknown"; } COM: <s> retrieves the text of the key from the messages file </s>
funcom_train/47281272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deOpaquify(Container c) { for (int i = 0; i < c.getComponentCount(); i++) { Component cc = c.getComponent(i); if (cc instanceof JComponent && !opaqueComponents.contains(cc.getClass())) { ((JComponent) cc).setOpaque(false); } if (cc instanceof Container) { deOpaquify((Container) cc); } } } COM: <s> walks the tree of components rooted at c setting all of the components </s>
funcom_train/49156843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readLine() throws IOException { currentLine = reader.read(); if (currentLine != null && (currentLine.getPreferredLayoutIdx() >= 0)) { lines[currentLine.getPreferredLayoutIdx()] = currentLine; // System.out.println("## ReadFile ## " + currentLine.getPreferredLayoutIdx() // + " >> " + currentLine.getField(0, 0)); } } COM: <s> read one line and store it in the lines array </s>
funcom_train/18377037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createManagerCombo() { GridData gridData = new org.eclipse.swt.layout.GridData(); gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; gridData.grabExcessHorizontalSpace = true; gridData.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER; managerCombo = new Combo(sShell, SWT.NONE); managerCombo.setLayoutData(gridData); } COM: <s> this method initializes manager combo </s>
funcom_train/51812433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsProxyCreatedWithProxyJDKProxy() { Runnable r = (Runnable) java.lang.reflect.Proxy.newProxyInstance(getClassLoader(), new Class[] { Runnable.class }, handler); assertTrue("Proxy not considered a proxy", Proxy.isProxyClass(r.getClass())); } COM: <s> tests that proxies created with the jdk proxy mechanism are detected </s>
funcom_train/31239982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void renderSelf() { GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_BLEND); GL11.glTexEnvi(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, GL11.GL_MODULATE); Color c = getForegroundColor(); if (c == null) c = Interface.getDefaultForeground(); if (!isEnabled()) c = Interface.getControlDisabledTextColor(); setGLColor(c.getRed(), c.getGreen(), c.getBlue(), c.getAlpha()); // Draw the label... label.render(); postRender(); renderButton(); preRender(); } COM: <s> render this components graphics </s>
funcom_train/29645872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer rc = new StringBuffer("Person: "); rc.append(personid); rc.append(", "); rc.append(lastname); rc.append(", " + firstname); rc.append(", born " + formatter.format(birthdate)); rc.append(", phone " + phoneNumbers); return rc.toString(); } COM: <s> return a string representation of a code person code object </s>
funcom_train/6464881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScalingScheme(IScalingScheme scaler) { if(scaler == null) { AILibException e = new AILibException(getClass(), "setScalingScheme(IScalingScheme)", Messages.get("null.argument")); return; } this.scaler = scaler.duplicate(); scaled = false; } COM: <s> assigns a scaling scheme to this population </s>
funcom_train/17528508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String decrypt(String str) { try { // Decode base64 to get bytes byte[] dec = new sun.misc.BASE64Decoder().decodeBuffer(str); // Decrypt byte[] utf8 = dcipher.doFinal(dec); // Decode using utf-8 return new String(utf8, "UTF8"); } catch (BadPaddingException e) { } catch (IllegalBlockSizeException e) { } catch (UnsupportedEncodingException e) { } catch (IOException e) { } return null; } COM: <s> takes a encrypted string as an argument decrypts and returns the </s>
funcom_train/23393630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNormPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NormConditionFulfilment_norm_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NormConditionFulfilment_norm_feature", "_UI_NormConditionFulfilment_type"), FactPackage.Literals.NORM_CONDITION_FULFILMENT__NORM, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the norm feature </s>
funcom_train/40913693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moreProperties(Properties props) { if (props != null) { Enumeration<?> e = props.propertyNames(); while (e.hasMoreElements()) { String key = (String) e.nextElement(); setProperty(key, props.getProperty(key)); } } } COM: <s> core properties methods </s>
funcom_train/20887298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getLabelFromFile(File file) { final String filePath = file.getAbsolutePath(); final String rootPath = rootFolder.getAbsolutePath(); final String f; if (filePath.startsWith(rootPath)) { f = filePath.substring(rootPath.length()); } else { f = filePath; } return f.replace('\\', '/'); } COM: <s> returns the title of the container </s>
funcom_train/49009302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getAddNoiseButton() { if (addNoiseButton == null) { addNoiseButton = new JButton(); addNoiseButton.setText("添加噪声"); addNoiseButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getModel().getNN().addNoise(); } }); } return addNoiseButton; } COM: <s> this method initializes add noise button </s>
funcom_train/14625627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int evaluateSSLDialog(){ m_mode = MODE_NONE; Shell shell=m_dialogSSL.getShell(); Display display=shell.getDisplay(); m_dialogSSL.setVisible(true); while(m_mode == MODE_NONE){ if(!display.readAndDispatch()) display.sleep(); } m_dialogSSL.setVisible(false); return m_mode; } COM: <s> shows the ssl dialog and returns the code </s>
funcom_train/3175833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Indi getSpouse(int which) { Indi husband = getHusband(); if (husband!=null) { if (which==0) return husband; which--; } Indi wife = getWife(); if (wife!=null) { if (which==0) return wife; which--; } throw new IllegalArgumentException("No such spouse"); } COM: <s> spouse by index </s>
funcom_train/51189160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExtensionAppearsMoreThanOnce() throws Exception { assertPathSpecMatches("*.php", "/hello.php/hello.php", "/hello.php", "/hello.php"); assertPathSpecMatches("*.php", "/hello.php/hello.php/pathInfo", "/hello.php", "/hello.php/pathInfo"); } COM: <s> todo undefined as i dont know what the expected behaviour is </s>
funcom_train/3093935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getOptionDouble(String aName, double aDefault) { double value = aDefault; Object obj = get(aName); if (obj!=null) { if (obj instanceof Number) value = ((Number)obj).doubleValue(); else { String msg = "Property `"+aName+"' read from the config file "+ "is not a number! Ignored."; System.err.println(msg); } } String property = getPropertySafe( prefix + aName ); if (property != null) value = Double.parseDouble(property); return value; } COM: <s> gets the requested double value from the hash table or from the </s>
funcom_train/10008696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initVideoChat(String buddyId){ if(isVideoInProgress() == false) { Buddy buddy = BuddyList.getInstance().getBuddy(buddyId); selectedBuddy = buddyId; try { requestMediaChat(); } catch(ConnectionException e) { SinkLog.log(e); new ErrorController(e); } catch(IllegalStateException e) { SinkLog.log(e); new ErrorController(e); } } } COM: <s> request a video chat with the specified buddy </s>
funcom_train/22498855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getLastTableCell(final Element cell) { final Element table = cell.getParentElement().getParentElement(); final Element lastRow = table.getElement(table.getElementCount() - 1); final Element lastCell = lastRow.getElement(lastRow.getElementCount() - 1); return lastCell; } COM: <s> get the last cell of the table a given table cell belongs to </s>
funcom_train/26013972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean lineToSpeech(String path) { boolean ok = true; voice.startBatch(); try { BufferedReader reader = new BufferedReader(new FileReader(path)); String line; while ((line = reader.readLine()) != null && ok) { ok = textToSpeech(line); } reader.close(); } catch (IOException ioe) { voice.error("can't read " + path); } voice.endBatch(); return ok; } COM: <s> reads the file pointed to by the given path and </s>
funcom_train/10590530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setTypedWidget(String loc, Attributes attrs, Class wclass, String wname) throws SAXException { setWidget(loc, attrs); if (!wclass.isInstance(widget)) { throw new SAXException("Element '" + loc + "' can only be used with " + wname + " widgets, " + "at " + getLocation()); } } COM: <s> set typed widget by the id attribute </s>
funcom_train/29017982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Font getFont (int index) { checkWidget (); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); int count = Math.max (1, parent.getColumnCount ()); if (0 > index || index > count -1) return getFont (); if (cellFont == null || cellFont [index] == null) return getFont (); return cellFont [index]; } COM: <s> returns the font that the receiver will use to paint textual information </s>
funcom_train/46057727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doFuzzySearch(String query, UserRequest ureq) throws ServiceNotAvailableException, ParseException, QueryException { // found no words with spell-checker => try fuzzy search this.getWindowControl().setInfo(translator.translate("found.no.result.try.fuzzy.search")); searchResults = searchService.doSearch(query + FUZZY_SEARCH,ureq.getIdentity(), ureq.getUserSession().getRoles(), doHighlighting); } COM: <s> do a fuzzy search to find similar results </s>
funcom_train/23327919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void viewerClicked(SubModuleTreeItem treeitem) { String url = ((SubModuleTreeItem) treeitem).getSubModule().getViewerDoc(); ExternalLinkDialog externalLink = new ExternalLinkDialog(); if (!url.equals("")) { externalLink.setLink(url); } externalLink.show(); } COM: <s> user has clicked the show viewer icon on given sub module tree item </s>
funcom_train/37075229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CompoundTransaction setAnnotName(AnnotatedFeatureI annot, String newName) { CompoundTransaction ct = new CompoundTransaction(this); String oldName = annot.getName(); // get old name before edit ct.addTransaction(setName(annot,newName)); ct.addTransaction(addSynonym(annot,oldName)); ct.addTransaction(setAllTranscriptNamesFromAnnot(annot)); return ct; } COM: <s> this is for top level annots eg gene </s>
funcom_train/39184638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveTaskDown(int num){ if(canMoveDown(num)){ Task t = (Task)tasks.elementAt(num+1); tasks.setElementAt(tasks.elementAt(num),num+1); tasks.setElementAt(t,num); this.fireContentsChanged(this,num,num+1); } } COM: <s> moves a task down the scheduled list if it is possible </s>
funcom_train/19309739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int endOfRange(final char[] charArray, final int startOfRange) { int endOfRange = -1; for (int i = startOfRange; i < charArray.length - 1 && endOfRange < 0; i++) { if (! sameRangeEntryAsNext(charArray, i)) { endOfRange = i; } } return endOfRange; } COM: <s> find the end of the current range </s>
funcom_train/27844621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSetIndexVarName() throws Exception { _slistModel.setIndexVarName("i"); assertEquals("i", _slistModel.getIndexVarName()); _slistModel.setIndexVarName("j"); assertEquals("j", _slistModel.getIndexVarName()); } COM: <s> test for get set index var name </s>
funcom_train/35326767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkTopLevelWindow(Object window) { if (window == null) { throw new NullPointerException("window can't be null"); } try { checkPermission(SecurityConstants.AWT.TOPLEVEL_WINDOW_PERMISSION); return true; } catch (SecurityException se) { // just return false } return false; } COM: <s> returns code false code if the calling </s>
funcom_train/44709185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChangeListener(ChangeListener l) { Assert.assertNotLocked(this); if ( m_changeListener == null ) { m_changeListener = createChangeListener(); s_cat.debug("Adding new listener"); m_selection.addChangeListener(m_changeListener); } m_listeners.add(ChangeListener.class, l); } COM: <s> adds a change listener </s>
funcom_train/3156666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFlag(String name, int flagMask, String description) { Guardian.assertNotNull("name", name); MetadataAttribute attribute = new MetadataAttribute(name, ProductData.TYPE_INT32); attribute.setDataElems(new int[]{flagMask}); if (description != null) { attribute.setDescription(description); } addAttribute(attribute); } COM: <s> adds a new flag definition to this flags coding </s>
funcom_train/2843119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if (isSelected) setBackground(table.getSelectionBackground()); else setBackground(table.getBackground()); visibleRow = row; // printDebug(); return this; } COM: <s> tree cell renderer method </s>
funcom_train/16786712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void linkResponsibleDepartmentByPageGuid(String responsibleTableRowPageGuid) throws RQLException { Page depPageOrNull = getResponsibleDeparmentRowByPageGuid(responsibleTableRowPageGuid); if (depPageOrNull == null) { throw new InvalidResponsibleDepartmentException("Responsible department row for given page guid " + responsibleTableRowPageGuid + " cannot be found. Try with a valid number again."); } linkResponsibleDepartment(depPageOrNull); } COM: <s> connect page with the given responsible table row page guid to this page </s>
funcom_train/12164475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testName() throws Exception { CacheConfiguration config = new CacheConfiguration(); String value = "name"; config.setName(value); String result = config.getName(); assertNotNull("Result should not be null", result); assertEquals("Initial value and result should match", value, result); } COM: <s> test the set get name methods </s>
funcom_train/32791262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleRelLesser(String codeSrcExp, List<String> args, StringBuffer rule, StringBuffer spec) { assert(args.size() == 1) : "Relational expression < needs exactly one argument"; codeAgent.setArgument("add_exp_1", codeSrcExp); codeAgent.setArgument("add_exp_2", args.get(0)); rule.append("relational_expression_tail"); spec.append("lt"); } COM: <s> parameterizes the code agent for a relational lesser operation </s>
funcom_train/44222655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String updateLayerVisibility(String svgContext, String nodeId, boolean visible) { String updatedContext = null; SVGDOMHandler domHandler = new SVGDOMHandler(); try { SVGDocument svgDoc = domHandler.createLayerSVGDocument(svgContext); domHandler.updateLayerVisibility(svgDoc, nodeId, visible); updatedContext = domHandler.dumpSVGDocumentToString(svgDoc); } catch (Exception ex) { ex.printStackTrace(); } return updatedContext; } COM: <s> p update the layer visibility in the given svg context </s>
funcom_train/25646611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(TreeMap<String, String> model) { //create tabel model this.keywordTranslationTable.setDefaultRenderer(this.keywordTranslationTable.getColumnClass(0), new LocigalNameCellRenderer()); this.keywordTranslationTable.setModel(new KeywordToTranslationTableModel(model)); } COM: <s> this initializes the table in dialog and sets the data for it </s>
funcom_train/43325958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean CompStr( String val, String val2 ) { int cmp = val.compareTo(val2); switch (operator) { case GREATER: return cmp > 0; case GREATER_EQUAL: return cmp >= 0; case EQUAL: return cmp == 0; case LESS: return cmp < 0; case LESS_EQUAL: return cmp <= 0; case NOT_EQUAL: default: return cmp != 0; } } COM: <s> compares two strings according to the operator class member value </s>
funcom_train/22276495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPrevalentCall_finderBeanNotFound(){ //A) finder bean not found //B) finder class not found //C) finder bean construction failure BusObj2 busObj2 = new BusObj2("arbitraryUID"); expect(beanFactory.getBean("busObj2Finder")).andThrow(new NoSuchBeanDefinitionException("busObj2Finder")); busObj2.test(); //BusObj2Finder fail("Implement me"); } COM: <s> tests handling of condition where a finder bean cannot be located </s>
funcom_train/7798519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Symbol readNext() throws CoreException { currentToken = null; try { currentToken = this.scanner.next_token(); } catch (Exception e) { throw new CoreException(createError(LEXICAL_ERROR, e.getMessage(), e)); } if (currentToken.sym == END_OF_FILE) { throw new CoreException(createError(END_OF_FILE, "End Of File", null)); //$NON-NLS-1$ } return currentToken; } COM: <s> reads the next token </s>
funcom_train/7532407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties getOtherProperties() { try { Properties p = new Properties(); int localPort = Integer.parseInt(args[0]); p.setProperty(PGridP2P.PROP_LOCAL_PORT, String.valueOf(localPort)); return p; } catch (IndexOutOfBoundsException e) { System.err.println("Invalid number of arguments"); printUsage(); throw new RuntimeException(e); } catch (NumberFormatException e) { System.err.println("Could not determine local port number"); printUsage(); throw new RuntimeException(e); } } COM: <s> get the local service port number to use </s>
funcom_train/43827664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CPNProduct_types_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CPNProduct_types_feature", "_UI_CPNProduct_type"), CpntypesPackage.Literals.CPN_PRODUCT__TYPES, true, false, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the types feature </s>
funcom_train/38467769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TurnAction createTurnAction(HttpServletRequest servletRequest) { TurnAction action = null; String side = servletRequest.getParameter("side"); if(side != null) { if(side.equals("left")) { action = new TurnAction(TurnAction.LEFT); } if(side.equals("right")) { action = new TurnAction(TurnAction.RIGHT); } } return action; } COM: <s> creates a code turn action code </s>
funcom_train/14028094
/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 (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TypedSyncPoint typedSyncPoint = (TypedSyncPoint)o; if (_code != typedSyncPoint._code) { return false; } if (_tid != typedSyncPoint._tid) { return false; } return true; } COM: <s> return true if the object is equal to this synchronization point </s>
funcom_train/9135727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ISolutionPoint getBestRecentSolution() { return new CMASolution(genoPhenoTransformation(arx[fit.raw[0].i], null), fit.raw[0].val, counteval - sp.getLambda() + fit.raw[0].i + 1); } COM: <s> get best evaluated solution of the last recent iteration </s>
funcom_train/29548547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enableWebTypeButtons() { browseConceptForConceptButton.setEnabled(false); browseNotebookForConceptButton.setEnabled(false); notebookForConceptLabel.setEnabled(false); conceptForConceptLabel.setEnabled(false); browseNotebookForNotebookButton.setEnabled(false); notebookForNotebookLabel.setEnabled(false); webLabel.setEnabled(true); } COM: <s> enable the web type buttons </s>
funcom_train/8576448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Message getUpdate() { try{ byte[] dataIn = new byte[5000]; DatagramPacket inPack = new DatagramPacket( dataIn, dataIn.length ); sock.receive( inPack ); String in = new String( inPack.getData(), 0, inPack.getLength() ); MessageParser parse = new MessageParser( in ); return parse.parseMessage(); } catch( Exception e ) { e.printStackTrace(); return null; } } COM: <s> general message receiving method </s>
funcom_train/48266161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeNavigationAndExportLinks() { // Put the page stuff there if it needs to be there... if (this.properties.getAddPagingBannerBottom()) { writeSearchResultAndNavigation(); } // add export links (only if the table is not empty) if (this.export && this.tableModel.getRowListPage().size() != 0) { writeExportLinks(); } } COM: <s> generates table footer with links for export commands </s>
funcom_train/16221350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSON readFromStream( InputStream stream ) { try{ StringBuffer xml = new StringBuffer(); BufferedReader in = new BufferedReader( new InputStreamReader( stream ) ); String line = null; while( (line = in.readLine()) != null ){ xml.append( line ); } return read( xml.toString() ); }catch( IOException ioe ){ throw new JSONException( ioe ); } } COM: <s> creates a json value from an input stream </s>
funcom_train/32780096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAvailComplyWith(Condition condition) { // the number of products found to be in compliance with the given // condition int j = 0; // loop throught the whole Vector of products for (Enumeration e = products.elements(); e.hasMoreElements();) { // check if the product is in compliance with the condition if (condition.check((SimProcess) e.nextElement())) { // increment the number of complying products j++; } } return j; } COM: <s> returns the number of products available in the entrepot at the moment </s>
funcom_train/39212871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newFtpBrowser(String host,String port,String user,String password,String type,String path) { if(ftpBrowserList.size() <= ConnectPreference.getMax_FTPSession()) { ftpBrowserList.add(new FtpBrowser(host,port,user,password,type,path,tab,fxp,this)); } } COM: <s> contruct a new ftp browser from base information </s>
funcom_train/12796189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUsedDiskSpace(String diskVol) throws NSClient4JException { // Returns <free>&<total> String result[] = split(submittRequest(password + "&4&" + diskVol), "&"); double freeSpace = Double.parseDouble(result[0]); double totalSpace = Double.parseDouble(result[1]); return "" + (totalSpace-freeSpace); } COM: <s> returns the used disk space for the volume name passed </s>
funcom_train/47137352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHeader(int columnIndex) throws IOException { this.checkClosed(); // check to see if we have read the header record yet // check to see if the column index is within the bounds // of our header array if ((columnIndex > -1) && (columnIndex < this.headersHolder.Length)) { // return the processed header data for this column return this.headersHolder.Headers[columnIndex]; } else { return ""; } } COM: <s> returns the column header value for a given column index </s>
funcom_train/33296797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCompose() { OfficeIdSpecification spec = new OfficeIdSpecification(); IOffice office1 = new Office(); office1.setOfficeId("o1"); assertTrue(this.compositeSpecification.compose(spec).evaluate(office1)); office1.setOfficeId("aaa"); assertFalse(this.compositeSpecification.compose(spec).evaluate(office1)); } COM: <s> test of single specification composition </s>