__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/7336267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCss() { if (filenameCss != null) { File file = new File(filenameCss); if (file.exists() && ((css == null) || (file.lastModified() != lastModifiedCss))) { css = IOUtils.readTextFile(file, true); } } if (css == null) { return ""; } else { return css.toString(); } } COM: <s> get css string </s>
funcom_train/20846469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PVNode getParent() { if ((path == null) || (path.length == 0)) return null; PVI[] newPath = new PVI[path.length - 1]; for (int i = 0; i < newPath.length; i++) { newPath[i] = path[i]; } return new PVNode(param, newPath); } COM: <s> returns the parent of this node </s>
funcom_train/25885415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updatePOIAlert(String userId, String token, Map<String, Object> poiAlertData) throws IllegalArgumentException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, AuthenticationException { // Authenticate user authenticateUser(userId, token); // User has been successfully authenticated POIAlert poiAlert = serializer.deSerialize(poiAlertData, POIAlert.class); userService.updatePOIAlert(userId, poiAlert); return true; } COM: <s> rpc method to update a poi alert </s>
funcom_train/3840310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRollResults() { String res = ""; String tmp; // Shuffles the dices this.shuffle(); for (int i = 0; i < this.size(); i++) { tmp = (String) this.elementAt(i); res += Utils.shuffleString(tmp).substring(0, 1); } return res; } COM: <s> returns a string containing letters from a complete roll </s>
funcom_train/22691024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addMeasurement(List<Measurement> measurements) { // get the value from Display double d = getValue(); SingleMeasurement created = new SingleMeasurement(); // get and set Unit and Measurement getMeasurement(created); // set the value created.setValue(d); // Add one measurement measurements.add(created); } COM: <s> add a measurement to the list </s>
funcom_train/44880655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getJndiName(JavaClass clazz) { String jndiName = ejbUtils.getNamedParameter( (AbstractJavaEntity)clazz, "ejb.bean", "jndi-name", null); if (jndiName == null) jndiName = ejbUtils.getJndiName(clazz, EjbUtils.REMOTE); return jndiName; } COM: <s> returns the jndi name of the given bean reading the jndi name </s>
funcom_train/14499591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized static public void refreshAfterCut(Selection cutItem) { //travase the whole sub tree OdfElement element = cutItem.getElement(); if (repository.containsKey(element)) { Vector<Selection> selections = repository.get(element); for (int i = 0; i < selections.size(); i++) { if (selections.get(i).getIndex() > cutItem.getIndex()) { selections.get(i).refreshAfterFrontalDelete(cutItem); } } } } COM: <s> refresh the selections in repository after a item is cut </s>
funcom_train/46761655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ViewVisitModel getViewVisit(final long viewVisitId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return PatientData.getViewVisit(viewVisitId, chain, call); }}; return (ViewVisitModel) call(method, call); } COM: <s> same transaction return the single view visit model for the primary key </s>
funcom_train/36680808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startUnitCycle() { if (!map.getActiveUnits().isEmpty()) { if (!inGameContext.isUnitCycleMode()) { inGameContext.doAction(new StartUnitCycleAction()); } else { cursorController.moveCursorToNextLocation(); } } } COM: <s> start unit cycle mode </s>
funcom_train/29792299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAdd() { FilterList filterList = new FilterList(new XmlElement()); filterList.add(createNamedFilter("ONE")); assertEquals("Wrong number of filters in the list.", 1, filterList .count()); filterList.add(null); assertEquals("Wrong number of filters in the list.", 1, filterList .count()); filterList.add(createNamedFilter("ONE")); assertEquals("Wrong number of filters in the list.", 2, filterList .count()); } COM: <s> test to add filters to the list </s>
funcom_train/9442500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDictionary(WnnDictionary dict) { /* get part of speech tags */ mPosDefault = dict.getPOS(WnnDictionary.POS_TYPE_MEISI); mPosNumber = dict.getPOS(WnnDictionary.POS_TYPE_SUUJI); mPosSymbol = dict.getPOS(WnnDictionary.POS_TYPE_KIGOU); } COM: <s> set the dictionary </s>
funcom_train/4174150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isNullable(String column) throws SQLException { if (index.containsKey(column)) { return nullable[index.get(column).intValue()]; } else { final SQLExceptionState state = SQLExceptionState.COLUMN_NOT_FOUND; throw new SQLException("Column " + column + " does not exist in dataset.", state.name(), state.code()); } } COM: <s> indicates whether the designated column accepts null as a value </s>
funcom_train/34782074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int onVBlankStart() { final CPU cpu = this.gameboy.getCPU(); // trigger V-Blank interrupt if (isLCDEnabled()) { cpu.requestIRQ(CPU.IRQ_VBLANK); if (isVBlankIRQEnabled()) { cpu.requestIRQ(CPU.IRQ_LCDSTAT); } } this.mode = MODE_VBLANK; return VBLANK_PERIOD - VBLANK_PERIOD_START; } COM: <s> trigger v blank irq if necessary </s>
funcom_train/15723424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ViewerState getState() { ViewerState state = new ViewerState(SupportedViewerStyles.NC_STYLE); state.setNCState(myPanels[0].getCurrentDirectory(), myPanels[0].getCurrentElement(), myPanels[1] .getCurrentDirectory(), myPanels[1].getCurrentElement(), myActivePanelIndex); return state; } COM: <s> returns viewers current state </s>
funcom_train/18835303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateEntry(String id, X509Certificate cert, PrivateKey key) { if (this.getKeybaseElement(id) == null) { Session session = currentSession(); Transaction tx = session.beginTransaction(); HibernateCertAndKeyDatabase newEntry = new HibernateCertAndKeyDatabase(); newEntry.setUid(id); newEntry.setCertificate(cert); newEntry.setPrivateKey(key); session.save(newEntry); tx.commit(); closeSession(); } else { throw new HibernateException("uid (" + id + ") already in use!"); } } COM: <s> updates a database entry </s>
funcom_train/44624043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JmlStoreRefKeyword parseOptStoreRefKeyword() { JmlToken jt = S.jmlToken(); int p = S.pos(); if (jt == BSNOTHING || jt == BSEVERYTHING || jt == BSNOTSPECIFIED) { JmlStoreRefKeyword s = to(jmlF.at(p).JmlStoreRefKeyword(jt)); S.nextToken(); return s; } return null; } COM: <s> parses a store ref keyword or returns null with no error message </s>
funcom_train/21424189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePosition() { if (fx == x && fy == y) return; if (!settings.animated) { x = fx; y = fy; return; } float dx = 0, dy = 0; if (Math.round(x) != fx || Math.round(y) != fy) { dx = (fx - x) / 8; dy = (fy - y) / 8; } else { x = fx; y = fy; dx = 0; dy = 0; } x += dx; y += dy; } COM: <s> animation method updates node position for the current frame </s>
funcom_train/37190188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hide(int type) { boolean proceed = true; if(type == RecordFrame.HIDE) { if(desktopManager != null) desktopManager.closeFrame(this); super.hide(); } else { if(!fromCode && (desktopManager != null) && isVisible()) { proceed = query.saveDocument(); if(proceed) { fromCode = true; dispose(); fromCode = false; } else algorithms.getStatusBar().setText(getTitle()+" "+resources.IS_NOT_VALID_STRING); } } return proceed; } COM: <s> hides the dialog </s>
funcom_train/33509053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("calaisSoap".equals(portName)) { setcalaisSoapEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/46261305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doWrite() { System.out.println("\nEnter data to be written to file : "); try { String data = stdIn.readLine(); RequestMessage request = new RequestMessage("WRITE", transactionId, ++sequenceNumber, data); String message = request.getRequestString(true); socketWriter.println(message); System.out.println("<<Begin>>" + message + "<<End>>"); } catch (IOException e) { e.printStackTrace(); } } COM: <s> get data to be written from client </s>
funcom_train/39024044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetBase() { System.out.println("setBase"); Collection c = generateData(); FilteredCollection instance = new FilteredCollection(null,null,new MetaHandler()); instance.setBase(c); assertEquals(c.iterator().next(),instance.iterator().next()); } COM: <s> test of set base method of class filtered collection </s>
funcom_train/7748739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object trunc(Object attribute) { if ( attribute==null ) { return null; } attribute = convertAnythingIteratableToIterator(attribute); if ( attribute instanceof Iterator ) { List a = new ArrayList(); Iterator it = (Iterator)attribute; while (it.hasNext()) { Object o = (Object) it.next(); if ( it.hasNext() ) a.add(o); // only add if not last one } return a; } return null; // trunc(x)==null when x single-valued attribute } COM: <s> return all but the last element </s>
funcom_train/40431796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPackagePath(String packageName) { String tempPackageName = packageName.replace('.', CANONICAL_SEPARATOR); for (String path : this.packagePathMap.keySet()) { if (path.endsWith(tempPackageName)) { return this.packagePathMap.get(path); } } return ""; } COM: <s> returns the path associated with a package name </s>
funcom_train/2731619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String visit(MacroCallRule macro) { return (showAsmName ? (Defs.getAsmName(macro.getCalledMacro()) + "::") : "") + macro.getCalledMacro().getName() + visit(macro.getParameters(), "[", "]"); } COM: <s> converts a macro call rule into string </s>
funcom_train/13934853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultColumnSize() { int i; TableColumn tcolumn = null; Object o; for(i=0; i<table.getColumnCount(); i++) { tcolumn = this.table.getColumnModel().getColumn(i); o = table.getColumnClass(i); if( o instanceof clutrfree.GOTree) { tcolumn.setPreferredWidth(200); } else { tcolumn.setPreferredWidth(50); } } } COM: <s> set the column widths </s>
funcom_train/43526415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsVolatilePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Field_isVolatile_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Field_isVolatile_feature", "_UI_Field_type"), CallGraphPackage.Literals.FIELD__IS_VOLATILE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is volatile feature </s>
funcom_train/51149559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Survey loadSelectedSurvey() { try { XModel langModel = (XModel)project.getModel().get( "currentSurveyLanguage" ); String langName = (String)langModel.get(); surveyManager.loadSurvey( langName ); } catch( Exception ex ) { ex.printStackTrace(); } return surveyManager.getCurrentSurvey(); } COM: <s> reloads the current survey according </s>
funcom_train/10815432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUp() throws IOException{ loader = new ReadToEndLoader((LoadFunc) PigContext.instantiateFuncFromSpec(lFile.getFuncSpec()), ConfigurationUtil.toConfiguration(pc.getProperties()), lFile.getFileName(),0); } COM: <s> set up the loader by </s>
funcom_train/10268411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String transformDateToMilliSeconds(int year, int month, int day) { int newyear = year - 1900; int newmonth = month - 1; Date date = new Date(newyear, newmonth, day); Calendar cal = Calendar.getInstance(); cal.clear(); cal.setTime(date); long x = cal.getTimeInMillis(); Long l = new Long(x); String milliseconds = l.toString(); return milliseconds; } COM: <s> tranforms a date to milliseconds </s>
funcom_train/8079258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init_m_Attributes() { try { m_NumInstances = m_Train.numInstances(); m_NumClasses = m_Train.numClasses(); m_NumAttributes = m_Train.numAttributes(); m_ClassType = m_Train.classAttribute().type(); } catch(Exception e) { e.printStackTrace(); } } COM: <s> initializes the m attributes of the class </s>
funcom_train/44708053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getUsername() throws FailedLoginException { String username = (String) m_shared.get(PasswordLoginModule.NAME_KEY); if (username == null) { s_log.debug("FAILURE no username available"); throw new FailedLoginException("no username available"); } return username; } COM: <s> reads the username from shared data </s>
funcom_train/50462919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAction(Action action) { //Creat the Menu Item for this Action DCMenuItem menuItem = new DCMenuItem(action); menuItem.setParentMenu(this); menuItem.addActionListener(this); menuItem.setAlignmentX(0.0f); //Add the MenuItem to our Display Space super.add(menuItem); updateSizeToPreferredSize(); } COM: <s> adds an action to this menu </s>
funcom_train/4015074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadSelQuestions(FormDef formDef, QuestionDef questionDef, List<Integer> selQuestions){ for(int index = 0; index < selQuestions.size(); index++){ Integer qtnId = selQuestions.get(index); QuestionDef qtnDef = formDef.getQuestion(qtnId); if(qtnDef == null) continue; if(qtnDef == questionDef) continue; lbSelQtns.addItem(qtnDef.getDisplayText(), qtnDef.getBinding()); } } COM: <s> loads a list of selected questions in the selected questions list box </s>
funcom_train/43245418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTmpStreetAddr3() { System.out.println("setTmpStreetAddr3"); String tmpStreetAddr3 = ""; PatientDemographicsDG5Object instance = new PatientDemographicsDG5Object(); instance.setTmpStreetAddr3(tmpStreetAddr3); // 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 tmp street addr3 method of class org </s>
funcom_train/26030952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHasTransactions() { Graph g = getGraph(); TransactionHandler th = g.getTransactionHandler(); th.transactionsSupported(); try { th.begin(); } catch (UnsupportedOperationException x) { } try { th.abort(); } catch (UnsupportedOperationException x) { } try { th.begin(); th.commit(); } catch (UnsupportedOperationException x) { } /* */ Command cmd = new Command() { public Object execute() { return null; } }; try { th.executeInTransaction(cmd); } catch (UnsupportedOperationException x) { } } COM: <s> test that graphs have transaction support methods and that if they fail </s>
funcom_train/47161192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCategory(ModuleCategory category) { ModuleCategory cat = category; if ( cat == null ) { cat = ModuleCategory.SYSTEM; } if ( ! cat.equals(this.getCategory()) ) { ModuleCategory oldCat = this.getCategory(); this.category = cat; this.firePropertyChange(PROPERTY_CATEGORY, oldCat, this.getCategory()); } } COM: <s> initialize the category of the plugin </s>
funcom_train/9489651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GeoPolygon3D createPolygon(GeoPoint3D[] points){ GeoPolygon3D polygon; AlgoPolygon3D algo = new AlgoPolygon3D(cons,null,points,false,this); cons.removeFromConstructionList(algo); polygon = (GeoPolygon3D) algo.getPoly(); // refresh color to ensure segments have same color as polygon: polygon.setObjColor(getObjectColor()); //TODO translation for face String s="face"; for(int i=0;i<points.length;i++) s+=points[i].getLabel(); polygon.setLabel(s); return polygon; } COM: <s> create a polygon joining the given points </s>
funcom_train/33897917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int countProjectElements(IProject project) { CountVisitor visitor = new CountVisitor(); try { project.accept(visitor, IResource.DEPTH_INFINITE, visitorFlags); } catch (CoreException e) { FileSyncPlugin.log("Exception when counting elements of a project '" + project.getName() + "'", e, IStatus.ERROR); } return visitor.count; } COM: <s> count the number of sub resources of a project </s>
funcom_train/31089828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFetchJarWithDefaultArtifactName() throws Exception { Dependency d = _dependencies.createDependency(); d.setGroup( "httpunit" ); d.setVersion( "1.5.4" ); expectLoadFile( "httpunit/jars/httpunit-1.5.4.jar" ); _dependencies.execute(); _stub.verify(); } COM: <s> verifies that the task will copy a single dependency jar </s>
funcom_train/44165499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showEuropePanel() { if (freeColClient.getGame() == null) { errorMessage("europe.noGame"); } else { europePanel.initialize(freeColClient.getMyPlayer().getEurope(), freeColClient.getGame()); showSubPanel(europePanel); } } COM: <s> displays the code europe panel code </s>
funcom_train/28662188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IDialogSettings getEncryptionWizardSettings() { IDialogSettings workbenchSettings = XSTUIPlugin.getDefault().getDialogSettings(); IDialogSettings section = workbenchSettings.getSection("EncryptionWizard"); // $NON-NLS-1$ if (section == null) { section = workbenchSettings.addNewSection("EncryptionWizard"); // $NON-NLS-1$ } return section; } COM: <s> return the settings used for all encryption wizard pages </s>
funcom_train/26617378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findFileNameRow(String filename) { int count = table.getRowCount(); int index = -1; //default not found value if (count!=0) { for(int i=0; i<count; i++) { if ( filename.equals((String)myModel.getValueAt(i,myModel.findColumn(myModel.NAME)))) { index = i; break; } } } return index; } COM: <s> finds the filename in the table name column </s>
funcom_train/50479154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPackageName() { final StringBuffer buf = new StringBuffer(); final Iterator it = mPackageStack.iterator(); while (it.hasNext()) { final String subPackage = (String) it.next(); buf.append(subPackage); if (!subPackage.endsWith(".")) { buf.append("."); } } return buf.toString(); } COM: <s> creates a full package name from the package names on the stack </s>
funcom_train/16913554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void alignHorizontal() { double min = Double.MAX_VALUE; for (Neuron neuron : getSelectedModelNeurons()) { if (neuron.getY() < min) { min = neuron.getY(); } } for (Neuron neuron : getSelectedModelNeurons()) { neuron.setY(min); } repaint(); } COM: <s> aligns neurons horizontally </s>
funcom_train/13871063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOperationNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Trace_operationName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Trace_operationName_feature", "_UI_Trace_type"), TracePackage.Literals.TRACE__OPERATION_NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the operation name feature </s>
funcom_train/32070912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAccountGroup(AccountGroup accountGroup) { boolean addOk = getAccountGroups().add(accountGroup); if (addOk) { accountGroup.setLabel((Label)this); } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed account group to the label collection </s>
funcom_train/4972589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean mouseIsOnXAxis(MouseEvent e) { ChartEntity entity = this.chartPanel.getEntityForPoint( e.getPoint().x, e.getPoint().y); return ((entity instanceof AxisEntity) && (((AxisEntity) entity).getAxis().equals( getDomainAxis()))); } COM: <s> convenience hit testing </s>
funcom_train/48406613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMetricPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DescribableElement_metric_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DescribableElement_metric_feature", "_UI_DescribableElement_type"), SpemxtcompletePackage.eINSTANCE.getDescribableElement_Metric(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the metric feature </s>
funcom_train/44161835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getReportContent(String name) { Collection col = null; String content = ""; try { col = prepareCollection(getReportName()); XMLResource document = (XMLResource)col.getResource(name); content = document.getContent().toString(); if (col != null) { col.close(); } } catch (Exception e) { e.printStackTrace(); } return content; } COM: <s> get report content gets report contant </s>
funcom_train/21848688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activate() { m_active = true; getForm().setGridViewVisible(true); getForm().setControlButtonsVisible(false); getForm().getChildView().refreshView(); if (m_focus_view != null) { javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { m_focus_view.showFocusBoxes(); getForm().getChildView().repaint(); } }); } unitTest(); } COM: <s> sets this editor as the currently active editor </s>
funcom_train/29001293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireWindowReturning() { if (calngFrm != null && !rtnParms.equals("") && dock.isVisible()) { DataSet returnDataSet = new DataSet(); returnDataSet = getSelectedTableRows(returnDataSet); calngFrm.fireWindowReturned(returnDataSet, rtnParms, rtFldLvl); mFrm.dispose(); calngFrm.mFrm.requestFocus(); } } COM: <s> h2 code fire window returning code h2 </s>
funcom_train/40843859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintNode(Node node) { int color = ConstansColor.NonSelect; //Do the same for children for (int i = 0; i < node.children.size(); i++) { paintNode(node.children.get(i)); } if(node.nodeStyle.equals("")){ handlerNode.drawNode(node, parent, color, mapfull); } else{ handlerNode.drawNode(node, parent, color, getNodeType(node.nodeStyle),mapfull); } handlerLink.drawLink(node, parent,mapfull); } COM: <s> recursively draws the section of the mapfull that begin in the </s>
funcom_train/5551315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void verifyCumulativeProbabilities() throws Exception { for (int i = 0; i < cumulativeTestPoints.length; i++) { TestUtils.assertEquals("Incorrect cumulative probability value returned for " + cumulativeTestPoints[i], cumulativeTestValues[i], distribution.cumulativeProbability(cumulativeTestPoints[i]), getTolerance()); } } COM: <s> verifies that cumulative probability density calculations match expected values </s>
funcom_train/38589285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnableCboMaster(boolean enableCboMaster) { boolean old = isEnableCboMaster(); this.enableCboMaster = enableCboMaster; log.debug("set=" + this.enableCboMaster + " Parameter=" + enableCboMaster); this.firePropertyChange(MainModel.PROPERTY_IsEnableCboMaster, old, this.enableCboMaster ); } COM: <s> set true when </s>
funcom_train/46760545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getRefIdForIdentifier(final String referenceGroup, final String identifierValue, final long identifierSource, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return ReferenceData.getRefIdForIdentifier(referenceGroup, identifierValue, identifierSource, call); }}; return (Long) call(method, call); } COM: <s> get the ref id for the matching identifier of the specified source </s>
funcom_train/21224773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SerialPort getSerialPort(final String portName) { SerialPort sPort = null; try { sPort = tryToOpenSerialPort(CommPortIdentifier.getPortIdentifier(portName)); } catch (NoSuchPortException nspe) { COM_003.log(nspe, portName); } return sPort; } COM: <s> tries to open a serial port with a given name </s>
funcom_train/1665696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processAllDefaultsEntries(UIDefaults table, Object themeInfo) { Set availablePlugins = this.getAvailablePlugins(); for (Iterator iterator = availablePlugins.iterator(); iterator .hasNext();) { Object pluginObject = iterator.next(); if (pluginObject instanceof LafComponentPlugin) { Object[] defaults = ((LafComponentPlugin) pluginObject) .getDefaults(themeInfo); if (defaults != null) { table.putDefaults(defaults); } } } } COM: <s> helper function to process the possibly theme dependent default </s>
funcom_train/32795100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OclBoolean isEqualTo(Object o) { try { OclContainer cont=(OclContainer)o; return containedValue.isEqualTo(cont.containedValue); } catch (ClassCastException e) { return new OclBoolean(0,"OclContainer isEqualTo() called with non-OclContainer argument"); } } COM: <s> two ocl containers are equal if their contained values are equal usually </s>
funcom_train/37749262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int convertTTFUnit2PDFUnit(int n) { int ret; if (n < 0) { long rest1 = n % upem; long storrest = 1000 * rest1; long ledd2 = rest1 / storrest; ret = -((-1000 * n) / upem - (int)ledd2); } else { ret = (n / upem) * 1000 + ((n % upem) * 1000) / upem; } return ret; } COM: <s> convert from truetype unit to pdf unit based on the </s>
funcom_train/14274675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteVFSFile(VolumeReference volRef, String filename) throws ConduitHandlerException, NotConnectedException { try { jHotSync.deleteVFSFile(volRef, filename); } catch (DLPFunctionCallException e) { throw new ConduitHandlerException(e.toString(), e); } } // end-method COM: <s> deletes the specified file from a vfs filesystem </s>
funcom_train/48909180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxfMiters() { if (txfMiters == null) { txfMiters = new JTextField(); txfMiters.setBounds(new Rectangle(93, 60, 150, 22)); txfMiters.addKeyListener(new KeyAdapter(){ public void keyPressed(KeyEvent e) { if(e.getKeyCode()==KeyEvent.VK_ENTER) { panelDatosManguera2.grabFocus(); txfCodigoMaquina2.grabFocus(); } } }); } return txfMiters; } COM: <s> this method initializes txf miters </s>
funcom_train/37749869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIPDimPts(double pts) { synchronized (this) { // Check this if (isHorizontal){ setRect(getX(), getY(), pts, getHeight()); } else { setRect(getX(), getY(), getWidth(), pts); } } } COM: <s> sets the code inline progression dimension code of the area </s>
funcom_train/46375280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkTakeControl(BigInteger clientID, CellID cellID) { ResponseMessage rm; try { rm = sendAndWait(new TakeControlRequestMessage(clientID, cellID)); } catch (InterruptedException ie) { AppXrw.logger.log(Level.WARNING, "Check take control interruped", ie); return false; } return (rm instanceof OKMessage); } COM: <s> check if a client has permission to take control of the given cell </s>
funcom_train/22929458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testKeySet() { Set set = new HashSet(); assertEquals("empty", set, invocationRecord.keySet()); invocationRecord.set(KEY1, STRING); invocationRecord.set(KEY2, STRING); set.add(KEY1); set.add(KEY2); assertEquals("2", set, invocationRecord.keySet()); } COM: <s> test the key set method </s>
funcom_train/51538756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void commandAction(Command cmd) { if (tunnel == null || cmd == null) { return; } if (subMenu != null) { subMenu.notifyListener(cmd); subMenu = null; } else if (isItemCommand(cmd)) { tunnel.callItemListener(cmd, itemListener); } else { tunnel.callScreenListener(cmd, scrListener); } } COM: <s> command action callback for submenu commands </s>
funcom_train/18739952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected RuleLabel invert(RuleLabel label) { // invert the label RuleLabel result; RuleLabel invLabel = label.getInvLabel(); if (invLabel == null) { result = label.getMatchExpr().inv().toLabel(); } else { result = invLabel; } return result; } COM: <s> constructs the inverse of a given label </s>
funcom_train/37019736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getCircleRadius(int z, double radius) { double raw = radius * atomSphereFactor; float depth = (float) (z - atomZOffset) / (2.0f * atomZOffset); float tmp = atomScreenScale * ((float) raw + atomDepthFactor * depth); if (tmp < 0.0f) { tmp = 1.0f; } return tmp; } COM: <s> returns the on screen radius of an atom with the given radius </s>
funcom_train/44591875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayType getType() { if (this.arrayType == null) { // lazy init must be thread-safe for readers synchronized (this) { if (this.arrayType == null) { preLazyInit(); this.arrayType = this.ast.newArrayType( this.ast.newPrimitiveType(PrimitiveType.INT)); postLazyInit(this.arrayType, TYPE_PROPERTY); } } } return this.arrayType; } COM: <s> returns the array type in this array creation expression </s>
funcom_train/175172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeLastOccurrence(Object o) { if (o == null) return false; int mask = elements.length - 1; int i = (tail - 1) & mask; Object x; while ( (x = elements[i]) != null) { if (o.equals(x)) { delete(i); return true; } i = (i - 1) & mask; } return false; } COM: <s> removes the last occurrence of the specified element in this </s>
funcom_train/43369290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getAuthorUID(String fullName, String lastName, String firstName, String institution, String year) { UIDBuilder uidBuilder = new AuthorUIDBuilder(nameSpace, (lastName.equals(""))?fullName:lastName); String authorUID = uidBuilder.buildID(); return authorUID; } COM: <s> implementation of the template method design pattern </s>
funcom_train/48407253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addContainerPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ContainerFragment_Relationship_container_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ContainerFragment_Relationship_container_feature", "_UI_ContainerFragment_Relationship_type"), SpemxtcompletePackage.eINSTANCE.getContainerFragment_Relationship_Container(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the container feature </s>
funcom_train/43921968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getNameSpaceErrors() { if ((geoserverNSErrors == null) || (geoserverStatus[0] == ((isAppChanged() ? 1 : 0) + (isConfigChanged() ? 2 : 0) + (isValidationChanged() ? 4 : 0)))) { loadStatus(); } return geoserverNSErrors; } COM: <s> namespace exceptions by prefix type name </s>
funcom_train/785362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireDataEvent(Object src, int type, int idx0, int idx1) { Object[] lstnrs = m_lstnrs.getArray(); if ( lstnrs.length > 0 ) { ListDataEvent e = new ListDataEvent(src, type, idx0, idx1); for ( int i=0; i<lstnrs.length; ++i ) { ((ListDataListener)lstnrs[i]).contentsChanged(e); } } } COM: <s> fires a change notification in response to changes in the list model </s>
funcom_train/37587954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _updateDocument(String prompt, boolean inProgress) { assert EventQueue.isDispatchThread(); _document.setPrompt(prompt); _document.insertNewline(_document.getLength()); _document.insertPrompt(); // int len = _document.getPromptLength(); // advanceCaret(len); _document.setInProgress(inProgress); scrollToCaret(); } COM: <s> updates the prompt and status of the document after an interpreter change </s>
funcom_train/25979812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnCancelar() { if (btnCancelar == null) { btnCancelar = new JButton(); btnCancelar.setBounds(new Rectangle(19, 275, 563, 31)); btnCancelar.setText("Cancelar"); btnCancelar.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent e) { dispose(); } }); } return btnCancelar; } COM: <s> this method initializes btn cancelar </s>
funcom_train/1070391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object transformSelection(Object selected) { if (selected instanceof EditPart) { Object model = ((EditPart) selected).getModel(); return model instanceof View ? ((View) model).getElement() : null; } if (selected instanceof View) { return ((View) selected).getElement(); } if (selected instanceof IAdaptable) { View view = (View) ((IAdaptable) selected).getAdapter(View.class); if (view != null) { return view.getElement(); } } return selected; } COM: <s> modify unwrap selection </s>
funcom_train/47513202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector Path(Vector Dest,Vector Init, AStar astar){ int y = astar.endH; int x = astar.endW; int Rx = 0; int Ry = 0; while((x != (int)Init.x)||(y != (int)Init.y)) { Rx = x; Ry = y; switch (astar.openList[y][x][AStar.FATHER_DIR]) { case AStar.DIR_DOWN: y--; break; case AStar.DIR_LEFT: x++; break; case AStar.DIR_RIGHT: x--; break; case AStar.DIR_UP: y++; break; default: break; } } return new Vector(Rx,Ry); } COM: <s> return the destination of the closest route </s>
funcom_train/22308968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void validateTestMethod(Method method) { if (method.getParameterTypes().length != 0) { fireError(method.getDeclaringClass().getName() + ": test method must have no argument"); } if (!Modifier.isPublic(method.getModifiers())) { fireError(method.getDeclaringClass().getName() + ": test method must be public"); } } COM: <s> verifies that the test method is recognized by the junit </s>
funcom_train/320087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unindent(StringBuffer indent) { CharSequence oneIndent= createIndent(); int i= indent.lastIndexOf(oneIndent.toString()); //$NON-NLS-1$ if (i != -1) { indent.delete(i, i + oneIndent.length()); } } COM: <s> reduces indentation in code indent code by one indentation unit </s>
funcom_train/3830261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSubSpaceName() { Debug.debugMethodBegin( this, "getSubSpaceName" ); int pos1 = nameSpace.indexOf( ":" ); int pos2 = nameSpace.indexOf( "=" ); Debug.debugMethodEnd(); return nameSpace.substring( pos1 + 1, pos2 ).trim(); } COM: <s> returns the name of the sub space </s>
funcom_train/47929219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prevAnim() { if (backEnabled && nextEnabled) { nextEnabled = false; yTEST = yTESTinit; opac = 0.0f; if (currentCols > 0) { currentCols = currentCols - 1; } else { currentCols = moveCat.length - 1; } curr = moveCat[currentCols]; resolveText(); opac = 0.0f; nextEnabled = true; } } COM: <s> go to previous command menu column </s>
funcom_train/7291537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modifyCharacterStyles(int start, int limit, StyleModifier modifier) { checkStartLimit(start, limit); boolean modified = fStyleBuffer.modifyStyles(start, limit, modifier, fDamagedRange); if (modified) { fTimeStamp += 1; } } COM: <s> invoke the given modifier on all character styles from start to limit </s>
funcom_train/3391773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printAllClassesTableHeader() { fontSizeStyle("+1", "FrameHeadingFont"); boldText("doclet.All_Classes"); fontEnd(); br(); table(); tr(); tdNowrap(); fontStyle("FrameItemFont"); } COM: <s> print the heading all classes and also print html table tag </s>
funcom_train/44662560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testForNullInputToConfigureMethod() { DefaultApplicationObjectConfigurer configurer = new DefaultApplicationObjectConfigurer(); // should succeed configurer.configure(null, "bogus"); try { configurer.configure("bogus", null); Assert.fail("Should have thrown an IllegalArgumentException for null object name"); } catch (IllegalArgumentException e) { // do nothing, test succeeded } } COM: <s> confirms that an illegal argument exception is thrown if the object to be </s>
funcom_train/19980072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateHost(long rowId, String host, String comment, String optPath) { ContentValues args = new ContentValues(); args.put(KEY_HOST, host); args.put(KEY_COMMENT, comment); args.put(KEY_OPTPATH, optPath); return mDb.update(DATABASE_TABLE, args, KEY_ROWID + "=" + rowId, null) > 0; } COM: <s> update the host using the details provided </s>
funcom_train/3100054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getBackchainRules(ArrayList literals) throws IOException { ArrayList result = new ArrayList(); for (int i = 0; i < literals.size(); i++) { Literal literal = (Literal) literals.get(i); result.addAll(getBackchainRules(literal)); } return result; } COM: <s> performs backchaining inference to find sets of implication rules to conclude </s>
funcom_train/24539081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void packWindowOnValidate(boolean pack, IExpression expression) { expression.createSimpleMethodInvoke(BeanSWTUtilities.getWindowPackOnChange(expression), shellManagerProxy, new IProxy[] {expression.getRegistry().getBeanProxyFactory().createBeanProxyWith(pack)}, false); } COM: <s> set whether the shell should be packed on each validation </s>
funcom_train/14246233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doNewPers() { NavPerspective newPers = new NavPerspective("New Perspective " + (NavPerspective.getRegisteredPerspectives().size() + 1)); NavPerspective.registerPerspective(newPers); _persList.setListData(Converter.convert(NavPerspective.getRegisteredPerspectives())); _persList.setSelectedValue(newPers, true); } COM: <s> create a new perspective add to the list </s>
funcom_train/1539403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isZero(List<GenSolvablePolynomial<C>> a) { if ( a == null ) { return true; } for ( GenSolvablePolynomial<C> pi : a ) { if ( pi == null ) { continue; } if ( ! pi.isZERO() ) { return false; } } return true; } COM: <s> test vector of zero polynomials </s>
funcom_train/34794880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWidget(final Widget widget) { final JInternalFrame frame; if (!widgets.keySet().contains(widget)) { frame = createInternalFrame(widget); addToDesktop(frame); } else { frame = widgets.get(widget); } SwingUtilities.invokeLater(new Runnable() { @Override public void run() { if (frame.isIcon()) { try { frame.setIcon(false); } catch (PropertyVetoException e) { // ignore } } frame.setVisible(true); frame.moveToFront(); } }); } COM: <s> adds a widget </s>
funcom_train/7926223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { synchronized(directory) { if (!open) throw new IllegalStateException("Index is closed already"); if (indexWriter != null) { indexWriter.close(); indexWriter = null; } else { indexReader.close(); indexReader = null; } open = false; } } COM: <s> close this index writing all pending changes to disk </s>
funcom_train/17682355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importSkips(String skipsFileName) throws Exception { File file = new File(skipsFileName); if (file.exists() == false) { throw new FileNotFoundException(skipsFileName); } BufferedReader reader = new BufferedReader(new FileReader(file)); String line; while ((line = reader.readLine()) != null) { if (!skips.contains(line)) { skips.add(line); } } } COM: <s> import predefined skipping tokens </s>
funcom_train/44136855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyAllPropertyListeners() { for(Enumeration e0 = m_Properties.keys();e0.hasMoreElements();) { String property = (String)e0.nextElement(); Object o = m_Properties.get(property); this.firePropertyChange(property, null, o); } } COM: <s> to notify all property listerner </s>
funcom_train/7647450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int codePointCount(int beginIndex, int endIndex) { if (beginIndex < 0 || endIndex > count || beginIndex > endIndex) { throw new IndexOutOfBoundsException(); } int s = beginIndex + offset; return Character.codePointCount(value, s, endIndex - beginIndex); } COM: <s> calculates the number of unicode code points between </s>
funcom_train/44950976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printHelp(PrintStream stream) { assert stream != null; Date versionDate = JomicTools.instance().getVersionDate(); String heading = localeTools.getMessage("cli.heading", new Object[]{Version.VERSION_TAG, versionDate}); stream.println(heading); stream.println(); stream.println(getHelp()); } COM: <s> print help about command line options </s>
funcom_train/38537986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setRangeZ(Number s, Number e) throws PropagationFailureException { if (currentNz != null) { currentNz.setRange(s,e); } else if (currentGz != null){ for (int i=0; i<currentGz.getNodeCount(); i++) { ((NumNode) currentGz.getNode(i)).setRange(s,e); } } } COM: <s> reduces the domain range for the current z </s>
funcom_train/15867435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSubGroup(String grId) throws MoiseConsistencyException { GroupInstance gr = (GroupInstance)subGroups.get(grId); if (gr == null) throw new MoiseConsistencyException(grId+" is not an instance group"); gr.checkRemove(); gr.removeRelations(); subGroups.remove(grId); } COM: <s> removes a subgroup instance from this group </s>
funcom_train/41535924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration listOptions () { Vector newVector = new Vector(3); newVector.addElement(new Option("\tTreat missing values as a seperate" + "\n\tvalue.", "M", 0, "-M")); newVector.addElement(new Option("\tDon't include locally predictive attributes" + ".", "L", 0, "-L")); return newVector.elements(); } COM: <s> returns an enumeration describing the available options </s>
funcom_train/36644213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object iObj) { if (iObj instanceof IntMathVec) { IntMathVec iVec = (IntMathVec)iObj; if (iVec.iV.length != iV.length) return false; for (int i=0; i<iV.length; i++) { if (iV[i] != iVec.iV[i]) return false; } return true; } return false; } COM: <s> make equals reflect value identity instead of object identity </s>
funcom_train/28157835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setQueryParams(Query query, Map<String, Object> params) { Assert.notNull(query, "Query must not be null"); if (params != null) { for (Map.Entry<String, Object> entry : params.entrySet()) { query.setParameter(entry.getKey(), entry.getValue()); } } } COM: <s> sets parameters to a query </s>