__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/48184114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReverse(boolean reverse) { this.reverse = reverse; if (ngramFilters != null) { for (int i = 0; i < ngramFilters.size(); i++) { NgramFilter filter = ngramFilters.get(i); if (filter instanceof Reversible) ((Reversible)filter).setReverse(reverse); } } } COM: <s> set reverse flag and propagate to any reversible filters </s>
funcom_train/5416669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getRulesAsXML(ElementFactory factory, Account account) throws ServiceException { Node node = null; try { node = getRulesNode(account); } catch (ParseException e) { throw ServiceException.PARSE_ERROR("parsing Sieve script", e); } RuleRewriter t = new RuleRewriter(factory, node); return t.getElement(); } COM: <s> returns the tt account tt s filter rules as an xml element tree </s>
funcom_train/21519276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getProbability(String head, String word) { Integer wordHeadCount = depCounts.get(head + " " + word); Integer wordCount = individualWordCounts.get(word); if (wordHeadCount == null) { //TODO smooth this return 1.0; } else { return Math.log((wordHeadCount * 1.0) / wordCount); } } COM: <s> this will provide p head word </s>
funcom_train/9352868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void walkBreathFirst(RecursiveWalker<T> walker) { Queue<TreeContainer<T>> queue = new ArrayDeque<TreeContainer<T>>(); queue.add(this); while (!queue.isEmpty()) { TreeContainer<T> item = queue.remove(); walker.onAction(item); queue.addAll(item.getChildren()); } } COM: <s> walk recursive to width </s>
funcom_train/2676996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void uncompress() { data.position(0); InflaterInputStream inflater = new InflaterInputStream(data.asInputStream()); byte[] buffer = new byte[8192]; ByteBuffer tmp = ByteBuffer.allocate(0); tmp.setAutoExpand(true); try { while (inflater.available() > 0) { int decompressed = inflater.read(buffer); if (decompressed <= 0) { // Finished decompression break; } tmp.put(buffer, 0, decompressed); } } catch (IOException e) { tmp.release(); throw new RuntimeException("could not uncompress data", e); } data.release(); data = tmp; data.flip(); prepareIO(); } COM: <s> decompress contents using zlib </s>
funcom_train/32353676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GPXPerson parsePerson(final XMLNode node) { if (node != null) { final String name = node.getNodeSubNodeValue(TAGNAME_NAME); final GPXEmail email = parseEmail(node.getSubNode(TAGNAME_EMAIL)); final GPXLink link = parseLink(node.getSubNode(TAGNAME_LINK)); final GPXPerson person = new GPXPerson(name, email, link); return person; } return null; } COM: <s> parse a person tag </s>
funcom_train/25878863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object user) { if (user == null) return false; if (this == user) return true; if (!(user instanceof HMS_User)) return false; HMS_User that = (HMS_User)user; if (this.getName().equals(that.getName()) && this.getUserName().equals(that.getUserName()) && this.getTaxcode().equals(that.getTaxcode())) return true; return false; } COM: <s> returns true if and only if the argument is a hms user object </s>
funcom_train/49789501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGeneratedAccessEventNotPage() throws Exception { root = loadAndInfer(UserRoles.class); Session session = assertHasSession(root, "target session"); Frame target = assertHasFrame(session, "target"); // access event in the page Event event = session.getOnAccess(); assertGenerated(event); // check permissions operation contained in the session, not the page assertHasNoOperation(session, "permissions check"); ActivityOperation sessionOp = assertHasActivityOperation(target, "permissions check"); assertGenerated(sessionOp); } COM: <s> there should not be a permissions check in the target session </s>
funcom_train/9809950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void timerWentOff(PTimerWentOffEvent evt) { // find PTimer // get TVTimer // notify TVTimer listeners PTimerSpec pt_spec = evt.getTimerSpec(); TVTimerSpec tv_spec = (TVTimerSpec) tv_timer_hashed_by_p.get(pt_spec); if (tv_spec != null) { tv_spec.notifyListeners(this); } else { System.out.println("TV TIMER NOT FOUND!"); } } COM: <s> is called when one of the ptimers associated with a tvtimer </s>
funcom_train/42027404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initializeGraphicalViewer() { super.initializeGraphicalViewer(); GraphicalViewer viewer = getGraphicalViewer(); viewer.getControl().addMouseMoveListener(new MouseMoveListener() { public void mouseMove(MouseEvent e) { mousePoint = new Point(e.x, e.y); } }); viewer.setContents(this.diagram); viewer.addDropTargetListener(createTransferDropTargetListener()); viewer.addDropTargetListener(createTransferDropTargetListener1()); } COM: <s> set up the editors inital content after creation </s>
funcom_train/8015506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CageUI createCageUI(Cage c) { CageUI dlg = null; String details = null; details = geneticModel.toString(); dlg = new CageUI(this, geneticModel.isBeginnerMode(), c, selectionVial, details, geneticModel.getNumberOfCharacters(), geneticModel.getScrambledCharacterOrder()); nextCageId++; if (dlg != null) { cageCollection.add(dlg); calculateCagePosition(dlg); dlg.setVisible(true); } return dlg; } COM: <s> this method acutally sets up the cages ui </s>
funcom_train/12079372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char skipTo(char to) throws IOException { char c; int startIndex = this.index; reader.mark(Integer.MAX_VALUE); do { c = next(); if (c == 0) { reader.reset(); this.index = startIndex; return c; } } while (c != to); back(); return c; } COM: <s> skip characters until the next character is the requested character </s>
funcom_train/12261512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Graphics2D createGraphics(BufferedImage bi, Font font) { Graphics2D g2 = bi.createGraphics(); g2.setBackground(Color.white); g2.clearRect(0, 0, bi.getWidth(), bi.getHeight()); g2.setColor(Color.black); g2.setFont(font); return g2; } COM: <s> creates graphics object with specific settings </s>
funcom_train/21484107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCloneFailures() throws Exception { Cache cache = new Cache("testGetMemoryStore", 10, false, false, 100, 200); manager.addCache(cache); try { cache.clone(); fail("Should have thrown CloneNotSupportedException"); } catch (CloneNotSupportedException e) { //noop } } COM: <s> tests that attempting to clone a cache fails with the right exception </s>
funcom_train/28168772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ConnectionFigure createFigure() { ConnectionFigure f = (ConnectionFigure) prototype.clone(); getEditor().applyDefaultAttributesTo(f); if (prototypeAttributes != null) { for (Map.Entry<AttributeKey, Object> entry : prototypeAttributes.entrySet()) { f.setAttribute((AttributeKey) entry.getKey(), entry.getValue()); } } return f; } COM: <s> creates the connection figure </s>
funcom_train/23854734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { parent.removePropertyChangeListener(PNode.PROPERTY_FULL_BOUNDS, this); child.removePropertyChangeListener(PNode.PROPERTY_FULL_BOUNDS, this); parent.removeEdge(this); child.removeEdge(this); child.setParentEdge(null); } COM: <s> removes all references of nodes to this edge </s>
funcom_train/19249715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verify( String _s) { if ("".equals(_s) || (_s == null)) return (false); Integer value = null; boolean passed = false; try { value = new Integer( _s); passed = true; }catch( NumberFormatException e) { passed = false; } if ( (value != null)) { passed = ( _minAuthorizedValue.compareTo( value) <=0 && value.compareTo(_maxAuthorizedValue) <=0 ); } return passed; } COM: <s> checks that the entered value is numeric </s>
funcom_train/12622049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendToEvent(StringBuffer eventBuffer, String tag, String value) { value = (value == null) ? "" : value; if (value.length() > 0) { value = StringTools.escapeXml(value); } eventBuffer.append("<").append(tag).append(">").append(value); eventBuffer.append("</").append(tag).append(">\n"); } COM: <s> this method appends the event information supported by blackberry to a </s>
funcom_train/3833744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLayers( Layer[] layers ) { this.layers.clear(); this.list.clear(); if ( layers != null ) { for ( int i = 0; i < layers.length; i++ ) { this.layers.put( layers[i].getName(), layers[i] ); list.add( layers[i] ); } } } COM: <s> sets all layers of the web map context </s>
funcom_train/14072831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Menu getMenu(Control parent) { if (showEditorsPulldownMenu == null) { showEditorsPulldownMenu = createEditorsMenu(parent, showEditorsPulldownMenu); } MenuItem[] items = showEditorsPulldownMenu.getItems(); for (MenuItem item : items) { item.setEnabled(true); } return showEditorsPulldownMenu; } COM: <s> creates a new menu as a singleton object </s>
funcom_train/14207704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoAuthNoSessionForUnsecured() throws Exception { WebRequest request = new GetMethodWebRequest(baseUrl + "/index.jsp"); session.getResponse(request); // Check that there is no session ID String sessionId = session.getCookieValue("JSESSIONID"); assertNull("Got session for non-authenticated index page", sessionId); } COM: <s> test for session cookie on index page </s>
funcom_train/29781806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showRevisions() { addOrUpdateRevisions(dexlib.getDexsMap(), dexsTreeNodeCollection, false); addOrUpdateRevisions(dexlib.getCapabilitiesMap(), capabilitiesTreeNodeCollection, false); addOrUpdateRevisions(dexlib.getTemplatesMap(), templatesTreeNodeCollection, false); addOrUpdateRevisions(dexlib.getBusinessContextsMap(), businessContextsTreeNodeCollection, true); } COM: <s> update the display of the repository tree </s>
funcom_train/1442001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getPoint(int iPoint) { if (iPoint < 0 || iPoint >= points.size()) throw new IllegalArgumentException( "Point index iPoint=" + iPoint + ". " + "is either < 0 or >= the number of points on the curve."); Point result = points.get(iPoint); return result; } COM: <s> returns a reference to the point at the specified </s>
funcom_train/44220195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getChecksum(File f) { String checksum = null; try { CheckedInputStream cis = new CheckedInputStream(new FileInputStream(f), new Adler32()); byte[] buf = new byte[128]; while (cis.read(buf) >= 0) {} checksum = String.valueOf(cis.getChecksum().getValue()); } catch (Exception ex) { ex.printStackTrace(); } return checksum; } COM: <s> get the checksum string from the given file </s>
funcom_train/48494835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void beginMethod(String modifier, String typeName, String methodName, int argsNumber) { this.argsNumber = argsNumber; String str = modifier; if (typeName == null) str += " void"; else str += " " + typeName; str += " " + methodName; str += "("; if (argsNumber <= 0) { str += ")"; print(str); beginBlock(); } else { print(str); } } COM: <s> creates a method declaration </s>
funcom_train/5774398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar getMainMenu() { if (mainMenu == null) { mainMenu = new JMenuBar(); mainMenu.add(getFileMenu()); mainMenu.add(getLangMenu()); mainMenu.add(getLocaleMenu()); mainMenu.add(getTransMenu()); mainMenu.add(getHelpMenu()); } return mainMenu; } COM: <s> this method initializes main menu </s>
funcom_train/4658334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doLog(File[] paths, SVNRevision startRevision, SVNRevision endRevision, boolean stopOnCopy, boolean reportPaths, long limit, final ISVNLogEntryHandler handler) throws SVNException { doLog(paths, SVNRevision.UNDEFINED, startRevision, endRevision, stopOnCopy, reportPaths, limit, handler); } COM: <s> gets commit log messages with other revision specific </s>
funcom_train/37062341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkAxisTypeAvailable( int axisType ) { for ( Iterator it = allDataSources.iterator(); it.hasNext(); ) { DiagramDataSource ds = (DiagramDataSource)it.next(); if ( ds.getAxisY().getAxisType() == axisType ) { return true; } } return false; } COM: <s> checks if the given y axis type is available in the list of </s>
funcom_train/21087586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addProjectPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_SNI_Element_project_feature"), getString("_UI_SNI_Element_project_description"), SNI_Package.Literals.SNI_ELEMENT__PROJECT, true, true, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_ElementPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the project feature </s>
funcom_train/4233104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setShowLegend(boolean showLegend) { if (this.showLegend == showLegend) { return; } this.showLegend = showLegend; showLegendMenuItem.setSelected(showLegend); if (showLegend) { properties.remove(DATA_PANEL_PROPERTY_SHOW_LOGEND); } else { properties.setProperty(DATA_PANEL_PROPERTY_SHOW_LOGEND, "false"); } updateLegend(); } COM: <s> shows or hides the legend </s>
funcom_train/17008708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdownOutput() throws IOException { try { if (comm_socket_ != null) { comm_socket_.shutdownOutput(); } if (data_sockets_ != null) { for (int i = 0; i < number_of_streams_; i++) { data_sockets_[i].shutdownOutput(); } } } catch (IOException e) { throw e; } } COM: <s> disables the output stream for this socket </s>
funcom_train/23841082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadUserDefinedProps() { Properties udProps = globalDTC.getUserDefinedProps(); if (globalListVector==null) globalListVector = new Vector<String>(udProps.size()); for(Object udpKey : udProps.keySet()) { String sUDPKey = (String)udpKey; String sUDPVal = (String)udProps.get(udpKey); globalListVector.add(sUDPKey + " = "+sUDPVal); } Collections.sort(globalListVector); this.UDPList.setListData(globalListVector); } COM: <s> load user defined properties that are available </s>
funcom_train/51360685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteType(String type) throws NotFoundException { CredentialTypeTO to = new CredentialTypeTO(type); boolean deleted = true; try { conn = JDBCDataSource.getConnection(); delete(conn, to); } catch (NullPointerException e) { //log error deleted = false; } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); deleted = false; } return deleted; } COM: <s> deletes a type of credential from the database </s>
funcom_train/33368309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String dump() { String result = ""; Integer key; for (Enumeration e = hash.keys(); e.hasMoreElements();) { key = (Integer)e.nextElement(); result += "key = " + key + " elementID = " + get(key.intValue()) + " <br>\n"; } return (result); } COM: <s> dumps the current contents of this cache into an html formatted string </s>
funcom_train/30218075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WSRMMessage accept() { synchronized (nextAsynchMessageMonitor) { WSRMMessage msg = null; if ( !readyToProcessNextAsynchMessage ) { try { nextAsynchMessageMonitor.wait(); } catch (InterruptedException ie) {} } msg = nextAsynchMessage; readyToProcessNextAsynchMessage = false; nextAsynchMessageMonitor.notifyAll(); return msg; } } COM: <s> when the message listener calls </s>
funcom_train/19092593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ValueStoreBase getValueStoreFor(IdentityConstraint id, int initialDepth) { ValueStoreBase vb = (ValueStoreBase)fIdentityConstraint2ValueStoreMap.get(new LocalIDKey(id, initialDepth)); // vb should *never* be null! return vb; } // getValueStoreFor(IdentityConstraint, int):ValueStoreBase COM: <s> returns the value store associated to the specified identity constraint </s>
funcom_train/17051844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean resetDataBase() throws IOException { File users = new File(DBConstants.USERS_ROOT_PATH); File chats = new File(DBConstants.CHATS_ROOT_PATH); File emails = new File(DBConstants.EMAILS_ROOT_PATH); File sms = new File(DBConstants.SMS_ROOT_PATH); File invitations = new File(DBConstants.INVITATIONS_ROOT_PATH); boolean result1, result2, result3, result4, result5; result1 = deleteAllFiles(users); result2 = deleteAllFiles(chats); result3 = deleteAllFiles(sms); result4 = deleteAllFiles(emails); result5 = deleteAllFiles(invitations); return result1 && result2 && result3 && result4 && result5; } COM: <s> method that knows all the directories paths that forms the database and </s>
funcom_train/3902717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addConstrainChoicePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ConstrainChoiceConsiderationsType_constrainChoice_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ConstrainChoiceConsiderationsType_constrainChoice_feature", "_UI_ConstrainChoiceConsiderationsType_type"), AdlseqV1p3Package.Literals.CONSTRAIN_CHOICE_CONSIDERATIONS_TYPE__CONSTRAIN_CHOICE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the constrain choice feature </s>
funcom_train/20286036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAlertDateStringLongYear() { String tmp = ""; try { SimpleDateFormat formatter = (SimpleDateFormat) DateFormat.getDateInstance(DateFormat.LONG); formatter.applyPattern("M/d/yyyy"); return formatter.format(dueDate); } catch (NullPointerException e) { } return tmp; } COM: <s> gets the alert date string long year attribute of the task object </s>
funcom_train/86373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HeaderPrintWriter makeHPW(PrintWriterGetHeader header) { // the type of target is based on which property is used // to set it. choices are file, method, field, stream String target = PropertyUtil. getSystemProperty(Property.ERRORLOG_FILE_PROPERTY); if (target!=null) return makeFileHPW(target, header); target = PropertyUtil. getSystemProperty(Property.ERRORLOG_METHOD_PROPERTY); if (target!=null) return makeMethodHPW(target, header); target = PropertyUtil. getSystemProperty(Property.ERRORLOG_FIELD_PROPERTY); if (target!=null) return makeFieldHPW(target, header); return null; } COM: <s> create a header print writer based on the header </s>
funcom_train/1489065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void generateCountryCodes(Connection conn) throws SQLException { Statement stmt = null; ResultSet rs = null; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select iso_country_code, id from country"); while (rs.next()) { countryCodeToId.put(rs.getString("iso_country_code"), rs.getInt("id")); } } finally { // release database resources try { rs.close(); } catch (Exception e) {}; try { stmt.close(); } catch (Exception e) {}; } } COM: <s> builds the country code to id </s>
funcom_train/19407388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showPopupMenu(Component component, int x, int y) { DefaultMutableTreeNode n = (DefaultMutableTreeNode) ((JTree) component) .getPathForLocation(x, y).getLastPathComponent(); try { getPopupMenu(n).show(component, x, y); } catch (Exception e) { } } COM: <s> show the popup menu in the tree </s>
funcom_train/785956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSet(String name, TupleSet set) { if ( hasSet(name) ) { throw new IllegalArgumentException("Name already in use: "+name); } m_map.put(name, set); m_sets.add(set); m_count += set.getTupleCount(); if ( m_lstnr != null ) set.addTupleSetListener(m_lstnr); } COM: <s> add a tuple set to this composite </s>
funcom_train/596822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Item newString(final String value) { key2.set(STR, value, null, null); Item result = get(key2); if (result == null) { pool.put12(STR, newUTF8(value)); result = new Item(index++, key2); put(result); } return result; } COM: <s> adds a string to the constant pool of the class being build </s>
funcom_train/50240271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testProjectParentAndChildren() throws Exception { IMetricsElement adapter = getMetricsElement(PATH_PROJECT); assertNull("Projects don't have parents", adapter.getParent()); IMetricsElement[] children = adapter.getChildren(); assertEquals("Test project should have 1 child", 1, children.length); assertEquals("Child should be a PackageFragmentRootMetrics", PackageRootMetrics.class, children[0].getClass()); } COM: <s> test that a project has no parent and its children are of the </s>
funcom_train/17894471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void event(ServerEvent event) { if (sacs.isEmpty()) { log.debug("No SAC defined, ignoring event"); return; } for (SAC sac : sacs.values()) { String msg = event.getMessage(); log.debug("passing event:" + event); sac.event(msg); } } COM: <s> sends an event to the sac </s>
funcom_train/3112273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkTxt(SyntaxChecker listener, String txt) { for (int i = 1; i < txt.length(); i++) { char first = txt.charAt(i - 1); char second = txt.charAt(i); if ((first == ';') && isLineSeparator(second)) { listener.logError(i - 1, i, "Semicolons do not belong at the end of line"); } } } COM: <s> will make a check on the text returning whether or not any </s>
funcom_train/11069956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStatelessModelSimultaneousEl() throws Exception { // parse once, use many times exec01 = SCXMLTestHelper.getExecutor(scxml01jsp, new ELContext(), new ELEvaluator()); assertNotNull(exec01); exec02 = SCXMLTestHelper.getExecutor(scxml01jsp, new ELContext(), new ELEvaluator()); assertNotNull(exec02); assertFalse(exec01 == exec02); runSimultaneousTest(); } COM: <s> test the stateless model simultaneous executions el expressions </s>
funcom_train/47683661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean getValueAsBoolean(String p_path) { Field target; Boolean result = null; if ((target = getField(p_path)) != null) { result = target.getValueAsBoolean(); } else { throw new IllegalArgumentException("The referenced field \"" + p_path + "\" does not exist."); } return result; } COM: <s> retrieves the value of the field instance as a boolean independent of </s>
funcom_train/18592494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionResize(Component w, int width, int height) { if (!userResizable(w)) throw new ActionFailedException(Strings.get("tester.Window.no_resize")); resize((Window)w, width, height); waitForIdle(); } COM: <s> resize the given window </s>
funcom_train/22598440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void align(double x0, double y0) { double x = Double.MAX_VALUE; double y = Double.MAX_VALUE; for (Vertex v : graph.getVertices()) { Point2D c = transform(v); x = Math.min(x, c.getX()); y = Math.min(y, c.getY()); } for (Vertex v : graph.getVertices()) { Point2D c = transform(v); c.setLocation(c.getX() - x + x0, c.getY() - y + y0); } } COM: <s> aligns the graph to make x0 y0 the left upper corner </s>
funcom_train/3370962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void treeExpanded(TreeExpansionEvent e) { fireVisibleDataPropertyChange(); TreePath path = e.getPath(); if (path != null) { // TIGER - 4839971 // Set parent to null so AccessibleJTreeNode computes // its parent. AccessibleJTreeNode node = new AccessibleJTreeNode(JTree.this, path, null); PropertyChangeEvent pce = new PropertyChangeEvent(node, AccessibleContext.ACCESSIBLE_STATE_PROPERTY, AccessibleState.COLLAPSED, AccessibleState.EXPANDED); firePropertyChange(AccessibleContext.ACCESSIBLE_STATE_PROPERTY, null, pce); } } COM: <s> tree model expansion notification </s>
funcom_train/2856133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // DEBUG // System.out.println("Pinger " + NDX + ':' + pingIndex // + " sending ping " + pingsSoFar); // END data.rewind(); sendTo( data, to ); synchronized (statsLock) { pingCounts[pingIndex]++; } if (++pingsSoFar >= maxPings || !running ) cancel(); // this TimerTask } COM: <s> if this gets invoked we sent a packet whether or not we </s>
funcom_train/10283540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDate(TagContent date) throws TagFormatException { // check format if (date.getTextContent() == null || checkExactLength(date.getTextContent(), 4) == false || checkNumeric(date.getTextContent()) == false) { throw new TagFormatException(); } (new TextFrameEncoding(id3v2, "TDAT", date, use_compression)).write(); } COM: <s> set date format ddmm read from text content </s>
funcom_train/36077646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isWordPart(char c) { if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '=' || c == '_') return true; return false; } COM: <s> test if the char is part of the word </s>
funcom_train/42398627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void copyHeaders(final Headers source, final HttpServletResponse destination) { Checker.notNull("parameter:source", source); Checker.notNull("parameter:destination", destination); final Iterator names = source.names(); while (names.hasNext()) { final String name = (String) names.next(); final String[] values = source.getValues(name); for (int i = 0; i < values.length; i++) { String value = (String) values[i]; destination.addHeader(name, value); } } } COM: <s> helper which copies all headers from a headers to a http servlet response </s>
funcom_train/18742855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int freeze() { int result = 0; for (GraphJCell jCell : getModel().getRoots()) { boolean layoutable = jCell.setLayoutable(false); GraphConstants.setMoveable(jCell.getAttributes(), layoutable); if (layoutable) { result++; } } return result; } COM: <s> sets all jcells to unmoveable except those that are marked </s>
funcom_train/36821264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receive() { int[] data; while ((data = DBComm.read(this.getID())) == null) { try { Thread.sleep(3000); } catch (Exception ex) { } } update(data); getArena().getGrid().redrawRobot(oldLocation, location); } COM: <s> receieve data from the database regarding this robot </s>
funcom_train/31339100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void synchronize() { JobRunner.runInBackgroundThread(new Runnable() { public void run() { if (!Controller.getDefault().isShuttingDown() && fSyncItemsManager.hasUncommittedItems() && !fSynchronizer.isScheduled()) fSynchronizer.addAll(fSyncItemsManager.getUncommittedItems().values()); } }); } COM: <s> asks this service to synchronize all outstanding items </s>
funcom_train/40736286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SecurityProfile addSecurityProfile(SecurityProfile pojoToSet, SecurityProfileGrant pojo) { SecurityProfileGrantManager manager = SecurityProfileGrantManager.getInstance(); return manager.addSecurityProfile(this.createSecurityProfileGrantBean(pojoToSet), this.createSecurityProfileGrantBean(pojo)); } COM: <s> associates the security profile grant object to the security profile object </s>
funcom_train/19370853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean showQuitDialog(Component owner){ int value = JOptionPane.showConfirmDialog(owner, "Are you sure you want to quit?", "Quit OwlWatcher", JOptionPane.YES_NO_OPTION); return (value == JOptionPane.YES_OPTION); } COM: <s> the usual dialog for exiting the application </s>
funcom_train/5397208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection values() { List list = new TiraList(); for (int i = 0; i < table.length; i++) { List tmp = table[i]; if (tmp != null) { for (int j = 0; j < tmp.size(); j++) { KeyValuePair kp = (KeyValuePair)tmp.get(j); list.add(kp.getValue()); } } } return list; } COM: <s> note that this implementation does not work as the specs require values </s>
funcom_train/21774489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String format(WordRecord wrec) { if (wrec != null) return MessageFormat.format(TEMPLATE, new Object[] { wrec.getKey(), formatType(wrec.getType()), formatDate(wrec.getDate()), wrec.getMeaningsFormatted(", "), wrec.getComments() }); return ""; } COM: <s> format a word record to follow a specific template </s>
funcom_train/1429301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCmdClose() { if (cmdClose == null) { cmdClose = new JButton(); cmdClose.setText(" Done "); cmdClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { jDialog.setVisible(false); } }); } return cmdClose; } COM: <s> this method initializes cmd close </s>
funcom_train/13994739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object next() { if (!hasNext()) { throw new NoSuchElementException(); } _row = parseRow(); _currentRow = new ParameterParser(); for (int i = 0; i < _header.length; i++) { _currentRow.putParameter(_header[i], new String[] { getColumn(i) }); } return _currentRow; } COM: <s> returns parameter parser for next row </s>
funcom_train/46858294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setState(String name) { // clean up old state if (currentState != null) { currentState.stop(); } inputManager.clearAllMaps(); if (name.equals(EXIT_GAME)) { done = true; applicationState.stop(); } else { // init new state currentState = gameStates.get(name); if (currentState != null) { currentState.init(inputManager); } } } COM: <s> sets the current state </s>
funcom_train/3360142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { if (other == this) return true; if (! (other instanceof KerberosPrincipal)) { return false; } else { String myFullName = getName(); String otherFullName = ((KerberosPrincipal) other).getName(); if (nameType == ((KerberosPrincipal)other).nameType && myFullName.equals(otherFullName)) { return true; } } return false; } COM: <s> compares the specified object with this principal for equality </s>
funcom_train/35361465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void apply(double[][] data) { for (int i = 0; i < data.length; i++) { Frame f = clip.getFrame(i + firstFrame); for (int j = 0; j < data[0].length; j++) { f.setReal(j + firstFreqIndex, data[i][j]); } } } COM: <s> applies the given data into the frames of </s>
funcom_train/10814013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void explain() throws IOException { if (queries.isEmpty()) { LOG.info("No bound query to explain"); return; } PigServer pigServer = new PigServer(scriptContext.getPigContext(), false); registerQuery(pigServer, queries.get(0)); pigServer.explain(null, System.out); } COM: <s> explain this pipeline </s>
funcom_train/36639944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUpperTriangle(double[] values) throws Matrix.NotSquareException { if (!getIsSquare()) throw new Matrix.NotSquareException(); int k = 0; int dim = getRowCount(); for (int r = 0; r < dim; r++) { for (int c = r + 1; c < dim; c++) { setElement(r, c, values[k]); k++; } } } COM: <s> sets the upper triangle </s>
funcom_train/6359925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object toRaw(Object obj) { if (obj == null) return null; // shortcut if(isRaw(obj)) return obj; // no op if (obj instanceof JmeTreeNodeBean) { JmeTreeNodeBean bean = (JmeTreeNodeBean)obj; return bean.asJmeTreeNode(); } if (obj instanceof JmeSceneNodeBean) { JmeSceneNodeBean bean = (JmeSceneNodeBean)obj; return bean.asSpatial(); // handles superclass } return null; } COM: <s> adapts a model object raw or cooked to its raw form i </s>
funcom_train/32040196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(IWorkbench workbench, IStructuredSelection selection) { this.workbench = workbench; this.selection = selection; setWindowTitle(IMS_LD_Level_AEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(IMS_LD_Level_AEditorPlugin.INSTANCE.getImage("full/wizban/NewImsld"))); } COM: <s> this just records the information </s>
funcom_train/48371274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void blitString(FrameBuffer buffer, String s, int x, int y, int transparency, RGBColor color) { y -= baseline; for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); int index = alphabet.indexOf(c); if (index == -1) index = alphabet.indexOf('?'); if (index != -1) { Point size = pack.blit(buffer, index, x, y, transparency, false, color); x += size.x; } } } COM: <s> blits given string to frame buffer </s>
funcom_train/12189035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsEncodedExpression() throws Exception { boolean encodedExpression = PipelineExpressionHelper.isPipelineQuotedExpression(ENCODED_EXPRESSION); assertTrue("The specified string should have resolved to an " + "encoded expression string.", encodedExpression); encodedExpression = PipelineExpressionHelper.isPipelineQuotedExpression(NOT_AN_EXPRESSION); assertTrue("The specified string should not have resolved to an " + "encoded expression string.", !encodedExpression); } COM: <s> test the method is pipeline quoted expression string expression </s>
funcom_train/34422745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeElseIfSqlPhrase(ElseIfSqlPhrase elseIfSqlPhrase) { if (elseifList.contains(elseIfSqlPhrase)) { if (elseIfSqlPhrase instanceof AbstractSqlPhrase) ((AbstractSqlPhrase) elseIfSqlPhrase).parent = null; if (elseifList == null) elseifList = new LinkedList<ElseIfSqlPhrase>(); elseifList.remove(elseIfSqlPhrase); } } COM: <s> removes a else if sql phrase to this code if sql phrase code </s>
funcom_train/12164382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPageDetailsManager() throws Exception { PageTrackerFactory ptFactory = new JMXPageTrackerFactory(); PageDetailsManager manager1 = ptFactory.createPageDetailsManager(); PageDetailsManager manager2 = ptFactory.createPageDetailsManager(); assertSame("The two PageDetailsManager objects returned should be the same", manager1, manager2); } COM: <s> ensure that the jmxpage tracker factory returns the same instance </s>
funcom_train/38512454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTextFields() { mockTop.getTextFields(); controlTop.setReturnValue(new HashSet(Arrays.asList(TOP_FIELDS))); mockBottom.getTextFields(); controlBottom.setReturnValue(new HashSet(Arrays.asList(BOTTOM_FIELDS))); } COM: <s> adds a text fields to the merging object descriptor test object </s>
funcom_train/44602611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_informal_expression_01() { compileAndExecGivenStatementExpectRuntimeError( "X.java", "public class X {" + " //@ requires (* true *) && true;\n" + " void m() {\n" + " }\n" + "}\n", "new X().m()", "", JMLEvaluationError.class); } COM: <s> jml informal expression jml informal expression </s>
funcom_train/12186944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int parseMillis(String mString) { int result = 0; if (mString != null && !"".equals(mString)) { mString = "0." + mString; double ms = Double.valueOf(mString).doubleValue(); result = (int) Math.round(ms * 1000); } return result; } COM: <s> parse the milliseconds component of the time </s>
funcom_train/39145759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AppointmentDTO welcome(AppointmentDTO app) throws ConnectionException { AppointmentDTO ret = null; try { ret = getAppointmentService().changeStatus(app.getId(), AppointmentStatus.WAITING, null); } catch (RemoteException e) { logger.error("welcome failed", e); throw new ConnectionException(e); } return ret; } COM: <s> involed when the user double click on an incoming patient in cabinet panel </s>
funcom_train/37776151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String x=super.toString(); return (new StringBuffer(x==null?"<??? ":x.substring(0,x.length()-2))) .append(" label='") .append(m_label) .append("'>") .toString(); } COM: <s> display the tag name and label </s>
funcom_train/1649786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void queueResendRequest(int packetNumber) throws UpdatableSortedLinkedListKilledException { synchronized(resendRequestQueue) { if(queuedResendRequest(packetNumber)) { if(logMINOR) Logger.minor(this, "Not queueing resend request for " + packetNumber + " - already queued"); return; } if(logMINOR) Logger.minor(this, "Queueing resend request for " + packetNumber); QueuedResendRequest qrr = new QueuedResendRequest(packetNumber); resendRequestQueue.add(qrr); } } COM: <s> queue a resend request </s>
funcom_train/26072501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setDesired(StreamInputSynapse newDesired) { if (newDesired == null) { if (desired != null) desired.setInputFull(false); desired = newDesired; } else { if (newDesired.isInputFull()) return false; desired = newDesired; desired.setStepCounter(false); desired.setOutputDimension(getInputDimension()); desired.setInputFull(true); } return true; } COM: <s> set the input data stream containing desired training data </s>
funcom_train/20897157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReadClusterCollectionIDRecordNotFoundException() throws SQLException { long groupID = 5; long criteriaID = 1; try { ClusterDBHelper.readClusterCollectionID(groupID, criteriaID); fail("A record not found exception should have been thrown."); } catch (RecordNotFoundException e) { // Success } } COM: <s> the code test read cluster collection idrecord not found exception code method verifies </s>
funcom_train/50982652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetConnection_NullConnection() { final StatementWrapper wrapper = new StatementWrapper( (Statement)ProxyUtil.createProxy( Statement.class ) ); try { wrapper.setConnection( null ); fail( "Expected exception for null connection" ); } catch( final NullPointerException e ) { // Expected path } } COM: <s> test set connection with a null connection </s>
funcom_train/8116192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAttributeFromNode(final Node node, final String xPath){ if (node == null || "".equals(StringUtils.trimToEmpty(xPath))){ return ""; } try { XObject object = XPathAPI.eval(node, xPath); return object.str(); } catch (TransformerException e) { LOGGER.debug("TransformerException", e); } return ""; } COM: <s> get the attribute value from this node </s>
funcom_train/38513096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOutgoing(List pOutgoing) { if (pOutgoing != null) { if (mOutgoing == null) { mOutgoing = new ArrayList(); } for (Iterator it = pOutgoing.iterator(); it.hasNext();) { Relation element = (Relation) it.next(); mOutgoing.add(element); } } } COM: <s> setter association outgoing </s>
funcom_train/2421567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deploy(DeployData dataToDeploy, DeployHistory history) { checkNotNull(dataToDeploy, "dataToDeploy"); logDeployRequest(dataToDeploy); synchronized (lock) { if (state == State.DEPLOYING) { illegalOperation("deploy"); } addHistoryUpdater(history); stateTransition(State.DEPLOYING); deployImpl(dataToDeploy); } } COM: <s> deploys the specified project data to the server </s>
funcom_train/18872204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSave() { System.out.println("save"); // PolluxDecoderSYS instance = PolluxDecoderSYS.getInstance(); // instance.save(); // TODO review the generated test code and remove the default call to fail. // fail("The test case is a prototype."); } COM: <s> test of save method of class pollux decoder sys </s>
funcom_train/648834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendStatus(PrintWriter writer, IStatus status, int depth) { for (int i = 0; i < depth; i++) { writer.print(" "); } writer.println(status.getMessage()); IStatus[] children = status.getChildren(); for (int i = 0; i < children.length; i++) { appendStatus(writer, children[i], depth + 1); } } COM: <s> output the status text </s>
funcom_train/40465225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean finalizeResume() { String sql = "UPDATE resume SET additional_comments='" + addSlashes(getComments()) + "' WHERE person_id=" + getPersonID(); try { dbStatement = connection.createStatement(); dbStatement.execute(sql); ; return true; } catch(SQLException e) { return false; } } COM: <s> finalize and save resume </s>
funcom_train/41206797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) { impl.fillArc(nativeGraphics, xTranslate + x, yTranslate + y, width, height, startAngle, arcAngle); } COM: <s> fills a circular or elliptical arc based on the given angles and bounding </s>
funcom_train/19696086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String scanDirectoryForArtwork(String artworkFilename, String artworkPath) { String fullFilename = StringTools.appendToPath(artworkPath, artworkFilename); File artworkFile = FileTools.findFileFromExtensions(fullFilename, artworkExtensions); if (artworkFile.exists()) { return artworkFile.getAbsolutePath(); } return Movie.UNKNOWN; } COM: <s> scan the passed directory for the artwork filename </s>
funcom_train/8641578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPatternStroke(PdfPatternPainter p, Color color) { if (ExtendedColor.getType(color) == ExtendedColor.TYPE_SEPARATION) setPatternStroke(p, color, ((SpotColor)color).getTint()); else setPatternStroke(p, color, 0); } COM: <s> sets the stroke color to an uncolored pattern </s>
funcom_train/24084289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*private MeasurementEventImpl createWFServiceMeasurementEvent(ExecutionStageRecordImpl execStageRec) { MeasurementEventImpl me = new MeasurementEventImpl(execStageRec); MeasurementAgent agent = new MeasurementAgent(this.getServiceAgent(),MeasurementAgent.AgentType.SERVICE); me.setAgent(agent); execStageRec.getMeasurementEvents().add(me); return me; }*/ COM: <s> creates an event thats about a workflow service </s>
funcom_train/39544370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bind(Element element, GraphicsNode node) { if (elementNodeMap == null) { elementNodeMap = new WeakHashMap(); nodeElementMap = new WeakHashMap(); } elementNodeMap.put(element, new SoftReference(node)); nodeElementMap.put(node, new SoftReference(element)); } COM: <s> binds the specified graphics node to the specified element </s>
funcom_train/22284614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g, int cx, int cy, int cw, int ch) { Graphics g2 = null; try { g2 = g.create(); if (container.vert != null) { g2.clipRect(-tx, -ty, width-container.vert.width, height); } super.paint(g2, cx, cy, cw, ch); } finally { if (g2 != null) { g2.dispose(); } } } COM: <s> paint the background of the popupmenu </s>
funcom_train/20915767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { Iterator<K> i = this.keySet().iterator(); while (i.hasNext()) { i.next(); i.remove(); } //consistency check if (!this.map.isEmpty()) { // should never happen throw new IllegalStateException("The published SortedMap is inconsistent"); } } COM: <s> internaly instead caling clear this method iterates and removes all the </s>
funcom_train/5474948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextField2() { if (jTextField2 == null) { jTextField2 = new JTextField(); jTextField2.setBounds(new java.awt.Rectangle(150,409,85,20)); jTextField2.setEditable(false); jTextField2.addFocusListener(new FocusAdapter(){ public void focusGained(FocusEvent e){ jTextField2.setBackground(color_getfocus); } public void focusLost(FocusEvent ev){ jTextField2.setBackground(color_lostfocus); } }); } return jTextField2; } COM: <s> this method initializes j text field2 </s>
funcom_train/40542464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GraceCellLabelProvider initLabelProvider() { // Fill out the table, a cell at a time, with the overridden getCellText function return new GraceCellLabelProvider(viewer) { public String getText(Object obj) { return GraceTableViewerColumn.this.getText(obj); } }; } COM: <s> returns a default grace cell label provider for initialization </s>