__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/13747042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createCanvasgraphiquecree() { GridData gridData5 = new GridData(); gridData5.horizontalSpan = 3; // Generated gridData5.widthHint = 480; // Generated gridData5.heightHint = 250; // Generated gridData5.verticalSpan = 10; // Generated canvasgraphiquecree = new Canvas(composite1, SWT.BORDER); canvasgraphiquecree.setLayoutData(gridData5); // Generated } COM: <s> this method initializes canvasgraphiquecree </s>
funcom_train/37603107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActivePreviousDocument() { OpenDefinitionsDocument key = _activeDocument; OpenDefinitionsDocument prevKey = _documentNavigator.getPrevious(key); if (key != prevKey) setActiveDocument(prevKey); else setActiveDocument(_documentNavigator.getLast()); /* selects the active document in the navigator, which signals a listener to call _setActiveDoc(...) */ } COM: <s> sets the active document to be the previous one in the collection </s>
funcom_train/42652624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChildStatus(E root, F child, Boolean status) { changeChildStatus(child, status); for(F otherChild: getChildren(root)) { if(getChildStatus(otherChild) != status) { changeRootStatus(root, null); return ; } } changeRootStatus(root, status); } COM: <s> sets the status of the given child </s>
funcom_train/40216998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateMandatoryFields(final Language language, Errors errors) { ValidationUtils.rejectIfEmptyOrWhitespace( errors, FIELD_NAME, "error.language.name.required", null, "default"); ValidationUtils.rejectIfEmptyOrWhitespace( errors, FIELD_CODE, "error.language.code.required", null, "default"); } COM: <s> this validation method check if the all mandatory fields on a </s>
funcom_train/3668383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getCommand() { List list = (List) commandHash.get(ContextController.getInstance().getCurrentContext()); if (list == null) { list = new ArrayList(); commandHash.put(ContextController.getInstance().getCurrentContext(), list); } return list; } COM: <s> returns a command list of a specified context </s>
funcom_train/13393598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isAvailableLookAndFeel(String laf) { try { Class lnfClass = Class.forName(laf); LookAndFeel newLAF = (LookAndFeel) (lnfClass.newInstance()); return (newLAF.isSupportedLookAndFeel()); } catch (Exception e) { return (false); } } COM: <s> a utility function that layers on top of the look and feels </s>
funcom_train/17806097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addVendor_Name_VersionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PhysicalConnector_Vendor_Name_Version_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PhysicalConnector_Vendor_Name_Version_feature", "_UI_PhysicalConnector_type"), CtbPackage.Literals.PHYSICAL_CONNECTOR__VENDOR_NAME_VERSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the vendor name version feature </s>
funcom_train/36074706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFuzzySet(FuzzyRuleComponent fzComponent){ this.premisePart.add(fzComponent); if (isFirstOrderTKS){ if (!((FirstOrderPolynomial) consequentMF).hasInputVariable(fzComponent.getMf().getFuzzyVariable())){ ((FirstOrderPolynomial) consequentMF).addInputVariable(fzComponent.getMf().getFuzzyVariable()); } } } COM: <s> add a fuzzy set o this rule and update the consequent part if </s>
funcom_train/17918835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNode(Tree node, Tree parent) { if (node != null) { if (parent == null) parent = getRoot(); node.addParent(parent); ArrayList<Tree> descendants = getDescendants(new ArrayList<Tree>(),node); descendants.add(0,node); for (int i=0; i<descendants.size();i++) { Tree d = descendants.get(i); nodes.put(d.getName(), d); } } } COM: <s> registers a node and all its descendant nodes </s>
funcom_train/13122288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File processZippedTemplate(File templateFile, Map model) throws IOException, DocumentTemplateException { File openDocumentFile = createTempFile(".odt"); DocumentTemplate template = new ZippedDocumentTemplate(new FileInputStream(templateFile)); template.createDocument(model, new FileOutputStream(openDocumentFile)); assertFileCreated(openDocumentFile); return convert(openDocumentFile, "txt"); } COM: <s> merges template and model then converts to plain text </s>
funcom_train/12662305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Reader chainReaders(FilterChain chain, Reader start){ Vector readers = chain.getFilterReaders(); Reader result = start; for (Iterator j = readers.iterator(); j.hasNext();) { ChainableReader fr = (ChainableReader) j.next(); result = fr.chain(result); } return result; } COM: <s> uses the chainable readers from the filter chain and the starting </s>
funcom_train/1909864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File f) { boolean accept = false; String fileName = null; if (f != null) { if (f.isDirectory()) { accept = true; } else { fileName = f.getPath().toLowerCase(); if (fileName.endsWith(extension)) { accept = true; } } } return accept; } COM: <s> returns true if tt f tt is a file with the correct extension </s>
funcom_train/11013181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMultiLevelCircularReference() { HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet = wb.createSheet("Sheet1"); HSSFRow row = sheet.createRow(0); row.createCell(0).setCellFormula("B1"); row.createCell(1).setCellFormula("C1"); row.createCell(2).setCellFormula("D1"); HSSFCell testCell = row.createCell(3); testCell.setCellFormula("A1"); CellValue cellValue = evaluateWithCycles(wb, testCell); confirmCycleErrorCode(cellValue); } COM: <s> a1 b1 b1 c1 c1 d1 d1 a1 </s>
funcom_train/885380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isBold() { HTMLDocument doc = ((HTMLDocument) getDocument()); AttributeSet a; int selStart = getSelectionStart(); if (selStart != getSelectionEnd()) { a = doc.getCharacterElement(selStart).getAttributes(); } else { a = ((HTMLEditorKit) getEditorKit()).getInputAttributes(); } return StyleConstants.isBold(a); } COM: <s> is the current selection or cursor position of the cursor bold </s>
funcom_train/7756776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEndpointAddressToHop(PeerID pid, EndpointAddress addr) { Vector ea = new Vector(); ea.add(addr.toString()); AccessPointAdvertisement oldHop = getHop(pid); if (oldHop != null && !oldHop.contains(addr)) { oldHop.addEndpointAddresses(ea); replaceHop(oldHop); } } COM: <s> add a new endpointaddress to a hop </s>
funcom_train/44601815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_set_30(){ compileAndExecGivenStatementExpectRuntimeError( "X.java", "public class X{\n" + " //@ ghost boolean val = false;\n" + " public X() {\n" + " //@ set val = true;\n" + " }\n" + " //@ requires !val;\n" + " public void m() {\n" + " }\n" + "}\n", "new X().m()", null, JMLInternalPreconditionError.class); } COM: <s> is set statement supported </s>
funcom_train/46432505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Timestamp getCurrentTimeGMT() { TimeZone gmtTimezone = TimeZone.getTimeZone("GMT"); //this is need because of the JDBC timezone shift if (!TimeZone.getDefault().equals(gmtTimezone)) { TimeZone.setDefault(gmtTimezone); } Calendar calendar = Calendar.getInstance(gmtTimezone); return new Timestamp(calendar.getTime().getTime()); } COM: <s> returns a timestamp with the current time in gmt format </s>
funcom_train/23442752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSubstitutionGroupPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Element_substitutionGroup_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Element_substitutionGroup_feature", "_UI_Element_type"), SchemaPackage.Literals.ELEMENT__SUBSTITUTION_GROUP, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the substitution group feature </s>
funcom_train/33435418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveMap(final WgsPoint point) { if (point == null) { return; } final MapPos mp = displayedMap.wgsToMapPos(point.toInternalWgs(), middlePoint.getZoom()); panMap(mp.getX() - middlePoint.getX(), mp.getY() - middlePoint.getY()); mapMoved(); } COM: <s> move map without changing zoom </s>
funcom_train/1310033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int broadcast(Message message) { int sent = 0; log.finest("starting broadcast message: " + message); for (MessageClient client : getMessageClients()) { try { client.sendMessage(message); sent++; } catch (ConnectionException exc) { // Ignore when broadcasting } catch (QueueFullException qfe) { // Ignore when broadcasting } } log.finest("finished broadcasting. Sent: " + sent); return sent; } COM: <s> sends code message code to all connected clients </s>
funcom_train/8190438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateNote(long rowId, String title, String body, String level) { ContentValues args = new ContentValues(); args.put(KEY_NAME, title); args.put(KEY_CHARACTER, body); args.put(KEY_LEVEL, level); return mDb.update(DATABASE_TABLE, args, KEY_ROWID + "=" + rowId, null) > 0; } COM: <s> update the note using the details provided </s>
funcom_train/14244867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CR representationFor (int nIdx) { if ((nIdx < 0) || (nIdx >= m_alConstraints.size())) { return null; } MConstraint mc = (MConstraint) m_alConstraints.get (nIdx); if (mc != null) { return new CR (mc, nIdx); } else { return new CR (nIdx); } } COM: <s> create a representation adapter for the given constraint </s>
funcom_train/7526097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _retransmit(long seqno, Message msg, Address addr) { if(!_contains(seqno, addr)) fail("Acknowledging a non-existent msg, great!"); else System.out.println("retransmitting " + seqno + ", msg=" + msg); } COM: <s> check if retransmission is expected </s>
funcom_train/8075557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialize() { int iwidth = m_plotPanel.getWidth(); int iheight = m_plotPanel.getHeight(); // System.err.println(iwidth+" "+iheight); m_osi = m_plotPanel.createImage(iwidth, iheight); Graphics m = m_osi.getGraphics(); m.fillRect(0,0,iwidth,iheight); } COM: <s> set up the off screen bitmap for rendering to </s>
funcom_train/4369738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { System.out.println("Shutdown the server in " + delay + " sec."); while(delay > 0){ try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace() ; } System.out.print('.') ; System.out.flush() ; delay-- ; } if(orb != null) orb.shutdown(false) ; } COM: <s> run the thread </s>
funcom_train/8362817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int drawSelectedText( Graphics g, int x, int y, int start, int end) throws BadLocationException { return XMLViewUtilities.drawSelectedText( this, scanner, context, g, x, y, start, end); } COM: <s> renders the given range in the model as selected text </s>
funcom_train/40227890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateViewClasses() { ViewClass.addClass(AspMain.klas); ViewClass.addClass(IspMain.klas); ViewClass.addClass(MerchantMain.klas); ViewClass.addClass(CustomerMain.klas); ViewClass.addClass(IspListingView.klas); ViewClass.addClass(MerchantListingView.klas); ViewClass.addClass(CustomerListingView.klas); ViewClass.addClass(InterfacesView.klas); ViewClass.addClass(UserEditView.klas); ViewClass.addClass(AccountInterfaceView.klas); } COM: <s> sets all defined </s>
funcom_train/15626887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int removeMapFile(@NotNull final MapFile<G, A, R> mapFile) { final int index = mapFiles.indexOf(mapFile); if (index < 0) { return -1; // might have been a pickmap that could not be loaded } removeMapModelListener(mapFile.getPickmap()); mapFiles.remove(index); return index; } COM: <s> removes a map file </s>
funcom_train/13714910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instance getInstance() { if (type == Type.INSTANCE) { return (Instance) getUserObject(); } if (getUserObject() instanceof Pair) { return (Instance) ((Pair<?, ?>) getUserObject()).getFirst(); } throw new IllegalStateException("This ProgramTreeNode does not" + " represent a program element related to an instance."); } COM: <s> returns the tt instance tt to which the program element represented </s>
funcom_train/24926157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedImage extractRectilinear(URL equiUrl, double yaw, double pitch, double hfov) { synchronized (lock) { BufferedImage output = null; try { BufferedImage equiImage = ImageIO.read(equiUrl); output = EquirectangularToCubic.mainExtract(equiImage, yaw, pitch, hfov); } catch (Exception e) { e.printStackTrace(); } return output; } } COM: <s> extract a rectilinear view from an equirectilinear panorama image </s>
funcom_train/28982835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(SunSpotHostApplication graphicApplication, Coordinate coordinateBS) { this.bsRegion = 0; this.coordinateBS = coordinateBS; this.coordinateSpots = new Vector(); this.creatingRegionProcess = new CreatingRegionProcess(); this.graphicApplication = graphicApplication; this.nbRequestSent = 0; this.nbReplyReceived = 0; this.nbReplyLost = 0; this.targetRegion = -1; } COM: <s> start up the host application </s>
funcom_train/36841080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String proportionString() { String ret = ""; ret += "Copies: " + getNumCopies() + ", "; ret += "Mutations: " + getNumMutations() + ", "; ret += "Crossovers: " + getNumCrossovers() + ", "; ret += "Randoms: " + getNumRandoms(); return ret; } COM: <s> get a nicely formatted string indicating the quantities of the different </s>
funcom_train/16604414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasVertex(float x, float y) { checkPoints(); boolean result = false; for (int i=0;i<points.length;i+=2) { if(points[i] == x && points[i + 1] == y) { result = true; break; } } return result; } COM: <s> check if a particular location is a vertex of this polygon </s>
funcom_train/2389163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanPerspectiveList() { if (panPerspectiveList == null) { GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); gridBagConstraints1.fill = GridBagConstraints.BOTH; gridBagConstraints1.gridy = 0; gridBagConstraints1.weightx = 1.0; gridBagConstraints1.weighty = 1.0; gridBagConstraints1.gridx = 0; panPerspectiveList = new JPanel(); panPerspectiveList.setLayout(new GridBagLayout()); panPerspectiveList.add(getJScrollPane2(), gridBagConstraints1); } return panPerspectiveList; } COM: <s> this method initializes pan perspective list </s>
funcom_train/50872835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetConstructor() { OMAttribution attribution = new OMAttribution(); OMInteger integer = new OMInteger("1"); attribution.setConstructor(integer); Hashtable hashtable = new Hashtable(); hashtable.put(new OMSymbol("a","a"), new OMInteger("1")); attribution.setAttributions(hashtable); assertTrue(attribution.getConstructor() == integer); } COM: <s> test of get constructor method of class nl </s>
funcom_train/4546880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getKeyFrame(long sampleNum) { if (sampleNum > Integer.MAX_VALUE) { return 0; } long numEntries = getNumEntries(); long lastKeyFrame = 0; for (long i = 0; i < numEntries; i++) { long keyFrame = getSampleEntry(i); if (sampleNum < keyFrame) { return lastKeyFrame; } lastKeyFrame = keyFrame; } return sampleNum; } COM: <s> return the key frame for the specified index </s>
funcom_train/40448507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void otherInits(float pay) { colormapIsIdentity= false; payOff= new float[]{0,pay}; payOffStr= new String[payOff.length]; for (int i=0; i<payOff.length; i++) { payOffStr[i]= String.format("$%.2f",payOff[i]); } payoffDefn= "(payoff is "+ payOffStr[1] +" if everyone's color is the same, " +" otherwise "+ payOffStr[0] +")"; } COM: <s> these inits override those in coloring game </s>
funcom_train/9642646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFocus(boolean newFocus) { focus = newFocus; if (focus) { titlePanel.setStartColor(JGradientLabel.START_COLOR_FOCUS); titlePanel .setIntermediateColor(JGradientLabel.INTERMEDIATE_COLOR_FOCUS); titlePanel.setEndColor(JGradientLabel.END_COLOR_FOCUS); titleLabel.setForeground(getForegroundFocus()); titlePanel.repaint(); } else { titlePanel.setStartColor(JGradientLabel.START_COLOR_NO_FOCUS); titlePanel .setIntermediateColor(JGradientLabel.INTERMEDIATE_COLOR_NO_FOCUS); titlePanel.setEndColor(JGradientLabel.END_COLOR_NO_FOCUS); titleLabel.setForeground(getForegroundNoFocus()); titlePanel.repaint(); } } COM: <s> sets the focus </s>
funcom_train/44602387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_assertion_order_01() { compileAndExecGivenStatementExpectRuntimeError( "X.java", "public class X {\n" + " //@ requires false;\n" + " //@ ensures false;\n" + " void m() {\n" + " }\n" + "}\n", "new X().m()", null, JMLInternalPreconditionError.class); } COM: <s> is assertion checked in the correct order </s>
funcom_train/25119832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endElement(String uri, String localName, XMLEventParser parser) throws XMLParseException { if ((rootURI != null) && !rootURI.equals(uri)) parser.throwUnexpectedNamespaceException(rootURI); if (!rootTag.equals(localName)) parser.throwUnexpectedElementException(rootTag); } COM: <s> notification of the end tag of the root element </s>
funcom_train/11082214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void copyAttachments(NormalizedMessage from, NormalizedMessage to) throws MessagingException { for (String attachmentName : (Set<String>) from.getAttachmentNames()) { // Do not copy existing attachments if (to.getAttachment(attachmentName) == null) { DataHandler value = from.getAttachment(attachmentName); to.addAttachment(attachmentName, value); } } } COM: <s> copies attachments from one message to another that do not already exist </s>
funcom_train/9992456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add (String string, Image image) { checkWidget(); if (string == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); TableItem newItem = new TableItem(this.table,SWT.NONE); newItem.setText(string); if (image != null) newItem.setImage(image); } COM: <s> adds the argument to the end of the receivers list </s>
funcom_train/15638050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCloseButtonEnabled(boolean flag) { if (flag) { addWindowListener(winListener); } else { WindowListener[] wls = (WindowListener[]) (this .getListeners(WindowListener.class)); for (int i = 0; i < wls.length; i++) { removeWindowListener(wls[i]); } } } COM: <s> enables or disables the close button </s>
funcom_train/38729986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("WSRastreieme".equals(portName)) { setWSRastreiemeEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/51704234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rowChanged(Object source, int rowIndex, int columnCount){ if (hasTDListeners){ notifyTableDataChanged(new TableDataEvent( source, TYPE_ROW_EDITED, rowIndex, 0, rowIndex, columnCount-1)); } if (hasTMListeners){ notifyTableModelChanged(new TableModelEvent2( source, rowIndex)); } } COM: <s> notifies all listeners that the content of a table row changed </s>
funcom_train/21188420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ManagedCommandline buildCommonCommand() { ManagedCommandline cmdLine = new ManagedCommandline(); cmdLine.setExecutable("ab"); addArgumentIfSet(cmdLine, user, "-u"); addArgumentIfSet(cmdLine, password, "-p"); addArgumentIfSet(cmdLine, server, "-s"); addArgumentIfSet(cmdLine, database, "-d"); return cmdLine; } COM: <s> construct a managed commandline preset with arguments applicable to </s>
funcom_train/31682877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getChildURL(String childName) throws WebDAVException { String uri = getURL().getFile(); if (!uri.endsWith("/")) { uri = uri + "/"; } URL child = null; try { child = new URL(getURL(), uri + childName); } catch (java.net.MalformedURLException exc) { throw new WebDAVException( WebDAVStatus.SC_BAD_REQUEST, "Malformed URL"); } return child; } COM: <s> get the url of a child of this resource treating the resource </s>
funcom_train/43370122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileFormatDTO getFileFormatDTO(FileFormat fileFormat, Session session) { FileFormatDTO dto = new FileFormatDTO(fileFormat, fileFormat.getName(), fileFormat.getDescription(), fileFormat.getMimeType(), fileFormat.getExtensions().substring(1)); // remove the leading // ';' return dto; } COM: <s> get a file format dto for the specified file format </s>
funcom_train/28178388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int currentSegment(float[] coords) { if (index >= poly.npoints) { return SEG_CLOSE; } coords[0] = (float) poly.xpoints[index]; coords[1] = (float) poly.ypoints[index]; if (transform != null) { transform.transform(coords, 0, coords, 0, 1); } return (index == 0 ? SEG_MOVETO : SEG_LINETO); } COM: <s> returns the coordinates and type of the current path segment in </s>
funcom_train/14658824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JList getAgenList() { if (agenList == null) { agenList = new JList(); agenList .addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged( javax.swing.event.ListSelectionEvent e) { agentSelectded(); // TODO Auto-generated Event // stub valueChanged() } }); } return agenList; } COM: <s> this method initializes agen list </s>
funcom_train/31651586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setGroupsParse( String groupsNameList ) { SM.debug("Parsing and adding groupslist='" + groupsNameList + "'"); String[] members = groupsNameList.split(","); clearGroups(); for( int i=0; i<members.length; i++ ) { addGroup( members[i].trim() ); } } COM: <s> parse groups name list and set the group memebership of the user </s>
funcom_train/2890818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getCurrentWord(int pos, String source) { BreakIterator boundary = BreakIterator.getWordInstance(); boundary.setText(source); end = boundary.following(pos-1); start = boundary.previous(); end = pos; // fine-tune word end return source.substring(start, end); } COM: <s> get word at a position such as at a caret </s>
funcom_train/3908026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateRuleMenuItem_actionPerformed() { currentSchematronTreeNode = currentSelectedTreeNode; currentSTNParent = currentSelectedTreeNodeParent; AddAssertionDialog aaf = new AddAssertionDialog(parentFrame, null, this, "assert", nsprefix); aaf.pack(); aaf.show(); } COM: <s> generate a new rule via a wizard program by rong pan </s>
funcom_train/3455373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTypeText() { switch(type) { case (PeriodInTime.TYPE_ACTION): return "Action"; case (PeriodInTime.TYPE_PHASE): return "Phase"; case (PeriodInTime.TYPE_PROJECT): return "Project"; case (PeriodInTime.TYPE_MILESTONE): return "Milestone"; } return null; } COM: <s> returns the human readable type of this period </s>
funcom_train/28405209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireTkResumeEvent(TkResumeEvent resumeEvent) { EventListener[] listeners = list.getListeners(CommandTaskLI.class); // Process the listeners last to first, notifying if (listeners != null) { for (int i = listeners.length - 1; i >= 0; i--) { ((CommandTaskLI) listeners[i]).taskResumed(resumeEvent); } } } COM: <s> fire a task resume event </s>
funcom_train/9892616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCGHSpecies(int species){ if (species == TMEV.CGH_SPECIES_HS){ CGH_SPECIES = TMEV.CGH_SPECIES_HS; } else if (species == TMEV.CGH_SPECIES_MM){ CGH_SPECIES = TMEV.CGH_SPECIES_MM; } else { CGH_SPECIES = TMEV.CGH_SPECIES_Undef; } } COM: <s> setter for cgh data </s>
funcom_train/32304690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Hashtable buildGraph(CallGraph cg) { Hashtable ht = new Hashtable(); for (Object mO : callableMethods) { HMethod m = (HMethod) mO; HMethod[] callees = cg.calls(m); for (int i = 0; i < callees.length; i++) { if (!ht.containsKey(callees[i])) ht.put(callees[i], new WorkSet()); ((WorkSet)ht.get(callees[i])).add(m); } } return ht; } COM: <s> builds the dual of the call graph using the </s>
funcom_train/7780760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadFriends(boolean includeFriendOf, ArrayList<LJFriendChange> change, LJProgressCallback ph) throws IOException, LJException { LJRawResult data = getProtocol().getFriends(includeFriendOf, ph); _friends.load(data, change, ph); } COM: <s> loads friend list from server </s>
funcom_train/2546660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected KeyHandler getCommonKeyHandler() { if (sharedKeyHandler == null) { sharedKeyHandler = new KeyHandler(); // Add key and action pairs to sharedKeyHandler sharedKeyHandler.put(KeyStroke.getPressed(SWT.DEL, 127, 0), getActionRegistry().getAction(ActionFactory.DELETE.getId())); } return sharedKeyHandler; } COM: <s> returns the key handler with common bindings for both the outline and </s>
funcom_train/7295386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(CharacterIterator newText) { // Test text to see if we need to wrap it in a SafeCharIterator: int end = newText.getEndIndex(); newText.setIndex(end); if (newText.getIndex() != end) { // failed - wrap in correct implementation text = new SafeCharIterator(newText); } else { text = newText; } text.first(); } COM: <s> set the iterator to analyze a new piece of text </s>
funcom_train/2904400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(XMLTag spec){ if(spec.tag.compareTo("header")==0){ if(spec.value != null){ header = spec.value.toString(); } else{ header = getClass().getName(); } } else if(spec.tag.compareTo("message")==0){ if(spec.value != null){ setMessage(spec.value.toString()); } else{ setMessage("Unknown or undefined error"); } } else if(spec.tag.compareTo("stack")==0){ if(spec.value != null){ nTrace = toStringArray(spec.value.toString()); } } } COM: <s> initialize error with a single property tag </s>
funcom_train/279672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGlobalActions(IMenuManager menuManager) { menuManager.insertAfter("additions-end", new Separator("ui-actions")); //$NON-NLS-1$ //$NON-NLS-2$ menuManager.insertAfter("ui-actions", showPropertiesViewAction); //$NON-NLS-1$ refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); menuManager.insertAfter("ui-actions", refreshViewerAction); //$NON-NLS-1$ super.addGlobalActions(menuManager); } COM: <s> this inserts global actions before the additions end separator </s>
funcom_train/33264269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUnarmedImage( Image unarmedImage ) { synchronized(getTreeLock()) { if ( this.unarmedImage != unarmedImage ) { this.unarmedImage = unarmedImage; if ( getMouseState() == UNARMED ) { setImage( unarmedImage ); } else if ( unarmedImage != null ) { prepareImage( unarmedImage, this ); } } } } COM: <s> sets the unarmed image variable </s>
funcom_train/31016691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "[TreeAndAnchor tree= " + this.elementaryTreeFile + "\n" + "\t coanchorString= " + this.coAnchorsString + "\n" + "\t coanchors= " + this.coAnchors + "\n" + "\t equations= " + this.equations + "]\n"; } COM: <s> return a string representation of this code tree and anchor code </s>
funcom_train/16676070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getLabelMonth() { if (labelMonth == null) { labelMonth = new JLabel(); labelMonth.setName("JLabelMonth"); labelMonth.setText(""); labelMonth.setHorizontalTextPosition(SwingConstants.CENTER); labelMonth.setHorizontalAlignment(SwingConstants.CENTER); labelMonth.setFont(defaultFont); } return labelMonth; } COM: <s> return the label </s>
funcom_train/13726748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long timeDifference(final int startIndex, final int stopIndex) { if (startIndex > stopIndex) { throw new IllegalArgumentException("The start index must not be greater than the stop index"); } long result = 0; for (int i = startIndex; i < stopIndex; i++) { result += getMark(i).getMilliseconds(); } return result; } COM: <s> adds up the mark times from one index to another </s>
funcom_train/41017841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { final BundleContext bundleContext = getBundleContext(); final FrameworkMBean frameworkMBean = new FrameworkMBeanImpl( bundleContext); ObjectNameFactoryHelper objectNameFactoryHelper = new ObjectNameFactoryHelper( bundleContext); frameworkMBeanObjectName = objectNameFactoryHelper.getObjectName( bundleContext, BundleContext.class); registerMBeanService(FrameworkMBean.class, frameworkMBeanObjectName, frameworkMBean); } COM: <s> registers bundle context as mbean </s>
funcom_train/16783815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createRecipeElement(String name, RecipeType type) { if (xmlExists()) { xmlFile.setRootElement(new Element(RECIPE).setAttribute(NAME, name).setAttribute(TYPE, type.name())); xmlRoot = xmlFile.getRootElement(); } } COM: <s> creates the root element for the xml file </s>
funcom_train/3598147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLessThan() { try { List results = engine.search(nom, "($w word):end($w)<'1.7'"); results.remove(0); // remove list of vars Collections.sort(results, new SearchResultIDComparator()); assertTrue(results.size()==4); NOMElement r1 = (NOMElement)((List)results.get(3)).get(0); assertTrue(r1.getID().equals("w_4")); } catch (Throwable ex) { ex.printStackTrace(); fail("LessThan test failed!"); } } COM: <s> check is correct and the opposite of there should be </s>
funcom_train/9237657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String doSubstitution(final String target, final Object ... args) { final StringBuilder res = new StringBuilder(target); doConfigSubstitutions(res); doServerSubstitutions(res, args); doComponentSubstitutions(res, args); doWordSubstitutions(res, args); return res.toString(); } COM: <s> performs all applicable substitutions on the specified string with the </s>
funcom_train/10590508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParsedURLData parseURL(ParsedURL base, String uri) { StringBuffer newURI = new StringBuffer("context://"); newURI.append(base.getPath()); if (!newURI.toString().endsWith("/")) { newURI.append("/"); } newURI.append(uri.substring("context:".length())); return this.parseURL(newURI.toString()); } COM: <s> the build the relative url </s>
funcom_train/45246120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldGamaJC69() { if (jNumberFloatFieldGamaJC69 == null) { jNumberFloatFieldGamaJC69 = new JNumberFloatField(); jNumberFloatFieldGamaJC69.setLocation(new Point(345, 279)); jNumberFloatFieldGamaJC69.setSize(new Dimension(65, 20)); } return jNumberFloatFieldGamaJC69; } COM: <s> this method initializes j number float field gama jc69 </s>
funcom_train/51344219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long rangeCount(final byte[] fromKey, final byte[] toKey) { final LongAggregator handler = new LongAggregator(); final RangeCountProcedure proc = new RangeCountProcedure( false/* exact */, false/* deleted */, fromKey, toKey); submit(fromKey, toKey, proc, handler); return handler.getResult(); } COM: <s> returns the sum of the range count for each index partition spanned by </s>
funcom_train/34619812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean deselectChildren(GridItem item) { boolean flag = false; GridItem[] kids = item.getItems(); for (int i = 0; i < kids.length; i++) { if (getParent().isSelected(kids[i])) { flag = true; } getParent().deselect(getParent().indexOf(kids[i])); if (deselectChildren(kids[i])) { flag = true; } } return flag; } COM: <s> deselects the given items children recursively </s>
funcom_train/15908184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPenWindows(boolean val) { if (!isPenWindowsSupported()) return; if (!isOpen()) penWindows = val; else { l = JWintab.WTGet(HCTX); if (val) l[0] |= (OPT_PEN_WINDOWS | OPT_SYSTEM); else l[0] &= ~OPT_PEN_WINDOWS; if (JWintab.WTSet(HCTX, getContextName(), l)) penWindows = val; } if (penWindows && !systemCursor) systemCursor = true; } COM: <s> specifies whether this context must be a pen windows context </s>
funcom_train/1539498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public C get(int index) { if ( coeffCache == null ) { return generate( index ); } Integer i = index; C c = coeffCache.get( i ); if ( c != null ) { return c; } c = generate( index ); coeffCache.put( i, c ); return c; } COM: <s> get cached coefficient or generate coefficient </s>
funcom_train/26489290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String decrypt(String cipherString) { // Decoding. this.cipher = decode(cipherString); // Decrypting byte[] decryptedStringBytes = new byte[32]; for (int i=0; i<numBlock; i++) pub.decrypt(cipher,i*cbs, decryptedStringBytes,i*pbs); //pri.decrypt(cipher,i*cbs, decryptedStringBytes,i*pbs); return new String(decryptedStringBytes); } COM: <s> decrypt a cipher that has been encrypted with the triple des algorithm </s>
funcom_train/36851807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeZoned(double value, int integerDigits, int fractionalDigits) throws IOException { value *= Math.pow(10, fractionalDigits); writeZoned(Util.format(value, 0, '.', true), integerDigits + fractionalDigits); } COM: <s> writes a tt double tt in zoned format </s>
funcom_train/50569255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent event) { Object src = event.getSource(); if (src == backButton) { Controller.getDefault().back(); } else if (src == nextButton) { Controller.getDefault().next(); } else if (src == exitButton) { Controller.getDefault().stop(); } } COM: <s> invoked when a button is pressed </s>
funcom_train/33264416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setShadowYOffset( int shadowYOffset ) { super.setShadowYOffset(shadowYOffset); if ( unarmedBorder != null ) { unarmedBorder.setShadowYOffset(shadowYOffset); } if ( armedBorder != null ) { armedBorder.setShadowYOffset(shadowYOffset); } if ( overBorder != null ) { overBorder.setShadowYOffset(shadowYOffset); } } COM: <s> sets the y offset of the border shadow </s>
funcom_train/10862040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Token token, List<String> suggestions) { LinkedHashMap<String, Integer> map = this.suggestions.get(token); if (map == null ) { map = new LinkedHashMap<String, Integer>(); this.suggestions.put(token, map); } for (String suggestion : suggestions) { map.put(suggestion, NO_FREQUENCY_INFO); } } COM: <s> adds a whole bunch of suggestions and does not worry about frequency </s>
funcom_train/22965566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int readBlock() { blockSize = read(); int n = 0; if (blockSize > 0) { try { int count = 0; while (n < blockSize) { count = in.read(block, n, blockSize - n); if (count == -1) break; n += count; } } catch (IOException e) { log.warn("readBlock - exception", e); } if (n < blockSize) { status = STATUS_FORMAT_ERROR; } } return n; } COM: <s> reads next variable length block from input </s>
funcom_train/13914097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetProtocol() { System.out.println("getProtocol"); ProxymaFacade proxyma = new ProxymaFacade(); ProxymaContext context = proxyma.getContextByName("default"); ProxymaServletRequest instance = new ProxymaServletRequest(request, context); String expResult = request.getProtocol(); String result = instance.getProtocol(); assertEquals(expResult, result); } COM: <s> test of get protocol method of class proxyma servlet request </s>
funcom_train/8568412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List extractExcessAlleles(Collection alleles, long threshold) { List result = new ArrayList(); Iterator iter = alleles.iterator(); while (iter.hasNext()) { Allele allele = (Allele) iter.next(); if (allele.getInnovationId().longValue() > threshold) { iter.remove(); result.add(allele); } } return result; } COM: <s> returns excess alleles defined as those alleles whose innovation id is </s>
funcom_train/44621764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean shouldDocumentModel(DocEnv currentDocEnv, ClassSymbol sym) { return // FIXME - do we need the line below - what does it guard against? //(currentDocEnv.docClasses || currentDocEnv.getClassDoc(sym).tree != null) && currentDocEnv.isVisible(sym); } COM: <s> this is used in place of doc env </s>
funcom_train/785397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPreviousSiblingRow(int node) { int p = getParent(node); if ( p < 0 ) return -1; int[] links = (int[])m_links.get(p, OUTLINKS); int idx = m_links.getInt(node, CHILDINDEX); return ( idx<=0 ? -1 : getTargetNode(links[idx-1])); } COM: <s> get the node id of the previous sibling of the given node id </s>
funcom_train/43244882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCurrentConnections() { System.out.println("getCurrentConnections"); ServerStatusObject instance = new ServerStatusObject(); int expResult = 0; int result = instance.getCurrentConnections(); 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 current connections method of class org </s>
funcom_train/28750046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProgramcode(Long newVal) { if ((newVal != null && this.programcode != null && (newVal.compareTo(this.programcode) == 0)) || (newVal == null && this.programcode == null && programcode_is_initialized)) { return; } this.programcode = newVal; programcode_is_modified = true; programcode_is_initialized = true; } COM: <s> setter method for programcode </s>
funcom_train/777113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String agentLocalName( String agentName ) { // there should be a JADE-supported way of extracting the local name int atPos = agentName.lastIndexOf('@'); String aName = agentName; if( -1 != atPos ) { aName = agentName.substring(0, atPos); } return aName; } COM: <s> return local name for given agent name </s>
funcom_train/40618937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDirectoryRecursive(String dir) throws IOException { for (File f : listFiles(dir)) { if (f.isDirectory()) { removeDirectoryRecursive(dir + "/" + f.getName()); } else { delete(dir + "/" + f.getName()); } } removeDirectory(dir); } COM: <s> remove all files and directory in a directory and then delete the </s>
funcom_train/12835818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void whileTrue(Collection collection, UnaryFunction f){ boolean finished = false; final Iterator iter = collection.iterator(); while(iter.hasNext() && !finished){ Boolean b = (Boolean)f.execute(iter.next()); finished = b.booleanValue(); } } COM: <s> iterates through the collection applying a function f to </s>
funcom_train/19456838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeFileEntry(byte[] fileEntry) { if (fileEntry.length != FILE_DESCRIPTIVE_ENTRY_LENGTH) { throw new IllegalArgumentException(textBundle. format("DosFileEntry.DosFileEntryLengthError", //$NON-NLS-1$ FILE_DESCRIPTIVE_ENTRY_LENGTH)); } byte[] sectorData = disk.readSector(track, sector); System.arraycopy(fileEntry, 0, sectorData, offset, fileEntry.length); disk.writeSector(track, sector, sectorData); } COM: <s> write the file entry to the disk image </s>
funcom_train/18473171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onRow(String[] rowData) { // drillthrough soap result may return duplicate key values. // so only add unique key value to the list if (rowData.length != 0) { keysMap.put(rowData[0], null); } else { logger.warn("No row data available"); } } COM: <s> called after parsing each row data of the drillthrough soap result </s>
funcom_train/41369090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String sendMessageAndWaitForReply(String msg) throws IOException { _socketWriter.println(msg); String repliedMessage = ""; while (repliedMessage.indexOf("\\e") < 0) repliedMessage += _socketReader.readLine() + "\n"; repliedMessage = repliedMessage.substring(0,repliedMessage.length()-3); //System.out.println(repliedMessage); String displayString = repliedMessage.substring("print".length()+1); return displayString; } COM: <s> this is the function that needs to be called from the gui </s>
funcom_train/25331959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAndSetLastCommonAncestor() { DAHomologyRelationship instance = new DAHomologyRelationship(); assertTrue(instance.getLastCommonAncestor().isEmpty()); String expResult = "bob"; instance.setLastCommonAncestor(expResult); String result = instance.getLastCommonAncestor(); assertEquals(expResult, result); } COM: <s> test of get last common ancestor method of class dahomology relationship </s>
funcom_train/2993970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveAs(){ if(fileChooser == null) fileChooser = (EntFileChooser)Globals.getWindow("Choose File"); fileChooser.setName(""); fileChooser.setDialogTitle(Globals.getMenuLabel("saveas",Globals.WINDOW_BUNDLE)); //make sure we are the focus of the dialogs attention so it's call backs //come to us fileChooser.setDisplayer(this); //show the save dialog fileChooser.showSaveDialog(); } COM: <s> envokes the saveas dialog to save this panes contents to disk </s>
funcom_train/22047609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet executeQuery(String query) throws SQLException { boolean b = false; ResultSet r = null; SQLConnection s = getNextAvailableConnection(); b = s.executeQuery(query); if (b) { r = s.getResultSet(); } else { r = null; } s.setRunningSQL(false); return r; } COM: <s> executes a query and returns true if records were retrieved </s>
funcom_train/14443308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StringBuffer removeCommasAtEnd(StringBuffer sql) { int i=sql.length()-3; while(i>0 && (sql.charAt(i)==' ' || sql.charAt(i)==',')) i--; sql = sql.replace(i+1,sql.length()-2," "); return sql; } COM: <s> remove symbols at the end of the script </s>
funcom_train/7970299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSyncLinkToElementPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Link_syncLinkToElement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Link_syncLinkToElement_feature", "_UI_Link_type"), VoidstarPackage.Literals.LINK__SYNC_LINK_TO_ELEMENT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the sync link to element feature </s>
funcom_train/19777555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDistanceKmToPath(Position p1, Position p2) { double d = radiusEarthKm * Math.asin(Math.sin(getDistanceToKm(p1) / radiusEarthKm) * Math.sin(Math.toRadians(getBearingDegrees(p1) - p1.getBearingDegrees(p2)))); return Math.abs(d); } COM: <s> calculates the distance of a point to the great circle path between p1 </s>