__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/32007024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnPeerNetStart() { if (btnPeerNetStart == null) { btnPeerNetStart = new JButton(); btnPeerNetStart.setText("Start"); btnPeerNetStart.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setCursor(hourglassCursor); server.startJxta(); btnPeerNetStart.setEnabled(false); btnPeerNetStop.setEnabled(true); setCursor(normalCursor); } }); } return btnPeerNetStart; } COM: <s> this method initializes btn peer net start </s>
funcom_train/25213181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFont(String name, Font font, boolean global) { if (fontMap == null) { fontMap = new HashMap<String, Font>(); } fontMap.put(name, font); if (global && next != null) { next.setFont(name, font, global); } } COM: <s> setter for the font with a given name </s>
funcom_train/3990127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCiezar_cialaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BadanieOkresowe_ciezar_ciala_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_ciezar_ciala_feature", "_UI_BadanieOkresowe_type"), PrzychodniaPackage.Literals.BADANIE_OKRESOWE__CIEZAR_CIALA, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the ciezar ciala feature </s>
funcom_train/26280934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recordCharData(String charData) { if (tag == EXIT_STATUS) { Integer tmpint = null; tmpint = new Integer(charData); exitStatus = tmpint.intValue(); } else if (tag == STDOUT) { stdout = charData; } else if (tag == STDERR) { stderr = charData; } } COM: <s> this method is called to return character data to the </s>
funcom_train/4864815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void check(Object[] params) throws ClassCastException { if (params == null) { return; } for (int i = 0; i < params.length; ++i) { checkParam(params[i]); if (params[i] instanceof String) { params[i] = Verifiers.getInstance().handleString( (String) params[i], module, function); } } } COM: <s> checks the supplied object array for illegal unsupported types </s>
funcom_train/13746653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createCompositeentete() { GridData gridData3 = new GridData(); gridData3.horizontalSpan = 2; gridData3.heightHint = 100; gridData3.widthHint = 600; GridLayout gridLayout3 = new GridLayout(); gridLayout3.numColumns = 2; compositeentete = new Composite(scrolledCompositeentete, SWT.NONE); compositeentete.setLayout(gridLayout3); textrechercheentete = new Text(compositeentete, SWT.BORDER); Label filler2 = new Label(compositeentete, SWT.NONE); listentete = new List(compositeentete, SWT.NONE); listentete.setLayoutData(gridData3); } COM: <s> this method initializes compositeentete </s>
funcom_train/15718030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sendApprovedKeywords(String docId, String[] keywords) { boolean result; StringBuffer s = new StringBuffer(); for (int i = 0; i < keywords.length; i++) { if (i > 0) s.append(" "); s.append(keywords[i]); } log.info("sendApprovedKeywords - " + s.toString()); try { api.sendApprovedKeywords(docId, keywords); result = true; } catch (LT4eLException e) { e.logError(); result = false; } log.info("sendApprovedKeywords: " + result); return result; } COM: <s> save keywords see </s>
funcom_train/3589441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRequestFrom() { String ret = ""; int idx1 = getRequestURL().indexOf("from="); if (idx1 >= 0) { int idx2 = getRequestURL().indexOf("&", idx1); if (idx2 <= 0) { idx2 = getRequestURL().length(); } ret = getRequestURL().substring(idx1 + 5, idx2); } return ret; } COM: <s> returns the from query param returned by the most recent response </s>
funcom_train/41332630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Paint getFocusPaint(Shape s, FocusType focusType, boolean useToolBarFocus) { if (focusType == FocusType.OUTER_FOCUS) { return useToolBarFocus ? outerToolBarFocus : outerFocus; } else { return useToolBarFocus ? innerToolBarFocus : innerFocus; } } COM: <s> get the paint to use for a focus ring </s>
funcom_train/39314503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSave(){ System.out.println("testSave"); System.out.print("save function can't be tested because "); System.out.print("it needs Image object parameter which is "); System.out.print("an abstract, therefore Image object cannot be "); System.out.println("instantiated."); } COM: <s> test of save method of class converter </s>
funcom_train/18068087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNewWallInField(List<GameFieldCoordinate> wall) { // clear the traces of old wall clearGameFieldObject(OBJECT_WALL); GameFieldCoordinate gfc = new GameFieldCoordinate(); for (ListIterator<GameFieldCoordinate> itr = wall.listIterator(); itr.hasNext();) { gfc = itr.next(); setGameFieldObject(OBJECT_WALL, gfc); } } COM: <s> add new wall to the game field </s>
funcom_train/37054602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { try { TDoubleIntHashMapDecorator copy = (TDoubleIntHashMapDecorator) super.clone(); copy._map = (TDoubleIntHashMap)_map.clone(); return copy; } catch (CloneNotSupportedException e) { // assert(false); throw new InternalError(); // we are cloneable, so this does not happen } } COM: <s> clones the underlying trove collection and returns the clone wrapped in a new </s>
funcom_train/14415118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleInteraction(JList p_jList) { if (c_isDebuggingMethodCalls) { System.out.println("...DList.handleInteraction()"); } p_jList.addMouseListener(new MouseHandler()); /* Register to receive selection events */ p_jList.addListSelectionListener(new SelectionHandler()); } COM: <s> handle user interaction on list open object panel if users selects </s>
funcom_train/13519776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel getRelationJPanel() { if (relationPanel==null) { relationPanel = new JPanel(); relationPanel.setLayout(new BorderLayout()); TableColumn column = null; for (int i = 0; i <=nbParameters; i++) { column = relationTable.getColumnModel().getColumn(i); column.setPreferredWidth(130); } relationPanel.add(relationTable.getTableHeader(),BorderLayout.NORTH); relationPanel.add(relationTable,BorderLayout.SOUTH); } return relationPanel; } COM: <s> get the relations panel </s>
funcom_train/42509409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Content getIcon(int maxWaitingDelay) throws IOException { File tempIconFile = File.createTempFile("icon", ".png"); tempIconFile.deleteOnExit(); ImageIO.write(getIconImage(maxWaitingDelay), "png", tempIconFile); return new TemporaryURLContent(tempIconFile.toURI().toURL()); } COM: <s> returns the icon content matching the displayed view </s>
funcom_train/7748624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void implementInterface(String interfaceName) { StringTemplateGroupInterface I = (StringTemplateGroupInterface)nameToInterfaceMap.get(interfaceName); if ( I!=null ) { // we've seen before; just use it implementInterface(I); return; } I = loadInterface(interfaceName); // else load it if ( I!=null ) { nameToInterfaceMap.put(interfaceName, I); implementInterface(I); } else { if ( groupLoader==null ) { listener.error("no group loader registered", null); } } } COM: <s> indicate that this group implements this interface load if necessary </s>
funcom_train/43876196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fill() { for ( String label : elements.keySet() ) { ZkDriver.getLogger().debug( "Filling '" + label + "'." ); final InputElement element = elements.get( label ); if ( values.containsKey( label ) ) { element.write( values.get( label ) ); } else { element.autoFill(); } } } COM: <s> fills all detected component with auto or parametrized fill </s>
funcom_train/18995330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OutputStream setBinaryStream(long position) throws SQLException { if(data_ == null)//@free JDError.throwSQLException(this, JDError.EXC_FUNCTION_SEQUENCE); //@free if (position <= 0 || position > maxLength_) { JDError.throwSQLException(this, JDError.EXC_ATTRIBUTE_VALUE_INVALID); } return new AS400JDBCBlobOutputStream(this, position); } COM: <s> returns a stream that an application can use to write to this blob </s>
funcom_train/39911565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRh2() { System.out.println("getRh2"); Page1 instance = new Page1(); TextField expResult = null; TextField result = instance.getRh2(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get rh2 method of class timesheetmanagement </s>
funcom_train/3517612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDatabase() { createConnection(); // try to setup the new DB // because all data should be deleted // delete db if a db exists under the given name Database deleteDb = connection.getDatabaseByName(Constants.OLAP_DB_Name); if (deleteDb != null) { connection.removeDatabase(deleteDb); } this.db = connection.addDatabase(Constants.OLAP_DB_Name); } COM: <s> creates a new database on palo </s>
funcom_train/21845313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer result = new StringBuffer("[Program \""); result.append(name); result.append("\", "); if( fProtected) result.append("protected"); else { result.append(statements.size()); result.append(" statements"); } if (executable != null) result.append(", linked"); if (fModified) result.append(", modified"); if (fProgramActive) result.append(", active"); if (fSystemObject) result.append( ", system object"); result.append("]"); return result.toString(); } COM: <s> format the program object as a printable string </s>
funcom_train/2304124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String makeString() { // Return quickly if no indenting if (depth <= 0) { return new String(""); } // Make a char array and fill it with spaces char[] array = new char[depth]; Arrays.fill(array, ' '); // Now return a string built from that char array return new String(array); } COM: <s> create a code string code of spaces for indentation based on the </s>
funcom_train/29706113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onPopupButton(Widget button_p) { // Get values int value = ((Integer)button_p.getData(VALUE)).intValue(); int mode = ((Integer)button_p.getData(MODE)).intValue(); // Undo manager UndoManager manager = _view.getUndoManager(); // According to case _view.setPlayMode(mode); switch ( mode ) { case MainView.PLAY: manager.playPosition(value); break; case Template.STRIKE: manager.toggleMark(value); break; } // Hide _shell.setVisible(false); _composite.setFocus(); } COM: <s> handles selection events on buttons </s>
funcom_train/19746489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Role makeRole(String name, String title, String description, Set roles) throws BeanAlreadyExistsException { Role role = new Role(); role.setName(name); role.setTitle(title); role.setDescription(description); role.setFixed(Boolean.TRUE); roleManager.createRole(role); roles.add(role); return role; } COM: <s> creates a fixed role </s>
funcom_train/46738183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFacilityLocationRef(DisplayModel facilityLocationRef) { if (Converter.isDifferent(this.facilityLocationRef, facilityLocationRef)) { DisplayModel oldfacilityLocationRef= new DisplayModel(this); oldfacilityLocationRef.copyAllFrom(this.facilityLocationRef); this.facilityLocationRef.copyAllFrom(facilityLocationRef); setModified("facilityLocationRef"); firePropertyChange(String.valueOf(USERGROUPS_FACILITYLOCATIONREFID), oldfacilityLocationRef, facilityLocationRef); } } COM: <s> facility this user group belongs to </s>
funcom_train/35829372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackgroundImage(BufferedImage i){ bgImg = i; bgViewport.setImage( bgImg, bgImg.getWidth(), bgImg.getHeight() ); bgViewport.setStretchToFill(true); // when stretched, applyViewport() is cheaper to compute, and this does not change // the picture rendering. // bgViewport.setScreenGridDisplayed(true); } COM: <s> set a buffered image or null to desactivate background image </s>
funcom_train/4852929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put (Object obj) { if (!isEmpty ()) { // throw away all objects after curr int newEnd = (curr+1) % history.length; if (newEnd != end) { int e = end; end = newEnd; fireRemoved (newEnd, (e > 0) ? e-1 : history.length-1); } } add (obj); } COM: <s> add an object to the history after the current point deleting all </s>
funcom_train/5001952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeVariableFromWorkspace(String variableName) throws RWorkspaceException { try { connection.voidEval("rm(" + variableName + ")"); //$NON-NLS-1$ //$NON-NLS-2$ } catch (RserveException e) { throw new RWorkspaceException(e); } Log.txm.finest("VARIABLE_REMOVED"+ new Object[]{variableName}); //$NON-NLS-1$ } COM: <s> remove a variable from the workspace </s>
funcom_train/42639415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNodesCountY(int nodesCountY) { if (nodesCountY < 1) throw new IllegalArgumentException("Number of nodes should be >= 1. Given value over Y is " + nodesCountY + "."); this.nodesCountY = nodesCountY; if (y0 != null && y1 != null) stepY = Number.minus(getY1(), getY0()).mult(1.0/(getNodesCountY() - 1.0)); } COM: <s> setting number of nodes of grid over y </s>
funcom_train/1797607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPath(String path) { // check if setting to existing value if (this.path == null ? path != null : !this.path.equals(path)) { // set to new value for customer parameter this.path = path; setStringCustomParameter("path", path); } } COM: <s> sets the content at the given site path </s>
funcom_train/8036829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void change(String newValue) { if (state != STATE_AVAILABLE) { throw new IllegalStateException(); } stream.skip(valueStart); stream.discard(eol-valueStart); StreamUtil.insertAsciiString(stream, newValue); stream.skip(2); state = STATE_UNKNOWN; } COM: <s> change the value of the current header </s>
funcom_train/28758702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertScoreEquals(Query q1, Query q2) throws Exception { Hits hits1 = searcher.search (q1); Hits hits2 = searcher.search (q2); assertEquals(hits1.length(), hits2.length()); for (int i = 0; i < hits1.length(); i++) { assertEquals(hits1.score(i), hits2.score(i), 0.0000001f); } } COM: <s> tests whether the scores of the two queries are the same </s>
funcom_train/119598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParentMap clone(Map map) { ParentMap pm = new ParentMap(); Iterator it = entries(); while (it.hasNext()) { Entry e = (Entry) it.next(); Object child = map.get(e.getChild()); Object parent = map.get(e.getParent()); if (child == null) child = e.getChild(); if (parent == null) parent = e.getParent(); if (child != null && parent != null) pm.addEntry(child, parent); } return pm; } COM: <s> creates a new parent map based on this parent map </s>
funcom_train/2726951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(String hibernateFileUrl, String defaultPropsUrl) throws CouldNotLoadPropertiesException { // store the URLs in class scope vars _hibernatePropertiesUrl = hibernateFileUrl; _defaultPropertiesUrl = defaultPropsUrl; try { // load the custom hibernate properties loadHibProperties(); } catch(CouldNotLoadPropertiesException e) { // if the properties could not be loaded, throw an exception throw e; } } COM: <s> stores the passed params and loads the currently stored properties </s>
funcom_train/17489756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected U low(ObjectSparseFormalSum<F, U> chain) { U maxObject = null; for (Iterator<Map.Entry<U, F>> iterator = chain.iterator(); iterator.hasNext(); ) { Map.Entry<U, F> entry = iterator.next(); if (maxObject == null || this.filteredComparator.compare(entry.getKey(), maxObject) > 0) { maxObject = entry.getKey(); } } return maxObject; } COM: <s> this function computes the operation low a j as described in the paper </s>
funcom_train/3496270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStatus(final int statusIndex, final String s) { Runnable doUpdateStatus = new Runnable() { public void run() { if (statusIndex==1) { statusText1.setText(s); } else if (statusIndex==2) { statusText2.setText(s); } else { statusText3.setText(s); } } }; SwingUtilities.invokeLater(doUpdateStatus); } // end updateStatus() COM: <s> updates the text for the specified status label </s>
funcom_train/25785968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONValue getValue() throws IOException { if (this.value == null) { if (this.jsonRepresentation != null) { this.value = JSONParser .parse(this.jsonRepresentation.getText()); } else { this.value = JSONNull.getInstance(); } } return this.value; } COM: <s> returns the wrapped json value </s>
funcom_train/17205145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Address allocateArray(RVMArray array, int numElements, boolean needsIdentityHash, int identityHashValue) { numObjects++; BootImageWriter.logAllocation(array, array.getInstanceSize(numElements)); return ObjectModel.allocateArray(this, array, numElements, needsIdentityHash, identityHashValue); } COM: <s> allocate an array object </s>
funcom_train/12304316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getMulti(String attribute) { NameOpValue nv = rslTree.getParam(attribute); if (nv == null || nv.getOperator() != NameOpValue.EQ) return null; List values = nv.getValues(); List list = new LinkedList(); Iterator iter = values.iterator(); Object obj; while( iter.hasNext() ) { obj = iter.next(); if (obj instanceof Value) { list.add( ((Value)obj).getCompleteValue() ); } } return list; } COM: <s> returns a list of strings for a specified attribute </s>
funcom_train/35682362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void check() throws HostProgramException { if (getName() == null || getName().length() == 0) { throw new HostProgramException("Program name must be specified."); } if (getDataLength() > getMaxDataLength()) { throw new HostProgramException("Data length cannot exceed length."); } } COM: <s> perform sanity check on attributes </s>
funcom_train/40536243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSubstring() { StringBuffer haystack = new StringBuffer("abcdefghi"); assertEquals("cd", haystack.substring(2, 4)); assertEquals("bc", "abcdef".substring(1, 3)); assertEquals("bcdef", "abcdef".substring(1)); } COM: <s> this method tests code ubstring code </s>
funcom_train/18358064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EVAExecution findExecutingEVAByName(String evaName) { Iterator evaIt = evas.values().iterator(); while (evaIt.hasNext() == true) { EVAExecution curEVA = (EVAExecution) evaIt.next(); if (curEVA.getPlan().getName().equals(evaName) == true) { return curEVA; } } // TODO: should throw exception return null; } COM: <s> returns the evaexecution for the given plan name </s>
funcom_train/26025079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean saveToSelectedFile(File file) { if (file.exists() && file.isFile()) { String message = "The selected file exists! Do you want to overwrite it?"; int result = JOptionPane.showConfirmDialog(null, message, "Selected file exists", JOptionPane.OK_CANCEL_OPTION); if (result == JOptionPane.CANCEL_OPTION) { return false; } } return true; } COM: <s> shows a gui to the user from which the user selects destination </s>
funcom_train/22588248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addTrigger(String emotionName,String triggerString) { // find emotion for (Emotion testEmotion : mPersonality) { if (testEmotion.getName().equalsIgnoreCase(emotionName)) { testEmotion.addTrigger(triggerString); return true; } } // didn't find emotion return false; } COM: <s> add trigger to an emotion </s>
funcom_train/29774700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPassword(final String password) { if (this.encryptorSet) { throw new EncryptionInitializationException( "An encryptor has been already set: no " + "further configuration possible on hibernate wrapper"); } final StandardPBEStringEncryptor standardPBEStringEncryptor = (StandardPBEStringEncryptor) this.encryptor; standardPBEStringEncryptor.setPassword(password); } COM: <s> sets the password to be used by the internal encryptor if a specific </s>
funcom_train/32875979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object otherObject) { boolean euqal = false; if (otherObject instanceof MechanismInfo) { MechanismInfo other = (MechanismInfo) otherObject; euqal = (this == other) || ((this.minKeySize_ == other.minKeySize_) && (this.maxKeySize_ == other.maxKeySize_) && (this.flags_ == other.flags_)); } return euqal ; } COM: <s> override equals to check for the equality of mechanism infos </s>
funcom_train/50961583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int rankOrder(Object key) { if (!containsKey(key)) return -1; int count=0; for (Iterator i=keyIterator(); i.hasNext(); ) { count++; if (i.next().equals(key)) return count; } Debug.dassert(false); //should never reach this line return -1; } COM: <s> returns the ordered position of this key in the map </s>
funcom_train/18513865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name) { int beg = 0; int end = 0; beg = name.lastIndexOf("("); end = name.lastIndexOf(")"); if (end > beg) this.units = name.substring(beg + 1, end); this.name = name; } COM: <s> sets name for this channel </s>
funcom_train/14597063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { synchronized (runLock) { if (!running) { return; } System.out.print("Stopping " + this + " . ."); stopScheduled = true; runLock.notify(); while (running) { try { runLock.wait(); } catch (InterruptedException e) { } } System.out.println("Done."); } } COM: <s> stops the monitoring thread </s>
funcom_train/27748179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawImage(Image image, int x, int y) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (image == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (image.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); drawImage(image, 0, 0, -1, -1, x, y, -1, -1, true); } COM: <s> draws the given image in the receiver at the specified </s>
funcom_train/38573662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExtensions(String str){ try{ str = removeSpaces(str); str = fixSeperator(str); String[] customExt = str.split("\\;"); if(customExt.length != 0){ extensions = removeEmptyItems(customExt); return; } else{ extensions = null; return; } } catch(Exception e){ extensions = null; } } COM: <s> sets the file extensions to a given string </s>
funcom_train/41761596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAnswer(String answer) { if(!isViewActive()) { this.answer = answer; } else { this.answer = answer; // TODO: Fix this so that the adapter has the correct selected item. int index = choicelist.indexOf(answer); spin.setSelection(index); spin.refreshDrawableState(); } } COM: <s> set the spinner drop box selected answer to match param answer param </s>
funcom_train/6475316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printTable() { Set<String> keys = map.keySet(); Iterator<String> iterator = keys.iterator(); System.out.println("Team" + "\t" + "\t" + "Score"); while (iterator.hasNext()) { String team = iterator.next(); int score = map.get(team); if (team.length() < 6) { System.out.println(team + "\t" + "\t" + score); } else { System.out.println(team + "\t" + score); } } } COM: <s> print of table with results </s>
funcom_train/27768451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finishDocument() throws ObjectFormatException{ for(int i=0, len=nestingLevels.size(); i<len; i++){ _closeLastElement(); } try{ out.flush(); } catch(IOException ex){ throw new ObjectFormatException(ex); } } COM: <s> close all open elements and write them to the sink </s>
funcom_train/44448323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attachData(LPCData lpc) { if (lpc == null) { signal = null; repaint(); return; } signal = lpc; xMax = signal.getLength() - 1; xMin = 0; energy = new int[xMax + 1]; // compute energy for each frame and store value in data[] for (int i = 0; i <= xMax; i++) { energy[i] = (int) computeEnergy(signal.data[i]); } } COM: <s> accept lpc coded signal compute energy for each frame and store the </s>
funcom_train/31435544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void allLightsOff(){ AutoHomeAdminSession.getInstance().printMessage("All lights off in section " + module.getHouseCode()); try { AutoHomeAdminSession.getInstance().sendCommandToSection(module.getHouseCode(), 0); } catch(HomeException err) { AutoHomeAdminSession.getInstance().printMessage("Failed Transmission because " + err); } } COM: <s> this takes the selected module and for all of the lights in that </s>
funcom_train/43101626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isStereotype(Object handle, String stereotypename) { if (handle instanceof MModelElement) { MModelElement element = (MModelElement) handle; MStereotype meSt = element.getStereotype(); if (meSt == null) { return false; } String name = meSt.getName(); if (name == null) { return false; } return name.equalsIgnoreCase(stereotypename); } // ... return illegalArgumentBoolean(handle); } COM: <s> recognizer for model elements with a given stereotype </s>
funcom_train/3928213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCount( String s ) { Enumeration e = warningTable.keys(); while ( e.hasMoreElements() ) { String test = (String)e.nextElement(); if ( test.indexOf( s ) >= 0 ) { ReturnInteger ri = (ReturnInteger)warningTable.get( test ); return( ri.getValue() ); } } return( 0 ); } COM: <s> get the count associated with a particular string </s>
funcom_train/3294203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getValue(String str) { StringTokenizer tok = new StringTokenizer(str,"="); if (tok.hasMoreTokens()) { Object dummy = tok.nextElement(); if (tok.hasMoreTokens()) { return (String) tok.nextElement(); } } // no value found return null; } COM: <s> returns the part after the char of the string </s>
funcom_train/7673871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addInterfence(int newReg, int oldReg) { newRegInterference.ensureCapacity(newReg + 1); while (newReg >= newRegInterference.size()) { newRegInterference.add(new BitIntSet(newReg +1)); } oldRegInterference.mergeInterferenceSet( oldReg, newRegInterference.get(newReg)); } COM: <s> adds a registers interference set to the interference list </s>
funcom_train/18938024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Token readStringToken( String firstPart, CharReader reader ) throws IOException { StringBuffer buffer = new StringBuffer(); buffer.append( firstPart ); char next = reader.readChar(); while ( !isEndOfWord( next, reader ) && next != CharReader.EOF_CHAR ) { buffer.append( next ); next = reader.readChar(); } String tokenSymbol = buffer.toString(); Token theToken = getToken( tokenSymbol, reader ); return this.checkOtherTypes( theToken ); } COM: <s> check if the character passed as paramether is part of a string </s>
funcom_train/35074101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createCustomerShippingAddress() { BasicXmlDocument document = new BasicXmlDocument(); document.parseString("<" + TransactionType.CREATE_CUSTOMER_SHIPPING_ADDRESS.getValue() + " xmlns = \"" + XML_NAMESPACE + "\" />"); addAuthentication(document); addRefId(document); addCustomerProfileId(document); addAddress(document, AuthNetField.ELEMENT_ADDRESS.getFieldName(), this.customerProfile.getShipToAddress(), document.getDocumentElement()); currentRequest = document; } COM: <s> create customer shipping address request </s>
funcom_train/8600212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected static boolean hasRole(String[] roles, String requiredRole) { if (Boolean.valueOf(requiredRole).booleanValue()) { return true; } if (FALSE.equals(requiredRole)) { return false; } for (int i = 0; i < roles.length; i++) { if (roles[i].equals(requiredRole)) { return true; } } return false; } COM: <s> checks if the principal has the required role </s>
funcom_train/1805291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleWorksheetSelection() { int selected = worksheetListBox.getSelectedIndex(); if (worksheetEntries != null && selected >= 0) { WorksheetEntry entry = worksheetEntries.get(selected); cellsFeedUrlField.setText(entry.getCellFeedUrl().toExternalForm()); listFeedUrlField.setText(entry.getListFeedUrl().toExternalForm()); } } COM: <s> shows the feed urls as you select worksheets within a spreadsheets </s>
funcom_train/9805979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getPreviousValue(Object o) { Object previous = null; if (!contains(o)) return null; for (Iterator i = iterator(); i.hasNext();) { Object n = i.next(); if (n == o) { return previous; } previous = n; } return null; } COM: <s> this method will return the previous value object in the ordered list </s>
funcom_train/16786100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintRectangle(int centerX, int centerY, int radius, int color_r, int color_g, int color_b) { setColor(color_r, color_g, color_b); g2.fillRect(center(centerX, radius), center(centerY, radius), radius, radius); } COM: <s> paints a rectangle to the image only in memory </s>
funcom_train/39909829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { LoginServiceAsync loginService = GWT.create(LoginService.class); loginService.login(GWT.getHostPageBaseURL(), new AsyncCallback<LoginInfo>() { public void onFailure(Throwable error) { handleError(error); } public void onSuccess(LoginInfo result) { loginInfo = result; if (loginInfo.isLoggedIn()) { loadNotes(); } else { loadLogin(); } } }); } COM: <s> this is the entry point method </s>
funcom_train/13198876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getRandomPhone() { char d1 = getRandomDigit(); char d2 = getRandomDigit(); char d3 = getRandomDigit(); char d4 = getRandomDigit(); char d5 = getRandomDigit(); char d6 = getRandomDigit(); char d7 = getRandomDigit(); char d8 = getRandomDigit(); char d9 = getRandomDigit(); char d10 = getRandomDigit(); return "(" + d1 + d2 + d3 + ") " + d4 + d5 + d6 + '-' + d7 + d8 + d9 + d10; } // getRandomPhone COM: <s> gets a random mock phone number </s>
funcom_train/47197411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMessageTypeToChannel(String channelVar, String messageType) { for (int i = 0; i < gChanDecls.size(); i++) { One_decl chanDec = gChanDecls.get(i); if (chanDec.containVarName(channelVar)) { chanDec.addMessageTypetoChannel(channelVar, messageType); } } } COM: <s> add a message type into a channel </s>
funcom_train/51341542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void beforeExecute(final Thread t, final Runnable r) { // Note: [r] is the FutureTask. lock.lock(); try { while (isPaused()) { unpaused.await(); } } catch (InterruptedException ie) { t.interrupt(); } finally { lock.unlock(); } super.beforeExecute(t, r); } COM: <s> if task execution has been </s>
funcom_train/48152158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStates(int[][] s){ states = s; fire.removeAllElements(); burnt.removeAllElements(); Point p; for (int i = 0; i < columns; i++) for (int j = 0; j < rows; j++){ if (states[i][j] == ON_FIRE) fire.addElement(new Point(i, j)); else if (states[i][j] == BURNT) fire.addElement(new Point(i, j)); } } COM: <s> this method sets all of the states of the trees </s>
funcom_train/5379348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void internalVirtualRefreshAll() { Object root = getRoot(); IContentProvider contentProvider = getContentProvider(); //Invalidate for lazy if(!(contentProvider instanceof ILazyContentProvider) && (contentProvider instanceof IStructuredContentProvider)) { //Don't cache if the root is null but cache if it is not lazy. if(root != null) virtualManager.cachedElements = ((IStructuredContentProvider) getContentProvider()).getElements(root); } getTable().clearAll(); } COM: <s> refresh all with virtual elements </s>
funcom_train/37017857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getStart(){ String key= null; if(!theListToDisplay.isEmpty()){ FrameInCourse frameInCourse= ((DisplayMetaFrame)theListToDisplay.firstElement()).getFrameInCourse(); //NK_C FrameInCourse instead of MetaFrame key= frameInCourse.getFrameNameInCourse(); //NK_C metaFrame.getKeyName(); } return key; } COM: <s> get the first frame </s>
funcom_train/23950318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isConvex() { /* check if there's no right turns in counter-clockwise traversal * of the polygon vertices */ int n = vertices.size(); for (int i = 0; i < n; i++) { if (!Utils.isNonRightTurn(getPreviousVertex(i), getVertex(i), getNextVertex(i))) { return false; } } return true; } COM: <s> check if the polygon is convex or not </s>
funcom_train/25058060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void validateChildActionDef(ActionDef actionDef) { if (actionDef == null) { throw new IllegalArgumentException("Child action def cannot be null"); } if (!actionDef.isOperation() && !actionDef.isSequence()) { throw new IllegalArgumentException("Process can only contain operations and other sequences"); } } COM: <s> used by def loader </s>
funcom_train/45650101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName(URI uri) { assert uri != null; String result = uri.getPath(); int indexOfLastSlash = result.lastIndexOf('/'); if (indexOfLastSlash >= 0) { result = result.substring(indexOfLastSlash + 1); } return result; } COM: <s> the file name part of code url code </s>
funcom_train/9415142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(PrivateKey key) { try { if (signature != null) { signature.initSign(key); } else if (cipher != null) { cipher.init(Cipher.ENCRYPT_MODE, key); } } catch (InvalidKeyException e){ throw new AlertException(AlertProtocol.BAD_CERTIFICATE, new SSLException("init - invalid private key", e)); } } COM: <s> initiate signature type by private key </s>
funcom_train/41827046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean upload(ArrayList<File> list) throws IOException { SimpleFTP.uploadSecure("update1.jdownloader.org", 2121, getCFG("update1_ftp_user"), getCFG("update1_ftp_pass"), "/http/" + this.branch, updateDir, list.toArray(new File[] {})); return true; } COM: <s> uploads this filelist </s>
funcom_train/37764858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeaderParams(HeaderParam[] headerParams) { if (headerParams != null) { this.headerParams = new LinkedHashMap<String, HeaderParam>(); for (HeaderParam p : headerParams) this.headerParams.put(p.getName(), p); } else this.headerParams = null; } COM: <s> sets the header params property </s>
funcom_train/19806837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getHttpStatus() { if (status != Status.DONE) throw new IllegalStateException(); // In HTTP 1.1, the return code is in ASCII bytes 10-12. return (data[9] - '0') * 100 + (data[10] - '0') * 10 + (data[11] - '0') * 1; } COM: <s> return the http status code for the download </s>
funcom_train/1578451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invoke(final Constructor constructor) { Class[] paramClasses = constructor.getParameterTypes(); TypeDescriptor[] params = new TypeDescriptor[paramClasses.length]; for ( int i = 0; i < params.length; i++ ) { params[i] = new TypeDescriptor(paramClasses[i]); } invokeConstructor(constructor.getDeclaringClass().toString(), params); } COM: <s> generates code to invoke a class constructor in any class </s>
funcom_train/2558517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void skip() throws Exception { if (data.length > 1) { if (data[off + 1] != '/') { throw new PathException("Path '%s' in %s has an illegal syntax", path, type); } off++; } start = ++off; } COM: <s> this is used to skip any root prefix for the path </s>
funcom_train/2758464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putThought(Appearance appearance) { if (!thoughts.containsKey(appearance)) { thoughts.put(appearance, new Integer(1)); } else { if ( !(thoughts.get(appearance) instanceof Integer) ) { throw new RuntimeException(); } Integer oldSize = ((Integer) thoughts.get(appearance)); Integer newSize = new Integer( oldSize.intValue() + 1 ); thoughts.put(appearance, newSize); } } COM: <s> an appearance becomes a thought once inside man </s>
funcom_train/21244175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasEmailInfo() { if ( getDefinition().getEmailSender() != null && getDefinition().getEmailSender().length() != 0 && getDefinition().getEmailHost() != null && getDefinition().getEmailHost().length() != 0 ) { return true; } else { return false; } } COM: <s> simple health check method that ensures fundamental email </s>
funcom_train/38306363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String format(DataRow row) { StringBuffer o = new StringBuffer(); Iterator i = row.iterator(); while (i.hasNext()) { if (o.length() > 0) { o.append(TAB); } o.append((String)i.next()); } return o.toString(); } // format(DataRow) COM: <s> converts data row instance into a tab separated list of data </s>
funcom_train/573816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArchiveNameWindow() { String databaseName = JOptionPane.showInputDialog( Language.get("JarTask@databaseName") ); if ( databaseName == null ){ databaseName = "Demo Database"; } else if( databaseName.trim().length() == 0 ){ databaseName = "Demo Database"; } p.setProperty( "DATA0", databaseName ); } COM: <s> set archive name property asking it to the user </s>
funcom_train/51165026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopAllSounds() { synchronized (soundClips) { Set soundfoo = soundClips.entrySet(); Iterator i = soundfoo.iterator(); while (i.hasNext()) { Map.Entry entry = (Map.Entry) i.next(); Clip clip = (Clip) entry.getValue(); if (clip.isActive()) { //Debug.trace("stopping \"" + entry.getKey() + "\"/0x" + Integer.toHexString(System.identityHashCode(clip))); clip.stop(); } } } } COM: <s> stops all currently playing sound clips </s>
funcom_train/37612399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsKey(Object key) { if (key == null) throw new NullPointerException(); int hash = spreadHash(keyEquivalence.hash(key)); Segment seg = getSegmentForTraversal(hash); Node r = findNode(key, hash, seg); return r != null && r.getValue() != null; } COM: <s> returns tt true tt if this map contains a key equivalent to </s>
funcom_train/2731602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String visit(FunctionTerm function) { StringBuffer s = new StringBuffer(); if(showAsmName) s.append(Defs.getAsmName(function.getFunction()) + "::"); s.append(function.getFunction().getName()); s.append(visit(function.getArguments())); return s.toString(); } COM: <s> converts a function term into string </s>
funcom_train/40931528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getVehiculoNoReparadoCommand() { if (vehiculoNoReparadoCommand == null) {//GEN-END:|361-getter|0|361-preInit // write pre-init user code here vehiculoNoReparadoCommand = new Command("No", Command.CANCEL, 0);//GEN-LINE:|361-getter|1|361-postInit // write post-init user code here }//GEN-BEGIN:|361-getter|2| return vehiculoNoReparadoCommand; } COM: <s> returns an initiliazed instance of vehiculo no reparado command component </s>
funcom_train/3902703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRequiredForNotSatisfiedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RollupConsiderationsType_requiredForNotSatisfied_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RollupConsiderationsType_requiredForNotSatisfied_feature", "_UI_RollupConsiderationsType_type"), AdlseqV1p3Package.Literals.ROLLUP_CONSIDERATIONS_TYPE__REQUIRED_FOR_NOT_SATISFIED, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the required for not satisfied feature </s>
funcom_train/51128892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int calculatePriceForSeatsIncrease(int seats, int parComfort) { int costBase = GameController.getInstance().getScenario().getScenarioSettings().INFRASTRUCTURE_ARENA_COST_PER_SEAT_INCREASE; int costComfort = calculatePriceForComfortIncrease(seats, parComfort); return ((seats * costBase) + costComfort); } COM: <s> calculate price for seats increase </s>
funcom_train/46729796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(ApplicationDialogReference dialog, List<IBaseModel> availableList) throws Exception { startDialog(dialog, getFrameOrDialog(), false); // load the collection lists getDefaultBaseModel().getSearchResults().clear(); for (IBaseModel m : availableList) { getDefaultBaseModel().getSearchResults().add(m); } refreshAllTablesExcept(ContextReference.ACCESSLISTCONTROL); enableOkApplyCancelOnChange(); setDisableOkUntilChanges(true); displayDialog(); } COM: <s> start the laboratory application </s>
funcom_train/217295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDependency(SimpleTask parent, SimpleTask child) { try { this.graph.addDependency(parent, child); } catch(Exception e) { throw new SimpleTaskException("Could not add dependency from task " + parent.getName() + " to task " + child.getName() + "."); } } COM: <s> add a dependency between two nodes </s>
funcom_train/23378275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restart(int fixedBetSize) { // set bet size this.fixedBetSize = fixedBetSize; // reset result and pot size this.showdownResult = null; this.potSize = 0; // reset cards this.dealersCards.clear(); this.flopCards.clear(); this.playersCards.clear(); this.riverCard = null; this.turnCard = null; // shuffle deck this.deck.shuffle(); // set new state this.currentState = new PreHoleCardsState(this); } COM: <s> restarts the game with a new specified code fixed bet size code </s>
funcom_train/18046929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String label() { ResourceBundle rb = rbReference.get(); if ( rb == null ) { rb = ResourceBundle.getBundle("org.blackdog.rc.i18n.RepeatMode"); this.rbReference = new SoftReference<ResourceBundle>(rb); } return rb.getString(this.code); } COM: <s> return the label </s>
funcom_train/46754204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addInstructionText(final IControlInteraction control) { if (control.getInstructionText() != null) { instructionText = control.getInstructionText(); repaint(); // clear when typing com.patientis.framework.concurrency.SwingWorker sw = new com.patientis.framework.concurrency.SwingWorker(null) { @Override protected void doNonUILogic() throws Exception { Thread.sleep(2000); clearInstructionText(); } @Override protected void doUIUpdateLogic() throws Exception {} }; sw.start(); } } COM: <s> add instruction text to this control </s>
funcom_train/9577022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getAvailableDataFields() { // a temperary array list to store the data ArrayList<String> strList = new ArrayList<String>(); Iterator<Gene> x = this.iterator(); while (x.hasNext()) { Gene g = x.next(); ArrayList lst = g.getAvailableRecords(); for (int y = 0; y < lst.size(); y++) { if (!strList.contains(lst.get(y))) { strList.add((String)lst.get(y)); } } } return strList; } COM: <s> get the currently available fields for the genome </s>
funcom_train/23385314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printIcon(PrintWriter out,String icon,String text,String url,String confirmtext){ if(url!=null){ //remap url to a javascript if(confirmtext!=null){ url="javascript:if(confirm('"+confirmtext+"'))location.href='"+url+"';"; } out.println("<a href=\""+url+"\">"); } out.println("<img src=\"icon/"+icon+"\" border=0 alt=\""+text+"\" title=\""+text+"\" />"); if(url!=null) out.println("</a>"); } COM: <s> prints a icon and optionally links it to a url </s>
funcom_train/41768163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeMedia() { Media media; try { media = listpanel.getSelectedMedia(); } catch (IndexOutOfBoundsException e) { return; } int i = JOptionPane.showConfirmDialog(frame, "Remove \"" + media.getTitle() + "\"?", "Remove from collection", JOptionPane.OK_OPTION); if (i == 0) controller.removeMedia(media); } COM: <s> removes the selected media </s>