__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/46453996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePanel() { if(getIgnoreRepaint()) { return; // the animation thread will take care of the update } updateTimer.setRepeats(false); // perform only one render event updateTimer.setCoalesce(true); // coalesce render events updateTimer.start(); // start update timer } COM: <s> update the panels buffered image from within a separate timer thread </s>
funcom_train/2398358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("SvnWsSEIPort".equals(portName)) { setSvnWsSEIPortEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/1590497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long convertUTCToLocal(long instantUTC) { int offset = getOffset(instantUTC); long instantLocal = instantUTC + offset; // If there is a sign change, but the two values have the same sign... if ((instantUTC ^ instantLocal) < 0 && (instantUTC ^ offset) >= 0) { throw new ArithmeticException("Adding time zone offset caused overflow"); } return instantLocal; } COM: <s> converts a standard utc instant to a local instant with the same </s>
funcom_train/50757545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* public double getWeightOnWheel(int wheel) { switch (wheel) { case 0: return WEIGHTONFRONT * getWeight() - acceleration * CMTOWHEELBASE / WHEELBASE; case 1: return WEIGHTONFRONT * getWeight() - acceleration * CMTOWHEELBASE / WHEELBASE; case 2: return (1-WEIGHTONFRONT) * getWeight() + acceleration * CMTOWHEELBASE / WHEELBASE; case 3: return (1-WEIGHTONFRONT) * getWeight() + acceleration * CMTOWHEELBASE / WHEELBASE; } return 0; }*/ COM: <s> returns the weight on the given wheel during the last calculation step </s>
funcom_train/38157214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CommandKey getKey(String name) { CommandKey result = null; for(int i = 0; i < keys.size(); i++) { CommandKey item = (CommandKey) keys.get(i); if(name.equals(item.getName())) { result = item; break; } } return result; } COM: <s> get the key with the specified name </s>
funcom_train/33480730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer getIntParam (String name) throws OpenIdException { try { String paramStr = getParam(name); if (paramStr != null) { return new Integer(paramStr); } return null; } catch (NumberFormatException e) { // invalid parameter value, throw a protocol error throw new OpenIdException("Invalid " + name + " parameter", e); } } COM: <s> get code integer code extension parameter value </s>
funcom_train/2329472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MatrixSize readMatrixSize(MatrixInfo info) throws IOException { // Always read the matrix size int numRows = getInt(), numColumns = getInt(); // For coordinate matrices we also read the number of entries if (info.isDense()) return new MatrixSize(numRows, numColumns, info); else { int numEntries = getInt(); return new MatrixSize(numRows, numColumns, numEntries); } } COM: <s> reads in the size of a matrix </s>
funcom_train/16962422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getById( Long id, Session session) throws HibernateException { log.debug("getting User instance with id: " + id); User instance = (User) session.get("com.brevissimus.smartbpm.model.User", id); if (instance == null) { log.debug("get successful, no instance found"); } else { log.debug("get successful, instance found"); } return instance; } COM: <s> code user code get by id </s>
funcom_train/14243898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MNamespace getDisplayNamespace() { MNamespace ns = null; Object target = getTarget(); if(target instanceof MAttribute) { MAttribute attr = ((MAttribute) target); MClassifier owner = attr.getOwner(); if(owner != null) { ns = owner.getNamespace(); } } return ns; } COM: <s> appropriate namespace is the namespace of our class </s>
funcom_train/28977446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void storeObject(SubJob job) throws StoringException { logger.debug("storing in storage: \"" + job); Storage.getInstance().put(job.generateKey(), job.getObject()); if (Storage.getInstance().has(job.generateKey()) == false) { throw new StoringException("storage was not successfull!"); } } COM: <s> store an object in the associated cluster database </s>
funcom_train/42777397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitAllDirs(File dir) { if (dir.isDirectory()) { process(dir); String[] children = dir.list(); for (int i=0; i<children.length; i++) { visitAllDirs(new File(dir, children[i])); } } } COM: <s> process aonly directories under directory </s>
funcom_train/7269763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasGainControl() { if (gainControl == null) { // Try to get Gain control again (to support J2SE 1.5) if ((sourceDataLine != null) && (sourceDataLine .isControlSupported(FloatControl.Type.MASTER_GAIN))) gainControl = (FloatControl) sourceDataLine .getControl(FloatControl.Type.MASTER_GAIN); } return gainControl != null; } COM: <s> returns true if gain control is supported </s>
funcom_train/15927914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSubsignature(IMethodInfo overriding, IMethodInfo overridden) throws ModelException { if (!overridden.getName().equals(overriding.getName())) { return false; } int nParameters= overridden.getParameters().length; if (nParameters != overriding.getParameters().length) { return false; } if (!hasCompatibleTypeParameters(overriding, overridden)) { return false; } return nParameters == 0 || hasCompatibleParameterTypes(overriding, overridden); } COM: <s> tests if a method is a subsignature of another method </s>
funcom_train/3921315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteResource(String collectionName, String resourceName) throws XMLDBException, XindiceException { Collection collection = getCollection(collectionName); if(collection == null) { throw new XindiceException("Collection <" + collectionName + "> was null."); } Resource resource = collection.getResource(resourceName); collection.removeResource(resource); collection.close(); } COM: <s> delete a resource from the collection </s>
funcom_train/23389210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExpressionEvaluator getELEngine() { // The ELogicEngine is not re-iterable, while the "var" EL function // requires expression evaluations. For this reason, we cannot use // thread local memory to store a shared instance of the EL engine. // Always return new instance until a way to optimize this is found. return new ExpressionEvaluator(); } COM: <s> get b thread safe b instance of expression evaluation engine </s>
funcom_train/13271516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXEnd(float xEnd) { if (xEnd != this.xEnd) { float oldXEnd = this.xEnd; this.xEnd = xEnd; clearPointsCache(); this.propertyChangeSupport.firePropertyChange(Property.X_END.name(), oldXEnd, xEnd); } } COM: <s> sets the end point abscissa of this wall </s>
funcom_train/28708204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getScreenplayList() { List list = new LinkedList(); try { WSResponse ws = webservice.vws.getScreenplayList(webservice .getAuthentification()); if (!checkResponse(ws)) return list; return (List) ws.getResultObj(); } catch (RemoteException e) { if (log.isDebugEnabled()) { e.printStackTrace(); } ExplicantoClientPlugin.handleException(e, null); } return list; } COM: <s> returns a list with the screenpplays from the database </s>
funcom_train/10586568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Serializable getKey() { final Request request = ObjectModelHelper.getRequest(oldObjectModel); // for our test, pages having the same value of "pageKey" will share // the same cache location String key = request.getParameter("pageKey"); return ((key == null || "".equals(key)) ? "one" : key); } COM: <s> generate the unique key for the cache </s>
funcom_train/4668284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getActiveLayerId() { // System.out.println("this: " + this); // System.out.println("getActiveServiceId: " + getActiveServiceId()); // System.out.println("getActiveLayer: " + getService(getActiveServiceId()).getActiveLayer()); return getService(getActiveServiceId()).getActiveLayer(); } COM: <s> returns the active layer id </s>
funcom_train/113310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public ContextStack getContextStack(String contextStackKey, HttpServletRequest httpServletRequest) { //Get Context Stack String contextStackIdString = httpServletRequest.getParameter(contextStackKey); String contextStackId = (String) ConvertUtils.convert(contextStackIdString, String.class); return (ContextStack) httpServletRequest.getSession().getAttribute(contextStackId); } COM: <s> get the context stack that is stored in the session </s>
funcom_train/10789803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Column addPrimaryKeyColumn(Table table) { DBDictionary dict = _conf.getDBDictionaryInstance(); Column pkColumn = table.addColumn(dict.getValidColumnName (getPrimaryKeyColumnIdentifier(), table)); pkColumn.setType(dict.getPreferredType(Types.TINYINT)); pkColumn.setJavaType(JavaTypes.INT); return pkColumn; } COM: <s> add the primary key column to the given table and return it </s>
funcom_train/43098056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRecurrence(Object handle, Object expr) { if (handle instanceof MAction && expr instanceof MIterationExpression) { ((MAction) handle).setRecurrence((MIterationExpression) expr); return; } throw new IllegalArgumentException("handle: " + handle + " or expr: " + expr); } COM: <s> set the recurrence of an action </s>
funcom_train/49200006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addImageDbIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor( ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LocalImage_imageDbId_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LocalImage_imageDbId_feature", "_UI_LocalImage_type"), ExhibitionPackage.Literals.LOCAL_IMAGE__IMAGE_DB_ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null) { @Override public boolean canSetProperty(Object object) { return false; } }); } COM: <s> this adds a property descriptor for the image db id feature </s>
funcom_train/46761038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String executeSchedulerJob(final long schedulerJobId, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { SchedulerJobModel scheduledJob = getSchedulerJob(schedulerJobId, call); long jobRefId = scheduledJob.getJobRef().getId(); JobModel job = getJobByRef(jobRefId, call); return executeJob(job, call); }}; return (String) call(method, call); } COM: <s> execute the scheduled job </s>
funcom_train/21446451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onChangeDisplaySettings() { GraphicOptions options = theWorkspace.getGraphicOptions(); GraphicOptionsDialog dlg = new GraphicOptionsDialog(theParent, options); dlg.setVisible(true); if (dlg.getReturnStatus().equals("OK")) { theWorkspace.setDisplay(options.DISPLAY); display_button_group.setSelected(display_models .get(options.DISPLAY), true); this.respondToDocumentChange = true; repaint(); updateResidueActions(); } } COM: <s> change the graphic settings </s>
funcom_train/40929464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getNoCommand1() { if (noCommand1 == null) {//GEN-END:|293-getter|0|293-preInit // write pre-init user code here noCommand1 = new Command("No", Command.OK, 0);//GEN-LINE:|293-getter|1|293-postInit // write post-init user code here }//GEN-BEGIN:|293-getter|2| return noCommand1; } COM: <s> returns an initiliazed instance of no command1 component </s>
funcom_train/24380769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getRVIintermFileName(String rvifile) { try { BufferedReader fr = new BufferedReader (new FileReader (rvifile)); fr.readLine(); String fn = fr.readLine(); fr.close(); return fn; }catch (Exception ex) { ex.printStackTrace(); } return null; } COM: <s> extra read vars output file name from the rvi file </s>
funcom_train/23351026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exportTreeImage() { this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); tree.noLoop(); ExportTreeDialog etd = new ExportTreeDialog(this); etd.setVisible(true); if(this.isActive()) tree.redraw(); this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } COM: <s> exports the current tree and coloring as a pdf with </s>
funcom_train/1441353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User createFriendship(String id) throws ApiException { assert (id != null); requireCredentials(); String url = String.format("http://twitter.com/friendships/create/%s.json", id); PostMethod method = new PostMethod(url); String response = execute(method); return User.newFromJsonString(response); } COM: <s> befriends the user specified in the id parameter as the authenticating </s>
funcom_train/2027244
/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 (this == object) { return true; } if (object == null || !(this.getClass().getName().equals(object.getClass() .getName()))) { return false; } SessionNodeType nodeType = (SessionNodeType) object; return this.ntName.equals(nodeType.ntName); } COM: <s> indicates if this is equal to the specified object </s>
funcom_train/44851891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(NameValue inNameValue) { // Pre: inNameValue not null if (VSys.assertNotNull(this, "add", inNameValue) == Assert.FAILURE) { return; } // Post: Value set inNameValue.setOwingList(this); nameValues().put(inNameValue.getName(), inNameValue); } COM: <s> this method adds a new item to the set </s>
funcom_train/32655553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void login(User user) throws IOException, Net6LoginException { Command command = new Command(Keyword.net6_client_login, user.getUsername(), colorToHexString(user.getColor())); send(command); synchronized (this) { while (!syncFinished) { try { log.debug("Jobby is sleepy..."); wait(); if (loginException != null) { throw loginException; } log.debug("Jobby has awaken again!"); } catch (InterruptedException iex) { log.error("Failed to wait for sync finish.", iex); } } } } COM: <s> logs in to the server as the user of the client instance </s>
funcom_train/2581091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLabelOutlineStroke(Stroke stroke) { if (stroke == null) { throw new IllegalArgumentException("Null 'stroke' argument."); } Stroke old = this.labelOutlineStroke; this.labelOutlineStroke = stroke; this.pcs.firePropertyChange("labelOutlineStroke", old, stroke); } COM: <s> sets the label outline stroke and sends a property change event with </s>
funcom_train/45076482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element toDOM() { // Document document = Content.getDocument(); if (value != null || value != "") { Element elem = new Element("ObsValue"); //Element el = document.createElement("TimeStamp"); elem.appendChild(new Text(value)); //elem.appendChild(el); return elem; } else return null; } COM: <s> convert to dom tree </s>
funcom_train/48184085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double repeatedItems(List words) { previousItems.clear(); double retval = 0; for (int i = 0; i < words.size(); i++) { Word word = (Word) words.get(i); retval += repeatedItems(word); updateItems(word, previousItems); } return retval; } COM: <s> returns the number of repeated items eg stems in the given word list </s>
funcom_train/46458606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFilter(Filter filter) { filters.add(filter); filter.stack = this; filter.addPropertyChangeListener(this); support.firePropertyChange("image", null, null); //$NON-NLS-1$ support.firePropertyChange("filter", null, filter); //$NON-NLS-1$ } COM: <s> adds a filter to the end of the stack </s>
funcom_train/45015315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runStyler(final ComponentConfiguration compConf) { if (this.styler == null) { log.warning("No styler available"); return; } ComponentInfo[] compInfo = compConf.getComponentInfo(); for (int i = 0; i < compInfo.length; i++) { this.styler.applyStyles(compInfo[i]); } } COM: <s> runs the styler on the component configuration </s>
funcom_train/49050040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AccessibilityMetadataEditor (Lom ioLom) { super (ioLom); theAccessibilityElement = getLom().getAccessibility(); if (theAccessibilityElement == null) { theAccessibilityElement = (AccessibilityType) JAXBPath.createJaxbObject( MetadataEditor.getSharedFactory(), "/Accessibility", ioLom ); } } // end MetadataEditor (Lom ioLom) COM: <s> initialize a new instance of this class to use to edit the </s>
funcom_train/18728249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testArrowWidth() { AbstractBaseArrow arrow = getInstance(); try { arrow.setArrowWidth(-2.f); fail(); } catch (IllegalArgumentException e) { assertNotNull(e); } arrow.setArrowWidth(-0.00001f); assertEquals(0.f, arrow.getArrowWidth()); arrow.setArrowWidth(1.234f); assertEquals(1.234f, arrow.getArrowWidth()); } COM: <s> test of get set arrow width method of class abstract base arrow </s>
funcom_train/36558635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPlayerScore(){ int score = 0; for (int i = 0; i < 8; i++) for (int j = 0; j < 8; j++){ if (boardState[i][j].equals(Player.BLACK)){ score++; } } return score; } COM: <s> calculate player 1s score </s>
funcom_train/38997106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SimResults runPowerAnalysis() throws Exception { System.out.print("Step " + currentTimeStep + ": Running power analysis..."); disturbances.apply(currentTimeStep); results = solver.solve(network); results.setTimeStep(currentTimeStep); try { resultsWriter.saveResults(results); } catch (NullPointerException e) { System.err.println("No results output set."); } catch (IOException e) { System.err.println("Could not write results:"); e.printStackTrace(); } return results; } COM: <s> runs a power flow analysis </s>
funcom_train/3577230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeUser(String user){ try { InputStream in = new FileInputStream(serverProp); Properties localProperties = new Properties(); localProperties.load(in); Enumeration enum = localProperties.propertyNames(); for(;enum.hasMoreElements() ;){ String name = (String)enum.nextElement(); if(name.equals("user." + user)) { localProperties.remove(name); properties.remove(name); } } OutputStream out = new FileOutputStream(serverProp); localProperties.store(out, ""); } catch (Exception e){ System.out.println("" + e); } } COM: <s> remove all propertie references for a given user </s>
funcom_train/8774753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @SuppressWarnings("static-access") private void jTextArea2KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextArea2KeyReleased if (evt.getKeyCode() == evt.VK_ENTER) { jTextArea2.setText(""); } }//GEN-LAST:event_jTextArea2KeyReleased COM: <s> if the enter is released cleares the secondary jtext area </s>
funcom_train/19431771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCardPlayedInTrick(final Player otherPlayer, final Card card) { boolean result = false; if (getPlayerPosition().getLeftNeighbor() == otherPlayer) { if (card.equals(leftPlayerTrickCard)) { result = true; } } else if (getPlayerPosition().getRightNeighbor() == otherPlayer) { if (card.equals(rightPlayerTrickCard)) { result = true; } } return result; } COM: <s> checks whether a card was played by another player in the current trick </s>
funcom_train/18745616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int computeHashCode() { final int prime = 31; int result = 1; result = prime * result + this.direction.hashCode(); result = prime * result + this.node.hashCode(); result = prime * result + this.label.hashCode(); result = prime * result + this.origEs.hashCode(); return result; } COM: <s> uses the information from the original edge signature and the bundle </s>
funcom_train/2459494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInterestFact(String factId, float interest, String userType) throws UMException { DoubleKey key = new DoubleKey(userType, factId); s.factProp.add(key, new FFVals()); //fails if key already exists ((FFVals)(s.factProp.getVal(key))).interest = interest; } COM: <s> set the interest of a fact for a user type </s>
funcom_train/9185742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void emitInvokedynamic(int desc, Type mtype) { // N.B. this format is under consideration by the JSR 292 EG int argsize = width(mtype.getParameterTypes()); emitop(invokedynamic); if (!alive) return; emit2(desc); emit2(0); state.pop(argsize); state.push(mtype.getReturnType()); } COM: <s> emit an invokedynamic instruction </s>
funcom_train/29870723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*private JMenu getJMenuNotes() { if (jMenuNotes == null) { jMenuNotes = new JMenu(); jMenuNotes.setText("Notes"); jMenuNotes.setMnemonic(KeyEvent.VK_O); jMenuNotes.add(getJMenuItemSaveAllNotes()); jMenuNotes.add(getJMenuItemCloseAllNotes()); jMenuNotes.add(getJMenuExportNote()); jMenuNotes.add(getJMenuImportNote()); } return jMenuNotes; }*/ COM: <s> this method initializes j menu notes </s>
funcom_train/9760461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateMarkerViews(Annotation annotation) { IMarker marker= null; if (annotation instanceof MarkerAnnotation) marker= ((MarkerAnnotation)annotation).getMarker(); if (marker != null) { try { fIsUpdatingMarkerViews= true; IWorkbenchPage page= getSite().getPage(); MarkerViewUtil.showMarker(page, marker, false); } finally { fIsUpdatingMarkerViews= false; } } } COM: <s> updates visible views that show markers </s>
funcom_train/29768660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDeclaredFieldForInvalidFieldWithBaseClassCheck() { XSpectorTestClass1 tc1 = new XSpectorTestClass1(); ReflectionException wantedExcaption = null; try { @SuppressWarnings("unused") Field field = VSpector.getDeclaredField(tc1.getClass(), "nonExistingField", true); } catch (ReflectionException e) { wantedExcaption = e; } assertNotNull(wantedExcaption); } COM: <s> test and invalid field with </s>
funcom_train/1058685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLocationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PBDiagram_location_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PBDiagram_location_feature", "_UI_PBDiagram_type"), PosterboardPackage.Literals.PB_DIAGRAM__LOCATION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the location feature </s>
funcom_train/9862514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (aNode instanceof Named) { return ((Named) aNode).getName(); } else if (aNode instanceof String) { return (String) aNode; } else { return Messages.getString("_adaptationmodel"); //$NON-NLS-1$ } } COM: <s> get the string representation of this node </s>
funcom_train/5787844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void die() { logger.debug("node shutting down, removing all streams"); while(!outputs.isEmpty()) { String stream = outputs.keySet().iterator().next(); logger.debug("\tremoving stream "+stream); removeStreamServer(stream); } logger.debug("stopping server connection listener."); // close connection listener cl.stop = true; try { if(null != cl.serverSocket) { cl.serverSocket.close(); } } catch (IOException e) { logger.warn("could not close server connection listener socket"); } logger.debug("node shut down"); } COM: <s> this node is shutting down disconnect all clients and remove all </s>
funcom_train/42012718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTFCantidadADescontar() { if (jTFCantidadADescontar == null) { jTFCantidadADescontar = new JTextField(); jTFCantidadADescontar.setText("0 €"); jTFCantidadADescontar.setSize(new Dimension(189, 20)); jTFCantidadADescontar.setHorizontalAlignment(JTextField.TRAILING); jTFCantidadADescontar.setLocation(new Point(182, 302)); } return jTFCantidadADescontar; } COM: <s> this method initializes j tfcantidad adescontar </s>
funcom_train/18872222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { g.drawImage(image, 0, 0, _width, _height, this); ICalque m; for (Enumeration En = calquesVector.elements(); En.hasMoreElements();) { m = (ICalque) En.nextElement(); m.paint(g, _dim); } } COM: <s> this method draw the map and all calques </s>
funcom_train/4542595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean processTrueOrFalse() throws HsqlException { String sToken = tokenizer.getSimpleToken(); if (sToken.equals(Token.T_TRUE)) { return true; } else if (sToken.equals(Token.T_FALSE)) { return false; } else { throw Trace.error(Trace.UNEXPECTED_TOKEN, sToken); } } COM: <s> retrieves boolean value corresponding to the next token </s>
funcom_train/18594296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testKeyStrokeParsing() { assertEquals("Normal 'a'", KeyStroke.getKeyStroke(KeyEvent.VK_A, 0), KeyStrokeMap.getKeyStroke('a')); assertEquals("Shifted 'a'", KeyStroke.getKeyStroke(KeyEvent.VK_A, InputEvent.SHIFT_MASK), KeyStrokeMap.getKeyStroke('A')); } COM: <s> check proper generation of keystrokes given key codes </s>
funcom_train/50373574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateSelectedStates(String stateName) { if(!(stateListModel.contains(stateName))) { stateListModel.addElement(stateName); int index = stateListModel.getSize()-1; serviceStateList.addSelectionInterval(index,index); synchronized(selectedServiceStateNames) { selectedServiceStateNames.add(stateName); } return true; } return false; } COM: <s> check if this is a new state name </s>
funcom_train/50392067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validateActivities(ArrayList<WFActivity> acts){ ArrayList<WFParameter> parameters; for (int i = 0; i < acts.size(); i++) { parameters=acts.get(i).getParameters(); for (int j = 0; j < parameters.size(); j++) { if(!parameters.get(j).isValid()) return false; } } return true; } COM: <s> proove activitie parameters </s>
funcom_train/3904112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUseCurrentAttemptProgressInfoPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ControlModeType_useCurrentAttemptProgressInfo_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ControlModeType_useCurrentAttemptProgressInfo_feature", "_UI_ControlModeType_type"), ImsssPackage.Literals.CONTROL_MODE_TYPE__USE_CURRENT_ATTEMPT_PROGRESS_INFO, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the use current attempt progress info feature </s>
funcom_train/27727671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VectorN getPositionAt(double time) { int i=0; while(i<this.size() && this.getTimeAt(i)<=(time+1e-5)){ if(Math.abs(this.getTimeAt(i)-time)<1e-5){ double[] data = this.traj.get(i); return new VectorN(data[1],data[2],data[3]); } i++; } System.err.println("Trajectory.getStateAt: unable to find position data at: "+time+" nearest: "+this.getTimeAt(i)); return new VectorN(3); } COM: <s> returns the position at the given modified julian date or sim time </s>
funcom_train/2801147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toRaccoonXml() { String xml = "\t<raccoonBean name=\""; xml += mBeanName + "\">\n"; Iterator walker = mFields.iterator(); while (walker.hasNext()) { RaccoonField field = (RaccoonField) walker.next(); xml += field.toRaccoonXml() + "\n"; } xml += "\t</raccoonBean>"; return xml; } COM: <s> converts the contents of this instance into a raccoon xml string </s>
funcom_train/42087361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_createDateWithNegativeValues() { Date testDay = DateUtils.createDate(1989, -4, 11); Date notMyBDay = new GregorianCalendar(1989, -4, 11).getTime(); assertEquals(testDay, notMyBDay); } COM: <s> tests whether create date creates a correct date when given negative month values </s>
funcom_train/36676424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setup(boolean lock, boolean flush){ lockpos = lock; if(type!=null && flush) type.flush(); Listener animationTerminator = new Listener(this); timer = new Timer(20, animationTerminator); timer.setInitialDelay(delay*20 + 20); timer.setCoalesce(false); b.queue.add(this); } COM: <s> this initializes the timers </s>
funcom_train/27821798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void elementsRemovedInternal(Graph graph,Collection nodes,Collection edges) { if (nodes!=null) { Iterator iterator=nodes.iterator(); while (iterator.hasNext()) { Node node=(Node)iterator.next(); if (node.equals(m_node)) abortEditing(); } } } COM: <s> processes the elements removed event </s>
funcom_train/34184423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTexture(Face face, Texture texture) { if (face == null) { throw new IllegalArgumentException("Face can not be null."); } skyboxQuads[face.ordinal()].clearRenderState(RenderState.RS_TEXTURE); setTexture(face, texture, 0); } COM: <s> set the texture to be displayed on the given face of the skybox </s>
funcom_train/45018492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXsource_type_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXsource_type_feature", "_UI_NXsource_type"), NexusPackageImpl.Literals.NXSOURCE__TYPE, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the type feature </s>
funcom_train/21739938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onHaxeProjectsBrowseButton() { ElementTreeSelectionDialog dialog = StandardDialogs.createHaxeProjectsDialog(getShell()); if (dialog.open() == Window.OK) { Object result = dialog.getFirstResult(); if (result instanceof IHaxeProject) { updateHaxeProject((IHaxeProject)result); } else { EclihxUIPlugin.getLogHelper().logError( "Ivalid result value in " + "NewBuildFileWizardPage.onHaxeProjectsBrowseButton"); } } } COM: <s> handler of the ha xe projects browse button </s>
funcom_train/22288263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JArrayType getArrayType(JType componentType) { JArrayType arrayType = (JArrayType) arrayTypes.get(componentType); if (arrayType == null) { arrayType = new JArrayType(componentType); arrayTypes.put(componentType, arrayType); } return arrayType; } COM: <s> gets the type object that represents an array of the specified type </s>
funcom_train/4205936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected StyleRange prepareStyleRange(StyleRange styleRange, boolean applyColors) { // if no colors apply or font is set, create a clone and clear the // colors and font if (!applyColors && (styleRange.foreground != null || styleRange.background != null)) { styleRange = (StyleRange) styleRange.clone(); if (!applyColors) { styleRange.foreground = null; styleRange.background = null; } } return styleRange; } COM: <s> prepares the given style range before it is applied to the label </s>
funcom_train/36557798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getHairColor(float[] rgbOut) { if (rgbOut == null || rgbOut.length < 3) throw new IllegalArgumentException("Unacceptable array provided!"); rgbOut[0] = hairColor[0]; rgbOut[1] = hairColor[1]; rgbOut[2] = hairColor[2]; } COM: <s> retrieve the hair color </s>
funcom_train/29516156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadVariation() { try { variationDriver = VariationDriverFactory.createVariationDriver( Variables.get("host"), Integer.valueOf(Variables.get("port")), Variables.get("SNPvardb"), Variables.get("user"), Variables.get("password")); variationDriver.setCoreDriver(coreDriver); vfa = variationDriver.getVariationFeatureAdaptor(); if (vfa == null) { LB.error("Variation Database could not be loaded!"); LB.die(); } } catch (AdaptorException ae) { LB.error("Could not initialize Variation Database Connection. Please check config file."); LB.error("Message from Java environment (could be null): " + ae.getMessage()); LB.die(); } } COM: <s> this function loads the variation driver database and the associated adaptors </s>
funcom_train/14310149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performLogin() { try { //Attempt to authenticate: loginContext.login(); //Set up the user subject: userSubject = loginContext.getSubject(); //Show a welcome message and the menue: userInputOutput.showInformation( "Welcome, you successfully logged in." ); userInputOutput.showMenue(); } catch ( LoginException e ) { //Show an error message: userInputOutput.showInformation( "Some errors occured during login:\n" + e.toString() ); } } COM: <s> performs the login over the jaas login configuration </s>
funcom_train/36953809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBackslashesInFilePath() throws Exception { fileChecker.addKnownFile("C:\\ruby\\lib\\ruby\\gems\\1.8\\gems\\rails-1.2.3\\lib/commands/server.rb"); console.lineAppend("\tfrom C:\\ruby\\lib\\ruby\\gems\\1.8\\gems\\rails-1.2.3\\lib/commands/server.rb:1") ; console.assertLinkCount(1); console.assertLink(6, 67, "C:\\ruby\\lib\\ruby\\gems\\1.8\\gems\\rails-1.2.3\\lib/commands/server.rb", 1, 0); } COM: <s> from http www </s>
funcom_train/27715370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public WorldLocation getCentre() { double dLat = getHeight() / 2.0; double dLong = getWidth() / 2.0; double dDepth = getDepthRange() / 2.0; WorldLocation res = new WorldLocation(_bottomRight.getLat() + dLat, _topLeft.getLong() + dLong, _bottomRight.getDepth() + dDepth); return res; } COM: <s> function to determine the centre of the area </s>
funcom_train/4779906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getAddRepositoryButton() { if (addRepositoryButton == null) { addRepositoryButton = new JButton(); addRepositoryButton.addActionListener(this); addRepositoryButton.setActionCommand(ActionConstants.ADD_REPOSITORY_ACTION); addRepositoryButton.setText(ResourceUtil.getString(type + ".addrepository")); addRepositoryButton.setToolTipText(ResourceUtil.getString(type + ".addrepository.tooltip")); addRepositoryButton.setFont(GuiConstants.FONT_BOLD_NORMAL); } return addRepositoryButton; } COM: <s> this method initializes add repository button </s>
funcom_train/19242932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLandmarkOffsetForBlock(final int blockNumber) { int offset = 0; if (0 <= blockNumber && blockNumber < pos.size()) { Position[] p = (Position[]) pos.get(blockNumber); if (p != null) { // no empty block? offset = p[2].getOffset(); } } return offset; } COM: <s> get offset for landmark position of block </s>
funcom_train/8250240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAllEvents() throws DaoException { List<Event> events = eventDao.getAllEvents(getCalendarForWebicalUser()); assertNotNull(events); assertEquals(47, events.size()); Long calendarId = getCalendarForWebicalUser().getCalendarId(); for(Event event: events) { assertEquals(calendarId, event.getCalendar().getCalendarId()); } } COM: <s> tests the get all events method and the store events </s>
funcom_train/14437636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeForm() { ModelService.getInstance().getAccountChanges() .setShouldlDeleteStatusForAll(false); // Saving table information to registry ModelService.getInstance().getPreferencesWorker().saveTableInfo( tableOtherAccounts); // Stopping all checks ModelService.getInstance().getMailJobFactory().stopAll(); if (!disposing) { try { this.disposing = true; dialog.setVisible(false); dialog.dispose(); } catch (Exception e) { } } } COM: <s> closing form and disposing </s>
funcom_train/16640435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnect() { if (outputStream != null) { try { if (loggedIn) { logout(); } outputStream.close(); inputStream.close(); connectionSocket.close(); } catch (IOException e) { logger.error(e.getMessage()); } outputStream = null; inputStream = null; connectionSocket = null; } } COM: <s> disconnects from the host to which we are currently connected </s>
funcom_train/41878135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findPosition(char s) { int pos = 0; String sym; for (int i = 0; i < getSizeOfAlphabet(); i++) { sym = (String) alphabet.get(i); if (sym.compareTo(String.valueOf(s)) == 0) { pos = i; } } return pos; } COM: <s> find position of the given symbol </s>
funcom_train/6328854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DxCollection allGroups() { DxCollection groups = null; //load the collection from the database try { groups = AdminGui.instance().getAdmin().allGroups(); return groups; } catch (Exception e) { e.printStackTrace(); MessageBox.showError("List Groups", "Unable to retrieve all groups: " + e.getMessage()); return groups; } } COM: <s> this method gets the collection of groups </s>
funcom_train/17927211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getNodeListsByName ( String requestString ) throws org.xml.sax.SAXException { requestString = requestString.replaceAll( " " , "" ) ; String [] requestArray = requestString.split(",") ; Vector responseVector = new Vector(); responseVector = this.ProcessgetNodeListsByName( this.initElement , requestArray , responseVector, 0 ) ; return responseVector; } COM: <s> retrieve node lists from an xml dom tree </s>
funcom_train/45233618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void newTmembertrainingWizard() { // fLogger.info("newTmemberBadgesWizard:" + myunit.getId() + ":" // + selectedTmember); TmembertrainingoldDialog tmembertrainingoldDialog = new TmembertrainingoldDialog( new JFrame()); if (tmembertrainingoldDialog.getEnteredTmembertraining()) { tmembertrainingoldDialog.getTmembertraining().setTmember( selectedTmember); session = HibernateUtil.beginTransaction(); session.saveOrUpdate(tmembertrainingoldDialog.getTmembertraining()); session.refresh(selectedTmember); HibernateUtil.commitTransaction(); popaddRowTmembertraining(tmembertrainingoldDialog .getTmembertraining()); tableTmembertraining.revalidate(); } } COM: <s> new tmembertraining wizard </s>
funcom_train/9197052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List transform(List inputNodes) throws XSLTransformException { JDOMSource source = new JDOMSource(inputNodes); JDOMResult result = new JDOMResult(); result.setFactory(factory); // null ok try { templates.newTransformer().transform(source, result); return result.getResult(); } catch (TransformerException e) { throw new XSLTransformException("Could not perform transformation", e); } } COM: <s> transforms the given input nodes to a list of output nodes </s>
funcom_train/37831793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRequiredItemName(final String name, final int index) { if (!player.hasQuest(name)) { logger.error(player.getName() + " does not have quest " + name); return ""; } String questSubString = getQuest(name, index); final String[] elements = questSubString.split("="); String questItem = elements[0]; return questItem; } COM: <s> gets the recorded item stored in a substate of quest slot </s>
funcom_train/48664758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleHostStateChanged(String host, int serviceID, ServiceState state) { try { HostNode node = findHostNode(host); if(node == null) { if(logger.isTraceEnabled()) { logger.error("Couldn't find host node for: " + host, new Throwable()); } return; } node.setHostState(serviceID, state); nodeChanged(node); fireHostUpdated(node); fireModelChanged(node.getResourceId(), RoughListener.CHANGE_HOSTS, RoughListener.CHANGE_TYPE_UPDATED); } catch(Exception ex) { logger.error(ex); } } COM: <s> changes the host service state </s>
funcom_train/28664171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int calcBiggestBarIndex() { int biggest = -9999999; for (int i = 0; i < bars.size(); i++) if (((Bar) bars.get(i)).index > biggest) biggest = ((Bar) bars.get(i)).index; return biggest; } COM: <s> calculates the biggest index a bar in the bars array has </s>
funcom_train/10597999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateCache(String cacheKey, XMLResourceBundle bundle) { try { this.cache.store(cacheKey, bundle); } catch (IOException e) { getLogger().error("Bundle <" + bundle.getSourceURI() + ">: unable to store.", e); } } COM: <s> stores bundle in the cache </s>
funcom_train/12963166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JScrollPane createScroller() { JScrollPane sp = new JScrollPane( null, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER ); sp.setHorizontalScrollBar(null); sp.setBorder(BorderFactory.createEmptyBorder()); return sp; } COM: <s> creates the scroll pane which houses the scrollable list </s>
funcom_train/45604954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Reaction getReaction(Ingredient ingredient1, Ingredient ingredient2) { Reaction result = null; for (int x=0; x < reactions.length; x++) { Reaction reaction = reactions[x]; if ((reaction.getIngredient1() == ingredient1) && (reaction.getIngredient2() == ingredient2)) { result = reaction; break; } } return result; } COM: <s> gets a reaction between two ingredients </s>
funcom_train/13417572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void attach(Spatial node) { camera .getScreenCoordinates(node.getLocalTranslation(), pickedScreenPos); camera.getWorldCoordinates(mousePosition, pickedScreenPos.z, pickedWorldOffset); pickedWorldOffset.subtractLocal(node.getLocalTranslation()); picked = node; pickingNode.getLocalTranslation().set(node.getLocalTranslation()); this.initialPosition.set(pickingNode.getLocalTranslation()); } COM: <s> override the attach method here to invoke it alone </s>
funcom_train/21465268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jLabel = new JLabel(); jLabel.setBounds(new Rectangle(10, 11, 177, 15)); jLabel.setText("Visual Software Agents"); jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(jLabel, null); jContentPane.add(getJTable(), null); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/28170555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int nextChar() throws IOException { if (pushedBack) { throw new IllegalStateException("can't read char when a token has been pushed back"); } if (peekc == NEED_CHAR) { return read(); } else { int ch = peekc; peekc = NEED_CHAR; return ch; } } COM: <s> reads the next character from the input stream without </s>
funcom_train/17848034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document createDefaultDocument() { StyleSheet styles = getStyleSheet(); StyleSheet ss = new StyleSheet(); ss.addStyleSheet(styles); ExtendedHTMLDocument doc = new ExtendedHTMLDocument(ss); doc.setParser(getParser()); doc.setAsynchronousLoadPriority(4); doc.setTokenThreshold(100); return doc; } COM: <s> create an uninitialized text storage model that is appropriate for this </s>
funcom_train/49789913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAnotherRole() throws Exception { IFile sitemap = doStandardLoginAs("default@openiaml.org", "test123"); assertNoProblem(); try { gotoSitemapWithProblem(sitemap, "target"); fail("Should not be able to access 'target' page"); } catch (FailingHttpStatusCodeException e) { // expected checkExceptionContains(e, "User of type 'current instance' did not have permission 'a different permission'"); } } COM: <s> log in as default role doesnt work </s>
funcom_train/16586127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void trimToSize() { modCount++; int oldCapacity = elementData.length; if (size < oldCapacity) { int[] oldData = elementData; elementData = new int[size]; System.arraycopy(oldData, 0, elementData, 0, size); } } COM: <s> trims the capacity of this tt int list tt instance to be the </s>
funcom_train/9298413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected final String TEXT_106 = NL + NL + "\t/**" + NL + "\t * @see HttpServlet#doHead(HttpServletRequest, HttpServletResponse)" + NL + "\t */" + NL + "\tprotected void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}"; COM: <s> protected final string text 105 nl nl t nl t </s>
funcom_train/6332360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Storable storable, StorageFactory storageFactory) { if (log.isLoggable(Level.FINER)) log.finer("enqueueing " + storable + " for deletion"); DeleteTask deleteTask = new DeleteTask(storable, storageFactory); asyncExec.put(deleteTask, deleteTask); } COM: <s> places a storable into a delete queue </s>
funcom_train/40386323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParameterValue(String name) { String parameterValue = null; if (parameters == null) { return null; } else { for (int i = 0; i < parameters.size(); i++) { if (parameters.elementAt(i).getName().equals(name)) { parameterValue = parameters.elementAt(i).getValue(); } } return parameterValue; } } COM: <s> gets a repository parameter if it exists from the list of additional </s>