__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/37087170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Text getText() { return new Text(g3d,getFont(), label,colixContrast(), node.getColix(), node.screenX + 3, node.screenY + 2, labelZ, Integer.MIN_VALUE, Object2d.ALIGN_CENTER, 0); } COM: <s> why making new text every time why not reuse </s>
funcom_train/51601796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadDatabase() { JFileChooser fc = new JFileChooser(); int returnVal = fc.showDialog(WindowManager.getInstance().getMainFrame(), "Load database"); File file = fc.getSelectedFile(); if(file == null) return; DatabaseManager.getInstance().loadDatabase(file); initHostList(); startGraph(); } COM: <s> load the database from an external file </s>
funcom_train/27972996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet sql(String sql) { ResultSet rs = null; Statement stmt = null; try { // Create a statement stmt = conn.createStatement(); // Exectute the query and put ResultSet in rs rs = stmt.executeQuery(sql); } catch (SQLException e) { System.out.println(e); } return rs; } COM: <s> executes sql on the dabase select statement etc </s>
funcom_train/25149099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFirstWord(String teilString){ StringTokenizer str = new StringTokenizer(teilString); String woerter[]=new String[20]; int idx=0; while (str.hasMoreTokens()){ woerter[idx]=str.nextToken(); idx++; } woerter[0]=woerter[0].replaceAll(",", ""); return(woerter[0]); } COM: <s> returns the first word of a given string </s>
funcom_train/2903331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addImageLayer(Icon image, Point origin, Color bkgrdColor){ JLabel layer = new JLabel(image); layer.setOpaque(false); if(bkgrdColor != null){ layer.setBackground(bkgrdColor); } layer.setBounds(origin.x, origin.y, image.getIconWidth(), image.getIconHeight()); layeredPane.add(layer, new Integer(currentLayer++)); } COM: <s> add an image layer for displaying only </s>
funcom_train/49640306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServiceObj getService(String name) { if (this.servicehash.containsKey(name)) { return this.servicehash.get(name); } else { this.createService(name); if (this.servicehash.containsKey(name)) { return this.servicehash.get(name); } else { return null; } } } COM: <s> return service object pin pointed by input name </s>
funcom_train/43614005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isEscapable(String nextLine, boolean inQuotes, int i) { return inQuotes // we are in quotes, therefore there can be escaped quotes in here. && nextLine.length() > (i+1) // there is indeed another character to check. && ( nextLine.charAt(i+1) == quotechar || nextLine.charAt(i+1) == this.escape); } COM: <s> precondition the current character is an escape </s>
funcom_train/8066608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void findNext() { if (_nextElement != null) return; while (!_subs.isEmpty() && !((Enumeration) _subs.firstElement()).hasMoreElements()) _subs.removeElementAt(0); if (!_subs.isEmpty()) _nextElement = ((Enumeration) _subs.firstElement()).nextElement(); } COM: <s> internal function to find the element to return on the next call to </s>
funcom_train/18736417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeSingleNode(IProgramElement progElem) { verifyAssumption(progElem != null); boolean deleteOK = false; IProgramElement parent = progElem.getParent(); List kids = parent.getChildren(); for (int i = 0; i < kids.size(); i++) { if (kids.get(i).equals(progElem)) { kids.remove(i); deleteOK = true; break; } } verifyAssumption(deleteOK); } COM: <s> removes a specified program element from the structure model </s>
funcom_train/31208400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDatabaseProductVersion() throws SQLException { try { if(Trace.isEnabled()) Trace.trace(getId()); checkClosed(); String version=meta.getDatabaseProductVersion(); String line=getFirstLine(version); if(Trace.isEnabled()) Trace.traceResultQuote(line); return line; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> gets the product version of the database </s>
funcom_train/34559253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBaseParams(UrlParam[] baseParams) { if(!isCreated()) { if (baseParams != null && baseParams.length > 0) { JavaScriptObject paramObj = UrlParam.getJsObj(baseParams); JavaScriptObjectHelper.setAttribute(configJS, "baseParams", paramObj); } } else { setBaseParamsCreated(baseParams); } } COM: <s> url params which are to be sent as parameters on any http request </s>
funcom_train/26557801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClassName(String className) throws MBeanException { checkPoolStateForReset(); String oldFactoryClassName=this.factoryClassName; String oldClassName=this.className; int oldSize=this.size; this.factoryClassName=""; this.className = className; if (registered) // Avoid unnecessary intializations at startup this.pool = createPool(oldFactoryClassName, oldClassName, oldSize); } COM: <s> set the name of the class to produce </s>
funcom_train/3003210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ScenarioPluginIF getEngineForModel(String proc) { List engines = ScenarioPluginsConfiguration.getInstance().getEngines(); for (int i = 0; i < engines.size(); i++) { ScenarioPluginIF plugin = (ScenarioPluginIF) engines.get(i); if (Arrays.asList(plugin.getProcessors()).contains(proc)) { return plugin; } } XPontusComponentsUtils.showErrorMessage( "No processor found for your configuration"); return null; } COM: <s> returns the plugin to use for the xslt transformation </s>
funcom_train/20797690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSessionId() { int session = 0; try { setInstance(); if (sdk.lock.tryLock(5L, TimeUnit.SECONDS)) { session = sdk.session(); } } catch (Exception e) { logger.log(Level.SEVERE, e.getMessage()); logger.log(Level.SEVERE, "Stack: " + e.getStackTrace()); } finally { if (sdk.lock.isHeldByCurrentThread()) { sdk.lock.unlock(); } } return session; } COM: <s> get the bots session id </s>
funcom_train/18318520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAdmissible(Segment s) { ListIterator li = s.getVertices() .listIterator(); while (li.hasNext()) { SimpleVertex element = (SimpleVertex) li.next(); if ((s.isContactVertex(element)) && (this.getVertices() .indexOf(element) == -1)) { return false; } } return true; } COM: <s> whether this face is admissible to segment </s>
funcom_train/43098224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUseCase(Object elem, Object usecase) { if (elem instanceof MExtensionPoint && (usecase instanceof MUseCase || usecase == null)) { ((MExtensionPoint) elem).setUseCase((MUseCase) usecase); return; } throw new IllegalArgumentException("elem: " + elem + " or usecase: " + usecase); } COM: <s> set a use case for an extension point </s>
funcom_train/13558741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encode(CBEFFInfo cbeffInfo, OutputStream out) throws IOException { if (cbeffInfo instanceof SimpleCBEFFInfo) { writeBITGroup(Arrays.asList(new CBEFFInfo[] { cbeffInfo }), out); } else if (cbeffInfo instanceof ComplexCBEFFInfo) { ComplexCBEFFInfo complexCBEFFInfo = (ComplexCBEFFInfo)cbeffInfo; writeBITGroup(complexCBEFFInfo.getSubRecords(), out); } } COM: <s> writes a bit group to an output stream </s>
funcom_train/7506079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ServletHandlerMethodResolver getMethodResolver(Object handler) { Class handlerClass = ClassUtils.getUserClass(handler); ServletHandlerMethodResolver resolver = this.methodResolverCache.get( handlerClass); if (resolver == null) { resolver = new ServletHandlerMethodResolver(handlerClass); this.methodResolverCache.put(handlerClass, resolver); } return resolver; } COM: <s> build a handler method resolver for the given handler type </s>
funcom_train/36107085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Data loadModuleData(String moduleKey){ Data data = loadData(moduleKey, null, false); data = data.getData("data"); if(data==null || data.getString("ID")==null) {//|| !moduleKey.startsWith(data.getString("ID"))** Log.getLog().log(Log.ERROR, "No data for "+moduleKey+" is received"); return null; } return data; } COM: <s> this implementation loads the whole data </s>
funcom_train/22782337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedImage getImage(int size) { if (data == null) { return null; } // get next higher thumb nail size int dim = -1; Iterator<Integer> iter = data.keySet().iterator(); while (iter.hasNext() && dim < size) { dim = iter.next(); } // construct image try { return ImageUtil.loadImage(data.get(dim), ImageQuality.getBest()); } catch (IOException ioe) { // make dimension unusable data.remove(dim); } return null; } COM: <s> gets the stored thumb nail which is just bigger as the given size </s>
funcom_train/5459931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBackButton() { if (backButton == null) { backButton = new JButton(); backButton.setText("< Back"); backButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { goBack(); } }); } return backButton; } COM: <s> this method initializes back button </s>
funcom_train/15717728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object otherObj){ if (!otherObj.getClass().equals(LexicalChain.class)) return false; LexicalChain otherChain=(LexicalChain)otherObj; return ((otherChain.getChainMembers().equals(this.getChainMembers())) && (otherChain.getChainWeight()==this.getChainWeight()) && (otherChain.getChainLength()==this.getChainLength())); } COM: <s> checks if two chains are identical </s>
funcom_train/51626267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { if (menuExtenders != null) { for (int i = 0; i < menuExtenders.size(); i++) { ((PopupMenuExtender) menuExtenders.get(i)).dispose(); } menuExtenders = null; } if (keyBindingService != null) { keyBindingService.dispose(); } if (progressService != null) { progressService.dispose(); } if (serviceLocator != null) { serviceLocator.dispose(); } } COM: <s> dispose the contributions </s>
funcom_train/2360216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getChildCount(Object parent) { Element parentElement = (Element) parent; if (showforefathers) { int count = 0; if (parentElement.getParentElement() != null) { count++; } return count; } if (parentElement.getChildren() == null) return 0; return parentElement.getChildren().size(); } COM: <s> returns the number of children of parent </s>
funcom_train/26213378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long skip(long n) throws IOException { // make sure we don't skip more bytes than are // still available long length = Math.min(n, contentLength - pos); // skip and keep track of the bytes actually skipped length = wrappedStream.skip(length); // only add the skipped bytes to the current position // if bytes were actually skipped if (length > 0) { pos += length; } return length; } COM: <s> skips and discards a number of bytes from the input stream </s>
funcom_train/39563736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SyntaxTreeNode getNextSibling() { SyntaxTreeNode retval; SyntaxTreeNode myParent = (SyntaxTreeNode)getParent(); if (myParent == null) { retval = null; } else { retval = (SyntaxTreeNode)myParent.getChildAfter(this); // linear search } if (retval != null && !isNodeSibling(retval)) { throw new Error("child of parent is not a sibling"); } return retval; } COM: <s> returns the next sibling of this node in the parents children array </s>
funcom_train/49638129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public F getFieldForIndexing(String fieldName) { //noinspection DuplicateStringLiteralInspection log.trace("getFieldForIndexing(" + fieldName + ") called"); F field = allFields.get(fieldName); if (field != null) { return field; } log.debug("No field with name '" + fieldName + "' found. Returning default field"); return defaultField; } COM: <s> returns the field where the name no alias lookup matches the field name </s>
funcom_train/17939208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getTooljPanel() { if (tooljPanel == null) { tooljPanel = new JPanel(new BorderLayout()); tooljPanel.setBorder(javax.swing.BorderFactory.createTitledBorder( null, "Tools", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); tooljPanel.add(getToolsTab(), BorderLayout.CENTER); } return tooljPanel; } COM: <s> this method initializes toolj panel </s>
funcom_train/23267817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNroOperacion() { System.out.println("getNroOperacion"); Movimientos instance = new Movimientos(); int expResult = 0; int result = instance.getNroOperacion(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get nro operacion method of class capa negocios </s>
funcom_train/44809814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(Locale locale) { if (locale == null) { return false; } String language = locale.getLanguage(); if (language == null) { return false; } String[] languages = this.getLanguages(); if (languages == null) { return false; } for (int i = 0; i < languages.length; i++) { if (language.equals(languages[i])) { return true; } } return false; } COM: <s> accept formatter by locale </s>
funcom_train/14317622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCmdBasePath() { if (("Exchange2003".equals(serverVersion) || PUBLIC_ROOT.equals(publicFolderUrl)) && mailPath != null) { // public folder is not available => try to use mailbox path // Note: This does not work with freebusy, which requires /public/ return mailPath; } else { // use public folder url return publicFolderUrl; } } COM: <s> build base path for cmd commands galfind gallookup </s>
funcom_train/10208826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersects(final double x, final double y, final double w, final double h) { if ((npoints <= 0) || !bounds.intersects(x, y, w, h)) { return false; } updateComputingPath(); return closedPath.intersects(x, y, w, h); } COM: <s> tests if the interior of this code polygon code intersects the </s>
funcom_train/194030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startGame() { if (state == GameState.none) { GameState oldState = state; state = GameState.running; startTime = new Date(); lastTask = new Task(); timer.schedule(lastTask, 0, 1000); game.getEventHelper().fireStateChangedEvent( new StateChangeEvent(this, oldState, state)); // TODO do additional things here } else { // game is already started: do nothing? throw exception? // TODO check what to do here // TODO add log message here } } COM: <s> starts the game </s>
funcom_train/49462690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFieldString(String field, List<String> al) throws InvalidLogLineException { Integer idx = configMap.get(field); if (idx == null) return null; String value = (ensureFieldNumberValid(al, idx) ? al.get(idx) : null); if (value == null) _logger.debug("Found a null value for field ("+field+")"); if ("-".equals(value)) value = null; return value; } COM: <s> returns a field </s>
funcom_train/2999581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Feedback feedback) { int addr = feedback.getNumber(); if (getFeedback(addr) != null) { throw new IllegalArgumentException("A feedback for number " + addr + " has already been added"); } feedbacks.add(feedback); fireStateChanged(new RREvent(this)); } COM: <s> add a feedback unit to this railroad </s>
funcom_train/24060518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replace ( SelfDefinedField field ) { mustBeOpen(); if ( ! ( field instanceof Pocket ) ) // do not throw the obvious ClassCastException for bad decrypt throw new IllegalArgumentException( "can only replace with Pocket, not " + field.getClass() ); Pocket pocket = (Pocket) field; this.unencryptedPurse.replacePocket( pocket ); this.isChangedAndInconsistent = true; } COM: <s> a managed purse can contain multiple pocket instances so </s>
funcom_train/25065347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setTempMessage(String message, String styleName, boolean clearData) { if (clearData) clear(); // Set styles then value getCellFormatter().setStyleName(1, 0, styleName); getFlexCellFormatter().setColSpan(1, 0, getNumCols()); setHTML(1, 0, "&nbsp;" + message + "&nbsp;"); } COM: <s> removes the display of data and displays a short message instead </s>
funcom_train/36991931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(int actionType) { activeListIterator = listIterator(); while (activeListIterator.hasNext()) ((ISimEventListener) activeListIterator.next()) .performAction(actionType); activeListIterator = null; if (addBufferList != null) { addAll(addBufferList); addBufferList = null; } if (removeBufferList != null) { removeAll(removeBufferList); removeBufferList = null; } } COM: <s> executes the given action type for each agent in the list </s>
funcom_train/331614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PamVector rotate(double rotationAngle) { double[] vd = getVector(); double[] newV = new double[3]; double sin = Math.sin(rotationAngle); double cos = Math.cos(rotationAngle); newV[0] = vd[0] * cos - vd[1] * sin; newV[1] = vd[0] * sin + vd[1] * cos; newV[2] = vd[2]; return new PamVector(newV); } COM: <s> rotate a vector anti clockwise by an angle </s>
funcom_train/18507626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireInputUnrestricted(DataSetEvent e) { if (dataSetListeners != null) { Vector listeners = dataSetListeners; int count = listeners.size(); for (int i = 0; i < count; i++) { ((DataSetListener) listeners.elementAt(i)).inputUnrestricted(e); } } } COM: <s> fires the input un restricted event for all of the listeners </s>
funcom_train/42709726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startApp() { if (midletPaused) { resumeMIDlet (); } else { initialize (); startMIDlet (); } try { Entrenador.open(); } catch(Exception ex) { getForm().append(new StringItem("Error", ex.getMessage())); } midletPaused = false; } COM: <s> called when midlet is started </s>
funcom_train/22354699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getMax(PotionInfo potionInfo) { int max = Integer.MAX_VALUE; for (HerbInfo herb : herbs) { if (potionInfo.ingredients.containsKey(herb.item) && potionInfo.ingredients.get(herb.item) > 0) { max = Math.min(max, herb.number / potionInfo.ingredients.get(herb.item)); } } return max; } COM: <s> return the maximal producible number of the potion i </s>
funcom_train/21884029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getInstallRoot(final String type, final String name) { final StringBuffer sb = new StringBuffer(); sb.append("package.").append(type + ".").append(name + ".").append(Constants.PROPERTY_PKG_INSTALLROOT_FIELD); return getProject().getProperty(sb.toString()); } COM: <s> returns the package install root </s>
funcom_train/21982769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JBarcode createMSIPlessey(){ JBarcode jbc = new JBarcode(MSIPlesseyEncoder.getInstance(), WidthCodedPainter.getInstance(), BaseLineTextPainter.getInstance()); jbc.setBarHeight(17); try { jbc.setXDimension(0.264583333); } catch (InvalidAtributeException e) {} jbc.setShowText(true); jbc.setCheckDigit(true); jbc.setShowCheckDigit(true); return jbc; } COM: <s> creates a new jbarcode instance to msiplessey barcode type </s>
funcom_train/16450302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasCalendarWithURL ( String url ) { for ( int i = 0; i < this.calendars.size (); i++ ) { Calendar c = this.calendars.elementAt ( i ); if ( c.getUrl () == null ) continue; String urlS = c.getUrl ().toString (); if ( url.equals ( urlS ) ) { return true; } } return false; } COM: <s> checks for calendar with url </s>
funcom_train/10482557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public boolean checkStringEncoding(String s) { for (int i = 0; i < s.length(); i++) { // any value greater that 0x7f is a problem char. We're not worried about // lower ctl chars (chars < 32) since those are still expressible in 7-bit. if (s.charAt(i) > 127) { return true; } } return false; } COM: <s> check a string to see if this can be processed using just </s>
funcom_train/42068294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addChunkTypeIDValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Chunk_chunkTypeIDValue_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Chunk_chunkTypeIDValue_feature", "_UI_Chunk_type"), WavPackage.Literals.CHUNK__CHUNK_TYPE_ID_VALUE, false, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the chunk type id value feature </s>
funcom_train/28547400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IParsedLabel extractParsedLabel(Set<IParsedSentence> set) { IParsedLabel result = null; if (!set.isEmpty()) { IParsedSentence sentence = set.iterator().next(); result = getReferenceEntityBody(sentence).getImportedLabel(); } assert result != null; return result; } COM: <s> extracts the first iparsed label found </s>
funcom_train/1382351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnPeriodiLiberi() { if (btnPeriodiLiberi == null) { btnPeriodiLiberi = new JButton(); btnPeriodiLiberi.setText("Periodi Liberi"); btnPeriodiLiberi.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { visualizzaPeriodiLiberi(); } }); } return btnPeriodiLiberi; } COM: <s> this method initializes btn periodi liberi </s>
funcom_train/8079391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double computeError(Instances data) throws Exception { double error; m_Evaluation = new Evaluation(data); //reset the counter in Evaluation m_Evaluation.evaluateModel(this, data); switch(m_ErrorMeasure){ case MAE: error = m_Evaluation.meanAbsoluteError(); break; case RMS: error = m_Evaluation.rootMeanSquaredError(); break; case ROOT_RELATIVE_SQUARED: error = m_Evaluation.rootRelativeSquaredError(); break; default: error = m_Evaluation.meanAbsoluteError(); } return error; } COM: <s> computes the error in prediction on the given data </s>
funcom_train/38250805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addParameterInfo(ParameterInfo param){ int size=0; if(this.parameterInfoArray!=null) size = this.parameterInfoArray.length; ParameterInfo[] params = new ParameterInfo[size+1]; for(int i=0; i< size; i++){ params[i]=this.parameterInfoArray[i]; } params[size] = param; this.parameterInfoArray = params; } COM: <s> add new parameter info into the job info </s>
funcom_train/13914120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetServerPort() { System.out.println("getServerPort"); ProxymaFacade proxyma = new ProxymaFacade(); ProxymaContext context = proxyma.getContextByName("default"); ProxymaServletRequest instance = new ProxymaServletRequest(request, context); int expResult = request.getServerPort(); int result = instance.getServerPort(); assertEquals(expResult, result); } COM: <s> test of get server port method of class proxyma servlet request </s>
funcom_train/44798006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasMappings(final DataAdapterCall call) throws Exception { boolean hasMappings = false; try { hasMappings = call.getDataAdapterDescriptor().getElementsByTagName("Mappings").getLength() > 0; } catch (Exception e) { LOG.error(e); } return hasMappings; } COM: <s> check for mappings associated with the data adapter call </s>
funcom_train/13596964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reports() { JDialog reports = new JDialog(ProjectUtil.getTopFrame(this), Messages .getString("DictionaryMakerMain.TitleProjectStatistics"), true); //$NON-NLS-1$ reports.getContentPane().add(new ReportPanel()); reports.setSize(460, 460); reports.setResizable(true); // set location of dialog centered on frame Utilities.center(this, reports); reports.setVisible(true); } COM: <s> mar 10 2006 avrensbu </s>
funcom_train/18254262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void changeInFullScreen() { if (UserEnvironment.getDefaultEnvironment().isFullScreen()) { fullWindowAction.setEnabled(false); normalWindowAction.setEnabled(true); } else { fullWindowAction.setEnabled(true); normalWindowAction.setEnabled(false); } } COM: <s> change in full screen </s>
funcom_train/25026029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void terminate() { terminating = true; fireStateChange(Cause.OTHER); removeCentralUnits(); try { serverSocket.close(); } catch (IOException e) { log.log(Level.SEVERE, "Cannot close server socket: " + e.getMessage()); log.log(Level.FINE, "Caused by:", e); System.exit(1); } } COM: <s> terminate the server </s>
funcom_train/18434100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Number x, Number y, String seriesName, boolean notify) { this.values.addValue(y, (Comparable) x, seriesName); if (notify) { fireDatasetChanged(new DatasetChangeInfo()); //TODO: fill in real change info } } COM: <s> adds a data item to this dataset and if requested sends a </s>
funcom_train/19306320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int dotLeaderTextOffset() { switch (traitLeaderAlignment()) { case REFERENCE_AREA: { break; } case PAGE: { break; } } /* * This is the case leader-alignment = none. What we want here is * the width of one of the spaces. */ return dotLeaderPatternWidth() - getCharWidth('.'); } COM: <s> computes the offset from thiss start edge at which the first dot </s>
funcom_train/46679904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setupPraatPanel(){ String soundFile = getModel().getTranscription().getHead().getMetaInformation().getReferencedFile("wav"); if (soundFile!=null && soundFile.length()>0){ praatPanel.setAudioFilename(soundFile); } } COM: <s> sets up the praat panel to play the referenced file if possible </s>
funcom_train/2388295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testVectorCVersion() throws Exception { byte[] encResult = TwofishPws.processECB(Util.unsignedToSigned(key), true, Util.unsignedToSigned(plainText)); String encStr = Util.bytesToHex(encResult); String expected = Util.bytesToHex(Util.unsignedToSigned(cipherText)); assertEquals(expected, encStr); } COM: <s> tests the pwsafe vectors work here too </s>
funcom_train/21017161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLegal() { boolean result = true; IComposite parent = getElement(0).getComposite(); for (int i = 1; i < getLength(); i++) { IElement element = getElement(i); int index = getElementIndex(i); if ((parent == null) || (index >= parent.getElementCount()) || (parent.get(index) != element)) { result = false; break; } parent = element.getComposite(); } return result; } COM: <s> checks whether or not this path is legal </s>
funcom_train/46617214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); jScrollPane.setViewportView(getJTextArea()); } return jScrollPane; } COM: <s> this method initializes j scroll pane </s>
funcom_train/4193446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOfCommaHeaderSeparator() { boolean inside_quoted_string=false; for (int i=index; i<str.length(); i++) { char c=str.charAt(i); if (c=='"') inside_quoted_string=!inside_quoted_string; if (!inside_quoted_string && c==',') return i; } return -1; } COM: <s> finds the first comma separator </s>
funcom_train/22287689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void focusAtRow(int rowIndex) { if (rowIndex < 0 || rowIndex >= rowCount) { paramError("focusAtRow(int)","invalid row index specified"); return; } validate(); TableRow row = getRow(rowIndex); focusContent(-content.tx, row.pos, 1, row.size + 2); } COM: <s> focus the content at the row with the given actual index </s>
funcom_train/25075283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSourceLabelStylePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RichReferenceFigure_sourceLabelStyle_feature"), getString("_UI_RichReferenceFigure_sourceLabelStyle_description"), GraphdescPackage.Literals.RICH_REFERENCE_FIGURE__SOURCE_LABEL_STYLE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_AppearancePropertyCategory"), null)); } COM: <s> this adds a property descriptor for the source label style feature </s>
funcom_train/51811822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddListenerPostInit() { producer.fireTestListenerMessage(getName()); assertEquals("Message not delivered", 1, listener.messages.size()); assertEquals("Wrong message delivered", getName(), listener.messages.get(0)[2]); } COM: <s> adding a basic listener using post init option </s>
funcom_train/9808288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addApplication(AppID appId, AppAttributes appAtt, AppProxy appProxy) { Hashtable appElement = new Hashtable(); appElement.put(APP_ATTRIBUTES, appAtt); appElement.put(APP_PROXY, appProxy); this.applications.put(appId, appElement); // Fires the event fireEntryAdded(new AppsDatabaseEvent(AppsDatabaseEvent.APP_ADDED, appId, this)); } COM: <s> adds an application </s>
funcom_train/35811733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean startNewSession() { boolean result = false; try { boolean session_closed = true; if (currentSession != null) { session_closed = closeSession(currentSession); } if (session_closed) { currentSession = createSession(); if (currentSession != null && currentSession.isPersistent()) result = true; else currentSession = null; // if session isn't persistent set it // to null } } catch (Exception e) { e.printStackTrace(); } return result; } COM: <s> starts new syslog session and maps it into db </s>
funcom_train/29863272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createWopWorkspace() { try { workspace = new DefaultWorkspace(getClassLocation(),getSourceLocation()); } catch (JavaModelException e) { Plugin.LOGGER.error("Could not find class folder for project " + getJavaProject().getHandleIdentifier(),e); } catch (CoreException e) { Plugin.LOGGER.error("Could not find source folder for project " + getJavaProject().getHandleIdentifier(),e); } } COM: <s> initialise the wop workspace </s>
funcom_train/43391621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String deleteServiceCom(String pID) { String res = "servicecall.deleteservicecommunicaion"; try { long tmp = Long.parseLong(pID); DH.getI().deleteServiceComm(tmp); } catch (NumberFormatException e0) { res = "error.input"; } catch (NullPointerException e0) { res = "error.valid"; } catch (Exception e) { res = "error.datahandler"; e.printStackTrace(); } return res; } COM: <s> service communication deletion </s>
funcom_train/5345696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean conflicts(URN urn, String fileName, int fileSize) { if (urn != null && downloadSHA1 != null) { return urn.equals(downloadSHA1); } if (fileSize > 0) { try { File file = incompleteFileManager.getFile(fileName, null, fileSize); return conflictsWithIncompleteFile(file); } catch (IOException e) { } } return false; } COM: <s> returns code true code if this downloaders urn matches the given urn </s>
funcom_train/18717775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T spin(final Random rnd, final boolean removeChosenWedge) { final RouletteWedge rouletteWedge = spin(rnd, null, 0); if (rouletteWedge == null) { throw new RuntimeException( "RouletteWheel.spin returned null! roulette total: " + total + " wheel: " + wheelOfWedges); } if (removeChosenWedge) { wheelOfWedges.remove(rouletteWedge); needsToUpdateTotal = true; } return rouletteWedge.prize; } COM: <s> select a random object from the wheel </s>
funcom_train/16677030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initListeners() { setBackground(ColorManager.getColor(Variables.BACKGROUND_COLOR)); appearanceListener = new AppearanceChangedListener( ) { public void appearanceChanged(AppearanceChangedEvent event) { setBackground(ColorManager.getColor(Variables.BACKGROUND_COLOR)); } }; ApplicationManager.addAppearanceChangedListener(appearanceListener); addDisposeListener(new DisposeListener( ) { public void widgetDisposed(DisposeEvent e) { ApplicationManager.removeAppearanceChangedListener(appearanceListener); } }); } COM: <s> initializes the control and sets the appearance listeners </s>
funcom_train/34079448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeAmTable() { for (int i = 0; i < AM_PG_WIDTH; i++) { amTable[i] = (int) (AM_DEPTH / 2 / DB_STEP * (1.0 + Math.sin(2.0 * Math.PI * i / PM_PG_WIDTH))); } } COM: <s> table for amp modulator </s>
funcom_train/22388191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateBranchSummary(BranchSummary existingSummary) { SqlUpdate update = new SqlUpdate(dataSource, "UPDATE BRANCHES SET VERSION_CTRL_BASE = ? WHERE ID = ?"); update.declareParameter(new SqlParameter(Types.VARCHAR)); update.declareParameter(new SqlParameter(Types.INTEGER)); update.update(new Object[]{existingSummary.getVersionControlBase(), existingSummary.getId()}); } COM: <s> update an existing branch summary </s>
funcom_train/42395928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNombre() { System.out.println("setNombre"); String nombre = ""; Partida instance = new Partida(); instance.setNombre(nombre); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set nombre method of class model </s>
funcom_train/32075405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double crossEntropy(Bag<X> reference) { double refTotal = reference.totalCount(); double total = totalCount(); double crossEntropy = 0.0; for(X s : counts.keySet()) { //System.out.println(s + " " + counts.get(s)); //System.out.println(entropy); crossEntropy -= (counts.get(s)/total) * Math.log(reference.getCount(s)/refTotal) / Math.log(2); } return crossEntropy; } COM: <s> gets the cross entropy for this bag and a reference bag </s>
funcom_train/18606067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _() { assertEquals(0, coreDao.loadAllRegistryObject().size()); RegistryObject ro = RegistryObjectFactory.create(); assertEquals(0, associationDao.loadAllAssociation().size()); coreDao.saveRegistryObject(ro); List<RegistryObject> list = coreDao.loadAllRegistryObject(); int i = 0; for (RegistryObject roFound : list) { if (ro == roFound) i++; } assertEquals(1, i); coreDao.deleteRegistryObject(ro); assertEquals(1, coreDao.loadAllRegistryObject().size()); assertEquals(0, associationDao.loadAllAssociation().size()); } COM: <s> testing relation of registry object with association </s>
funcom_train/2289852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List readResourcesWithProperty(String path, String propertyDefinition, String value) throws CmsException { CmsResource resource = readResource(path, CmsResourceFilter.IGNORE_EXPIRATION); return m_securityManager.readResourcesWithProperty( m_context, resource, propertyDefinition, value, CmsResourceFilter.ALL); } COM: <s> reads all resources that have a value containing the specified value set </s>
funcom_train/47513183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { connection = connect(); if (remoteNode == null) { // Remote node may already have been set in subclass try { remoteNode = new Node(RemoteDevice.getRemoteDevice(connection)); } catch (IOException ioe) { System.out.println("Failed to get remote device."); } } dos = connection.openDataOutputStream(); dis = connection.openDataInputStream(); sender = new Sender(dos, getSendQueue()); // If im master send wholemap receiver = new Receiver(remoteNode, dis, receiveQueue); sender.start(); receiver.start(); setConnected(true); } COM: <s> starts the connection and sets up the sender and receiver threads </s>
funcom_train/14262641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getStackTrace(Throwable t) { if (t == null) { return ""; } StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw, true); t.printStackTrace(pw); // Print the stack trace pw.flush(); sw.flush(); return sw.toString(); } COM: <s> convert a stack trace to a string </s>
funcom_train/3842493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date select (final Date date) { calendar.setTime(date); int tday = calendar.get(Calendar.DATE); int tmonth = calendar.get(Calendar.MONTH); int tyear = calendar.get(Calendar.YEAR); year.setSelectedIndex(tyear-FIRST_YEAR); month.setSelectedIndex(tmonth-Calendar.JANUARY); setSelected(tday); okClicked = false; this.setVisible(true); if (!okClicked) { return null; } calendar.set(Calendar.DATE, getSelectedDay()); calendar.set(Calendar.MONTH, month.getSelectedIndex()+Calendar.JANUARY); calendar.set(Calendar.YEAR, year.getSelectedIndex()+FIRST_YEAR); return calendar.getTime(); } COM: <s> selects a date </s>
funcom_train/10985073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Interpreter getInterpreter(String prefix, String script) { log.debug("Trying to retrieve module-specific interpreter from context: "+FlowPlugIn.INTERPRETER_KEY+"/"+prefix); Map map = (Map)servlet.getServletContext().getAttribute(FlowPlugIn.INTERPRETER_KEY+"/"+prefix); return (Interpreter) map.get(script); } COM: <s> gets the interpreter for the requested script </s>
funcom_train/3842560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildModel () { this.removeAllElements(); try { DomainAccessObject doa = DomainAccessObjectFactory.getInstance().getDomainAccessObject(clazz); domainCollection = new ArrayList(doa.findAll()); } catch (PersistenceException persistenceException) { System.out.println ("Exception "+persistenceException); } catch (LookupException lookupException) { System.out.println ("Exception "+lookupException); } Iterator iterator = domainCollection.iterator(); this.addElement (null); while (iterator.hasNext()) { this.addElement (iterator.next()); } } COM: <s> build the internal model </s>
funcom_train/8097217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateData(String message, String classValue) { // Make message into instance. Instance instance = makeInstance(message, m_Data); // Set class value for instance. instance.setClassValue(classValue); // Add instance to training data. m_Data.add(instance); m_UpToDate = false; } COM: <s> updates model using the given training message </s>
funcom_train/49608785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteIdentityCardTypes(String username,EntityManager em,List<IdentityCardType> vos) throws Throwable { try { for(IdentityCardType vo: vos) { vo.setDeleted(Consts.FLAG_Y); JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo); } } catch (Throwable ex) { Logger.error(null, ex.getMessage(), ex); throw ex; } } COM: <s> delete logically a identity card type </s>
funcom_train/12587315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Catalog loadCatalog(URL url) throws CatalogRemoteException { Catalog catalog = null; InputStream catalogStream = null; try { catalogStream = InesHelper.loadFile(url); catalog = m_bindingProvider.loadCatalog(catalogStream); catalogStream.close(); } catch (IOException e) { throw new CatalogRemoteException(); } catch (AnyItemBindingException e) { throw new CatalogRemoteException(); } finally { try { if (catalogStream != null) { catalogStream.close(); } } catch (IOException e) { throw new CatalogRemoteException(); } } return catalog; } COM: <s> load catalog object from xml catalog grammar </s>
funcom_train/47682986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAsObject(String p_path) { Field target = null; if ((target = getField(p_path)) != null) { return target.getValueAsObject(); } else { throw new IllegalArgumentException("The referenced field \"" + p_path + "\" does not exist."); } } COM: <s> retrieves the value of the field instance as an object independent of </s>
funcom_train/37202950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getFinders(DataThing dataThing) { logger.debug("Finding facetisers: " + dataThing); List res = new ArrayList(); for (FacetFinderSPI finder : findComponents()) { logger.debug("\tfound: " + finder.getName()); if (finder.canMakeFacets(dataThing)) { logger.debug("\taccepted: " + finder.getName()); res.add(finder); } } return res; } COM: <s> get all facet finders that can decompose a user object and mime type </s>
funcom_train/38810461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String parseBook(String full) { //find where the colon denoting the chapter/verse is int index = full.lastIndexOf(':') - 1; //work back to the first non digit character before that colon while (Character.isDigit(full.charAt(index))) { --index; } //substring out everything from the beginning up to (but not including) the non digit character return full.substring(0, index).trim(); } COM: <s> utility method to parse the book name out a the reference </s>
funcom_train/1560699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(TreeSelectionEvent e) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree .getLastSelectedPathComponent(); if (node == null) return; if (node.isLeaf()) { TreePath p = e.getPath(); switch(mode){ case MODE_URL: try { view.loadSpreadsheetFromURL(getURLFromPath(p)); } catch (MalformedURLException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } break; case MODE_FILE: view.loadSpreadsheetFromURL(getFileFromPath(p)); break; } } }; COM: <s> listener for data file tree leaf selection </s>
funcom_train/22894113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyObservers(ObservableComponent source, Object args) { Set<Object> obs = observableCache.get(source); if(obs==null){ obs=getObserverList(source); observableCache.put(source, obs); } synchronized (obs) { for (Object o : obs) { try { source.dispatchEvent(o, args); } catch (Exception e) { e.printStackTrace(); } } } } COM: <s> an observable component will call this method to notify its observers </s>
funcom_train/31754662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataField getPersistentDataField(StructFieldID structFieldID, int dataBlockID) { if (!getDataFieldsMap().containsKey(structFieldID)) return null; for (DataField dataField : getDataFieldsMap().get(structFieldID)) { if (dataField.getDataBlockID() == dataBlockID) return dataField; } return null; } COM: <s> this method serves to load one </s>
funcom_train/1130864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ThreadContainer findRootSet() { ThreadContainer root = new ThreadContainer(); Iterator iter = idTable.keySet().iterator(); while (iter.hasNext()) { Object key = iter.next(); ThreadContainer c = (ThreadContainer) idTable.get(key); if (c.parent == null) { if (c.next != null) throw new RuntimeException( "c.next is " + c.next.toString()); c.next = root.child; root.child = c; } } return root; } COM: <s> find the root set of all existing thread containers </s>
funcom_train/46459475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readForClass(String name, Class type) { Resource res = ResourceLoader.getResource(name); if(res==null) return null; input = new BufferedReader(res.openReader()); if (!isInputForClass(type)) return null; return read(name); } COM: <s> reads data into this control from a named source if the source </s>
funcom_train/36604311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int depthHelper(GenTreeNode node) { int _rightDepth = 0; int _leftDepth = 0; if (node == null) { return 0; } _leftDepth = depthHelper(node.leftNode) + 1; _rightDepth = depthHelper(node.rightNode) + 1; if (_leftDepth > _rightDepth) { return _leftDepth; } else { return _rightDepth; } } COM: <s> depth helper recursivelly finds the deepest path then keeps track of it </s>
funcom_train/17529151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void compare() { List<String> names1 = getNames(net1); List<String> names2 = getNames(net2); if (!names1.containsAll(names2) || !names2.containsAll(names1)) areBisimilar = false; else { createNameMap(names1); Map<BitSet, Set<BitSet>> trans1 = createStateTransitions(net1); Map<BitSet, Set<BitSet>> trans2 = createStateTransitions(net2); areBisimilar = compareStateTransitions(trans1, trans2); } } COM: <s> runs the whole process of comparison </s>
funcom_train/44161584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(ActionEvent ae) { if (this.fileManager.isGenerated(getParamValue(ae))) { getRequest().setAttribute("isPopup", "window.open('/jrapid/Reports/" + getParamValue(ae) + "/out.html');"); } } COM: <s> run runs selected report </s>
funcom_train/37073184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getIndexLocation() { final String defaultIndexLocation = "/var/pubsearch/lucene-indices/"; // this is temporary...; java.util.ResourceBundle b = java.util.ResourceBundle.getBundle("pub.Properties"); try { String location = b.getString("pub.full_text_indices"); if (location != null) { return location; } } catch (java.util.MissingResourceException e) { ; } return defaultIndexLocation; } COM: <s> returns the path where the lucene indices are located </s>
funcom_train/7615007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Insets getScreenInsets(GraphicsConfiguration gc) throws HeadlessException { if (gc == null) { throw new NullPointerException(); } lockAWT(); try { return new Insets(0, 0, 0, 0); // TODO: get real screen insets } finally { unlockAWT(); } } COM: <s> gets the screen insets </s>