__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/2759827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object jsEval(JSObject thisObj, String source, String sourceName, int startLine) { Navigator navigator = getNavigator(false); if(navigator != null) { source = navigator.getNavigatorCallback().preEvaluateScript(source); } return super.jsEval(thisObj, source, sourceName, startLine); } COM: <s> javascript evaluation has to be reported to the callback </s>
funcom_train/51182984
/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 ("DBLPPlusPlusPort".equals(portName)) { setDBLPPlusPlusPortEndpointAddress(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/45255315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addContributorsFor(List types, List result) { for (Iterator classes = types.iterator(); classes.hasNext();) { Class clazz = (Class) classes.next(); List contributorList = (List) contributors.get(clazz.getName()); if (contributorList != null) { result.addAll(contributorList); } } } COM: <s> adds contributors for the given types to the result list </s>
funcom_train/48559963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem2() { if (stringItem2 == null) {//GEN-END:|360-getter|0|360-preInit stringItem2 = new StringItem("\u0426\u0432\u0435\u0442 \u0432\u043E\u043B\u043E\u0441", null);//GEN-LINE:|360-getter|1|360-postInit }//GEN-BEGIN:|360-getter|2| return stringItem2; } COM: <s> returns an initiliazed instance of string item2 component </s>
funcom_train/44154616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAutoDetectAnnotatedPackages(String[] annotatedPackages) { final Package[] packages = Package.getPackages(); HashSet<String> detectedAnnotatedPackages = new HashSet<String>(); for (String prefix : annotatedPackages) { for (Package p : packages) { if (p.getName().startsWith(prefix)) { detectedAnnotatedPackages.add(p.getName()); } } } setAnnotatedPackages(detectedAnnotatedPackages.toArray(new String[0])); } COM: <s> specify the names of annotated packages for which including all </s>
funcom_train/4744162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long allowedTime(CallType callType) { long allowedTime = 0; if (callType == CallType.APPLICATION) { allowedTime = RepeatData.HOURLY.getValue(); } else if (callType == CallType.INSTANCE) { allowedTime = RepeatData.HOURLY.getValue(); } else if (callType == CallType.VOLUME) { allowedTime = RepeatData.MONTHLY.getValue(); } return allowedTime; } COM: <s> get the refresh time of a running instance or application or existing </s>
funcom_train/38224352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String transform(){ try { StringWriter writer = new StringWriter(); result = new StreamResult(writer); transformer.transform( source, result ); return writer.getBuffer().toString(); } catch (Exception e ) { e.printStackTrace(); return "XSLTransformer:" + e; } } COM: <s> perform xsl transformation </s>
funcom_train/5671943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean collectCycle(List list) { if (list.contains(this)) { list.add(this); return true; } list.add(this); for (Iterator i = getEfferents().iterator(); i.hasNext();) { JavaPackage efferent = (JavaPackage)i.next(); if (efferent.collectCycle(list)) { return true; } } list.remove(this); return false; } COM: <s> collects the packages participating in the first package dependency cycle </s>
funcom_train/3702361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValue(String strKey) { //// 1. If retrieving Tuples, then update it first. if (KEY_TUPLES.equals(strKey)) { updateTupleLogEntryValue(); } //// 2. Delegate up. return (super.getValue(strKey)); } // of method COM: <s> overrides for key key tuples to update it properly </s>
funcom_train/27960264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLeastMaximum(int field) { switch (field) { case WEEK_OF_YEAR: return 52; case DAY_OF_MONTH: return 28; case DAY_OF_YEAR: return 365; case DAY_OF_WEEK_IN_MONTH: case WEEK_OF_MONTH: return 4; default: return maximums[field]; } } COM: <s> gets the smallest maximum value that is allowed for the </s>
funcom_train/51657662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onFocusRegionChanged(ChangeRegion previousRegion, ChangeRegion nextRegion) { if (DEBUG) System.out.println("region: " + previousRegion + " > " + nextRegion); //$NON-NLS-1$ //$NON-NLS-2$ fFocusRegion= nextRegion; Revision revision= nextRegion == null ? null : nextRegion.getRevision(); updateFocusRevision(revision); } COM: <s> handles a changing focus region </s>
funcom_train/16188919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadHeaderAttributes(Hashtable ht) { ht.put(new Integer(AgentAPI.ATTR_USERUNIVERSALID),"HTTP_SM_UNIVERSALID"); ht.put(new Integer(AgentAPI.ATTR_AUTH_DIR_NAME), "HTTP_SM_AUTHDIRNAME"); ht.put(new Integer(AgentAPI.ATTR_USERDN), "HTTP_SM_USERDN"); ht.put(new Integer(AgentAPI.ATTR_USERNAME), "HTTP_SM_USER"); } COM: <s> helper function to load human literals for those siteminder response numbers </s>
funcom_train/5340455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private static class NullFileView extends FileView { public String getDescription(File f) { return null; } public Icon getIcon(File f) { return null; } public String getName(File f) { return null; } public String getTypeDescription(File f) { return null; } public Boolean isTraversable(File f) { return Boolean.FALSE; } } COM: <s> a simple file view for returning null objects when we cant get </s>
funcom_train/18352301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CapCommon changeHandle(CapCommon capCommon) { cacheRemove(capCommon); //capCommon.forgetReferences(); TODO complete() seems to reset FK object pointers! CapCommon newCapCommon = (CapCommon) capCommon.complete(); newCapCommon.forgetReferences(); cacheInsert(newCapCommon); capCommon.fireCapCommonHandleChangedEvent(newCapCommon); return newCapCommon; } COM: <s> change an instances handle </s>
funcom_train/39024180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNameCriterion() { System.out.println("setNameCriterion"); String name = ""; BasicSearchCriteria instance = new BasicSearchCriteria(); BasicSearchCriteria expResult = instance; BasicSearchCriteria result = instance.setNameCriterion(name); assertEquals(expResult, result); } COM: <s> test of set name criterion method of class basic search criteria </s>
funcom_train/16174905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String putWiki (String name, String content) throws WikiException { String status=null; //Save woot WootSession ws = front.edit(new WootPage(name)); ws.setContent(content); try { Patch p = ws.save(); back.deliverPatch(p); } catch (Exception e1) { e1.printStackTrace(); } Wiki w = new Wiki(); w.save(name,content); WikiService wis= new WikiService(); try { status=wis.putWiki(w); if (status == null) { wis.updatelistWiki(name); } } catch (WikiException e) { e.printStackTrace(); } return status; } COM: <s> method to save wiki in the easypastry node </s>
funcom_train/42068254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDataPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ChunkUnknown_data_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ChunkUnknown_data_feature", "_UI_ChunkUnknown_type"), WavPackage.Literals.CHUNK_UNKNOWN__DATA, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the data feature </s>
funcom_train/35848400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveAction() throws Exception { Object action = Model.getCommonBehaviorFactory().createUninterpretedAction(); Model.getCollaborationsHelper().setAction(elem, action); Model.getCollaborationsHelper().setAction(elem, null); ThreadHelper.synchronize(); assertEquals(0, model.getSize()); assertTrue(model.isEmpty()); } COM: <s> test set action for removing </s>
funcom_train/32753377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void plot( final List<ChannelTimeRecord> records, final Date timeStamp ) { if ( records.size() == 2 ) { final CorrelationPoint2D point = new CorrelationPoint2D( records, timeStamp ); PLOT_BUFFER.add( point ); CORRELATION_PLOT.addCurveData( point.getCurveData() ); drawRecentCrossHair( point ); trimBuffer(); } } COM: <s> plot the new correlation point </s>
funcom_train/44812758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteAttributeValues(IAttributeHolder holder) throws DAOException, RemoveException { if (holder == null) { return; } List<AttributeValue> attributeValues = getAttributes(holder); if (attributeValues == null || attributeValues.size() == 0) { return; } for (AttributeValue attrVal : attributeValues) { attributeManager.doDeleteAttributeValue(attrVal); } } COM: <s> delete attribute values from holder </s>
funcom_train/12652717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Invitation invitation1, Invitation invitation2) { // Unknown is always sorted after known Date created1 = (invitation1 == null) ? null : invitation1.getCreated(); Date created2 = (invitation2 == null) ? null : invitation2.getCreated(); if ((created1 == null) && (created2 == null)) return 0; if (created1 == null) return 1; if (created2 == null) return -1; // Invert the comparison so most recent date is sorted higher return created2.compareTo(created1); } COM: <s> sorts in descending order of creation date </s>
funcom_train/51187502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getSettingListPane() { if (settingListPane == null) { settingListPane = new JScrollPane(); settingListPane.setPreferredSize(new Dimension(200, 250)); settingListPane.setBorder(BorderFactory.createMatteBorder(5, 5, 5, 5, new Color(221, 240, 255))); settingListPane.setViewportView(getSettingList()); } return settingListPane; } COM: <s> this method initializes setting list pane </s>
funcom_train/3387600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int calcMaxValue(Object propertyName, int value) { // Get maximal value from parent client property int maxValue = getParentIntProperty(propertyName); // Store new maximal width in parent client property if (value > maxValue) { if (miParent != null) { miParent.putClientProperty(propertyName, value); } return value; } else { return maxValue; } } COM: <s> calculates and returns maximal value through specified parent component </s>
funcom_train/32057567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsHTMLFlavor() { System.out.println("testIsHTMLFlavor"); // Add your test code below by replacing the default call to fail. BasicTransferable x = new BasicTransferable(); DataFlavor f = new DataFlavor(); assertEquals("is HTML Flavor", x.isHTMLFlavor(f), false); } COM: <s> test of is htmlflavor method of class basic transferable </s>
funcom_train/26517910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOpCode( OpCode oc ) { // // if we're not set up with broken out ops fix that // // question here-- are we adding ops using this method? // if not, we've got a problem // if ( mOps == null ) getOpCount(); // // work stacks and locals // processStackAndLocals( oc ); // // set the op // mOps.push( oc ); mUseBytes = false; } COM: <s> adds to the top of the stack </s>
funcom_train/50873505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nameList() throws IOException { spi.reply("150 Opening ASCII Transer"); dataConnection.connect(); PrintStream dataStream = new PrintStream(dataConnection.getOutputStream()); File[] files = currentDirectory.listFiles(); for (int i = 0; i < files.length; i++) { dataStream.println(files[i].getName()); } dataConnection.disconnect(); spi.reply("226 Transfer Complete"); } COM: <s> method name list </s>
funcom_train/40539718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Graph subGraph(LinkedList<Vertex> h, Graph g){ Graph sub = new Graph(); sub.vertList.addAll(h); for (Vertex v: h){ for (Vertex u: g.vertList){ Edge e = new Edge(v, u); if (g.edgeList.contains(e)){ if (!sub.edgeList.contains(e)){ sub.edgeList.add(g.edgeList.get(edgeList.indexOf(e))); } } } } sub.GenerateAdjacencyList(); //print(sub); return sub; } COM: <s> takes a list of vertices in g and induces a subgraph </s>
funcom_train/16498676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void firePropertyChanged( String name, Object oldValue, Object newValue) { PropertyChangeEvent e = new PropertyChangeEvent( this, name, oldValue, newValue); synchronized (propertyChangeListeners) { for ( Iterator i=propertyChangeListeners.iterator(); i.hasNext(); ) { ((PropertyChangeListener) i.next()).propertyChange( e); } } } COM: <s> notifies the listeners of a change to the preferences </s>
funcom_train/46768520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getWidth() { if(bounds instanceof Box) { Box b = (Box)bounds; return b.getSize().getX(); } else if(bounds instanceof Circle) { Circle c = (Circle)bounds; return c.getRadius() * 2; } else if(bounds instanceof Line) { Line l = (Line)bounds; return Math.abs(l.getX2() - l.getX1()); } return bounds.getBounds().getWidth(); } COM: <s> returns the width of this actors bounding box </s>
funcom_train/3836360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonCopy() { if (jButtonCopy == null) { jButtonCopy = new JButton(); jButtonCopy.setIcon(new ImageIcon(getClass().getResource( "/icons/edit-copy.png"))); jButtonCopy.setToolTipText("Copy (crlt-C)"); jButtonCopy.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { editedScore.copySelection(); refresh(); } }); } return jButtonCopy; } COM: <s> this method initializes j button copy </s>
funcom_train/107106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double handRank(Card c1, Card c2, CardGroup h, int np) { double HR = handRank(c1, c2, h); double H = HR; for (int j = 0; j < (np - 1); j++) H *= HR; return H; } COM: <s> calculates the probability of having the best hand against several </s>
funcom_train/47950730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayQuestion(ArrayList<String> q) { //Question questionTextLabel.setText(q.get(0)); //Previous answer (it will be empty if it doesn't exist) answerField.setText(q.get(1)); //Extended explanation of what the question means this.explanationText = q.get(2); //the alert window will display this text //Recommended default value recommendationTextLabel.setText(q.get(3)); } COM: <s> display the contents of the question in the gui fields </s>
funcom_train/10683932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUnknownAttributeAction(String unknownAttributeAction) { this.unknownAttributeAction = unknownAttributeAction; if (!PASS.equals(unknownAttributeAction) && !ERROR.equals(unknownAttributeAction) && !STRIP.equals(unknownAttributeAction)) { throw new RuntimeException("Incorrect option for -U, " + unknownAttributeAction); } } COM: <s> tell the compressor what to do if an unknown attribute is encountered </s>
funcom_train/44999240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finish() throws ConsequenceException { try { boc.resolveInstances(context); boc.createAtomics(context); java.util.Vector atomics = boc.getAtomics(); doAtomics(atomics); } catch (ConsequenceException e) { ConsequenceLog.LOG.error("failed to finish Consequence on " + context.getCurrent() + ": [" + boc + "]" + " because : " + e.getMessage()); } } COM: <s> this methode is called by the manager when the consequence shoul be </s>
funcom_train/49320641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCatalogs(List<Catalog> catalogs) { _catalogs = catalogs; int n = _catalogs.size(); for (int i = 0; i < n; i++) { Catalog cat = _catalogs.get(i); cat.setParent(this); CatalogFactory.registerCatalog(cat, isLocal()); } _fireTreeStructureChanged(_getTreeModelEvent(this)); } COM: <s> set the list of catalogs in this catalog directory </s>
funcom_train/48150922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDensity(double x) { double density=0.0; if (x > 0) density = (x/(sigma*sigma))*Math.exp(-(x*x+nu*nu)/(sigma*sigma*2))*I0((x*nu)/(sigma*sigma)); return density; } COM: <s> this method computes the rician density function </s>
funcom_train/19418801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActionErrors validate(final ActionMapping mapping, final HttpServletRequest request) { final ActionErrors errors = super.validate(mapping, request); if (getToFolder() == null || getToFolder().trim().equals("")) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.moveCopy.toFolder.required")); } return errors; } COM: <s> calls the super classs validate method and makes sure the to folder field </s>
funcom_train/31301705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean after(Calendar c) { if (c.get(Calendar.HOUR) < _hour) { return true; } else if (c.get(Calendar.HOUR_OF_DAY) == _hour) { if (c.get(Calendar.MINUTE) < _minute) { return true; } } return false; } COM: <s> tests the passed calendar against the hour and minute </s>
funcom_train/10364044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { Section cloned = new Section(); cloned.setName(name); for (String attributeName: getAttributeKeys()) { Attribute attribute = getAttribute(attributeName); cloned.storeAttribute(new Attribute(attribute.getName(), attribute.getValue())); } return cloned; } COM: <s> clone this section </s>
funcom_train/35082784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String whoAmI() { StringBuffer sb = new StringBuffer(); sb.append(Thread.currentThread().getName()); sb.append("@"); sb.append(Integer.toHexString(hashCode())); sb.append("-"); sb.append(getName()); return sb.toString(); } COM: <s> generate a string identifier of this instance for debugging purposes </s>
funcom_train/50164871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getToken() { byte tokenBuffer[] = new byte[4]; try { int readResult = read(tokenBuffer, 0, 4); if (readResult == -1) { return null; } return new String(tokenBuffer); } catch (Exception e) { } return null; } COM: <s> returns a 4 char string token </s>
funcom_train/13306148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void intersectValues(QueryParameter qp, QueryParameter otherQp) { //if(qp.getType().equals(otherQp.getType())){ List<QueryParameterEntry> newqpes = new ArrayList<QueryParameterEntry>(); for(QueryParameterEntry newqpe : otherQp.getValues()){ if(!containsTaxonomy(qp,newqpe.getTaxonomy())) newqpes.add(newqpe); } qp.addValues(newqpes); //} } COM: <s> intersects query parameter entries of two given query parameters of the taxonomy type </s>
funcom_train/5573848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void registerEditor(OMEGAGraphicalEditor newEditor) { logger.debug("Registering Editor " + newEditor); activeEditor = newEditor; IMetaModel metaModel = activeEditor.getModel().getMetaModel(); gui.setMetaModel(metaModel); container = new ToolContainer(); container.initTypicalTools(); container.initFromMetaModel(metaModel); container.setDefaultTool("Select"); activeEditor.setDefaultTool(container.getTool("Select")); } COM: <s> a helper method which changes the field active editor and takes all </s>
funcom_train/1491015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void signalFileWriteFailure(){ try { //close the stream outputStream.close(); String fileName = temporaryFile.getName(); temporaryFile.renameTo(new File(temporaryFile.getParent()+File.separator+fileName.substring(0, fileName.length()-DownloadUtils.temporaryExtensionIndicator.length())+DownloadUtils.failedExtensionIndicator)); } catch(Exception e){ logger.error("There was a problem indicating file writing failure"); logger.error(e.getMessage(),e); } } COM: <s> once returned rename the file to indicate the file has been written </s>
funcom_train/29837399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recurseAttributes(Attribute attribute, GraphElementComponent gec) { if (!maybeAddAttrComponent(attribute, gec) && attribute instanceof CollectionAttribute) { CollectionAttribute ca = (CollectionAttribute) attribute; ArrayList<Attribute> al = new ArrayList<Attribute>(ca.getCollection().values()); for (Attribute subAttribute : al) { recurseAttributes(subAttribute, gec); } } } COM: <s> recursively checks all attributes in the attribute tree with the given </s>
funcom_train/29572805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IAtom toAtom(IAtom a) { if (a instanceof AliphaticSymbolQueryAtom) { Atom atom = new Atom(); atom.setSymbol(a.getSymbol()); atom.setFlag(CDKConstants.ISAROMATIC,false); return(atom); } if (a instanceof AromaticSymbolQueryAtom) { Atom atom = new Atom(); atom.setSymbol(a.getSymbol()); atom.setFlag(CDKConstants.ISAROMATIC,true); return(atom); } if (a instanceof SmartsAtomExpression) return(smartsExpressionToAtom((SmartsAtomExpression)a)); //All these cases generate null atom // AliphaticAtom // AromaticAtom // AnyAtom return(null); } COM: <s> this function tries to convert this object to a classic cdk atom </s>
funcom_train/6451767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateIntention() { if (!conf.C.SI.isFinished()) { IntendedMeans im = conf.C.SI.peek(); im.removeCurrentStep(); confP.C.addIntention(conf.C.SI); } else { logger.fine("trying to update a finished intention!"); } } COM: <s> remove the top action and requeue the current intention </s>
funcom_train/3378763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof DistributionPoint == false) { return false; } DistributionPoint other = (DistributionPoint)obj; boolean equal = equals(this.fullName, other.fullName) && equals(this.relativeName, other.relativeName) && equals(this.crlIssuer, other.crlIssuer) && Arrays.equals(this.reasonFlags, other.reasonFlags); return equal; } COM: <s> compare an object to this distribution point for equality </s>
funcom_train/20479778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeMetaData(String targetDir) throws FileNotFoundException { String metaData = targetDir + "/" + mSiteUpdateData.getName() + ".txt"; System.out.println("Writing " + metaData); mSiteUpdateData.save(new FileOutputStream(new File(metaData)), "Added " + mSiteUpdateData.getName()); } COM: <s> writes the site meta data to file </s>
funcom_train/8931398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); EObject aux = (EObject) object; if (!(aux.eContainer() instanceof Project)) { newChildDescriptors.add (createChildParameter (FmpPackage.eINSTANCE.getFeature_Configurations(), FmpFactory.eINSTANCE.createFeature())); } } COM: <s> this adds to the collection of </s>
funcom_train/9286126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logText(String text, boolean writeHeader) { if (verbose) { if (writeHeader) { Monitor.logTextMessage(MessageId.REPLICATION_ERROR_BEGIN, new Date()); Monitor.logMessage(text); Monitor.logTextMessage(MessageId.REPLICATION_ERROR_END); } else { Monitor. logTextMessage(MessageId.REPLICATION_ONELINE_MSG_HEADER, new Date(), text); } } } COM: <s> print a text to the log usually derby </s>
funcom_train/32831361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMethodOrClassLevelAnnotationProperty_methodLevelWithDefaultProperty() throws Exception { String level = getMethodOrClassLevelAnnotationProperty(TestAnnotation.class, "level", "", TestSubClass.class.getDeclaredMethod("annotatedSubMethod"), TestSubClass.class); assertEquals("class", level); } COM: <s> tests getting an annotation property when the method level annotation uses the default </s>
funcom_train/25849159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void keyRepeated(int keyCode) { // TODO: command pattern? mediator pattern? switch( getGameAction( keyCode ) ) { case DOWN: scrollDown(); break; case UP: scrollUp(); break; case RIGHT: navDown(); break; case LEFT: navUp(); break; case FIRE: mediator.toggleView(); break; } // setStatusText(keyCode, false); } COM: <s> handle key repeat events </s>
funcom_train/21877981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String depoXML2XPath(String str) { int xpathStart = str.indexOf('>') + 1; int xpathEnd = str.lastIndexOf('<'); String xpathString = ( str.substring(xpathStart, xpathEnd) ).replace('"','\''); return "<xsl:value-of select=\"" + xpathString + "\"/>"; } COM: <s> converts depo expand to xsl value of counter part such as </s>
funcom_train/13630646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void joystickGetBall(int ball, Integer dx, Integer dy) throws SDLException { int x[] = {0}; int y[] = {0}; int result = SWIG_SDLJoystick.SDL_JoystickGetBall(swigJoystick, ball, x, y); if (result == -1) { throw new SDLException(SDLMain.getError()); } dx = new Integer(x[0]); dy = new Integer(y[0]); } COM: <s> get relative trackball motion </s>
funcom_train/39221218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStrokeWidth(Double width) { strokeWidth = width; if (Guess.getZooming() == Guess.ZOOMING_SPACE) { setStroke(new PFixedWidthStroke((float)width.floatValue())); } else { setStroke(new BasicStroke((float)width.floatValue())); } } COM: <s> sets the width of the border </s>
funcom_train/35321417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getISO3Country() throws MissingResourceException { String country3 = getISO3Code(baseLocale.getRegion(), LocaleISOData.isoCountryTable); if (country3 == null) { throw new MissingResourceException("Couldn't find 3-letter country code for " + baseLocale.getRegion(), "FormatData_" + toString(), "ShortCountry"); } return country3; } COM: <s> returns a three letter abbreviation for this locales country </s>
funcom_train/14247435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String checkContentType(String contentType) { int i = contentType.toLowerCase().indexOf("content-length"); if(i != -1) { String fix = contentType.substring(0, i); if(Config.DEBUG) log("Fixing: '" + contentType + "' =to=> " + fix); contentType = fix; } return contentType; } COM: <s> sometimes the content type and content length appear on the same line </s>
funcom_train/8420491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private boolean isLocaleSupported(Locale locale) { // String langCode = locale.getLanguage(); // boolean isHebrew = langCode.equalsIgnoreCase("he") || langCode.equalsIgnoreCase("iw"); // if (isHebrew && !CommonUtils.isHebrewFonts()) { // // Locale is Hebrew but OS is old and has no Hebrew fonts // return false; // } else { // return true; // } // } COM: <s> return false if old android and hebrew locale </s>
funcom_train/27960896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toLowerCase() { char[] newStr = new char[count]; for (int i = 0; i < count; i++) newStr[i] = Character.toLowerCase(value[i]); for (int i = 0; i < count; i++) if (value[i] != newStr[i]) return new String(newStr); return this; } COM: <s> lowercases this string </s>
funcom_train/16564634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public boolean equals(final Object object) { // // Do not check 'object==this' here, since this // // optimization is usually done in subclasses. // if (object!=null && getClass().equals(object.getClass())) { // final AbstractMathTransform that = (AbstractMathTransform) object; // return Utilities.equals(this.getParameterDescriptors(), // that.getParameterDescriptors()); // } // return false; // } COM: <s> compares the specified object with this math transform for equality </s>
funcom_train/36177264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getSimilarity(RealMatrix doc) { if (centroid != null) { double dotProduct = centroid.transpose().multiply(doc).getNorm(); double normProduct = centroid.getFrobeniusNorm() * doc.getFrobeniusNorm(); return dotProduct / normProduct; } return 0.0D; } COM: <s> returns the cosine similarity between the centroid of this cluster </s>
funcom_train/1985091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startTest(Test test) { final int count = test.countTestCases(); synchronized(this) { runTests += count; } for (Enumeration e = listeners.elements(); e.hasMoreElements(); ) { ((TestListener)e.nextElement()).startTest(test); } } COM: <s> informs the result that a test will be started </s>
funcom_train/5512223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawTopGraph(Graphics2D g2d){ g2d.setColor(Color.white); g2d.drawLine(xStartPosit, zEndPosit, xEndPosit, zEndPosit); g2d.drawLine(xStartPosit, zStartPosit, xStartPosit, zEndPosit); } COM: <s> draws the top graph </s>
funcom_train/25289298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SceneGraphPath pickClosest( PickShape pickShape ) { if (universe == null) { throw new IllegalStateException(Ding3dI18N.getString("Locale4")); } PickInfo pickInfo = pickClosest( PickInfo.PICK_BOUNDS, PickInfo.SCENEGRAPHPATH, pickShape); if(pickInfo == null) { return null; } return pickInfo.getSceneGraphPath(); } COM: <s> returns a scene graph path which references the pickable item </s>
funcom_train/3631349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { EjLine line = (EjLine) o; if (lineNo() < line.lineNo()) return -1; if (lineNo() == line.lineNo()) return 0; if (lineNo() > line.lineNo()) return 1; return 0; } COM: <s> implementation of ej line compare to used to keep order </s>
funcom_train/35947080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object that) { if (that instanceof String) { return equals((String) that); } else if (that instanceof CharArray) { return equals((CharArray) that); } else if (that instanceof java.lang.CharSequence) { return equals((java.lang.CharSequence) that); } else { return false; } } COM: <s> compares this character sequence against the specified object </s>
funcom_train/43068896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected InputArchive createInputArchive(File logFile) throws IOException { if(inputStream==null){ inputStream= new FileInputStream(logFile); LOG.debug("Created new input stream " + logFile); ia = BinaryInputArchive.getArchive(new BufferedInputStream(inputStream)); inStreamCreated(ia,inputStream); LOG.debug("created new input archive " + logFile); } return ia; } COM: <s> invoked to indicate that the input stream has been created </s>
funcom_train/2635598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FuzzyNumber createExponentialFuzzyNumber(double modal, double alpha, double beta) { if (this.type == FuzzyFactory.LR) return new LRFuzzyNumber(modal, alpha, beta, FuzzyNumber.FUNCTION_EXPONENTIAL, FuzzyNumber.FUNCTION_EXPONENTIAL); else // decomposed return new DecomposedFuzzyNumber(modal, alpha, beta, FuzzyNumber.FUNCTION_EXPONENTIAL, FuzzyNumber.FUNCTION_EXPONENTIAL, FuzzyFactory.defaultDecomposedCuts); } COM: <s> creates a fuzzy number with exponential membership functions on both sides </s>
funcom_train/34014763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ValueObject getValue() throws ExpressionEngineException { Object value = leftOperandExpression.getValue().getValue(); long index = ( (Number) rightOperandExpression.getValue().getValue() ).longValue(); return new ValueObject( Array.get( value, (int) index ), getReturnType() ); } COM: <s> gets the value from the array </s>
funcom_train/3840466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayPlaylists() { String [] playlists = dserver.getPlaylists(dserver.getCurrentMediaType()); if(playlists.length == 0) { doOutput("No playlists found","",1); } else { for (int i = 0; i < playlists.length; i++) { String playlist = playlists[i]; doOutput(playlist,playlist,1); } } } COM: <s> get all playlists from the server and display them on the dp 500 </s>
funcom_train/2902000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Layout getLayoutByName(String name) { try { Iterator it = getLayouts().iterator(); while (it.hasNext()) { Layout l = (Layout) it.next(); if (l.getName().equals(name)) return l; } } catch (ClassCastException e) { log.error("Unable to get layout with name = " + name + "!", e); } return null; } COM: <s> returns layout instance with a given name </s>
funcom_train/16465189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getMapPosition(double lat, double lon) { MapSpace mapSpace = mapSource.getMapSpace(); int x = mapSpace.cLonToX(lon, zoom); int y = mapSpace.cLatToY(lat, zoom); x -= center.x - getWidth() / 2; y -= center.y - getHeight() / 2; if (x < 0 || y < 0 || x > getWidth() || y > getHeight()) return null; return new Point(x, y); } COM: <s> calculates the position on the map of a given coordinate </s>
funcom_train/46161659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applyVisualDeletedMessage(final VisualDeletedMessage message) { synchronized (sceneRoot) { ClientContextJME.getWorldManager().addRenderUpdater(new RenderUpdater() { public void update(Object arg0) { sceneRoot.removeDescendant(message); ClientContextJME.getWorldManager().addToUpdateList(sceneRoot); } }, null); } } COM: <s> removes the node referenced by the message </s>
funcom_train/1365459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mainExecute() throws CommandException { // Action that should not be involved in transaction context(before // transaction) preExecute(); if (dto.getTransaction()) { transactionalExecute(); } else { nonTransactionalExecute(); } // Action that should not be involved in transaction context (after // transaction) postExecute(); } COM: <s> description this method implements database transaction controlling and then call the execute from </s>
funcom_train/3720827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStatus(String status) throws ProfileException { String oldStatus = this.status; try { vetoableChangeSupport.fireVetoableChange("status", oldStatus, status); } catch (Exception e) { throw new ProfileException(null, e); } this.status = status; propertyChangeSupport.firePropertyChange("status", oldStatus, status); } COM: <s> setter for property status </s>
funcom_train/44844389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addStyleSheet(String href, String type, String title, String media, String charset, boolean alternate) { if (_writingStarted) { throw new RuntimeException( "Stylesheets cannot be added after writing has started"); } _stylesheets.add(new StyleSheet(href, type, title, media, charset, alternate)); } COM: <s> associate a stylesheet with this xml document </s>
funcom_train/12102697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateVBOWithVertexInfo(FloatBuffer vertexBuffer, Point3D vertex, FloatBuffer normalBuffer, Vector3D normal, FloatBuffer textureBuffer, Tuple2f textureCoordinate) { putVBO(vertexBuffer, vertex, normalBuffer, normal); //Texture textureBuffer.put(textureCoordinate.a); textureBuffer.put(textureCoordinate.b); } COM: <s> populates buffers with vertex normal and texture coordinate information </s>
funcom_train/37827499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initStreams() throws IOException { wb_in = new BufferedReader(new InputStreamReader(wb_socket.getInputStream())); wb_out = new PrintWriter(wb_socket.getOutputStream(), true); chat_in = new BufferedReader(new InputStreamReader(chat_socket.getInputStream())); chat_out = new PrintWriter(chat_socket.getOutputStream(), true); } COM: <s> p initializes i o streams for the code user code class </s>
funcom_train/13314464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visit(PossrepDef n, A argu) { n.nodeToken.accept(this, argu); n.nodeOptional.accept(this, argu); n.nodeToken1.accept(this, argu); n.possrepComponentDefCommalist.accept(this, argu); n.nodeToken2.accept(this, argu); n.nodeOptional1.accept(this, argu); } COM: <s> node token possrep </s>
funcom_train/44155582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefaultProperties(Properties mergedProps) { Properties defaultProperties = getProperties(); if (defaultProperties != null) { // use propertyNames enumeration to also catch default properties Enumeration en = defaultProperties.propertyNames(); while (en.hasMoreElements()) { String key = (String) en.nextElement(); mergedProps.setProperty( key, defaultProperties.getProperty(key)); } } } COM: <s> adds default properties to the properties container </s>
funcom_train/10867526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String retrieveRV( StringBuilder buffer ) { int len = buffer.length(); if ( buffer.length() > 3) { if ( isVowel(buffer.charAt( 0 )) && isVowel(buffer.charAt( 1 ))) { return buffer.substring(3,len); } else { int pos = 0; for (int c = 1; c < len; c++) { if (isVowel( buffer.charAt( c ))) { pos = c; break; } } if ( pos+1 < len ) return buffer.substring( pos+1, len ); else return null; } } else return null; } COM: <s> retrieve the rv zone from a buffer an return the corresponding string br </s>
funcom_train/18465728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMemoryValue(MemoryValue value) { // First create the message for the value SysexMemoryMessage message = new SysexMemoryMessage(value.getAbsoluteAddress(),(int)value.getSize()); // Then sysex the value and send the message value.toSysex(Collections.singletonList(message)); sendMemoryMessage(message); } COM: <s> send the data associated to a memory value to the device </s>
funcom_train/51296469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MenuSpecification lookForSpecification(Goods g) { MenuSpecification ms = specifications.get(g.getId()); if (ms == null) { ms = MenuSpecificationDataHandler.getInstance().get(g, this); if (ms != null) specifications.put(ms.getGoodsId(), ms); } else MenuSpecificationDataHandler.getInstance().update(ms); return ms; } COM: <s> search for menu spec descriprion by a link to sku </s>
funcom_train/2624392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(PropertyChangeEvent evt) { if ("progress" == evt.getPropertyName()) { int progress = (Integer) evt.getNewValue(); progressBar.setValue(progress); progressBar.setString(progress + "/4 tasks complete"); switch (progress) { case 1: lblStatusMessage.setText("Starting the Emulator"); break; case 2: lblStatusMessage.setText("Starting the Ripping"); break; case 3: lblStatusMessage.setText("Creating EFG and GUI files"); break; case 4: lblStatusMessage.setText("Done"); break; } } } COM: <s> invoked when tasks progress property changes </s>
funcom_train/23824457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { Object selObj = tab.getSelectionModel().getSelectedClass(); if(selObj != null) { for(Iterator it = tab.getGraphComponents().iterator(); it.hasNext();) { GraphComponent graphComponent = (GraphComponent) it.next(); graphComponent.getVisualisedObjectManager().showParents(selObj, OWLNamedClass.class); } } } COM: <s> invoked when an action occurs </s>
funcom_train/12245611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(String key, String newValue) { boolean found = false; for (int i = 0; i < _keyValues.length; i++) { if (_keyValues[i].getKey().compareTo(key) == 0) { _keyValues[i].setValue(newValue); found = true; break; } } if (!found) { System.err.println("WARNING: no key for " + key); } } COM: <s> set a new value for a key </s>
funcom_train/1648116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putSingle(String key, String value) { if(value == null) return; if(!shortLived) value = value.intern(); if(!put(key, value, false, false)) throw new IllegalStateException("Value already exists: "+value+" but want to set "+key+" to "+value); } COM: <s> set a key to a value </s>
funcom_train/3925620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkInUse() { if ( suppressISwarning ) return; for ( int i = 0; i < numberChildren(); i++ ) { VrmlElement vle = getChildAt( i ); if ( vle instanceof Field ) { Field f = (Field)vle; if ( !f.isInUse() ) { f.setError( "Warning, field not referenced by IS" ); } } } } COM: <s> check if all the proto interface fields are referenced by an is statement </s>
funcom_train/33340238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getData() { try { StringBuffer buffer = new StringBuffer(); String line; while ((line = reader.readLine()) != null && line.length() != 0) { buffer.append(line); buffer.append('\n'); } return buffer.toString(); } catch (IOException e) { logFailure(); throw new RemotingException(e); } } COM: <s> reads all the data up until the next blank line </s>
funcom_train/37217255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lockFrame() { if (blur == null) { blur = new BlurredGlassPane(getFrame()); getFrame().setGlassPane(blur); } blur.setActive(true); /** * JFrame jf = getFrame(); if (jf != null) { Component c = * jf.getGlassPane(); if (c != glassPane) { oldGlassPane = c; * jf.setGlassPane(glassPane); } glassPane.setText("Locked..."); * glassPane.start(); } */ } COM: <s> lock the parent frame showing an infinite progress display message </s>
funcom_train/17943339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ChanPanel addChan(String chan) { int index = indexOfTab(chan); if (index == -1) { ChanPanel chanPanel = new ChanPanel(this, chan); tabs.add(chanPanel, chan, lastChanIndex + 1); tabs.setSelectedComponent(chanPanel); tabs.revalidate(); lastChanIndex++; return chanPanel; } else { Component component = getComponentAt(index); return (ChanPanel)component; } } COM: <s> on a join there should be created a new tab and a new </s>
funcom_train/18593876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setComponentID(String id) { if (id == null) { componentID = null; } else { ComponentReference ref = getResolver().getComponentReference(id); if (ref != null) { componentID = id; setTargetClassName(ref.getRefClassName()); } else throw new NoSuchReferenceException(id); } } COM: <s> set the component reference id used by method invocation </s>
funcom_train/41396764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getEntryDescriptorsByName(String name) { Iterator pluginsIterator = plugins.values().iterator(); Vector pluginsbyname = new Vector(); while (pluginsIterator.hasNext()) { EntryDescriptor pd = (EntryDescriptor) pluginsIterator.next(); if (pd.getName().equals(name)) { pluginsbyname.add(pd); } } return pluginsbyname; } COM: <s> returns a vector object containing entry descriptor objects of </s>
funcom_train/1578526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(final OutputStream outputstream, final JDBField ajdbfield[]) throws JDBFException { fields = ajdbfield; try { stream = new BufferedOutputStream(outputstream); writeHeader(); for (int i = 0; i < ajdbfield.length; i++) { writeFieldHeader(ajdbfield[i]); } stream.write(13); stream.flush(); } catch (Exception exception) { throw new JDBFException(exception); } } COM: <s> initializes the writer </s>
funcom_train/18786546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(UiNodeType type) { assert (type != null); ((UiNodeTypeImpl) type).setFactory(this); nodeTypesForBo.put(type.getDataObjectType().getBoClass(), type); nodeTypesForLw.put(type.getDataObjectType().getLwClass(), type); } COM: <s> registers the node type in the factory </s>
funcom_train/45501654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double calcAngle( Vector3 v1, Vector3 v2 ) { double angle = Math.acos( v1.dotProduct( v2 ) ); int orientation = Vector3.orientation( v1, v2 ); if( orientation == -1 && control.isRoomRight() || orientation == 1 && control.isRoomLeft() ) angle = -angle; return angle; } COM: <s> calculates the angle between two normalized vectors </s>
funcom_train/20646452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addContent(SubreportTreeItem subreport, String title, String description) { if (m_currentLevel < REALTITLELIMIT) { // Flush title first m_row.level = m_currentLevel; m_row.subreport = null; m_row.tariffTitle = ""; m_row.tariffDescription = ""; m_result.addData(m_row); } m_row.subreport = subreport; m_row.tariffTitle = title; m_row.tariffDescription = description; m_result.addData(m_row); } COM: <s> add content item </s>
funcom_train/28365619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showDictionaryBrowser() { final JFileChooser browser = getDictionaryBrowser(); final int status = browser.showOpenDialog( this ); switch( status ) { case JFileChooser.CANCEL_OPTION: break; case JFileChooser.APPROVE_OPTION: final File selection = browser.getSelectedFile(); if ( selection != null ) { try { loadDictionary( new ConnectionDictionary( selection ) ); } catch( IOException exception ) { exception.printStackTrace(); } } break; default: break; } } COM: <s> display the connection dictionary browser </s>
funcom_train/12164914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(char cbuf[], int off, int len) { if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) { throw new IndexOutOfBoundsException(); } else if (len == 0) { return; } buffer.append(cbuf, off, len); } COM: <s> write a portion of an array of characters </s>