__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/26383092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createStatements(Connection connection) throws SQLException { if (parent!=null) statements= PersisterStatements.getForTable(parent.getAlternativeRelationName(), connection); if (statements==null) statements=PersisterStatements.getForTable(Reflection.toName(type), connection); } COM: <s> creates the db statements this persister needs </s>
funcom_train/44496198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createDatabaseMySQL(String database) throws SQLException { String expression1 = "CREATE DATABASE " + database; Statement stmt = conn.createStatement(); if (stmt.executeUpdate(expression1) == -1) { throw new SQLException("db error : " + expression1); } conn.commit(); stmt.close(); } COM: <s> creates a new mysql database under the given code database code name </s>
funcom_train/41844162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIfModifiedSince(DateTime conditionDate) { if (conditionDate == null) { return; } if (type == RequestType.QUERY) { setHeader(GDataProtocol.Header.IF_MODIFIED_SINCE, conditionDate.toStringRfc822()); } else { throw new IllegalStateException( "Date conditions not supported for this request type"); } } COM: <s> sets the if modified since date precondition to be applied to the request </s>
funcom_train/1611291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String buildTagsText(List<Tag> tags) { StringBuffer sb = new StringBuffer(); for (Tag tag : tags) { sb.append(tag.getName() + ","); } if (tags.size() > 1) { sb.deleteCharAt(sb.length() - 1); } return sb.toString(); } COM: <s> builds a text with all tag list separated by a comma </s>
funcom_train/3156686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getHighestRefNo() { final int numProducts = getNumProducts(); int highestRefNo = 0; for (int i = 0; i < numProducts; i++) { final int refNo = getProductAt(i).getRefNo(); if (refNo > highestRefNo) { highestRefNo = refNo; } } return highestRefNo; } COM: <s> returns the greatest reference number of the products in this manager </s>
funcom_train/3020373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String findGVAttribute(String attrName) { String val = dataStore.getProperty(DATA_KEY_GRAPHVIZ_ATTRIBUTES, attrName); Graph o = owner; while ((val == null) && (o != null)) { val = o.data().getProperty(getDefaultGVAttributeKey(), attrName); o = o.owner; } return val; } COM: <s> returns the value of the named graphviz attribute that applies to </s>
funcom_train/14233335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void editBan(int banID, String newReason){ try { String localQuery = ("UPDATE bans SET reason = '" + cleanUp(newReason) + "' WHERE ban_id = '" + banID + "'"); PreparedStatement ps = c.prepareStatement(localQuery); ps.executeUpdate(); } catch (SQLException e) { e.printStackTrace(); } } COM: <s> edits a ban or info given the idiot name and new reason </s>
funcom_train/28346692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void openFile( final File file ) { try { URL url = file.toURL(); openDocument( url ); } catch( MalformedURLException exception ) { Logger.getLogger("global").log( Level.WARNING, "Error opening file: " + file, exception ); System.err.println( exception ); displayError( exception ); } } COM: <s> support method for opening a new document given a file </s>
funcom_train/35848401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveReceiver() throws Exception { Object role = Model.getCollaborationsFactory().createClassifierRole(); Model.getCollaborationsHelper().setSender(elem, role); Model.getCollaborationsHelper().setSender(elem, null); ThreadHelper.synchronize(); assertEquals(0, model.getSize()); assertTrue(model.isEmpty()); } COM: <s> test set sender with null argument </s>
funcom_train/16380411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateTextFieldWidthType1_Min(int textFieldWidthType1, DiagnosticChain diagnostics, Map<Object, Object> context) { boolean result = textFieldWidthType1 >= TEXT_FIELD_WIDTH_TYPE1__MIN__VALUE; if (!result && diagnostics != null) reportMinViolation(CTEPackage.Literals.TEXT_FIELD_WIDTH_TYPE1, new Integer(textFieldWidthType1), new Integer(TEXT_FIELD_WIDTH_TYPE1__MIN__VALUE), true, diagnostics, context); return result; } COM: <s> validates the min constraint of em text field width type1 em </s>
funcom_train/48869555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Product create() { String id = GUID.generate(); Product p = new ConceptualSale(id); Cache.getInstance().put(id, p); System.out.println("The Product id in the ConceptualSale create method is: " + p.getId()); return p; } COM: <s> creates a conceptual sale object based on the transaction it is associated with </s>
funcom_train/45692513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSyncSamplesOnMoveEnabledPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EsxFile_syncSamplesOnMoveEnabled_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EsxFile_syncSamplesOnMoveEnabled_feature", "_UI_EsxFile_type"), EsxPackage.Literals.ESX_FILE__SYNC_SAMPLES_ON_MOVE_ENABLED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the sync samples on move enabled feature </s>
funcom_train/440117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPropertiesCO(CreatorObject co, LinkedList<Class> eventHandlerClasses) { if (properties == null) { properties = new PropertiesGTW(this, Preferences.userNodeForPackage(this.getClass())); } properties.setCreatorObject(co, eventHandlerClasses); } COM: <s> sets the passed creator object to be displayed in the </s>
funcom_train/3374087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void read(InputStream in, Document doc, int pos) throws IOException, BadLocationException { if (doc instanceof StyledDocument) { // PENDING(prinz) this needs to be fixed to // insert to the given position. RTFReader rdr = new RTFReader((StyledDocument) doc); rdr.readFromStream(in); rdr.close(); } else { // treat as text/plain super.read(in, doc, pos); } } COM: <s> insert content from the given stream which is expected </s>
funcom_train/4233153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hamming() { int N = window.length; double pi = Math.PI; for (int n = 0; n < window.length; n++) { window[n] = 0.54 - (0.46 * Math.cos(2 * pi * n / (N - 1))); } } COM: <s> create a hamming window </s>
funcom_train/32778378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int nextInt(int bits) { int y = this.mersenneTwister[currentIndex]; currentIndex++; // re-determine random numbers if pool exhausted if (currentIndex > 623) this.twistNumbers(); // determine tempered random number y = y ^ y >>> 11; y = y ^ (y << 7) & 0x9d2c5680; y = y ^ (y << 15) & 0xefc60000; y = y ^ y >>> 18; // return number (bit length as desired) return y >>> 32 - bits; } COM: <s> returns the next pseudo random integer of a given bit length </s>
funcom_train/44011560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetCustState() { System.out.println("setCustState"); String custState = ""; CustomerBO instance = null; instance.setCustState(custState); // 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 cust state method of class edu </s>
funcom_train/26379087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void outputText(String pTextToSend, int pLine) throws OneWireException { prepDisplay(pLine); // Go through the string and output each character int length = pTextToSend.length(); for (int index = 0; index < length; index++) { char character = pTextToSend.charAt(index); outputChar((byte) character, true); } } COM: <s> sends p text to send to the lcd display on p line </s>
funcom_train/40344978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setEnabledSpeakBtn(Button speakBtn, String toKey) { Log.d("--VoiceOfAndroid--", toKey); if (toKey.equals("en") || toKey.equals("ja")) { speakBtn.setEnabled(true); } else { //speakBtn.setEnabled(false); speakBtn.setEnabled(true); } } COM: <s> set enabled speak btn </s>
funcom_train/34441532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DefaultMutableTreeNode addPeer(PeerAdvertisement peer) { DefaultMutableTreeNode gnode = null; // Find the group node in the tree. gnode = findNode(peer.getPeerGroupID()); if (gnode == null) return null; // Now add the peer to the group node. return addPeer(peer, gnode); } COM: <s> add a new peer to the display </s>
funcom_train/38529786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintTextAndTicks(final AbstractHistogram plotHistogram) { painter.drawTitle(plotHistogram.getTitle(), TOP); painter.drawNumber(plotHistogram.getNumber(), new int[0]); painter.drawTicks(BOTTOM); painter.drawLabels(BOTTOM); painter.drawTicks(LEFT); painter.drawLabels(LEFT); } COM: <s> paints titles labels and tick marks </s>
funcom_train/44431792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getVirginDb() throws FileNotFoundException { boolean fileOneIsOK, fileTwoIsOK; fileTwoIsOK = copyFiles(scaleDbPath + "informa.script", scaleDbPath + ".script"); fileOneIsOK = copyFiles(scaleDbPath + "informa.properties", scaleDbPath + ".properties"); return fileOneIsOK && fileTwoIsOK; } COM: <s> regenerate the empty datanase </s>
funcom_train/46864183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeModels() { List<Element> tNewList = new ArrayList<Element>(); for (Element tEl : _relationship) { if (tEl.getNamespace() == null || !tEl.getNamespace().getURI().equals("info:fedora/fedora-system:def/model#")) { tNewList.add(tEl); } } _relationship = tNewList; } COM: <s> remove all fedora model attributes for non fedora 3 objects or </s>
funcom_train/5073017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printOpenTag(int level, String tag, boolean appendNewline) { if (appendNewline && !compress) { println(level, "<"+tagPrefix+":"+replaceCharsInTag(tag)+">"); } else { print(level, "<"+tagPrefix+":"+replaceCharsInTag(tag)+">"); } } COM: <s> prints an open tag at the given indentation level and </s>
funcom_train/25389130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean contentExistsOnSource(Content content) { Repository repo = getRepository(content.getContentUrl()); String objectID = getObjectID(content.getContentUrl()); Session session = repo.createSession(); CmisObject cmisObject = null; try { cmisObject = session.getObject(objectID); } catch (CmisObjectNotFoundException confe) { // ignore it cmisObject = null; } return cmisObject != null; } COM: <s> checks if the content is present in the cms system </s>
funcom_train/22326354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resetFromRegistry() { int len = m_rows.size(); for (int i = 0; i < len; i++) { Row row = (Row) m_rows.get(i); row.m_field.setText(m_reg.getString(row.m_group, row.m_key)); } } COM: <s> this method is called when the panels reset button is clicked to </s>
funcom_train/33734443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean parseXmlEndTag(XmlPullParser parser, boolean inUsernameTag) { for(FlickrResponseTagName tag : FlickrResponseTagName.values()) { if(tag.getTag().compareToIgnoreCase(parser.getName()) == 0) { switch(tag) { case USER_USERNAME: log.debug("Parser found USER_USERNAME end tag."); inUsernameTag = false; break; } } } return inUsernameTag; } COM: <s> method to parse an xml closing tag </s>
funcom_train/17440167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public boolean isLock() { if(isRadio){ try{ doCmd(setBlockOnCmd); final boolean locked="1".equals(doCmd(getLockCmd)); rStatus.put(LOCK, locked?"yes":"no"); return locked; } finally{ doCmd(setBlockOffCmd); } } return false; } COM: <s> if the radio recognised returns whether the radio is locked </s>
funcom_train/16784363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dealTable() { if (button == 0) passButton(); try { for (int i = button; i < 10; i++) { PokerPlayer j = players.get(i); if (j != null) { dealCard(i + 1); } } for (int i = 0; i <= (button - 1); i++) { PokerPlayer j = players.get(i); if (j != null) { dealCard(i + 1); } } } catch (PokerException e) { System.err.println(e); e.printStackTrace(); } } COM: <s> deal a card to each player at the table clockwise starting with the </s>
funcom_train/28426871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Any_ElGamal_PKCS1Signature (String mdAlgorithm) { super(mdAlgorithm + "/ElGamal/PKCS#1"); try { md = MessageDigest.getInstance(mdAlgorithm); } catch (Exception e) { throw new CryptixException(getAlgorithm() + ": Unable to instantiate the " + mdAlgorithm + " MessageDigest\n" + e); } } COM: <s> constructor for an any el gamal pkcs1 signature </s>
funcom_train/11123876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyParams(HttpParams target) { Iterator<Map.Entry<String, Object>> iter = this.parameters.entrySet().iterator(); while (iter.hasNext()) { Map.Entry<String, Object> me = iter.next(); if (me.getKey() instanceof String) target.setParameter(me.getKey(), me.getValue()); } } COM: <s> copies the locally defined parameters to the argument parameters </s>
funcom_train/7230962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNextLine() throws EndOfSourceException{ String sReturn = null; if (miIndex + 1 < mvecLines.size() ){ miIndex++; sReturn = (String)mvecLines.get(miIndex); } else { throw new EndOfSourceException("No lines remaining in TextLineIterator."); } return sReturn; } COM: <s> returns the next line and advances the index </s>
funcom_train/40128351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RTPSessionData createInStreamData(String uri){ RTPSessionData result = new RTPSessionData(); result.setSourceId(uri); try { result.setPeerAddress(Inet4Address.getLocalHost().getHostAddress()); } catch (UnknownHostException e) { e.printStackTrace(); } result.setRtcpClientPort(findFreeUdpPort(false)); result.setRtpClientPort(findFreeUdpPort(false)); return result; } COM: <s> fills an rtp session data object with the basic enrties </s>
funcom_train/20875965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getTimetableLoaderClass(DataProperties properties) { String loader = properties.getProperty("TimetableLoader"); if (loader != null) return loader; if (properties.getPropertyInt("General.InputVersion", -1) >= 0) return "org.unitime.timetable.solver.TimetableDatabaseLoader"; else return "net.sf.cpsolver.coursett.TimetableXMLLoader"; } COM: <s> return name of the class that is used for loading the data </s>
funcom_train/13532605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(String name,String value) { if (isReadOnly) { throw new RuntimeException("Can't change element from read only structure!"); } XMLElement el = get(name); if (el!=null) { el.setValue(value); } else { throw new RuntimeException("No such element!"); } } COM: <s> sets the element from structure with specified name to </s>
funcom_train/14660874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getJSplitPane() { if (jSplitPane == null) { jSplitPane = new JSplitPane(); jSplitPane.setDividerLocation(500); jSplitPane.setResizeWeight(.7D); jSplitPane.setLeftComponent(getJPanel()); jSplitPane.setRightComponent(getJTabbedPane()); } return jSplitPane; } COM: <s> this method initializes j split pane </s>
funcom_train/14269500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MimeType findMimeType(String uri) { for (MimeType mt: mimetypes.values()) { if (mt.matches(uri)) return mt; } Config.getLogger().warning( "Mimetype for '" + uri + "' is not found, default parser will be used."); return DEFAULT_MIMETYPE; } COM: <s> returns mime type implementation suitable for the specified resource </s>
funcom_train/13965795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object deserialize(byte[] in) { Object rv=null; try { if(in != null) { ByteArrayInputStream bis=new ByteArrayInputStream(in); ObjectInputStream is=new ObjectInputStream(bis); rv=is.readObject(); is.close(); bis.close(); } } catch(IOException e) { getLogger().warn("Caught IOException decoding %d bytes of data", in.length, e); } catch (ClassNotFoundException e) { getLogger().warn("Caught CNFE decoding %d bytes of data", in.length, e); } return rv; } COM: <s> get the object represented by the given serialized bytes </s>
funcom_train/39004647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createServiceTable(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout()); composite.setLayoutData(new GridData(GridData.FILL_BOTH)); ((GridData)composite.getLayoutData()).horizontalSpan = 2; tableviewer = new EnvironmentElementsTableViewer(composite, SWT.BORDER | SWT.FULL_SELECTION); tableviewer.setInput(this.environment); } COM: <s> create list with services included in the environment </s>
funcom_train/11320799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processSearch(String value) { // Search for user entered value List<Customer> list = customerService.getCustomersForName(value); table.setRowList(list); // Set the parameter in the pagination link, // so in the next page, we can fill the table again. table.getControlLink().setParameter("nameSearch", value); } COM: <s> search the customer by name and create the table control </s>
funcom_train/51611259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTemplate() { template_node = new ASTTemplate(0); doc_node = new ASTDocument(1); header_node = new ASTAnyText(0); Preferences prefs = Preferences.userRoot().node("au/edu/uq/smartass"); header_node.setText(prefs.get("templateHeader", "\\input{smartass.tex}")); template_node.jjtAddChild(header_node, 0); template_node.jjtAddChild(doc_node, 1); template_node.init(); } COM: <s> creates empty assignment and sets its initial and default data </s>
funcom_train/42110750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toNiceString(Map<String, String> replacements) { StringBuffer buffer = new StringBuffer(); if (negated_) buffer.append("(not "); buffer.append("(" + factName_); for (int i = 0; i < arguments_.length; i++) { String arg = arguments_[i]; if (replacements != null && replacements.containsKey(arg)) arg = replacements.get(arg); buffer.append(" " + arg); } buffer.append(")"); if (negated_) buffer.append(")"); return buffer.toString(); } COM: <s> formats the string as a nice string includes goal args </s>
funcom_train/19310312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void neg() throws PsOperatorException { final PsObject object = popOperand(PsOperator.NEG); if (object instanceof PsNumber) { final PsNumber number = (PsNumber) object; final PsNumber negative = number.negate(); pushOperand(negative); return; } throw new PsOperatorException(PsError.TYPECHECK, PsOperator.NEG, "only integers and reals supported: " + object); } COM: <s> executes the neg operator </s>
funcom_train/21464323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionNewFavorite() { boolean catSelected = false; /** A selected blogroll is not a valid category */ if (rssOwlFavoritesTree.getFavoritesTree().getSelectionCount() > 0 && !rssOwlFavoritesTree.getSelectedCat().isBlogroll()) catSelected = true; actionNewFavorite("", "", (catSelected == true) ? rssOwlFavoritesTree.getSelectedCat() : null); } COM: <s> add a new newsfeed favorite </s>
funcom_train/33231969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadProperties(String propertiesPath) throws IOException { properties = new Properties(); properties.load(PropertiesLoader.class.getResourceAsStream(propertiesPath)); String s_key; for (Object key : properties.keySet()) { s_key = (String) key; overrideWithSystemProperty(s_key, properties); } } COM: <s> load the properties from the path </s>
funcom_train/10749078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test3() { Field[] fs = getClass().getDeclaredFields(); assertNotNull("null expected", fs); assertEquals("array length:", 1, fs.length); assertEquals("incorrect name", "s", fs[0].getName()); assertSame("objects differ", getClass(), fs[0].getDeclaringClass()); } COM: <s> fields of the super class should not be reflected </s>
funcom_train/32056951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLength() { System.out.println("testGetLength"); Object obj = null; JGraph jgraph = new JGraph(); CellMapper cellmapper = null; EdgeView edge = new EdgeView(obj, jgraph, cellmapper); CellView cellview = null; edge.getLength(cellview); } COM: <s> this function tests get length function of edge view class </s>
funcom_train/9645245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sortTargetSelectorList(List targetSelectorList) { Collections.sort(targetSelectorList, new Comparator() { @Override public int compare(Object o1, Object o2) { SGTarget target1 = (SGTarget) o1; SGTarget target2 = (SGTarget) o2; String sel1String = target1.getDescription(); String sel2String = target2.getDescription(); return sel1String.compareTo(sel2String); } }); } COM: <s> sorts the target selector list </s>
funcom_train/38785957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Algebraic div (Algebraic x) throws JasymcaException{ if( x instanceof Polynomial ) return (new Rational( this, (Polynomial)x )).reduce(); if( x instanceof Rational ) return ((Rational)x).den.mult(this).div( ((Rational)x).nom ); if( !x.scalarq() ) return (new Matrix(this)).div( x ); throw new JasymcaException( "Can not divide "+this+" through "+x); } COM: <s> divide two algebraic objects </s>
funcom_train/51603759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AdGroup addAdGroup(AdGroup adGroup) throws RemoteException { debug("adding ad group..."); AdGroup addedAdGroup = _adGroupService.addAdGroup(adGroup).getAdGroup(); printResponseHeaders(((Stub) _adGroupService).getResponseHeaders()); return addedAdGroup; } COM: <s> adds an ad group to a campaign </s>
funcom_train/10839326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SlingRepository getRepository() throws RepositoryException, NamingException { if(repository != null) { return repository; } synchronized (RepositoryTestBase.class) { if(repository == null) { RepositoryUtil.startRepository(); repository = RepositoryUtil.getRepository(); Runtime.getRuntime().addShutdownHook(new ShutdownThread()); } return repository; } } COM: <s> return a repository first call initializes it and a jvm </s>
funcom_train/51119168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addProperties(String propertySetCaption, Form properties) { // Create new panel containing the form Panel p = new Panel(); p.setWidth(600); p.setCaption(propertySetCaption); p.setStyle("light"); p.addComponent(properties); formsLayout.addComponent(p); // Setup buffering setButton.dependsOn(properties); discardButton.dependsOn(properties); properties.setWriteThrough(false); properties.setReadThrough(true); // Maintain property lists forms.add(properties); updatePropertyList(); } COM: <s> add a formful of properties to property panel </s>
funcom_train/44019061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getCompilerCompileMenuItem() { if (compilerCompileMenuItem == null) { compilerCompileMenuItem = new JMenuItem(); compilerCompileMenuItem.setText("Compile"); compilerCompileMenuItem.setMnemonic('m'); compilerCompileMenuItem.setDisplayedMnemonicIndex(2); compilerCompileMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_B, MENU_SHORTCUT_KEY_MASK)); compilerCompileMenuItem.addActionListener(eventHandler); } return compilerCompileMenuItem; } COM: <s> return the compile property value </s>
funcom_train/20112939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateSource(File outputFile, Map<ConfigObject,List<GroovyTrigger>> groovyTriggers) throws Exception { logger.info("Generate tirgger file to "+outputFile); Writer out =new OutputStreamWriter( new FileOutputStream(outputFile), "UTF-8"); generateClassHeader(groovyTriggers, out); generateTriggers(groovyTriggers, out); generateFunctions(out); out.write("\n} // the end of class"); COM: <s> generate groovy class source </s>
funcom_train/19417519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetIdWithNull() throws AnnotationException { final SimpleAnnotation annotation = new SimpleAnnotation(0, 2, "x", "y", 80, null, this.annotionHandler, "id"); try { annotation.setId(null); fail("Oops... must throw IllegalArgumentException"); } catch (final IllegalArgumentException e) { ; } } COM: <s> test the id setting with parameter code null code </s>
funcom_train/35806985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void btnAtEnd_clicked(ActionEvent arg0) { int lenStrength = strength.getText().trim().length(); int lenDirection = direction.getText().trim().length(); if (lenStrength > 0 && lenDirection > 0){ windTableModel.addRow(new Object[]{strength.getText(),direction.getText()}); }else{ JOptionPane.showMessageDialog(new JFrame(), lng.get("dlg-input-err-text"), lng.get("dlg-input-err"), JOptionPane.WARNING_MESSAGE); } } COM: <s> h3 btn at end clicked h3 </s>
funcom_train/10863614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFieldInt(String field, String param, int def) { String val = getFieldParam(field, param); try { return val==null ? def : Integer.parseInt(val); } catch( Exception ex ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex ); } } COM: <s> returns the int value of the field param </s>
funcom_train/36982098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FieldRefInfo addFieldRefInfo(ClassInfo ci, String name, String desc) { FieldRefInfo __fi = findFieldRefInfo(0, ci, name, desc); if (__fi != null) { return __fi; } short classIndex = ci.getEntryIndex(); short nameAndTypeIndex = addNameAndTypeInfo(name, desc).getEntryIndex(); FieldRefInfo fi = new FieldRefInfo(classIndex, nameAndTypeIndex); cp.add(fi); return fi; } COM: <s> adds a new field ref info </s>
funcom_train/50914614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFormalCharge(String[] value) throws RuntimeException { if (value == null) { throw new RuntimeException("null formalCharge"); } List<CMLAtom> atomList = this.getAtoms(value.length, "formalCharge"); int i = 0; for (CMLAtom atom : atomList) { atom.setFormalCharge(Integer.parseInt(value[i++])); } } COM: <s> an array of formal charges </s>
funcom_train/26532429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTimeout(int timeout) { int oldValue = getTimeout(); InternalSettings.set(Reminder.TIMEOUT_SETTING, timeout + ""); reminderTimer.setDelay(timeout * 1000 * 60); reminderTimer.setInitialDelay(timeout * 1000 * 60); stopOrRestartTimer(); propertyChangeSupport.firePropertyChange(Reminder.TIMEOUT_PROPERTY, oldValue, timeout); } COM: <s> changes the reminders timeout </s>
funcom_train/36996517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public byte readByte() throws IOException, EOFException { if (startIdx[idx]<0 || fpos<startIdx[idx] || fpos>endIdx[idx]) { readToBuffer(); } fpos++; return data[(int)(fpos-1-startIdx[idx])][idx]; } COM: <s> reads one signed byte </s>
funcom_train/1242207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeApplications() throws IOException { writeTableStart("APPID"); writeGroup(5, "9"); writeOwnerHandle("0"); writeSubClass("AcDbSymbolTable"); writeSize(1); writeApplication("12", "9", "ACAD"); writeTableEnd(); } COM: <s> writes the appid tables </s>
funcom_train/48126571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommand(Request request) { if (request instanceof ReconnectRequest) { Object view = ((ReconnectRequest) request).getConnectionEditPart() .getModel(); if (view instanceof View) { Integer id = new Integer( DiagramaClases.diagram.part.Smaits_dcVisualIDRegistry .getVisualID((View) view)); request.getExtendedData().put(VISUAL_ID_KEY, id); } } return super.getCommand(request); } COM: <s> extended request data key to hold editpart visual id </s>
funcom_train/37517722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CClassType getType() { if (type == null) { type = CTopLevel.getTypeRep(qualifiedName(),true); type.setAllArguments(new CClassType[][]{typevariables}); type.setClass( this ); } else { type.setAllArguments(new CClassType[][]{typevariables}); } return type; } COM: <s> returns the type of this class </s>
funcom_train/9963868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getTopJPanel(), BorderLayout.NORTH); jContentPane.add(getMainJPanel(), BorderLayout.CENTER); jContentPane.add(getFHireJProgressBar(), BorderLayout.SOUTH); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/50370667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createTSS() throws ResourceNotCreatedException{ Home home=kernel.getHome(UAS.TSS); try{ home.get(id); //instance exists logger.info("Found TSS "+id); return; } catch(Exception e){ //OK, instance does not exist } Map<String,Object>map=new HashMap<String, Object>(); map.put(WSResourceImpl.INIT_UNIQUE_ID, id); home.createWSRFServiceInstance(map); logger.info("Created TSS "+id); } COM: <s> re create a tss for use by this job taker </s>
funcom_train/10211346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_GET_GLUE_FROM_INVALID_CLASS() { GlueFactory factory = GlueFactory.getFactory(String.class); try { factory.getGlue(); } catch (ClassNotFoundException e) { fail(); } catch (InstantiationException e) { fail(); } catch (IllegalAccessException e) { fail(); } catch(ClassCastException e) { return; } fail(); } COM: <s> tests the exception handling in case of a invalid implementation class </s>
funcom_train/21059335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertLines(int index, int lines) { if (lines <= 0) { return; } //length += lines; ensureCapacity(getHeight()); int len = index + lines; System.arraycopy(lineInfo, index, lineInfo, len, lineInfo.length - len); for (int i = index + lines - 1; i >= index; i--) { lineInfo[i] = new LineInfo(); } } COM: <s> informs the token marker that lines have been inserted into </s>
funcom_train/43526262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addScopeModifierPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Method_scopeModifier_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Method_scopeModifier_feature", "_UI_Method_type"), CallGraphPackage.Literals.METHOD__SCOPE_MODIFIER, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the scope modifier feature </s>
funcom_train/6331195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals( Object obj ) { if (obj != null && obj instanceof DxMap) { DxMap rhs = (DxMap)obj; if (this == obj) { return true; } // FIXME: direct call to DxSet.equlas() is "ambigous"... Object keySet = keySet(); return keySet.equals( rhs.keySet() ); } else { return false; } } COM: <s> compares two maps for equality </s>
funcom_train/18141955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PropertyXRef addChild(Indi newChild) throws GedcomException { // Remember Indi who is child PropertyChild pc = new PropertyChild(newChild.getId()); addProperty(pc); // Link ! try { pc.link(); } catch (GedcomException ex) { delProperty(pc); throw ex; } return pc; } COM: <s> adds another child to the family </s>
funcom_train/51338793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_pidStat_data_parse() { DateFormat f = SysstatUtil.newDateFormat(); System.err.println("Format: " + f.format(new Date())); try { System.err.println("Parsed: " + f.parse("06:35:15 AM")); System.err.println("Parsed: " + f.parse("02:08:24 PM")); } catch (ParseException e) { log.error("Could not parse?"); } } COM: <s> test parse of the sysstat iso date format </s>
funcom_train/50221932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getRunStatistics() { String msg; msg = new String("Time: ") + simulationRuntime + new String(" ms; "); msg = msg + new String("Firings: ") + fireCount; if (simulationRuntime > 0) msg = msg + new String("; Firings/sec: ") + (1000 * fireCount) / simulationRuntime; return msg; } COM: <s> prepare the simulation statistics string </s>
funcom_train/10866325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBasics() throws IOException { check("अँगरेज़ी", "अंगरेजि"); check("अँगरेजी", "अंगरेजि"); check("अँग्रेज़ी", "अंगरेजि"); check("अँग्रेजी", "अंगरेजि"); check("अंगरेज़ी", "अंगरेजि"); check("अंगरेजी", "अंगरेजि"); check("अंग्रेज़ी", "अंगरेजि"); check("अंग्रेजी", "अंगरेजि"); } COM: <s> test some basic normalization with an example from the paper </s>
funcom_train/5343938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getIsMeasuredSpeed() throws BadPacketException { parseResults(); switch (_measuredSpeedFlag) { case UNDEFINED: throw new BadPacketException(); case TRUE: return true; case FALSE: return false; default: Assert.that(false, "Bad value for measured speed flag: "+_pushFlag); return false; } } COM: <s> returns true if the speed in this query reply was measured bit set </s>
funcom_train/37830164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyExited(final ActiveEntity entity, final int oldX, final int oldY) { Rectangle2D eArea; eArea = entity.getArea(oldX, oldY); for (final MovementListener l : movementListeners) { Rectangle2D area = l.getArea(); if (area.intersects(eArea)) { l.onExited(entity, this, oldX, oldY); } } } COM: <s> notify anything interested in when an entity exited </s>
funcom_train/12549250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void listUnknownResources() { StringBuilder buffer = new StringBuilder(5000); Enumeration<String> keys = unknownResources.keys(); if (keys.hasMoreElements()) buffer.append("Unknown resources in format 'resource name -- locale':").append(MessageDisplay.LINE_FEED); while (keys.hasMoreElements()) { Object key = keys.nextElement(); buffer.append(key).append(": ").append(unknownResources.get(key)); buffer.append("\n"); } if (buffer.length() > 0) System.out.print(buffer.toString()); } COM: <s> lists the unknown resources for all known locales to the standard output </s>
funcom_train/36932852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void parameter(final int theType, final int theValue) { if(_myTextureIDs == null)return; for(int i = 0; i < _myTextureIDs.length;i++) { bind(i); CCGraphics.currentGL().glTexParameteri(_myTarget.glID, theType, theValue); } } COM: <s> shortcut to set a texture parameter only used internally </s>
funcom_train/37000021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getString(byte[] name, int start, int length, String encoding) { Entry e = getEntry(name, start, length, encoding); String s = get(e); if(s == null) put(e, s = createString(name, start, length, encoding)); return s; } COM: <s> get a string from the string cache </s>
funcom_train/8407480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean putAll(Object key, Collection values) { if (values == null || values.size() == 0) { return false; } Collection coll = getCollection(key); if (coll == null) { coll = createCollection(values); if (coll.size() == 0) { return false; } super.put(key, coll); return true; } else { return coll.addAll(values); } } COM: <s> adds a collection of values to the collection associated with the specified key </s>
funcom_train/3422602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object oneTransition (QName elementName, int[] currentState, SubstitutionGroupHandler subGroupHandler){ // error state if (currentState[0] < 0) { currentState[0] = XSCMValidator.SUBSEQUENT_ERROR; return null; } currentState[0] = XSCMValidator.FIRST_ERROR; return null; } COM: <s> the method corresponds to one transaction in the content model </s>
funcom_train/46958064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl(Composite parent) { viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); viewer.setContentProvider(new ViewContentProvider()); viewer.setLabelProvider(new ViewLabelProvider()); viewer.setInput(getViewSite()); TwipsePlugin.getDefault().getStatusList().addObserver(this); makeActions(); hookContextMenu(); hookDoubleClickAction(); contributeToActionBars(); hookMylynTaskView(); } COM: <s> this is a callback that will allow us </s>
funcom_train/22579441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setActive(Attribute attrib) { String sqlString = null; sqlString = new String ("UPDATE "+A_TBL_NAME + " SET active='true'" + " WHERE deviceID="+attrib.getDeviceID() + " AND ifIndex="+attrib.getIfIndex() + " AND oid="+attrib.getOid()); System.out.println("\nDbAttribute.setActive:\n sqlString = "+sqlString); return executeUpdate(sqlString); } COM: <s> set a device interfaces specific attribute active </s>
funcom_train/4853397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LinkPredicateEditor () { setLayout (new GridBagLayout ()); choice = new LinkFeatureChoice (); Constrain.add (this, choice, Constrain.labelLike (0, 0)); Constrain.add (this, choice.getArgs(), Constrain.areaLike (0, 1)); setLinkPredicate (null); } COM: <s> make a link predicate editor </s>
funcom_train/29289228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Constraint getConstraint(Object groupKey, Object constraintKey) { Map group; if (groupKey != null) { group = getGroup(groupKey); if (group == null) throw new IllegalArgumentException( Messages.getString("org.isistan.flabot.util.consistency.GroupBasedConsistencyManagerImpl.noGroupWithTheGivenKey")); //$NON-NLS-1$ } else group = defaultGroup; return (Constraint) group.get(constraintKey); } COM: <s> get the list of registered constraints for the given group and </s>
funcom_train/5447116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dataItemRequested(InfoBusItemRequestedEvent event) { System.out.println("Data Item Requested: " + "Item = " + event.getDataItemName() + " " + "Source = " + event.getSource().toString()); if(event.getDataItemName().equals(this.getName())) { event.setDataItem(this); } } COM: <s> info bus data producer methods </s>
funcom_train/49327913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRelationshipString(Domain domain, Dictionary dict) { List<String> relationshipList = new ArrayList<String>(); if (domainsAsHolder.contains(domain)) { relationshipList.add(dict.holder()); } if (domainsAsBillingcontact.contains(domain)) { relationshipList.add(dict.billingcontact()); } if (domainsAsTechnicalcontact.contains(domain)) { relationshipList.add(dict.technicalcontact()); } if (domainsAsHostingcontact.contains(domain)) { relationshipList.add(dict.hostingcontact()); } return relationshipList.toString(); } COM: <s> get relationship string e </s>
funcom_train/29020627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(byte b[], int off, int len) throws IOException { int read = 0, count; while (read != len && (count = readData(b, off, len - read)) != -1) { off += count; read += count; } position += read; if (read == 0 && read != len) return -1; return read; } COM: <s> dont imitate the jdk behaviour of reading a random number </s>
funcom_train/46763226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RoleGroupModel getRoleGroup(final long roleGroupId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return SecurityData.getRoleGroup(roleGroupId, chain, call); }}; return (RoleGroupModel) call(method, call); } COM: <s> same transaction return the single role group model for the primary key </s>
funcom_train/3033070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Pattern nameToPattern(String name) { // TODO: break name apart String expr = (name == null) ? ".*" : ".*" + name + ".*"; Pattern out = null; // return null for bad pattern try { out = Pattern.compile(expr, Pattern.CASE_INSENSITIVE); } catch (Exception e) { // TODO: we are generating the pattern wrong... } return out; } COM: <s> convert pattern to regular expression </s>
funcom_train/35811590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void traceMethodInstruction(InvokeInstruction methodInstruction, Stack<IfCompleteTrace> traceStack, Criteria criteria){ MethodInstruction methodInsn = new MethodInstruction(methodInstruction); MethodCallCriterion methodCallCriterion = new MethodCallCriterion(methodInsn.getMethodName()); if (criteria.contains(methodCallCriterion)) traceStack.peek().add(new MethodInstruction(methodInstruction, getRecursiveCounter(methodInstruction))); } COM: <s> tracing a method instruction </s>
funcom_train/40439824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateAuthToken() { SecureRandom random = new SecureRandom(); authToken = new byte[TOKEN_SIZE]; random.nextBytes(authToken); Calendar cal = Calendar.getInstance(); // Set token time-to-live to the number of days specified in // gss.properties. cal.add(Calendar.DAY_OF_MONTH, getConfiguration().getInt("tokenTTL", 1)); authTokenExpiryDate = cal.getTime(); } COM: <s> creates a new authentication token and resets </s>
funcom_train/50096059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testNewtonRaphsonMinimization() { //logger.debug(""); //logger.debug("FORCEFIELDTESTS with Newton-Raphson Minimization"); gm.setConvergenceParametersForNRM(1000, 0.00001); gm.newtonRaphsonMinimization(molecule3Coordinates, tpf); for (int i = 0; i < molecule3Coordinates.getSize(); i++) { Assert.assertEquals(testResult3C[i], gm.getNewtonRaphsonMinimum().getElement(i), 0.00001); } } COM: <s> a unit test for junit newton raphson method minimization </s>
funcom_train/41523557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Command getCommand(Class<?> clazz){ Command command = null; //Build a new command using Web Application Context (wac) try{ Constructor<?> c = clazz.getConstructor(BeanFactory.class); command = (Command)c.newInstance(wac); }catch(Exception e){ logger.error("Error creating new command [" + clazz.toString() + "] : " + e.getMessage()); } return command; } COM: <s> return new instance of command identified by clazz </s>
funcom_train/4427839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createReads(Procedure procedure) { Pattern inputPattern = staticCls.getInputPattern(); for (Port port : inputPattern.getPorts()) { int numTokens = inputPattern.getNumTokens(port); Var var = actor.getStateVar(port.getName()); System.out.println("must read " + numTokens + " tokens from " + var.getName()); } } COM: <s> creates calls to read instructions </s>
funcom_train/49044568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPddlPredicatePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PropertyDescriptor_PddlPredicate_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PropertyDescriptor_PddlPredicate_feature", "_UI_PropertyDescriptor_type"), ItemsPackage.Literals.PROPERTY_DESCRIPTOR__PDDL_PREDICATE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the pddl predicate feature </s>
funcom_train/112249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IncluderContext getIncluderContext(ServletContext ioServletContext) { IncluderContext lIncluderContext = null; synchronized(INCLUDER_CONTEXT_KEY) { lIncluderContext = (IncluderContext) ioServletContext.getAttribute(INCLUDER_CONTEXT_KEY); if(lIncluderContext == null) { lIncluderContext = new IncluderContext(); lIncluderContext.init(ioServletContext.getRealPath("/WEB-INF/includes")); ioServletContext.setAttribute(INCLUDER_CONTEXT_KEY, lIncluderContext); } } return lIncluderContext; } COM: <s> gets the data island includer context for this servlet concext </s>
funcom_train/48143780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double inverse(double probability) { checkRange(probability); if(probability==0.0) return 0.0; if(probability==1.0) return Double.MAX_VALUE; double y=beta.inverse(1.0-probability); if(y<2.23e-308) //avoid overflow return Double.MAX_VALUE; else return (p/q)*(1.0/y-1.0); } COM: <s> inverse of the cumulative f distribution function </s>
funcom_train/7269673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { _isConnecting = false; boolean isOutgoing = initializer.isOutgoing(); _status = isOutgoing ? OUTGOING_STRING : INCOMING_STRING; _host = initializer.getInetAddress().getHostAddress(); // once it's connected, add it to the dictionary for host entry if ( isOutgoing ) ConnectionMediator.instance().addKnownHost( _host, initializer.getPort() ); _updated = true; _time = initializer.getConnectionTime(); } COM: <s> updates this connection from a connecting to a connected state </s>
funcom_train/45692348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOperationNumberPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SongEvent_operationNumber_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SongEvent_operationNumber_feature", "_UI_SongEvent_type"), EsxPackage.Literals.SONG_EVENT__OPERATION_NUMBER, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the operation number feature </s>