__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/20440047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCouplerPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ESMFComponentConnection_coupler_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ESMFComponentConnection_coupler_feature", "_UI_ESMFComponentConnection_type"), ESMFPackage.Literals.ESMF_COMPONENT_CONNECTION__COUPLER, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the coupler feature </s>
funcom_train/19541146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compact() { if (transform != null) { String lastTransform = null; for (ListIterator<String> iter = transform.listIterator(); iter.hasNext();) { String value = iter.next(); if (value == null || value.length() == 0 || value.equals(lastTransform) || value.equals(message)) { iter.remove(); continue; } lastTransform = value; } } } COM: <s> attempt to cut out any redundant information </s>
funcom_train/21656666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCbObjetoContrato() { if (cbObjetoContrato == null) { cbObjetoContrato = new JComboBox(); cbObjetoContrato.addItem(""); cbObjetoContrato.addItem("Perforacion Pozo 4 pulgadas"); cbObjetoContrato.addItem("Perforacion Pozo 6 pulgadas"); cbObjetoContrato.addItem("Perforacion Pozo 8 pulgadas"); cbObjetoContrato.addItem("Limpieza"); cbObjetoContrato.setBounds(new Rectangle(568, 500, 172, 25)); } return cbObjetoContrato; } COM: <s> this method initializes cb objeto contrato </s>
funcom_train/19177391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Header getHeader(String key) { if (headers == null) return null; Iterator it = headers.iterator(); while(it.hasNext()) { Header header = (Header)it.next(); if (header.getName().equals(key)) { return header; } } return null; } COM: <s> returns a header for the key or code null code if </s>
funcom_train/7641394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRunWithPackage() { final String packageName = "foo.test"; mRunner.setTestPackageName(packageName); mRunner.run(new EmptyListener()); assertStringsEquals(String.format("am instrument -w -r -e package %s %s/%s", packageName, TEST_PACKAGE, TEST_RUNNER), mMockDevice.getLastShellCommand()); } COM: <s> test the building of the instrumentation runner command with test package set </s>
funcom_train/43608753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean moreRestrictiveThan(Flags f) { if (isPrivate() && (f.isProtected() || f.isPackage() || f.isPublic())) { return true; } if (isPackage() && (f.isProtected() || f.isPublic())) { return true; } if (isProtected() && f.isPublic()) { return true; } return false; } COM: <s> return true if code this code has more restrictive access flags than </s>
funcom_train/4658286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copy7() throws SVNException { manager.getCopyClient().doCopy( url.appendPath("mac_commit",false), SVNRevision.HEAD, url.appendPath(Normalizer.decompose("mac_commit_こぴー",false), false), false, true, ""); manager.getUpdateClient().doUpdate( new File(workdir), SVNRevision.HEAD, true ); status1(); } COM: <s> copy url url whole dir </s>
funcom_train/18431315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Paint getItemPaint(int series, int item, boolean selected) { Paint result = null; if (selected) { result = this.selectedItemAttributes.getItemPaint(series, item); } if (result == null) { result = lookupSeriesPaint(series); } return result; } COM: <s> returns the paint used to fill data items as they are drawn </s>
funcom_train/9806140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHierarchicalEdifName() { HierarchicalInstance hi = _hierarchicalInstance; String retVal = hi.getInstanceName(); hi = hi.getParent(); while (hi.getParent() != null) { retVal = hi.getInstanceName() + "/" + retVal; hi = hi.getParent(); } return retVal; } COM: <s> creates a string showing the hierarchy of the edif cell </s>
funcom_train/27943104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText( org.planetamessenger.plugin.JContactListItem item, String strText ) { JTabContent tabContent = ( JTabContent ) hTabs.get( item.getUserId() ); if( tabContent != null ) { String strHistory = strText; if( strText.compareTo( "" ) == 0 ) setSelectedComponent( tabContent ); else tabContent.addHistoryText( strHistory ); } } COM: <s> set the text to a tab item </s>
funcom_train/14499680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void movePage(int current, int destination) { NodeList pages = this.getElementsByTagNameNS(OdfNamespace.get(OdfNamespaceNames.DRAW).toString(), "page"); try { OdfDrawPage page = (OdfDrawPage) pages.item(current); this.insertBefore(page, pages.item(destination)); } catch (Exception ex) { mLog.log(Level.SEVERE, null, ex); } } COM: <s> move a page at a specified position to the destination position </s>
funcom_train/42384079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSheet(SingleSheet sheet) { String name = sheet.getName(); String ext = this.getSheetExtension(name); if (ext != null) { throw new IllegalArgumentException("Sheet already exists: " + name); } saveSingleSheet((SingleSheet) sheet); this.sheets.put(name, sheet); } COM: <s> adds a new sheet </s>
funcom_train/8171092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkUser(String username, String password) { if(entityManager!=null) try { korisnik = (Korisnik) entityManager .createQuery( "from Korisnik where username = :username and password = :password") .setParameter("username", username).setParameter( "password", password).getSingleResult(); if (korisnik != null && korisnik.getId() != null) setUser(true); } catch (NoResultException ex) { } } COM: <s> check if there is the user in the table korisnik to login </s>
funcom_train/44166792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateSizes() { if (oldSize == null) { oldSize = getSize(); } if (oldSize.width != getWidth() || oldSize.height != getHeight()) { gui.updateMapControlsInCanvas(); mapViewer.setSize(getSize()); mapViewer.forceReposition(); oldSize = getSize(); } } COM: <s> updates the sizes of the components on this canvas </s>
funcom_train/12803722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addListeners(ListModel aModel) { aModel.addListDataListener(new ListDataListener() { public void contentsChanged(ListDataEvent anEvent) { m_isDirty = true; } public void intervalRemoved(ListDataEvent anEvent) { m_isDirty = true; } public void intervalAdded(ListDataEvent anEvent) { m_isDirty = true; } }); } COM: <s> add listener for data changing </s>
funcom_train/14627284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DoubleMatrix1D solve(DoubleMatrix1D b) { // directly operates on b DoubleMatrix1D x = b; // Solve L*Y = B solveL(x, nc); // Solve D*Z = Y x.viewPart(0,nc).assign(d.viewPart(0,nc), F.div); // Solve L'*X = Z solveLT(x, nc); return x; } COM: <s> solves tt a x b tt returns tt x tt </s>
funcom_train/20080160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert(TabItem item, int index) { if (fireEvent(Events.BeforeAdd, this, item, index)) { item.tabFolder = this; items.add(index, item); if (rendered) { renderItem(item, index); } fireEvent(Events.Add, this, item, index); } } COM: <s> inserts a tab item </s>
funcom_train/46337948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadFromQuery(String queryUrl) { if (queryUrl != null) { final String url = queryUrl; listInitThread = new Thread(new Runnable() { public void run() { int res = listAdapter.initializeList(url); handler.sendEmptyMessage(res); } }); initializeList(); } trackNow(); } COM: <s> loads the list adapter and the list from the provided query </s>
funcom_train/8717381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StateCluster build_Set(IntSet set, GrammarAST associatedAST) { NFAState left = newState(); NFAState right = newState(); left.associatedASTNode = associatedAST; right.associatedASTNode = associatedAST; Label label = new Label(set); Transition e = new Transition(label,right); left.addTransition(e); StateCluster g = new StateCluster(left, right); return g; } COM: <s> from set build single edge graph o o set o </s>
funcom_train/26166272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCacheable() { cache.setSize( 2 ); TestCacheableObject obj = new TestCacheableObject( 1, "value" ); cache.addCacheable( obj ); TestCacheableObject ret = ( TestCacheableObject )cache.getCacheable( new Integer( 1 ) ); assertTrue( ret.equals( obj ) ); } COM: <s> tests get cacheable add cacheable </s>
funcom_train/4204204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initForValidation(IValueBinding binding) { setBinding(binding); myLabel = getBinding().getLabel(); calculateAdapter(binding); final String range = getBinding().getArgument(Constants.ARG_RANGE, String.class, null); myDeclaredInterval = new Interval(); if (range != null) { myDeclaredInterval.parseRanges(range); } else { myDeclaredInterval.retrieveMinMaxLimits(); } if (myDeclaredInterval.isMinOrMaxSet()) { myNativeInterval = new Interval(); } else { myNativeInterval = myDeclaredInterval; } } COM: <s> special version of init when the decorator is only used for validation </s>
funcom_train/1535784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(Renderer renderer){ // points TODO hidden aspect ? /* for (Iterator<Drawable3D> d = lists[Drawable3D.DRAW_TYPE_POINTS].iterator(); d.hasNext();) d.next().draw(renderer); */ // curves for (Iterator<Drawable3D> d = lists[Drawable3D.DRAW_TYPE_CURVES].iterator(); d.hasNext();) d.next().drawOutline(renderer); view3D.draw(renderer); } COM: <s> draw the not hidden solid parts of curves and points </s>
funcom_train/45571675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexFromWinnerIfAllAtHome() throws IOException { if (areAllAtHome()) { for (int i = 0; i < this.size(); i++) { if (ausgestiegen[i] == false) { this.setSpielstandForPlayer(i, this .getScoresForPlayer(i) - 5); return i; } } } return -1; } COM: <s> returns the number of the player which was the one who didnt stepped </s>
funcom_train/3077155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getMappedRolesUserList(String roleName) { List usersWithAssignedRoles = new ArrayList(); Set rml = getRolesMappings(); if (rml != null) { Iterator iter = rml.iterator(); while (iter.hasNext()) { RolesMapping rm = (RolesMapping) iter.next(); User user = rm.getUser(); Role role = rm.getRole(); if (role.getName().equals(roleName)) { usersWithAssignedRoles.add(user); } } } return usersWithAssignedRoles; } COM: <s> split project related rolemapping to </s>
funcom_train/25073904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translate() { buttonNewProject.setToolTipText(LanguageResources .get("TOOLBAR_BUTTONS_NEW_PROJECT")); buttonNewCycle.setToolTipText(LanguageResources .get("TOOLBAR_BUTTONS_NEW_CYCLE")); buttonCopyCycle.setToolTipText(LanguageResources .get("TOOLBAR_BUTTONS_COPY_CYCLE")); buttonSave .setToolTipText(LanguageResources.get("TOOLBAR_BUTTONS_SAVE")); buttonDelte.setToolTipText(LanguageResources .get("TOOLBAR_BUTTONS_DELETE")); buttonStart.setToolTipText(LanguageResources .get("TOOLBAR_BUTTONS_START_PROJECT")); buttonNetworkStart.setToolTipText(LanguageResources .get("TOOLBAR_BUTTONS_START_PROJECT_NW")); } COM: <s> translates the tooltips of the toolbar buttons </s>
funcom_train/15464294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void get(StringTokenizer objStrTok,SessionThread objThread) throws Exception { getProcessor(); // build info string Operand objOperand=new Operand(strBusNr,Declare.strDevPower,strAddrPower,"","","",""); if ( !objProcessor.isAvailable(objOperand) ) { throw new ExcUnsupportedDevice(); } String strValue = objProcessor.get(objOperand); objThread.writeAck(Declare.intInfoMin,Integer.toString(intBusNr)+" POWER "+strValue); } COM: <s> srcp syntax get bus power </s>
funcom_train/9887517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JobControl postJob( StartingJob job ) throws RemoteException { Request req = new Request( job ); m_presentation.sendRequest( req ); return new SyncJobControl( this, job.getId(), m_conf.getInt("remote.polling", 10) ); } COM: <s> starts a remote execution </s>
funcom_train/41760763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void store(PersistenceService persistenceService, URL codebase, PersistentData cache) { // stores the app window data into the JWS persistence repository try { FileContents fc = persistenceService.get(codebase); ObjectOutputStream oos = new ObjectOutputStream(fc.getOutputStream(true)); oos.writeObject( cache ); oos.flush(); oos.close(); } catch (Exception e) { } } COM: <s> stores the app window location and size into the jws persistence repository </s>
funcom_train/5347871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSOCKS5Connection() throws Exception { ConnectionSettings.CONNECTION_METHOD.setValue( ConnectionSettings.C_SOCKS5_PROXY); fps.setProxyOn(true); fps.setAuthentication(false); fps.setProxyVersion(SOCKS5); Socket s = Sockets.connect("localhost", DEST_PORT, 0); //Must connect somewhere, NPE is an error s.close(); } COM: <s> connect with socks 5 </s>
funcom_train/4457526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long createNewEntry(String value, String date, String time) { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_VALUE, value); initialValues.put(KEY_DATE, date); initialValues.put(KEY_TIME, time); return database.insert(DATABASE_TABLE, null, initialValues); } COM: <s> creates a new entry in the application database </s>
funcom_train/44079943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void scale(double sx, double sy, Point2D origin) { if (isLeaf()) GraphConstants.scale(this, sx, sy, origin); else { Iterator it = childViews.iterator(); while (it.hasNext()) { Object view = it.next(); if (view instanceof AbstractCellView) { AbstractCellView child = (AbstractCellView) view; if (GraphConstants.isSizeable(child) || GraphConstants.isAutoSize(child)) child.scale(sx, sy, origin); } } } } COM: <s> scale code view code group by code sx sy code </s>
funcom_train/7660736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHasWaitersIAE() { final ReentrantLock lock = new ReentrantLock(); final Condition c = (lock.newCondition()); final ReentrantLock lock2 = new ReentrantLock(); try { lock2.hasWaiters(c); shouldThrow(); } catch (IllegalArgumentException success) { } catch (Exception ex) { unexpectedException(); } } COM: <s> has waiters throws iae if not owned </s>
funcom_train/17206468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dump() { Log.write("GCspy Subspace: "); Util.dumpRange(start_, end_); Log.writeln("\n -- firstIndex=", firstIndex_); Log.writeln(" -- blockNum=", blockNum_); } COM: <s> dump a representation of the subspace </s>
funcom_train/8900362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double xlog2(double a) { Double aDouble = new Double(a); if (a == 0) { return 0; } else if (logmap.containsKey(aDouble)) { return ((Double) (logmap.get(aDouble))).doubleValue(); } else { double newLog = a * Math.log(a) / LN2; logmap.put(aDouble,new Double(newLog)); return newLog; } } COM: <s> calculates a log a base 2 </s>
funcom_train/16668503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Molecule getMolRaf(Long mr) throws IOException, CDKException { this.raf.seek(mr.longValue()); final StringBuffer mdl = new StringBuffer(); String line = null; while ((line = this.raf.readLineBuffered()) != null) { mdl.append(line + "\n"); if (line.startsWith("$$$$")) { break; } } Molecule molecule = null; String mdlString = mdl.toString(); molecule = this.getRawMolecule(mdlString); return molecule; } COM: <s> returns the ith molecule index of first structure is 0 </s>
funcom_train/43245296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetECOnePhoneNumber() { System.out.println("getECOnePhoneNumber"); EmergencyContactDG3Object instance = new EmergencyContactDG3Object(); String expResult = ""; String result = instance.getECOnePhoneNumber(); 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 econe phone number method of class org </s>
funcom_train/11651177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeErrorToClient(String message) { try { OutputStream sockOut = clientSocket.getOutputStream(); DataOutputStream out = new DataOutputStream(sockOut); out.writeBytes(message); out.flush(); } catch (Exception e) { log.warn("Exception while writing error", e); } } COM: <s> write an error message to the client </s>
funcom_train/7869847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testQueenConstructors() { Board board0 = new Board(); board0.emptyBoard(); Queen queen1 = new Queen(true, board0, 3, 5); assertEquals(true, queen1.getColor()); assertEquals(board0, queen1.getBoard()); assertEquals("w", queen1.getColorAsString()); assertEquals("D", queen1.getType()); } COM: <s> it test the queen constructors </s>
funcom_train/1242172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isBlockGeometry(Geometry geom) { if (geom != null) { // collections are exported as blocks if (GeometryCollection.class.isAssignableFrom(geom.getClass())) return true; // polygons with holes are exported as blocks if (Polygon.class.isAssignableFrom(geom.getClass())) { return ((Polygon) geom).getNumInteriorRing() > 0; } } return false; } COM: <s> checks if a geometry is complex and should be exported as a block </s>
funcom_train/49425448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private NiftyInputEvent handleKeyUpEvent(final KeyboardInputEvent inputEvent) { if (inputEvent.getKey() == Keyboard.KEY_LSHIFT || inputEvent.getKey() == Keyboard.KEY_RSHIFT) { return NiftyInputEvent.SelectionEnd; } else if (inputEvent.getKey() == Keyboard.KEY_ESCAPE) { return NiftyInputEvent.Escape; } return null; } COM: <s> handle key up event </s>
funcom_train/3172939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File makeDirFor(String id) throws Exception { String path = addressTo(id); // Create the directory String fileSep = File.separator; if (fileSep.equals("\\")) { fileSep = "\\\\"; // Fix for Windows backslash separator } path = path.replaceAll("/", fileSep); File indiFile = new File(destDir.getAbsolutePath() + File.separator + path); File indiDir = indiFile.getParentFile(); indiDir.mkdirs(); return indiFile; } COM: <s> make a directory for each object </s>
funcom_train/50328988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validSystemNameConfig(String systemName, char type) { if ( !validSystemNameFormat(systemName, type) ) { // No point in trying if a valid system name format is not present log.warn(systemName+" invalid; bad format"); return false; } // System name has passed all tests return true; } COM: <s> public static method to validate system name for configuration </s>
funcom_train/20418908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IAeWebServiceResponse handleInvoke(IAeInvoke aInvoke, String aQueryData) { try { AeEngineFactory.getEngine().executeProcess( getChildProcessId() ); } catch (Throwable t) { mapThrowableAsFault(t); AeException.logError(t,t.getMessage()); } return getResponse(); } COM: <s> queues the process created in code prepare code method for execution </s>
funcom_train/28123439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBusy(boolean f) { if (f) { setCursor(CursorWait); if (currentMDIWindow != null) currentMDIWindow.setCursor(CursorWait); } else { setCursor(CursorDefault); if (currentMDIWindow != null) currentMDIWindow.setCursor(CursorDefault); } } COM: <s> set to busy or available </s>
funcom_train/7426933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(final PInputEvent event) { moveFocusToMouseOver(event); if (focusNode != null) { directCameraViewToFocus(event.getCamera(), focusNode, NAVIGATION_DURATION); event.getInputManager().setKeyboardFocus(event.getPath()); } } COM: <s> animates the camera to the node that has been pressed </s>
funcom_train/43244955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTotalConnections() { System.out.println("getTotalConnections"); ServerStatusObject instance = new ServerStatusObject(); long expResult = 0L; long result = instance.getTotalConnections(); 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 total connections method of class org </s>
funcom_train/42816562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasActiveConnections() { for (int row = lstBridgesInUse.size() - 1; row >= 0; row--) { ConnectionBridge[] curBridges = lstBridgesInUse.get(row); if (curBridges[0].isActive() || curBridges[1].isActive()) { return true; } } return false; } COM: <s> checks if at least one connection is still active </s>
funcom_train/7232589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reconnectToParent (CompositeFigure d) { if (this.parent != null) return;//only set parent if there is no parent set, otherwise te location gets screwed up. if (this.parentFigureID == null) return; final Figure f = d.getFigure(this.parentFigureID); if (f == null || !(f instanceof CPNAbstractFigure) ) return; setParent((CPNAbstractFigure) f); ((CPNAbstractFigure) f).setNameFigure (this); } COM: <s> reconnects to parent if parent null parent id 33 null </s>
funcom_train/19147855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createFieldEditors() { addField(new TaskTagsListEditor(ITaskTagConstants.ID_TASK_TAGS, "Task Tags:", getFieldEditorParent())); addField(new BooleanFieldEditor(ID_IGNORE_CASE, "Ignore Case", getFieldEditorParent())); addField(new BooleanFieldEditor(ID_WHITESPACE, "Allow leading whitespace", getFieldEditorParent())); } COM: <s> creates the field editors </s>
funcom_train/539029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(final GnucashInvoice o) { GnucashInvoice other = o; try { int compare = other.getDatePosted().compareTo(getDatePosted()); if (compare != 0) { return compare; } return other.getDateOpened().compareTo(getDateOpened()); } catch (Exception e) { e.printStackTrace(); return 0; } } COM: <s> sorts primarily on the date the transaction happened </s>
funcom_train/23928931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readParameter(File input) throws FileNotFoundException, ParseException{ Scanner scan = new Scanner(input); Pattern parameter = Pattern.compile( "(?<=<param name=\")(.*?)(?:\">)(.*?)(?=</param>)", Pattern.MULTILINE | Pattern.DOTALL); while (scan.findWithinHorizon(parameter, 0) != null){ MatchResult res = scan.match(); if (res.groupCount() != 2) throw new ParseException("Found " + res.groupCount() + "instead of 2 Groups. Malformed parameterfile?", scan.match().start()); String name = res.group(1); String content = res.group(2).trim(); this.put(name, content); } } COM: <s> reads configuration parameter from a file </s>
funcom_train/27853474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitles(String[] newtitles) { if (titles == null) { titles = new String[newtitles.length]; System.arraycopy(newtitles,0,titles,0,titles.length); return; } for (int i=0; i<newtitles.length; ++i) { if (i>=titles.length) break; titles[i] = newtitles[i]; } } COM: <s> if newtitles has fewer columns than the current titles </s>
funcom_train/3416299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Timestamp ts) { long thisTime = this.getTime(); long anotherTime = ts.getTime(); int i = (thisTime<anotherTime ? -1 :(thisTime==anotherTime?0 :1)); if (i == 0) { if (nanos > ts.nanos) { return 1; } else if (nanos < ts.nanos) { return -1; } } return i; } COM: <s> compares this code timestamp code object to the given </s>
funcom_train/8688547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String calcDate(String startDate, int daysToAdd) throws ParseException { Calendar calendar = new GregorianCalendar(); Date currentDate = dateFormat.parse(startDate); calendar.setTime(currentDate); calendar.add(Calendar.DATE, daysToAdd); return dateFormat.format(calendar.getTime()); } COM: <s> calculates the start date for version comparison </s>
funcom_train/586402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSashForm() { GridData gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; gridData.grabExcessVerticalSpace = true; gridData.verticalAlignment = GridData.FILL; sashForm = new SashForm( this, SWT.BORDER ); sashForm.setOrientation( SWT.VERTICAL ); createComposite(); sashForm.setLayoutData( gridData ); createComposite1(); } COM: <s> this method initializes sash form </s>
funcom_train/46330374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cross(Chromosome individual1, Chromosome individual2) { for (int i = params.getInteger(GAProperties.CROSSOVER_PARAM); i < individual1 .getValues().length; i++) { int aux = individual1.getValues()[i]; individual1.getValues()[i] = individual2.getValues()[i]; individual2.getValues()[i] = aux; } } COM: <s> do the change on the arrays that represents a individual </s>
funcom_train/3123941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getValueAsDouble(int idx){ String tempString; if (idx <= LASTINDEX && idx >= 0) tempString = mAllValues[idx]; else return 0.0d; try { return Double.parseDouble(tempString); } catch (NumberFormatException e) { return 0.0d; } } // end of getValue(int) COM: <s> get a specific value as double </s>
funcom_train/15606897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TierGlyph correspondingTierGlyph(TierNameGlyph tierNameGlyph) { for(int i = childCount()-1; i >= 0; --i) { if (null!=child(i) && ((ParentGlyph)child(i)).child(0) == tierNameGlyph && null!=tiersColumn) return tiersColumn.tier(i); } Assert.vAssert(false); return null; } COM: <s> return the tier glyph corresponding to the given tier name glyph </s>
funcom_train/20775827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getState(int index, int N) { /* * Computes the state at the time slot. In the case where signum returns * zero no majority exists. */ switch((int)Math.signum(this.votes[index % N])) { case 1: return 1; case -1: return 0; default: return 0; } } COM: <s> computes the state at the time slot corresponding to the given index </s>
funcom_train/45622773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDelaySignPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CscType_delaySign_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CscType_delaySign_feature", "_UI_CscType_type"), MSBPackage.eINSTANCE.getCscType_DelaySign(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the delay sign feature </s>
funcom_train/14599395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long skip(long n) throws IOException { long skipcount = n; while (!messageCompleted && !eos && skipcount > 0) { if (countdown == 0) { readChunkLength(); continue; } long skip = intern.skip(Math.min(skipcount, countdown)); skipcount -= skip; if (skip == 0) break; } return n - skipcount; } COM: <s> skip over the next code n code bytes in the current message </s>
funcom_train/8116239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String extractConstraintName(final SQLException sqle) { String constraintName = null; // 23000: Check constraint violation: {0} // 23001: Unique index or primary key violation: {0} if (sqle.getSQLState().startsWith("23")) { final String message = sqle.getMessage(); final int idx = message.indexOf("violation: "); if (idx > 0) { constraintName = message.substring(idx + "violation: ".length()); } } return constraintName; } COM: <s> extract the name of the violated constraint from the given sqlexception </s>
funcom_train/48911411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Value loadFacts(Context c) throws JessException { JessToken jt = nextToken(m_jts); while (jt.m_ttype != JessToken.NONE_TOK) { m_jts.pushBack(jt); Fact f = parseFact(c.getEngine(), m_jts); m_engine.assertFact(f, c); jt = nextToken(m_jts); } return Funcall.TRUE; } COM: <s> parses an input file containing only facts asserts each one </s>
funcom_train/39314524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWriteBitmapFileHeader(){ System.out.println("testWriteBitmapFileHeader"); System.out.print("writeBitmapFileHeader function can't be tested because "); System.out.print("it is used in save function, and save needs an abstract "); System.out.println("Image object which cannot be instantiated."); } COM: <s> test of write bitmap file header method of class converter </s>
funcom_train/3394150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringWriter s = new StringWriter(); try { new Pretty(s, false).printExpr(this); } catch (IOException e) { // should never happen, because StringWriter is defined // never to throw any IOExceptions throw new AssertionError(e); } return s.toString(); } COM: <s> convert a tree to a pretty printed string </s>
funcom_train/51341697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetState() { try { // no write tasks are awaiting commit. nwrites.set(0); commitGroup.clear(); // // clear the set of active tasks. // active.clear(); // signal tasks awaiting [commit]. commit.signalAll(); // // resume execution of new tasks. // resume(); } catch (Throwable t) { log.error("Problem with resetState? : "+serviceName+" : "+t, t); } } COM: <s> private helper resets some internal state to initial conditions following </s>
funcom_train/48145260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doTest(){ JFreeChart chart; ChartGenerator_JTable chartMaker = new ChartGenerator_JTable(); resetChart(); showMessageDialog(chartTitle+"doTest get called!"); int[][] pairs = new int[1][2]; pairs[0][0] = 1; // value pairs[0][1] = 0; // name chart = chartMaker.getPieChart(chartTitle, dataTable, pairs,""); chartPanel = new ChartPanel(chart, false); setChart(); } COM: <s> sample code showing how to use chart generator jtable to create chart </s>
funcom_train/31084724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print (String indent, PrintStream output) { output.println (indent + this); for (int i = 0; i < getTimeSliceCount(); ++i) { getTimeSlice(i).print (indent + " ", output); output.println (""); } } COM: <s> this prints the time slice including all following music symbols </s>
funcom_train/14430447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean guiAsk(String question, String about) { Object[] options = { "Yes", "No" }; int tmp = JOptionPane.showOptionDialog(this, question, about, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]); if (tmp == 0) { return true; } else return false; } COM: <s> this method asks a yes no question to the user </s>
funcom_train/30204679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonOk() { if (jButtonOk == null) { jButtonOk = new JButton(); jButtonOk.setText("Ok"); jButtonOk.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { result = OK_OPTION; saveAll(); getJDialog().dispose(); } }); } return jButtonOk; } COM: <s> this method initializes j button ok </s>
funcom_train/17901734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(String text) { try { outputDocument.remove(userLimit, typingLocation - userLimit); outputDocument.insertString(userLimit, text, null); typingLocation = outputDocument.getLength(); index = -1; } catch (BadLocationException ble) {} } COM: <s> set users command line content </s>
funcom_train/44596081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCastCompatible(/*@ non_null */TypeInfo expr, /*@ non_null */TypeInfo cast) { if (expr.typeBinding != null && cast.typeBinding != null) { return cast.typeBinding.isCastCompatible(expr.typeBinding); } if (expr == cast) return true; return false; // FIXME } COM: <s> return true if the first argument is a type that can be cast </s>
funcom_train/13938083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void orientCycle(){ if(!isValidCycle()){ System.out.println("Prim2DCycle(orientCycle): trying to orient an invalid cycle! aborting!"); return; } Point2D conPt = this.getFirst().ptA; for(int i=0; i<this.size(); i++){ Prim2D prim = this.get(i); if(!prim.ptA.equalsPt(conPt)){ this.set(i, prim.getSwappedEndPtPrim2D()); conPt = prim.ptA; }else{ conPt = prim.ptB; } } } COM: <s> make sure all prim2 d in the cycle are </s>
funcom_train/44777735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetProperty(Property property) { FilterValueType [] types = getDefinedTypes(); for (int i=0, n=types.length; i<n; i++) { HashMap propertyHash = (HashMap) myValues.get(types[i]); if (propertyHash != null) { propertyHash.remove(property); } } myProperties.remove(property); } COM: <s> reset the specified property to have no values for this filter </s>
funcom_train/22048159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFrameIcon(String imageURL) { try { // Get current classloader ClassLoader cl = this.getClass().getClassLoader(); // Create icons setFrameIcon(new ImageIcon(cl.getResource(imageURL))); } catch (Exception e) { org.jma.util.Misc.error(this, "Unable to load image: " + imageURL); } } COM: <s> load image for the frame icon </s>
funcom_train/18650992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Chessboard clone() throws java.lang.CloneNotSupportedException { Chessboard cloned = new Chessboard(); System.arraycopy(_chessboard, 0, cloned._chessboard, 0, _chessboard.length); cloned._whiteKingSquare = _whiteKingSquare; cloned._blackKingSquare = _blackKingSquare; return cloned; } COM: <s> makes a copy of the chessboard </s>
funcom_train/22561849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MenuManager createHelpMenu(IWorkbenchWindow window) { MenuManager menu = new MenuManager(Messages.getString("item_help"), IWorkbenchActionConstants.M_HELP); //$NON-NLS-1$ menu.add(ActionFactory.HELP_CONTENTS.create(window)); menu.add(new Separator()); // menu.add(createUpdateMenu(window)); // menu.add(new Separator()); menu.add(aboutAction); return menu; } COM: <s> creates and returns the help menu </s>
funcom_train/48705424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateEnabledState() { int tabCount = tabbedPane.getTabCount(); if (tabCount != previousTabCount){ previousTabCount = tabCount; setEnabled(openDatabaseOnlyActions, tabCount > 0); setEnabled(severalDatabasesOnlyActions, tabCount > 1); } } COM: <s> enable or disable all actions based on the number of open tabs </s>
funcom_train/44875822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEqualsSame() { TomcatProperties props = new TomcatProperties("C:\\Tomcat41", TomcatProperties.VERSION_4_X); TomcatProperties other = new TomcatProperties("C:\\Tomcat41", TomcatProperties.VERSION_4_X); assertEquals("Same values test failed", props, other); } COM: <s> makes sure basic equality works </s>
funcom_train/50925374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Real2Range getBoundingBox() { Real2Range boundingBox = new Real2Range(); Real2 center = getCXY(); double rad = getRad(); boundingBox.add(new Real2(center.getX() - rad, center.getY() - rad)); boundingBox.add(new Real2(center.getX() + rad, center.getY() + rad)); return boundingBox; } COM: <s> extent of circle </s>
funcom_train/43039412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawDashedLine(Vec2D a, Vec2D b, float amount, PGraphics pg) { Vec2D last = a; for (int i = 0; i < amount; i++) { Vec2D p; p = a.interpolateTo(b, i / amount); if (i % 3 == 0) { pg.line(last.x, last.y, p.x, p.y); } last = p; } } COM: <s> draw a dashed line from a to b </s>
funcom_train/12553698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int verifyPort(String port) throws IllegalPropertyException { int returnedInt = -1; try { returnedInt = Integer.parseInt(port); } catch (NumberFormatException e) { throw new IllegalPropertyException(PORT_KEY, port, JHAVETranslator.translateMessage("mustBeInt"), // "it must be an integer", isDefaults); } return returnedInt; } COM: <s> convenience method to verify that a valid port is being used </s>
funcom_train/12636160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetUneditable() { TextInputSession is = getInputSession(); String text = getDisplayString( tf.buffer, hasFocus ? is.getPendingChar() : 0, tf.constraints, cursor, true); textWidth = ScreenSkin.FONT_INPUT_TEXT.stringWidth(text); xScrollOffset = 0; } COM: <s> initialize or reset variables used to auto scroll </s>
funcom_train/33057432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TyDemoT3Thread (TymeacInterface Ty) { // Tymeac ti = Ty; // new string for Tymeac function String x = "112233445566778899"; // make obj Object pass = (Object) x; // form a parameter for Tymeac TP = new TymeacParm(pass, // data "Function_1", // function name 30, // wait time 1); // priority } // end-constructor COM: <s> tymeac demonstration system multi test thread constructor </s>
funcom_train/1064110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getIcon() { EList stereotypeList = getUml2Element().getAppliedStereotypes(); if (stereotypeList.size() < 1) { // no applied stereotype return null; } com.cea.papyrus.umlutils.Stereotype firstSt = new com.cea.papyrus.umlutils.Stereotype((Stereotype) stereotypeList.get(0)); return firstSt.getIcon(); } COM: <s> return the icon of the first applied stereotype if it has one </s>
funcom_train/8539123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delProperty(int pos) { // range check if (children == null || pos < 0 || pos >= children.size()) throw new IndexOutOfBoundsException("No property " + pos); Property removed = children.get(pos); // tell to removed first so it has some chance for cleanup removed.beforeDelNotify(); // remove it now children.remove(pos); removed.parent = null; // propagate change (see addNotify() for motivation why propagate is here) propagatePropertyDeleted(this, pos, removed); // done } COM: <s> removes a property by position </s>
funcom_train/33851634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExceptionSet duplicate() { ExceptionSet dup = factory.createExceptionSet(); dup.exceptionSet.clear(); dup.exceptionSet.or(this.exceptionSet); dup.explicitSet.clear(); dup.explicitSet.or(this.explicitSet); dup.size = this.size; dup.universalHandler = this.universalHandler; dup.commonSupertype = this.commonSupertype; return dup; } COM: <s> return an exact copy of this object </s>
funcom_train/2861204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean stayConnected(boolean anotherCondition) { if (anotherCondition) { Log.out.println("StayConnected = true"); return true; } if (Thread.activeCount() < connectionLimit) { Log.out.println("StayConnected = true"); return true; } Log.out.println("StayConnected = false"); return false; } COM: <s> decide whether an idle connection should be dropped or should remain open </s>
funcom_train/1170818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CardList generateDeck() { CardList deck; int check; do { deck = get2ColorDeck(); check = deck.getType("Creature").size(); } while (check < 16 || 24 < check); addLand(deck); if (deck.size() != 60) throw new RuntimeException("GenerateConstructedDeck() : generateDeck() error, deck size it not 60, deck size is " + deck.size()); return deck; } COM: <s> p generate deck </s>
funcom_train/45231813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getTxpAccessoriCons() { if (txpAccessoriCons == null) { txpAccessoriCons = new JTextPane(); txpAccessoriCons.setText(scheda.getAccessoriConsegnati()); if(modality == mode.view){ txpAccessoriCons.setEditable(false); } txpAccessoriCons.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent e) { scheda.setAccessoriConsegnati(txpAccessoriCons.getText()); } }); } return txpAccessoriCons; } COM: <s> this method initializes txp accessori cons </s>
funcom_train/41759056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand3() { if (backCommand3 == null) {//GEN-END:|45-getter|0|45-preInit // write pre-init user code here backCommand3 = new Command("Back", Command.BACK, 0);//GEN-LINE:|45-getter|1|45-postInit // write post-init user code here }//GEN-BEGIN:|45-getter|2| return backCommand3; } COM: <s> returns an initiliazed instance of back command3 component </s>
funcom_train/1822935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PlanarImage scaleImage(PlanarImage im, float xScale, float yScale) { ParameterBlock pb = new ParameterBlock(); pb.addSource(im); pb.add(xScale); pb.add(yScale); return JAI.create("Scale", pb, null); } COM: <s> apply a scale operation to the image and return the </s>
funcom_train/4588678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void layoutDialog() { setLayout(new BorderLayout()); // title add(titlePanel, BorderLayout.NORTH); titlePanel.setBorder(new CompoundBorder(titlePanel.getBorder(), new EmptyBorder(10, 10, 0, 10))); titlePanel.add(titleLabel, BorderLayout.NORTH); titlePanel.add(titleIcon, BorderLayout.WEST); titlePanel.add(titleMessage, BorderLayout.CENTER); // buttons buttonPanel.add(cancelButton); buttonPanel.add(connectButton); add(buttonPanel, BorderLayout.SOUTH); } COM: <s> sets the components layout within the dialog </s>
funcom_train/13313466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String login(String userName, String password) { return sendCommand(Message.LOGIN, "<" + Message.USERNAME + ">" + userName + "</" + Message.USERNAME + "><" + Message.PASSWORD + ">" + password + "</" + Message.PASSWORD + ">"); } COM: <s> sends a login request to the server </s>
funcom_train/33959222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetConfiguration() { System.out.println("getConfiguration"); UbernotesManagerImplementation instance = new UbernotesManagerImplementation(); Configuration expResult = null; Configuration result = instance.getConfiguration(); 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 configuration method of class ubernotes manager implementation </s>
funcom_train/41990551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double costTo(State goal) { // Can't find a path if no valid search occurred if (_source == null) return Double.POSITIVE_INFINITY; else if (_scores.containsKey(goal)) { return _scores.get(goal).dist; } else { return Double.POSITIVE_INFINITY; } } COM: <s> returns the cost of the shortest path from the source node most recently </s>
funcom_train/20608869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJBSend() { if (jBSend == null) { jBSend = new JButton(); jBSend.setSize(new Dimension(83, 55)); jBSend.setText("Send"); jBSend.setMnemonic(KeyEvent.VK_S); jBSend.setLocation(466, 223); jBSend.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendMessage(); } }); } return jBSend; } COM: <s> this method initializes j bsend </s>
funcom_train/39107758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HTMLBodyElement returnToHyperlink(String url, String generator) { if (url.length() == 0) { return new HTMLRawText("return to "+generator); } else { HTMLAnchor ank = new HTMLAnchor(url, "return to "+generator+"."); return ank; } } COM: <s> returns a html anchor that is a link back to skils portal </s>
funcom_train/50504769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSecurityRole(ISecurityRole role) { this.role = role; if (role != null) { roleNameField.setText(role.getName()); roleDescField.setText(role.getDescription()); } else { roleNameField.setText("UnknownRole"); roleDescField.setText(""); } } COM: <s> sets the security role attribute of the security role panel object </s>
funcom_train/43391617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String deleteServiceType(String pID) { String res = "servicecall.deleteservicetype"; try { long tmp = Long.parseLong(pID); DH.getI().deleteServiceType(tmp); } catch (NumberFormatException e0) { res = "error.input"; } catch (NullPointerException e0) { res = "error.valid"; } catch (Exception e) { res = "error.datahandler"; e.printStackTrace(); } return res; } COM: <s> service type deletion </s>