__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/25509949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean lastChance() { String msg = "<html>Your project has unsaved changes.<br>Click " + "<font color='blue'>Ok</font> to discard them and continue" + " or<br><font color='red'>Cancel</font> to return to the " + "current project.</html>"; return confirm(msg, "Unsaved Changes"); } COM: <s> give the user a last chance to save an open project </s>
funcom_train/11648504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void merge(AuthenticationInfo info) { authcInfo.merge(info); // Merge SimpleAccount specific info if (info instanceof SimpleAccount) { SimpleAccount otherAccount = (SimpleAccount) info; if (otherAccount.isLocked()) { setLocked(true); } if (otherAccount.isCredentialsExpired()) { setCredentialsExpired(true); } } } COM: <s> merges the specified code authentication info code into this code account code </s>
funcom_train/21729479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getu(RAM ram, int off) { switch (this) { case BYTE: { return ram.getByte(off); } case WORD: { return ram.getWord(off); } case LONG: { return ram.getSignedLong(off); } default: { throw new Error(); } } } COM: <s> note that in the </s>
funcom_train/32908908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArtifactList getSameTypeChildren(int parentTableRefId, int parentId, ServiceCall call) throws java.rmi.RemoteException, DataAccessException, Exception { startService(call); ArtifactList list = ada.getSameTypeChildren(parentTableRefId, parentId); setReference(list, parentTableRefId); stopService(call); return list; } COM: <s> return the child features requirements etc </s>
funcom_train/30075900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelAndView urlTypesHandler(HttpServletRequest request, HttpServletResponse response) throws ServletException { Map model = new HashMap(); model.put("urlTypes", gpir.getUrlTypes()); return new ModelAndView("urlTypesView", "model", model); } COM: <s> custom handler for url types display </s>
funcom_train/49403904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateSamFileVerbose(final SAMFileReader samReader, final ReferenceSequenceFile reference) { init(reference, samReader.getFileHeader()); try { validateSamFile(samReader, out); } catch (MaxOutputExceededException e) { out.println("Maximum output of [" + maxVerboseOutput + "] errors reached."); } boolean result = errorsByType.isEmpty(); cleanup(); return result; } COM: <s> outputs validation error details to out </s>
funcom_train/43416988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readUMemChunk(final Chunk umemChunk) { final Memory chunkMem = umemChunk.getMemory(); final int datasize = umemChunk.getSize(); dynamicMem = new byte[datasize]; chunkMem.copyBytesToArray(dynamicMem, 0, Chunk.CHUNK_HEADER_LENGTH, datasize); } COM: <s> reads the uncompressed dynamic memory state </s>
funcom_train/12900549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLabelDecorator(ILabelDecorator decorator) { labelDecorator = decorator; if (isActive()) { ILabelProvider provider = labelProviderNotifier.getLabelProvider(); if (provider instanceof DecoratingLabelProvider) ((DecoratingLabelProvider) provider).setLabelDecorator(labelDecorator); else { ILabelProvider newProvider = new DecoratingLabelProvider(provider, labelDecorator); labelProviderNotifier.setLabelProvider(newProvider); } refreshVisuals(); } } COM: <s> add a label decorator to the editpart </s>
funcom_train/3337673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OutputStream wrapOutputStream(OutputStream out) throws IOException { if (compress == USE_BZIP) { return new CBZip2OutputStream(out); } if (compress == USE_GZIP) { return new GZIPOutputStream(out); } fatal("Internal Error: Unknown decompress type", -1); return null; } COM: <s> wraps an output stream with a compression stream for writing compressed archives </s>
funcom_train/43098061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScript(Object handle, Object expr) { if (handle instanceof MAction && (expr == null || expr instanceof MActionExpression)) { ((MAction) handle).setScript((MActionExpression) expr); return; } throw new IllegalArgumentException("handle: " + handle + " or expr: " + expr); } COM: <s> set the expression script for an action </s>
funcom_train/42498058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkNeXMLSchema(Schema s) throws DataIOException { for ( int i=0; i<s.getColumnCount(); ++i ) { Class type = s.getColumnType(i); if ( TYPES.get(type) == null ) { throw new DataIOException("Data type unsupported by the " + "NeXML format: " + type.getName()); } } } COM: <s> checks if all schema types are compatible with the ne xml specification </s>
funcom_train/45720361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshTimer () { fixStatus.setText(fixStates[gps.getState()]); if (gps.getState() == LocationService.ONLINE) { latitude.setText(ZonePoint.makeFriendlyLatitude(gps.getLatitude())); longitude.setText(ZonePoint.makeFriendlyLongitude(gps.getLongitude())); altitude.setText(ZonePoint.makeFriendlyDistance(gps.getAltitude())); } else { latitude.setText("N/A"); longitude.setText("N/A"); altitude.setText("N/A"); } repaint(); } COM: <s> updates status display with data from gps state lat lon alt </s>
funcom_train/13287634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getVariable(String negID, String userID, String variableName) { JbpmContext jbpmContext = null; try{ JbpmConfiguration jbpmConfig = configLoader.getConfiguration(); jbpmContext = jbpmConfig.createJbpmContext(); long procID = getProcID(negID,userID); ProcessInstance processInstance = jbpmContext .loadProcessInstanceForUpdate(procID); Object variable = processInstance.getContextInstance().getVariable( variableName); return variable; } finally { if (jbpmContext != null) jbpmContext.close(); } } COM: <s> gets the variable from context </s>
funcom_train/4519983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rotateLeft() { int width = bufferedImage.getWidth(); int height = bufferedImage.getHeight(); BufferedImage result = new BufferedImage(height, width, BufferedImage.TYPE_INT_BGR); for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { int rgb = bufferedImage.getRGB(x, y); result.setRGB(y, x, rgb); } } bufferedImage = result; } COM: <s> rotates image 90 degrees to the left </s>
funcom_train/22564783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPortalUrlGroup(final long groupId) { try { Group group = GroupLocalServiceUtil.getGroup(groupId); return getPortalUrlCompany(group.getCompanyId()); } catch (PortalException e) { LOG.warn("could not retrieve portal URL for group with id " + groupId, e); } catch (SystemException e) { LOG.warn("could not retrieve portal URL for group with id " + groupId, e); } return null; } COM: <s> this method generates a url for the portal </s>
funcom_train/43245165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetOccupation() { System.out.println("getOccupation"); EmploymentDataDG1Object instance = new EmploymentDataDG1Object(); String expResult = ""; String result = instance.getOccupation(); 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 occupation method of class org </s>
funcom_train/32060976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPreBlankishChar( char[] str, int startpos ) { for( int i = startpos - 1; i >= 0; i-- ) { if( StringManipulator.isBlankishChar( str[i] ) ) return i; } // if no blankish chars where found then return the start position return startpos; } COM: <s> returns the first char index inside the char array str before startpos </s>
funcom_train/43246908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTmpAddrPhoneNumber() { System.out.println("setTmpAddrPhoneNumber"); String tmpAddrPhoneNumber = ""; PatientDemographicsObject instance = new PatientDemographicsObject(); instance.setTmpAddrPhoneNumber(tmpAddrPhoneNumber); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set tmp addr phone number method of class org </s>
funcom_train/14586044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runPlay(Play[] play) { int timeChange = runGenerator(play); ++down; currDrivePlay.addPrimPlayStat(LibTxtfl.RUSH, deliverer, deliveryDist, recipient, recipientDist, defender); currDrivePlay.setResult(LibTxtfl.RUSH); // no un/success as in in/complete pass updateGameStats(timeChange); } COM: <s> rushes the football for an on the ground non pass offensive play </s>
funcom_train/25365869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsTwohandedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Weapon_isTwohanded_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Weapon_isTwohanded_feature", "_UI_Weapon_type"), LeveleditorPackage.Literals.WEAPON__IS_TWOHANDED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is twohanded feature </s>
funcom_train/34134659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert( int index, XElement e) { List list = content(); int nodeCount = 0; int elementCount = 0; //List list = elements(); while ( index > elementCount) { Object node = list.get( nodeCount); if ( node instanceof XElement) { elementCount++; } nodeCount++; } if ( nodeCount < list.size()) { list.add( nodeCount, e); } else { list.add( e); } } COM: <s> insert the element as the nth element </s>
funcom_train/8306085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (this.getObject() == null) { this.getStringBuffer().append(this.getStyle().getNullText()); } else { style.appendEnd(this.getStringBuffer(), this.getObject()); } return this.getStringBuffer().toString(); } COM: <s> p returns the built code to string code </s>
funcom_train/35079073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSelected(int pageIndex, int rowIndex, int columnIndex) { if(!isSelected()) return false; long startLong = this.start.toLong(); long endLong = this.end.toLong(); long current = Position.toLong(pageIndex, rowIndex, columnIndex); return startLong<=current && current<endLong; } COM: <s> check if the page and row and column is in the selection </s>
funcom_train/35838588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(PCSession session, IModel model) { oModel = model; oSession = session; // set up the object in the model for bidirectional relationship and cache management // THIS CACHE IS NOT USED AT PRESENT //model.addObject(this); // set up property change support for firing property changes to the GUI //oChangeSupport = new PropertyChangeSupport(this) ; } COM: <s> intialize this object with its model and session </s>
funcom_train/21995853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private URL getContentURL(int src_id) throws BusException { SourceBus source_bus = SourceBus.getInstance(); Hashtable args = new Hashtable(); args.put(Source.POPULATE_CONTENT_URL, Source.DEFAULT_URL); Source source = (Source)source_bus.getRec(src_id, args); return source.getContentURL(); } COM: <s> obtain a fresh content url for the specified source </s>
funcom_train/37797195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void eraseTestInfo() { if (offline) { return; } for (Enumeration e = dataMap.propertyNames(); e.hasMoreElements();) { String key = (String) e.nextElement(); if (key.startsWith("__") || key.startsWith("___")) { dataMap.remove(key); } } } COM: <s> removes the test related rows from the internal hashmap </s>
funcom_train/21606537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkPropertySkipping(PropertyValues pvs) { if (this.pd != null && pvs != null) { if (pvs.contains(this.pd.getName())) { // Explicit value provided as part of the bean definition. return true; } else if (pvs instanceof MutablePropertyValues) { ((MutablePropertyValues) pvs).registerProcessedProperty(this.pd.getName()); } } return false; } COM: <s> checks whether this injectors property needs to be skipped due to </s>
funcom_train/1170778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Card getCardDownload(Card c, String CardName) { // TODO: using AllZone.getCardFactory().getCard() would probably be much faster. for (Card newCard : AllZone.getCardFactory()) { if (CardName.equalsIgnoreCase(newCard.getName())) { return newCard; } } return null; } COM: <s> p get card download </s>
funcom_train/2760893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTable(Connection connection, String tableName) throws Exception { DBMetaData dbMeta = DBMetaData.getMetaData(connection); if(dbMeta.getTable(tableName, false) == null) { executeScript("classpath:flowstore-"+dbMeta.getDBType()+"-"+tableName+".sql"); dbMeta.introspect(connection); } } COM: <s> initializes the supplied table if it does not exists </s>
funcom_train/25127397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getImage(JComponent c) { try { MediaTracker tracker = new MediaTracker(c); tracker.addImage(picture, 0); tracker.waitForID(0); } catch (InterruptedException e) { } picture.getWidth(c); picture.getHeight(c); return picture; } COM: <s> get the associated image and load it </s>
funcom_train/8228577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSuspended(UserAccount acct) { boolean ret = false; try { Statement stat = conn.createStatement(); String query = "SELECT isSuspended FROM accounts WHERE " + "acctID = " + acct.acctId; ResultSet rs = stat.executeQuery(query); try { rs.next(); } catch (java.sql.SQLException e) { return false; } ret = rs.getBoolean("isSuspended"); } catch (java.sql.SQLException e) { e.printStackTrace(); } return ret; } COM: <s> checks the database to find whether or not the user is suspended </s>
funcom_train/44315070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getFloat( String name, float defaultValue ) throws NamedValueParseException { String value = _accessor.getValue( name ); if ( isEmpty( value ) ) { return defaultValue; } try { return Float.parseFloat( value ); } catch ( NumberFormatException e ) { throw new NamedValueParseException( name ); } } COM: <s> returns the named parameter as a primative float </s>
funcom_train/35682071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testContainerInvoker() throws Exception { LegStarAddress address = new LegStarAddress("CICSTS31"); HostInvoker invoker = HostInvokerFactory.createHostInvoker( CONFIG_FILE, address, new HostProgramProperties("container1.properties")); assertTrue(invoker instanceof com.legstar.host.invoke.ContainerInvoker); } COM: <s> check that the factory correctly returns a container invoker </s>
funcom_train/32612583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateLruQueue(K key, V value) { // Check parameters. assert (key != null) && (value != null); // Ensure that the entry is stored in the LRU queue. lruMap.put(key, value); // Remove entries in excess from the LRU queue. if (lruMap.size() > lruSize) { Iterator<Map.Entry<K, V>> iterator = lruMap.entrySet().iterator(); iterator.next(); iterator.remove(); } } COM: <s> update the lru queue by moving the specified entry on top </s>
funcom_train/36253705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void uncompressDiskCheckpoint(String task) { // Compress home and delta try { if ( new File(poolPath+"/"+task+"/home.img.gz").exists() ) Compressor.uncompressFileGz(poolPath+"/"+task+"/home.img.gz", poolPath+"/"+task+"/home.img"); } catch (IOException e) { log.error("Unompressing disks: " + task+". Error: "+e.getMessage()); } } COM: <s> uncompress all the writable disks in order to be uploaded to hadoop </s>
funcom_train/36432307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadConfiguration(String fileName) throws IOException, ConfigurationException { BufferedReader reader = null; try{ reader = new BufferedReader(new InputStreamReader(svCon.getResourceAsStream(fileName))); ConfigXmlUnmarshaller unmarshaller = new ConfigXmlUnmarshaller(); serverConfiguration = unmarshaller.unMarshall(reader); } finally{ if (reader != null){ reader.close(); } } } COM: <s> loads the xml configuration including both global configuration and configuration of </s>
funcom_train/171487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dump(DataOutputStream out) throws IOException { super.dump(out); out.writeInt(match_length); // npairs for(int i=0; i < match_length; i++) { out.writeInt(match[i]); // match-offset pairs out.writeInt(indices[i] = getTargetOffset(targets[i])); } } COM: <s> dump instruction as byte code to stream out </s>
funcom_train/36961430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateLoadpath(List newEntries, IRubyProject project, IProgressMonitor monitor) throws RubyModelException { if (monitor == null) monitor= new NullProgressMonitor(); try { ILoadpathEntry[] entries= convert(newEntries); IRubyModelStatus status= RubyConventions.validateLoadpath(project, entries, null); if (!status.isOK()) throw new RubyModelException(status); project.setRawLoadpath(entries, null, new SubProgressMonitor(monitor, 2)); fireEvent(newEntries); } finally { monitor.done(); } } COM: <s> updates the build path if changes have been applied to a </s>
funcom_train/18895348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean optionsValid() { boolean optionsValid = false; try { // validate params by parsing the arguments this.parse(); optionsValid = true; } catch (UnknownOptionException uoe) { optionsValid = false; } catch (IllegalOptionValueException iove) { optionsValid = false; } // try-catch // return whether the options are valid return optionsValid; } // optionsValid() COM: <s> validates the command line options </s>
funcom_train/2580012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AxisLocation getDomainAxisLocation(int index) { AxisLocation result = null; if (index < this.domainAxisLocations.size()) { result = (AxisLocation) this.domainAxisLocations.get(index); } if (result == null) { result = AxisLocation.getOpposite(getDomainAxisLocation(0)); } return result; } COM: <s> returns the location for a domain axis </s>
funcom_train/40729754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // TODO: We need some way of stopping this thread // gracefully, although at the moment we have no lifecycle // event to trigger stopping the thread. try { isRunning = true; while (true) { try { processRequest(); } catch (InterruptedException e) { return; } } } finally { isRunning = false; } } COM: <s> the producer thread processes requests for item content </s>
funcom_train/17142652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int colorDistance(int color1, int color2) { int [] rgb1 = ColorUtil.splitColor(color1); int [] rgb2 = ColorUtil.splitColor(color2); int dist = 0; for (int i = 0; i < rgb1.length; i++ ) { dist += Math.abs(rgb1[i] - rgb2[i]); } dist = dist / 3; // to make it fit with grayscale return dist; } COM: <s> split color coded as int into 3 int </s>
funcom_train/28403480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDefinitionsFactoryKey(TilesRequestContext request) { String retValue = null; Map<String, Object> requestScope = request.getRequestScope(); if (requestScope != null) { // Probably the request scope does not exist retValue = (String) requestScope.get( DEFINITIONS_FACTORY_KEY_ATTRIBUTE_NAME); } return retValue; } COM: <s> returns the definitions factory key </s>
funcom_train/50078285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFetchDestroyedComponent() { LifecycleInterceptor component = (LifecycleInterceptor) this.keeper. fetchComponent(EMPTY_TEST_COMPONENT); component.destroyComponent(); component = (LifecycleInterceptor) this.keeper. fetchComponent(EMPTY_TEST_COMPONENT); if (component.getLifecycleState() == LifecycleStateEnum.DESTROYED) { TestCase.fail("Fetched component was in " + "LifecycleStateEnum.DESTROYED state, expected otherwise"); } } COM: <s> this method tests to make sure that if a component is destroyed by </s>
funcom_train/3028832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restore() { FileSettings bundle = FileSettings.getRefactoryPrettySettings(); File file = bundle.getFile(); File backup = new File(file.getParentFile(), file.getName() + ".backup"); (new FileCopy(backup, file, false)).run(); } COM: <s> restore the backups </s>
funcom_train/26228671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reportTrouble(PositionedError trouble) { if (trouble instanceof CWarning) { if (options.warning != 0 && filterWarning((CWarning)trouble)) { inform(trouble); } } else { if (trouble.getTokenReference() != TokenReference.NO_REF) { inform(trouble); errorFound = true; } else { inform(trouble); } } } COM: <s> reports a trouble error or warning </s>
funcom_train/537080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPlayMP3() throws Exception { URI song = ResourceLoader.getLocalResource(this.getClass(), "cinematic2.mp3").toURI(); playUntilEvent(song, SoundSystemEvent.EventType.End_of_song); assertEquals(SoundSystem.State.Stopped, this.soundSystem.getState()); } COM: <s> tests playing the test song and waits until it is completed </s>
funcom_train/17382520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean propFileIsWritable() { String path = properties.getProperty("System.configPath").trim() + propsFileName; File file = new File(path); if (file.isFile()) { //See if we can write to the file if (file.canWrite()) { return true; } else { return false; } } else { return false; } } COM: <s> returns true if the properties are writable </s>
funcom_train/8569569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean store() throws IOException { System.out.println("here"); if (neatIdMapFileName != null) { FileWriter out = null; try { out = new FileWriter(neatIdMapFileName); out.write(toXml()); out.flush(); return true; } finally { if (out != null) { out.close(); } } } return false; } COM: <s> persist id factories and maps </s>
funcom_train/3083746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDocument(Document newValue) { if (newValue == null) { throw new IllegalArgumentException("The Document must not be null!"); } Document oldValue = getDocument(); if (oldValue != null) { oldValue.removeDocumentListener(internalListener); } newValue.addDocumentListener(internalListener); if (getTextField() != null) { getTextField().setDocument(newValue); } if (getCalculator() != null) { getCalculator().setDocument(newValue); } } COM: <s> sets the the underlying document of the calculator field </s>
funcom_train/36934283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int elementCompareTo(T element) { if(element == null) { // Comparable API says throw NPE on null throw new NullPointerException("Element is null"); } if(elementBefore(element)) { return -1; } else if(elementAfter(element)) { return 1; } else { return 0; } } COM: <s> p tests where the specified element occurs relative to this range </s>
funcom_train/4547296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fill(int x, int y, Color color) { this.startX = x; this.startY = y; this.fillColor = color.getRGB(); this.maskColor = color.getRGB(); // the fill color for the mask this.startColor = this.maskImage[startY * width + startX]; if (fillColor != startColor) { floodFill(); } } COM: <s> flood fills parts of an image </s>
funcom_train/39314296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetFont() { System.out.println("testSetFont"); Font f = new Font("helvetica", 0, 12); m.setFont(f); assertTrue( "updated font", f == m.current_font); System.out.println("done testSetFont"); } COM: <s> test of set font method of class main canvas </s>
funcom_train/39564024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List findAll() throws Exception { File[] files = collectorDirectory.listFiles(XML_FILE_FILTER); ArrayList collectors = new ArrayList(); for (int i = 0; i < files.length; i++) { String name = files[i].getName(); name = name.substring(0, name.length() - COLLECTOR_SUFFIX.length()); collectors.add(load(name)); } return collectors; } COM: <s> returns all available collectors </s>
funcom_train/8711119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putSymbol(Symbol symbol) { if (symbol.getName() == null) throw new IllegalArgumentException("null symbol name"); ensureSymbolTable(); symbolTable.put(symbol.getName(), symbol); symbol.setContainingTable(this); top.addSymbol(symbol); } COM: <s> enters a symbol into this scope </s>
funcom_train/18813469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initLocalVars(){ this.setType(TYPE); int trackCount = getTotalTrackCount(); tracks = new ArrayList(trackCount); for(int i=FIST_TRACK_NUMBER;i<=trackCount;i++){ CBMDiskTrack track = null; if(i==18){ this.directoryTrack = new CBMDirectoryTrack(this, i); track = this.directoryTrack; }else{ track = new CBMDiskTrack(this, i); } this.addTrack(track); } this.fat = new D64Fat(this); } COM: <s> initialize all the tracks </s>
funcom_train/48653514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getIniciar() { if (iniciar == null) { iniciar = new JButton(); iniciar.setBounds(new Rectangle(392, 611, 100, 29)); iniciar.setText("Iniciar"); iniciar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { iniciar(); } }); } return iniciar; } COM: <s> this method initializes iniciar </s>
funcom_train/3883363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateSemanticdensityType_Min(BigInteger semanticdensityType, DiagnosticChain diagnostics, Map context) { boolean result = semanticdensityType.compareTo(SEMANTICDENSITY_TYPE__MIN__VALUE) >= 0; if (!result && diagnostics != null) reportMinViolation(ImsMdRootv1p1Package.Literals.SEMANTICDENSITY_TYPE, semanticdensityType, SEMANTICDENSITY_TYPE__MIN__VALUE, true, diagnostics, context); return result; } COM: <s> validates the min constraint of em semanticdensity type em </s>
funcom_train/4853739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL makeQuery (String keywords) { try { return new URL("http://altavista.digital.com/cgi-bin/query?pg=q&what=web&kl=XX&q=" + URLEncoder.encode(keywords)); } catch (MalformedURLException e) { throw new RuntimeException ("internal error"); } } COM: <s> make a query url for alta vista </s>
funcom_train/37607409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findNum(int parno, String numstr) { if (Character.isDigit(numstr.charAt(0)) || numstr.startsWith("-")) { // negative number return Integer.parseInt(numstr); } else { if (parent[parno] == null) return 0; else return ((Integer)JavaDriver.subPort(parent[parno], numstr, null, null)).intValue(); } }; // end findNum() COM: <s> determines whether a string is a munber of a method and returns </s>
funcom_train/3099264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(Puttable jobAssignerChannel) { getLogger().info("Initializing Scheduler"); consumer = new Consumer(schedulerChannel, jobAssignerChannel, this); consumerExecutor = new ThreadedExecutor(); try { consumerExecutor.execute(consumer); } catch (InterruptedException e) { e.printStackTrace(); System.exit(1); } } COM: <s> initializes this scheduler and begins consuming jobs to schedule </s>
funcom_train/46158405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toggleHUDAction() { if (videoPlayerWindow.getDisplayMode().equals(DisplayMode.HUD)) { videoPlayerWindow.setDisplayMode(DisplayMode.WORLD); } else { videoPlayerWindow.setDisplayMode(DisplayMode.HUD); } videoPlayerWindow.showControls(true); } COM: <s> toggle the display of the video player from in world to on hud </s>
funcom_train/28473318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getInputFileTextField() { if (inputFileTextField == null) { inputFileTextField = new JTextField(); inputFileTextField.setPreferredSize(new Dimension(410, 20)); inputFileTextField.setEditable(false); inputFileTextField.setBackground(SystemColor.text); inputFileTextField.setMaximumSize(new Dimension(250, 20)); } return inputFileTextField; } COM: <s> this method initializes input file text field </s>
funcom_train/12895995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLockInDb(String qrtzLock) { GenericValue g = null; try { g = getDelegator().findByPrimaryKey(QRTZ_LOCKS_ENTITY, UtilMisc.toMap("lockName", qrtzLock)); if (g != null) { return true; } } catch (Exception e) { _log.error("Error fetching quartz lock value " + qrtzLock, e); } return false; } COM: <s> checks if a lock type is in the database </s>
funcom_train/27825746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Set getVirtualConcepts(Set input,boolean isInOIModel) throws KAONException { Set output=new HashSet(); Iterator iterator=input.iterator(); while (iterator.hasNext()) { Concept concept=(Concept)iterator.next(); output.add(m_oimodel.getConcept(concept,isInOIModel)); } return output; } COM: <s> converts a set of original concepts into a set of virtual concepts </s>
funcom_train/15407215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InheritInfo readType(String discValue) { if (discValue == null) { return null; } InheritInfo typeInfo = root.getType(discValue); if (typeInfo == null) { String m = "Inheritance type for discriminator value [" + discValue + "] was not found?"; throw new PersistenceException(m); } return typeInfo; } COM: <s> return the associated inherit info for this discriminator value </s>
funcom_train/2302269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawState(Graphics g, State state) { if (selected.contains(state)) { getStateDrawer().drawState(g, getAutomaton(), state, state.getPoint(), SELECTED_COLOR); if (doesDrawStateLabels()) getStateDrawer().drawStateLabel(g, state, state.getPoint(), getStateDrawer().STATE_COLOR); } else super.drawState(g,state); } COM: <s> if a state is selected draw it somewhat darker than the </s>
funcom_train/25708536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateFrostFileListFileObjectAfterRequestSent(final String sha, final long requestLastSent) { final FrostFileListFileObject oldSfo = getFileBySha(sha); if( oldSfo == null ) { return false; } oldSfo.setRequestLastSent(requestLastSent); oldSfo.setRequestsSentCount(oldSfo.getRequestsSentCount() + 1); oldSfo.modify(); return true; } COM: <s> update the item with sha set requestlastsent and requestssentcount </s>
funcom_train/24374208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XTestConfigTransaction getTransaction(String txnName) { XTestConfigTransaction txn = null; for (Iterator it = transactions.iterator(); (txn == null) && it.hasNext();) { XTestConfigTransaction current = (XTestConfigTransaction) it.next(); // Did we find a transaction that matches? if (current.getName().equals(txnName)) { txn = current; break; } } return txn; } COM: <s> this method returns a xtest config transaction object given a transaction name </s>
funcom_train/40337068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createMigrationGroupPage() { MigrationGroupEditor migrationGroupEditor = new MigrationGroupEditor( migrationTask, getContainer(), this); int index = addPage(migrationGroupEditor.getControl()); setPageText(index, "Group"); taskListeners.add(migrationGroupEditor); } COM: <s> create the migration group editor </s>
funcom_train/13509242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lockAll() { DockableState[] dockableStates = this.getDockables(); for(int i=0;i<dockableStates.length;i++){ DockablePanel dockablePanel = (DockablePanel) dockableStates[i].getDockable(); if (dockablePanel.getCustomizer() instanceof EditSaveCustomizer){ dockablePanel.getModelisable().lock(); } } } COM: <s> lock all the visible edit save dockable panels </s>
funcom_train/44589221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValidTag(String tag) { // strip the slash if (tag.startsWith("/")) //$NON-NLS-1$ tag= tag.substring(1, tag.length()); // strip ws tag= tag.trim(); // extract first token int i= 0; while (i < tag.length() && !ScannerHelper.isWhitespace(tag.charAt(i))) i++; tag= tag.substring(0, i); // see if it's a tag return isTagName(tag.toLowerCase()); } COM: <s> checks whether code tag code is a valid tag content text inside </s>
funcom_train/25218486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void run(File file, StringBuilder buffer) throws IOException { if (omit.contains(file.getName())) { return; } File pom = new File(file, "pom.xml"); if (pom.exists()) { processPom(pom, buffer); for (File f : file.listFiles(DIR_FILTER)) { run(f, buffer); } } } COM: <s> traverse a directory tree and collect the poms in a buffer </s>
funcom_train/48909989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJbtEntrar() { if (jbtEntrar == null) { jbtEntrar = new JButton(); jbtEntrar.setBounds(new Rectangle(81, 139, 117, 27)); jbtEntrar.setText("Entrar"); jbtEntrar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { validarDatos(); } }); } return jbtEntrar; } COM: <s> this method initializes jbt entrar </s>
funcom_train/19417346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearAll() { xmiDocument = new XmiDocument(); // create the XMI document that will be generated xmiModel = null; roseExtension = false; mdrawExtension = false; definedObjects = new Hashtable(); definedClasses = new Hashtable(); definedDataTypes = new Hashtable(); nbGeneratedMessages = 0; } COM: <s> xmi tree building methods </s>
funcom_train/51539109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyIfMidletActive() { MIDletProxy midletProxy; boolean allMidletsPaused = true; synchronized (midletProxies) { for (int i = midletProxies.size() - 1; i >= 0; i--) { midletProxy = (MIDletProxy) midletProxies.elementAt(i); if (midletProxy.getMidletState() != MIDletProxy.MIDLET_PAUSED) { allMidletsPaused = false; break; } } } if (!allMidletsPaused) { allPaused = false; notifyResumeAll0(); } } COM: <s> notify the device if one of the midlets is not paused anymore </s>
funcom_train/50140283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFields(IFieldDescriptor[] fields) { if (fields == null) { throw new IllegalArgumentException("Can not set fields to null."); } for (int i = 0; i < fields.length; i++) { if (fields[i] == null) { throw new IllegalArgumentException("Can not set class fields. A fields descriptor is null."); } } this.fields = fields; } COM: <s> set the classs identities </s>
funcom_train/44166837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createKeyBindings() { for (Option option : freeColClient.getActionManager().getOptions()) { FreeColAction action = (FreeColAction) option; getInputMap().put(action.getAccelerator(), action.getId()); getActionMap().put(action.getId(), action); } } COM: <s> create key bindings for all actions </s>
funcom_train/28170754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetMask() { System.out.println("setMask"); int newValue = 0; BezierPath.Node instance = new BezierPath.Node(); instance.setMask(newValue); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set mask method of class org </s>
funcom_train/50062338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String escape(String str) { str = escapeSeparator(str, new HL7ElementLevel(HL7ElementLevel.FIELD)); str = escapeSeparator(str, new HL7ElementLevel(HL7ElementLevel.COMPONENT)); str = escapeSeparator(str, new HL7ElementLevel(HL7ElementLevel.REPETITION)); return escapeSeparator(str, new HL7ElementLevel(HL7ElementLevel.SUBCOMPONENT)); } // escape COM: <s> escapes any encoding characters in the argument string </s>
funcom_train/28722408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createBaseTextCopy() { if (collateMSDialog.getPrimaryTagger() == null) { MessageDialog.openInformation(tabFolder.getShell(), "", "No base project selected!"); return; } SaveAsGUI saveas = new SaveAsGUI(collateMSDialog.getPrimaryTagger().getProject()); saveas.open(); } COM: <s> opens the dialog to create a new base text project copy </s>
funcom_train/50963143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeObject(java.io.ObjectOutputStream out) throws IOException { HashMap<String,Object> bak00 = currentObjects; IdentityHashMap<Object,Struct> bak01 = currentObjects_inverse; try { currentObjects = null; currentObjects_inverse = null; out.defaultWriteObject(); } catch (IOException ex) { currentObjects = bak00; currentObjects_inverse = bak01; throw new IOException(); } currentObjects = bak00; currentObjects_inverse = bak01; } COM: <s> handling write object method is necessary in order to </s>
funcom_train/5866063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSrc(String src) { if (src != null && src.length() == 0) src = null; if (_image != null || !Objects.equals(_src, src)) { _src = src; _image = null; smartUpdateDeferred("src", new EncodedURL()); //Bug 1850895 } } COM: <s> sets the source uri of the image </s>
funcom_train/38543153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TableColorModel getTableColorModelInstance() { return new LineTitlesColorModel(this.backgroundColor.getBackground(), this.foregroundColor.getBackground(), this.backgroundSelectedColor.getBackground(), this.foregroundSelectedColor.getBackground(), ((Integer) this.numberOfTitleColumnsSpinner.getValue()) .intValue()); } COM: <s> this method enables to retrieve the line titles color model currently </s>
funcom_train/3180275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String valueOf(Object context) throws JDOMException { try { currentContext = context; return xPath.valueOf(context); } catch (JaxenException ex1) { throw new JDOMException("XPath error while evaluating \"" + xPath.toString() + "\": " + ex1.getMessage(), ex1); } finally { currentContext = null; } } COM: <s> returns the string value of the first node selected by applying </s>
funcom_train/12318510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeAnchors(NodeList anchorListParam) throws IOException { // Iterate through list of anchors, adding each to anchorList for (int i = 0; i < anchorListParam.size(); i++) { //System.out.println ("Adding anchor " + i + " to Valid Data : " + anchorListParam.elementAt (i).toHtml ()); addAnchorTag((LinkTag)anchorListParam.elementAt(i)); } } COM: <s> store anchors in given list </s>
funcom_train/42876966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ClipsTableModel getClipsListTableModel(Playlist playlist) { // determine playlist if ((clipsListTableModel.getPlaylist() == null) || !clipsListTableModel.getPlaylist().equals(playlist)) { // set playlist clipsListTableModel.setPlaylist(playlist); } return clipsListTableModel; } COM: <s> get the table model with data for a specific playlist </s>
funcom_train/36149794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double PValue() { double ts = TestStatistics(); if (ts == Double.POSITIVE_INFINITY) return 0; FProbabilityDistribution dist = new FProbabilityDistribution( k, n - k - 1); double area = dist.cumulativeProbability(ts); return 1 - area; // area to the right } COM: <s> returns the p value of test statistics </s>
funcom_train/8078781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double innerProduct(DoubleVector v) { if(size() != v.size()) throw new IllegalArgumentException("sizes unmatch"); double p = 0; for (int i = 0; i < size(); i++) { p += V[i] * v.V[i]; } return p; } COM: <s> returns the inner product of two double vectors </s>
funcom_train/47950659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { ArrayList<String> question = null; try { question = control.createScheme(false); //file might be unsaved! displayQuestion(question); } catch (UnsavedFileException ex) { if(makeUnsavedDialog(ex.getMessage())) { //give user error dialog & they want to continue try { question = control.createScheme(true); //exception can't be thrown here displayQuestion(question); } catch (UnsavedFileException f) {} } } } COM: <s> when the new item is created initiate a new scheme creation </s>
funcom_train/6267023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void releaseSem() { try { if (sipStack.getLogWriter().isLoggingEnabled()) { sipStack.getLogWriter().logDebug("releaseSem [[[[" + this); sipStack.getLogWriter().logStackTrace(); } this.toListener = false; this.isSemaphoreAquired = false; this.semaphore.release(); } catch (Exception ex) { } } COM: <s> release the transaction semaphore </s>
funcom_train/2863782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Init(IniFile inifile) { add(inifile, "RequiredField", isRequiredField, hasRequiredChildren); add(inifile, "ForbiddenField", isForbiddenField, hasForbiddenChildren); add(inifile, "SpecialCheck", specialCheck, hasSpecialChildren); } COM: <s> initializes the filter object according to the settings in the </s>
funcom_train/21952887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OutgoingMailServer getDefaultOutgoingMailServer() { if (defaultServer == null) { String defaultId = Pooka.getProperty("OutgoingServer._default", ""); if (defaultId != "") { defaultServer = new DefaultOutgoingMailServer(defaultId); } } return defaultServer; } COM: <s> this returns the network outgoing mail server with the given </s>
funcom_train/3035833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConsoleQueryParameter createUniqueParameter(String paramName) { if(parameters.isEmpty()) { return new ConsoleQueryParameter(paramName, Hibernate.STRING, ""); } else { ConsoleQueryParameter cqp = (ConsoleQueryParameter) parameters.get(parameters.size()-1); ConsoleQueryParameter c = new ConsoleQueryParameter(cqp); c.setName(makeUnique(parameters.iterator(), paramName)); return c; } } COM: <s> create a parameter which does not collide with any other parameter </s>
funcom_train/21425607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int executeNamedQuery(String namedQuery, String namedParams[],Object params[]) { Query q = getSession().getNamedQuery(namedQuery); if (namedParams != null) { for (int i = 0; i < namedParams.length; i++) { q.setParameter(namedParams[i], params[i]); } } int retorno = q.executeUpdate(); HibernateUtil.closeSession(); return retorno; } COM: <s> this method will execute a named hql query and return the number of </s>
funcom_train/13963990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void takeValuesFromRequest(WORequest request, WOContext context) { ajaxComponentActionUrl = AjaxUtils.ajaxComponentActionUrl(context()); if (isOpen()) { try { pushDialog(); if (_actionResults != null) { pushActionResultsIntoContext(context); try { _actionResults.takeValuesFromRequest(request, context); } finally { popActionResultsFromContext(context); } } else { super.takeValuesFromRequest(request, context); } } finally { popDialog(); } } } COM: <s> only handle this phase if the modal box is open </s>
funcom_train/3560586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DbResult getFathers(Long dataID) throws DbException { XTable table; NVPair[] formData; InputStream is; table = new XTable(); formData = new NVPair[1]; formData[0] = new NVPair("dataID", dataID.toString()); is = processQueryPost(GET_FATHERS_PAGE, formData); table.setSource(is); return table; } COM: <s> returns the fathers of a specific data id </s>
funcom_train/43246143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetConfAddrToDate() { System.out.println("getConfAddrToDate"); AddlDemographicsObject instance = new AddlDemographicsObject(); Calendar expResult = null; Calendar result = instance.getConfAddrToDate(); 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 conf addr to date method of class org </s>
funcom_train/25198602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File createTocindex(String dir) throws IOException { tocIndexProps = new Properties(); File tocindex = File.createTempFile("toc", ".index"); FileOutputStream tocIndexOut = new FileOutputStream(tocindex); basedir = new File(dir); collect(basedir); tocIndexProps.store(tocIndexOut, getLocalizer().format("CreateClasspathArchive.created")); tocIndexOut.close(); return tocindex; } COM: <s> create the toc index file </s>
funcom_train/49968481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printPropAt(int k) { BitSet ops = this.facts_layers.get(k); for (int i = ops.nextSetBit(0); i >= 0; i = ops.nextSetBit(i + 1)) { System.out.println(this.facts_table.get(i)); } System.out.println(""); } COM: <s> prints a propositions layer at a specified layer </s>