__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/29597883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void retaingLabels(final Collection<StatisticalInformationEvaluator> siEvaluators) { final Collection<Integer> obsoleteKeys = new LinkedList<Integer>(); synchronized (sfLabels) { obsoleteKeys.addAll(sfLabels.keySet()); } final Collection<Integer> evalKeys = new LinkedList<Integer>(); for (final StatisticalInformationEvaluator eval : siEvaluators) { evalKeys.add(eval.hashCode()); } obsoleteKeys.removeAll(evalKeys); for (final Integer integer : obsoleteKeys) { removeLabel(integer); } } COM: <s> removes all labels providing statistical information which are no longer relevant </s>
funcom_train/29322276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FMMenuItem getCommand(String text) { if (text.equals("LIST")) return FMMenuItem.LIST; if (text.equals("BYE")) return FMMenuItem.BYE; if (text.startsWith("DEL")) { if (text.length() > 4) { return FMMenuItem.DEL; } else { return FMMenuItem.NONE; } } if (text.startsWith("GET")) { if (text.length() > 4) { return FMMenuItem.GET; } else { return FMMenuItem.NONE; } } return FMMenuItem.NONE; } COM: <s> translates a string into a menu command </s>
funcom_train/2449282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doStandardDecoration(Container contentPane, Border border) { if (icon == null) { return; } BoxBuilder col = BoxBuilder.vertical(); col.add(icon).glue().setBorder(border).setOpaqueRecursively(false); contentPane.add(col.container(), BorderLayout.WEST); } COM: <s> decorates the given content pane with this icon </s>
funcom_train/10625701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMacLength() { if (!DEFSupported) { fail(NotSupportedMsg); return; } Mac [] macs = createMacs(); assertNotNull("Mac objects were not created", macs); for (int i = 0; i < macs.length; i++) { assertTrue("Length should be positive", (macs[i].getMacLength() >= 0)); } } COM: <s> test for code get mac length code method </s>
funcom_train/16771480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TokenStream tokenStream(String fieldName, Reader reader) { if (fieldName == null) throw new IllegalArgumentException("fieldName must not be null"); if (reader == null) throw new IllegalArgumentException("reader must not be null"); TokenStream result = new StandardTokenizer(LuceneDomainIndex.LUCENE_COMPAT_VERSION, reader); result = new StandardFilter(result); result = new LowerCaseFilter(result); return result; } COM: <s> filters with standard filter lower case filter asciifolding filter </s>
funcom_train/16771276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void closing() { int ret = JOptionPane.showConfirmDialog(this, "Save the configuration ?", "WowSync : Exit", JOptionPane.YES_NO_CANCEL_OPTION); if (ret == JOptionPane.CANCEL_OPTION) this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); else this.setDefaultCloseOperation(EXIT_ON_CLOSE); if (ret == JOptionPane.YES_OPTION) { wsm.SaveConfigurationFile(); } } COM: <s> when closing the frame ask for confirmation includes yes no configuration save </s>
funcom_train/8022192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDatabase() { System.out.println("getDatabase"); Config instance = new Config(); String expResult = ""; String result = instance.getDatabase(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get database method of class vgrabber </s>
funcom_train/8406953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object o1, Object o2) { if(o1 == o2) { return 0; } if(o1 == null) { return (this.nullsAreHigh ? 1 : -1); } if(o2 == null) { return (this.nullsAreHigh ? -1 : 1); } return this.nonNullComparator.compare(o1, o2); } COM: <s> perform a comparison between two objects </s>
funcom_train/44496966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(InstOfExpr ioexp) { // XXX hack // get the value ResultSequence rs = (ResultSequence) ioexp.left().accept(this); // get the sequence type SequenceType seqt = (SequenceType) ioexp.right(); // lamely "convert" it SeqType st = new SeqType(seqt, _dc); // see if they match try { st.match(rs); } catch(DynamicError err) { return ResultSequenceFactory.create_new(new XSBoolean(false)); } return ResultSequenceFactory.create_new(new XSBoolean(true)); } COM: <s> visit instance of expression </s>
funcom_train/51615666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(ContentHandler handler) { try { SAXBuilder builder = new SAXBuilder(handler, "", ""); builder.startDocument(); writeReport(cube, new ReportBuilder(builder)); builder.endDocument(); } catch (BuildException exp) { throw new RuntimeException(exp.toString()); } } COM: <s> write a cube to a content handler </s>
funcom_train/12809046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Font getFont(final String fontname, final String encoding, final boolean embedded, final float size, final int style, final BaseColor color) { return getFont(fontname, encoding, embedded, size, style, color, true); } COM: <s> constructs a code font code object </s>
funcom_train/3985600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PImage get() { try { PImage clone = (PImage) clone(); // don't want to pass this down to the others // http://dev.processing.org/bugs/show_bug.cgi?id=1245 clone.cacheMap = null; return clone; } catch (CloneNotSupportedException e) { return null; } } COM: <s> returns a copy of this pimage </s>
funcom_train/23285265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setZoneGroupCommand(String groupID, String command) throws IOException, UPNPResponseException, JanosWebException { if (groupID == null) { missingParameterException("groupID"); } if (command == null) { missingParameterException("command"); } setZoneCommand(getZoneGroup(groupID).getCoordinator(), command); } COM: <s> make a zone group perform a play stop pause previous next command </s>
funcom_train/50297205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean acceptsURL(String url) throws SQLException { Set protocols = GDSFactory.getSupportedProtocols(); for (Iterator iter = protocols.iterator(); iter.hasNext();) { String protocol = (String) iter.next(); if (url.startsWith(protocol)) return true; } return false; } COM: <s> returns true if the driver thinks that it can open a connection </s>
funcom_train/8461945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { Object clone = null; try { // Write the object out to a byte array ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(bos); out.writeObject(this); out.flush(); out.close(); // Make an input stream from the byte array and read // a copy of the object back in. ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream(bos.toByteArray())); clone = in.readObject(); } catch (Exception e) { e.printStackTrace(); } return clone; } COM: <s> return a full copy of this template </s>
funcom_train/51763379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private E getNext() { // Already setup if (nextCurrentPosition > currentPosition) { return nextElement; } nextCurrentPosition = currentPosition + 1; while (nextCurrentPosition <= rangeList.getNextPosition()) { E e = rangeList.get(nextCurrentPosition); if (e != null) { prevCurrentPosition = currentPosition; nextElement = e; return e; } nextCurrentPosition++; } prevCurrentPosition = currentPosition; return null; } COM: <s> get the next element </s>
funcom_train/51773826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNCustomQueries(int days) { try { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("select count(*) from log where application='SeCSERegistry' AND event LIKE 'Called query%' AND DATE_SUB(CURDATE(),INTERVAL " + days + " DAY) <= start"); if (rs.next()) return rs.getInt(1); } catch (Exception e) { e.printStackTrace(); } return 0; } COM: <s> it returns the number of custom queties performed in the days specified </s>
funcom_train/9301467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void train(Collection<List<String>> sentences) { wordCounter = new Counter<String>(); for (List<String> sentence : sentences) { List<String> stoppedSentence = new ArrayList<String>(sentence); stoppedSentence.add(STOP); for (String word : stoppedSentence) { wordCounter.incrementCount(word, 1.0); } } total = wordCounter.totalCount(); } COM: <s> constructs a unigram language model from a collection of sentences </s>
funcom_train/41332626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Shape createRoundRectangle(final int x, final int y, final int w, final int h, final CornerSize size) { return createRoundRectangle(x, y, w, h, size, CornerStyle.ROUNDED, CornerStyle.ROUNDED, CornerStyle.ROUNDED, CornerStyle.ROUNDED); } COM: <s> return a path for a rectangle with rounded corners </s>
funcom_train/33962814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTimeAsNow() { java.util.Calendar calendar = java.util.Calendar.getInstance(); calendar.setTime(new Date()); day = DayEnum.convert(calendar.get(java.util.Calendar.DAY_OF_MONTH)); month = MonthEnum.convert(calendar.get(java.util.Calendar.MONTH)); year = calendar.get(java.util.Calendar.YEAR); } COM: <s> make this calendar represents todays date </s>
funcom_train/9908639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open() { try { dataOutputStream = new DataOutputStream(new FileOutputStream("scenario/log.csv")); dataOutputStream.writeBytes("Time,Healthy,Infected,Dead,Total Sick\n"); } catch (Exception e) { Err.or("Cannot open output stream."); } } COM: <s> opens the logger class </s>
funcom_train/34781024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { mResponseCode = 0; mConnected = false; try { HttpURLConnection.setFollowRedirects(false); HttpURLConnection conn = (HttpURLConnection) mUrl.openConnection(); conn.setRequestMethod("HEAD"); mResponseCode = conn.getResponseCode(); switch(mResponseCode) { case 302: mConnected = true; return; } mConnected = (mResponseCode == HttpURLConnection.HTTP_OK); return; }catch(Exception e) { mConnected = false; return; } } COM: <s> check the url </s>
funcom_train/21637594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadMessageTypes(Plugin plugin, Element root) { Element messageTypesTag = root.getChild("message-types"); CollectionLoader<Plugin, MessageType> messageTypesLoader = new MessageTypesLoader(plugin); loadCollection(messageTypesLoader, messageTypesTag, "message-type"); } COM: <s> loads message types for specified plug in </s>
funcom_train/31821989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StoryCard toStoryCard() { return new StoryCardDataObject(this.parent, this.id, this.name, this.description, this.width, this.height, this.locationX, this.locationY, this.bestCase, this.mostLikely, this.worstCase, this.actualEffort, this.status, this.color, this.handwritingImage); } COM: <s> converts ws story card to persister </s>
funcom_train/22313986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIsQueryMode(boolean aIsQueryMode) { isQueryMode=aIsQueryMode; if (isQueryMode) { queryButton.setText(I18n.getTrans("query")); queryButton.setIcon(DolmenIconLibrary.SEARCH_16); clearQueryButton.setEnabled(true); } else { queryButton.setText(I18n.getTrans("cancel")); queryButton.setIcon(DolmenIconLibrary.CANCEL_SMALL); clearQueryButton.setEnabled(false); } } COM: <s> to set the query mode </s>
funcom_train/10859349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void restrictProps(int props) { if ((properties & props) != 0) { throw new RuntimeException("schema fieldtype " + typeName + "("+ this.getClass().getName() + ")" + " invalid properties:" + propertiesToString(properties & props)); } } COM: <s> todo document this method </s>
funcom_train/42651160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void testGetSessionContext() { // System.out.println("getSessionContext"); // UIBuilderServerImpl instance = null; // SessionContext expResult = null; // SessionContext result = instance.getSessionContext(); // assertEquals(expResult, result); // // TODO review the generated test code and remove the default call to fail. // fail("The test case is a prototype."); // } COM: <s> test of get session context method of class uibuilder server impl </s>
funcom_train/12652828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCategoryValid() { boolean categoryValid = facadePatientHistory.isCategoryValid(); if (!categoryValid) { FacesContext facesContext = FacesContext.getCurrentInstance(); boolean found = false; Iterator<FacesMessage> iterator = facesContext.getMessages(); while (iterator.hasNext()) if (CATEGORY_INVALID.getSummary().equals( iterator.next().getSummary())) { found = true; break; } if (!found) facesContext.addMessage(null, CATEGORY_INVALID); } return categoryValid; } COM: <s> returns whether the patient answered the category question s </s>
funcom_train/11015905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newUrlLink() { _range = new CellRangeAddress(0, 0, 0, 0); _guid = STD_MONIKER; _linkOpts = HLINK_URL | HLINK_ABS | HLINK_LABEL; setLabel(""); _moniker = URL_MONIKER; setAddress(""); _uninterpretedTail = URL_TAIL; } COM: <s> initialize a new url link </s>
funcom_train/1541015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clip(Shape s) { Shape ts = transformShape(s); if (userClip != null) { if (ts != null) { userClip.intersect(new Area(ts)); } else { userClip = null; } } else { userClip = (ts != null) ? new Area(ts) : null; } try { writeClip(s); } catch (IOException e) { handleException(e); } } COM: <s> clips using given shape </s>
funcom_train/21643692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getFileOpenMenuItem() { if (fileOpenMenuItem == null) { fileOpenMenuItem = new JMenuItem(); fileOpenMenuItem.setText("Open"); fileOpenMenuItem.setMnemonic('O'); fileOpenMenuItem.setDisplayedMnemonicIndex(0); fileOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, Event.CTRL_MASK)); fileOpenMenuItem.addActionListener(eventHandler); } return fileOpenMenuItem; } COM: <s> return the file open menu item </s>
funcom_train/37817743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { // Bugfix: the enable status of the input text field has to be changed // before setting text, otherwise the program sometimes hangs on // (type in a value, have a tree, press clear tree) setKeyInputEnabled(false); setKeyInputEnabled(true); keyTextField.setText(null); setAlgorithmButtonsEnabled(false); startAVLTestButton.setEnabled(!avlMode.isSelected()); setMessage(null, NO_MESSAGE); } COM: <s> restores the initial state of the code control pane code </s>
funcom_train/23793603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { // Set s to descriptive letter for register type String s = isLocal() ? "l" : "t"; s = s + getNumber() + (spansBasicBlock() ? "p" : "") + (isSSA() ? "s" : "") + typeName(); return s; } COM: <s> returns the string representation of this register </s>
funcom_train/24628057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean semanticEventBefore(SemanticEvent se, String msg) { if (super.semanticEventBefore(se,msg)) return true; else if (VMenu.MSG_CREATE_VIEW==msg) { INode menu = (INode)se.getOut(); createUI("button", "Page Source", "event "+MSG_VIEW, menu, "View", false); // viewSource $URL } return false; } COM: <s> add to view menu </s>
funcom_train/12165493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startSPSConnector() { Runnable r = new Runnable() { public void run() { while (true) { try { SSLSocket acceptedSocket = (SSLSocket) serv.accept(); new SPSWorker(acceptedSocket, config).start(); } catch (IOException ioe) { logger.error("io-exception", ioe); } } } }; new Thread(r).start(); } COM: <s> establishes encoded connection between secure connection server and sps </s>
funcom_train/43526285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addJoinPointShadowTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ImplicitCall_joinPointShadowType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ImplicitCall_joinPointShadowType_feature", "_UI_ImplicitCall_type"), CallGraphPackage.Literals.IMPLICIT_CALL__JOIN_POINT_SHADOW_TYPE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the join point shadow type feature </s>
funcom_train/17205237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void markFinalFieldsAsLiterals() { for (RVMField f : getStaticFields()) { if (f.isFinal()) { Offset fieldOffset = f.getOffset(); if (Statics.isReference(Statics.offsetAsSlot(fieldOffset))) { Statics.markAsReferenceLiteral(fieldOffset); } else { Statics.markAsNumericLiteral(f.getSize(), fieldOffset); } } } } COM: <s> mark final fields as being available as literals </s>
funcom_train/29830192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireNodeDeletedEvent(Message m, String nodeName, String id) { for (Enumeration e = pubsubListeners.elements(); e.hasMoreElements(); ) { BSPubsubListener listener = (BSPubsubListener) e.nextElement(); listener.nodeDeletedEvent(m, nodeName, id); } } COM: <s> notifies pubsub listeners about received event deleted node </s>
funcom_train/10588390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Configuration getConf(String scheme) { Configuration[] schemeConfs = this.conf.getChildren(); for (int i=0; i<schemeConfs.length; i++) { if (scheme.equals(schemeConfs[i].getAttribute("name", null))) { return schemeConfs[i]; } } return null; } COM: <s> retrieve a dynamic configuration for a specific input module </s>
funcom_train/32766659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearFreqComponent(int intFreq, AbstractComplexVector vecTrans) { int N = this.getDataSize(); vecTrans.setComponent(intFreq, Complex.ZERO); if (intFreq == 0) return; vecTrans.setComponent(N - intFreq, Complex.ZERO); } COM: <s> set the given frequency component to zero </s>
funcom_train/3371545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reshape(int x, int y, int w, int h) { boolean sizeChanged = (getWidth() != w) || (getHeight() != h); if (sizeChanged) { backingStoreImage = null; } super.reshape(x, y, w, h); if (sizeChanged) { fireStateChanged(); } } COM: <s> sets the bounds of this viewport </s>
funcom_train/50863732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canCollectExcavatedMinerals(Person person) { boolean result = false; Iterator<AmountResource> i = excavatedMinerals.keySet().iterator(); while (i.hasNext()) { AmountResource resource = i.next(); if ((excavatedMinerals.get(resource) >= MINIMUM_COLLECT_AMOUNT) && CollectMinedMinerals.canCollectMinerals(person, getRover(), resource)) result = true; } return result; } COM: <s> checks if a person can collect minerals from the excavation pile </s>
funcom_train/21877597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LockingAccess registerModelLockPlugin(ModelLockPlugin plug) { if (isRegisteredPlugin(plug.getLockingKey())) { logger.warn("Cannot register KnowledgeMap plugin :" + plug.getLockingKey() + ": name already registered"); return null; } pluginRegistry.put(plug.getLockingKey(), plug); return new LockingAccessImpl(this, plug); } COM: <s> register a locking client plugin </s>
funcom_train/50747191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map findActiveInstances() throws ServiceException, RemoteException { Call call = getCall(); log.debug("Getting active processes list"); call.setOperationName("findActiveInstances"); Map result = (Map) call.invoke(new Object[]{}); log.debug("Got active processes list"); return result; } COM: <s> returns all active instances of process </s>
funcom_train/20770825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScale_stddev(final int scale_stddev) { getPrefs().putInt("PcaTrackingFilter.scale_stddev",scale_stddev); getSupport().firePropertyChange("scale_std",this.scale_stddev,scale_stddev); this.scale_stddev = scale_stddev; } COM: <s> sets the scale of the bounding box relative to stddev </s>
funcom_train/15695458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T getRandomValue() { if(functions.isEmpty() && terminals.isEmpty()) return null; int fs = functions.size(); int s = fs + terminals.size(); int k = jenes.Random.getInstance().nextInt(s); if(k < fs) return functions.get(k); return terminals.get(k - fs); } COM: <s> returns a random value function or terminal from the domain </s>
funcom_train/10357287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date parse(String string, ParsePosition position) { MailDateParser parser = new MailDateParser(string, position); try { return parser.parse(isLenient()); } catch (ParseException e) { e.printStackTrace(); // just return a null for any parsing errors return null; } } COM: <s> parse a mail date into a date object </s>
funcom_train/2912792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWorkplaceHomepage(URI _workplaceHomepage) { if (this.workplaceHomepage == null) this.workplaceHomepage = new ArrayList<URI>(); synchronized (this) { this.workplaceHomepage.add(_workplaceHomepage); addGraphProperty(FOAF.workplaceHomepage, new URIImpl(_workplaceHomepage.toString())); } this.setTimestamp(); PersonFactory.getObservable().notifyObservers(this); } COM: <s> it not sets but adds a workplace homepage to a users profile </s>
funcom_train/31980452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayAllCollections(PrintWriter out) { try { String collectionUrl = "xmldb:xindice://localhost:8080/db/"; Collection root = DatabaseManager.getCollection(collectionUrl); Util.displayCollection(root, out, 0, serializer); } catch (XMLDBException e) { LOG.fatal("DatabaseViewer Could not retrieve root collection."); } } COM: <s> displays all the collections in the database associated with the web </s>
funcom_train/31480676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printDecimal(long l) throws IOException { char [] _ca = String.valueOf(l).toCharArray(); // Too expensive? for (int _i = 0; _i < _ca.length; _i++) { this.varWrite(_ca[_i]); _ca[_i] = 0; // Destroy array } _ca = null; // Destroy array reference } COM: <s> print out a long value in decimal to this output stream </s>
funcom_train/8390960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAppletInfo() { return "PlotLiveDemoApplet " + PlotBox.PTPLOT_RELEASE + " : Demo of PlotLive.\n" + "By: Edward A. Lee\n" + " Christopher Hylands\n" + "($Id: PlotLiveDemoApplet.java,v 1.42 2005/04/25 22:48:56 cxh Exp $)"; } COM: <s> return a string describing this applet </s>
funcom_train/46124025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDateLastRequest(GregorianCalendar pDateLastRequest) { if(pDateLastRequest == null){ throw new RequiredValueMissingValidationException("The given user's last request date can not be null."); }else if(pDateLastRequest.compareTo(this.dateCreation) < 0){ throw new RequiredValueMissingValidationException("The given user's last request date can not be inferior to the session's creation date."); } this.dateLastRequest = pDateLastRequest; } COM: <s> set the last request date of a user </s>
funcom_train/25471570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getPreferredLocation() { int screenWidth = Toolkit.getDefaultToolkit().getScreenSize().width; int windowWidth = 500;//tbsize.width+10; double percent; if (screenWidth > 832) percent = 0.8; else percent = 0.9; int windowX = (int)(percent * (screenWidth - windowWidth)); if (windowX < 10) windowX = 10; int windowY = 32; return new Point(windowX, windowY); } COM: <s> calculates a preferred location for the main application window </s>
funcom_train/42873978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startTopologyListener() { Runnable r = new Runnable() { public void run() { topologyListenerExit(JavaxUsb.nativeTopologyListener(WindowsUsbServices.this)); } }; topologyListener = new Thread(r); topologyListener.setDaemon(true); topologyListener.setName("javax.usb Windows implementation Topology Listener"); topologyListenerError = 0; topologyListener.start(); } COM: <s> start topology change listener thread </s>
funcom_train/41821631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MemorySegment getSegment(int wordAddress) { final int segmentAddress = segmentAddress(wordAddress); MemorySegment segment = getSegmentFromCache(segmentAddress); //return segments.get(segmentAddress); // Check if segment exists if (segment != null) { return segment; } // Create segment and store it in table. segment = new MemorySegment(SEGMENT_SIZE_POWER); segments.put(segmentAddress, segment); return getSegmentFromCache(segmentAddress); } COM: <s> returns the segments corresponding to the given word aligned address </s>
funcom_train/43108201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getTransitions(Object handle) { if (isAStateMachine(handle)) { return ((MStateMachine) handle).getTransitions(); } else if (isACompositeState(handle)) { return ((MCompositeState) handle).getInternalTransitions(); } else if (isAEvent(handle)) { return ((MEvent) handle).getTransitions(); } return illegalArgumentCollection(handle); } COM: <s> returns the transitions belonging to the given handle </s>
funcom_train/33265126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStyleValue( int newFontStyle ) { for ( Enumeration e = styles.keys(); e.hasMoreElements(); ) { String name = (String)e.nextElement(); int style = ((Integer)styles.get(name)).intValue(); if ( style == newFontStyle ) { select(name); return; } } } COM: <s> selects the given font style from the hashtable of </s>
funcom_train/43245315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNOKOneState() { System.out.println("getNOKOneState"); EmergencyContactObject instance = new EmergencyContactObject(); String expResult = ""; String result = instance.getNOKOneState(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get nokone state method of class org </s>
funcom_train/32722994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getObjectIterator(PersistentObject parentPO) { Object obj = getProperty(parentPO,beanAttribute); if (obj instanceof Collection) { Collection col = (Collection) obj; return col.iterator(); } else if (obj instanceof Map) { Map m = (Map) obj; return m.values().iterator(); } else return null; } COM: <s> returns iterator from bean attribute </s>
funcom_train/32783495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildID(final String prefix, final int pos) { final String myId = prefix + Integer.toString(pos, Character.MAX_RADIX); setId(myId); int cnt = 0; for (final Unit u : this) { cnt++; u.buildID(myId + ".", cnt); } } COM: <s> builds the id </s>
funcom_train/3466496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateActions() { if (services.getActionBackward() == null || services.getActionForward() == null) { return; } services.getActionBackward().setEnabled(historyPointer > 0); services.getActionForward().setEnabled(historyPointer < history.size() - 1); } COM: <s> update the availability of the actions associated with the </s>
funcom_train/26489556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Hashtable getUsersMyApplications() { if (myPages==null) getUsersMyPages(); Enumeration e = myPages.elements(); Hashtable ht = new Hashtable(myPages.size()); while (e.hasMoreElements()) { MyPage myp = (MyPage) e.nextElement(); Application app = getApplicationByPageId(myp.page_name); if (app != null) ht.put(app.name, myp); } return ht; } COM: <s> gets the users applications that has a my page that can be inserted </s>
funcom_train/20875454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf(String name) { try { int idx = 0; for (Term t : iContent) { if (t.getText() != null && t.getText().equals(name)) return idx; idx++; } return -1; } catch (Exception e) { return -1; } } COM: <s> index of element of content named name </s>
funcom_train/45623039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIgnoreInvalidTargetsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CodeAnalysisType_ignoreInvalidTargets_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CodeAnalysisType_ignoreInvalidTargets_feature", "_UI_CodeAnalysisType_type"), MSBPackage.eINSTANCE.getCodeAnalysisType_IgnoreInvalidTargets(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the ignore invalid targets feature </s>
funcom_train/41162887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(MaConstants entity) { EntityManagerHelper.log("deleting MaConstants instance", Level.INFO, null); try { entity = getEntityManager().getReference(MaConstants.class, entity.getConstantId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent ma constants entity </s>
funcom_train/19036156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePostWatch(PID pid, MemberID memberID) { StoredMember temp = this.getStoredMember(memberID); if(temp != null) { StoredPost post = this.getStoredPost(pid); if(post != null) { temp.removePostWatch(post); } } } COM: <s> removes a post watch from an account </s>
funcom_train/46383141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireDownloadProgress(Asset asset, int readBytes, int percent) { // notify per-asset listeners asset.setDownloadProgress(readBytes, percent); // notify global listeners for (AssetProgressListener listener : progressListeners) { listener.downloadProgress(asset, readBytes, percent); } } COM: <s> notify listeners of download progress </s>
funcom_train/32789868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkForDeath() { boolean fKill = false; synchronized (getThreadCountLock()) { fKill = (m_cThreadsToAdd < 0); if (fKill) { // Assume thread will die m_cThreadsToAdd ++; } } if (fKill) { throw new ThreadDeath(); } } COM: <s> throws a thread death if there are still threads that need to die </s>
funcom_train/7373929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double calculateProgress(JobControl jc, JobClient jobClient) throws IOException{ double prog = 0.0; prog += jc.getSuccessfulJobs().size(); List runnJobs = jc.getRunningJobs(); for (Object object : runnJobs) { Job j = (Job)object; prog += progressOfRunningJob(j, jobClient); } return prog; } COM: <s> compute the progress of the current job submitted </s>
funcom_train/10280174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int setSelectedRow(int modelIndex) { if (modelIndex >= 0) { TableSorter sorter = (TableSorter) getModel(); int index = sorter.viewIndex(modelIndex); ListSelectionModel lsm = getSelectionModel(); lsm.setSelectionInterval(index,index); // lsm.setAnchorSelectionIndex(index); // lsm.setLeadSelectionIndex(index); return index; } return -1; } COM: <s> set the selection respecting the model index </s>
funcom_train/1952055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double calculateSharedBinaryDomainCombinationBasedGenomeSimilarityScore() { final double t = getAllBinaryDomainCombinations().size(); final double s = getSharedBinaryDomainCombinations().size(); if ( t == 0.0 ) { return MIN_SIMILARITY_SCORE; } return ( MAX_SIMILARITY_SCORE - ( ( t - s ) / t ) ); } COM: <s> this returns a score between 0 </s>
funcom_train/4878444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePosition() { assert getPosition() != null : "getPosition() is null"; if (isBuilt()) { assert getTransGroup() != null : "getTransGroup() is null"; final Transform3D trans = new Transform3D(); trans.setTranslation(getPosition()); getTransGroup().setTransform(trans); } } COM: <s> this method updates the object position if the shape has been built </s>
funcom_train/7699385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int countFilesInDirectory(File[] files) { if (files == null) { return 0; } int count = 0; for (int i=0; i < files.length; i++) { if (files[i].isFile() && skipFile(files[i]) == false) { count++; } } return count; } COM: <s> count files that we can import </s>
funcom_train/7518302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(EstrangeiroDependente entity) { EntityManagerHelper.log("saving EstrangeiroDependente instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved estrangeiro dependente </s>
funcom_train/5874393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyProperties(Component comp) { final Execution exec = Executions.getCurrent(); if (_lprops != null) if (_langdef != null) applyProps(_langdef, comp, _lprops); else applyProps(exec, comp, _lprops); //_langdef is null if components are defined in page only if (_pprops != null) applyProps(exec, comp, _pprops); } COM: <s> applies the member initials to the component when a component </s>
funcom_train/25736035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNumberOfMissedCleavage(final int mc) { if (mc < 0) { throw new IllegalArgumentException(mc + " : cannot have a negative " + "number of missed cleavage"); } else if (mc > MISSED_CLEAVAGE_MAX) { throw new IllegalArgumentException(mc + " : cannot exceed " + MISSED_CLEAVAGE_MAX + " missed cleavages"); } missedCleavages = mc; } COM: <s> set the number of missed cleavage </s>
funcom_train/7614248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRaster(WritableRaster r) { raster = r; data = AwtImageBackdoorAccessor.getInstance().getData(r.getDataBuffer()); if (surfaceDataPtr != 0) { setImageSize(surfaceDataPtr, r.getWidth(), r.getHeight()); } this.width = r.getWidth(); this.height = r.getHeight(); } COM: <s> supposes that new raster is compatible with an old one </s>
funcom_train/14607398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UIControl addControlWithAction(UIControl control, String action, String[] args) { try { addControl(control).dispatchAction(control.getPath(action), args, ((UIContext) getContext()).getLocale(), false); return control; } catch (Exception e) { throw new UIException(e); } } COM: <s> adds and returns a control with given name dispatching an action with arguments </s>
funcom_train/17287087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasValue(String value) { if(this.values == null || value == null) return false; for(String v: this.values) { //System.err.format("### Does :%s: match :%s:?\n", v, value); if(value.equalsIgnoreCase(v)) return true; } return false; } COM: <s> see if value exists </s>
funcom_train/40885154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AtlasRegion addRegion (String name, Texture texture, int x, int y, int width, int height) { textures.add(texture); AtlasRegion region = new AtlasRegion(texture, x, y, width, height); region.name = name; region.originalWidth = width; region.originalHeight = height; region.index = -1; regions.add(region); return region; } COM: <s> adds a region to the atlas </s>
funcom_train/42087453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean saveImage(String dest) { if(!(isUrl)) { return false; } else { try { filePath = ImageGrabber.getImage(new URL(filePath), dest); } catch (java.net.MalformedURLException e) { System.err.println("URL not properly formatted:" + filePath); } return filePath != null; } } COM: <s> saves the image to the directory given to the method </s>
funcom_train/7613581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTilingMode(int mode) { checkTiling(); switch (mode) { case MODE_EXPLICIT: { tilingMode = mode; unsetTiling(); break; } case MODE_COPY_FROM_METADATA: case MODE_DISABLED: case MODE_DEFAULT: { tilingMode = mode; break; } default: { throw new IllegalArgumentException("Illegal value for mode!"); } } } COM: <s> sets the tiling mode </s>
funcom_train/32057125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetToolComponent() { System.out.println("testGetToolComponent"); GPGraphpad graphpad = new GPGraphpad(); ToolBoxLine cent = new ToolBoxLine(graphpad); Component toolComponent = cent.getToolComponent("command"); //graphpad.getFrame().dispose(); } COM: <s> test of get tool component method of class tool box line </s>
funcom_train/49409162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveDIDLInfo() { System.out.println("removeDIDLInfo"); DIDL instance = new DIDL(); DIDLInfoType didlinfo = instance.newDIDLInfo(); instance.addDIDLInfo(didlinfo); DIDLInfoType result = instance.removeDIDLInfo(didlinfo); assertEquals(didlinfo, result); assertEquals(0, instance.getDIDLInfos().size()); } COM: <s> test of remove didlinfo method of class info </s>
funcom_train/32740682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String formatValue(RecordFormatter rf, int fieldIndex, Object o, Dictionary<String, Object> formatParams) { // return super.format(o, formatParams); throw new ProgrammerError("If this method is needed, overload it in the inheriting class"); } COM: <s> formats the value to appear in an input statement </s>
funcom_train/32068762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addEmailRecipient(EmailRecipient emailRecipient) { boolean addOk = getEmailRecipients().add(emailRecipient); if (addOk) { emailRecipient.setEmailMessage((EmailMessage)this); } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed email recipient to the email message collection </s>
funcom_train/26484872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFontFamilyName(String newFontFamilyName) { if (newFontFamilyName != null) { newFontFamilyName = newFontFamilyName.trim(); if (newFontFamilyName.length() == 0) newFontFamilyName = null; } if (fontFamilyName != newFontFamilyName && (fontFamilyName == null || !fontFamilyName.equals(newFontFamilyName))) { fontFamilyName = newFontFamilyName; font = null; setChanged(); notifyObservers(); } } COM: <s> sets the font family name </s>
funcom_train/23410466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addComputedEffectPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CompositeProcess_computedEffect_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CompositeProcess_computedEffect_feature", "_UI_CompositeProcess_type"), ProcessPackage.Literals.COMPOSITE_PROCESS__COMPUTED_EFFECT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the computed effect feature </s>
funcom_train/18256726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getVar() { double avg = getAvg(); double variance = 0.0; Enumeration e = data.elements(); while (e.hasMoreElements()) { final double deviation = avg - ((Double) e.nextElement()).doubleValue(); variance += deviation * deviation; } variance /= (getCount() - 1.0); return variance; } COM: <s> returns the statistical variance of the current data </s>
funcom_train/48895543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton() { if (jButton == null) { jButton = new JButton(); jButton.setBounds(new Rectangle(227, 465, 87, 22)); jButton.setText("Buscar"); jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("Busca de prontuario"); buscar(); } }); } return jButton; } COM: <s> this method initializes j button </s>
funcom_train/14177864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Player getPlayerByName(String name) { Session session = HibernateUtil.getSessionFactory().getCurrentSession(); Transaction tx = null; List result = null; try { tx = session.beginTransaction(); Query q = session.createQuery("from Player where NAME like :un"); q.setString("un", name); result = q.list(); tx.commit(); } catch (HibernateException he) { if (tx != null) { tx.rollback(); } throw he; } return (Player) result.get(0); } COM: <s> returns the player given by name </s>
funcom_train/7505396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDaoFromProvider() { TestDaos baseDaoProvider = (TestDaos) getApplicationContext().getBean("daos"); assertNotNull(baseDaoProvider); Object dao = baseDaoProvider.getDao("entityTCDao"); assertNotNull(dao); assertTrue(DaoUtils.isDao(dao)); } COM: <s> test the retrieval of a dao from the generic dao provider </s>
funcom_train/32308327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { try { HMethod hm = type.getMethod("toString", new HClass[0]); ObjectRef istr = (ObjectRef) Method.invoke(ss, hm, new Object[] { this } ); return ss.ref2str(istr); } catch (InterpretedThrowable e) { return super.toString(); // nasty ObjectRef@... } } COM: <s> for debugging invokes the interpreted to string method </s>
funcom_train/28672656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private EditPart createGraphicalViewerPart(EditPart context, Object model) { EditPart part = null; if (model instanceof DiagramModel) { part = new DiagramEditPart(); } else if (model instanceof ConnectionModel) { part = new ConnectionEditPart(); } else if (model instanceof ClassNodeModel) { part = new ClassNodeEditPart(); } if (part != null) { part.setModel(model); } return part; } COM: <s> create a edit part for viewer </s>
funcom_train/4814228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddSameTileTwice() { board.addTile(tree, 0, 0); try { board.addTile(tree, maxBoardIndex, maxBoardIndex); fail("Shouldn't be allowed to add the same tile twice."); } catch (IllegalArgumentException expected) { // Success } } COM: <s> tests that the same tile cant be added twice to the board </s>
funcom_train/4016458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initDesigner(){ dockPanel = new DockPanel(); VerticalPanel panel = new VerticalPanel(); // panel.add(new FileToolbar(centerWidget)); panel.add(centerWidget); panel.setWidth("100%"); dockPanel.add(panel, DockPanel.CENTER); FormUtil.maximizeWidget(dockPanel); initWidget(dockPanel); DOM.sinkEvents(getElement(),DOM.getEventsSunk(getElement()) | Event.MOUSEEVENTS); } COM: <s> builds the form designer and all its widgets </s>
funcom_train/22549647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addState(final IOState newState) { NIODispatcher.instance().invokeLater(new Runnable() { public void run() { if(LOG.isDebugEnabled()) LOG.debug("Adding single state: " + newState); states.add(newState); if(states.size() == 1) { nextState(false, false); } } }); } COM: <s> adds a new state to process </s>
funcom_train/48877485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrintFormat create() throws DataException { String id = null; try { id = GUID.generate(); } catch(GUIDException guide) { throw new DataException("Could not generate a GUID", guide); } PrintFormat pf = new PrintFormat(); pf.setID(id); Cache cache = Cache.getInstance(); cache.put(id, pf); return pf; } //create COM: <s> creates a new print format business object </s>
funcom_train/46678057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tableChanged(TableModelEvent e) { if ((e.getType()==e.UPDATE) && (e.getColumn()==4)){ if (selectedPanelIndex==0){ eventListTable.getSelectionModel().setSelectionInterval(e.getFirstRow(), e.getLastRow()); } } } COM: <s> process change events fired by either the event or the contribution view </s>
funcom_train/14275047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int writeVFSFile(FileReference file, byte[] data) throws ConduitHandlerException, NotConnectedException { try { return jHotSync.writeVFSFile(file, data); } catch (DLPFunctionCallException e) { throw new ConduitHandlerException(e.toString(), e); } // end-catch } // end-method COM: <s> write the specified data to a vfs file </s>