__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/26627701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSearchTitle(String searchTitle) { String oldSearchTitle = this.searchTitle; this.searchTitle = searchTitle; propertyChangeSupport.firePropertyChange("searchTitle", oldSearchTitle, searchTitle); setChanged(); notifyObservers(new Integer(TITLE_CHANGE)); } COM: <s> setter for property search title </s>
funcom_train/624626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMod() { OclInteger i = new IntegerInstance(-27); OclInteger i2 = new IntegerInstance(5); OclInteger zero = new IntegerInstance(0); try { i.mod(zero); fail("Precondition: i2 <> 0"); } catch (Exception e) { } OclInteger result = i.mod(i2); assertTrue(result.equals(new IntegerInstance(-2))); // post: result = i - (i.div(i2) * i2) OclBoolean post = result.eq(i.minus(i.div(i2).multiplication(i2))); assertTrue(post.equals(BooleanInstance.TRUE)); } COM: <s> tests the ocl mod operation on integers </s>
funcom_train/9522861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getManufacturer() { String uuidManufacturerPart = this.id.UUID.substring(0, 6).toLowerCase(); // System.out.println(uuidManufacturerPart + " " + manufacturer.get(uuidManufacturerPart)); String m = manufacturer.get(uuidManufacturerPart); return m != null ? m : ""; } COM: <s> returns the manufacturer of the bt hardware </s>
funcom_train/26230432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void centeringChanged() { if(jRadioButtonCenOn.isSelected()) { centeringEnable(true); } else { centeringEnable(false); if(reconImage != null) { reconImage.choose1 = null; reconImage.choose2 = null; jTextFieldSl1.setText(""); jTextFieldSl2.setText(""); reconImage.repaint(); } } } COM: <s> enables or disables the centering jpanel </s>
funcom_train/43269404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(final Object object) throws ClassCastException { if (!(object instanceof Observation)) { throw new ClassCastException("Observation.compareTo"); } int c = 0; if (object != this) { Observation that = (Observation) object; String thatString = that.keyRepresentation(); String thisString = this.keyRepresentation(); c = thisString.compareTo(thatString); } return c; } COM: <s> compare this object with another code code observation code object </s>
funcom_train/5824097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIdentifiers(String strOid) { m_data = null; if (strOid != null) { m_data = convert(strOid); } if (m_data == null) { m_data = new int[2]; m_data[0] = m_data[1] = 0; } } COM: <s> sets the object to the passed dotted decimal object identifier string </s>
funcom_train/11686422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DataSource createCustomDataSource(DataSourceInformation dataSourceInformation) { DataSource dataSource = DataSourceFactory.createDataSource(dataSourceInformation); if (dataSource != null) { log.info("Successfully created data source for " + dataSourceInformation.getUrl() + "."); } return dataSource; } COM: <s> create a custom data source using the specified data source information </s>
funcom_train/10366313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean commit() throws LoginException { if(userName != null) { subject.getPrincipals().add(new GeronimoUserPrincipal(userName)); } if(groupNames != null) { for (String groupName : groupNames.split(",")) { subject.getPrincipals().add(new GeronimoGroupPrincipal(groupName)); } } return true; } COM: <s> add the user and group principals to the subject </s>
funcom_train/31071254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GrokSet setDifference(GrokSet s) { GrokSet ns = (GrokSet)clone(); for (Iterator i=s.iterator(); i.hasNext();) { Object o1 = i.next(); for (Iterator j=ns.iterator(); j.hasNext();) { if (o1.equals(j.next())) j.remove(); } } return ns; } COM: <s> performs set difference on two sets </s>
funcom_train/16511025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void analysis(double minMatch) { findPositions(minMatch); /* Calculate match% = (length of longest match) / (length of template) */ int maxpts = diff.O.length; int best = 0; for (MatchPosition pos : foundPositions) { if(pos.getNumWords() > best) best = pos.getNumWords(); } /* match% is the length of the best match compared to maximum length */ match = (float) best / (float) maxpts; } COM: <s> perform analysis on the produced diff </s>
funcom_train/48620969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PersonalFile getFileForUserWithSpecifiedIrFile(Long userId, Long irFileId) { Object[] values = {userId, irFileId}; return (PersonalFile) (HbHelper.getUnique(hbCrudDAO.getHibernateTemplate() .findByNamedQuery("getFileWithSpecifiedUserIdAndIrFileID", values))); } COM: <s> get the files for user id and ir file id </s>
funcom_train/14515122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test01ProtectLogEntry() throws Exception { log.trace(">test01ProtectLogEntry()"); Iterator iter = entrys.iterator(); while (iter.hasNext()) { LogEntry le = (LogEntry)iter.next(); cacheAdmin.protect(admin, le); } log.trace("<test01ProtectLogEntry()"); } COM: <s> tests adding protection to a log event </s>
funcom_train/25291220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertScope(Group scope, int index) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_SCOPE_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("Fog9")); if (isLive()) ((FogRetained)this.retained).insertScope(scope, index); else ((FogRetained)this.retained).initInsertScope(scope, index); } COM: <s> inserts the specified group node into this fog nodes </s>
funcom_train/39907937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sensorData(){ high = new UsDataResponder("nofilter", UsDataResponder.Sensor.HIGH); low = new UsDataResponder("nofilter", UsDataResponder.Sensor.LOW); FactoryFloorRobot.getInstance().getUsPoller().addResponder(high); FactoryFloorRobot.getInstance().getUsPoller().addResponder(low); high.needsData=true; low.needsData=true; } COM: <s> sets up us data responder for printing us readings </s>
funcom_train/8657140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGrammarPool(XMLGrammarPool grammarPool) { if (fGrammarPool != grammarPool) { // Overflow. We actually need to reset the // modCount on every XMLGrammarLoaderContainer. if (++fModCount < 0) { clearModCounts(); } fGrammarPool = grammarPool; } } // setGrammarPool(XMLGrammarPool) COM: <s> sets the grammar pool </s>
funcom_train/39378466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate() { super.validate(); if (isValid() && getValue().length() > 0) { String value = getValue(); String pattern = getPattern(); if (pattern != null && !Pattern.matches(pattern, value)) { setErrorMessage("field-pattern-error", pattern); } } } COM: <s> validate the regex field request submission </s>
funcom_train/35298707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processImageStarted(int imageIndex) { if (progressListeners == null) { return; } int numListeners = progressListeners.size(); for (int i = 0; i < numListeners; i++) { IIOWriteProgressListener listener = (IIOWriteProgressListener)progressListeners.get(i); listener.imageStarted(this, imageIndex); } } COM: <s> broadcasts the start of an image write to all registered </s>
funcom_train/35672956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJsonToHostTransform() throws HostTransformException { StringReader reader = new StringReader(LsfileaeCases.getJson()); DfhcommareaJsonTransformers transformers = new DfhcommareaJsonTransformers(); byte[] hostData = transformers.toHost(reader); assertEquals(LsfileaeCases.getHostBytesHex(), HostData.toHexString(hostData)); } COM: <s> test json to host transformation </s>
funcom_train/32957451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object evaluate( String expression, Class resultClass ) { // Deferred EL function creation should be done now if (!elFunctionsInitialized) { initializeELFunctions(); elFunctionsInitialized = true; } try { // resolve top-level property expr = factory.createValueExpression(context, expression, resultClass); return expr.getValue(context); } catch (Exception e) { return evaluateError( expression, resultClass ); } } COM: <s> evaluate a single expressions ie and return the result as an object </s>
funcom_train/9205251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector2 screenToWorld(Point p, Dimension size, Vector2 offset, double scale) { Vector2 v = new Vector2(); double x = p.x; double y = p.y; double w = size.getWidth(); double h = size.getHeight(); double ox = offset.x; double oy = offset.y; v.x = (x - w * 0.5) / scale - ox; v.y = -((y - h * 0.5) / scale + oy); return v; } COM: <s> converts from screen coordinates to world coordinates </s>
funcom_train/25646201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String validateSymbol(final Feature feature, final int i) { String symbol = feature.getSymbol(i); if (null == symbol) { } else { int precision = typePrecisions[i - 1]; if (symbol.length() > precision) { logger.finest("Truncated symbol " + i + " of: " + feature); symbol = symbol.substring(0, precision); } } return symbol; } COM: <s> ensures that a given symbol can be stored in the database truncating </s>
funcom_train/9202794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void balanceTree() { // save the current tree Node root = this.root; // empty the tree this.root = null; this.size = 0; // create an iterator for the old tree Iterator<E> iterator = new TreeIterator(root); // add all the elements from the old tree into the new tree while (iterator.hasNext()) { // create a new node for each old node Node node = new Node(iterator.next()); // add the new node to this tree this.insert(node); } } COM: <s> re balances the entire tree </s>
funcom_train/11754551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCaseInsensitiveVariableLookup() throws Exception { Map procEnvironment = EnvironmentUtils.getProcEnvironment(); // Check that case is preserved for values EnvironmentUtils.addVariableToEnvironment( procEnvironment, "foo=bAr" ); assertEquals("bAr", procEnvironment.get("foo")); } COM: <s> accessing environment variables is case sensitive or not depending </s>
funcom_train/3447637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void swap(int i, int j) { if (i == j) return; int tmp = direct.get(i); direct.set(i, direct.get(j)); direct.set(j, tmp); invalidateInverse(); disableNotify(); modified(i); modified(j); enableNotify(); } COM: <s> exchange two value </s>
funcom_train/45775721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFilterUIName(String filterName) { String prodName = Configuration.getProductName(xMSF); String[][] s = new String[][] { { getFilterUIName_(filterName)} }; s[0][0] = JavaTools.replaceSubString(s[0][0], prodName, "%productname%"); return s[0][0]; } COM: <s> converts the name returned from get filter uiname </s>
funcom_train/29667360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetXmlDocument() { if(!m_domDocument.hasChildNodes()) return ; // Init m_domDocument.removeChild(m_domDocument.getDocumentElement()); m_docRoot = null; m_currentNode = null; // Init our members m_attribNames.clear(); m_attribValues.clear(); m_tag = ""; m_name = ""; m_chainTag = ""; m_textField = ""; m_attribIndex = -1; } COM: <s> clear the xml document </s>
funcom_train/14140733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeGraphSelectionListener( GraphSelectionListener listener ) { LOG.debug( "removeGraphSelectionListener" ); if( null != _graph ) { GraphSelectionModel selectionModel = _graph.getSelectionModel(); if( null != selectionModel ) { selectionModel.removeGraphSelectionListener( listener ); } else LOG.debug( "Selection Model is empty" ); } else LOG.debug( "Graph is empty" ); } COM: <s> removes the specified graph selection listener from the graphs listener </s>
funcom_train/23997956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateText( List< Character > s ) { text = ""; int len = s.size(); for ( int cnt = 0; cnt < s.size(); cnt++ ) { if ( cnt == cursorPos ) text += "|"; text += s.get( cnt ); } if ( cursorPos == len ) text += "|"; } COM: <s> update the text string for drawing </s>
funcom_train/40547647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveCallBackListenerChargebackListener() throws Exception { int beforeRemove = _handler.getListenerSize(ChargebackNotificationEvent.class); _handler.removeCallBackListener(_chargeBackHandler); int afterRemove = _handler.getListenerSize(ChargebackNotificationEvent.class); assertEquals(beforeRemove - 1, afterRemove); } COM: <s> the b test remove call back listener chargeback listener b method removes a </s>
funcom_train/36192905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHasExamples() { assertTrue(abcdc.has(ca)); assertTrue(abcdc.has(cc)); assertTrue(abcdc.has(cd)); for (int j = 0; j < e.length; j++) { assertTrue(!emptySeq.has(e[j])); } } COM: <s> test the examples from the has method </s>
funcom_train/3492712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void uncaughtException(Thread t, Throwable e) { // if an ExecutionSecurityManager is not in use if (security == null) e.printStackTrace(); // check if executing program is attempting to exit // VM and inform security manager else if ( (e instanceof SecurityException) && (e.getMessage().equals("InsECT: Attempt to exit VM"))) security.setHasExited(true); else e.printStackTrace(); } COM: <s> handles exceptions propagating from any child thread </s>
funcom_train/14381755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getWAL(String fname,String basedir) throws IOException { fname += ".wal"; //if (hash.get(fname) != null) // return (Texture) hash.get(fname); // Texture t = new WALLoader(new FileInputStream(basedir+fname)).getTexture(); // hash.put(fname,t); // return t; } COM: <s> retrieve a specified wal texture </s>
funcom_train/22402970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemRefreshIndex() { if (jMenuItemRefreshIndex == null) { jMenuItemRefreshIndex = new JMenuItem(); jMenuItemRefreshIndex.setText("Refresh all the indeces"); jMenuItemRefreshIndex.addActionListener( new refreshIndex()); } return jMenuItemRefreshIndex; } COM: <s> this method initializes j menu item refresh index </s>
funcom_train/2501129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object insert(A pojo) { Object result = null; if (pojo == null) { throw new PersistenceHibernateException("Parameter pojo in insert is null."); } try { if (session != null) { result = (Object) session.save(pojo); } } catch (HibernateException ex) { throw new PersistenceHibernateException("Error on insert pojo " + pojo.getClass() + ": " + pojo.toString(), ex); } return result; } COM: <s> make the pojo persistent and insert on fisic repository </s>
funcom_train/51354279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPort(boolean isSecureUrl) { String returnPort = ""; if(isSecureUrl) { if(!ProtocolSwitchFilter.isStandardHttpsMode) { returnPort = ":" + ProtocolSwitchFilter.thisAppHttpsPort; } } else { if(!ProtocolSwitchFilter.isStandardHttpMode) { returnPort = ":" + ProtocolSwitchFilter.thisAppHttpPort; } } return returnPort; } COM: <s> determines if i port i number should be used or not </s>
funcom_train/3577254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getUserList(){ Vector result = new Vector(); try { Enumeration enum = properties.propertyNames(); for(;enum.hasMoreElements() ;){ String name = (String)enum.nextElement(); int userStart = name.indexOf("user."); if(userStart != -1 ){ String userName = name.substring(userStart + 5, name.length()); result.addElement(userName); } } } catch (Exception e){ System.out.println("getUserList: " + e); } return result; } COM: <s> print a list of the users </s>
funcom_train/46453738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public double cross2D(double[] a, double[] b) { if((a.length!=2)||(b.length!=2)) { throw new UnsupportedOperationException("ERROR: Cross2D product requires 2 component arrays."); } return a[0]*b[1]-a[1]*b[0]; } COM: <s> calculate the cross product of two component vectors </s>
funcom_train/47022412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getLastVersion() { if (lastVersion == null) {//GEN-END:|229-getter|0|229-preInit // write pre-init user code here lastVersion = new StringItem(getLocalizedString("Last Upgrade"), null);//GEN-LINE:|229-getter|1|229-postInit // write post-init user code here }//GEN-BEGIN:|229-getter|2| return lastVersion; } COM: <s> returns an initiliazed instance of last version component </s>
funcom_train/28112913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getRNDNeighbor() { Node result = null; if (pid == linkID) result = (Node) this.view.get(CommonState.r.nextInt(this.view .size())); else { Linkable l = (Linkable) whoAmI.getProtocol(linkID); result = l.getNeighbor(CommonState.r.nextInt(l.degree())); } return result; } COM: <s> selects a random node from the current view </s>
funcom_train/46825466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isHorizontal(int ship, Point indexPoint) { int seatNum = this.getSeatNum(); if (seatNum == Player.NOT_SEATED) return false; int x = indexPoint.x; int y = indexPoint.y; if ((x+1) < boardSize && placedShips[seatNum][x+1][y] == ship) return true; else if ((y+1) < boardSize && placedShips[seatNum][x][y+1] == ship) return false; return true; } COM: <s> check if ship placed by current player given the index </s>
funcom_train/44869744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMDisplayCanvasBean getDerivCanvas() { if (derivCanvas == null) { derivCanvas = new WCMDisplayCanvasBean(); derivCanvas .setBorder(BorderFactory.createLineBorder(Color.gray, 1)); derivCanvas.add(getDerivAxes(), null); derivCanvas.add(getDerivGraph(), null); derivCanvas.add(getVPrimeString(), null); derivCanvas.add(getCrossHair(), null); } return derivCanvas; } COM: <s> this method initializes deriv canvas </s>
funcom_train/46759682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ChargeModel getCharge(final long chargeId, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { if (call.isStoreAudit()) { BaseData.getSecurity().storeAudit(call.getUserRefId(), chargeId, "Viewed Charge", call); } return BillingData.getCharge(chargeId, call); }}; return (ChargeModel) call(method, call); } COM: <s> return the single charge model for the primary key </s>
funcom_train/34808143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOk_but() { if (ok_but == null) { ok_but = new JButton(); ok_but.setLocation(239, 222); ok_but.setSize(50, 26); ok_but.setText("Ok"); ok_but.setActionCommand("ok"); ok_but.addActionListener(eventHandler); } return ok_but; } COM: <s> this method initializes cancel but </s>
funcom_train/7638857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String entryPathToClassName(String entryPath) { return entryPath.replaceFirst("\\.class$", "").replaceAll("[/\\\\]", "."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } COM: <s> helper method that converts a zip entry path into a corresponding </s>
funcom_train/46761661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void store(final List<ResourceScheduleModel> schedules, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { IChainStore chain = new ChainStore(); try { for (ResourceScheduleModel schedule : schedules) { SchedulingData.store(schedule, chain, call); } chain.execute(); //scheduleViewCache.clear(); return null; } catch (Exception ex) { Log.exception(ex); chain.rollback(); throw ex; } }}; call(method, call); } COM: <s> store schedules already associated with a resource </s>
funcom_train/2428233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ScheduleId getScheduleId() { String id = getProperty(SCHEDULE); if (id != null && id.length() > 0) { try { return new ScheduleId(id); } catch (IllegalArgumentException e) { // This should never happen, but if it does we will just return null. } } return null; } COM: <s> retrieves the id of the schedule used by this operation </s>
funcom_train/15605286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void packTierOrders(int removedTierNumber) { for (Iterator it = viewTierOrderInfos.values().iterator();it.hasNext();) { TierOrderInfo tierOrderInfo = ( TierOrderInfo)it.next(); if(tierOrderInfo.getTierNumber()> removedTierNumber){ tierOrderInfo.setTierNumber(tierOrderInfo.getTierNumber()-1); } } } COM: <s> this method is designed to maintain the sequential ordering of tiers without </s>
funcom_train/50314011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBounds (int x, int y, int width, int height) { checkWidget(); if (this.x == x && this.y == y && this.width == width && this.height == height) return; boolean isFocus = isFocusCaret (); if (isFocus) hideCaret (); this.x = x; this.y = y; this.width = width; this.height = height; //TODO parent.updateCaret (); if (isFocus) showCaret (); } COM: <s> sets the receivers size and location to the rectangular </s>
funcom_train/5676904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Line (String s, TextDisplay td, Color c) { TD=td; C=c; // Create a color that is very bright, but resembles the line color IC=new Color(C.getRed()/4+192,C.getGreen()/4+192,C.getBlue()/4+192); Block=NONE; a=s.toCharArray(); } COM: <s> generate a line containing s in the textdisplay td </s>
funcom_train/50093143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IMolecule getMolecule2()throws Exception { IMolecule molecule = builder.newMolecule(); molecule.addAtom(builder.newAtom("C")); molecule.addAtom(builder.newAtom("O")); molecule.addBond(0, 1, IBond.Order.DOUBLE); addExplicitHydrogens(molecule); AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule); LonePairElectronChecker lpcheck = new LonePairElectronChecker(); lpcheck.saturate(molecule); return molecule; } COM: <s> get the molecule 2 c o </s>
funcom_train/2577941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attemptPaintSelection() { Paint p = this.titlePaint.getPaint(); Color defaultColor = (p instanceof Color ? (Color) p : Color.blue); Color c = JColorChooser.showDialog( this, localizationResources.getString("Title_Color"), defaultColor ); if (c != null) { this.titlePaint.setPaint(c); } } COM: <s> allow the user the opportunity to select a paint object </s>
funcom_train/5412165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ZActionResult markMessageSpam(String id, boolean spam, String destFolderId) throws ServiceException { Element actionEl = messageAction(spam ? "spam" : "!spam", id); if (destFolderId != null && destFolderId.length() > 0) actionEl.addAttribute(MailConstants.A_FOLDER, destFolderId); return doAction(actionEl); } COM: <s> mark message as spam not spam </s>
funcom_train/37576421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void contestant_table_ValueChanged(ListSelectionEvent e) { System.out.println("Rows selected" + contestantTable.getSelectedRowCount()); if(contestantTable.getSelectedRowCount() > 0) { deleteContestantButton.setEnabled(true); selectedRow = contestantTable.getSelectedRows(); } } COM: <s> method contestant table value changed </s>
funcom_train/18889108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final private boolean isText(int index) { int type = vn.getTokenType(index); if (sel_type == 0) { return (type == VTDNav.TOKEN_CHARACTER_DATA // || type == vn.TOKEN_COMMENT || type == VTDNav.TOKEN_CDATA_VAL); } if (sel_type == 1) { return (type == VTDNav.TOKEN_COMMENT); } if (sel_type == 2) return (type == VTDNav.TOKEN_PI_NAME); try { return (vn.matchRawTokenString(index, piName)); } catch(NavException e){ return false; } } COM: <s> test whether a give token type is a text comment or pi name </s>
funcom_train/12563112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector splitString(final String string) { Vector v = new Vector(); int start = 0; while (true) { int i = string.indexOf(SEPARATOR, start); if (i == -1) { // assert start == string.length(); return v; } v.add(string.substring(start, i)); start = i + 1; } } COM: <s> splits a string into code vector code of strings </s>
funcom_train/19318349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeBytes(byte[] value) throws JMSException { if(!isBodyModifiable()) { throw new MessageNotWriteableException("BytesMessage read_only"); } try { this.getOutputStream().write(value); } catch(IOException e) { throw new JMSException(e.getMessage()); } } COM: <s> writes a byte array to the bytes message stream </s>
funcom_train/18087599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTileFactory(TileFactory factory) { if (this.factory != null) { this.factory.removeRequiredTiles(getUniqueViewName()); this.factory = null; } this.factory = factory; this.setZoom(factory.getInfo().getDefaultZoomLevel()); this.factory = factory; this.setZoom(factory.getInfo().getDefaultZoomLevel()); } COM: <s> set the current tile factory </s>
funcom_train/39171943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processExistingTools() { Set<String> toolTypes = Gate.getCreoleRegister().getToolTypes(); for(String type : toolTypes) { List<Resource> instances = Gate.getCreoleRegister() .get(type).getInstantiations(); for(Resource res : instances) { if(res instanceof ActionsPublisher) { toolLoaded(res); } } } } COM: <s> populate the menu with all actions coming from tools that are </s>
funcom_train/15408828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { SocketConnection sc = new SocketConnection(clientSocket); while(true){ if (owner.process(sc)) { // got the offline message or timeout break; } } sc.disconnect(); } catch (IOException e) { logger.log(Level.SEVERE, null, e); } catch (ClassNotFoundException e) { logger.log(Level.SEVERE, null, e); } } COM: <s> this will parse out the command </s>
funcom_train/46357776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endDocument() throws SAXException { if (isFlushing() && w != null) { try { debugw.write(""); log.debug(":: endDocument ::"); log.debug(":: endDocument ::" +w.toString()); debugw.flush(); w.flush(); } catch (IOException e) { throw new SAXException("Failed to flush target writer: " + e.getMessage(), e); } } } COM: <s> p this method finishs the handlers action </s>
funcom_train/35292280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HtmlSnippets getHtmlSnippets() { if (snippets == null) { this.snippets = new HtmlSnippetsImpl(getTable(), getToolbar(), getCoreContext()); } SupportUtils.setWebContext(this.snippets, getWebContext()); return snippets; } COM: <s> return the html snippets object </s>
funcom_train/31625347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Part getPart() throws DBException { Part allParts[] = getNodeType().getParts(); for (int i = 0; i < allParts.length; i++) { Part onePart = allParts[i]; String id = onePart.getId(); if (id.equals(getStepAttribute(StepAttributes.ATTRIBUTE_MODEL_FIELD))) { return onePart; } } return null; } COM: <s> get the part that is associated with this step </s>
funcom_train/10511907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFastRelativePath() { String absPath = getAbsolutePath(); if (absPath.indexOf(rootPath + task.getSeparator()) == 0) { return absPath.substring(rootPath.length() + task.getSeparator().length()); } return null; } COM: <s> find out the relative path assuming that the path used to construct </s>
funcom_train/40409525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCsvDataMap_oneColumnIllegalArgument() throws IOException { try { Map<String, String> dataMap = CsvUtils.getCsvDataMap("test_data/one_column.csv", true); fail("IllegalArgumentException not thrown."); } catch (IllegalArgumentException e) { // Ignore Exception. } } COM: <s> tests getting a csv data map of one column throwing an illegal argument </s>
funcom_train/19685795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readData() { IDandSEQNBpairs.clear(); HOP_COUNT = getInt(); DestOfRREQseqnb = getInt(); SrcOfRREQseqnb = getInt(); int IDandSEQNBpairsSize = getInt(); for (int i=0;i<IDandSEQNBpairsSize;i++){ IDandSEQNBpair objIDandSEQNBpair = new IDandSEQNBpair(getLong(), getInt()); IDandSEQNBpairs.add(objIDandSEQNBpair); }//for } COM: <s> deserialize the data from the rrep message </s>
funcom_train/39544533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Bridge getBridge(String namespaceURI, String localName) { HashMap localNameMap = (HashMap) namespaceURIMap.get(namespaceURI); if (localNameMap == null) { return null; } Bridge bridge = (Bridge)localNameMap.get(localName); if (isDynamic()) { return bridge == null ? null : bridge.getInstance(); } else { return bridge; } } COM: <s> returns the bridge associated with the element type </s>
funcom_train/1572342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String domainForIDCookies(final WORequest _rq, final WOContext _ctx) { if (_ctx == null) { log.warn("got no context to generate session cookie path!"); return null; } return _ctx.urlWithRequestHandlerKey( null /* handler key */, null /* handler path */, null /* query path */); } COM: <s> returns the path for the session id cookie </s>
funcom_train/8087877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFilename(String value) { Instances insts; m_Filename = value; if (m_Filename.length() != 0) { try { insts = new Instances(new BufferedReader(new FileReader(m_Filename))); m_ClassIndex.setUpper(insts.numAttributes()); insts.setClassIndex(Integer.parseInt(getClassIndex()) - 1); setCapabilities(Capabilities.forInstances(insts)); } catch (Exception e) { e.printStackTrace(); } } } COM: <s> sets the dataset filename to base the capabilities on </s>
funcom_train/22076925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void modify(Resource res, Application currentAppli) { Resource currentResource = res; Resource r= get(currentResource.getId(),currentAppli); Collection attributes = r.getAttributes(); fr.norsys.mapper.console.utils.BeanUtils.copyFilledProperties(r, currentResource); currentResource = r; currentResource.setAttributes(attributes); ExecutionContext.get().getSession().setAttribute(ConsoleCst.CURRENT_RESOURCE,currentResource); } COM: <s> action to modify an application in session </s>
funcom_train/47138388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int insert(final Settlement settlement) { Object[] params = new Object[] { new Long(settlement.getId()), settlement.getFinancialYear(), new Integer(settlement.getStatus()), new Double(settlement.getOpeningBalance()), settlement.getDescription(), settlement.getCreated(), settlement.getLastChanged() }; return update(params); } COM: <s> insert settlement into database </s>
funcom_train/50485907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateImmediate() { if (!rowChangeSupport.fireConfirmUpdate()) return false; rowChangeSupport.fireBeforeUpdate(); boolean returnValue = select.update(); rowChangeSupport.fireAfterUpdate(returnValue); if (returnValue) { select.restorePosition(); cancelUpdate(); } refreshControllers(); return returnValue; } COM: <s> update the database from the bindings </s>
funcom_train/9799635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logErrors(Writer w) { PrintWriter pw = new PrintWriter(w); Enumeration e = errors.elements(); while (e.hasMoreElements()) { Throwable t = (Throwable)e.nextElement(); t.printStackTrace(pw); logger.debug(t.getStackTrace()); } } COM: <s> logs an error by writing stack trace to the passed writer </s>
funcom_train/549857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void quit() { storePreferences(); if ((file != null) && (fileRecordable)) { if ( JOptionPane.showConfirmDialog( mainFrame, "Save before exit ?", "Alert", JOptionPane.YES_NO_OPTION ) == JOptionPane.YES_OPTION ){ save(file); } } super.quit(); } COM: <s> exits program stores preferences saves the current device tree file and terminates </s>
funcom_train/3840547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getConnectedPlayers() { String returnValue = ""; if(connectedPlayers.size() == 0) { returnValue = "No connected players found"; } else { Enumeration e = connectedPlayers.elements(); while(e.hasMoreElements()) { returnValue += (String)e.nextElement() + " "; } } return returnValue; } COM: <s> get a string with all the connected players </s>
funcom_train/41482655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getScrollText() { if (scrollText == null) { scrollText = new JScrollPane(); scrollText.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10), BorderFactory.createEtchedBorder(EtchedBorder.LOWERED))); scrollText.setPreferredSize(new Dimension(543, 39)); scrollText.setViewportView(getTextArea()); } return scrollText; } COM: <s> this method initializes scroll text </s>
funcom_train/24097852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OvalVariableComponentLiteral createLiteralComponent() { Element e = new Element("literal_component", getElement().getNamespace()); OvalVariableComponentLiteral ret = getParentDocument().getLiteralVariableComponentWrapper(); ret.setElement(e); ret.setRoot(getRoot()); return ret; } COM: <s> create a literal component suitable for adding to this variable as a child </s>
funcom_train/24156283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File getProgramFromString(String prog, String name) throws IOException { Resource resource = getLoader().loadFromString(prog, name); EList<Diagnostic> errors = resource.getErrors(); if (errors.size() > 0) { System.err.println("unexpected errors: " + errors); } assertEquals(0, errors.size()); EObject program = resource.getContents().get(0); return (File) program; } COM: <s> loads the specified string and returns the associated program </s>
funcom_train/15410286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runStatements(boolean expectErrors, List<String> statements, Connection c) { for (int i = 0; i < statements.size(); i++) { String xOfy = (i + 1) + " of " + statements.size(); runStatement(expectErrors, xOfy, statements.get(i), c); } } COM: <s> execute the list of statements </s>
funcom_train/11303926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractConfiguration addWriter(Writer writer) { Map<String, Writer> writers = getWriters(); String name = AnnoUtil.getName(writer); if (!writers.containsKey(name)) { writers.put(name, writer); } else { log.warn("The NamedWriter is already registered: " + name); } return this; } COM: <s> registers a named writer implementation </s>
funcom_train/43334683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(){ ItemStore itemStore = new ItemStore(saveFile,true); Item usr = new Item(0,"username",this.getUsername()); Item pass = new Item(1,"password",this.getPassword()); Item server = new Item (2,"server", this.getServer()); Item serverPort = new Item(3,"serverPort", Integer.toString(this.getServerPort())); Item[] prefs = {usr,pass,server,serverPort}; itemStore.save(prefs); } COM: <s> saves to file </s>
funcom_train/25314523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float sampleValue(float x, float y) { float result = 0.0f; // accumulate the weighted noise layers // coordinates are interpolated in the sampleValue method of NoiseLayer // for EACH noise layer for (int i = 0; i < layerCount; i++) { result += weight[i] * noiseLayers[i].sampleValue(x, y); } return result; } COM: <s> interpolates a value for the given coordinate </s>
funcom_train/34137653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteLast() { final int codesSize = mCodes.size(); if (codesSize > 0) { mCodes.remove(codesSize - 1); final int lastPos = mTypedWord.length() - 1; char last = mTypedWord.charAt(lastPos); mTypedWord.deleteCharAt(lastPos); if (Character.isUpperCase(last)) mCapsCount--; } } COM: <s> delete the last keystroke as a result of hitting backspace </s>
funcom_train/41825265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCoberturaReportFile(String coberturaReportFile) { Element publishers = getChild(root,"publishers"); Element coberturaRoot = getChild(publishers,"hudson.plugins.cobertura.CoberturaPublisher"); getChild(coberturaRoot,"coberturaReportFile").setText(coberturaReportFile); } COM: <s> sets the cobertura report file </s>
funcom_train/16830897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printAnswers(List<CoreLabel> list, PrintWriter out) { String style = null; if (flags != null) { style = flags.outputFormat; } if (style == null || "".equals(style)) { style = "slashTags"; } int outputStyle = asIntOutputFormat(style); printAnswers(list, out, outputStyle, ! "slashTags".equals(style)); } COM: <s> print the classifications for the document to the given writer </s>
funcom_train/2287042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateRequestContextInfo() { if ((m_flexContextInfoList != null) && !m_flexContextInfoList.isEmpty()) { m_cmsObject.getRequestContext().setAttribute( CmsRequestUtil.HEADER_LAST_MODIFIED, m_flexContextInfoList.get(m_flexContextInfoList.size() - 1)); } } COM: <s> updates the context info of the request context </s>
funcom_train/19309482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addTable(final String tableName, final byte[] tableContents) { if (tableContents == null) { return; } if (tableContents.length == 0) { return; } this.tableFontOrderList.add(tableName); this.tableMap.put(tableName, tableContents); } COM: <s> add a specific table to the subset </s>
funcom_train/21610917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRealRSSEnclosures() throws IOException, DigesterException { String[] enclosures = digester.findMatches("enclosure", INPUT_RSS); printList("enclosures", enclosures); assertEquals("Expected enclosures not found.", 3, enclosures.length); } COM: <s> tests the digester with a real rss feed reading all the enclosures </s>
funcom_train/19055637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInvokeArg(XInvokeArg[] invokeArg) { this.invokeArg_.clear(); for (int i = 0;i < invokeArg.length;i++) { addInvokeArg(invokeArg[i]); } for (int i = 0;i < invokeArg.length;i++) { invokeArg[i].rSetParentRNode(this); } } COM: <s> sets the xinvoke arg property b invoke arg b </s>
funcom_train/26443470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int createGroup(final boolean distributed, final String communityName, final String groupName, String description, final GroupIdentifier theIdentifier){ if (description == null) description = groupName; try { currentKernel.createGroup(getAddress(), distributed, communityName, groupName, description, theIdentifier); } catch (OrganizationRequestException e) { return handleException(e); } return 1; } COM: <s> creates a new group </s>
funcom_train/12414635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstrStringWithExponentWithoutPoint2() { String a = "-238768787678287e-214"; int aScale = 214; BigInteger bA = new BigInteger("-238768787678287"); BigDecimal aNumber = new BigDecimal(a); assertEquals("incorrect value", bA, aNumber.unscaledValue()); assertEquals("incorrect scale", aScale, aNumber.scale()); } COM: <s> new big decimal string value value contains exponent </s>
funcom_train/10525708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCommand(Command command) { if(command == null) throw new IllegalArgumentException(); if(_frozen) throw new IllegalStateException(); Command[] results = new Command[_commands.length + 1]; System.arraycopy(_commands, 0, results, 0, _commands.length); results[_commands.length] = command; _commands = results; } COM: <s> add a command to the chian </s>
funcom_train/2386204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Photo photo) throws PhotoAlbumException{ try { // Save the photo super.save(photo); } catch (HibernateException he){ he.printStackTrace(); throw new PhotoAlbumException("Could not save the photo, cause of an Hibernate problem."); } catch (HbnDaoException hde){ hde.printStackTrace(); throw new PhotoAlbumException("Could not save the photo."); } } COM: <s> save a code photo code instance </s>
funcom_train/8439046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getAccountName() { if (accountName == null) {//GEN-END:|55-getter|0|55-preInit // write pre-init user code here accountName = new TextField("\u041B\u043E\u0433\u0438\u043D", null, 32, TextField.ANY);//GEN-LINE:|55-getter|1|55-postInit // write post-init user code here }//GEN-BEGIN:|55-getter|2| return accountName; } COM: <s> returns an initiliazed instance of account name component </s>
funcom_train/5576677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void swap(int song1Id, int song2Id) throws MPDServerException { String[] args = new String[2]; args[0] = Integer.toString(song1Id); args[0] = Integer.toString(song2Id); this.mpd.getMpdConnection().sendCommand(MPD_CMD_PLAYLIST_SWAP_ID, args); this.refresh(); } COM: <s> swap positions of song1 and song2 </s>
funcom_train/16714636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IClass unaryNumericPromotion(Locatable l, IClass type) throws CompileException { type = this.convertToPrimitiveNumericType(l, type); IClass promotedType = this.unaryNumericPromotionType(l, type); this.numericPromotion(l, type, promotedType); return promotedType; } COM: <s> implements unary numeric promotion jls3 5 </s>
funcom_train/1779326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeAll(final boolean mark) { if (mark) { AbstractInsnNode insn = first; while (insn != null) { AbstractInsnNode next = insn.next; insn.index = -1; // insn no longer belongs to an InsnList insn.prev = null; insn.next = null; insn = next; } } size = 0; first = null; last = null; cache = null; } COM: <s> removes all of the instructions of this list </s>
funcom_train/21404996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadPrediction(String file) throws Exception { Instances data = FileUtils.readArff(file); String predicateName = data.relationName(); switch (this.mode){ case PRED: this.predicatePredictions.put(predicateName, new PredicatePrediction(data)); break; case ARG: this.argumentPredictions.put(predicateName, new ArgumentPrediction(data)); break; } } COM: <s> this loads all the predicted values according to </s>
funcom_train/2956514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void increaseMatchingSize(int j) { this.matchingSize.add(1); this.flow.set(j, this.flow.get(j) + 1); // We must check if this is still possible ... int delta = flow.get(j) - this.getMaxFlow(j); if (delta > 0) { this.compatibleSupport.set(false); } } COM: <s> updates the matching size when one more left vertex is matched with j </s>
funcom_train/20221030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isModified() { return !ObjectUtils.equals(locations, locationModel.getLocations()) || !ObjectUtils.equals(activeLocation, locationModel.getActiveLocation()) || !getThirdPartyClasspath().equals(thirdPartyClasspath) || testClassesCheckbox.isSelected() != scanTestClasses; } COM: <s> have the settings been modified </s>
funcom_train/41812762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fitCanvas1024() { Rectangle destRect = getClientArea(); double sx = ((double) destRect.width) / 1024.0; double sy = ((double) destRect.height) / 1024.0; double s = Math.min(sx, sy); double dx = 0.5 * destRect.width; double dy = 0.5 * destRect.height; centerZoom(dx, dy, s, new AffineTransform()); } COM: <s> fit the image onto the canvas </s>