__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/41165612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoSequenceType entity) { EntityManagerHelper.log("deleting CoSequenceType instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoSequenceType.class, entity.getSequenceTypeId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co sequence type entity </s>
funcom_train/50503771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReference(ResourceEnvRef ref) { this.ref = ref; if(ref != null) { nameField.setText(ref.getName()); classField.setText(ref.getType()); } else { nameField.setText("untitledReference"); classField.setText(""); } } COM: <s> sets the reference attribute of the resource env panel object </s>
funcom_train/41821585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void step(Instruction instruction) { // Advance Lock Register lockReg.step(); // Advance Program Counter if instruction is not branch if (!instruction.isBranch()) { spr.incrementPc(); //int pc = spr.read(SpecialRegister.rpc); //spr.write(SpecialRegister.rpc, pc + 4); } // Update latency latency += instruction.latency(); } COM: <s> advances a step in the processor state </s>
funcom_train/12174257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBorderHorizontalSpacing(Element element, String attribute) { StyleValue pair = styles.getStyleValue( StylePropertyDetails.BORDER_SPACING); if (pair != null && pair instanceof StylePair) { StyleValue value = ((StylePair) pair).getFirst(); addPixelLength(element, attribute, value); } } COM: <s> get the value of the border horizontal spacing property </s>
funcom_train/45628249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void editorActivated(IEditorPart editor) { IFile file = ResourceUtil.getFile(editor.getEditorInput()); if (file != null) { ISelection newSelection = new StructuredSelection(file); if (getTreeViewer().getSelection().equals(newSelection)) { getTreeViewer().getTree().showSelection(); } else { getTreeViewer().setSelection(newSelection, true); } } } COM: <s> an editor has been activated </s>
funcom_train/36489693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActionOnSetPromotion(UCController uc) { ActionListener[] l = jbSetPromo.getActionListeners(); if (l.length > MIN_LISTENERS) { jbSetPromo.removeActionListener(l[MIN_LISTENERS]); } jbSetPromo.addActionListener(new UCCToALAdapter(uc)); } COM: <s> sets a use case to the set promotions button </s>
funcom_train/23020385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readResponseBody(HttpState state, HttpConnection conn) throws IOException, HttpException { LOG.trace("enter HttpMethodBase.readResponseBody(HttpState, HttpConnection)"); // assume we are not done with the connection if we get a stream InputStream stream = readResponseBody(conn); if (stream == null) { // done using the connection! responseBodyConsumed(); } else { conn.setLastResponseInputStream(stream); setResponseStream(stream); } } COM: <s> read the response body from the given </s>
funcom_train/18884472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cut(double v) { clipper.SetValue(v); cutEdges.SetValue(0, v); cutStrips.Update(); cutPoly.SetPoints(cutStrips.GetOutput().GetPoints()); cutPoly.SetPolys(cutStrips.GetOutput().GetLines()); cutMapper.Update(); renWin.Render(); } COM: <s> lets you move the cut plane back and forth by invoking the function </s>
funcom_train/27906480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Header getEntriesForKey(String s) { if (s == null) { throw new IllegalArgumentException("Key can't be null."); } HeaderEntry he; Header h = new Header(); Iterator iter = iterator(); while (iter.hasNext()) { he = (HeaderEntry) iter.next(); if (s.equalsIgnoreCase(he.getKey())) { h.add(he); } } return (h); } COM: <s> returns a header consisting of all header entries having given key </s>
funcom_train/4973170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToggleInstrument() { ToggleInstrument instrument = new ToggleInstrument(); int retcode= ToggleEditor.makeDialog((JFrame)BoogiepantsDisplayWindow.getInstance(), instrument); if(retcode==ToggleEditor.SUCCESS){ instrumentContainer.add(instrumentContainer.getLastPushed(), instrument); instrumentContainer.displayNew(); } } COM: <s> adds a new toggle instrument to the current instrument group </s>
funcom_train/39101366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteItem(T child) { if (child == null) { return false; } if (highlightedItem >= 0 && getHighlightedItem() == child) { setHighlightedItem(-1); } if (removeItem(child)) { if (deleted == null) { deleted = new DataModelVector<T>(); } deleted.append(child); return true; } return false; } COM: <s> remove item and put it to the deleted list </s>
funcom_train/37830949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getOtherPlayerStandingOnItem(final Entity player) { if (item == null) { return null; } final List<Player> players = player.getZone().getPlayers(); for (final Player otherPlayer : players) { if (player.equals(otherPlayer)) { continue; } if (otherPlayer.getArea().intersects(item.getArea())) { return otherPlayer.getName(); } } return null; } COM: <s> checks whether the item is below b another b player </s>
funcom_train/4410898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void projectOpened() { JFrame jFrame = WindowManager.getInstance().getFrame(project); ScriptEditor scriptEditor=new GroovyScriptEditor(project); ScriptEditor responseViewer=new ResponseViewerScriptEditor(project); restMain = new RESTMain(jFrame,scriptEditor,responseViewer); registerRestClientToolWindow(project); } COM: <s> fired when project opened </s>
funcom_train/16849363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Double getDoubleResult(String queryName) { double doubleValue = -1; PreparedStatement stmt = null; ResultSet rs = null; try { stmt = DB.prepare(queryName); rs = stmt.executeQuery(); if (rs.next()) { doubleValue = rs.getDouble(1); } return new Double(doubleValue); } catch (SQLException e) { throw new SeismoException(e); } finally { DB.cleanUp(stmt, rs); } } COM: <s> executes a sql query whose result is a double number </s>
funcom_train/28507286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset(){ currentTime=0.F; countOfParticlesToAddThisFrame=0; timeSinceLastParticleEmission=0.F; currentEmissionRate=-1.F; currentEmissionDuration=-1.F; currentDelayBetweenRepeats=0.F; currentRepeatCount=0; updateTotalRepeatCount(); updateCurrentEmissionRate(); updateCurrentEmissionDuration(); } COM: <s> resets the dynamic values of this emitter </s>
funcom_train/45228637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector createElementTT(Transactiontypes rt) { Vector t = new Vector(); t.addElement(rt.getName()); t.addElement(rt.getDescription()); t.addElement(rt.getDebitcredit()); t.addElement(rt.getEffectsbalance()); t.addElement(rt.getEffectsstartingbalance()); t.addElement(rt.getDefaultoption()); t.addElement(rt.getForcamperships()); t.addElement(rt.getForunit()); return t; } COM: <s> creates the element tt </s>
funcom_train/7403228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFindRangeBounds1() { CategoryDataset dataset = createCategoryDataset1(); Range r = DatasetUtilities.findRangeBounds(dataset); assertEquals(1.0, r.getLowerBound(), EPSILON); assertEquals(6.0, r.getUpperBound(), EPSILON); } COM: <s> some tests for the find range extent method </s>
funcom_train/32831356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMethodOrClassLevelAnnotationProperty_superClassLevel() throws Exception { String level = getMethodOrClassLevelAnnotationProperty(TestAnnotation.class, "level", "", TestSubClass.class.getDeclaredMethod("unAnnotatedSubMethod"), TestSubClass.class); assertEquals("class", level); } COM: <s> tests getting a super class level annotation property </s>
funcom_train/48497788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTestToTestSet (int test, String testset) { TestDAO dao = new TestDAO (); // First get the testset TestSetDTO testSet = dao.selectTestSet(testset); // Then get the test TestScriptDTO testscript = dao.selectTest(test); if (testSet != null && testscript != null) { testscript.setTestset(testSet.getTestset_id()); dao.updateTest(testscript); } } COM: <s> add a test to a testset </s>
funcom_train/11949107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeDB() throws SQLException { Statement s = this.connection.createStatement(); try { s .execute("CREATE TABLE Books (id BIGINT NOT NULL IDENTITY, title VARCHAR(255), authors VARCHAR(255))"); } catch (SQLException e) { System.out.println(e.toString()); } finally { s.close(); } } COM: <s> this method assumes that the database is completely blank </s>
funcom_train/32905778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); sb.append("\""); sb.append(nameSpace); sb.append(":"); sb.append(name); sb.append("\" \""); sb.append(mimeType); sb.append("\" dlen="); sb.append(Integer.toString(data.length)); return sb.toString(); } COM: <s> return a string representation of the element </s>
funcom_train/3362695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getCorner(String key) { if (key.equals(LOWER_LEFT_CORNER)) { return lowerLeft; } else if (key.equals(LOWER_RIGHT_CORNER)) { return lowerRight; } else if (key.equals(UPPER_LEFT_CORNER)) { return upperLeft; } else if (key.equals(UPPER_RIGHT_CORNER)) { return upperRight; } else { return null; } } COM: <s> returns the code component code at the specified corner </s>
funcom_train/43100623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLink(Object handle, Object link) { if (handle instanceof MAssociation && link instanceof MLink) { ((MAssociation) handle).addLink((MLink) link); return; } throw new IllegalArgumentException("handle: " + handle + " or link: " + link); } COM: <s> add the given link to the given link or association </s>
funcom_train/10597073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recycle() { super.recycle(); this.encoding = DEFAULT_ENCODING; this.separator = DEFAULT_SEPARATOR.charAt(0); this.escape = DEFAULT_ESCAPE.charAt(0); this.buffersize = DEFAULT_BUFFER_SIZE; this.buffer = null; this.columns = null; this.recordnumber = 1; this.fieldnumber = 1; this.openrecord = false; } COM: <s> p recycle this component </s>
funcom_train/31937248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readCategory(IConfigurationElement element) { try { Category category = new Category(element); viewRegistry.add(category); } catch (CoreException e) { // log an error since its not safe to show a dialog here WorkbenchPlugin.log("Unable to create view category.", e.getStatus());//$NON-NLS-1$ } } COM: <s> reads the category element </s>
funcom_train/20678791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object remove(Object key) { Element element = (Element) node; String nameToRemove = (String) key; NodeList childElements = element.getChildNodes(); for (int i = 0; i < childElements.getLength(); i++) { Node node = childElements.item(i); if (node instanceof Element) { if (satisfyElementName(node.getNodeName(), nameToRemove)) { element.removeChild(node); } } } return super.remove(key); } COM: <s> removes all children elements with specified name </s>
funcom_train/26165045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassProxy ( Class target, Class[] known ) { this.target = target; // determine any direct subclasses in specified list Vector v = new Vector(); for ( int i = 0; i < known.length; i++ ) if ( target.equals( known[ i ].getSuperclass() ) ) v.addElement( known[ i ] ); subclasses = new Class[v.size()]; v.copyInto( subclasses ); } COM: <s> construct a class proxy instance </s>
funcom_train/31406212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties getValues() { Properties p = new Properties(); for (Iterator it = _fields.iterator(); it.hasNext(); ) { InputRow row = (InputRow) it.next(); if (!row.validate()) { return null; } p.setProperty(row.getName(), String.valueOf(row.getValue())); } return p; } COM: <s> return the values set in this table with basic validation </s>
funcom_train/14055977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRootNode(NodeImpl node) { // Method expected to be called in the GUI thread. if(!(node instanceof HTMLElementImpl)) { throw new IllegalArgumentException("node=" + node); } HTMLElementImpl element = (HTMLElementImpl) node; this.rootNode = element; HtmlRendererContext context = element.getHtmlRendererContext(); this.htmlContext = context; this.domInvalid = true; this.invalidate(); this.validateAll(); this.repaint(); } COM: <s> sets the frameset node and invalidates the component </s>
funcom_train/22579443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setCommunity(KnownDevice dev) { String sqlString = null; sqlString = new String ("UPDATE "+D_TBL_NAME + " SET community='"+dev.getCommunity()+"'" + " WHERE deviceID="+dev.getDeviceID()); System.out.println("\nDbKnownDevice.setCommunity:\n sqlString = "+sqlString); return executeUpdate(sqlString); } COM: <s> update the device table record with a new community string </s>
funcom_train/16969720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean processStart(final char[] buf, int idx) { char ch; for ( int j = idx+1; j < buf.length; j++ ) { ch = buf[j]; if ( rightMarks.contains(ch) ) { return(true); } else if ( (ch != ':') && sentence_ends.contains(ch) ) { return(false); } } return(false); } COM: <s> checks if a right punctuation mark exists between </s>
funcom_train/3475128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Recordable get (int i) throws RecordException { if (! isOpen ()) { throw new RecordException(language.getString ("Record.Error.GetNotOpen")); } try { return vector.get (i); } catch (ArrayIndexOutOfBoundsException e) { throw new RecordException(language.getString ("Record.Error.InvalidIndex")); } } COM: <s> returns the record element at position code i code </s>
funcom_train/4533583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleHold(InterlocutorUI iui, boolean mic, boolean cam) { try { sipManager.hold(iui.getID(), mediaManager.generateHoldSdpDescription(mic, mic, iui.getCall()), mic, cam); } catch (Exception e) { Log.error("handleHold", e); } } COM: <s> handle a hold request </s>
funcom_train/26225372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void broadcast(Data data) { Iterator iterator = _connectionMap.getConnectionIdList().iterator(); while ( iterator.hasNext() ) { try { send((String)iterator.next(), data); } catch ( ConnectionNotFoundException ex ) { // This shouldn't happen ex.printStackTrace(); } } } COM: <s> broadcast data to all connections </s>
funcom_train/21042159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(String name, Schema attribute) { String ciName = name.toLowerCase(); // /////////////////////////////////////// // //////////////////////////////////////// attributes.put(ciName, attribute); } COM: <s> adds an attribute to the schema </s>
funcom_train/40944912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface PropertySetChangeNotifier { /** * Registers a new property set change listener for this Item. * * @param listener * The new Listener to be registered. */ public void addListener(Item.PropertySetChangeListener listener); /** * Removes a previously registered property set change listener. * * @param listener * Listener to be removed. */ public void removeListener(Item.PropertySetChangeListener listener); } COM: <s> the interface for adding and removing code property set change event code </s>
funcom_train/17852335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String encodeString(String string) throws UnsupportedEncodingException { return URLEncoder.encode(string.trim(), StringUtils.replace(mFormatting.getEncodingValue()/*.getProperty("encoding", "UTF-8"))*/, "+", "%20")); } COM: <s> encodes a string into an url encoded string </s>
funcom_train/19620884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAmbusher() { //When a new ghost is created, the default position is set to the prison which is also the STARTINGPOINT assertNotNull("When a new Ambusher is created it should no longer be null", m.getAmbusher() == null); //when a new ghost is created the name is set assertEquals("Ambushers name Pinky", ghost.getName(), "Pinky"); } COM: <s> checks that the constructor method actually created the new ambusher </s>
funcom_train/37009200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateQuery(org.voms.serverapi.Query query, boolean replace) throws RDFStorageException { logger.log(Log.MESSAGE, "Updating query: " + query.getURI()); updateQuery(query, replace, true); logger.log(Log.MESSAGE, "Updated query: " + query.getURI()); } COM: <s> udela novy dotaz a puvodni nahradi </s>
funcom_train/40535406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testServletMapping1() { String url = "test"; makeAsyncCall(GWT.getModuleBaseURL() + "test", new AsyncCallback() { public void onFailure(Throwable caught) { fail(caught.toString()); } public void onSuccess(Object result) { finishTest(); assertEquals(new Integer(1), result); } }); } COM: <s> should call the implementation that returns 1 </s>
funcom_train/44713048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getMoreResults() throws SQLException { try { if (m_closeAfterUse) { throw new IllegalStateException("Unable to get more results from " + "statement when in close after use mode"); } return m_stmt.getMoreResults(); } catch (SQLException e) { throw m_conn.wrap(e); } } COM: <s> moves to a statement objects next result </s>
funcom_train/43475403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean process() { Iterator it = iterator(); Node aNode = null; //informs that any node requires continue the stabilization process. boolean toContinue = false; //Each node process incoming messages and handles additional //stabilization operations while (it.hasNext()){ aNode = (Node)it.next(); // always process the node toContinue = toContinue | aNode.process(this.totalSteps); if (!aNode.isAlive()) { //the node has failed or leaved?? toRemove.add(aNode.getLocalHandle()); } } return toContinue; } COM: <s> process all nodes one step at this network </s>
funcom_train/34502046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isExportSourcecodeEnabled() { if (m_configuration != null && m_configuration.get(PARAM_EXPORTSOURCE) != null) { boolean isExportSourcecodeEnabled = Boolean.parseBoolean( (String)m_configuration.get(PARAM_EXPORTSOURCE)); return isExportSourcecodeEnabled; } // Return false on default return false; } COM: <s> tests if the sourcecode should be exported </s>
funcom_train/14311247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initCanvas() { items.removeAllElements(); itemSelected = -1; scanItem = -1; final String deviceName = LocalPeer.getFriendlyName(); appendItem(this.serverLabel, ConnectorCanvasItem.LABEL); appendItem(deviceName + " [" + LocalPeer.getMaxConnections() + "]", //$NON-NLS-1$ //$NON-NLS-2$ ConnectorCanvasItem.SELECTABLE); appendItem(clientLabel, ConnectorCanvasItem.LABEL); appendItem(I18n.getMessage("SCANNING"), ConnectorCanvasItem.SCAN); //$NON-NLS-1$ } COM: <s> initializes connector canvas </s>
funcom_train/41721914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumberOfRelations() { int result = 0; Iterator<String> attNameIterator; for (attNameIterator = relations.keySet().iterator(); attNameIterator.hasNext();) { String attributeName = attNameIterator.next(); Set<RelationEnd> attributeRelations = relations.get(attributeName); result += attributeRelations.size(); } return result; } COM: <s> returns the number of relations of this shape </s>
funcom_train/37461509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDatabase( String database ) { if ( database == null ) { throw new IllegalArgumentException( "An Xref must have a non null database." ); } if ( database.trim().length() == 0 ) { throw new IllegalArgumentException( "An Xref must have a non empty database." ); } this.database = database; } COM: <s> sets database of the cross reference </s>
funcom_train/3276694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDurationToString() { LOG.info(StringUtil.durationToString(5432)); LOG.info(StringUtil.durationToString(5432234)); LOG.info(StringUtil.durationToString(543253556)); LOG.info(StringUtil.durationToString(543267678)); LOG.info(StringUtil.durationToString(5432335689052434L)); LOG.info(StringUtil.durationToString(2356543233568952434L)); } COM: <s> method test duration to string </s>
funcom_train/3794884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireWanIpSearchEvent(WanIpSearchEvent e) { String ip = e._ip; if (ip == null || ip.equals("")) { __log.debug("WanIP is null of \"\""); return; } else { _ap.processWanIP(ip); } } COM: <s> fire wan ip search event </s>
funcom_train/32869498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openDiskAndShowContent(ArgumentHandler argHandler) { String file = argHandler.getFile(); String katalog = argHandler.getKatalog(); Disk disk = reader.findDiskByName(file, katalog); if(disk == null) { uiCreator.announceCustomError(file + ": no such disk!"); } else { uiCreator.showDiskContent(disk); } } COM: <s> open the disk with the specified name in the specified katalog </s>
funcom_train/37711201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean dispatchKeyEvent(KeyEvent ke) { boolean answer = false; if (ke.getSource() == body_table && body_table.getColumnSelectionAllowed()) { int selcol = body_table.getSelectedColumn(); if (selcol > -1 && selcol == 0 && isShiftLeft(ke)) { if (ke.getID() == KeyEvent.KEY_PRESSED) { shiftToRefTable(); } answer = true; } } return answer; } COM: <s> implements key event dispatcher </s>
funcom_train/35299564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttribute(String name, Object value, int scope) { switch (scope) { case ENGINE_SCOPE: engineScope.put(name, value); return; case GLOBAL_SCOPE: if (globalScope != null) { globalScope.put(name, value); } return; default: throw new IllegalArgumentException("Illegal scope value."); } } COM: <s> sets the value of an attribute in a given scope </s>
funcom_train/45251487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AdaptableList getAvailableImportWizards() { // TODO: imports are still flat - we need to get at the flat list. All // wizards will be in the "other" category. IWizardCategory root = WorkbenchPlugin.getDefault() .getImportWizardRegistry().getRootCategory(); WizardCollectionElement otherCategory = (WizardCollectionElement) root .findCategory(new Path( WizardsRegistryReader.UNCATEGORIZED_WIZARD_CATEGORY)); if (otherCategory == null) { return new AdaptableList(); } return otherCategory.getWizardAdaptableList(); } COM: <s> returns the import wizards that are available for invocation </s>
funcom_train/25761830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ColorPickerPanel getColorPickPanel() { if (colorPickPanel == null) { colorPickPanel = new ColorPickerPanel(); colorPickPanel.setSize(new Dimension(230, 254)); colorPickPanel.setLocation(new Point(39, 2)); } return colorPickPanel; } COM: <s> this method initializes color pick panel </s>
funcom_train/15945506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onIconClicked(AWTEvent evt) { Object src = evt.getSource(); VertexIcon i = (VertexIcon) ((IconButton)src).getIcon(); if (isIconTerminal(i)) { iconSentenceDisplayPanel.addIcon(i); executeGrammar(i); updateIconMenuPanel(null); } else { updateIconMenuPanel(i); } iconMenuChildrenPanel.repaint(); } COM: <s> the method code on icon clicked </s>
funcom_train/42475826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void linksDelete(List links, HttpServletRequest request) { assert links != null : "Parameter 'links' must not be null."; assert request != null : "Parameter 'request' must not be null."; final int index = Integer.parseInt(request.getParameter("index")); if (index >= links.size()) return; // if the user deletes a link which is not stored yet links.remove(Integer.parseInt(request.getParameter("index"))); } COM: <s> deletes a link from the given list of links </s>
funcom_train/48844021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RepositoryQueryParameters parse(Method method) { RepositoryQueryParameters parameters = null; RepositoryQuery annotation = method.getAnnotation(RepositoryQuery.class); if (annotation != null) { parameters = parseBasicRepositoryQueryParameters(annotation); Class<?>[] parameterTypes = method.getParameterTypes(); if (parameterTypes.length == 1) { parameters.setType(parameterTypes[0]); } else { throw new IllegalArgumentException("Annotated method [" + method + "] must have exactly one parameter"); } parameters.setTargetType(ElementType.METHOD); } return parameters; } COM: <s> parse the annotation of a method </s>
funcom_train/19647360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void selectRow( int row ) { // When a row (other than the first one, which is used as a header) is // selected, display its associated MailItem. MailItem item = MailItems.getMailItem( startIndex + row ); if ( item == null ) { return; } styleRow( selectedRow, false ); styleRow( row, true ); item.read = true; selectedRow = row; eventBus.itemSelected( item ); } COM: <s> selects the given row relative to the current page </s>
funcom_train/8902097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BufferedImage graphicsToImage(Component component, Rectangle r){ BufferedImage buffImg = new BufferedImage(component.getWidth(), component.getHeight(), BufferedImage.TYPE_BYTE_INDEXED); component.setVisible(true); Graphics g = (Graphics)buffImg.createGraphics(); component.paint(g); g.dispose(); return(buffImg); } COM: <s> convert a component to an image </s>
funcom_train/34673945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getViewSelectOptions(String view) { StringBuffer ret=new StringBuffer(); for(String mode: VIEW_MODES) { if (mode.equals(view)) { ret.append("<option selected='yes'>"+mode+"</option>"); } else { ret.append("<option>"+mode+"</option>"); } } return ret.toString(); } COM: <s> build an html option list showing the view modes available </s>
funcom_train/947583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String GetRoot() { // first get root (make sure it works with both slashes) int intIndex = strFilename.lastIndexOf('/'); if (-1 == intIndex) { intIndex = strFilename.lastIndexOf('\\'); } if (intIndex != -1) { return strFilename.substring(0, intIndex); } else { return ""; } } COM: <s> method to obtain the root of a long filename </s>
funcom_train/45739288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(FileWriter writer) throws IOException{ for (int i=0;i<results.size();i++){ Cluster cluster=results.get(i); writer.write("Cluster #"+(i+1)+"\n"); cluster.write(writer,data); writer.write("\n"); } } COM: <s> writes a textual representation of this clustering into a given writer </s>
funcom_train/40105918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validateSourceFile(String fileName) { if (ArchiveFileManipulations.isTarFile(fileName)) { TarFile tarFile = getSpecifiedTarSourceFile(fileName); return (tarFile != null); } ZipFile zipFile = getSpecifiedZipSourceFile(fileName); if (zipFile != null) { ArchiveFileManipulations.closeZipFile(zipFile, getContainer() .getShell()); return true; } return false; } COM: <s> validate source file </s>
funcom_train/17157669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void discardNewAttachment() { this.ui.nameLineEdit.clear(); this.ui.descriptionLineEdit.clear(); this.ui.pathLineEdit.clear(); this.ui.stackedWidget.setCurrentIndex(SELECT_ATTACHMENT_INDEX); this.ui.buttonBox.setEnabled(true); } COM: <s> discard new attachment info and returns to attachment selection page </s>
funcom_train/20621404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getStatusLabel() { if (ivjStatusLabel == null) { try { ivjStatusLabel = new JLabel(); ivjStatusLabel.setName("StatusLabel"); ivjStatusLabel.setText(""); } catch (Throwable ivjExc) { handleException(ivjExc); } } return ivjStatusLabel; } COM: <s> return the status label property value </s>
funcom_train/43014758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle(Header v) { if (Section_Type.featOkTst && ((Section_Type) jcasType).casFeat_title == null) { jcasType.jcas.throwFeatMissing("title", "org.apache.uima.mediawiki.types.Section"); } jcasType.ll_cas.ll_setRefValue(addr, ((Section_Type) jcasType).casFeatCode_title, jcasType.ll_cas.ll_getFSRef(v)); } COM: <s> setter for title sets the title of this section if any </s>
funcom_train/12127291
/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(); result.append(super.toString().replaceAll(".*\\.", "")); result.append('['); if (handled) { result.append("handled"); } result.append(']'); return result.toString(); } COM: <s> returns a string representation of this object for debugging purposes </s>
funcom_train/42775738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addBarMarker(long trackPosition_ppq){ //Goes through each track for(Track midiTrack : trackMap.values()){ try { AgentMessage tempMessage = new AgentMessage(AgentMessage.START_BAR); tempMessage.setContents(Integer.toString(barLength_beats)); midiTrack.addAgentMessage(trackPosition_ppq, tempMessage); beatCount = 0;//Reset beat count } catch (Exception e) { e.printStackTrace(); } } } COM: <s> adds a bar marker at a particular point in the buffer </s>
funcom_train/42650343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOrder(String orderCondition) { int orderByPos = queryString.toString().toLowerCase() .indexOf("order by") ; if(orderByPos < 0) { queryString.append(" order by ") .append(orderCondition) ; } else { queryString.insert(orderByPos+9, orderCondition + ", ") ; } } COM: <s> this method appends the given condition to the ordering condition </s>
funcom_train/32911704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RecordParameterValueList getRecordParameterValueList(Object o) { RecordParameterValueList list = new RecordParameterValueList(); RecordParameterValueModel m = new RecordParameterValueModel(); if (o instanceof Vector) { Enumeration e1 = ((Vector) o).elements(); while (e1.hasMoreElements()) { RecordParameterValueModel rpvm = new RecordParameterValueModel(); rpvm.setValue(e1.nextElement()); list.add(rpvm); } } else { m.setValue(o); list.add(m); } return list; } COM: <s> converts a vector full of primitive objects or a single primitive object </s>
funcom_train/17962184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void adjustData(final double value) { final Number val = this.compassData.getValue(); double newVal = value; if (val != null) { newVal += val.doubleValue(); } if (newVal > 360) { newVal = 0; } if (newVal < 0) { newVal = 360; } this.compassData.setValue(new Double(newVal)); } COM: <s> updates the data </s>
funcom_train/35285401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsAny(final T source, final T... targets) { if (source == null) { throw new NullPointerException("null source"); } if (targets == null) { throw new NullPointerException("null targets"); } for (T target : targets) { if (contains(source, target)) { return true; } } return false; } COM: <s> checks if there is any direct or indirect dependency from </s>
funcom_train/12839287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String url = mFileName; int i = 0; Enumeration keys = mParameterHash.keys(); while (keys.hasMoreElements()) { url += ((i++ > 0) ? "&" : "?"); String key = keys.nextElement().toString(); url += (key + "=" + mParameterHash.get(key).toString()); } return url; } COM: <s> renders the url as a string </s>
funcom_train/50214134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel1() { if (jPanel1 == null) { FlowLayout flowLayout = new FlowLayout(); flowLayout.setAlignment(java.awt.FlowLayout.RIGHT); jPanel1 = new JPanel(); jPanel1.setLayout(flowLayout); jPanel1.add(getJButtonRestoreDefaults(), null); } return jPanel1; } COM: <s> this method initializes j panel1 </s>
funcom_train/648828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendException(PrintWriter writer, Throwable ex) { if (ex instanceof CoreException) { appendStatus(writer, ((CoreException)ex).getStatus(), 0); writer.println(); } appendStackTrace(writer, ex); if (ex instanceof InvocationTargetException) { appendException(writer, ((InvocationTargetException)ex).getTargetException()); } } COM: <s> output the exception text </s>
funcom_train/26326838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector get_as_vector(String name) { String tmp = null; StringTokenizer tok = null; Vector ret_val = null; try { ret_val = new Vector(); tok= new StringTokenizer( getProperty(name),","); while (tok.hasMoreTokens()) { ret_val.addElement(tok.nextToken().trim()); } } catch (Exception e) { ret_val = null; } //System.out.println(" name " + name + " " + ret_val); return ret_val; } COM: <s> convenience method to get a string property as an vector of strings </s>
funcom_train/10840564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onChange(String type, String... arguments) { changes.append(type); String delim = "("; for (String a : arguments) { changes.append(delim); changes.append('\"'); changes.append(a); changes.append('\"'); delim = ", "; } changes.append(");<br/>"); } COM: <s> records a generic change of the given code type code </s>
funcom_train/24436786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Model assemble(Model parent, List<Model> lineage, Repository repository) { if (lineage.size() == 0) { return parent; } Model child = (Model) lineage.remove(0); assembler.assembleModelInheritance(child, parent); return assemble(child, lineage, repository); } COM: <s> work down the pom parents merging the the parent into the child </s>
funcom_train/51413801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteLastSubCall() { Object obj = parameterList.getSelectedValue(); if(obj instanceof Mapping) { Mapping map = (Mapping)obj; MapDef[] mapDefs = map.getMappings(); if(mapDefs.length > 1) { map.deleteMapping(mapDefs[mapDefs.length-1]); //allow adjustment of JScrollPane-size of the list refreshList(); refreshDetailPanel(); firePropertyChange(PROPERTY_DATACHANGE, false, true); } } } COM: <s> deletes the last mapping definition from the list </s>
funcom_train/24119005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doNew() { /** !!! DO NOT BREAK THE TIERS !!! */ // We don't create a new DomainObject() in the frontend. // We GET it from the backend. Orderposition anOrderposition = getOrderService().getNewOrderposition(); setOrderposition(anOrderposition); anOrderposition.setOrder(order); doClear(); // clear all commponents doEdit(); // edit mode btnCtrl.setBtnStatus_New(); // remember the old vars doStoreInitValues(); } COM: <s> create a new order position object </s>
funcom_train/18112030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSubjectTypesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_HappeningCategory_SubjectTypes_feature"), getString("_UI_PropertyDescriptor_description", "_UI_HappeningCategory_SubjectTypes_feature", "_UI_HappeningCategory_type"), BioDBPackage.Literals.HAPPENING_CATEGORY__SUBJECT_TYPES, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the subject types feature </s>
funcom_train/12939009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String validate() throws IllegalArgumentException { String msg = null; if (MPayment.TENDERTYPE_CreditCard.equals(p_mp.getTenderType())) { msg = validateCreditCard(); } else if (MPayment.TENDERTYPE_Check.equals(p_mp.getTenderType())) { msg = validateCheckNo(); } else if (MPayment.TENDERTYPE_Account.equals(p_mp.getTenderType())) { msg = validateAccountNo(); } return(msg); } COM: <s> validate payment before process </s>
funcom_train/41378073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StateSet DFAEdge(StateSet start, char input) { tempStateSet.clear(); stateEnum.reset(start); while (stateEnum.hasMoreElements()) tempStateSet.add(table[stateEnum.nextElement()][input]); StateSet result = new StateSet(tempStateSet); stateEnum.reset(tempStateSet); while (stateEnum.hasMoreElements()) result.add(epsilon[stateEnum.nextElement()]); return result; } COM: <s> calculates the set of states that can be reached from another set of </s>
funcom_train/3748784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(final String nameParam) { if (logger.isDebugEnabled()) { logger.debug("setName before: '" + name + "', after: '" + nameParam + "'"); } checkSetter(); name = nameParam; if (logger.isDebugEnabled()) { logger.debug("setName(String) - end"); } } COM: <s> p set the name of the group </s>
funcom_train/2897750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected HttpClient getNewClient(URL url) throws IOException { HttpTimeoutClient client = new HttpTimeoutClient(url, (String) null, -1); try { client.setTimeout(fiTimeoutVal); } catch (Exception e) { throw new IOException("Unable to set timeout value"); } return (HttpClient) client; } COM: <s> create a new http client object bypassing the cache of http client </s>
funcom_train/49329594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void purgeQueue() { int start = buffer.size(); LogLine line; while ((line = queue.poll()) != null) { buffer.add(line); } int end = buffer.size() - 1; if (end >= start) { model.fireTableRowsInserted(start, end); if (followBox.isSelected()) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { Rectangle rect = table.getCellRect(1000000000, 1, true); table.scrollRectToVisible(rect); } }); } } } COM: <s> purge the queue of incoming log lines </s>
funcom_train/8951608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int countResults(double[][] pResult) { int count = 0; for (int i = 0; i < pResult.length; i++) { for (int j = 0; j < pResult[0].length; j++) { count += pResult[i][j]; } } return count; } COM: <s> count all elements inside one array </s>
funcom_train/47897787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ImageIcon getIcon(String str){ if(props==null) props = new ResourceLoader(); String pth = props.getResourceString(str); ImageIcon retx; try { retx= new ImageIcon( new URL(pth)); }catch(Exception ex){ Logger.logErr("ExtenBeanTreeNode.getIcon failed. Could not get icon from: " + pth, ex); return null; } return retx; } COM: <s> fetch the url for the resource and create an image icon </s>
funcom_train/22395644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireAccountStatusChanged(int type) { Object[] listeners = listenerList.getListeners(AccountNodeListener.class); AccountNodeEvent e = null; for (int i = 0; i < listeners.length; i++) { if (e == null) { e = new AccountNodeEvent(this, type); } ((AccountNodeListener) listeners[i]).accountStatusChanged(e); } } COM: <s> notifies all registered tt account node listener tt s that </s>
funcom_train/22312015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openAssociation(AssociateQuery aQuery, QueryRunnerListener queryRunnerListener) throws Exception { if ( queryRunnerListener == null ) throw new Exception("QueryRunnerListener can't be null"); setListener( queryRunnerListener ); //fQueryRunnerHandler=aQueryRunnerHandler; ThreadUtils.startRunnable(new OpenAssociationWorker(this, aQuery, queryRunnerListener)); } COM: <s> request and open a new association </s>
funcom_train/8490308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkBegininngAndEndWildCard(){ String str[] = getFileData(); if ( str == null ) { return false; } String path=""; for ( int i=0; i<str.length; i++ ) { path+=str[i]; if (path.contains(getData().replaceAll("\\*", "")) ){ return true; } } return false; } COM: <s> checks expressions with wild cards at the beginning and the end </s>
funcom_train/37444600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOnclickAttribute(final StringBuffer buffer) { CDebug.checkParameterNotNull(buffer, "buffer"); if (getOnclick() != null) { buffer.append(' '); buffer.append("onclick=\"").append(getOnclick()).append("\""); } } COM: <s> adds the onclick attribute to the supplied buffer if and only if an </s>
funcom_train/36616940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImage(Image img, int frameWidth, int frameHeight) { // if image is null image.getWidth() will throw NullPointerException if ((frameWidth < 1 || frameHeight < 1) || ((img.getWidth() % frameWidth) != 0) || ((img.getHeight() % frameHeight) != 0)) { throw new IllegalArgumentException(); } } COM: <s> changes the image containing the sprites frames </s>
funcom_train/20029321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand() { if (cancelCommand == null) {//GEN-END:|39-getter|0|39-preInit // write pre-init user code here cancelCommand = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|39-getter|1|39-postInit // write post-init user code here }//GEN-BEGIN:|39-getter|2| return cancelCommand; } COM: <s> returns an initiliazed instance of cancel command component </s>
funcom_train/3099963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void forward(Message message) { try { regHelper.getDirectory().forward(message, regHelper.getAgentRep(), "message" + count++); } catch (RemoteException e) { Log.current.errorPrintln(e.getMessage()); Log.current.printStackTrace(e); } } COM: <s> forwards the message </s>
funcom_train/50458254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDecrypt() { // first run testEncrypt to setup the stuff testEncrypt(); // get the input stream from the encrypt test that ran in = new ByteArrayInputStream(out.toByteArray()); Hashtable result = hc.decrypt(algorithm, passphrase, in); assert(result.get("test1") != null); assert(result.get("test2") != null); assert(result.get("test3") != null); } COM: <s> a unit test for junit </s>
funcom_train/11345229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(Dictionary dict) throws ParseException { String componentClassesStr = (String) dict.get("iPOJO-Components"); // Add the ipojo element inside the element list addElement(new Element("iPOJO", "")); parseElements(componentClassesStr.trim()); } COM: <s> looks for the code i pojo components code header </s>
funcom_train/37206582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(String value) { boolean valueChanged = false; if (this.value == null) { if (value != null) { this.value = value; valueChanged = true; } } else if (!this.value.equals(value)) { this.value = value; valueChanged = true; } if (valueChanged) { if (containingDataset != null) { if (containingDataset.getContainingQuery() != null) { containingDataset.getContainingQuery().fireFilterChanged( this, containingDataset); } } } } COM: <s> sets the value </s>
funcom_train/27825595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() { String dropTableSQL=m_databaseManager.getDropTableSQL(m_columnTypes); if (dropTableSQL!=null) { try { Statement statement=m_connection.createStatement(); try { statement.executeUpdate(dropTableSQL); } finally { statement.close(); } } catch (SQLException ignored) { } } } COM: <s> destroys this table </s>
funcom_train/37074030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNonConsensusAcceptorNum() { int odd = -1; int exon_cnt = size(); if (isProteinCodingGene() && exon_cnt > 1) { for (int i = 0; i < exon_cnt && odd == -1; i++) { if (((ExonI) getFeatureAt(i)).isNonConsensusAcceptor()) odd = i; } } return odd; } COM: <s> this returns the exon index of the non consensus acceptor if </s>
funcom_train/7232601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onOpenNew() { NetEditViewer editViewer = new NetEditViewer (NetGenerator.INSTANCE.getNetInstance()); editViewer.setEditor (getCurrentEditor()); JInternalFrame window = editViewer.getInternalFrame (); addInternalFrame (editViewer, window); getCurrentEditor().setCurrentView (editViewer); try { window.setMaximum(true); } catch (PropertyVetoException ex) {/* ignore */} } COM: <s> opens a new drawing view frame </s>