__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/2911311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLastHit() { try { String action = (String) request.getAttribute (ACTION_KEY); ((ActiveUserManager) WebFactory.getBusinessDelegateByClass(request, ActiveUserManager.class)).setLastHit (action, WebFactory.getActiveBoard(request), WebFactory.getActiveTopic(request)); } catch (Exception e) { cat.error ("setLastHit: " + e.getMessage()); cat.debug ("setLastHit", e); throw new ModelException (e); } } COM: <s> method set last hit </s>
funcom_train/7495823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setStartRule(int month, int dayOfWeekInMonth, int dayOfWeek, int time, int mode) { startMonth = month; startDay = dayOfWeekInMonth; startDayOfWeek = dayOfWeek; startTime = time; startTimeMode = mode; decodeStartRule(); transitionRulesInitialized = false; } COM: <s> sets the daylight savings starting rule </s>
funcom_train/34424671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEvaluate_GT() { for (int y = -2; y < 2; y++) for (int x = -2; x < 2; x++) { Object result = verifyAndEvaluate(context, x + ">" + y); assertEquals(x + ">" + y, x > y, result); } } COM: <s> test evaluation of the greater than operator </s>
funcom_train/35069334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void bindToService() { if (mSP.contains("automatic_updates") && mSP.getBoolean("automatic_updates", false)) { Intent serviceIntent = new Intent(IJibJibService.class.getName()); if (!mIsBound) { startService(serviceIntent); mIsBound = true; } bindService(serviceIntent, mConnection, Context.BIND_AUTO_CREATE); } } COM: <s> initialize service and bind to it </s>
funcom_train/49626140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String nanosToMillis(final long nanos) { StringBuilder millis = new StringBuilder(new BigDecimal( nanos / 1000000.0).toPlainString()); int indexOfDot = millis.indexOf("."); if (indexOfDot == -1) { return millis.toString(); } if (indexOfDot + 3 < millis.length()) { return millis.substring(0, indexOfDot + 3); } return millis.toString(); } COM: <s> utility method to normalise the time in nanoseconds </s>
funcom_train/9191764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSourcePage() throws PartInitException { fSourcePageIndex = addPage(fTextEditor, getEditorInput()); setPageText(fSourcePageIndex, XMLEditorMessages.XMLMultiPageEditorPart_0); firePropertyChange(PROP_TITLE); // Changes to the Text Viewer's document instance should also // force an // input refresh fTextEditor.getTextViewer().addTextInputListener(new TextInputListener()); } COM: <s> adds the source page of the multi page editor </s>
funcom_train/40433275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getCacheCapacity() { String capacityString = this.properties.getProperty(CACHE_CAPACITY); long capacity = 0; try { capacity = Long.valueOf(capacityString); } catch (Exception e) { System.out.println("Illegal cache capacity: " + capacityString + ". Using default."); capacity = 50000L; } return capacity; } COM: <s> returns the in memory capacity for each cache </s>
funcom_train/9863640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertNextToken(final Language pExpected, final TokenStream pStream) throws UnexpectedTokenException { try { final Token token = pStream.getNextToken(); assertToken(pExpected, token); } catch (final ForwardingUnexpectedTokenException e) { assertToken(pExpected, null); } } COM: <s> utility function that asserts that the next token is of the expected type </s>
funcom_train/39540619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIcon(Icon icon) { Icon old = getIcon(); Image oldImage = getImage(); this.icon = icon; firePropertyChange("icon", old, getIcon()); firePropertyChange("image", oldImage, getImage()); } COM: <s> set the icon to use </s>
funcom_train/32812142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ToSML (String vendor, ExtendedProperties config){ super( config ); String xsl = config.getString( X_XSL_FILENAME_PROPERTY.replace("%s", vendor), DEFAULT_X_XSL_FILENAME.replace("%s",vendor) ); setXslfile( xsl ); cat.info( "param: "+ getXslfile() ); } COM: <s> code to sml code constructor requires the vendor code </s>
funcom_train/3924436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Double get() { /* Set suggestedSet = Node.getSubset( triple, EventType.SUGGESTED ); Set clickedSet = Node.getSubset( triple, EventType.CLICKED ); return new Double( clickedSet.size()/suggestedSet.size() ); */ return new Double(1); } COM: <s> this is supposed to retreive this weight value </s>
funcom_train/19061089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AccountItem getAccount(String address) { for (int i = 0; i < count(); i++) { AccountItem item = get(i); Identity identity = item.getIdentity(); String str = identity.getAddress().toString(); if (address.indexOf(str) != -1) { // found match return item; } } return null; } COM: <s> get account using the email address to identify it </s>
funcom_train/17207686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stackTrace(PseudoOp op) { saveContext(op,env.top()); for (StackFrame frame : env.stack()) { op = frame.getSavedMethod()[frame.getSavedPc()-1]; System.err.println(op.getSourceLocation("at ")); } } COM: <s> print a script stack trace </s>
funcom_train/12806805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(byte[] buf, int off, int len) throws SignatureException { if (RSAdata != null || digestAttr != null || isTsp) messageDigest.update(buf, off, len); else sig.update(buf, off, len); } COM: <s> update the digest with the specified bytes </s>
funcom_train/36901145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { final Term term = new Term(remote, 32); // Button clear = new Button(); clear.setText("Clear"); clear.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { term.clear(); } }); // VerticalPanel vertical = new VerticalPanel(); vertical.add(clear); vertical.add(term); // RootPanel.get().add(vertical); } COM: <s> this is the entry point method </s>
funcom_train/42304456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renderLocation(GL gl, Vector3f position){ if(modelObj!= null){ gl.glPushMatrix(); gl.glTranslatef(position.x, position.y -2f, position.z); gl.glRotatef(facingDirection, 0f, -1f, 0f); modelObj.draw(gl); gl.glPopMatrix(); } if(objAnimation != null){ objAnimation.render(gl, position, facingDirection); } } COM: <s> render the entity at a location other than its current location </s>
funcom_train/37645694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUpload(final GnutellaItem item) { Display.getDefault().asyncExec(new Runnable() { public void run() { // Do the upload // Save our own record m_uploads.add(item); // Update the listeners Iterator i = m_transferListeners.iterator(); while (i.hasNext()) { TransferListener tl = (TransferListener) i.next(); tl.addTransfer(item, GnutellaItemMode.UPLOAD); } } }); } COM: <s> adds an upload </s>
funcom_train/32776077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File file) { if (file.isDirectory()) { return true; } String ext = null; String s = file.getName(); int i = s.lastIndexOf('.'); if (i > 0 && i < s.length() - 1) { ext = s.substring(i + 1).toLowerCase(); } if (ext != null) { if (ext.equals("xsl")) { return true; } else { return false; } } return false; } COM: <s> accepts all directories and xsl files </s>
funcom_train/20335633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void newOrder(Order order) { String name = order.getClientName(); absClient client = (absClient) RMIContracts .getServer(name); String id = getId(); order.setOrderId(id, security); runningOrders.put(id, order); try { client.orderDetails(order); } catch (RemoteException e) { System.out.println("Problems while connecting to client"); } new Thread(new pizza(client, order)).start(); } COM: <s> starts new order as a new thread </s>
funcom_train/17775536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder string = new StringBuilder(); try { string.append("Database contains " + myDatabase.count() + " rules.\n"); } catch (DatabaseException e) {} for (Pair<Rule,String> rule : this.getAll()) { string.append(rule.getFirst().toString() + " ==> " + rule.getSecond() + "\n"); } return string.toString(); } COM: <s> returns a string representation of the grammar </s>
funcom_train/34339553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getVolver() { if (volver == null) {//GEN-END:|25-getter|0|25-preInit // write pre-init user code here volver = new Command("Volver", Command.BACK, 0);//GEN-LINE:|25-getter|1|25-postInit // write post-init user code here }//GEN-BEGIN:|25-getter|2| return volver; } COM: <s> returns an initiliazed instance of volver component </s>
funcom_train/41572067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addContainedNodes(Set ret) { if (ret.contains(this)) { getCompiler().showError(this, "duplicate node in " + ret); } ret.add(this); for(int i=0; i<getChildCount(); i++) { ASTObject o = getChildAt(i); if (o != null) o.addContainedNodes(ret); } } COM: <s> adds nodes i contain to a set </s>
funcom_train/44872602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setYMax(double ymax) { CoordinateRect cr = this.getCoordinateRect(); if (ymax > cr.getYmin()) { cr.setLimitsLazy(cr.getXmin(), cr.getXmax(), cr.getYmin(), ymax); } else { cr.setLimitsLazy(cr.getXmin(), cr.getXmax(), ymax - 1, ymax); } cr.setRestoreBuffer(); } COM: <s> set the max value for the y axis </s>
funcom_train/44712631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if ( null == object ) { return false; } if (object instanceof JoinElement) { if ( this == object ) { return true; } JoinElement je = (JoinElement)object; return m_from.equals(je.getFrom()) && m_to.equals(je.getTo()); } return false; } COM: <s> is this join element equivalent to another join eleemnt </s>
funcom_train/4284647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkTypedModelsAreUnique(final Rule rule, final DiagnosticChain diagnostics, final Map<Object, Object> context) { UniquenessChecker<TypedModel, Domain> checker = new UniquenessChecker<TypedModel, Domain>() { @Override protected TypedModel getKey(Domain value) { return value.getTypedModel(); } }; return checker.check(rule.getDomain(), QVTBaseMessages._UI_Rule_DomainTypedModelIsNotUnique, rule, diagnostics, context); } COM: <s> validates the typed models are unique constraint of em rule em </s>
funcom_train/1492350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFullListSize() { int knownResults = searchResults.getResults().size(); if (pageNumber > 1) { // then there count up previous pages knownResults += ((pageNumber-1)*objectsPerPage); } // if we are at the last page if (!searchResults.hasMoreResults()) { fullListSizeIsExact = true; } else { // ensure that it shows a next page knownResults+=1; fullListSizeIsExact = false; } return knownResults; } COM: <s> gets the count of results which may be an estimation </s>
funcom_train/29942389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { l.fine("Retriever started"); while(true) { // getNextMessage should block until next message is available String type=p.getProperty("retrieve.type"); if(type.equals("1")) { retrieveMail(); } else { System.out.println("Retriever: Unknown retrieval method = "+type); } try { sleep(10000); } catch(Exception e) {} } } COM: <s> this function starts the message dispatcher </s>
funcom_train/35715667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDrawingStrategy(Object id, IDrawingStrategy strategy) { // don't permit null as null is used to signal that an annotation type is not // registered with a specific strategy, and that its annotation hierarchy should be searched if (id == null) throw new IllegalArgumentException(); fPaintingStrategyId2PaintingStrategy.put(id, strategy); fCachedAnnotationType2PaintingStrategy.clear(); } COM: <s> registers a new drawing strategy under the given id </s>
funcom_train/25332443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetParameter() throws Exception { CoordinateSystemSeqLevelTypeHandler i = new CoordinateSystemSeqLevelTypeHandler(); final PreparedStatement ps = this.context.mock(PreparedStatement.class); try { i.setParameter(ps, 1, new Object(), JdbcType.BIT); } catch (Exception e) { fail(); } } COM: <s> test of set parameter method of class coordinate system seq level type handler </s>
funcom_train/26538735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showFailureDialog(String directory) { Resources r = Resources.getDashBundle("pspdash.PSPDashboard"); JOptionPane.showMessageDialog (null, r.formatStrings("Lock_Failure_Message_FMT", directory), r.getString("Lock_Failure_Title"), JOptionPane.ERROR_MESSAGE); } COM: <s> display a dialog to the user indicating failure to </s>
funcom_train/10585893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void performConnect() throws ServletException, IOException { try { CallStackHelper.enterServlet(this.context, this.request, this.response); this.servlet.service(this.request, this.response); } finally { CallStackHelper.leaveServlet(); } } COM: <s> perform the actual connect that invokes the servlet service </s>
funcom_train/8103052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void CalculateNewX(Map<Integer, Article> nodes, int n_nodes) { x_new = 0.f; if(null != links_in) { for (int i=0; i<links_in.length; i++) { x_new += nodes.get( links_in[i] ).y; } } } COM: <s> x p sum of y q for all q pointing to p </s>
funcom_train/4361651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDistributable(boolean distributable) { boolean oldDistributable = this.distributable; this.distributable = distributable; support.firePropertyChange("distributable", oldDistributable, this.distributable); // Bugzilla 32866 if(getManager() != null) { if(log.isDebugEnabled()) { log.debug("Propagating distributable=" + distributable + " to manager"); } getManager().setDistributable(distributable); } } COM: <s> set the distributable flag for this web application </s>
funcom_train/6482365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName(String UUID) { for (Agent a : world.agents) { if (a.UUID.equals(UUID)) { return a._name; } } for (Avatar a : world.avatars) { if (a.UUID.equals(UUID)) { return a._name; } } for (Prim p : world.prims) { if (p.UUID.equals(UUID)) { return p.name; } } return null; } COM: <s> get the name associated with an entities uuid where an entity can be </s>
funcom_train/45439617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String format(final long offset) { StringBuffer b = new StringBuffer(); long remainder = Math.abs(offset); if (offset < 0) { b.append('-'); } else { b.append('+'); } b.append(HOUR_FORMAT.format(remainder / MILLIS_PER_HOUR)); remainder = remainder % MILLIS_PER_HOUR; b.append(MINUTE_FORMAT.format(remainder / MILLIS_PER_MINUTE)); remainder = remainder % MILLIS_PER_MINUTE; if (remainder > 0) { b.append(SECOND_FORMAT.format(remainder / MILLIS_PER_SECOND)); } return b.toString(); } COM: <s> returns a string representation of an utc offset </s>
funcom_train/2558189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invoke(Object proxy, Method method, Object[] list) throws Throwable { String name = method.getName(); if(name.equals(STRING)) { return toString(); } if(name.equals(EQUAL)) { return equals(proxy, list); } if(name.equals(CLASS)) { return type; } if(name.equals(REQUIRED)) { return required; } return method.getDefaultValue(); } COM: <s> this is used to handle all invocations on the wrapped annotation </s>
funcom_train/47021882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand() { if (okCommand == null) {//GEN-END:|192-getter|0|192-preInit // write pre-init user code here okCommand = new Command(getLocalizedString("OK"), Command.OK, 0);//GEN-LINE:|192-getter|1|192-postInit // write post-init user code here }//GEN-BEGIN:|192-getter|2| return okCommand; } COM: <s> returns an initiliazed instance of ok command component </s>
funcom_train/1928667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newTransition(State from, State to, String s) { SMNode f = (SMNode)from; SMNode t = (SMNode)to; SMEdge edge = new SMEdge(f, t, s); f.addOutgoingEdge(edge); t.addIncomingEdge(edge); edges.add(edge); } COM: <s> assumes the from and to variables are actually the relevant implementations from </s>
funcom_train/45623023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFilesWrittenPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CodeAnalysisType_filesWritten_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CodeAnalysisType_filesWritten_feature", "_UI_CodeAnalysisType_type"), MSBPackage.eINSTANCE.getCodeAnalysisType_FilesWritten(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the files written feature </s>
funcom_train/28371255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setXYchooser(JDialog axisDialogIn, int xyChooserIn) { xyChooser = xyChooserIn; initSet(); if (xyChooserIn == 0) { axisDialogIn.setTitle("X - Axis Grid"); } if (xyChooserIn == 1) { axisDialogIn.setTitle("Y - Axis Grid"); } axisDialogIn.getContentPane().add(this); } COM: <s> sets the x ychooser attribute of the grid limits panel object </s>
funcom_train/50396973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void incrementCounterAndCheckMaxActivities()throws ExecutionException{ int ac=getActivityCounter().incrementAndGet(); Integer maxProp=Integer.parseInt(Kernel.getKernel().getProperty(PROPERTY_MAX_ACTIVITIES_PER_GROUP, DEFAULT_MAX_ACTIVITIES_PER_GROUP)); if(ac>maxProp){ throw new ExecutionException("Maximum number <"+maxProp+"> of activities per group exceeded!"); } } COM: <s> check whether the maximum number of activities per group is exceeded br </s>
funcom_train/22182426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displaySequenceDiagram(InteractionModel diagram) { parent.setLayout(new FillLayout()); ScrollingGraphicalViewer graphicalViewer = new ScrollingGraphicalViewer(); graphicalViewer.setRootEditPart(new ScalableRootEditPart()); graphicalViewer.setEditDomain(new EditDomain()); graphicalViewer.setEditPartFactory(new ControllerFactory()); figureCanvas = (FigureCanvas) graphicalViewer.createControl(parent); graphicalViewer.setContents(diagram); figureCanvas.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE)); } COM: <s> displays the sequence diagram in the debugger </s>
funcom_train/4558616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCheckLinkManageAffiliate() { repEng.newStep("576", "Manage Affiliates-Check the link Manage Affiliate"); //1. Affiliates artist log in magnet portal //2. Go to main page actionset.loginAffiliateArtist(); //3. Check the link Manage Affiliates //There should be the link Manage Affiliates on this page check.checkElementOnPage("css=a:contains('Manage Affiliates')"); } COM: <s> 576 manage affiliates check the link manage affiliate </s>
funcom_train/28744442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TradeResult buy(String stockSymbol, int shares) { if (shares > tradeLimit) { log("Attempt to buy "+shares+" is greater than limit of "+tradeLimit); shares = tradeLimit; } log("Buying "+shares+" shares of "+stockSymbol); return new TradeResult(shares, stockSymbol); } COM: <s> buys shares of a stock </s>
funcom_train/14478510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassLoader getClassLoader(EntityManager em, int workerId, WorkerConfig config) { ClassLoader retval = workerClassLoaderMap.get(workerId); if (retval == null) { retval = this.getClass().getClassLoader(); workerClassLoaderMap.put(workerId, retval); } return retval; } COM: <s> method that manages all available class loaders in the system </s>
funcom_train/7615840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2D transform(Point2D src, Point2D dst) { if (dst == null) { if (src instanceof Point2D.Double) { dst = new Point2D.Double(); } else { dst = new Point2D.Float(); } } double x = src.getX(); double y = src.getY(); dst.setLocation(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12); return dst; } COM: <s> apply the current affine transform to the point </s>
funcom_train/22844910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testContentLength() throws Exception { // This header will be set by http client automatically for POST // requests so we will find it in the request even if it is not // forwarded WebConversation webConversation = new WebConversation(); WebRequest req = new PostMethodWebRequest(APPLICATION_PATH + "nocache/ag1/request-headers.jsp?name=Content-Length"); WebResponse resp = webConversation.getResponse(req); String result = resp.getText(); assertEquals( "Content-Length request header should be set for POST requests", "content-length: 0", result.toLowerCase()); } COM: <s> we never change request body unlike for responses the only case when </s>
funcom_train/11323285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int numericCompare(String string1, String string2) { if (string1.length() > 0 && string2.length() > 0) { Double double1 = Double.valueOf(string1); Double double2 = Double.valueOf(string2); return double1.compareTo(double2); } else if (string1.length() > 0) { return 1; } else if (string2.length() > 0) { return -1; } else { return 0; } } COM: <s> perform a numeric compare on the given string values </s>
funcom_train/45715913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initAfterUnmarshalling(IBaseOJ parent) { super.initAfterUnmarshalling(parent); if (locations == null) { locations = new ArrayList(); } for (int i = 0; i < locations.size(); i++) { getLocation(i).initAfterUnmarshalling(this); } } COM: <s> initialize if necessary after reading from file </s>
funcom_train/2882627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(LineEvent event) { if (event.getType().equals(LineEvent.Type.STOP)) { Line line = event.getLine(); line.close(); } else if (event.getType().equals(LineEvent.Type.CLOSE)) { //line closure } } COM: <s> this is implemented to listen for any line events and closes the clip </s>
funcom_train/50486170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deletePackage(String packageURL) { if(packageURL == null) { return false; } boolean success = false; String packageFileStr = fileLocator.getFilePathFromURL(packageURL); if(packageFileStr != null) { File packageFile = new File(packageFileStr); success = packageFile.delete(); } return success; } COM: <s> deletes the given package </s>
funcom_train/46456696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if(column==0) { setBackground(PANEL_BACKGROUND); } setText(value.toString()); return this; } COM: <s> returns a jlabel that is highlighted if the row is selected </s>
funcom_train/19887194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetChange() { System.out.println("setChange"); double change = 10.0; //Payment pmt = null; pmt.setChange(change); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set change method of class edu </s>
funcom_train/12563042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroySuite() { synchronized (this) { for (int i = 0; i < nmidlets; i++) { if (midlets[i].getState() != MIDletPeer.DESTROYED) { midlets[i]. setStateWithoutNotify(MIDletPeer.DESTROY_PENDING); } } this.notify(); } } COM: <s> destroys all running midlets in this suite only </s>
funcom_train/35357448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Complex times(Complex cx) { int nR = this.nReal * cx.nReal - this.nImag * cx.nImag; int nI = this.nReal * cx.nImag + this.nImag * cx.nReal; this.nReal = nR; this.nImag = nI; return this; } COM: <s> multiplies two complex numbers </s>
funcom_train/22347834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tableChanged(TableModelEvent event) { int[] selectedRows = getSelectedRows(); try { super.tableChanged(event); } finally { if(selectedRows.length > 0) { setRowSelectionInterval(selectedRows[0], selectedRows[selectedRows.length-1]); } } } COM: <s> preserve selection across table changing events </s>
funcom_train/4194148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onCallTransferRefused( ExtendedCall call, String reason, Message resp ) { printLog( "onCallTransferRefused", "Init..." ); if ( call != this.call ) { printLog( "onCallTransferRefused", "NOT the current call." ); return; } printLog( "onCallTransferRefused", "Transfer refused." ); } COM: <s> callback function called when a call transfer is refused </s>
funcom_train/2950780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(boolean b) { // set the property Boolean value = new Boolean(b); if (bean != null) { removePropertyChangeListener(bean, listener); try { if (descriptor != null) { descriptor.getWriteMethod().invoke(bean, new Object[] { value }); } } catch (Throwable e) { e.printStackTrace(); } addPropertyChangeListener(bean, listener); } updateView(b); } COM: <s> sets the value of the property </s>
funcom_train/42538085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String method(String pkg){ return (" /** DGP method from Class "+getClass().getSimpleName()+" */\n"+ " public"+(override()?Diff.d.override+" ":" ")+ methodReturn()+" "+methodName()+"(){ "+ methodBody(pkg)+" }\n"); } COM: <s> the stub method implementation just needs to call the static method </s>
funcom_train/24213734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void orderAs(Class<?>... orderedClasses) { for (int i = 0; i < orderedClasses.length; i++) { Class<?> class1 = orderedClasses[i]; for (int j = i; j < orderedClasses.length; j++) { Class<?> class2 = orderedClasses[j]; firstBeforeSecond(class1, class2); } } } COM: <s> intended to be called by </s>
funcom_train/40658116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onConnect (IrcBot pBot) { if (m_sNickServPassword != null) { pBot.out.privmsg ("NickServ", "IDENTIFY " + m_sNickServPassword); } for (IrcChannel pChannel : m_aChannels) { if (pChannel.hasKey ()) { pBot.out.join (pChannel.getName (), pChannel.getKey ()); } else { pBot.out.join (pChannel.getName ()); } } } COM: <s> the on connect callback will allow us to easily join our channels as </s>
funcom_train/25365974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsMalePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Creature_isMale_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Creature_isMale_feature", "_UI_Creature_type"), LeveleditorPackage.Literals.CREATURE__IS_MALE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is male feature </s>
funcom_train/39314487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFlipLong(){ System.out.println("testFlipLong"); byte flip [] = new byte[4]; flip[0] = 1; flip[1] = 1; flip[2] = 1; flip[3] = 1; int expected = convert.flipLong(flip); assertEquals(16843009,expected); System.out.println("Done testFlipLong"); } COM: <s> test of flip long method of class converter </s>
funcom_train/7787665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addNode(ConfigNode node) { boolean added = false; if(node.depth <= this.maxDepth) { ++this.addedNodes; this.unexploredNodes.add(node); if(node.depth > this.deepistNode) { this.deepistNode = node.depth; } added = true; } else if(node.depth == this.maxDepth+1) { this.nextDepthIncreaseNodes.add(node); } return added; } COM: <s> attempt to add a node to this tree </s>
funcom_train/44722832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttribute(String name, String val) { // Make sure string value is decoded before placing it // in the hashtable. if ((name != null) && (val != null)) { val = ProtocolFactory.decode(val); attributes.put(name,val); } } COM: <s> adds an attribute key value pair to the tags list of attributes </s>
funcom_train/18068471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int clean(IDfSessionManager sessionManager, String docbase) { int result = 0; IDfSession session = null; try { session = sessionManager.getSession(docbase); result = this.clean(sessionManager, session); } catch (DfException e){ log.warn("Could not get session for docbase " + docbase, e); } finally { if (session != null) { sessionManager.release(session); } } return result; } COM: <s> releases any leaked sessions for the session of the specified docbase </s>
funcom_train/49262842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ToolBar createToolbar(final Composite parent, final ToolItemData[] itemsData) { //Instantiation ToolBar toolBar = new ToolBar(parent, SWT.FLAT | SWT.HORIZONTAL | SWT.RIGHT); toolBar.addDisposeListener(new DisposeListener() { @Override public void widgetDisposed(final DisposeEvent e) { toolBarDisposed(); } }); //Fill createToolItems(toolBar, itemsData); return toolBar; } COM: <s> creates a tool bar widget on the given parent </s>
funcom_train/4285202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features componentEClass = createEClass(COMPONENT); createEAttribute(componentEClass, COMPONENT__NAME); createEAttribute(componentEClass, COMPONENT__DESCRIPTION); createEAttribute(componentEClass, COMPONENT__IS_SINGLETON); createEReference(componentEClass, COMPONENT__USES); createEReference(componentEClass, COMPONENT__IS_USED); componentModelEClass = createEClass(COMPONENT_MODEL); createEAttribute(componentModelEClass, COMPONENT_MODEL__NAME); createEReference(componentModelEClass, COMPONENT_MODEL__COMPONENTS); } COM: <s> creates the meta model objects for the package </s>
funcom_train/33974070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initGraph() { jgraph = new JGraph(new FlexGraphModel()); jgraph.getGraphLayoutCache().setFactory(new FlexagonCellViewFactory()); jgraph.setCloneable(true); // Enable edit without final RETURN keystroke jgraph.setInvokesStopCellEditing(true); // When over a cell, jump to its default port (we only have one, anyway) jgraph.setJumpToDefaultPort(true); jgraph.setSizeable(false); } COM: <s> initializes the graph </s>
funcom_train/24622339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu createHelpMenu(){ JMenu helpMenu = new JMenu (I18N.instance.getMessage("MainWindow.HelpMenuLabel")); JMenuItem menuItem = new JMenuItem(ActionRegistry.instance.getAction(HelpAction.class)); helpMenu.add(menuItem); menuItem = new JMenuItem(ActionRegistry.instance.getAction(AboutAction.class)); helpMenu.add(menuItem); return helpMenu; } COM: <s> creates the help menu with its entries </s>
funcom_train/8059894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDatadocOfWavelet(Wavelet wavelet, String name, String value) { appendOperation(OperationType.WAVELET_SET_DATADOC, wavelet, Parameter.of(ParamsProperty.DATADOC_NAME, name), Parameter.of(ParamsProperty.DATADOC_VALUE, value)); } COM: <s> sets a key value pair on the data document of a wavelet </s>
funcom_train/18569904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMatchesReturnsFalseWithNonMatchingArgValues() { RecordedCall recordedCall = new RecordedCall(signature, argValues, exception); Object[] argValues2 = new Object[] {"XXX", argValue2}; InvokedCall invokedCall = new InvokedCall(signature, argValues2, exception); boolean matches = recordedCall.matches(invokedCall); assertFalse(matches); } COM: <s> test that the matches method returns false non matching argvalues </s>
funcom_train/42242031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String encrypt(String str) { try { // Encode the string into bytes using utf-8 byte[] utf8 = str.getBytes("UTF8"); // Encrypt byte[] enc = ecipher.doFinal(utf8); // Encode bytes to base64 to get a string return new sun.misc.BASE64Encoder().encode(enc); } catch (BadPaddingException e) { } catch (IllegalBlockSizeException e) { } catch (UnsupportedEncodingException e) { } catch (IOException e) { } return null; } COM: <s> takes a single string as an argument and returns an encrypted version </s>
funcom_train/26226879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int findEmptySpace(int var, int size) { int find = 0; int begin = -1; BitSet set = interferenceVarColors[var]; for (int i = 0; i < set.size(); ++i) { if (set.get(i)) { find = 0; } else { if (find == 0) { begin = i; } ++find; if (find == size) { return begin; } } } return set.size() - find; } COM: <s> find the minimum index of code size code consecutive non intefere </s>
funcom_train/16308391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeGradingScripts() throws BuildException { if (!canEditMarkingScript()) { throw new BuildException( "No command found in the built MarkingScript. Create one " + "using one of the newXXX method of the builder before " + "removing a component."); } builtMarkingScript.getCommand().setGradingScripts( new Vector<GradingScript>()); } COM: <s> removes all the </s>
funcom_train/1650434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void innerDeployUpdate() { // Write the jars, config etc. // Then restart UpdateDeployContext ctx; try { ctx = new UpdateDeployContext(); } catch (UpdaterParserException e) { failUpdate("Could not determine which jars are in use: "+e.getMessage()); return; } if(writeJars(ctx)) restart(ctx); else { if(logMINOR) Logger.minor(this, "Did not write jars"); } } COM: <s> deploy the update </s>
funcom_train/40091623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDownload(String facility, Long id, String url) { // TODO nasty hack for Diamond if (facility.equalsIgnoreCase("DIAMOND")) { url = "https://srb.esc.rl.ac.uk/dataportal"; } downloadStore.add(new DownloadModel(facility, id, url)); } COM: <s> add details of a download </s>
funcom_train/14328364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { if (openCount > 0) { if (--openCount == 0 && raFile != null) { if (bufferDirty) { writePage(currentPage); } raFile.close(); raFile = null; // Allow buffer to be garbage collected buffer = EMPTY_BUFFER; currentPage = INVALID_PAGE; } } } COM: <s> logically closes the file or physically close it if the open count is </s>
funcom_train/30075930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelAndView osVersionsHandler(HttpServletRequest request, HttpServletResponse response) throws ServletException, GPIRException { Map model = new HashMap(); model.put("osVersions", gpir.getOsVersions()); model.put("oss", gpir.getOSs()); return new ModelAndView("osVersionsView", "model", model); } COM: <s> custom handler for os versions display </s>
funcom_train/4495784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reviewStates() { Enumeration statesEnum = States.keys(); while(statesEnum.hasMoreElements()) { String stateid = (String)statesEnum.nextElement(); State state = (State)States.get(stateid); reviewStateOnEntryTasks(state); reviewStateTransitions(state); } } COM: <s> since the states may refer to yet to be defined next state verification </s>
funcom_train/5236228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContentAt(int row, int col, Object value) { Object oldValue = getContentAt(row, col); if (oldValue != value || (oldValue != null && !oldValue.equals(value))) { doSetContentAt(row, col, value); firePropertyChange(IContentProvider.Content, oldValue, value); } } COM: <s> delegates the method code do set content at int int object code to </s>
funcom_train/39877344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean launchSuggestion(int position, int actionKey, String actionMsg) { Cursor c = mSuggestionsAdapter.getCursor(); if ((c != null) && c.moveToPosition(position)) { Intent intent = createIntentFromSuggestion(c, actionKey, actionMsg); // launch the intent launchIntent(intent); return true; } return false; } COM: <s> launches an intent based on a suggestion </s>
funcom_train/3747160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doAfterBody() throws JspException { BodyContent bodyContent = getBodyContent(); if(bodyContent != null) { try { JspWriter out = getPreviousOut(); writeTagBodyContent(out, bodyContent); } catch(Exception ex) { throw new JspException("ERROR in HeadTag: " + ex); } } // for this tag, we only want to evluate the body one time return SKIP_BODY; } COM: <s> p this method is called after the jsp engine processes the body </s>
funcom_train/9758108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { if (fOperationCode == -1 || fOperationTarget == null) return; ITextEditor editor= getTextEditor(); if (editor == null) return; if (!validateEditorInputState()) return; Display display= null; IWorkbenchPartSite site= editor.getSite(); Shell shell= site.getShell(); if (shell != null && !shell.isDisposed()) display= shell.getDisplay(); BusyIndicator.showWhile(display, new Runnable() { public void run() { fOperationTarget.doOperation(fOperationCode); } }); } COM: <s> the code text operation action code implementation of this </s>
funcom_train/49871176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enter() { if (current == Thread.currentThread()) monitorEntryCount++; else { boolean interrupted = Thread.interrupted(); for (; ;) try { monitorEntry.down(); break; } catch (InterruptedException ie) { interrupted = true; } current = Thread.currentThread(); monitorEntryCount = 1; if (interrupted) current.interrupt(); } } COM: <s> enter the monitor </s>
funcom_train/32746658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPenaltiesFor() { int pens = 0; MatchEvent me; Enumeration enum = goals_.elements(); while(enum.hasMoreElements()) { me = (MatchEvent)enum.nextElement(); if((!me.getPlayer1().isPlayer(Player.OPPONENT)) && (me.getExtra() == 1)) { pens++; } } return pens; } COM: <s> return the number of pens for </s>
funcom_train/24434775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearToken(String token) { if (token == null) return; try { Connection c = ConnectionSource.getConnection(); String sql = "UPDATE users SET token=NULL WHERE token=:token"; NamedParameterStatement s = new NamedParameterStatement(c, sql); s.setString("token", token); s.executeUpdate(); s.close(); c.close(); } catch (SQLException ex) { logger.error(ex.getMessage(), ex); } } COM: <s> clears a token on a user specified with this token </s>
funcom_train/47491099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Message decodeMessage(String packetBody) { // decomp[] -> "message" - <from> - <timestamp(milliseconds)> - // <the message> String[] decomp = packetBody.split(Watch.SEPARATOR); Message msg = new Message(); msg.setFrom(platIDToPlat(Integer.parseInt(decomp[1]))); msg.setTimestamp(new Timestamp(Long.parseLong(decomp[2]))); msg.setText(decomp[3]); return msg; } COM: <s> parse message headers on a received </s>
funcom_train/14093539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCheckActualObj() throws XMLException { IXMLTestCase tc = m_fixture.getTestCase(); Element e = m_fixture.newElement("impltest", new String[] { "actualobj", "abc" }); m_abstractAssertTagHandler = new ImplAssertTagHandler(e, tc); m_abstractAssertTagHandler.checkActual(); } COM: <s> check the actual value given a object </s>
funcom_train/40516879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyCurrentFault() { GRTCANJaguarException ex = new GRTCANJaguarException(GRTCANJaguarException.CURRENT_FAULT, jag); for (int i = 0; i < listeners.size(); i++) { ((CANJaguarFaultListener) listeners.elementAt(i)).jagCurrentFault(ex); } } COM: <s> notifies all listeners that the jag has a current fault </s>
funcom_train/50940367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexOfChild(Object parent, Object child) { if ( parent == null || child == null ) return -1; SortedSet subSet = (SortedSet)map.get(parent); if ( subSet == null ) { //throw exception not found; return -1; } else { // performance deadpoint : List list = new ArrayList(subSet); return list.indexOf(child); } } COM: <s> returns the index of child in parent </s>
funcom_train/1293565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Part getPartGen() { if (part != null && part.eIsProxy()) { Part oldPart = part; part = (Part) eResolveProxy((InternalEObject) part); if (part != oldPart) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ModelPackage.FROM__PART, oldPart, part)); } } return part; } COM: <s> begin user doc </s>
funcom_train/45552900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final protected void setCode(String code){ editor.setInnerHTML( "" ); for(String k : highlightMap.keySet()) code = code.replaceAll(k,highlightMap.get(k)); for(String k : outModifier.keySet() ) code = code.replaceAll(k,outModifier.get(k)); editor.setInnerHTML( code + caret ); positionCursor( caret ); } COM: <s> sets code in the editor </s>
funcom_train/18746837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CtrlAut normalise() throws FormatException { CtrlAut result = this; if (getInfo().getErrors().isEmpty()) { Set<Set<CtrlState>> equivalence = computeEquivalence(); Map<CtrlState,Set<CtrlState>> partition = computePartition(equivalence); result = computeQuotient(partition); result.setBoundVars(); } return result; } COM: <s> computes and returns a normalised version of this automaton </s>
funcom_train/10498945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ServerState learningState(){ if(self.getLearnerType() == LearnerType.PARTICIPANT){ LOG.debug("I'm a participant: " + self.getId()); return ServerState.FOLLOWING; } else{ LOG.debug("I'm an observer: " + self.getId()); return ServerState.OBSERVING; } } COM: <s> a learning state can be either following or observing </s>
funcom_train/20287384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValid() { if (linkModuleId == -1 || linkItemId == -1) { errors.put("actionError", "Id not specified"); } if (!StringUtils.hasText(subject)) { errors.put("subjectError", "Required field"); } return !hasErrors(); } COM: <s> gets the valid attribute of the file folder object </s>
funcom_train/140081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRPMenuItem addBookmarkMI(JRPMenu parent_menu, Bookmark bm) { JRPMenuItem markMI = (JRPMenuItem) component_hash.get(bm); if (markMI != null) { return markMI; } markMI = new BookmarkJMenuItem(getIdFromName(bm.getName()), bm); component_hash.put(bm, markMI); parent_menu.add(markMI); markMI.addActionListener(this); return markMI; } COM: <s> add passed bookmark to passed menu </s>
funcom_train/35840976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Interface copyInterface(Object source, Object ns) { if (!(source instanceof Interface)) { throw new IllegalArgumentException(); } if (!(ns instanceof Namespace)) { throw new IllegalArgumentException(); } Interface i = createInterface(); ((Namespace) ns).getOwnedElement().add(i); doCopyInterface(source, i); return i; } COM: <s> copies an interface and its features </s>
funcom_train/44717065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFormDataGetParameterNotInModel() { setSubmissionVar(); _page.lock(); createFormData(); try { _formData.get("bogusParameter"); fail("getting parameter not in model failed silently"); } catch (RuntimeException re) { assertTrue("getting parameter not in model threw RuntimeException", true); } } COM: <s> tests that code form data </s>
funcom_train/5855982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void show(int pos) { JPanel newPanel; //remove the old one if (oldPanel != null) { this.getParent().getContentPane().remove(oldPanel); } newPanel = (JPanel) this.panels.elementAt(pos); newPanel.setVisible(true); //add new one this.getParent().getContentPane().add(newPanel,BorderLayout.NORTH); this.getParent().validate(); this.getParent().repaint(); oldPanel = newPanel; //swap for next call } COM: <s> ye olde methode to display a particular panel in the vector </s>