__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/14077621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshMenu() { this.removeAll(); for (Iterator i = this.recentDocuments.iterator(); i.hasNext(); ) { String currDoc = (String) i.next(); RecentDocumentsMenuItem item = new RecentDocumentsMenuItem(currDoc); this.add(item); } } COM: <s> load the recent documents menu from the global properties </s>
funcom_train/3860988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void invalidateRowPositionCache(int index) { for (int i = index; i < rows.size(); i ++) ((Row) rows.get(i)).ypos = -1; if (!containsInvalidRows) { containsInvalidRows = true; firstInvalidRow = index; } else firstInvalidRow = Math.min(firstInvalidRow, index); lastInvalidRow = rows.size() - 1; invalidate(); } COM: <s> invalidate row position cache past a certain point </s>
funcom_train/41016448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cmdBlueDiscCancel() { int ind = GPS.getGPSReceiverIndex(tempGPS); if (ind < 0 || ind > 1) ind = 0; if (cgGPS != null) cgGPS.setSelectedIndex(ind, true); Display.getDisplay(LDIRMidlet.instance).setCurrent(form); } COM: <s> cancel bluetooth discovery </s>
funcom_train/51633034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void internalBeginReporting(boolean insideReportingSequence) { if (fCompilationUnit != null && fCompilationUnit.getJavaProject().isOnClasspath(fCompilationUnit)) { ProblemRequestorState state= new ProblemRequestorState(); state.fInsideReportingSequence= insideReportingSequence; state.fReportedProblems= new ArrayList(); synchronized (getLockObject()) { fProblemRequestorState.set(state); ++fStateCount; } } } COM: <s> sets up the infrastructure necessary for problem reporting </s>
funcom_train/42375584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void SetTakeResult(ArrayList<DocumentSummary> result, TransactionId transactionId) { this.state = State.SEARCH_COMPLETE; this.StateChanged(this.state.toString()); this.TransactionResultTakeOccured(result,transactionId); this.state = State.WAITING_FOR_ACTION; this.StateChanged(this.state.toString()); } COM: <s> set the result from a take action on the client </s>
funcom_train/42818701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLanguage() { try { //Set the language Settings set = db.getSettings(); Locale.setDefault(new Locale(set.getLanguage())); addDebugLogMessage("Language updated to: " + set.getLanguage()); } catch (Exception ex) { setUIError("error.databaseError", ex, false); //LOG FLAG MUST BE FALSE! } } COM: <s> makes the changes language settings global </s>
funcom_train/16499023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBoolean( String key, boolean d) { boolean def; String value = defaults.getProperty( key); if ("true".equalsIgnoreCase( value)) def = true; else if ("false".equalsIgnoreCase( value)) def = false; else // unparseable as boolean; use default def = d; return prefs.getBoolean( key, def); } COM: <s> returns the preference for the given key as a boolean </s>
funcom_train/24523441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void prepare() { try { tiledMap = new org.newdawn.slick.tiled.TiledMap(mapFile, resourceFolder); } catch (SlickException e) { System.err.println("ERROR: Unable to load tiledMap!"); System.err.println("The tiledMap " + mapFile + " couldn't be loaded!"); System.err.println("PoA will shutdown!"); System.err.println("STACK TRACE:"); e.printStackTrace(); System.exit(0); } prepared = true; } COM: <s> this method prepares the tiled map for use in the gl thread </s>
funcom_train/44612992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String translateExpression(final AllocationExpression expr) throws NonExecutableException { // type, arguments, typeArguments final CodeBuffer code = new CodeBuffer(); code.append("new %1%2%3", //$NON-NLS-1$ dispatch(expr.type), translateTypeArguments(expr.typeArguments), translateArguments(expr.arguments)); return code.toString(); } COM: <s> translates jml allocation expression </s>
funcom_train/44824681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDelegate (ISerPersistSvc[] delegateArray) { delegates.clear(); for (int i=0; delegateArray != null && i < delegateArray.length; i++) { if (delegateArray[i] instanceof IComposed) { delegates.add(delegateArray[i]); } else { throw new IllegalArgumentException ("Delegate does not implement IComposed: " + delegateArray[i]); } } } COM: <s> set the array of delegate persistence services to use </s>
funcom_train/7722633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties loadProperties(String pathname) { try { Properties loadedProperties = (Properties)this.properties.clone(); FileInputStream fis = new FileInputStream(pathname); loadedProperties.load(fis); fis.close(); return loadedProperties; } catch(FileNotFoundException fnfe) { return null; } catch(IOException fnfe) { return null; } } COM: <s> load a properties file with the given pathname </s>
funcom_train/11105901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAction(UIComponent component, String attributeValue) { if (attributeValue == null) { return; } if (isValueReference(attributeValue)) { setMethodBinding(component, "action", attributeValue, new Class[] {}); } else { MethodBinding mb = new ActionMethodBinding(attributeValue); component.getAttributes().put("action", mb); } } COM: <s> p sets the components code action code </s>
funcom_train/11371246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void opReplaceBlock(DataInputStream in) throws IOException { OpReplaceBlockProto proto = OpReplaceBlockProto.parseFrom(vintPrefixed(in)); replaceBlock(fromProto(proto.getHeader().getBlock()), fromProto(proto.getHeader().getToken()), proto.getDelHint(), fromProto(proto.getSource())); } COM: <s> receive op replace block </s>
funcom_train/50077166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkSize() throws Exception { Object response = this.dispatcher.callRemoteMethod( this.remoteAddress, "getSize", GroupRequest.GET_ALL, 0); assertEquals(this.cache.size(), ((Integer) response).intValue()); } COM: <s> checks if the size of both the cache instances are same </s>
funcom_train/20765733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public short getXFromAddress(int addr){ if(!flipx) return ((short)((addr&xmask)>>>xshift)); else return (short)(sizexm1 - ((int)((addr&xmask)>>>xshift))); // e.g. chip.sizex=32, sizex=31, addr=0, getX=31, addr=31, getX=0 } COM: <s> gets x from raw address </s>
funcom_train/25437899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void playerIncrease(String attr) { if (attr == "force") { this.playerForce++; } else if (attr == "defense") { this.playerDefense++; } else if (attr == "speed") { this.playerSpeed++; } else if (attr == "growing") { this.playerGrowing++; } else { Log.e("GallaxyDomination", "playerIncrease unknow code " + attr); } this.savePlayerToFile(); this.playGame(this.campaignName); } COM: <s> increase the selected user characteristic </s>
funcom_train/39176700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNames(String names) { String[] theNames = names.trim().split("\\s*,\\s*"); for(String name : theNames) { if(!"".equals(name)) { if(input) { inputAnnotationSets.add(name); } else { outputAnnotationSets.add(name); } } } } COM: <s> takes a comma separated string of annotation set names splits </s>
funcom_train/42399403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { public void onUncaughtException(final Throwable caught) { caught.printStackTrace(); Window.alert("Caught:" + caught + "\nmessage\"" + caught.getMessage() + "\"."); } }); final RootPanel rootPanel = RootPanel.get(); rootPanel.add(new InteractiveList()); } COM: <s> this is the entry point method </s>
funcom_train/1505900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage() { StringBuffer sb = new StringBuffer(); sb.append(getReason()); if (index > -1) { sb.append(" at index "); sb.append(index); } sb.append(": "); sb.append(input); return sb.toString(); } COM: <s> returns a string describing the error </s>
funcom_train/14368695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Entry getMedia(String[] pathInfo) throws Exception { String handle = pathInfo[0]; WebsiteData website = mRoller.getUserManager().getWebsiteByHandle(handle); String uploadPath = RollerFactory.getRoller().getFileManager().getUploadUrl(); File resource = new File(uploadPath + File.separator + pathInfo[2]); return createAtomResourceEntry(website, resource); } COM: <s> get absolute path to resource specified by path info </s>
funcom_train/40423701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAddress(IPAddresses ipAddresses) { synchronized (ipAddressVector) { if (ipAddressVector.contains(ipAddresses)) { logger.debug("Removing IP Address [" + ipAddresses.getInitialIPAddress().toString() + "]"); ipAddressVector.remove(ipAddresses); } } } COM: <s> deletes an existing address from the restricted list </s>
funcom_train/8878378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConceptualBO create() throws DataException{ String ID=null; try { ID = GUID.generate(); } catch (Exception ex) { ex.printStackTrace(); throw new DataException("Could not create member"); } //System.out.println("This is ID: "+ID); ConceptualBO cb = new ConceptualBO(ID); return cb; } ///instanceof( ) COM: <s> this creates an empty conceptual object and sets the guid for that object </s>
funcom_train/9766470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void rulerContextMenuAboutToShow(IMenuManager menu) { menu.add(new Separator(ITextEditorActionConstants.GROUP_REST)); menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); for (Iterator i= fRulerContextMenuListeners.iterator(); i.hasNext();) ((IMenuListener) i.next()).menuAboutToShow(menu); addAction(menu, ITextEditorActionConstants.RULER_MANAGE_BOOKMARKS); addAction(menu, ITextEditorActionConstants.RULER_MANAGE_TASKS); } COM: <s> sets up the ruler context menu before it is made visible </s>
funcom_train/47085460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteFile(FileResourceManager rm, String txId, String filename) throws BusinessException { try { rm.deleteResource(txId, FilenameUtils.getName(filename), true); } catch (ResourceManagerException e) { throw new BusinessException("business.error.general_transaction", e); } } COM: <s> delete a file with transaction </s>
funcom_train/28746902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getAllProcedureInfos() throws SimsException { Collection infos = null; try { infos = sampleSession.getAllProcedureInfos(); } catch (RemoteException rex) { errMsg += ErrMsgConstants.REMOTE_EX; //Handle the RemoteException. ExceptionUtil.handleRemoteException(errMsg, rex); } return infos; } COM: <s> this methods look at procedure table and return all procedure info objects </s>
funcom_train/32945764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer loadPersistedGroupSipType(final Long oid) { return (Integer) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session aSession) throws HibernateException, SQLException { return (Integer) aSession.createQuery("SELECT new java.lang.Integer(sipType) FROM TargetGroup WHERE oid=:groupOid") .setLong("groupOid", oid) .uniqueResult(); } }); } COM: <s> load the persisted target group sip type from the database </s>
funcom_train/40379297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type getGenericSuperclass() { if (type.isParameterized() != null) { // Historical irregularity: // Generic signature marks interfaces with superclass = Object // but this API returns null for interfaces if (isInterface()) return null; return type.isParameterized().isClass().getSuperclass(); } else return classType == null ? null : classType.getSuperclass(); } COM: <s> returns the tt type tt representing the direct superclass of the entity </s>
funcom_train/21701669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTable(TableController tableCtr) { tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("IllnessReportEntryTableModel.header.start", 0, null, locale)); tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("IllnessReportEntryTableModel.header.end", 1, null, locale)); } COM: <s> adds the header of the columns of this model </s>
funcom_train/5618632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rollback() { if (closed) { throw zxJDBC.makeException(zxJDBC.ProgrammingError, "connection is closed"); } if (!this.supportsTransactions) { return; } try { this.connection.rollback(); } catch (SQLException e) { throw zxJDBC.makeException(e); } } COM: <s> i this method is optional since not all databases provide transaction support </s>
funcom_train/50911499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Real2Vector sortAscending(Axis2 ax) { IntSet is = getXorY(ax).indexSortAscending(); Real2Vector temp = new Real2Vector(); for (int i = 0; i < size(); i++) { temp.add(this.get(is.elementAt(i))); } return temp; } COM: <s> sort array on x or y coordinate returns new array </s>
funcom_train/44546165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed (ActionEvent evt) { Debug.print("Launching help ...",Debug.DEBUG); JFrame browser=new HelpBrowser(JFrame.getFrames()[0], ResourceLoader.getResource("Resources/help.html"), ResourceLoader.getResource("Resources/nohelp.html")); } COM: <s> invoked when an action occurs </s>
funcom_train/31105361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SearchState nextSuccessor ( SearchStatistics statistics ) { // Set up the problem state iterator. if ( mSuccessorProblemSpaceStates == null ) { statistics.incrementStatesExpanded(); if ( (mSuccessorProblemSpaceStates = setupProblemStateIterator()) == null ) return null; } return createNextSearchState(statistics); } COM: <s> returns the next successor search state </s>
funcom_train/17583055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public Object getValue() { // // if (this.value != null) { // return (this.value); // } // ValueExpression ve = getValueExpression("value"); // if (ve != null) { // try { // return (ve.getValue(getFacesContext().getELContext())); // } // catch (ELException e) { // throw new FacesException(e); // } // // } else { // return (null); // } // // } COM: <s> p returns the code value code property of the </s>
funcom_train/46458929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocation(double x, double y) { if (getX() == x && getY() == y) return; super.setLocation(x, y); if (support != null) support.firePropertyChange("location", null, null); //$NON-NLS-1$ } COM: <s> overrides point2 d </s>
funcom_train/29869965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJEditTemplateSaveButton() { if (jEditTemplateSaveButton == null) { jEditTemplateSaveButton = new JButton(); jEditTemplateSaveButton.setText("Save"); jEditTemplateSaveButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { actionJEditTemplateSaveButton(e); } }); } return jEditTemplateSaveButton; } COM: <s> this method initializes j edit template save button </s>
funcom_train/35414221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean looks_nullable() throws internal_error { /* look and see if any of the productions now look nullable */ for (Enumeration e = productions(); e.hasMoreElements();) /* if the production can go to empty, we are nullable */ if (((production) e.nextElement()).check_nullable()) return true; /* none of the productions can go to empty, so we are not nullable */ return false; } COM: <s> test to see if this non terminal currently looks nullable </s>
funcom_train/11344207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFilter(String filter) { if (!filter.equals(m_dependency.getFilter())) { // Reconfigure try { m_dependency.setFilter(m_context.createFilter(filter)); } catch (InvalidSyntaxException e) { throw new IllegalStateException("A context filter is invalid : " + filter); } } } COM: <s> set the filter of the managed dependency </s>
funcom_train/43876340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String sendCommand( final String command, final String value ) { executeScript( "zAu.send(new zk.Event(null, 'onDataliteTestService', '" + command + ":" + value + "', 10))" ); waitForProcessing(); return webDriver.findElement( By.className( "selenium-response" ) ).getText(); } COM: <s> this method sends command to the server with defined value and </s>
funcom_train/7607166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float area(PointList contour) { int n = contour.size(); float A = 0.0f; for (int p = n - 1, q = 0; q < n; p = q++) { Point contourP = contour.get(p); Point contourQ = contour.get(q); A += contourP.getX() * contourQ.getY() - contourQ.getX() * contourP.getY(); } return A * 0.5f; } COM: <s> find the area of a polygon defined by the series of points </s>
funcom_train/47258667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox setUpResolutionChooser() { String[] res = getResolutions(modes); JComboBox resolutionBox = new JComboBox(res); //resolutionBox.setSelectedItem(settings.getWidth() + " x " + settings.getHeight()); resolutionBox.setSelectedItem(res[0]); return resolutionBox; } COM: <s> code set up resolution chooser code retrieves all available display modes and </s>
funcom_train/49202750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void contribute(Object content, PaletteRoot root, Map predefinedEntries, String pluginID) { Iterator iter = entries.iterator(); while (iter.hasNext()) { IEntryDescriptor descriptor = (IEntryDescriptor) iter.next(); if (ActivityUtil.isEnabled(descriptor.getID(), pluginID)) { descriptor.contribute(content, root, paletteFactory, predefinedEntries); } } } COM: <s> contributes to the given palette root based on the given editors </s>
funcom_train/41597067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createTables (final Connection jdbc) throws IOException, SQLException { final Set<String> tableNames = db.getTableNames(); for (String tableName : tableNames) { Table table = db.getTable(tableName); createTable(table, jdbc); createIndexes(table, jdbc); } } COM: <s> iterate over and create sqlite tables for every table defined </s>
funcom_train/50846489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsCurrency() throws Exception { JDBCResultSetMetaData rsmd = newJdbcResultSetMetaData(); int columnCount = rsmd.getColumnCount(); // don't support currency type for (int i = 1; i <= columnCount; i++) { assertEquals("column: " + i, false, rsmd.isCurrency(i)); } } COM: <s> test of is currency method of class org </s>
funcom_train/23735915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startNewTransaction(TestContext ${artifactId}Context, TransactionContext txContext) throws Exception { txContext.startTransaction(); ++this.transactionsStarted; if (logger.isInfoEnabled()) { logger.info("Began transaction (" + this.transactionsStarted + "): transaction manager [" + txContext.transactionManager + "]; rollback [" + isRollback(${artifactId}Context) + "]"); } } COM: <s> start a new transaction for the supplied </s>
funcom_train/46125648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initErrorView(UserRequest ureq, WindowControl wControl, String errorString) { Panel p = new Panel("errorPanel"); columnLayoutCtr = new LayoutMain3ColsController(ureq, wControl, null, null, p, "cptestmain"); this.putInitialPanel(columnLayoutCtr.getInitialComponent()); } COM: <s> initializes a special view where the user is informed about errors </s>
funcom_train/12640632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream out) throws IOException { DataOutputStream dataOut = new DataOutputStream(out); // constant_pool_count: number of entries plus one dataOut.writeShort(pool.size() + 1); for (Iterator iter = pool.iterator(); iter.hasNext();) { Entry e = (Entry) iter.next(); e.write(dataOut); } } COM: <s> write this constant pool to a stream as part of </s>
funcom_train/18024859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFillColor(Color fillColor) { Color oldColor= new Color( this.fillColor ); this.fillColor = fillColor.getRGB(); this.type.initializeColorTable( COLORTABLE_SIZE, 0, this.type.getColorCount() ); markDirty(); update(); firePropertyChange( PROPERTY_FILL_COLOR, oldColor,fillColor ); } COM: <s> setter for property fill color </s>
funcom_train/12652331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCharacteristicResultGetSet() { CharacteristicResult characteristicResult = new CharacteristicResult(); characteristicResult.setCharacteristic("foobar"); assert "foobar".equals(characteristicResult.getCharacteristic()) : "Set did not store characteristic as 'foobar' " + characteristicResult.getCharacteristic(); characteristicResult.setResult(PASS_SUBJECTIVE); assert PASS_SUBJECTIVE.equals(characteristicResult.getResult()) : "Set did not store pass-subjective result " + characteristicResult.getResult(); } COM: <s> test get set characteristic result </s>
funcom_train/31932171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reload(String name) throws ConfigurationManagerException { if (configurations.containsKey(name)) { Configuration cfg = getConfiguration(name); ConfigurationHandler handler = (ConfigurationHandler) handlerMapping.get(name); if (handler == null) { throw new ConfigurationManagerException("There is no handler associated for this configuration"); } cfg = handler.load(); configurations.put(name, cfg); } else { throw new ConfigurationManagerException("There is no configuration with this name"); } } COM: <s> this method will reload a configuration with the same handler that </s>
funcom_train/25807568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sequenceMethodAfter(final JoinPoint jp) { List<SequenceDiagramAspect> aspectInstances = SequenceDiagramAspect.THREAD_LOCAL.get(); for (SequenceDiagramAspect aspect : aspectInstances) { aspect.seqDiagram.setActiveMethod( aspect.seqDiagram.getActiveMethod().getParent()); //change the diagram depth aspect.seqDiagram.decreaseDiagramDepth(); } } COM: <s> method executed after the execution of any method belonging to a </s>
funcom_train/4557777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPublicMagnetStopTracks() { repEng.newStep("278", "Publish Magnet main page-Stop the tracks"); //1. Launch http://hobbes.ontometrics.com/magnetportal/ //2. Click the Manage You Assets link. //3. Click the Publish Magnet link in the Albums/Tracks page. //4. Click the Artist image preview in middle. //5. Choose a tracks reord and click it. //6. Click the Stop icon. // The track mp3 will be stopped, and the broadcast time process resets. } COM: <s> 278 publish magnet main page stop the tracks </s>
funcom_train/29597096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void move(final int pixelX, final int pixelY) { this.checkWidget(); final AffineTransform atCopy; synchronized (transformMutex) { atCopy = new AffineTransform(at); // Build the translation matrix final AffineTransform sca = AffineTransform.getTranslateInstance(pixelX, pixelY); atCopy.preConcatenate(sca); if (!isValidTransformation(atCopy)) { return; } // add the translation matrix to the transformation matrix. at = atCopy; } fireTransformEvent(Type.MOVE); redraw(); } COM: <s> moves the drawing area by the given number of pixels </s>
funcom_train/41383247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void append(DiscoverData data){ String name = data.getDisplayName(); if ( _data.containsKey(name) ){ DiscoverListEntry entry = _data.get(name); entry.setDiscoverData(data); }else{ _data.put(name, new DiscoverListEntry(data)); for ( DiscoverListChangeListener listener : _listeners ){ listener.discoverListEntryAdded(name); } } } COM: <s> adds a discovery data entry to the list </s>
funcom_train/34906132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDescriptors () throws Exception{ List ids = imfc.getDescriptors(); assertNotNull("the Descriptors is null.",ids); assertTrue("the Descriptors size <2", ids.size() >= 2); InitializerDescriptor id = imfc.getDescriptor("initializer"); assertNotNull("Initializer is null.",id); assertEquals("param is inconsistent.","aaa",(String)id.getParams().get("aa")); InitializerDescriptor id1 = imfc.getDescriptor("simpleInitializer"); assertNotNull("SimpleInitializer is null.",id1); } COM: <s> test method of descriptors </s>
funcom_train/42876309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isTextBufferDirty(int baseAddress) { boolean isDirty = false; // Update dirty int addressStart = baseAddress >> 7; int addressEnd = addressStart + 8; for (int address = addressStart; address < addressEnd; address++) { graphicsDirty[address] = apple.graphicsDirty[address]; apple.graphicsDirty[address] = false; if (graphicsDirty[address]) { isDirty = true; } } return isDirty; } COM: <s> is text buffer dirty </s>
funcom_train/31625108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBeanRoundTripConvert() throws Exception { CompletionBean expectedReturn = sampleBean; WizDefinition intermediateReturn= emoCompletionDBObjConverter.convertToDBObject(sampleBean); assertNotNull(intermediateReturn); CompletionBean actualReturn = emoCompletionDBObjConverter.convertToBean(intermediateReturn); assertEquals(expectedReturn, actualReturn); } COM: <s> general smoke test to make sure that bean wizard definition bean </s>
funcom_train/3561313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DbResult getDataSetsByName(String name) throws DbException { XTable table; NVPair[] formData; InputStream is; table = new XTable(); formData = new NVPair[1]; formData[0] = new NVPair("dataSetName",name); is = processQueryPost(GET_DATA_SET_BY_NAME_PAGE, formData); table.setSource(is); return table; } COM: <s> returns a list of data sets whose name is specified </s>
funcom_train/25504723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextStyle loadWidgetStyle(String[] widgetKey) throws ResourceUnavailableException { assert widgetKey != null; assert widgetKey.length == 2; assert widgetKey[0] != null; assert widgetKey[1] != null; final String[] key = new String[] { widgetKey[0], widgetKey[1] + ".style" }; return loadStyle(key); } COM: <s> load a widgets style attribute </s>
funcom_train/45774905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pageDesignChanged(ItemEvent ie) { int selected = ie.Selected; try { agendaTemplate.load( agendaTemplates[1][selected] , topicsControl.getTopicsData()); } catch (Exception ex) { SystemDialog.showMessageBox(xMSF, "ErrBox", VclWindowPeerAttribute.OK, resources.resErrOpenTemplate); ex.printStackTrace(); } } COM: <s> first page page design listbox changed </s>
funcom_train/15742609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isSharedEditor(IEditorPart editorPart) { if (sarosSession == null) return false; if (EditorAPI.getViewer(editorPart) == null) return false; IResource resource = this.editorAPI.getEditorResource(editorPart); if (resource == null) return false; return this.sarosSession.isShared(resource.getProject()); } COM: <s> this method verifies if the given editor part is supported by saros which </s>
funcom_train/32129535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SearchPatternData getPatternData() { SearchPatternData match = findInPrevious(fPattern.getText()); if (match != null) { fPreviousSearchPatterns.remove(match); } match = new SearchPatternData(getPattern(), getExtensions(), getContainer().getSelectedScope(), getContainer() .getSelectedWorkingSets()); fPreviousSearchPatterns.add(0, match); return match; } COM: <s> return search pattern data and update previous searches </s>
funcom_train/36851880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(byte[] b, int off, int len) throws IOException { if (position == size) { return -1; } int copySize = Math.min(len, size - position); System.arraycopy(buffer, position, b, off, copySize); position = position + copySize; return copySize; } COM: <s> reads an array of bytes as tt input stream tt would do </s>
funcom_train/32802186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String processEntity() throws java.io.IOException { StringBuffer buf= new StringBuffer(); int ch= nextChar(); while (Character.isLetterOrDigit((char)ch) || ch == '#') { buf.append((char) ch); ch= nextChar(); } if (ch == ';') return entity2Text(buf.toString()); buf.insert(0, '&'); if (ch != -1) buf.append((char) ch); return buf.toString(); } COM: <s> a has been read </s>
funcom_train/12189040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReadBuffer() { String input = "<numbers>123456789012</numbers>"; Reader reader = doConfig(input, null, null); String result = doRead(reader, -1); assertEquals("<fragment>"+input+"</fragment>", result); } COM: <s> tests the reading of characters from the stream </s>
funcom_train/1579515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LatLonPoint getCenter(final float[] extents) { //extents: the lat/lon extent of the EsriGraphicList contents, //returned as miny, minx, maxy maxx in order of the array. LatLonPoint center = new LatLonPoint(); center.setLatitude((extents[0] + extents[2]) / 2); center.setLongitude((extents[1] + extents[3]) / 2); return center; } COM: <s> gets the center of the extents </s>
funcom_train/3370379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMinWidth(int minWidth) { int old = this.minWidth; this.minWidth = Math.max(Math.min(minWidth, maxWidth), 0); if (width < this.minWidth) { setWidth(this.minWidth); } if (preferredWidth < this.minWidth) { setPreferredWidth(this.minWidth); } firePropertyChange("minWidth", old, this.minWidth); } COM: <s> sets the code table column code s minimum width to </s>
funcom_train/22285122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void layout() { calculateLayers(); calculateTabBounds(); if (current >= 0) { Widget w = widgets[current]; if (tabMode == NONE) { w.setBounds(0, 0, width, height); } else { int h = getTabHeight() + 3; w.setBounds(2, h, width-4, height-h-2); } w.validate(); } } COM: <s> lay out the current page </s>
funcom_train/20241906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdExitInvestimento() { if (cmdExitInvestimento == null) {//GEN-END:|233-getter|0|233-preInit // write pre-init user code here cmdExitInvestimento = new Command("Sair", Command.EXIT, 0);//GEN-LINE:|233-getter|1|233-postInit // write post-init user code here }//GEN-BEGIN:|233-getter|2| return cmdExitInvestimento; } COM: <s> returns an initiliazed instance of cmd exit investimento component </s>
funcom_train/25290225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Bounds getTriggeringBounds() { if (behav == null) { throw new IllegalStateException(Ding3dI18N.getString("WakeupOnCollisionMovement6")); } synchronized (behav) { if (!behav.inCallback) { throw new IllegalStateException (Ding3dI18N.getString("WakeupOnCollisionMovement6")); } } return (collidingBounds != null ? (Bounds)(collidingBounds.clone()): null); } COM: <s> retrieves the bounds object that caused the collision </s>
funcom_train/46213342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encodeEnd(FacesContext fc, UIComponent c) throws IOException { GorillaComponent gc = (GorillaComponent) c; if (!gc.isDivNeeded()) { return; } ResponseWriter writer = fc.getResponseWriter(); writer.endElement("div"); if (logger.isDebugEnabled()) { writer.write("<!-- " + c.getId() + " -->"); writer.write('\n'); } } COM: <s> for components requiring a surrounding div output the closing div tag </s>
funcom_train/25471499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { resultSB.append("TestAnalyzer: First 10 characters of the cryptogram = " + text.substring(0,10) + "\n"); if (mFrame != null) mFrame.append(resultSB.toString()); else System.out.println(resultSB.toString()); } COM: <s> run is part of analyzer interface </s>
funcom_train/26208005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleFSEvent(FSEvent anEvent) { if ((anEvent.getCmd().equals("editAttrib") || (anEvent.getCmd().equals("attributeChanged")) && (anEvent.getSource() != this))) { setAttributeForEdit((FzyAttribute) anEvent.getPackage()); } } COM: <s> set the attribute for edit if the fsevent </s>
funcom_train/4786244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List refresh() { if (startDate == null) { return new LinkedList(); } LinkedList result = new LinkedList(); if(!isInitialized()) { return result; } //refresh Date dateToRefresh = null; for (int i = 0; i < dayColumns.length; i++) { dateToRefresh = calculateDate(startDate, i); refresh(dateToRefresh, i, result); } return result; } COM: <s> refresh everything in the display </s>
funcom_train/21375317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendError(Throwable e) { Message msg = new Message(); Bundle data = new Bundle(); msg.arg1 = -1; data.putString("EXCEPTION", e.getMessage()); data.putString("EXCEPTION_CLASS", e.getClass().getSimpleName()); msg.setData(data); mHandler.sendMessage(msg); } COM: <s> send an error to the ui handler </s>
funcom_train/20397275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(){ while(game_state == Types.EngineState.ALIVE){ if(time_left <= 0){ continue; } processMoveQueue(); try{ Thread.sleep(THREAD_SLEEP); }catch(Exception e){} if(game_state == Types.EngineState.WIN){ while(game_state != Types.EngineState.ALIVE) ; } } } COM: <s> the method called by the scheduler when the thread wakes up which </s>
funcom_train/36470520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteTemplate(long template_id) { String idAsStringArray[] = { (new Long(template_id)).toString() }; // First delete all items belonging to this template mDb.delete(TABLE_TEMPLATEITEM, KEY_TEMPLATEITEM_TEMPLATEID+"=?", idAsStringArray); return mDb.delete(TABLE_TEMPLATE, KEY_TEMPLATE_ID+"=?", idAsStringArray) > 0; } COM: <s> delete a template and all its items from the database </s>
funcom_train/16695271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParentClassLoader(ClassLoader optionalParentClassLoader, Class[] auxiliaryClasses) { assertNotCooked(); this.parentClassLoader = ( optionalParentClassLoader != null ? optionalParentClassLoader : Thread.currentThread().getContextClassLoader() ); this.optionalAuxiliaryClasses = auxiliaryClasses; } COM: <s> allow references to the classes loaded through this parent class loader </s>
funcom_train/5326291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gbcSetRamBank(byte control) { if (PgbSettings.system == PgbSettings.SYS_GBC) { //System.out.println("set gameboy color ram bank: " + Integer.toHexString(control)); gbcRAM = control; int bank = ((gbcRAM & 0x07) == 0) ? 0 : (gbcRAM & 0x07) - 1; loRAMOffset = 0xC000 - bank * 0x1000; } } COM: <s> set the gameboy color ram bank </s>
funcom_train/27825602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SetTracker getPropertiesToConceptTracker() { if (m_propertiesTo==null) m_propertiesTo=new SetTracker() { protected Set loadSet() throws KAONException { return getVirtualProperties(getConcept().getPropertiesToConcept(),true); } }; return m_propertiesTo; } COM: <s> returns the tracker for all virtual properties pointing to this concept </s>
funcom_train/15697142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPath(Directory start, BaseFile bf) { for (BaseFile f : start.getSubentries()) { if (f == bf) { return bf.getName(); } if (f instanceof Directory) { String path = getPath((Directory) f, bf); if (path != null) { return f.getName() + "/" + path; } } } return null; } COM: <s> get the path to a file </s>
funcom_train/44663701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getMessage(FormModel formModel, String field, String faceDescriptorProperty) { String[] keys = getMessageKeys(formModel, field, faceDescriptorProperty); return getMessageSourceAccessor().getMessage(new DefaultMessageSourceResolvable(keys, null, keys[0])); } COM: <s> returns the value of the required property of the field face </s>
funcom_train/5395895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsEndTag() { System.out.println("isEndTag"); short tag = 0; TableElement instance = null; boolean expResult = true; boolean result = instance.isEndTag(tag); 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 is end tag method of class org </s>
funcom_train/27766246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int sipUnregisterAll() { if (registerProcessor == null) { return 0; } int unregs = 0; for (int cnt=0; cnt<registerProcessor.length; cnt++) { if (registerProcessor[cnt] != null) { registerProcessor[cnt].unregister(); registerProcessor[cnt] = null; sipRegistrarStatus[cnt] = NOT_REG; unregs++; } } sc.setPrimarySipAddress("unknown@" + localIpAddress); gui.setRegNa(); return unregs; } COM: <s> unregisters from all registrars that are in the sip registrar info </s>
funcom_train/18861164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleAdd() { ExceptionDialog dialog = new ExceptionDialog(getSection().getShell()); dialog.setProject(getProject()); if (dialog.open() == ExceptionDialog.OK) { ExceptionType element = dialog.getException(); Command command = AddCommand.create(getEditingDomain(), getGlobalExceptions(), StrutsConfigPackage.eINSTANCE .getExceptionContainerType_Exceptions(), element); if (command.canExecute()) { getEditingDomain().getCommandStack().execute(command); } } } COM: <s> adds a new exception element to the global exceptions element </s>
funcom_train/10680880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getNextValueAsDouble() { reading_data_index = reading_data_index + TypesLengths.getTypeLength(TypesLengths.DOUBLE_ID); long res = readFromByteArray(data, reading_data_index - TypesLengths.getTypeLength(TypesLengths.DOUBLE_ID), TypesLengths .getTypeLength(TypesLengths.DOUBLE_ID)); return Double.longBitsToDouble(res); } COM: <s> gets the next value of the data of the packet as double </s>
funcom_train/22470922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isChildOf(Keyword other) { if (other == null) { return false; } if (this.equals(other)) { return false; } if (this.getParent() == null) { return false; } if (this.getParent().equals(other)) { return true; } return this.getParent().isChildOf(other); } COM: <s> determines if this keyword is a child of another keyword </s>
funcom_train/3718316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkValue(int table, String value) throws UndefinedTableException, LookupException { boolean exists = false; String[] values = this.getValues(table); int c = 0; while (c < values.length && !exists) { if (value.equals(values[c++])) exists = true; } return exists; } COM: <s> returns true if the given value exists in the given table </s>
funcom_train/25202149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkMagnification(long magnification) throws Exception { documentWriterOptions.setMagnification(magnification); documentWriter = new DviDocumentWriter(configuration, documentWriterOptions); ((SingleDocumentStream) documentWriter).setOutputStream(outputStream); FixedCount[] pageNo = null; documentWriter.shipout(new PageImpl(nodeList, pageNo)); } COM: <s> check the specified magnification </s>
funcom_train/47928324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void alterDamageCounter(char per, int thisMuch) { if (per == 'c' && damageMultiplierOpp > 0 && damageMultiplierOpp < 20) { damageMultiplierOpp = damageMultiplierOpp + thisMuch; } if (per == 'o' && damageMultiplierChar > 0 && damageMultiplierChar < 20) { damageMultiplierChar = damageMultiplierChar + thisMuch; } } COM: <s> alter damage multipliers used to strengthen weaken attacks </s>
funcom_train/1345447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNote1() { Trajectory mapper = new Trajectory(); ArrayList<Float> coords = new ArrayList<Float>(); coords.add((float) 0); coords.add((float) 0); coords.add((float) 1); coords.add((float) 0); mapper.plot(coords); ArrayList<Note> notes = mapper.map(); assertEquals(1, notes.size()); Note note = notes.get(0); assertEquals("C", note.getStep()); assertEquals(4, note.getOctave()); assertEquals(1, note.getDuration()); } COM: <s> 1 note of pitch c and length 1 </s>
funcom_train/45623457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTrademarkPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ALType_trademark_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ALType_trademark_feature", "_UI_ALType_type"), MSBPackage.eINSTANCE.getALType_Trademark(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the trademark feature </s>
funcom_train/7979030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DataContainer getDataContainerRecursive(Context context) { if (context.settings == null) { return null; } DataContainer data = context.settings.getData(this); if (data == null && context.settings.getParent(context.uri) != null) { context.settings = context.settings.getParent(context.uri); data = getDataContainerRecursive(context); } return data; } COM: <s> get the active data container for this complex type for a specific </s>
funcom_train/46455909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXLabel(String label, String font_name) { xLine.setText(label); if((font_name==null)||font_name.equals("")) { return; } xLine.setFont(Font.decode(font_name)); setLabelFont(font_name); } COM: <s> set the label for the x horizontal axis </s>
funcom_train/8533867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Comparable begin, Comparable end, Object object) { int beginPos = addPoint(begin); int endPos = addPoint(end); for (int i = beginPos; i < endPos; i++) { Point point = (Point) fPoints.get(i); point.objects.add(object); } } COM: <s> adds a new object associated with the specified range </s>
funcom_train/45871313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String lookupUserGroups(int sessionID, String contactHandle) { // Build where clause String whereClause = String.format("member = U'%s'", contactHandle); // Get list xml String listXml = getUSDWebService().doSelect(sessionID, "grpmem", whereClause, -1, toArrayOfString(Arrays.asList("group"))); return parseUserGroups(listXml); } COM: <s> lookup the groups the user is member of </s>
funcom_train/7371905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void dumpMultiOutputNestedOperator(E op, Collection<S> plans) { dumpOperator(op); for (S plan: plans) { PlanDumper dumper = makeDumper(plan, ps); dumper.dump(); for (Operator p: plan.getRoots()) { dumpEdge(op, p); } } } COM: <s> will be called for nested operators where the plans represent </s>
funcom_train/43233086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toDisplayWithParent() { /** * Represents the Visitor to handle Systems */ class IsRootVisitor implements ISystemVisitor { private Boolean result; @Override public void handleSystem(final System system) { this.result = false; } @Override public void handleRoot(final Rootsystem rootsystem) { this.result = true; } } final IsRootVisitor visitor = new IsRootVisitor(); this.getParent().accept(visitor); if (!visitor.result) { return this.getParent().getName() + ">" + this.getName(); } return this.getName(); } COM: <s> return the name with the parent as a prefix </s>
funcom_train/51245854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initButtonPanel(final Vector children) { super.initButtonPanel(children); JButton addAll = new JButton("Add All"); addAll.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { addAllChildren(children); } }); buttonPanel.add(addAll); } COM: <s> initializes the button panel </s>
funcom_train/7621696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scrollTo(int x, int y) { if (mScrollX != x || mScrollY != y) { int oldX = mScrollX; int oldY = mScrollY; mScrollX = x; mScrollY = y; onScrollChanged(mScrollX, mScrollY, oldX, oldY); invalidate(); } } COM: <s> set the scrolled position of your view </s>
funcom_train/39315633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDot1ActionPerformed() { System.out.println("testDot1ActionPerformed"); f.dot1ActionPerformed(actionEvent); assertEquals(f.curBrush,f.dot1); assertEquals(f.toolBrush.getBrushType(), f.toolBrush.DOT1); //t.dot1ActionPerformed(actionEvent); //assertEquals(t.curBrush,t.dot1); } COM: <s> test of dot1 action performed method of class terp paint </s>