__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/40526904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renderBlock(RenderContext rc, boolean terminate) { render(rc); // Incorrect, but no need to calculate isTerminal() unless terminate || post boolean terminal = (terminate) && isTerminal(); if (terminate && !terminal) { rc.getOut().mark(FilePosition.endOfOrNull(getFilePosition())); rc.getOut().consume(";"); } } COM: <s> called to render the statement as part of another statement </s>
funcom_train/43408600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel getJStockInPanel() { if (jStockInPanel == null) { jStockInPanel = new JPanel(); jStockInPanel.setLayout(new BorderLayout()); jStockInPanel.setToolTipText("Stock In"); jStockInPanel.setVisible(true); jStockInPanel.add(getJStockInPanelInner()); } return jStockInPanel; } COM: <s> this method initializes j stock in panel </s>
funcom_train/43502771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setTradeSelects(ElogUser user) { DefaultListModel model = (DefaultListModel) this.assignedTrades.getModel(); user.getTradeList().clear(); for(int i=0; i < model.getSize(); i++) { Trade trade = (Trade) model.elementAt(i); user.getTradeList().add(trade.getId()); } } COM: <s> transfers users and trades to the user </s>
funcom_train/19810677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String semanticCheck(Organization organization) { String errorMessage = ""; // check Contact. String contactId = toUniqueId(organization.getContact()); if (contactId == null || !this.uniqueId.contains(contactId) || !this.uniqueIdResearcher.containsKey(contactId)) { errorMessage += "Valid contact is missing.\n"; } return errorMessage; } COM: <s> check reference links in the given organization </s>
funcom_train/39379448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getForwardPageClass() { if (Context.getContextStack().isEmpty()) { return null; } if (getRequest().getForward() == null) { return null; } Context context = Context.getThreadLocalContext(); return context.getPageClass(getRequest().getForward()); } COM: <s> return the class that </s>
funcom_train/37587698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSwitchToNonExistantInterpreter() { debug.logStart(); try { _jvm.setActiveInterpreter("thisisabadname"); // System.err.println("outbuf: " + _jvm.outBuf); fail("Should have thrown an exception!"); } catch (IllegalArgumentException e) { // good, that's what should happen } debug.logEnd(); } COM: <s> ensure that switching to a non existant interpreter throws an exception </s>
funcom_train/20109777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void roundTime(Date time) { final int mins = time.getMinutes(); final int off = mins % colMins; if (off == 0) return; int half = colMins / 2; if (half * 2 < colMins) half++; if (off < half) time.setMinutes(mins - off); else time.setMinutes(mins + (colMins - off)); } COM: <s> round the given date to the nearest column time </s>
funcom_train/11770334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelSouth() { if (jPanelSouth == null) { jPanelSouth = new JPanel(); jPanelSouth.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 5)); jPanelSouth.add(getJProgressBar(), null); jPanelSouth.add(getJButtonOK(), null); } return jPanelSouth; } COM: <s> this method initializes j panel south </s>
funcom_train/3835933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJBHelpOK() { if (jBHelpOK == null) { jBHelpOK = new JButton(); jBHelpOK.setIcon(new ImageIcon(getClass().getResource( "/icons/media-playback-start.png"))); jBHelpOK.setText("OK"); jBHelpOK.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getJFrameAbout().setVisible(false); } }); } return jBHelpOK; } COM: <s> this method initializes j bhelp ok </s>
funcom_train/27905887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int oneSat(int bdd) { if( bdd < 2) return bdd; if(getLow(bdd) == 0) { int high = work_stack[work_stack_tos++] = oneSat(getHigh(bdd)); int u = mk( getVar(bdd), 0, high); work_stack_tos--; return u; } else { int low= work_stack[work_stack_tos++] = oneSat(getLow(bdd)); int u = mk( getVar(bdd), low, 0); work_stack_tos--; return u; } } COM: <s> return a satisfying assignment for this bdd as a unary cube </s>
funcom_train/33281469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object jsxGet_cells() { if (cells_ == null) { final HtmlTableRow row = (HtmlTableRow) getDomNodeOrDie(); cells_ = new HTMLCollection(row, false, "cells") { @Override protected List<Object> computeElements() { return new ArrayList<Object>(row.getCells()); } }; } return cells_; } COM: <s> returns the cells in the row </s>
funcom_train/40496637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void wordlistAdd() { JFileChooser fc = new JFileChooser(); fc.setMultiSelectionEnabled(true); fc.setCurrentDirectory(new File("/pentest/passwords/wordlists/")); int retval = fc.showOpenDialog(null); if (retval == JFileChooser.APPROVE_OPTION) { File files[] = fc.getSelectedFiles(); for (int i = 0; i < files.length; i++) { String s = files[i].getPath(); if (Methods.fileExists(s)) { dtmWord.addRow(new String[]{s}); } } } } COM: <s> prompt user to select a file to add to the list </s>
funcom_train/43424903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTree() { tree = new JTree(top); tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); tree.setMinimumSize(new Dimension(150, 0)); tree.setPreferredSize(new Dimension(200, 600)); tree.setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE)); LOG.fine("tree " + tree); } COM: <s> initializes the tree to the built nodes </s>
funcom_train/26279679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JGimpLayer getLayerAtPoint(int x, int y) throws JGimpException { int layer = m_App.callProcedure("gimp_image_pick_correlate_layer", this, new JGimpInt32(x), new JGimpInt32(y))[0].convertToInt(); if (layer == -1) { return null; } return new JGimpLayer(m_App, layer); } COM: <s> returns the top most layer that intersects the given point or null </s>
funcom_train/22384551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point transformTop(Point src, Point dst, boolean toTop) { if(toTop) transform(src, dst, true); if(parent != null) parent.transformTop(src, dst, toTop); if(!toTop) transform(src, dst, false); return dst; } COM: <s> transform the given point between the internal and top level coordinates </s>
funcom_train/4527954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdownDataNodes() { for (int i = dataNodes.size()-1; i >= 0; i--) { System.out.println("Shutting down DataNode " + i); DataNode dn = dataNodes.remove(i).datanode; dn.shutdown(); numDataNodes--; } } COM: <s> shutdown all data nodes started by this class </s>
funcom_train/28763281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLimitTime(java.math.BigDecimal value) throws com.intersys.objects.CacheException { com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value); mInternal.setProperty(ii_LimitTime, jj_LimitTime,kk_LimitTime, com.intersys.objects.Database.RET_PRIM, "LimitTime", dh); return; } COM: <s> sets new value for code limit time code </s>
funcom_train/5584571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OutputStream getOutputStream() throws IOException { if (isSocket()) { return ((Socket) socket).getOutputStream(); } else { // accept socket from server, // get and return it's OutputStream return ((ServerSocket) socket).accept().getOutputStream(); } } COM: <s> returns an output stream for the wrapped socket </s>
funcom_train/22432629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanelInhalt() { if (panelInhalt == null) { panelInhalt = new JPanel(); panelInhalt.setLayout(new BorderLayout()); panelInhalt.add(getDesktopPanelInhalt(), java.awt.BorderLayout.CENTER); panelInhalt.add(getTextPaneStatusBar(), java.awt.BorderLayout.SOUTH); this.getContentPane().add(panelInhalt); } return panelInhalt; } COM: <s> this method initializes panel inhalt </s>
funcom_train/4787704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(IAction action) { LoadResourceAction.LoadResourceDialog loadResourceDialog = new LoadResourceAction.LoadResourceDialog(getWindow().getShell()); if (Dialog.OK == loadResourceDialog.open()) { for (URI uri : loadResourceDialog.getURIs()) { openEditor(getWindow().getWorkbench(), uri); } } } COM: <s> opens the editors for the files selected using the load resource dialog </s>
funcom_train/40769014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getClassPathContents() { String sep = getPathsFileSeparator(); String classpathfilelocation = data.projectDirectory + sep + ".classpath"; File file = new File(classpathfilelocation); if (file.isFile() == false) { System.out.println("Can't read the .classpath file or it does not exist"); System.exit(1); } classFileContents = readFile(file); System.out.println("ClassFileContents: " + classFileContents); } COM: <s> get class path file contents search </s>
funcom_train/8075798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyDataSetLoaded(DataSetEvent e) { Vector l; synchronized (this) { l = (Vector)m_listeners.clone(); } if (l.size() > 0) { for(int i = 0; i < l.size(); i++) { ((DataSourceListener)l.elementAt(i)).acceptDataSet(e); } m_dataSet = null; } } COM: <s> notify all data source listeners that a data set has been loaded </s>
funcom_train/9920609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadTexCoords(int n, String filename) { float[] tmp = new float[2 * size]; beginUpdateTexCoords(n); loadFloatArrayFromBinary(filename, tmp, size, 2, 2); texCoords.put(tmp); endUpdateTexCoords(); } COM: <s> loads texture coordinates of nth texture from binary file into model </s>
funcom_train/3935109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IItem retrieveItem(UniqueID inID) throws BOMException { switch (inID.itemType) { case IItem.TERM: return BOMHelper.getTermHome().getItem(inID.itemID); case IItem.TEXT: return BOMHelper.getTextHome().getItem(inID.itemID); case IItem.PERSON: return BOMHelper.getPersonHome().getItem(inID.itemID); default: return BOMHelper.getTermHome().getItem(inID.itemID); } } COM: <s> retrieves an item with an unique id </s>
funcom_train/18571867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isStatementTrue(Object identifier, String sqlStatement) { Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; try { conn = getReadOnlyConnection(); ps = conn.prepareStatement(sqlStatement); ps.setObject(1, identifier); rs = ps.executeQuery(); return rs.next(); } catch (SQLException e) { LogUtil.logException(sqlStatement + " for " + identifier, e); return false; } finally { closeDB(conn, ps, rs); } } COM: <s> returns true if the sql statement is true </s>
funcom_train/12561185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getQuadrant() { if (cursor==null) { // Default return QUAD_TOPLFT; } if (!dhsizes_valid) { setdhsizes(); } int y = cursor.y - (lheight * myInfo.topVis); boolean r = cursor.x > dhwidth; boolean b = y > dhheight; if (b) { return r ? QUAD_BOTRGT : QUAD_BOTLFT; } return r ? QUAD_TOPRGT : QUAD_TOPLFT; } COM: <s> reports the quadrant quarter screen the caret is in </s>
funcom_train/38315434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LinkEntry updateLink(LinkEntry entry) { entry.setModificationDate(new Date()); try { linksDAO.updateLink(entry); } catch (PersistenceException jlcppe) { log.debug("PersistenceException caught updating link entry with id = " + entry.getId(), jlcppe); return null; } return entry; } COM: <s> update a link from a form on the frontend </s>
funcom_train/17933855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addColor(int red, int green, int blue) { if ((red < 256) && (green < 256) && (blue < 256) && (red >= 0) && (green >= 0) && (blue >= 0)) { Vector<Integer> tempVec = new Vector<Integer>(); tempVec.add(red); tempVec.add(green); tempVec.add(blue); this.rgbValues.add(tempVec); } } COM: <s> adds a color at the end of the internal rgb values vector </s>
funcom_train/11729593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRepositoryException() { try { testRootNode.addNode(nodeName1 + "[1]"); fail("Expected RepositoryException."); } catch (RepositoryException e) { // correct. } try { testRootNode.addNode(nodeName1 + "[1]", testNodeType); fail("Expected RepositoryException."); } catch (RepositoryException e) { // correct. } } COM: <s> tests if a repository exception is thrown in case the path </s>
funcom_train/42225463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doResearchSpending() { computersResearchPoints += computersResearchRatio * totalResearchPoints / 100; constructionResearchPoints += constructionResearchRatio * totalResearchPoints / 100; forceFieldResearchPoints += forceFieldResearchRatio * totalResearchPoints / 100; planetologyResearchPoints += planetologyResearchRatio * totalResearchPoints / 100; propulsionResearchPoints += propulsionResearchRatio * totalResearchPoints / 100; weaponsResearchPoints += weaponsResearchRatio * totalResearchPoints / 100; totalResearchPoints = 0; } COM: <s> perform the research </s>
funcom_train/20629079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadResource( String qs_name ) { try { QueryServer qs = ( QueryServer ) Class.forName( qs_name ).newInstance(); qs.loadResource(); } catch ( Exception e ) { Categories.dataServer().error( "Unable to load resource for query server " + qs_name, e ); displayNoQsToLoad(); } } COM: <s> this method loads each query servers load resource </s>
funcom_train/27758568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toggleHold() { hold ^= true; if (hold) { setHoldingColor(); holdPos = textArea.getDocument().getLength(); oldHoldPos = holdPos; } else { setNonHoldingColor(); holdPos = 0; } textArea.requestFocusInWindow(); } COM: <s> hold the text change color </s>
funcom_train/29018062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setThumb (int value) { checkWidget(); if (value < 1) return; SCROLLINFO info = new SCROLLINFO (); info.cbSize = SCROLLINFO.sizeof; int /*long*/ hwnd = hwndScrollBar (); int type = scrollBarType (); info.fMask = OS.SIF_PAGE | OS.SIF_RANGE | OS.SIF_DISABLENOSCROLL; OS.GetScrollInfo (hwnd, type, info); info.nPage = value; if (info.nPage != 0) info.nPage++; SetScrollInfo (hwnd, type, info, true); } COM: <s> sets the size of the receivers thumb relative to the </s>
funcom_train/16955012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setup() { log = Logger.getLogger(this.getClass().getName()); Object[] args = getArguments(); String memo = (String) args[0]; String name = (String) args[1]; log.info("Starting Agent " + name); this.mem = new SWRLMemory(memo, name); this.model = this.mem.getModel(); log.info(mem.config.BASE); BehaviourReasoning hrmBehaviour = new BehaviourReasoning(); addBehaviour(hrmBehaviour); } COM: <s> jade method for agent setup overriden to load the swrl memory and to </s>
funcom_train/25505749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isChanged() { Locale loc = Preferences.INSTANCE.getLocale(); boolean change = !(loc.equals(getBuiltLocale()) && (Preferences.INSTANCE.isDefaultCountry()==isDefaultCountry()) && (Preferences.INSTANCE.isDefaultLanguage()==isDefaultLanguage()) && (Preferences.INSTANCE.isTranslatorMode()==isTranslatorMode())); return change; } COM: <s> returns true if the panel reflects something different from preferences </s>
funcom_train/1147203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point3f getPointFromXY(int width, int height, int i, int j) { // Get the center for the image Vector3f v = new Vector3f(this.FieldCenter); // v1 = i * this.du + v v.scaleAdd(i - width / 2, this.du, v); // v = j * this.dv + v v.scaleAdd(j - height /2, this.dv, v); return new Point3f(v.x, v.y, v.z); } COM: <s> get a point from a pixel in the viewport </s>
funcom_train/38322722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFullPathForFolder(ProjectFolder folder, String path) { path = folder.getName() + "/" + path; if (folder.getParentFolder() == null) { return path; } path = getFullPathForFolder(folder.getParentFolder(), path); return path; } COM: <s> method to recursively get the full pathname of a projectfolder </s>
funcom_train/41272639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerResource(FramedResource resource) { super.registerResource(resource); if (getServletProps() == null ) { synchronized (this.getClass()) { httpd s = (httpd) getServer(); if ( s != null ) { // Register the property sheet if not done yet: ObservableProperties props = s.getProperties() ; s.registerPropertySet(new ServletProps(s)); } } } } COM: <s> register the resource and add servlet properties in httpd </s>
funcom_train/6404386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createBounds() { switch (type) { case AABB: bounds = new BoundingBox(); worldBounds = new BoundingBox(); break; case OBB: bounds = new OrientedBoundingBox(); worldBounds = new OrientedBoundingBox(); break; case Sphere: bounds = new BoundingSphere(); worldBounds = new BoundingSphere(); break; default: break; } } COM: <s> creates the appropriate bounding volume based on the type set during </s>
funcom_train/5853765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean doIWant(Event e) { if (metadata_I_want == null) { if (data_ids_I_want == null) return true; else return e.isDataIncluded(data_ids_I_want); } else if (data_ids_I_want == null) { return e.areAnyMetadataIncluded(this.getAllMetadata()); } else { return ((e.areAnyMetadataIncluded(this.getAllMetadata())) && (e.isDataIncluded(data_ids_I_want))); } } COM: <s> checks the metadata i want and data ids i want fields for the </s>
funcom_train/51523410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float defuzzifyByMeanOfMaxMethod(final FuzzySet fuzzySet) { float value = Float.NaN; if (fuzzySet != null) { MembershipFunction membershipFunction = fuzzySet.getMembershipFunction(); if (membershipFunction != null) { value = ((defuzzifyByLeftOfMaxMethod(fuzzySet) + defuzzifyByRightOfMaxMethod(fuzzySet)) / 2.0f); } } return value; } COM: <s> defuzzifies fuzzy set by mean of max method </s>
funcom_train/39393270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ConnectionFigure findConnection(int x, int y) { // copied Method from JHotDraw's ConnectionTool#findConnection(..) FigureEnumeration k = drawing().figuresReverse(); while (k.hasNextFigure()) { Figure figure = (Figure)k.nextFigure(); figure = figure.findFigureInside(x, y); if (figure != null && (figure instanceof ConnectionFigure)) { return (ConnectionFigure)figure; } } return null; } COM: <s> finds an existing connection figure say edge at given coordinates </s>
funcom_train/39534744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUnknownMenuItem(String menuName, JMenuItem menuItem){ if(menuName!=null && ! menuName.equals("") && menuItem!=null){ if(unknownMenuItems.containsKey(menuName)){ LinkedList<JMenuItem> list=unknownMenuItems.get(menuName); list.add(menuItem); }else{ LinkedList<JMenuItem> list=new LinkedList<JMenuItem>(); list.add(menuItem); unknownMenuItems.put(menuName, list); } } } COM: <s> adds a menu item that is not listed in the xml menu file </s>
funcom_train/44694833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintImmediately(int x, int y, int width, int height) { Rectangle damagedRegion = allDamagedRegions(); if (damagedRegion == null) super.paintImmediately(x, y, width, height); else { Rectangle rect = new Rectangle(x, y, width, height); rect.add(damagedRegion); super.paintImmediately(rect.x, rect.y, rect.width, rect.height); } } COM: <s> overrides paint immediately from super class </s>
funcom_train/3174094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String toString(PrintRequestAttributeSet atts) { WordBuffer buf = new WordBuffer(","); Attribute[] array = attributes.toArray(); for (int i = 0; i < array.length; i++) buf.append(array[i].getClass().getName()+"="+array[i].toString()); return buf.toString(); } COM: <s> transform print attributes to string </s>
funcom_train/5342997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Message receive() throws IOException, BadPacketException { Message m = null; try { m = super.receive(); } catch(IOException e) { if( _manager != null ) _manager.remove(this); throw e; } // record received message in stats _connectionStats.addReceived(); return m; } COM: <s> override of receive to do connection manager stats and to properly shut </s>
funcom_train/45193064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void service(ServiceManager manager) throws ServiceException { m_socketManager = (SocketManager) manager.lookup("socket-manager"); m_connectionManager = (ConnectionManager) manager.lookup( "connection-manager"); m_connectionHandlerFactory = (ConnectionHandlerFactory) manager.lookup("connection-handler-factory"); } COM: <s> servicing of the component by the container during which service </s>
funcom_train/21883028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doAction() throws ActionException { if (null == handler || null == project) { throw new IllegalStateException("must call preAction() first"); } try { executeProject(project); doActionExecuted = true; } catch (BuildException e) { throw new ActionException(this, e.getMessage(), e); } } COM: <s> executes the ant project </s>
funcom_train/808436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addParentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AnalysisStepType_parent_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AnalysisStepType_parent_feature", "_UI_AnalysisStepType_type"), MolfilterPackage.Literals.ANALYSIS_STEP_TYPE__PARENT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the parent feature </s>
funcom_train/31290005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireOutputStarted(final SpeakableText speakable) { final SynthesizedOutputEvent event = new OutputStartedEvent(this, null, speakable); synchronized (listeners) { final Collection<SynthesizedOutputListener> copy = new java.util.ArrayList<SynthesizedOutputListener>( listeners); for (SynthesizedOutputListener current : copy) { current.outputStatusChanged(event); } } } COM: <s> notifies all listeners that output has started </s>
funcom_train/19454955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convertPrimativeToWrapper(String prim) { java.util.Map primatives = new java.util.HashMap(); primatives.put("byte", "java.lang.Byte"); primatives.put("short", "java.lang.Short"); primatives.put("int", "java.lang.Integer"); primatives.put("long", "java.lang.Long"); primatives.put("float", "java.lang.Float"); primatives.put("double", "java.lang.Double"); primatives.put("char", "java.lang.Character"); primatives.put("boolean", "java.lang.Boolean"); primatives.put("void", "java.lang.Void"); return (String) primatives.get(prim); } COM: <s> answers a string that represents a wrapper object based on the primitive </s>
funcom_train/33808662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String inputsToString(){ String string = new String(); for(int i = 0; i < this.primaryInputs.size(); i++){ string += this.primaryInputs.get(i) + "\t"; } string += "\n"; for(int i = 0; i < this.primaryInputs.size(); i++){ CircuitEntity entity = this.entities.get(this.primaryInputs.get(i)); string += entity.inValues[0] + "\t"; } return string; } COM: <s> returns current state of inputs in printable form </s>
funcom_train/1309348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (type == NUM) { return MicroDouble.toString(dVal); } if (type == TXT) { return sVal; } if (type == BOL) { return String.valueOf(bVal); } if (type == OBJ) { return String.valueOf(oVal); } return null; } COM: <s> convert value to string for printing </s>
funcom_train/38578636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void produceTokens(int tokens, GEAction action) { for (GEPort port : outPorts) { port.produceTokens(tokens, action); } if (outActor != null) { // Schedule the transmission delay outActor.getProcessor().getScheduler().schedule(this, tokens, action, outActor); } } COM: <s> produce a number of tokens </s>
funcom_train/32791185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleLogAnd(String codeSrcExp, List<String> args, StringBuffer rule, StringBuffer spec) { assert(args.size() == 1) : "Logical expression and needs exactly one argument"; codeAgent.setArgument("rel_exp_1", codeSrcExp); codeAgent.setArgument("rel_exp_2", args.get(0)); rule.append("logical_expression_tail"); spec.append("and"); } COM: <s> parameterizes the code agent for a logical and operation </s>
funcom_train/9229140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getScreenResolution(Component c) { int res = 0; if (c == null){ res= getDefaultScreenResolution(); } else { Toolkit toolkit = c.getToolkit(); res = toolkit != null ? toolkit.getScreenResolution() : getDefaultScreenResolution(); } DvaLogger.debug(ScreenMapper.class, "res:" + res); return res; } COM: <s> returns the components screen resolution or the default screen </s>
funcom_train/12196015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidSetValues() { try { DefaultUnorderedSetPolicyValue value = new DefaultUnorderedSetPolicyValue( new DefaultIntPolicyType(), "1,2,3.14259265,4,5"); fail("A DeviceRepositoryException should have been thrown"); } catch (DeviceRepositoryException e) { // This exception should be thrown. } } COM: <s> tests that an unordered set cannot be constructed from invalid values </s>
funcom_train/40866471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Payment findPayment(PaymentMethod paymentMethod, Collection payments) { Payment payment; for(Iterator it = payments.iterator(); it.hasNext(); ) { payment = (Payment) it.next(); if(payment.getPaymentTypeId().longValue() == paymentMethod.getId().longValue()) { return payment; } } return null; } COM: <s> returns the order payment for the given payment method </s>
funcom_train/25033552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getCoordinateCategoryAsString() { String s = "category"; if (coordinateCategory == CoordinateCategoryUnspecified) { s = s+" unspecified"; } else if (coordinateCategory == CoordinateCategoryMammoIndividualCalcification) { s = s+" individual calcification"; } else if (coordinateCategory == CoordinateCategoryMammoCalcificationCluster) { s = s+" calcification cluster"; } else if (coordinateCategory == CoordinateCategoryMammoBreastDensity) { s = s+" breast density"; } return s; } COM: <s> p get category as string </s>
funcom_train/28752688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRtprimlotnum(String newVal) { if ((newVal != null && this.rtprimlotnum != null && (newVal.compareTo(this.rtprimlotnum) == 0)) || (newVal == null && this.rtprimlotnum == null && rtprimlotnum_is_initialized)) { return; } this.rtprimlotnum = newVal; rtprimlotnum_is_modified = true; rtprimlotnum_is_initialized = true; } COM: <s> setter method for rtprimlotnum </s>
funcom_train/787563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMinimumSize(double size) { if ( Double.isInfinite(size) || Double.isNaN(size) || size <= 0 ) { throw new IllegalArgumentException("Minimum size value must be a " + "finite number greater than zero."); } if ( m_inferRange ) { m_sizeRange += m_minSize - size; } m_minSize = size; } COM: <s> sets the size assigned to the lowest valued data items </s>
funcom_train/31648157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int parseType(String type){ if(type.startsWith("int")) return Types.INTEGER; else if(type.startsWith("real")) return Types.FLOAT; else if(type.startsWith("varchar")) return Types.STRING; else if(type.startsWith("datetime")) return Types.DATETIME; else return Types.OTHER; } COM: <s> convert the name of a data type into int value representing it </s>
funcom_train/47434314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCommentMapping(EObject object, int begin, int end) { if (begin > -1 && end > -1) { List commentPositions = (List) eObject2CommentPositions.get(object); if (commentPositions == null) { commentPositions = new ArrayList(); eObject2CommentPositions.put(object, commentPositions); } add(commentPositions, begin, end); } } COM: <s> adds a comment mapping between the model object and the text begins at </s>
funcom_train/28754990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGenetitle(String newVal) { if ((newVal != null && this.genetitle != null && (newVal.compareTo(this.genetitle) == 0)) || (newVal == null && this.genetitle == null && genetitle_is_initialized)) { return; } this.genetitle = newVal; genetitle_is_modified = true; genetitle_is_initialized = true; } COM: <s> setter method for genetitle </s>
funcom_train/4847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumberSensoryItems(){ //get the feature list for each type of feature Collection<List<SensoryItem>> lists = this.m_featuregroupTable.values(); int featureCounter = 0; for(List<SensoryItem> currentList : lists){ //ignore null lists, these occur when we remove a feature list if(currentList != null){ featureCounter += currentList.size(); } } return featureCounter; } COM: <s> returns the total number of features in the agent inputs </s>
funcom_train/3014079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveMessages(HttpServletRequest request) { if (request.getSession() .getAttribute("messages") != null) { saveMessages(request, (ActionMessages) request.getSession().getAttribute("messages")); request.getSession() .removeAttribute("messages"); } } COM: <s> get the messages container associated with session </s>
funcom_train/50880489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void killSelectConnection(Connection inConnection) throws SQLException{ // if there is a null sent in, just return if (inConnection == null) return; // look for the connection in the SelectInUse queue. MyConnection tempConnection = removeFromSelectQueue(inConnection); // close the connection try{ inConnection.close(); } catch (SQLException e){ } } COM: <s> kill this connection do not reuse it </s>
funcom_train/42061284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performCPUAndMemorySyncTest() { int id = 0; long cpum_start = 0L; long cpum_elapsedTime = 0L; cpum_start = System.currentTimeMillis(); while (cpum_elapsedTime < Config.CPU_AND_MEM_TEST_TIME) { byte[] testBytes = new byte[PTClient.datasize]; id = messageId++; sendBytes(id, testBytes); cpum_elapsedTime = System.currentTimeMillis() - cpum_start; } } COM: <s> test method for performing the synchronous cpu utilization and memory </s>
funcom_train/15810320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEventChargingFunctionAddress(String ecfAddress) throws ParseException { if (ecfAddress == null) throw new NullPointerException( "JAIN-SIP Exception, " + "P-Charging-Function-Addresses, setEventChargingFunctionAddress(), the ecfAddress parameter is null."); setParameter(ParameterNamesIms.ECF, ecfAddress); } COM: <s> p set the event charging function ecf address p </s>
funcom_train/49262501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateGrayStatus(final TreeItem item) { if (item == null) { return; } boolean checked; boolean oneChecked = false; boolean oneUnchecked = false; for (TreeItem child : item.getItems()) { checked = child.getChecked(); oneChecked |= checked; oneUnchecked |= !checked; } if (!oneUnchecked) { item.setChecked(true); item.setGrayed(false); } else if (!oneChecked) { item.setChecked(false); item.setGrayed(false); } else { item.setChecked(true); item.setGrayed(true); } } COM: <s> recursively updates parents gray status item children </s>
funcom_train/9276566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCloseEvent() throws SQLException { PreparedStatement ps = prepare("VALUES (1)"); ps.close(); assertSame("Close event raised on wrong statement.", ps, closedStatement); assertEquals("Incorrect close count.", 1, closedCount); } COM: <s> test that a close event is raised when a statement is closed </s>
funcom_train/26661703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectStationAetGroupNames(String[] selected) { initStationAetGroupNames(false); for ( int i = 0 ; i < selected.length ; i++) { if ( selectedStationAetMap.containsKey(selected[i]) ) { selectedStationAetMap.put(selected[i], Boolean.TRUE); } } //updateStationAetFilter() } COM: <s> change selection state of all given known names as selected </s>
funcom_train/25331937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAndSetSourceProperties() { DAHomologyPairRelationship instance = new DAHomologyPairRelationship(); assertNull(instance.getSourceProperties()); HomologyAlignmentProperties expResult = new HomologyAlignmentProperties(); instance.setSourceProperties(expResult); HomologyAlignmentProperties result = instance.getSourceProperties(); assertEquals(expResult, result); } COM: <s> test of get source properties method of class dahomology pair relationship </s>
funcom_train/9806949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SKOSContainer loadVocabulary(OWLOntologyInputSource inputSource) throws OWLOntologyCreationException { OWLOntology onto = man.loadOntology(inputSource); SKOSContainerImpl voc = new SKOSContainerImpl(this, onto); if (voc.getURI() != null) { skosVocabularies.put(voc.getURI(), voc); } return voc; } COM: <s> a convenience method that load an ontology from an input source </s>
funcom_train/21017882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restoreState(AbstractElement element) { requireNotNull(element, "@require (element != null)"); element._height = _savedHeight; element._width = _savedWidth; element._paintLayer = _savedLayer; // TODO could be optimized: check if something has changed! // if optimized all sub-classes must set change-level! element.setChangeLevel(CHANGE_MAJOR); } COM: <s> restores the state of the given </s>
funcom_train/5082007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Command getResizeChildrenCommand(ChangeBoundsRequest request) { CompoundCommand resize = new CompoundCommand(); Command c; GraphicalEditPart child; List children = request.getEditParts(); for (int i = 0; i < children.size(); i++) { child = (GraphicalEditPart)children.get(i); c = createChangeConstraintCommand(request, child, translateToModelConstraint( getConstraintFor(request, child))); resize.add(c); } return resize.unwrap(); } COM: <s> returns the code command code to resize a group of children </s>
funcom_train/26228649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkCondition(JCompilationUnit cunit) { long lastTime = System.currentTimeMillis(); try { cunit.analyseConditions(); } catch (PositionedError e) { reportTrouble(e); } if (verboseMode()) { inform(CompilerMessages.CONDITION_CHECKED, cunit.getFileName(), new Long(System.currentTimeMillis() - lastTime)); } } COM: <s> check the conditions </s>
funcom_train/49409007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void accept(final DIDLVisitorType visitor) { if (visitor == null) { throw new IllegalArgumentException(); } if (type == Type.RESOURCE) { visitor.visitStart((ResourceType)this); visitor.visitEnd((ResourceType)this); } else { visitor.visitStart((StatementType)this); visitor.visitEnd((StatementType)this); } } COM: <s> implements visitor pattern to didlinfo object </s>
funcom_train/50862437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CookedMeal getCookedMeal() { CookedMeal bestMeal = null; int bestQuality = -1; Iterator<CookedMeal> i = meals.iterator(); while (i.hasNext()) { CookedMeal meal = i.next(); if (meal.getQuality() > bestQuality) { bestQuality = meal.getQuality(); bestMeal = meal; } } if (bestMeal != null) meals.remove(bestMeal); return bestMeal; } COM: <s> gets a cooked meal from this facility </s>
funcom_train/604722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Validator createValidator() throws JspException { SelectedItemsRangeValidator validator = (SelectedItemsRangeValidator)super.createValidator(); Integer minValue = FacesUtils.evalInt(this.minNum); if (minValue != null) { validator.setMinNum(minValue.intValue()); } Integer maxValue = FacesUtils.evalInt(this.maxNum); if (maxValue != null) { validator.setMaxNum(maxValue.intValue()); } return validator; } COM: <s> create the validator associated with the tag </s>
funcom_train/651780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ISourceReference computeHighlightRangeSourceReference() { ISourceViewer sourceViewer = getSourceViewer(); if (sourceViewer == null) { return null; } StyledText styledText = sourceViewer.getTextWidget(); if ((styledText == null) || styledText.isDisposed()) { return null; } int offset = sourceViewer.getVisibleRegion().getOffset(); int caret = offset + styledText.getCaretOffset(); return getRuleAt(caret); } COM: <s> computes and returns the source reference that includes the caret and </s>
funcom_train/29682762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toHexString() throws InvalidLLRPMessageException { byte[] bytes = this.encodeBinary(); StringBuilder sb = new StringBuilder(); for (byte b : bytes) { // encode each byte as a 2character hex with a one-space separation sb .append((Integer.toString((b & 0xff) + 0x100, 16) .substring(1) + " ").toUpperCase()); } return sb.toString(); } COM: <s> return llrp message as hex string in llrp binary encoding </s>
funcom_train/3718015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu buildMenuForSubApplication(JKFSubApplication subApplication) { MenuElement[] subMenus = subApplication.getMenuBarElements(); JMenu main = new JMenu(subApplication.getApplicationName()); for (int i = 0; i < subMenus.length; i++) { main.add(subMenus[i].getComponent()); } return main; } COM: <s> method for building a jmenu that contains all menus from the </s>
funcom_train/49792458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setComment(String curUser, String comment) { if(comment == null || movesPlayed == 0) { return; } String cmt = comment.trim(); if(cmt.length() < 1) { return; } AbstractCommand cmd = (AbstractCommand)moves.get(movesPlayed - 1); cmd.setComment(curUser + ": " + comment); } COM: <s> sets the comment on the current move </s>
funcom_train/36931296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processEvents(GLDrawable glDrawable) { /* * Put here all related OpenGl effects of the events * * How put the events here: * Just because if you would call an OpenGl method in on of * the key or mouse method, it do not work ! * * Ex: in the Tutorial 04, the call: gl.glShadeModel(...) * could not be placed on an event method. */ } COM: <s> put here all the events related to a key or a mouse pressed </s>
funcom_train/40772395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void relinkContent(Container obj) { Set<MudObject> mos = getMudObjects(); synchronized (mos) { for (MudObject mudObject : mos) { if (mudObject instanceof Container) { Container container = castToContainer(mudObject); container.getInventoryHandler().relinkContent(container); } mudObject.setCurrentContainer(obj); // relink container data mudObject.addObserver(obj); getRegistry().addMudObject(mudObject); // re-register contents } } } COM: <s> container objects when reloaded after persistance loose their observers </s>
funcom_train/8715385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteDocuments(Term term) throws CorruptIndexException, IOException { ensureOpen(); try { boolean doFlush = docWriter.bufferDeleteTerm(term); if (doFlush) flush(true, false, false); } catch (OutOfMemoryError oom) { handleOOM(oom, "deleteDocuments(Term)"); } } COM: <s> deletes the document s containing code term code </s>
funcom_train/50067688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void genStat(Tree tree, Env env, int crtFlags) { if (!genCrt) { genStat(tree, env); return; } int startpc = code.curPc(); genStat(tree, env); if (tree.tag == Tree.BLOCK) crtFlags |= CRT_BLOCK; code.crt.put(tree, crtFlags, startpc, code.curPc()); } COM: <s> derived visitor method check whether character range table should be </s>
funcom_train/19657137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onBrowserEvent(Event event) { if (!selected && DOM.eventGetType(event) == Event.ONMOUSEOVER) { setStyleName("mshab-MenuButton-over"); } else if (!selected && DOM.eventGetType(event) == Event.ONMOUSEOUT) { setStyleName("mshab-MenuButton"); } super.onBrowserEvent(event); } COM: <s> this method handles the css changes for mouse overs </s>
funcom_train/36170661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreePath getPath() { TreeNode node = this; ArrayList<TreeNode> list = new ArrayList<TreeNode>(); // Add all nodes to list while (node != null) { list.add(node); node = node.getParent(); } Collections.reverse(list); // Convert array of nodes to TreePath return new TreePath(list.toArray()); } COM: <s> gets the node path in the tree </s>
funcom_train/10912256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NormalFlow getNormalFlow(int colRequested) { if (colRequested >= 0 && colRequested < colCount) { return flowAreas.get(colRequested); } else { // internal error throw new IllegalArgumentException("Invalid column number " + colRequested + " requested; only 0-" + (colCount - 1) + " available."); } } COM: <s> get the normal flow area for a particular column </s>
funcom_train/1193803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Bundle saveState(Bundle data) { if (data != null) { data.putDouble(KEY_MX, mX); data.putDouble(KEY_MY, mY); data.putDouble(KEY_DX, mDX); data.putDouble(KEY_DY, mDY); data.putDouble(KEY_ANGLE, Double.valueOf(mAngle)); } return data; } COM: <s> save balls position speed and angle </s>
funcom_train/32305259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer("METHOD("); TEMP[] params = getParams(); for (int i=0; i<params.length-1; i++) { sb.append(params[i].toString()); sb.append(", "); } sb.append(params[params.length-1].toString()); sb.append(")"); return sb.toString(); } COM: <s> returns human readable representation of this code tree code </s>
funcom_train/596765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int newUTF8(final String value) { key.set(UTF8, value, null, null); Item result = get(key); if (result == null) { pool.putByte(UTF8).putUTF8(value); result = new Item(index++, key); put(result); } return result.index; } COM: <s> adds an utf8 string to the constant pool of the class being build </s>
funcom_train/44161767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parseWherePart(String query, boolean flag) { String ordby = "ORDER BY"; String rez = ""; if (query.indexOf(ordby) > -1) { int ind = query.indexOf(ordby); if (flag) { rez = query.substring(0, ind); } else { rez = query.substring(ind, query.length()); } } else { if (flag) { rez = query; } } return rez; } COM: <s> parse where part parses where part </s>
funcom_train/41826740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSpeedLimit(int maximalspeed) { maximalspeed = Math.max(20, maximalspeed); // logger.info(this + " LINKSPEED: " + maximalspeed); int diff = Math.abs(this.globalSpeedLimit - maximalspeed); if (diff > 500) { this.globalSpeedLimit = maximalspeed; } } COM: <s> setzt das globale speed limit in bytes s </s>
funcom_train/3412922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return new String("DirectColorModel: rmask=" +Integer.toHexString(red_mask)+" gmask=" +Integer.toHexString(green_mask)+" bmask=" +Integer.toHexString(blue_mask)+" amask=" +Integer.toHexString(alpha_mask)); } COM: <s> returns a code string code that represents this </s>
funcom_train/13583903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TDoubleDoubleHashMap normalizedDistribution(TDoubleDoubleHashMap distr) { double sum = 0; double[] values = distr.getValues(); for(int i = 0; i < values.length; i++) { sum += values[i]; } final double norm = 1/sum; TDoubleFunction fct = new TDoubleFunction() { public double execute(double value) { return value * norm; } }; distr.transformValues(fct); return distr; } COM: <s> creates a normalized histogram out of any other histogram </s>
funcom_train/6493604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getParameterValue( String name ) { Object result = getParameterDefaults().get( name ); if (result instanceof String) return (String) result; if (result instanceof String[] && ((String[]) result).length > 0) return ((String[]) result)[0]; return ""; } COM: <s> returns the default value of the named parameter </s>
funcom_train/51059047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void extractGZip(String in, String out) throws Exception { File f = new File(in); FileInputStream fileInputHandle = new FileInputStream(f); InputStream inputHandle = new GZIPInputStream(fileInputHandle); OutputStream outputHandle = new FileOutputStream(out); try { byte [] buffer = new byte [1<<14]; int ret = inputHandle.read(buffer); while (ret >= 1) { outputHandle.write(buffer,0,ret); ret = inputHandle.read(buffer); } } finally { inputHandle.close(); outputHandle.close(); } // delete GZip file, as it is no longer needed f.delete(); } COM: <s> extract gzip file </s>