__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/19258857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float colorCompRed(float angle) { // Convert angle to degrees. angle *= 180/(float)Math.PI; float value = 0; float angle2 = angle*angle; if (angle <= 50) value = 0.031126F*angle2 - 0.71082F*angle + 36.484F; else value = -7.4587E-4F*angle*angle2 + 0.14189F*angle2 - 5.791F*angle + 107.02F; value /= 255; if (value > 1) value = 1; if (value < 0) value = 0; return value; } COM: <s> returns the red component of a simple sky color model that transitions </s>
funcom_train/7971419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element toXML(Document doc){ Element cardElt = doc.createElement("Card"); cardElt.setAttribute("uid", uniqueID); XMLTools.addProperty(doc, cardElt, "CardStrategy", "String", "RadioButton"); XMLTools.addProperty(doc, cardElt, "TitleLabelUID", "String", titleLabelID); return cardElt; } COM: <s> formats this acard as a vote box xml element </s>
funcom_train/10980669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getParameterNames() { Enumeration baseParams = getRequest().getParameterNames(); Vector list = new Vector(); while (baseParams.hasMoreElements()) { list.add(baseParams.nextElement()); } Collection multipartParams = parameters.keySet(); Iterator iterator = multipartParams.iterator(); while (iterator.hasNext()) { list.add(iterator.next()); } return Collections.enumeration(list); } COM: <s> p returns the names of the parameters for this request </s>
funcom_train/4758268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInteger(String key, int Default) { String v = getString(key); if (v == null) { return Default; } try { int i = Integer.decode(v); return i; } catch (NumberFormatException e) { LOG.log(Level.WARNING, null, e); return Default; } } COM: <s> gets an integer from the properties </s>
funcom_train/21982754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JBarcode createCode93(){ JBarcode jbc = new JBarcode(Code93Encoder.getInstance(), WidthCodedPainter.getInstance(), BaseLineTextPainter.getInstance()); jbc.setBarHeight(17); try { jbc.setXDimension(0.264583333); } catch (InvalidAtributeException e) {} jbc.setShowText(true); jbc.setCheckDigit(true); jbc.setShowCheckDigit(false); return jbc; } COM: <s> creates a new jbarcode instance to code93 barcode type </s>
funcom_train/28362462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void solve( final Problem problem ) throws InvalidConfigurationException { if ( problem.getVariables().size() < 1 ) throw new InvalidConfigurationException( "At least one variable must be specified." ); if ( problem.getObjectives().size() < 1 ) throw new InvalidConfigurationException( "At least one objective must be specified." ); setProblem( problem ); reset(); _schedule.execute(); } COM: <s> solve the problem </s>
funcom_train/4135851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDocumentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BibTexEntry_document_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BibTexEntry_document_feature", "_UI_BibTexEntry_type"), BibtexPackage.Literals.BIB_TEX_ENTRY__DOCUMENT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the document feature </s>
funcom_train/50880353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setOrrigionalAttributes(Object[] inAttributes){ if (inAttributes == null) myOrrigionalAttributes = null; myOrrigionalAttributes = new Object[inAttributes.length]; for (int i=0; i<inAttributes.length; i++){ myOrrigionalAttributes[i] = inAttributes[i]; } } COM: <s> set the attributes </s>
funcom_train/10602568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPoliciesDirectory(File directory) throws AccessControlException { getLogger().debug("Setting policies directory [" + directory.getAbsolutePath() + "]"); if (!directory.isDirectory()) { throw new AccessControlException("Policies directory invalid: [" + directory.getAbsolutePath() + "]"); } this.policiesDirectory = directory; } COM: <s> sets the policies directory </s>
funcom_train/18953114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDefaultForwardDelete() { if (logger.isDebugEnabled()) { logger.debug("getDefaultForwardDelete() - start"); } if (logger.isDebugEnabled()) { logger.debug("getDefaultForwardDelete() - end - return value = " + defaultForwardDelete); } return defaultForwardDelete; } COM: <s> name of the strong struts strong forward to go to if the delete </s>
funcom_train/21116883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testZamanList() throws Exception { System.out.println("zamanList"); // ZamanDao instance = ZamanDao.getInstance(); // // List expResult = null; // List result = instance.zamanList(GunEnum.Pazartesi, true); // assertNotNull(result); // // for (Object elem : result) { // Zaman p = (Zaman) elem; // System.out.println(p); // } } COM: <s> test of zaman list method of class persistence </s>
funcom_train/19779806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void password(String password) throws IOException, FTPException { String reply = control.sendCommand("PASS " + password); // we allow for a site with no passwords (202) String[] validCodes = { "230", "202" }; lastValidReply = control.validateReply(reply, validCodes); } COM: <s> supplies the password for a previously supplied username to log into the </s>
funcom_train/2578474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() throws CloneNotSupportedException { AbstractBlock clone = (AbstractBlock) super.clone(); clone.bounds = (Rectangle2D) ShapeUtilities.clone(this.bounds); if (this.frame instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.frame; clone.frame = (BlockFrame) pc.clone(); } return clone; } COM: <s> returns a clone of this block </s>
funcom_train/46521875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeDirectory(Command command){ File temp = new File(file.getAbsolutePath() + slashType + command.arg1); //Log.info(file.getAbsolutePath() + "/" + command.arg1 + "/"); //Log.info("creating a directory " + temp.getPath() + " in: " + file.getAbsolutePath()); temp.mkdirs(); //if(succed == true) Log.info("succed"); else // Log.info("failed"); localMethodsChangedFileList = true; } COM: <s> simply creates a new directory </s>
funcom_train/46726913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void save() throws Exception { validateControls(); if (getControllerPatient().hasVisit() && getControllerPatient().isNotNew()) { getChargeModel().setVisitId(getControllerPatient().getVisit().getId()); BillingService.store(getChargeModel()); original.copyAllFrom(getChargeModel()); okCloseForm(); globalRefreshTable(ContextReference.PATIENTCHARGESCHARGEMODELLISTTABLE); } else { throw new Exception("no patient or visit found"); } } COM: <s> save the charge model variable </s>
funcom_train/40735520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSecurityPrivilegeId(Integer newVal) { if ((newVal != null && securityPrivilegeId != null && (newVal.compareTo(securityPrivilegeId) == 0)) || (newVal == null && securityPrivilegeId == null && securityPrivilegeIdIsInitialized)) { return; } securityPrivilegeId = newVal; securityPrivilegeIdIsModified = true; securityPrivilegeIdIsInitialized = true; } COM: <s> setter method for security privilege id </s>
funcom_train/23411138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStatementPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AtomicAction_statement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AtomicAction_statement_feature", "_UI_AtomicAction_type"), OMPackage.Literals.ATOMIC_ACTION__STATEMENT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the statement feature </s>
funcom_train/29398036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getDWORD() { long value = (buffer[position++] & 0xFFL); value |= (buffer[position++] & 0xFFL) << 8; value |= (buffer[position++] & 0xFFL) << 16; value |= (buffer[position++] & 0xFFL) << 24; value &= 0xFFFFFFFFL; return value; } COM: <s> returns a 4 byte unsigned little endian integer starting at the current position </s>
funcom_train/24587683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJCostsTextField() { if (jCostsTextField == null) { jCostsTextField = new DoubleTextField(); jCostsTextField.setName("product_costs_textfield"); jCostsTextField.setBounds(new Rectangle(460, 70, COMPONENT_WIDTH_75, COMPONENT_HEIGHT)); jCostsTextField.addFocusListener(new SelectAllFocusListener( jCostsTextField)); } return jCostsTextField; } COM: <s> this method initializes j costs text field </s>
funcom_train/18068401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddNewPlayer() { System.out.println("=======addPlayer======="); GameController instance = new GameController(); boolean expResult = true; boolean result = instance.addNewPlayer(npd); result = instance.addNewPlayer(npd1); assertEquals(expResult, result); instance.printPlayerList(); } COM: <s> test of add new player method of class net </s>
funcom_train/14520143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doSyncronizedLog(ILogDevice dev, Admin admin, int caid, int module, Date time, String username, Certificate certificate, int event, String comment, Exception ex) { final LogConfiguration config = loadLogConfiguration(caid); if (!dev.getAllowConfigurableEvents() || config.logEvent(event)) { dev.log(admin, caid, module, time, username, certificate, event, comment, ex); } } COM: <s> internal implementation for logging </s>
funcom_train/9162653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number getValueAt( final double location ) { final BigDecimal minDec = new BigDecimal( minimum.toString() ); final BigDecimal maxDec = new BigDecimal( maximum.toString() ); BigDecimal locDec = new BigDecimal( location ); locDec = locDec.multiply( maxDec.subtract( minDec ) ); locDec = locDec.add( minDec ); return locDec; } COM: <s> returns a new code number code object that falls at a specific point </s>
funcom_train/13650740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String ensureUniqueAliasName(KeyStore keystore, String alias) throws Exception{ int counter = 1; String newAlias = alias; //add a number to the alias if it already exists with this name while (keystore.containsAlias(newAlias)) { newAlias = alias + counter; counter++; } alias = newAlias; return( alias ); } COM: <s> checks that an alias for an import is unique in this keystore </s>
funcom_train/20645818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component add(Component c, int index) { if ((index < 0) || (index > this.tabLabels.size())) { return null; } this.insertTab(c.getName(), null, c, "", index); return c; } COM: <s> adds a component at the specified tab index with a tab title </s>
funcom_train/32040882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRoleRefPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ObserverType_roleRef_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ObserverType_roleRef_feature", "_UI_ObserverType_type"), ImsldPackage.eINSTANCE.getObserverType_RoleRef(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the role ref feature </s>
funcom_train/7544878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putConst(String name, Scriptable start, Object value) { if (putImpl(name, 0, start, value, READONLY)) return; if (start == this) throw Kit.codeBug(); if (start instanceof ConstProperties) ((ConstProperties) start).putConst(name, start, value); else start.put(name, start, value); } COM: <s> sets the value of the named const property creating it if need be </s>
funcom_train/12199962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialiseIOStreams(Socket socket) throws IOException { if (connType == CONN_CLIENT) { inputStream = new BufferedInputStream(socket.getInputStream(), ioBufferSize); outputStream = new BufferedOutputStream(socket.getOutputStream(), ioBufferSize); } else if (connType == CONN_SERVER) { debug.write("Attempt to initialise i/o streams for server type connection."); } else { debug.write("Unknown connection type = " + connType); } } COM: <s> initialises input and output streams to the streams from socket </s>
funcom_train/43245867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetBNZip() { System.out.println("setBNZip"); String bNZip = ""; EmergencyContactDG5Object instance = new EmergencyContactDG5Object(); instance.setBNZip(bNZip); // 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 bnzip method of class org </s>
funcom_train/24467877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createIndexSQL() { logger.trace("Entered createIndexSQL()"); StringBuffer sql = new StringBuffer("CREATE INDEX "); sql.append(DatabaseConstants.INDEXNAME + " ON "); sql.append(DatabaseConstants.TABLENAME); sql.append("(" + DatabaseConstants.COLUMN_ID + ", "); sql.append(DatabaseConstants.COLUMN_STATE + ")"); logger.trace("Exited createIndexSQL()"); return sql.toString(); } COM: <s> creates a string representation of a query to create an index </s>
funcom_train/49815552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void registerNodeTypes() throws Exception { try { InputStream xml = nodeDefinition.getInputStream(); Workspace workspace = getSession().getWorkspace(); NodeTypeManagerImpl ntMgr = (NodeTypeManagerImpl)workspace.getNodeTypeManager(); ntMgr.registerNodeTypes(xml, JackrabbitNodeTypeManager.TEXT_XML,true); } catch (Exception e) { throw new RepositoryException("Impossible to register node types", e); } } COM: <s> improved registering for node type that work even if the nodetypes are already </s>
funcom_train/4529807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getNode(String loc) { netlock.readLock().lock(); try { loc = NodeBase.normalize(loc); if (!NodeBase.ROOT.equals(loc)) loc = loc.substring(1); return clusterMap.getLoc(loc); } finally { netlock.readLock().unlock(); } } COM: <s> given a string representation of a node return its reference </s>
funcom_train/39397389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() { String badWord = pageConfig.get(SimpleFilter.BAD_WORDS_KEY); if (badWord != null) { badWord = badWord.trim(); if ("".equals(badWord)) return; String[] badWords = badWord.split(","); // badWord might be a comma separated list for (String word : badWords) { filter.addBadWord(word.trim()); } filter.saveBadWords(); } } COM: <s> saves the configuration </s>
funcom_train/28762415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCssnamesize(String newVal) { if ((newVal != null && this.cssnamesize != null && (newVal.compareTo(this.cssnamesize) == 0)) || (newVal == null && this.cssnamesize == null && cssnamesize_is_initialized)) { return; } this.cssnamesize = newVal; cssnamesize_is_modified = true; cssnamesize_is_initialized = true; } COM: <s> setter method for cssnamesize </s>
funcom_train/17001993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Path createCopy() { Path path = new Path(); Gateway[] hopsArray = getHopsTraversed(); for (int i =0; i < hopsArray.length; i++) { path.addHop(hopsArray[i]); } path.addCost(getCost()); return path; } COM: <s> serves the same function that a copy constructor in c does </s>
funcom_train/9196605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processJoinSessionResponse(FTPacket response) { if (FTClient.clientId == response.clientId) { FTClient.sessionId = response.sessionId; FTClient.state = FTConstants.SESSION_STATE; FTClient.setCurrentPrompt(" [" + FTClient.currentSessionName + "]"); } System.out.println("\nUser " + response.userId + " joined " + FTClient.currentSessionName + "\n"); } COM: <s> handles join session response from server outputs who joined the session </s>
funcom_train/51517488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer("NAME=" + _name); buffer.append(",URL=" + _URL); buffer.append(",USERNAME=" + _user); buffer.append(",PASSWORD=" + _password); buffer.append(",MAXCONNECTIONS=" + _maxConnections); return buffer.toString(); } COM: <s> code to string code a string representation of the pool contains </s>
funcom_train/20469111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void AbreAmbito(){ Hashtable<String, ArrayList<Object>> tempTable; // Añade la entrada al organizador TablaOrganizador.put(new Integer(ListaAmbitos.size()), new Integer(this.PunteroAmbitoActual)); // Inserta la tabla en la lista dinámica tempTable = new Hashtable<String, ArrayList<Object>>(); ListaAmbitos.add(tempTable); // Actualiza el puntero de ámbito actual this.PunteroAmbitoActual = ListaAmbitos.size() - 1; } COM: <s> adds a new scope range table and updates all related resources </s>
funcom_train/22850269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isRadiosityCalcNeeded(Scene scene) { return ((scene.getStamp() != OptionReader.oldStamp) || (scene.getUniqueName() != OptionReader.oldUniqueName) || (this.subdivthreshold != OptionReader.oldSubdivthreshold) || (this.maxsubdivdepth != OptionReader.oldMaxsubdivdepth) || (this.hemiWorldWide != OptionReader.oldHemiWorldWide) || isHemicubeCalcNeeded()); } COM: <s> returns true if all radiosity values must be calculated </s>
funcom_train/13631016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeIdent() { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (i == j) { set(i, j, 1.0f); } else { set(i, j, 0.0f); } } } } COM: <s> sets this matrix to the identity matrix </s>
funcom_train/21794317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmptyHistory() { BackendEventListener daemon = new BackendEventListener(); daemon.onBackendEvent(new ChatMessageReceivedEvent(new TestBuddy(), "TestMessaggio", "ID_TEST")); assertEquals(1, daemon.getNumberOfOngoingChats()); daemon.emptyHistory(); assertEquals(0, daemon.getNumberOfOngoingChats()); // TODO history is emptied when the eC windows gets the focus // this behavior should be more properly tested using mock test } COM: <s> test method for </s>
funcom_train/41379850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) { ContentAssistant assistant= new ContentAssistant(); assistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer)); IContentAssistProcessor processor= new EPFCompletionProcessor(); assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE); IContentAssistProcessor processorDoc = new EPFCompletionProcessorDoc(); assistant.setContentAssistProcessor(processorDoc, IEPFPartitions.EPF_COMMENT); assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE); assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer)); return assistant; } COM: <s> returns the content assistant for proposing templates </s>
funcom_train/49077255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int deleteById(String id, MysqlDBTrans dbTrans) throws Exception { QuerySet qs = new QuerySet(); qs.delete(tableName); qs.where("id", id, QuerySet.LogicOperands.EQUAL); qs.limit(1); return dbTrans.delete(qs); } COM: <s> deletes a bean from the db using an established transaction </s>
funcom_train/47685948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T cast(Object classss, @Optional Object... expr) { if (expr.length == 0) { _beginParam()._add(classss)._endParam(); } else { call(get(classss, classs), "cast", expr); } return _this(); } COM: <s> yields a cast </s>
funcom_train/24362928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void updateConstruction() { // update all independet GeoElements int size = ceList.size(); for (int i = 0; i < size; ++i) { ConstructionElement ce = (ConstructionElement) ceList.get(i); if (ce.isIndependent()) { ce.update(); } } // init and update all algorithms size = algoList.size(); for (int i = 0; i < size; ++i) { AlgoElement algo = (AlgoElement) algoList.get(i); algo.initForNearToRelationship(); algo.update(); } } COM: <s> updates all objects in this construction </s>
funcom_train/50865164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateCustomPanel(Mission mission) { boolean hasMissionPanel = false; if (mission != null) { String missionClassName = mission.getClass().getName(); if (customInfoPanels.containsKey(missionClassName)) { hasMissionPanel = true; MissionCustomInfoPanel panel = customInfoPanels.get(missionClassName); customPanelLayout.show(missionCustomPane, missionClassName); panel.updateMission(mission); } } if (!hasMissionPanel) customPanelLayout.show(missionCustomPane, EMPTY); } COM: <s> update the custom mission panel with a mission </s>
funcom_train/2288834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsScheduledJobInfo getJob(String id) { Iterator it = m_jobs.iterator(); while (it.hasNext()) { CmsScheduledJobInfo job = (CmsScheduledJobInfo)it.next(); if (job.getId().equals(id)) { return job; } } // not found return null; } COM: <s> returns the currently scheduled job description identified by the given id </s>
funcom_train/2461684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(TuioTime ttime, float xp, float yp , float xs, float ys, float ma) { super.update(ttime,xp,yp); x_speed = xs; y_speed = ys; motion_speed = (float)Math.sqrt(x_speed*x_speed+y_speed*y_speed); motion_accel = ma; path.addElement(new TuioPoint(currentTime,xpos,ypos)); if (motion_accel>0) state = TUIO_ACCELERATING; else if (motion_accel<0) state = TUIO_DECELERATING; else state = TUIO_STOPPED; } COM: <s> takes a tuio time argument and assigns it along with the provided </s>
funcom_train/4375197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toURI() { StringBuffer buffer = new StringBuffer(50); buffer.append(this.protocol.getScheme()); buffer.append("://"); buffer.append(this.hostname); if (this.port != this.protocol.getDefaultPort()) { buffer.append(':'); buffer.append(this.port); } return buffer.toString(); } COM: <s> return the host uri </s>
funcom_train/5550807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double populationVariance(double[] v) { double mean = new Mean().evaluate(v); double sum = 0; for (int i = 0; i < v.length; i++) { sum += (v[i] - mean) * (v[i] - mean); } return sum / (double) v.length; } COM: <s> definitional formula for population variance </s>
funcom_train/45053091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeActiveColor(int color) { if(color == Palette.NON_COLOR_INDEX) { nonColorActive = false; } else { if((color < 0) || (color >= activeColors.length)) { throw new IllegalArgumentException("Illegal color " + color); } activeColors[color] = false; } } COM: <s> remove a color from list of active colors </s>
funcom_train/50819172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeWindow(Window w) { if (w == null) { return false; } synchronized (this.sync) { WindowFocusManager wfm = this.references.remove(w); if (wfm == null) { return false; } this.focusOrder.remove(wfm); if (this.globalOwner == wfm) { this.globalOwner = null; setNextFocusedWindow(); } } return true; } COM: <s> removes the given window from the internal data structures and possibly </s>
funcom_train/45018433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNXcrystalPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXinstrument_nXcrystal_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXinstrument_nXcrystal_feature", "_UI_NXinstrument_type"), NexusPackageImpl.Literals.NXINSTRUMENT__NXCRYSTAL, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the nxcrystal feature </s>
funcom_train/36776005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAddrFlag(){ String hex = Integer.toHexString(reg); // In case the hex string began with 0's, in which case they were cut off while (hex.length() < 8) { String temp = new String(hex); hex = new String("0" + temp); } return Integer.parseInt(hex.substring(3,4), 16)%4; } COM: <s> gets the address flag field bits of the register </s>
funcom_train/19874166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int currentSegment(double[] coords) { int retval; if (Double.isNaN(points[i])) { coords[0] = points[i + 1]; coords[1] = points[i + 2]; retval = SEG_MOVETO; } else { coords[0] = points[i]; coords[1] = points[i + 1]; retval = SEG_LINETO; } if (transform != null) transform.transform(coords, 0, coords, 0, 1); return retval; } COM: <s> get the coordinates of the current moveto or lineto as doubles </s>
funcom_train/14433829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEastSquareOcean(int column, int row) { return this.isTerrainTypeInDirectionOfSquare(column, row, BasisMap.OCEAN, CardinalPoint.EAST) || this.isTerrainTypeInDirectionOfSquare(column, row, BasisMap.VOID, CardinalPoint.EAST); } COM: <s> p check is the square in the east direction is of </s>
funcom_train/45473500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQualifiedName() { if (_qName == null) { if (_localName != null) { if (_package != null) { _qName = _package + "." + _localName; } else { _qName = _localName; } } else { _qName = _package; } } return _qName; } COM: <s> returns the qualified name of this jtype name </s>
funcom_train/11024214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecuteWithNestedProperty() { TestBean testBean = new TestBean(); new BeanPropertyValueChangeClosure("nested.stringProperty", "bar").execute(testBean); assertEquals("bar", testBean.getNested().getStringProperty()); } COM: <s> test execute with a nested property </s>
funcom_train/48983585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String saveResultQuestion() { logger.log("%%SAVING IN SESSION"); //before paging this.saveInSession(); //update question String returnPage = this.showPaging() ; //after paging. If the questions exists in Session, the Front-End will show it. this.getFromSession(); return returnPage; } COM: <s> save result for a question always in session </s>
funcom_train/26068514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void columnToField(Cursor c, T instance, String fieldName, Method setter) throws UnsupportedOperationException { Class<?> clazz = setter.getParameterTypes()[0]; Object value = getColumnValue(c, fieldName, clazz); try { setter.invoke(instance, value); } catch(IllegalArgumentException e) { throw new RuntimeException(e); } catch(IllegalAccessException e) { throw new RuntimeException(e); } catch(InvocationTargetException e) { throw new RuntimeException(e); } } COM: <s> performs the mapping between columns and fields </s>
funcom_train/21619384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if(o instanceof CategoryBO) { CategoryBO c = (CategoryBO)o; if(!c.getDescription().equals(this.getDescription())) return false; if(!c.getName().equals(this.getName())) return false; return super.equals(o); } else { return false; } } COM: <s> checks to see if the category bos are the same </s>
funcom_train/16768814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void returnPendingMessages(RTMPTConnection client, HttpServletResponse resp) throws IOException { log.debug("returnPendingMessages {}", client); IoBuffer data = client.getPendingMessages(RESPONSE_TARGET_SIZE); if (data != null) { returnMessage(client, data, resp); } else { // no more messages to send... if (client.isClosing()) { // Tell client to close connection returnMessage((byte) 0, resp); } else { returnMessage(client.getPollingDelay(), resp); } } } COM: <s> send pending messages to client </s>
funcom_train/33734346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String encodeString(String value) throws UnsupportedEncodingException { try { return URLEncoder.encode(value, "UTF-8").replace("*", "%2A").replace("%7E", "~"); // .replace("+", "%20") } catch(UnsupportedEncodingException ex) { log.error("There was an error encoding the string '" + value + "'", ex); throw ex; } } COM: <s> encodes a string value to a utf 8 url encoded safe value </s>
funcom_train/27767280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("TVShow".equals(portName)) { setTVShowEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/44773205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String ret; switch (ttype) { case TT_EOF: ret = "EOF"; break; case TT_EOL: ret = "EOL"; break; case TT_WORD: ret = sval; break; case TT_NUMBER: ret = "n=" + nval; break; case TT_DOUBLE: ret = "d=" + nval; break; case TT_INT: ret = "i=" + ival; break; default:{ char s[] = new char[3]; s[0] = s[2] = '\''; s[1] = (char) ttype; ret = new String(s); break; } } return "Token[" + ret + "], line " + LINENO; } COM: <s> returns the string representation of the stream token </s>
funcom_train/5081649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected RectD2D calculateAlignmentRectangle(Request request) { List editparts = getOperationSet(request); if (editparts == null || editparts.isEmpty()) return null; GraphicalEditPart part = (GraphicalEditPart)editparts.get(editparts.size() - 1); RectD2D rect = new PrecisionRectangle(part.getFigure().getBounds()); part.getFigure().translateToAbsolute(rect); return rect; } COM: <s> returns the alignment rectangle to which all selected parts should be aligned </s>
funcom_train/777388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBadConfigMultiCfg() { try { //JadePlatform platformMBeans[] = jadeRuntime.platformsFromConfigResource( BAD_CONFIG_RESOURCE_MULTICFG ); fail("didn't raise exception trying to use bad config with multiple jademx-config elements"); } catch ( JademxException e ) { assertTrue(true); } } COM: <s> test trying to use a configuration with bad xml multiple configurations </s>
funcom_train/17532549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replace(TreeNode rootOfBrach) { if (this == rootOfBrach) return; rootOfBrach.setParent(parent); if (parent != null) { TreeNode parentNode = getParent(); int index = parentNode.getChildren().indexOf(this); if (index < 0) throw new RuntimeException("it is not a child node."); parentNode.getChildren().set(index, rootOfBrach); rootOfBrach.setParent(parentNode); } } COM: <s> replace the whole branch </s>
funcom_train/51357688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getFileType(final String name) { String tmpName = name.toLowerCase(); if (tmpName.endsWith(".jad")) { return FILE_TYPE_JAD; } else if (tmpName.endsWith(".jar")) { return FILE_TYPE_JAR; } return FILE_TYPE_UNKNOWN; } COM: <s> works out the file type from the given name </s>
funcom_train/51343712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(final Schema schema, final Object primaryKey, final String name) { final TPS tps = (TPS) read(schema, primaryKey, MIN_TIMESTAMP, CURRENT_ROW, new SingleColumnFilter(name)); if (tps == null) { return null; } return tps.get(name).getValue(); } COM: <s> return the current binding for the named property </s>
funcom_train/32258607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MJHibernateComboBox getCbCustRepReport() { if (cbCustRepReport == null) { cbCustRepReport = new MJHibernateComboBox(); cbCustRepReport.setPreferredSize(new Dimension(300, 20)); cbCustRepReport.ComboType = CT_SQL; } return cbCustRepReport; } COM: <s> this method initializes cb cust rep report </s>
funcom_train/8528459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String filter(String str) { Matcher m = match.matcher(str); StringBuffer buffer = new StringBuffer(); while (m.find()) { m.appendReplacement(buffer, maybeReplace(str, m)); } m.appendTail(buffer); return buffer.toString(); } COM: <s> filter a string </s>
funcom_train/2292201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionExit() throws IOException, JspException, ServletException { if (getAction() == ACTION_CANCEL) { // save and exit was canceled return; } // clear temporary file and unlock resource, if in directedit mode actionClear(false); // close the editor actionClose(); } COM: <s> performs the exit editor action and deletes the temporary file </s>
funcom_train/13479221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAccess(int mask, boolean clear) { if (clear) { access &= ACCESS_VALID; } if (access == 0) return; // Object is invalid and therefore invisible if ((mask & ACCESS_VISIBLE) != 0) { if (controller instanceof ClientController) { access |= ACCESS_VISIBLE; } else if (controller instanceof MasterController) { if (controller.whoami() == null || calculateVisibility()) { access |= ACCESS_VISIBLE; } else { access &= ~ACCESS_VISIBLE; } } } } COM: <s> update the access flags for this orion object </s>
funcom_train/45018351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addVersionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXentryDefinition_version_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXentryDefinition_version_feature", "_UI_NXentryDefinition_type"), NexusPackageImpl.Literals.NXENTRY_DEFINITION__VERSION, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the version feature </s>
funcom_train/16620897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init(int initialCapacity) { capacity = initialCapacity; nextPtr = new int[2 * capacity]; for (int i = 0; i < capacity; i++) { nextPtr[i] = LAST; } for (int i = capacity; i < nextPtr.length;) { nextPtr[i] = ++i; } keys = new long[capacity]; elements = new int[capacity]; nextFree = capacity; count = 0; } COM: <s> initial data structure for use </s>
funcom_train/20121145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Set getColumnNamesInUniqueGroups(ConfigObject cObject) { Set columnNames = new HashSet(); for (Iterator ii = cObject.getIndexes().iterator(); ii.hasNext(); ){ ConfigIndex cI = (ConfigIndex)ii.next(); if (cI.isUnique()) { columnNames.addAll(cI.getColumns()); } } return columnNames; } COM: <s> calculate attribute names that exists in unique groups of config object </s>
funcom_train/51139186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Job findByPK(String id) { Job job = new Job(); job.setId(id); List druideDB_resultat = find(job); if ( druideDB_resultat != null && druideDB_resultat.size() == 1) { return (Job)druideDB_resultat.get(0); } return null; } COM: <s> this method is used to find a job with its pk s </s>
funcom_train/11693152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Data bagging(Random rng) { int datasize = size(); List<Instance> bag = Lists.newArrayListWithCapacity(datasize); for (int i = 0; i < datasize; i++) { bag.add(instances.get(rng.nextInt(datasize))); } return new Data(dataset, bag); } COM: <s> if data has n cases sample n cases at random but with replacement </s>
funcom_train/20043713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _setCurrentFilter() { requiredMethod("appendFilter()") ; boolean result = true; try { oObj.setCurrentFilter("TestFilter") ; } catch (com.sun.star.lang.IllegalArgumentException e) { log.println("setCurrentFilter() or appendFilter() failed") ; result = false ; } tRes.tested("setCurrentFilter()", result) ; } COM: <s> sets the current filter to that which was appended before </s>
funcom_train/2697451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStyle(int style) { if ((style ^ BOLD) == BOLD) fBold = true; if ((style ^ ITALIC) == ITALIC) fItalic = true; if ((style ^ UNDERLINE) == UNDERLINE) fUnderline = true; if ((style ^ STRIKETHROUGH) == STRIKETHROUGH) fStrikethrough = true; } COM: <s> this method allows to set text attributes style with </s>
funcom_train/33352975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToggleButton getJToggleButton81() { if (jToggleButton81 == null) { jToggleButton81 = new JToggleButton(); jToggleButton81.setPreferredSize(new Dimension(42, 20)); jToggleButton81.setText("On"); jToggleButton81.setMargin(new Insets(2, 10, 2, 10)); } return jToggleButton81; } COM: <s> this method initializes j toggle button81 </s>
funcom_train/1600856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paneEvent(Object object){ GUI gui = (GUI)registeredObject; GPane pane = gui.getTopPane(); if (pane == null) return; int paneZoom = pane.getZoom(); if(zoomLevel >= paneZoom) this.setEnabled(false); else this.setEnabled(true); } COM: <s> determines when to enable the thread </s>
funcom_train/28282048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void add(String key, String value) throws UnsupportedEncodingException { // try { // fields.add(new NameValuePair(key, URLEncoder.encode(value == null ? // "" : value, charset))); fields.put(key, new NameValuePair(key, value)); // BugzillaPlugin.ENCODING_UTF_8 // } catch (UnsupportedEncodingException e) { // // ignore // } } COM: <s> add a value to be posted to the bug </s>
funcom_train/1476385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Connection getNewConnection(String username, String password) throws SQLException { Connection conn = null; if (username == null && password == null) { conn = dataSource.getConnection(); } else { conn = dataSource.getConnection(username, password); } return fixAutoCommit(conn); } COM: <s> initialize a connection correctly depending on whether a username password is provided </s>
funcom_train/34655338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean appendLine(User user, String newLine) { if ("UniBEapplAuthorisation".equals(user.lastProperty)) { String lastRight = (String) user.rights.get(user.rights.size() - 1); user.rights.remove(user.rights.size() - 1); user.rights.add(lastRight + newLine); return true; } else { // not used property return false; } } COM: <s> this method is called when a line started with a space </s>
funcom_train/884839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSimpleInstance(SimpleInstance si) { // if simple instance doesn't change, do nothing if (si == simpleInstance) { return; } // deregister for old instance changes if (simpleInstance != null) { simpleInstance.deregister(this); } // set new instance (or no instance when null) simpleInstance = si; // register for new instance changes if (simpleInstance != null) { simpleInstance.register(this, InstanceObserver.INSTANCE_CREATED | InstanceObserver.INSTANCE_REMOVED | InstanceObserver.VALUE_CHANGED ); } } COM: <s> base implementation for setting the simple instance to be viewed </s>
funcom_train/18113465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void export(File dir) { if (dir != null && dir.isDirectory()) { MimeTypeMessage[] messages = getMessages(); for (int i = 0; i < messages.length; i++) { try { File file = File.createTempFile("mail", ".eml", dir); //TODO //messages[i].toFile(file); } catch (IOException g) { } } } } COM: <s> exports the messages in the mailbox to files under the dir argument </s>
funcom_train/28753172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRtmixstandardvolume(Long newVal) { if ((newVal != null && this.rtmixstandardvolume != null && (newVal.compareTo(this.rtmixstandardvolume) == 0)) || (newVal == null && this.rtmixstandardvolume == null && rtmixstandardvolume_is_initialized)) { return; } this.rtmixstandardvolume = newVal; rtmixstandardvolume_is_modified = true; rtmixstandardvolume_is_initialized = true; } COM: <s> setter method for rtmixstandardvolume </s>
funcom_train/39243931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllTemplates() { File path = getPath(); File[] files = path.listFiles(new FilenameFilter() { public boolean accept(File dir, String file) { if (FileUtilities.getFileExtension(file).equalsIgnoreCase("vm")) { return true; } return false; } }); return loadHolders(files); } COM: <s> gets all the templates available </s>
funcom_train/44385059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object resolveComponent(String type, String componentName) { Object result = null; Iterator resolverIt = resolvers.iterator(); while (resolverIt.hasNext() && result == null) { ComponentResolver aResolver = (ComponentResolver) resolverIt.next(); result = aResolver.resolve(type, componentName); } // end of while () return result; } COM: <s> look for a component with registered resolvers </s>
funcom_train/17744238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setType(int type) { if (type == Tag.OPEN || type == Tag.CLOSE || type == Tag.EMPTY) { this.type = type; } else { throw new IllegalArgumentException("CustomTag must be of type Tag.OPEN, Tag.CLOSE or Tag.EMPTY - was " + type); } } COM: <s> change the type of the tag </s>
funcom_train/13304537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRequestForInformationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Information_requestForInformation_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Information_requestForInformation_feature", "_UI_Information_type"), NegotiationPackage.Literals.INFORMATION__REQUEST_FOR_INFORMATION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the request for information feature </s>
funcom_train/22353534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void saveExpandProperties() { settings.setProperty("EMapOverviewPanel.ExpandMode", String.valueOf(overviewPanel .getExpandMode())); settings.setProperty("EMapOverviewPanel.ExpandTrustlevel", String.valueOf(overviewPanel .getExpandTrustLevel())); } COM: <s> saves the settings about the expanding </s>
funcom_train/3102567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getContextIndex(final String type) { Assertion.nonEmpty(type); final TemplateContextType context= fTemplateEngine.getContextRegistry().getContextType(type); Assertion.valid(context); final String name= context.getName(); final String[] contexts= fTemplateEngine.getContextNames(); for (int index= 0; index < contexts.length; index++) { if (name.equals(contexts[index])) { return index; } } return -1; } COM: <s> returns the index of the specified context with the allowed ones </s>
funcom_train/7476657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rect getScreenRect(final Rect reuse) { final Rect out = reuse == null ? new Rect() : reuse; out.set(getScrollX() - getWidth() / 2, getScrollY() - getHeight() / 2, getScrollX() + getWidth() / 2, getScrollY() + getHeight() / 2); return out; } COM: <s> gets the current bounds of the screen in i screen coordinates i </s>
funcom_train/36717603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public snObject Evaluate(snObjectArgList arg) throws EvaluationFailure { try { return Function.Call(arg); } catch (ArrayIndexOutOfBoundsException e) { e.printStackTrace(); throw new EvaluationFailure(this,e.getMessage()); } catch (ClassCastException e) { e.printStackTrace(); throw new EvaluationFailure(this,e.getMessage()); } catch (ResourceUnavailableException e) { e.printStackTrace(); throw new EvaluationFailure(this,e.getMessage()); } } COM: <s> backdoor to evaluate for alternate execution models </s>
funcom_train/10835862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void activate(ComponentContext componentContext) { Dictionary<?, ?> props = componentContext.getProperties(); Object propValue = props.get(PROP_PASSWORD_DIGEST_ALGORITHM); if (propValue instanceof String) { passwordDigestAlgoritm = (String) propValue; } else { passwordDigestAlgoritm = DEFAULT_PASSWORD_DIGEST_ALGORITHM; } } COM: <s> activates this component called by scr before registering as a service </s>
funcom_train/34239321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPrimartyKeyList() { String pkStr = ""; for (Iterator i = columns.iterator(); i.hasNext();) { pkStr += "\"" + (String) i.next() + "\""; if (i.hasNext()) { pkStr += ", "; } } return pkStr; } COM: <s> returns comma separated string of primary keys </s>
funcom_train/19323667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemove() { SimpleCacheService simpleCacheService = new SimpleCacheServiceImpl(); try { simpleCacheService.remove("SimpleCache"); assertEquals(simpleCacheService.get("SimpleCache"), null); } catch (Exception e) { e.printStackTrace(); } } COM: <s> test for method remove </s>
funcom_train/26324556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(String text) { _textPane.setContentType("text/plain"); _textPane.setText(text); _listModel.clear(); StringTokenizer st = new StringTokenizer(text, System.getProperty("line.ending")); while (st.hasMoreTokens()) { _listModel.addElement(st.nextToken()); } } COM: <s> sets the contents of this field to the specified string </s>