__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/34838277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GoalClass createGoalClass(String identifier) throws GlueException { if ((identifier==null)||(identifier=="")) return null; if (langType.equalsIgnoreCase(wsml_lang)) return ((GoalClass) new WSML_GoalClass(identifier)); //if (langType.equalsIgnoreCase(rdf_lang)) return new (identifier); return null; } COM: <s> create a new goal class </s>
funcom_train/5158125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WebSearchResults contextWebSearch(ContextSearchRequest request) throws IOException, SearchException { request.getParameters().put(APPID_KEY, appId); Map results = executeAndParse(request.getRequestUrl(), request.getParameters()); return new XmlParserWebSearchResults(results); } COM: <s> searches the yahoo database for web results using a context based query </s>
funcom_train/18662188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDataFlavorSupported( DataFlavor flavor ) { logger.fine( String.format( "Requested flavor %s is supported: %b", flavor.toString(), Arrays.asList( flavors ).contains( flavor ) ) ); return ( Arrays.asList( flavors ).contains( flavor ) ); } COM: <s> returns if a requested flavor is supported </s>
funcom_train/13225119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printFiltered(Object o) { if (!isLineVisible()) return; String s = filter(o.toString()); s = s.replaceAll("\r",""); String[] lines = s.split("\n"); for (int l = 0; l < lines.length; l++) { if (l >0 ) newLine(); String[] words = lines[l].split(" "); for (String word : words) { checkWrapLine(word); out.print(word); if (words.length > 1) { checkWrapLine(" "); out.print(" "); } } } } COM: <s> filters and prints the string representation of an object to the output </s>
funcom_train/14266726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PingReply mutateGUID(byte[] guid) { return PingReply.create(guid, getTTL(), getPort(), getIPBytes(), getFiles(), getKbytes(), isUltrapeer(), getDailyUptime(), supportsUnicast()); } COM: <s> returns a new tt ping reply tt instance with all the same data </s>
funcom_train/45115578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateLastReportStyle1() throws IOException{ if (changedStatus == Reporter.PASS){ return; } if (getCurrentLevelLinkStatus() == Reporter.FAIL){ return; } String css = getLevelSccForStatus(changedStatus); File reportFile = new File(getReportFileCanonicalDirectory(), fileName); int index = FileUtils.getLastLineWith(reportFile,"<span\\s+class=.*?>"); FileUtils.replaceInFile(reportFile, "<span\\s+class=.*?>","<span class=\""+css+"\">",index); setCurrentLevelLinkStatus(changedStatus); } COM: <s> update last report color according to the new status </s>
funcom_train/40119653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logException(Exception e) { StringWriter writer = new StringWriter(); e.printStackTrace(new PrintWriter(writer)); addToLog("Cannot compare!, see stackTrace..."); addToLog(writer.toString()); setResult(false); } COM: <s> logs an exception during the comparison process </s>
funcom_train/36049337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int mouseWheelDown(int x, int y, int modifiers, int count, String wait) throws IOException { return mouseEvent("wheeldown", modifiers, MouseEvent.BUTTON2, null, new Point(x, y), count, wait); } COM: <s> p scroll down the mouse wheel on the current desktop </s>
funcom_train/511160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkOptions() throws BuildException { // set the destination directory relative from the project if needed. if (toDir == null) { toDir = task.getProject().resolveFile("."); } else if (!toDir.isAbsolute()) { toDir = task.getProject().resolveFile(toDir.getPath()); } } COM: <s> check for invalid options </s>
funcom_train/18033331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getSumOfSquares() { double retVal = PrimitiveMath.ZERO; final double tmpMean = this.getMean(); double tmpVal; for (int i = 0; i < mySamples.size(); i++) { tmpVal = mySamples.doubleValue(i) - tmpMean; retVal += (tmpVal * tmpVal); } return retVal; } COM: <s> p quot sum of squares is a concept that permeates much of inferential </s>
funcom_train/46755955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTermId(Long termId) { if (!(this.termId.longValue() == termId.longValue())) { Long oldtermId= 0L; oldtermId = this.termId.longValue(); this.termId = termId.longValue(); setModified("termId"); firePropertyChange(String.valueOf(APPLICATIONCONTROLS_TERMID), oldtermId, termId); } } COM: <s> term bound to this control </s>
funcom_train/45486491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton11Del() { if (jButton11Del == null) { jButton11Del = new JButton(); jButton11Del.setBounds(new Rectangle(951, 277, 64, 26)); Font font = new Font("Serif", Font.BOLD, 16); jButton11Del.setFont(font); jButton11Del.setForeground(Color.red); jButton11Del.setText("11"); } return jButton11Del; } COM: <s> this method initializes j button11 del </s>
funcom_train/32347616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(ChangeEvent e) { double val = slider.getValue(); double tp = (val - sliderMin) / (sliderMax - sliderMin); burnPanel().setTPeak(tp); thrustPanel().setTPeak(tp); valueLabel().setText(Format.formatToNPlaces(tp, 2)); } COM: <s> the slider moved </s>
funcom_train/46456566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawAll(Graphics g) { ArrayList tempList = null; synchronized(this) { tempList = (ArrayList) accumulator.clone(); } Iterator it = tempList.iterator(); while(it.hasNext()) { LineRecord line = (LineRecord) it.next(); g.drawLine(line.x1, line.y1, line.x2, line.y2); } } COM: <s> draws all accumulated lines </s>
funcom_train/33513494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testScanVariableReuse() throws Exception { Scan scan = new Scan(); scan.addFamily(CATALOG_FAMILY); scan.addColumn(CATALOG_FAMILY, row); assertTrue(scan.getFamilyMap().get(CATALOG_FAMILY).size() == 1); scan = new Scan(); scan.addFamily(CATALOG_FAMILY); assertTrue(scan.getFamilyMap().get(CATALOG_FAMILY).size() == 0); } COM: <s> for hbase 2156 </s>
funcom_train/25188212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMinItems() throws Exception { System.out.println("getMinItems"); JSchema instance = new JSchema(); assertNull(instance.getMinItems()); instance.setMinItems(20); assertEquals((Integer) 20, instance.getMinItems()); } COM: <s> test of get min items method of class jschema </s>
funcom_train/625600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getServiceDescriptionMap() throws EveException { // TODO throw some meaningful exception. // TODO How to get the local components directory??? Map msn = new HashMap(); String lcd = "./components/"; //$NON-NLS-1$ File cd = new File(lcd); Iterator ci = getComponents(cd).iterator(); while (ci.hasNext()) { IServiceDescription st = getServiceDescription((URL) ci.next()); msn.put(st.getURI(), st); } return msn; } COM: <s> returns all eve services in the local components directory </s>
funcom_train/28982896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getSettingsRetrieveUserName () { if (settingsRetrieveUserName == null) {//GEN-END:|71-getter|0|71-preInit // write pre-init user code here settingsRetrieveUserName = new TextField ("User Name*:", null, 64, TextField.ANY);//GEN-LINE:|71-getter|1|71-postInit // write post-init user code here }//GEN-BEGIN:|71-getter|2| return settingsRetrieveUserName; } COM: <s> returns an initiliazed instance of settings retrieve user name component </s>
funcom_train/1959657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getEventList() { List events = getChildren("event", getNamespace()); List tempresult = new Vector(); //detach the Event's so that they can be sorted by Collection.sort Iterator iter = events.iterator(); while(iter.hasNext()){ Event e = (Event)((Event)iter.next()).clone(); e.detach(); tempresult.add(e); } Collections.sort(tempresult, new EventTimeComparator()); removeChildren("event", getNamespace()); //...and reattach them iter = tempresult.iterator(); while(iter.hasNext()){ addEvent((Event) iter.next()); } return getChildren("event", getNamespace()); } COM: <s> gets the list of event elements in this element </s>
funcom_train/12561385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackground(Image bgImage, boolean tileBG, int bgColor) { if (bgImage != null) { this.bgImage = new Image[] { bgImage }; this.tileBG = tileBG; transparent = false; } else { this.bgImage = null; transparent = (bgColor < 0); } this.bgColor = bgColor; addDirtyRegion(); } COM: <s> establish a background </s>
funcom_train/2025939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String selectTestSuite() { FileDialog fileDialog = new FileDialog( Activator.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(), SWT.OPEN); fileDialog.setText("Open test suite"); fileDialog.setFilterExtensions(new String[] { "*.xml" }); String fileName = new String(); if (fileDialog.open() != null) { fileName = fileDialog.getFilterPath() +IPath.SEPARATOR +fileDialog.getFileName(); } entriesChanged(); return fileName; } COM: <s> dialog to chooses test suite to be executed </s>
funcom_train/23216961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWritePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PolicyManagement_write_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PolicyManagement_write_feature", "_UI_PolicyManagement_type"), ContractPackage.Literals.POLICY_MANAGEMENT__WRITE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the write feature </s>
funcom_train/22287067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int privLookupAndRememberAlreadyEncodedObject(Object o, int hashCode) { Integer x = (Integer) this.fSeenMap.get(new Integer(hashCode)); if (x != null) return x.intValue(); this.fSeenMap.put(new Integer(hashCode), new Integer(this.fSeenCount++)); return -1; } COM: <s> native helper for </s>
funcom_train/17975893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object delegateGetter(Method method) { String propertyName = StringUtils.uncapitalize(StringUtils.substring(method.getName(), GETTER_PREFIX.length())); try { return this.getPropertyValue(propertyName); } catch (PropertyNotFoundException e) { String message = "Error occured while "; getLogger(this.getClass()).fatal(message, e); throw new PopulationException(message); } } COM: <s> delegates a getter call </s>
funcom_train/40768919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getHostedMode() { String hostname = getServerHostName(); int host = -1; Arrays.sort(hostedModehosts); if (hostedModehosts != null) { host = Arrays.binarySearch(hostedModehosts, hostname); } // we are on the design server boolean hostedMode = false; if (host > -1) { hostedMode = true; } return hostedMode; } COM: <s> is this class running in hosted mode </s>
funcom_train/7713965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sendPkt(int from, int to, byte[] pkt) throws IllegalArgumentException { if ( (pkt.length > Packet.MAX_PACKET_SIZE) || !Packet.validAddress(to) || !Packet.validAddress(from) || !Packet.unpack(pkt).isValidToSend()) { throw new IllegalArgumentException("Either pkt is not valid, address is not valid, or TTL is not valid"); } this.pktsSent++; return true; } COM: <s> send the pkt to the specified node </s>
funcom_train/4205968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flashWindowStopOnFocus(Window window) { final Iterator alertNotifiers = ModelUtil.reverseListIterator(alerts.listIterator()); while (alertNotifiers.hasNext()) { final Alerter alert = (Alerter)alertNotifiers.next(); boolean handle = alert.handleNotification(); if (handle) { alert.flashWindowStopWhenFocused(window); break; } } } COM: <s> flash the given window but stop flashing when the window takes focus </s>
funcom_train/9978519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeInterceptorRef(Element el) { pContext.getProject().fireChangeEvent(ProjectChangeListener.EventType.PluginSettingsWillChange, Struts2Tools.pluginID); el.getParentNode().removeChild(el); pContext.getProject().fireChangeEvent(ProjectChangeListener.EventType.PluginSettingsChanged, Struts2Tools.pluginID); } COM: <s> removes an interceptor ref </s>
funcom_train/43236888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createContents() { logger.debug("createContents(int) - start"); GridLayout layout = new GridLayout(); layout.marginWidth = 0; layout.marginHeight = 0; form.getBody().setLayout(layout); detailPlaceholder = buildMasterDetail(form.getBody(), masterProvider); masterProvider.initialize(this); masterProvider.setFocus(); logger.debug("createContents(int) - end"); } COM: <s> creates the contents of the master detail form and initializes the master provider </s>
funcom_train/18098278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getColumnIndex( int relX ) { if (this.columnWidths == null) { return -1; } relX -= this.xOffset; relX -= this.contentX; int w = 0; for (int col = 0; col < this.columnWidths.length; col++ ) { int cw = this.columnWidths[col]; if (relX >= w && relX <= w + cw) { return col; } w += cw; } return -1; } COM: <s> retrieves the column index for the given x position </s>
funcom_train/824692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CStringBuilder append(StringBuffer stringBuffer) { if (stringBuffer == null) return append("null"); synchronized (stringBuffer) { int len = stringBuffer.length(); ensureCapacity(count + len); System.arraycopy( stringBuffer.toString(), 0, value, count, len ); count += len; } return this; } COM: <s> append the code string builder code value of the argument to this </s>
funcom_train/3883172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCostPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DocumentRoot_cost_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_cost_feature", "_UI_DocumentRoot_type"), ImsMdRootv1p1Package.Literals.DOCUMENT_ROOT__COST, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the cost feature </s>
funcom_train/17207671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveContext(PseudoOp callOp, StackFrame frame) { frame.savePc(pc); frame.saveMethod(code); if (callOp.hasResult()) { frame.setResultSlot(callOp.getResult()); } else { frame.clearResultSlot(); } } COM: <s> save context in the callers stack frame </s>
funcom_train/22405776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SelectionAdapter DeletePerson() { SelectionAdapter seladapt = new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { persons.remove(personCount); //setModel(); decPersonCount(); //the composite is disposed and a new one is created composite.dispose(); composite = viewRenderer.createView(parentComposite, contr, persons.get(getPersonCount()), filename); parentComposite.layout(); } }; return seladapt; } COM: <s> implements the listner for the delete person button </s>
funcom_train/43245753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPlanName() { System.out.println("getPlanName"); InsuranceBufferObject instance = new InsuranceBufferObject(); String expResult = ""; String result = instance.getPlanName(); 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 plan name method of class org </s>
funcom_train/8188196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sort() { /** * Try to gain params send by <f:param /> */ FacesContext context = FacesContext.getCurrentInstance(); Map requestMap = context.getExternalContext().getRequestParameterMap(); setSortByField( (String) requestMap.get("by") ); setSortDirection( (String) requestMap.get("order") ); resetPagination(); resetDataModel(); } COM: <s> retrieves sort params through context and initiates sort </s>
funcom_train/35458934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AddTerm add(AddTerm term) { if(rootNode instanceof NumericNode){ return term.add(value); } else if(rootNode instanceof SymbolNode){ int v = negative? -1: 1; return term.add( v, '*', rootNode); } else if(rootNode instanceof OperatorNode && (operator == '*' || operator == '/') && symbolNode != null) { return term.add( value, operator, symbolNode); } return null; } COM: <s> add 2 terms </s>
funcom_train/33724432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BnTextField getBnTextField1() { if (bnTextField1 == null) { bnTextField1 = new BnTextField(); bnTextField1.setPath(new Path("this.zip")); bnTextField1.setModelProvider(getMyDataSource()); } return bnTextField1; } COM: <s> this method initializes bn text field1 </s>
funcom_train/12177140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void discardNestedState (String inclusionPath) { String prefix = inclusionPath + "."; for (Iterator i = inclusions.keySet ().iterator (); i.hasNext ();) { String key = (String) i.next (); if (key != null && key.startsWith (prefix)) { i.remove (); } } } COM: <s> discard any information about inclusions and fragments which are nested </s>
funcom_train/15910945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Lite getNearest(Class liteClass) { Picked pick; Lite res = null; double dist = -1; for (Iterator e = iterator(); e.hasNext() && dist!=0; ) { pick = (Picked)e.next(); if (liteClass.isInstance(pick.object) && dist == -1 || pick.distance < dist) { dist = pick.distance; res = pick.object; } } return res; } COM: <s> returns the geometrically nearest lite object of the given class </s>
funcom_train/1064109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getShape() { EList stereotypeList = getUml2Element().getAppliedStereotypes(); if (stereotypeList.size() < 1) { // no applied stereotype return null; } com.cea.papyrus.umlutils.Stereotype firstSt = new com.cea.papyrus.umlutils.Stereotype((Stereotype) stereotypeList.get(0)); return firstSt.getShape(); } COM: <s> return the shape of the first applied stereotype if it has one </s>
funcom_train/9924957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void storeAllInstance(String userId) throws APP_SPECException { String error = null; for (String groupName: groups.getGroupsForUser(userId)){ for (APP_SPECInstance instance : groups.getInstances(groupName, userId)){ storeInstance(userId,instance); } } } COM: <s> stores all instances of user specified in argument </s>
funcom_train/13712329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeOutput(int outputNumber){ try{ MidiOutDevice outDevice = (MidiOutDevice) midiOutDevices.get(outputNumber); outDevice.close(); }catch (ArrayIndexOutOfBoundsException e){ throw new UnavailablePortException("You wanted to close the unavailable output " + outputNumber + ". The available outputs are 0 - " + (midiOutDevices.size() - 1) + "."); } } COM: <s> use this methode to close an output </s>
funcom_train/47398622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDouble(String param) throws FtpException { String val = m_prop.getProperty(param); if(val == null) { throw new FtpException("Not found : " + param); } try { return Double.parseDouble(val); } catch(Exception ex) { throw new FtpException("PropertiesConfiguration.getDouble()", ex); } } COM: <s> get double if not found throws ftp exception </s>
funcom_train/26018036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessageContent() throws UnsupportedEncodingException { if (this.messageContent == null && this.messageContentBytes == null) return null; else if (this.messageContent == null) { this.messageContent = new String(messageContentBytes, getCharset() ); } return this.messageContent; } COM: <s> get the message body as a string </s>
funcom_train/3080807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireColumnRemoved(TableColumnModelEvent e) { EventListener[] listeners = listenerList.getListeners(TableColumnModelListener.class); for (int index = 0; index < listeners.length; ++index) { ((TableColumnModelListener) listeners[index]).columnRemoved(e); } } COM: <s> notifies listeners that a column was removed </s>
funcom_train/13211260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testForProfileActionEnabled(final PlayerProfiles profiles, JCheckBox chkAll, JButton btRemove) { boolean enable = (profiles.getPlayers().length>0 && !GameManager.getInstance().getGameEngine().isActiveGame()); chkAll.setEnabled(enable); btRemove.setEnabled(enable); } COM: <s> tests if the profile managing action shall be enabled </s>
funcom_train/38737208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processPing(Message message) { Message pingMessage; pingMessage = new MessageXML(message.getSequenceNumber(), SendType.RESPONSE, Protocol.PING_RESPONSE, message .getMessageSource(), chordNode.getKey().getValue()); pingMessage.addParam(PingResponseParams.PING.name(), Boolean.TRUE .toString()); communicationManager.sendMessageUnicast(pingMessage); } COM: <s> process message of type is ping </s>
funcom_train/12561182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void uCallPaint(Graphics g, Object target) { if (Logging.REPORT_LEVEL <= Logging.INFORMATION) { Logging.report(Logging.INFORMATION, LogChannels.LC_HIGHUI_FORM_LAYOUT, "# in DisplayableLFImpl: uCallPaint"); } synchronized (Display.LCDUILock) { lCallPaint(g, target); } } COM: <s> display calls this method on its current displayable </s>
funcom_train/6263176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doDoneStep() { if ( curJob.isDeleteInput() ) { File inputFile = new File( curJob.getInputFileName() ); if ( inputFile.exists() ) { inputFile.delete(); } } curJobNum++; state = RUNNING; processNextJob(); } COM: <s> after a step is completed delete input if needed and start </s>
funcom_train/48423411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Quaternion buildQuat(Vector3f rot) { Quaternion q = null; try { q = new Quaternion(); q.fromRotationMatrix(this.buildMatrix(rot)); } catch (Exception Ex) { logger.log(Level.SEVERE, "Error, building Quaternion from rotation" + " Matrix.", Ex); } return q; } COM: <s> method that creates a quaternion from vector3f with axis rotation </s>
funcom_train/39534310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeHandle(SVGHandle handle, JComponent relativeComponent){ if(handle.isModified()){ //checking whether the file should be saved, or the close action cancelled int returnValue=JOptionPane.showConfirmDialog( Editor.getParent(), warningMessage, warningTitle, JOptionPane.YES_NO_CANCEL_OPTION); if(returnValue==JOptionPane.YES_OPTION){ boolean saveActionLaunched= ioManager.getFileSaveManager().saveHandleDocument( handle, false, relativeComponent); if(saveActionLaunched){ close(handle); } }else if(returnValue==JOptionPane.NO_OPTION){ close(handle); } }else{ close(handle); } } COM: <s> closes the provided handle some verifications are </s>
funcom_train/18094898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerSWTElement(Object element) { if (element instanceof ImageInfoGui) { imageInfoGui = (ImageInfoGui) element; } else if (element instanceof InfoBar) { infoBar = (InfoBar) element; }else if (element instanceof TnGui) { tnGui = (TnGui) element; } else if (element instanceof Object) { // another gui element to register in facade } } COM: <s> registers any gui object that should respond on engine calls </s>
funcom_train/1304040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SegmentSequence splitSegment(Segment segment, SplitFunction splitFunction) { SegmentSequence result = null; if (splitFunction.shouldSplit(segment)) { result = splitFunction.split(segment.getText()); if (result != null) { result.injectFeatureBag(segment.getFeatureBag()); replaceSegment(segment, result); } } return result; } COM: <s> split the segment using the split function replacing the segment with the results </s>
funcom_train/20269149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateEntry(Entry entry) { Preconditions.checkState(line < lineCount); Preconditions.checkState(entry.getSourceFileId() == UNMAPPED || entry.getSourceFileId() < sources.length); Preconditions.checkState(entry.getNameId() == UNMAPPED || entry.getNameId() < names.length); } COM: <s> sanity check the entry </s>
funcom_train/2039361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processElapsedWeeks(GregorianCalendar lower, GregorianCalendar greater) { GregorianCalendar tmp = (GregorianCalendar) lower.clone(); do { tmp.add(Calendar.WEEK_OF_YEAR, 1); if (tmp.equals(greater) || tmp.before(greater)) { lower.add(Calendar.WEEK_OF_YEAR, 1); this.weeks++; } } while (tmp.before(greater)); } COM: <s> process elapsed weeks </s>
funcom_train/1864747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean requestFocus(final Plugin plugin, final int priority) { if (priority > screenPriority) { for (int i = 0; i < allScreens.size(); ++i) { if (pluginManager.getPluginInfo(allScreens.get(i)).getPlugin() == plugin) { screenPriority = priority; changeScreen(i); flashLCD(); return true; } } } return false; } COM: <s> allows a plugin to request screen focus </s>
funcom_train/17845632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showInfoDialog(InternalPluginProxyIf plugin) { JOptionPane.showMessageDialog(UiUtilities.getLastModalChildOf(MainFrame .getInstance()), mLocalizer.msg("internalPlugin", "This is an internal plugin which cannot be disabled."), mLocalizer .msg("internalPluginTitle", "Internal plugin"), JOptionPane.INFORMATION_MESSAGE); } COM: <s> show the info dialog for internal plugins </s>
funcom_train/16490684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getHighlightColor(Component c) { SubstanceColorScheme colorScheme = SubstanceColorSchemeUtilities .getColorScheme(c, ComponentState.DEFAULT); boolean isDark = colorScheme.isDark(); Color foreDark = isDark ? colorScheme.getExtraLightColor() : SubstanceColorUtilities.getInterpolatedColor(colorScheme .getMidColor(), colorScheme.getDarkColor(), 0.4); return SubstanceColorUtilities.getAlphaColor(foreDark, 196); } COM: <s> returns the highlight color for the specified component </s>
funcom_train/32136155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextFieldMajorVersion() { if (jTextFieldMajorVersion == null) { jTextFieldMajorVersion = new JTextField(); jTextFieldMajorVersion.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent e) { if(e.getKeyChar() < '0' || e.getKeyChar() > '9') e.consume(); } }); } return jTextFieldMajorVersion; } COM: <s> this method initializes j text field major version </s>
funcom_train/31358787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getSensitivity(int buttonNo, int selectedRow) { if (buttonNo >= reorder.length) return false; // always allow add group operation if (reorder[buttonNo] == ADD) return true; // allow EDIT and DELETE operations only when a row in the table is selected if (selectedRow < 0) return false; if (reorder[buttonNo] == DELETE) return !isSystem(selectedRow); return true; } COM: <s> control which buttons are enabled disabled </s>
funcom_train/18745163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLabels(List<String> textList, boolean negated) { this.textList = textList; this.labelSet = new HashSet<TypeLabel>(); for (String text : textList) { this.labelSet.add(TypeLabel.createLabel(getKind(), text)); } this.negated = negated; } COM: <s> sets the set of labels to test for </s>
funcom_train/375245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvokeGetHeaderLengthAnnotated() { JPacket packet = TestUtils.getPcapPacket("tests/test-afs.pcap", 0); JHeaderScanner scanner = new JHeaderScanner(MyHeader.class); assertEquals(20, scanner.getHeaderLength(packet, Ethernet.LENGTH)); System.out.printf("length=%d %d\n", scanner.getHeaderLength(packet, Ethernet.LENGTH), packet.getUByte(Ethernet.LENGTH) & 0x0F); } COM: <s> test invoke get header length annotated </s>
funcom_train/28887590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTree() { this.rootTreeNode = new DefaultMutableTreeNode(); DynamicNodeUserObject rootObject = new DynamicNodeUserObject( this.rootTreeNode, this); rootObject.setText(ROOT_NODE_TEXT); this.rootTreeNode.setUserObject(rootObject); // model is accessed by the ice:tree component this.model = new DefaultTreeModel(this.rootTreeNode); } COM: <s> initialize the tree and add the root node </s>
funcom_train/8418030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PatternSet buildPatternSet(PatternSet n1_set, ArrayList<String> n_set) { // iterate through n set for (String s : n_set) { // remove one character from each string and add to a new set for (int i = 0; i < s.length(); i++) { String str = removeCharAt(s, i); n1_set.add(str); } } return n1_set; } COM: <s> creates size n 1 pattern set from original set of size n </s>
funcom_train/47019566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand3() { if (exitCommand3 == null) {//GEN-END:|21-getter|0|21-preInit // write pre-init user code here exitCommand3 = new Command(getLocalizedString("Exit"), Command.EXIT, 1);//GEN-LINE:|21-getter|1|21-postInit // write post-init user code here }//GEN-BEGIN:|21-getter|2| return exitCommand3; } COM: <s> returns an initiliazed instance of exit command3 component </s>
funcom_train/5859651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Processor createRealizedProcessor(Format[] formats,ContentDescriptor contentDescriptor) { Processor p = null; try { System.out.println("Create Realized Processor"); p = Manager.createRealizedProcessor(new ProcessorModel(formats,contentDescriptor)); } catch (IOException e) { e.printStackTrace(); } catch (NoProcessorException e) { e.printStackTrace(); } catch (CannotRealizeException e) { e.printStackTrace(); } return p; } COM: <s> create a capture processor </s>
funcom_train/34593773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getViewApplicationXsl() { if (rtProps.getProperty("view.application.xsl.file") == null) { rtProps.setProperty("view.application.xsl.file", getXslDir() + File.separator + "viewApplication.xsl"); } return getInstallDir() + File.separator + rtProps.getProperty("view.application.xsl.file"); } COM: <s> return the view application xsl </s>
funcom_train/4805182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buf = new StringBuffer(); if (root) buf.append('/'); for (int i = 0, len = names.size(); i < len; i++) { if (i != 0) buf.append('/'); buf.append((String)names.elementAt(i)); } return buf.toString(); } COM: <s> get a string representation of this path </s>
funcom_train/10766520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean is11() { return getType().getNamespaceURI() != null && (getType().getNamespaceURI().equals(Bpel11QNames.NS_BPEL4WS_2003_03) || getType().getNamespaceURI().equals(Bpel11QNames.NS_BPEL4WS_PARTNERLINK_2003_05)); } COM: <s> is this a bpel 1 </s>
funcom_train/44797682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(final Model model) throws Exception { for (int i=0;i<names.length;i++) { String value = (String)model.getData("/Row/" + names[i] + "/text()"); rs.updateString(i+1,value); } rs.updateRow(); parentForm.getModel().resetDirty(); } COM: <s> updates current record in result set with data from the forms model </s>
funcom_train/17210132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void leafDelete() { HashSet<Node> queueN = new HashSet<Node>(); HashSet<Node> ad = new HashSet<Node>(); for (Node tmp1 : nNodes) { ad.clear(); ad.addAll(tmp1.adList); ad.addAll(tmp1.inList); if (ad.size()<2) queueN.add(tmp1); } //remove queued nodes for (Node tmp:queueN){ removeNode(tmp); } // recompute connectivity, clusters ... updateNet(); } COM: <s> delete leaf nodes nodes with only one connection </s>
funcom_train/25377522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String sanitize(String s) { String result; result = s; result = result.replaceAll("&", "&amp;"); result = result.replaceAll("<", "&lt;"); result = result.replaceAll(">", "&gt;"); result = result.replaceAll("\"", "&quot;"); return result; } COM: <s> replaces certain characters with their html entities </s>
funcom_train/4689183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Statement methodBlock(FrameworkMethod method) { Object test; try { test= new ReflectiveCallable() { @Override protected Object runReflectiveCall() throws Throwable { return createTest(); } }.run(); } catch (Throwable e) { return new Fail(e); } Statement statement= methodInvoker(method, test); statement= possiblyExpectingExceptions(method, test, statement); statement= withPotentialTimeout(method, test, statement); statement= withBefores(method, test, statement); statement= withAfters(method, test, statement); return statement; } COM: <s> returns a statement that when executed either returns normally if </s>
funcom_train/23284877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getZoneArtists(String zoneID, String startIndex, String numEntries) throws IOException, UPNPResponseException, JanosWebException { Element zone = getZoneElement(zoneID, false); zd.getZoneArtists(zoneID, startIndex, numEntries, zone); return zone; } COM: <s> get an element representation of a zone players list of artists </s>
funcom_train/20631950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteAssignment(long assignmentId, String username) throws WorkflowException { DTSWFRequest request = new DTSWFRequest(); request.setRequestType("deleteAssignment"); request.setParemeter("assignmentId", new Long(assignmentId)); request.setParemeter("username", username); executeDTSWFRequest(request); } COM: <s> deletes a given </s>
funcom_train/25637509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIndex(Content body) { addIndexContents(packages, "doclet.Package_Summary", configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Package_Summary"), configuration.getText("doclet.packages")), body); } COM: <s> adds the frame or non frame package index to the documentation tree </s>
funcom_train/34994854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLnbincoeff() { System.out.println("lnbincoeff"); double n = 10; double k = 2; double expResult = Math.log(45); double result = MathFunctions.lnbincoeff(n, k); assertTrue(String.format("Expected %.16f, Result=%.16f",expResult,result), MathFunctions.DoubleEqual(expResult, result)); } COM: <s> test of lnbincoeff method of class edu </s>
funcom_train/21067227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean showView(String eclipseViewId) { boolean succes = false; try { IWorkbench workbench = getWorkbench(); if (workbench != null) { IWorkbenchWindow activeWindow = workbench .getActiveWorkbenchWindow(); if (activeWindow != null) { IWorkbenchPage page = activeWindow.getActivePage(); if (page != null) { page.showView(eclipseViewId); } } } succes = true; } catch (PartInitException e) { e.printStackTrace(); } return succes; } COM: <s> force a view to be visible in the current perspective </s>
funcom_train/46877909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isFolderNode(Node node) throws JcrServiceRuntimeException { try { return (CM_FOLDER.equals(node.getPrimaryNodeType().getName())); } catch (Exception ex) { String[] args = {}; ExceptionHandler.handleRuntimeException(ex, this.getClass() .getName() + ".isFolderNode", args); } return false; } COM: <s> check if node is a folder </s>
funcom_train/42590135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(ForeignKey o1, ForeignKey o2) { int result=0; if (o1.getFkPos() == o2.getFkPos() ) { result = 0; } if (o1.getFkPos() < o2.getFkPos()) { result = -1; } if (o1.getFkPos() > o2.getFkPos()) { result = 1; } return result; } COM: <s> this method compares the given foreign keys by their position </s>
funcom_train/20533383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addView(View view) { if (views == null) { views = new LinkedList<View>(); } boolean found = false; for (int i = 0; i < views.size(); ++i) { if (views.get(i).getViewTypeId() == view.getViewTypeId()) { views.remove(i); views.add(i, view); found = true; break; } } if (!found) { views.add(view); } } COM: <s> adds the given view to the views collection </s>
funcom_train/44602313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_constructor_parameter_01() { compileAndExecGivenStatement( "X.java", "class X {\n" + " //@ requires x > 0;\n" + " X(int x) {\n" + " }\n" + "}\n", "new X(10)"); } COM: <s> constructor argument in assertions </s>
funcom_train/29390217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int waitForEcho(InetAddress address, int reply) { long time = System.currentTimeMillis(); while(time+TIMEOUT > System.currentTimeMillis()) { Integer i = responses.get(address); if(i != null) { int res = (i.intValue() & reply); if(res != 0) { // we got a response i = i & ~reply; responses.put(address, i); return(res); } } try { Thread.sleep(10); } catch (InterruptedException e) {} } return(0); } COM: <s> waits until the specified reply came from address </s>
funcom_train/3542852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createAdaptiveChoicesSupport() { Collection<FilterEditor> eds = handler.getEditors(); FilterEditor array[] = eds.toArray(new FilterEditor[eds.size()]); adaptiveSupport = new AdaptiveChoicesSupport(handler.getTable() .getModel(), array, handler.getFilters()); setEnableTableModelEvents(true); } COM: <s> creates the associated </s>
funcom_train/41209467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sizeChanged(int w, int h){ Form current = impl.getCurrentForm(); if(current == null) { return; } if(w == current.getWidth() && h == current.getHeight()) { return; } addInputEvent(createSizeChangedEvent(w, h)); } COM: <s> notifies lwuit of display size changes this method is invoked by the implementation </s>
funcom_train/44994435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int result = Constants.INT_17; result = Constants.INT_37 * result + termName.hashCode(); result = Constants.INT_37 * result + termKey.hashCode(); result = Constants.INT_37 * result + targetList.hashCode(); result = Constants.INT_37 * result + subTerms.hashCode(); return result; } COM: <s> generate hash code for index term </s>
funcom_train/49317633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initQueryArgs(QueryArgs queryArgs) { int n = Math.min(_components.length, _catalog.getNumParams()); for (int i = 0; i < n; i++) { if (_components[i] != null) { queryArgs.setParamValue(i, getValue(i)); } } } COM: <s> initialize a query args object based on the current panel settings </s>
funcom_train/11729120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCreated() throws RepositoryException { // create version versionableNode.checkout(); Version version = versionableNode.checkin(); Calendar now = GregorianCalendar.getInstance(); now.add(Calendar.SECOND, 1); assertTrue("Method getCreated() should return a creation date before current date.", version.getCreated().before(now)); } COM: <s> returns the date this version was created </s>
funcom_train/44162983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumberOfLivingHumanPlayers() { int n = 0; for (Player p : game.getPlayers()) { ServerPlayer serverPlayer = (ServerPlayer)p; if (!serverPlayer.isAI() && !serverPlayer.isDead() && !serverPlayer.isConnected()) n++; } return n; } COM: <s> gets the number of human players in this game that is still playing </s>
funcom_train/51222610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectShapes(Region region) { cancelSelection(); // first add region this.selectedElements.add(region); // add all shapes in the rectangle of the region Rectangle regionRect = region.getRectangle(); int count = this.elements.size(); for (int i = count - 1; i >= 0; i--) { IShape shape = this.elements.get(i); if (regionRect.contains(shape.getRectangle())) { this.selectedElements.add(shape); } } } COM: <s> select all shapes in this region </s>
funcom_train/8568393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newGeneration() { age++; if (!chromosomes.isEmpty()) getFittest(); if (fittest != null) { //if fitness hasn't improved increase stagnant generations count if (fittest.getFitnessValue() <= previousGenBestFitness) { stagnantGenerationsCount++; // System.out.println("Stagnant generations increased to " + // stagnantGenerationsCount); } else { stagnantGenerationsCount = 0; previousGenBestFitness = fittest.getFitnessValue(); // System.out.println("Stagnant generations reset"); } } fittest = null; } COM: <s> update internal variables fittest stagnant generations count to begin </s>
funcom_train/35724315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object selectContentTypePlugin(int offset, Map plugins) { try { return selectContentTypePlugin(TextUtilities.getContentType(getDocument(), getDocumentPartitioning(), offset, true), plugins); } catch (BadLocationException x) { if (TRACE_ERRORS) System.out.println(JFaceTextMessages.getString("TextViewer.error.bad_location.selectContentTypePlugin")); //$NON-NLS-1$ } return null; } COM: <s> selects from the given map the one which is registered under </s>
funcom_train/31750342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Config storeConfig(Config config, boolean get, String[] fetchGroups, int maxFetchDepth) { PersistenceManager pm; pm = getPersistenceManager(); try { config = pm.makePersistent(config); if (!get) return null; if (fetchGroups != null) pm.getFetchPlan().setGroups(fetchGroups); pm.getFetchPlan().setMaxFetchDepth(maxFetchDepth); return pm.detachCopy(config); } finally { pm.close(); } } COM: <s> stores the given </s>
funcom_train/18112156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getToolExpandAllButton() { if (toolExpandAllButton == null) { toolExpandAllButton = new JButton(); toolExpandAllButton.setDisabledIcon(new ImageIcon(getClass().getResource("/icons/expandall_disabled.gif"))); toolExpandAllButton.setToolTipText("Expand All"); toolExpandAllButton.setIcon(new ImageIcon(getClass().getResource("/icons/expandall.gif"))); toolExpandAllButton.setPreferredSize(new java.awt.Dimension(20,20)); toolExpandAllButton.addActionListener(this); } return toolExpandAllButton; } COM: <s> this method initializes tool expand all button </s>
funcom_train/51344970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeValid(Writer w) throws IOException { switch(this) { case html_4_01_strict: writeValidHTML401Strict(w); break; case html_4_01_transitional: writeValidHTML401Transitional(w); break; case xhtml_1_0_strict: writeValidXHTML(w); break; default: throw new UnsupportedOperationException(this.toString()); } } COM: <s> writes the w3 c valid icon into the page for the </s>
funcom_train/50347170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public boolean isCanonicalVersion(String version) { String[] parts = version.split("\\."); if (parts.length != 3) { return false; } for (String part : parts) { if (Integer.valueOf(part) == null || Integer.valueOf(part) < 0) { return false; } } return true; } COM: <s> tests that a string contains a canonical version string </s>
funcom_train/32983144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setQueueTimeoutParameters( int packetQueueDeletionTimeout, int packetQueueBlockingTimeout ) { if( packetQueueDeletionTimeout < 0 ) { throw new IllegalArgumentException("packetQueueDeletionTimeout needs to be a nonnegaive integer"); } if( packetQueueBlockingTimeout < 0 ) { throw new IllegalArgumentException("packetQueueBlockingTimeout needs to be a nonnegative integer"); } this.packetQueueDeletionTimeout = packetQueueDeletionTimeout; this.packetQueueBlockingTimeout = packetQueueBlockingTimeout; } COM: <s> sets the timeout parameters for creating the underlying queues </s>
funcom_train/12546993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isStartSymbol(String variable, Automaton automaton) { State startState = automaton.getInitialState(); State[] finalStates = automaton.getFinalStates(); if (finalStates.length > 1) { // System.err.println("MORE THAN ONE FINAL STATE"); return false; } State finalState = finalStates[0]; String startSymbol = LEFT_PAREN.concat(startState.getName().concat( BOTTOM_OF_STACK .concat(finalState.getName().concat(RIGHT_PAREN)))); if (variable.equals(startSymbol)) return true; return false; } COM: <s> returns true if code variable code is the start symbol </s>
funcom_train/13916041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String longToBinary(long i) { String retval = ""; int mask = 0x80000000; int spacemark = 0x08888888; while (mask != 0) { retval += ((i & mask) != 0) ? "1" : "0"; mask >>>= 1; if ((mask & spacemark) != 0) retval += " "; } return retval; } COM: <s> long to binary </s>