__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/342677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteTemplate(int row){ ArrayList<ClickTemplate> clickTempl=new ArrayList<ClickTemplate>(); ArrayList<Boolean> setVisible= new ArrayList<Boolean>(); for (int i=0; i<clickSpectrumTemplateParams.clickTemplateArray.size();i++){ if (i!= row){ clickTempl.add(clickSpectrumTemplateParams.clickTemplateArray.get(i)); setVisible.add(clickSpectrumTemplateParams.clickTempVisible.get(i)); } } clickSpectrumTemplateParams.clickTemplateArray=clickTempl; clickSpectrumTemplateParams.clickTempVisible=setVisible; } COM: <s> deletes template from memory </s>
funcom_train/28929082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(MouseEvent event) { super.mousePressed(event); JGraph graph = getGraphForEvent(event); if (graph != null) { PortView tmp = graph.getPortViewAt(event.getX(), event.getY()); if (graph.getModel().acceptsSource(previewView.getCell(), (tmp != null) ? tmp.getCell() : null)) { start = tmp; if (start != null) startPoint = graph.fromScreen(graph.snap(start .getLocation())); } } } COM: <s> extends the parents implementation to find the port view at the mouse </s>
funcom_train/49404447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getCumulativeProbability(final double v) { double count = 0; double total = 0; for (final Bin bin : values()) { final double binValue = bin.getIdValue(); if (binValue <= v) count += bin.getValue(); total += bin.getValue(); } return count / total; } COM: <s> returns the cumulative probability of observing a value v when sampling the </s>
funcom_train/37648371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tableChanged(TableModelEvent evt) { if (evt.getSource() == dmRuleSets) { if (evt.getType() == TableModelEvent.UPDATE) { if (ruleSet[evt.getFirstRow()].include()) { tableRules.tableChanged( new TableModelEvent( dmRules, 0, dmRules.getRowCount()-1, 0)); } } } } COM: <s> processes table changed event from child code jtable code control </s>
funcom_train/44771824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dump() { log.info("Number of open files: " + openHandles.size()); Iterator iter = openHandles.keySet().iterator(); while (iter.hasNext()) { File file = (File) iter.next(); Handle handle = (Handle) openHandles.get(file); handle.dump(); } } COM: <s> dumps the contents of this monitor </s>
funcom_train/8469730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getPrimitive(int index) { if (index < 0 || index >= maxLength) { throw new ArrayIndexOutOfBoundsException( "invalid index: " + index); } int pos = Arrays.binarySearch(indices, index); double value = (pos >= 0) ? values[pos] : 0; return value; } COM: <s> retrieves the value at specified index or 0 if no value had been </s>
funcom_train/19279757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLeftSwitchOn(boolean value) { Icon icon = switchOffImage; String tooltip = getLocalizedMessage("leftSwitchStatusLabel.tooltip.off");//$NON-NLS-1$ if (value == true) { icon = switchOnImage; tooltip = getLocalizedMessage("leftSwitchStatusLabel.tooltip.on");//$NON-NLS-1$ } leftSwitchStatusLabel.setToolTipText(tooltip); leftSwitchStatusLabel.setIcon(icon); } COM: <s> sets the left switch status </s>
funcom_train/16791049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildEntry(String labelKey, String value, PrintWriter writer) { writer.printf("<p class=\"entry\"><span class=\"label\">%s</span><span class=\"value\">%s</span></p>\n", this.resources.getString(labelKey), value); } COM: <s> display a simple string entry </s>
funcom_train/10810221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFactory() throws Exception { SOAPBody soapBody = soapEnvelope.getBody(); OMFactory factory = soapBody.getOMFactory(); OMSourcedElement omse = factory.createOMElement(bads1, localName, ns); soapBody.addChild(omse); OMNode firstChild = soapBody.getFirstOMChild(); assertTrue("Expected OMSourcedElement child", firstChild instanceof OMSourcedElement); } COM: <s> validates creation and insertion of omsourced element </s>
funcom_train/25032112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performHierarchicalMoveFromTo(AttributeList identifier,String retrieveAE,String moveDestination) throws IOException, DicomException, DicomNetworkException { new MoveSOPClassSCU(hostname,port,retrieveAE,callingAETitle,moveDestination,getMoveSOPClassUID(),identifier,debugLevel); } COM: <s> p retrieve dicom object s from the specified location to the specified location </s>
funcom_train/41605766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void markAllInternalFrames(JModalInternalFrame ownerIFrame) { JInternalFrame[] frames = ownerIFrame.getDesktopPane().getAllFrames(); for (int i = 0; i < frames.length; i++) { if (!this.equals(frames[i]) && (frames[i] instanceof InputBlocker)) { addAdditionalModalToComponent((InputBlocker) frames[i]); } } } COM: <s> p iterate all available internal frames </s>
funcom_train/26633502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unpackArguments(){ // get the list with the consumers Object[] allArguments = getArguments(); queryMOA = ((Boolean)allArguments[0]).booleanValue(); Vector v = (Vector) allArguments[1]; allConsumers = new ConsumerAttributes[v.size()]; v.copyInto(allConsumers); priceData = (Vector) allArguments[2]; simulationStep = (Integer)allArguments[3]; }// END of unpackArguments() COM: <s> unpack the arguments wsa receives when is born </s>
funcom_train/22497098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadSlide(int slideNo) { if (slideNo < slides.size() && slideNo >= 0) { currentSlide = slideNo; if (currentSlideImage != null) { currentSlideImage.dispose(); } currentSlideImage = new Image(getDisplay(), slides.get(slideNo)); width = slidePanel.getSize().x; height = (int) (((double) width / currentSlideImage.getBounds().width) * currentSlideImage .getBounds().height); recordScreen.doResize(); slidePanel.redraw(); updateButtons(); } } COM: <s> this method loads the given slide index into the slide composite </s>
funcom_train/2036282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createFields() { FileUploadField fileUploadField = new FileUploadField(); fileUploadField.setName("file"); fileUploadField.setAllowBlank(false); fileUploadField.setFieldLabel("File"); fileUploadField.setStyleAttribute("overflow", "hidden"); form.add(fileUploadField); } COM: <s> creates the fields </s>
funcom_train/4124471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element updateNation(Element element) { Game game = getFreeColClient().getGame(); Player player = (Player) game.getFreeColGameObject(element.getAttribute("player")); Nation nation = Reformation.getSpecification().getNation(element.getAttribute("value")); player.setNation(nation); getFreeColClient().getCanvas().getStartGamePanel().refreshPlayersTable(); return null; } COM: <s> handles an update nation message </s>
funcom_train/39123993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AudioReader createAudioReader() throws IOException { File clipFile = new File(audioDir, audioFileName); VanillaRandomAccessFile rafG = new VanillaRandomAccessFile( new RandomAccessFile(clipFile, "r")); AudioReader reader=new AudioReader(rafG,FrinikaConfig.sampleRate); reader.setBoundsInMicros(envelope.tOn, envelope.tOff); return reader; } COM: <s> a non realtime reader for a raw view at the data </s>
funcom_train/7991557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toTerminal(){ for ( int i = 0; i<1000; i++){ for ( int j = 0; j<1000; j++){ if(a[i][j].cost > maxCost){ System.out.print( "W"); } else if(a[i][j].previous != null){ System.out.print( "X"); } else if(a[i][j].opened){ System.out.print( "O"); } else if(a[i][j].closed){ System.out.print( "C"); } else{ System.out.print(" " );//a[i][j].G); } } System.out.println(); } } COM: <s> this is for debug only </s>
funcom_train/35693938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getSpecifiedPopupDateFormat() { if (_popupDateFormat != null) { return _popupDateFormat; } ValueBinding vb = getValueBinding("popupDateFormat"); if (vb != null) { return (String) vb.getValue(getFacesContext()); } return null; } COM: <s> if the popup date format was specified then return that but not any </s>
funcom_train/24916615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGUIDValue(final GUID value) { this.containerType.assertConstraints(this.name, value.getBytes(), TYPE_GUID, this.streamNumber, this.languageIndex); this.content = value.getBytes(); this.descriptorType = TYPE_GUID; } COM: <s> sets the value of the metadata descriptor </s>
funcom_train/7971891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VoteBoxEvent getStatus() { VoteBoxEvent event; int battery = BatteryStatus.read(); if (voting) event = new VoteBoxEvent(mySerial, label, "in-use", battery, protectedCount, publicCount); else event = new VoteBoxEvent(mySerial, label, "ready", battery, protectedCount, publicCount); return event; } COM: <s> returns this booths status as a vote box event used for periodic </s>
funcom_train/31907710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireDOMSubtreeModifiedEvent() { AbstractDocument doc = getCurrentDocument(); if (doc.getEventsEnabled()) { DocumentEvent de = (DocumentEvent)doc; MutationEvent ev = (MutationEvent)de.createEvent("MutationEvents"); ev.initMutationEvent("DOMSubtreeModified", true, // canBubbleArg false, // cancelableArg null, // relatedNodeArg null, // prevValueArg null, // newValueArg null, // attrNameArg ev.MODIFICATION); dispatchEvent(ev); } } COM: <s> fires a domsubtree modified event </s>
funcom_train/31626675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected WizStep retrieveWizStep(final ExpressoRequest request) throws DBException, ControllerException { int stepId = Integer.parseInt(request.getParameter(WizStep.FLD_ID)); WizStep step = new WizStep(); step.setId(stepId); step.retrieve(); return step; } COM: <s> helper function to retrieve the wiz step object from the controller </s>
funcom_train/13692906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateNodesWithProperties(String prop){ GuiNode tmpnode; for(Enumeration en = nodes.elements(); en.hasMoreElements();) { tmpnode = (GuiNode)en.nextElement(); if (tmpnode == null) continue; if (tmpnode.selectionMode) { tmpnode.properties = prop; } } setNodes(nodes); setLinks(links); repaint(); } COM: <s> updates nodes with the given properties </s>
funcom_train/23011338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openDataStorageSave(boolean isTempIndex){ bos = new ByteArrayOutputStream(); os = new DataOutputStream(bos); bosa = new ByteArrayOutputStream(); osa = new DataOutputStream(bosa); if(isTempIndex){ tempIndexS = new RecordsArray(null); tempIndexA = new RecordsArray(null); } } COM: <s> opens the datastorage to save </s>
funcom_train/26278864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open(String path, short destination) throws IOException, JSmbGetException, InterruptedException{ path = Util.formatSmbPath(path, true); pwd = browser.open(path, destination); if(!pwd.endsWith("/")){ pwd = pwd+"/"; } } COM: <s> opens a smb share </s>
funcom_train/21969129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void itemStateChanged(ItemEvent ie){ if ( _ckShowGrid == (Checkbox) ie.getSource()) _diagram.setGrid(_ckShowGrid.getState()); if ( _ckOffLine == (Checkbox) ie.getSource()){ _offLine = _ckOffLine.getState(); _historyNavigator.setEnabled(_offLine); if (_offLine){ _historyNavigator.setDataHistory(RuePanel.getDataManager(). getDataHistory()); } } } COM: <s> the show grid and offline handlers </s>
funcom_train/42036806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String unpack200 (String packedFile) throws IOException { if (packedFile == null) throw new IllegalArgumentException("packedFile cannot be null."); if (!packedFile.endsWith(".pack")) throw new IllegalArgumentException("packedFile must end with .pack: " + packedFile); String jarFile = unpack200(packedFile, substring(packedFile, 0, -5)); delete(packedFile); return jarFile; } COM: <s> decodes the specified file with pack200 </s>
funcom_train/2414740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTurnLeft() throws Exception { //cycle through all directions Direction dir = Direction.UP; dir = dir.turnLeft(); assertEquals(Direction.LEFT, dir); dir = dir.turnLeft(); assertEquals(Direction.DOWN, dir); dir = dir.turnLeft(); assertEquals(Direction.RIGHT, dir); dir = dir.turnLeft(); assertEquals(Direction.UP, dir); } COM: <s> tests to ensure turn left in all directions </s>
funcom_train/1071103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Label getNameLabel() { IFigure fig = this.getFigure(); if (fig instanceof IconFigure) { return (Label) fig; } else if (fig instanceof NodeFigure) { return ((NodeFigure) fig).getNameLabel(); } else { Debug.error(this, "UseCaseEditPart::getNameLabel() : Unknown Figure type.", channel); return null; } } COM: <s> returns the name label </s>
funcom_train/14660952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getFuncTypesComboBox() { if (funcTypesComboBox == null) { funcTypesComboBox = new JComboBox(); funcTypesComboBox.setPreferredSize(new Dimension(150, 25)); for (FunctionTypes t : FunctionTypes.values()) if (t.isUserSelectable()) funcTypesComboBox.addItem(t); } return funcTypesComboBox; } COM: <s> this method initializes func types combo box </s>
funcom_train/45499077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setSize(783, 457); this.setBackground(Color.white); this.setContentPane(getJContentPane()); this.setTitle("MultiThreading Demos"); this.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent e) { // TODO Auto-generated Event stub windowClosing() System.setOut(old_out); } }); old_out = System.out; new_out = new PrintStream(new myOutput(jTextArea)); System.setOut(new_out); } COM: <s> this method initializes this </s>
funcom_train/37200377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(ChangeEvent e) { JSlider source = (JSlider)e.getSource(); if (!source.getValueIsAdjusting()) { float alphaValue = (float)source.getValue(); maplayer.setAlphaValue(alphaValue/100); //System.out.println(alphaValue/100); } } COM: <s> listen to the slider </s>
funcom_train/3833012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String exportAsXML() { Debug.debugMethodBegin(); StringBuffer sb = new StringBuffer(1000); sb.append( "<GraphicFill>" ); sb.append( ((Marshallable)graphic).exportAsXML() ); sb.append( "</GraphicFill>" ); Debug.debugMethodEnd(); return sb.toString(); } COM: <s> exports the content of the graphic fill as xml formated string </s>
funcom_train/8534191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Resource getResource(ID resourceId, boolean create) { Resource resource = (Resource) fResources.get(resourceId); if (resource == null && create) { // This constructor will automatically "re-map" this newly created // resource to the given identifier. It is done in the // Resource#setValue(...) method called by the constructor. resource = new Resource(this, resourceId); } return resource; } COM: <s> returns a resource corresponding to the specified resource url </s>
funcom_train/24288600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCalendar(Calendar c, boolean update) { if (c == null) { setDate(null); } Calendar oldCalendar = calendar; calendar = c; if (update) { // Thanks to Jeff Ulmer for correcting a bug in the sequence :) yearChooser.setYear(c.get(Calendar.YEAR)); monthChooser.setMonth(c.get(Calendar.MONTH)); dayChooser.setDay(c.get(Calendar.DATE)); } firePropertyChange("calendar", oldCalendar, calendar); //$NON-NLS-1$ } COM: <s> sets the calendar attribute of the jcalendar object </s>
funcom_train/17359976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPath() { if (getParent() == null) { return "/" + getId(); } StringBuilder sb = new StringBuilder(); for (Node node = this; node != null; node = node.getParent()) { if (!"".equals(node.getId())) { sb.insert(0, "/" + node.getId()); } } return sb.toString(); } COM: <s> returns the path for the node </s>
funcom_train/3331063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIdentity(XMLFieldDescriptor fieldDesc) { if (fieldDesc != null) { if ( (! _attributes.contains(fieldDesc)) && (! _elements.contains(fieldDesc))) { addFieldDescriptor(fieldDesc); } } this._identity = fieldDesc; } //-- setIdentity COM: <s> sets the identity field descriptor if the field descriptor is </s>
funcom_train/24502156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean logout(String session) { try { this.soap.logout(session); // reset params to null this.all_users = null; this.all_users_ids = null; this.sugarURL = null; // reset current session this.session = null; _logger.info("logout from sugar application successful"); return true; } catch (Exception e) { _logger.error("logout from sugar application failed", e); throw new RuntimeException("logout from sugar application failed", e); } } COM: <s> logs out of the sugar user session </s>
funcom_train/1558880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTitleBar() { // The view is in the main window if(frame == null) { closeButton.setVisible(true); windowButton.setVisible(true); titleLabel.setVisible(true); unwindowButton.setVisible(false); if(titlePanel.getMouseListeners().length == 0) { titlePanel.addMouseListener(this); } } else { closeButton.setVisible(true); unwindowButton.setVisible(true); windowButton.setVisible(false); titleLabel.setVisible(false); titlePanel.removeMouseListener(this); } updateLabels(); } COM: <s> update all elements in the title bar </s>
funcom_train/8632756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStackTrace(PrintWriter output) { synchronized (output) { super.printStackTrace(output); Throwable throwable = getException(); if (throwable != null) { if (this.fileName != null) { output.print("Caused in "); //$NON-NLS-1$ output.print(this.fileName); output.print(" by: "); //$NON-NLS-1$ } else { output.print("Caused by: "); //$NON-NLS-1$ } throwable.printStackTrace(output); } } } COM: <s> prints this exceptions stack trace to the given print writer </s>
funcom_train/22606853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enableOrDisableDeckUI() { boolean sel = getSelectedDeck() != null; btnDelDeck.setEnabled(sel); mnuDelDeck.setEnabled(sel); btnEditDeck.setEnabled(sel); mnuEditDeck.setEnabled(sel); btnUseDeck.setEnabled(sel); mnuUseDeck.setEnabled(sel); } COM: <s> enables or disalbes ui components delete selected deck etc </s>
funcom_train/23678430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReferencedFKPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Column_referencedFK_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Column_referencedFK_feature", "_UI_Column_type"), MetadataPackage.Literals.COLUMN__REFERENCED_FK, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the referenced fk feature </s>
funcom_train/7661715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSet2() { try { CopyOnWriteArrayList c = new CopyOnWriteArrayList(); c.add("asdasd"); c.add("asdad"); c.set(100, "qwerty"); shouldThrow(); } catch(IndexOutOfBoundsException e){} } COM: <s> set throws an index out of bounds exception on a too high index </s>
funcom_train/12202896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean retainAll(Collection<?> c) { if (!(c instanceof JumboEnumSet)) return super.retainAll(c); JumboEnumSet es = (JumboEnumSet)c; if (es.elementType != elementType) { clear(); return true; } for (int i = 0; i < elements.length; i++) elements[i] &= es.elements[i]; return recalculateSize(); } COM: <s> retains only the elements in this set that are contained in the </s>
funcom_train/46736851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInsertDt(DateTimeModel insertDt) { if (Converter.isDifferent(this.insertDt, insertDt)) { DateTimeModel oldinsertDt= DateTimeModel.getNow(); oldinsertDt.copyAllFrom(this.insertDt); this.insertDt.copyAllFrom(insertDt); setModified("insertDt"); firePropertyChange(String.valueOf(TERMDETAILS_INSERTDT), oldinsertDt, insertDt); } } COM: <s> date the term detail was created </s>
funcom_train/40103767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EncryptedInteger add(EncryptedInteger other) throws PublicKeysNotEqualException { if(!this.pub.equals(other.getPublicKey())) { throw new PublicKeysNotEqualException("Cannot add integers encrypted with different public keys"); } EncryptedInteger tmp_int = new EncryptedInteger(this); BigInteger tmp = cipherval.multiply(other.getCipherVal()); tmp = tmp.mod(pub.getNSquared()); tmp_int.setCipherVal(tmp); return tmp_int; } COM: <s> adds one encrypted integer to this encrypted integer </s>
funcom_train/2587379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void endMultiplexMapping() throws ObjectDescriptionException { final MultiplexMappingEntry[] mappings = (MultiplexMappingEntry[]) this.multiplexEntries.toArray(new MultiplexMappingEntry[0]); final Class c = loadClass(this.baseClass); this.multiplexMappings.put(c, new MultiplexMappingDefinition(c, this.attributeName, mappings)); this.multiplexEntries = null; } COM: <s> finializes the multiplexer mapping </s>
funcom_train/12644556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getPreferredSize() { /* Avoid grabbing the lock if a reasonable cached size value * is available. */ Dimension dim = prefSize; if (dim != null && isValid()) { return dim; } synchronized (getTreeLock()) { prefSize = (layoutMgr != null) ? layoutMgr.preferredLayoutSize(this) : super.getPreferredSize(); return prefSize; } } COM: <s> returns the preferred size of this container </s>
funcom_train/44496522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Attributes fillCacheEntryFromRDB(TransactionID transactionID, CacheReference cacheReference) throws CacheEntryNotFoundException, LockNotGrantedException, SQLException { Attributes retAttributes = sqlManager.readFromRDB(transactionID, cacheReference); this.writeLock(transactionID, cacheReference); cache.setCacheEntryAttributes(transactionID, cacheReference, retAttributes); this.commit(transactionID, cacheReference); return retAttributes; } COM: <s> method fill cache entry from rdb </s>
funcom_train/22357186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(java.awt.event.ActionEvent p1) { if (p1.getSource() == checkOrderConfirm) { toggleOrderConfirmation(); } if (p1.getSource() == btnCreateTempUnit) { createTempUnit(); } if (p1.getSource() == btnDeleteTempUnit) { deleteTempUnit(); } } COM: <s> performs the button actions </s>
funcom_train/34655133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getNextUid() { Integer store = (Integer) locMan.loadObject("uidstore", new Integer(0)); if (store == null || store.intValue() < 1000000) { store = new Integer(1000000); } store = new Integer(store.intValue() + 1); locMan.saveObject("uidstore", store); return store.intValue(); } COM: <s> returns the next uidnumber </s>
funcom_train/3415673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String replaceAll(String replacement) { reset(); boolean result = find(); if (result) { StringBuffer sb = new StringBuffer(); do { appendReplacement(sb, replacement); result = find(); } while (result); appendTail(sb); return sb.toString(); } return text.toString(); } COM: <s> replaces every subsequence of the input sequence that matches the </s>
funcom_train/25127363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(Shape shape, Graphics2D g) { Color _col = g.getColor(); Stroke _stroke = g.getStroke(); g.setColor(col); g.setStroke(stroke); g.draw(shape); g.setColor(_col); g.setStroke(_stroke); g.draw(shape); } COM: <s> utility to draw a shape with a halo </s>
funcom_train/25093387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextFieldCpuLoad(){ if(jTextFieldCpuLoad == null){ jTextFieldCpuLoad = new JTextField(); jTextFieldCpuLoad.setText("unknown"); jTextFieldCpuLoad.setToolTipText("CPU load"); jTextFieldCpuLoad.setHorizontalAlignment(JTextField.CENTER); jTextFieldCpuLoad.setEditable(false); // jTextFieldCpuLoad.setEnabled(false); } return jTextFieldCpuLoad; } COM: <s> this method initializes j text field cpu load </s>
funcom_train/10588079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getKey(String uri) { StringBuffer key = new StringBuffer(uri); for (int i = 0; i<entries.size(); i++) { Entry entry = (Entry) entries.get(i); key.append(':'); key.append(entry.role); key.append(':'); key.append(entry.source); } return HashUtil.hash(key); } COM: <s> generate a key for a given uri for this pipeline </s>
funcom_train/38518284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChapterRefWithTemplate( DocChapter ref, DocInfo info ) { if( ref == null ) return; String text = info.templateText(); if( text.length() > 0 ) addChapterRef( ref, true, text ); else addChapterRef( ref, true ); } COM: <s> add one reference to a chapter as specified in the doc info record </s>
funcom_train/11297623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isTernaryProtected(JexlNode node) { for (JexlNode walk = node.jjtGetParent(); walk != null; walk = walk.jjtGetParent()) { if (walk instanceof ASTTernaryNode) { return true; } else if (!(walk instanceof ASTReference || walk instanceof ASTArrayAccess)) { break; } } return false; } COM: <s> check if a null evaluated expression is protected by a ternary expression </s>
funcom_train/21969302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyExpander(DrawTree browser, TreeNode node){ Object item = node.getItem(); if(item==null)return; if((node.children == TreeNode.NOCHILD)&&(node.childinv !=TreeNode.NOCHILD)){ node.children = node.childinv; node.childinv = TreeNode.NOCHILD; for(int j = items.indexOf(item)+1;j<items.size();j++){ TreeNode child = (TreeNode)items.elementAt(j); TreeNode parent = getParent(child); if(child.level>node.level&&parent.children!=TreeNode.NOCHILD){ if(child.selected){ unselect(child); } }else{ browser.changeSize();break; } }browser.repaint(); } } COM: <s> handles expand notification </s>
funcom_train/8674816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createInternalSubset(final String content) { if (content == null) internalSubset = null; if ((content.length() > 0) && (content.indexOf("[") > 0)) { int firstIndex = content.indexOf("["); int lastIndex = content.lastIndexOf("]"); internalSubset = content.substring(firstIndex + 1, lastIndex); } // end if } // end createInternalSubset() COM: <s> patch by jarle h </s>
funcom_train/27823563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected OIModelEntity getEntity(Entity entity) throws KAONException { try { String entityURI=entity.getURI(); OIModelEntity result=m_objectManager.getOIModelEntity(m_modelID,entityURI); checkVersion(entity,result); return result; } catch (SQLException e) { throw new KAONException("SQL error",e); } } COM: <s> returns an entity bean for given oi model entity </s>
funcom_train/42670202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSync() { if (Sync == null) {//GEN-END:|152-getter|0|152-preInit // write pre-init user code here Sync = new Command("Sincronizar", Command.OK, 0);//GEN-LINE:|152-getter|1|152-postInit // write post-init user code here }//GEN-BEGIN:|152-getter|2| return Sync; } COM: <s> returns an initiliazed instance of sync component </s>
funcom_train/26492338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dumpSites(int pid, int depth) { // Get the sites Vector vSites = getAllSites(pid); // Write them! for (Enumeration eSites = vSites.elements(); eSites.hasMoreElements(); ) { ObjectSite currentSite = (ObjectSite)eSites.nextElement(); outputSite(currentSite, depth); } } COM: <s> dump the sites in a given cat </s>
funcom_train/19583689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearAllHighlightedHotSpotFrames() { for (IHotSpotFrame hotSpotFrame : highlightedFrames) { IBorder border = hotSpotFrame.getBorder(); border.setColor(new ColorRGBA(1f, 1f, 1f, 0.6f)); } highlightedFrames = new ArrayList<HotSpotFrame>(); } COM: <s> remove all the highlights </s>
funcom_train/1156756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndex() { if (isDirty) { ObservedResult result = ((MovingEditorKit) pane.getEditorKit()).getObserver().getResult(); assert (index - result.getInterval() >= 0); return index - result.getInterval(); } return index; } COM: <s> used to return a consistent index at this exact moment </s>
funcom_train/15694711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cancelSession() { if (tree.isSelectionEmpty()) { JOptionPane.showMessageDialog(null, "Nothing in the SessionTree has been selected."); } else if (!tree.getSelectionPath().getLastPathComponent().toString() .matches("Session [0-9]*")) { JOptionPane.showMessageDialog(null, "You selected something. It's not a running Session!"); } else endSession(selectedSessionNr); } COM: <s> cancels a session which has been selected in the session tree </s>
funcom_train/1561739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public GeoNumeric HyperGeometric(String label, NumberValue a, NumberValue b, NumberValue c, GeoBoolean isCumulative) { AlgoHyperGeometricBarChart algo = new AlgoHyperGeometricBarChart(cons, label, a, b, c, isCumulative); GeoNumeric num = algo.getSum(); return num; } COM: <s> hyper geometric bar chart with cumulative option </s>
funcom_train/40359614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAuthenticateConnectorNotFoundException() throws Exception { instantiator.addConnector(connectorName, new MockConnector(null, new AuthenticatingAuthenticationManager(), null, null)); AuthenticationResponse response = manager.authenticate("nonexistent", identity); assertNotNull(response); assertFalse(response.isValid()); assertNull(response.getData()); assertNull(response.getGroups()); } COM: <s> test authenticate connector not found exception </s>
funcom_train/19270109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TonePitch transpose(int semitoneSteps) { int ordinal = (ordinal() + semitoneSteps) % 12; if (ordinal < 0) { ordinal = ordinal + 12; } for (TonePitch pitch : values()) { if (pitch.ordinal() == ordinal) { return pitch; } } throw new IllegalCaseException(this.title + "+" + semitoneSteps); } COM: <s> this method transposes this </s>
funcom_train/35109066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeDefaultEventFilterPreferences(Preferences prefs) { prefs.setDefault(IJiveUIConstants.PREF_JAVA_APPLICATION_FILTERS, convertFilters(JAVA_APPLICATION_FILTERS)); prefs.setDefault(IJiveUIConstants.PREF_JAVA_APPLET_FILTERS, convertFilters(JAVA_APPLET_FILTERS)); prefs.setDefault(IJiveUIConstants.PREF_JUNIT_APPLICATION_FILTERS, convertFilters(JUNIT_APPLICATION_FILTERS)); } COM: <s> initializes the default event filter preferences </s>
funcom_train/7880655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void jeq(String bin) { // get operands int r1 = Integer.parseInt(bin.substring(8, 11), 2); int r2 = Integer.parseInt(bin.substring(11, 14), 2); // test condition if (twosCompliment(getBinReg(r1)) == twosCompliment(getBinReg(r2))) { regLC = effAdr(bin) - 1; } } COM: <s> description jump if equal br </s>
funcom_train/46766761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getConsolePanel() { if (consolePanel == null) { consolePanel = new JTabbedPane(); consolePanel.setBorder(new EtchedBorder()); consolePanel.addTab("Console", null, getJScrollPane(), null); consolePanel.addTab("Errors", null, getJScrollPane1(), null); consolePanel.addChangeListener(new PaneListener(this)); } return consolePanel; } COM: <s> this method initializes console panel </s>
funcom_train/36849107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void storeMoveData(final UnitDef unitDef) { final MoveData moveData = unitDef.getMoveData(); if (moveData != null) { final int key = moveData.getPathType(); final MoveData newMoveData = moveData; moveDefs.put(key, newMoveData); } } COM: <s> stores the move data of the given unit def </s>
funcom_train/34130062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed( ActionEvent e) { /*((Editor)parent.getCurrent()).paste(); ((Editor)parent.getCurrent()).setFocus();*/ if( view instanceof Editor) { Editor editor = (Editor)parent.getCurrent(); editor.paste(); editor.setFocus(); } else if( view instanceof PluginViewPanel) { PluginViewPanel pluginViewPanel = (PluginViewPanel)parent.getCurrent(); pluginViewPanel.paste(); pluginViewPanel.setFocus(); } } COM: <s> the implementation of the paste action </s>
funcom_train/3543321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void editorFilterUpdated(RowFilter filter) { if (isEnabled()) { if (filter != delegate) { delegate = filter; reportFilterUpdatedToObservers(); reportOnConsolidation = false; if (editor.isFocused()) { toBeConsolidated = true; } else { filtersHandler.consolidateFilterChanges(modelIndex); } } } } COM: <s> reports an update on the associated filter </s>
funcom_train/1648108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyFileToTemp(InputStream inputStream, long length) throws IOException { File tempFile = File.createTempFile("jar-", ".tmp"); FileOutputStream fileOutputStream = new FileOutputStream(tempFile); FileUtil.copy(inputStream, fileOutputStream, length); fileOutputStream.close(); tempFile.deleteOnExit(); tempJarFile = new JarFile(tempFile); } COM: <s> copies the contents of the input stream which are supposed to be the </s>
funcom_train/7427230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PNode removeChild(final int index) { /* * NOTE: This must be the only super.removeChild call that we make in * our entire implementation, because all PNode.removeChild methods are * implemented in terms of this one. Calling other variants of * super.removeChild will incorrectly invoke our overrides, resulting in * StackOverflowException. */ final PNode node = super.removeChild(index); removeProxyComponent(node); return node; } COM: <s> removes a node at a specified index </s>
funcom_train/2537975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float getHeightXYRelativeToParent() { Vector3D p = this.getHeightXYVectLocal(); Matrix m = new Matrix(this.peerComponent.getLocalMatrix()); m.removeTranslationFromMatrix(); p.transform(m); return p.length(); // Vector3D[] v = this.getVectorsRelativeToParent(); // float[] minMax = ToolsGeometry.getMinXYMaxXY(v); // return minMax[3] - minMax[1]; } COM: <s> gets the height xy relative to parent </s>
funcom_train/43887328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void populateData(int geomID, String wellKnownText) { LOGGER.finer("putting " + wellKnownText + " into gidMap"); gidMap.put(new Integer(geomID), wellKnownText); //we should probably change to objects, GID not necessarily an //int, and the getString will change to blob when we do WKB } COM: <s> stores the geometry information by geometry id so that it can be </s>
funcom_train/13563286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showInfo(){ for (Zone sink : zones) { // show currents work progress System.out.println("Zone: " + sink.name()); System.out.println("Working Population: " + sink.workingPopulation); System.out.println("Workplaces: " + sink.workplaces); System.out.println("Work trips: " + sink.workTripsPerDayByCar); System.out.println("Rel_ID: " + sink.rel_id); } } COM: <s> some information about zones in this computation </s>
funcom_train/4516600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor(final java.awt.Color color) { // Java 6 this.color = color; this.cycleColors[0] = color.darker(); this.cycleColors[1] = color.darker(); this.cycleColors[2] = color; this.cycleColors[3] = color; } COM: <s> set the color of the gradient by using the given color as </s>
funcom_train/28994019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { try { strYLabel = getParameter("YLabel"); if (strYLabel == null) strYLabel = "Value"; strXLabel = getParameter("XLabel"); if (strXLabel == null) strXLabel = "Items"; setvMax(300); initColors(); initValues(); initColNames(); return; } catch (Throwable t) { System.out.println("exception in Graph:init=" + t); } } COM: <s> this method starts when applet starts </s>
funcom_train/21643952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getEditUndoMenuItem() { if (editUndoMenuItem == null) { editUndoMenuItem = new JMenuItem(); editUndoMenuItem.setText("Undo"); editUndoMenuItem.setMnemonic('U'); editUndoMenuItem.setDisplayedMnemonicIndex(0); editUndoMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Z, InputEvent.CTRL_MASK)); editUndoMenuItem.addActionListener(eventHandler); } return editUndoMenuItem; } COM: <s> return the edit undo menu item </s>
funcom_train/22028646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getElement(int row, int col) { Object x = Array.newInstance(bases[col], sizes[col]); System.arraycopy(arrays[col], sizes[col]*row, x, 0, sizes[col]); return x; } COM: <s> get a element of the table </s>
funcom_train/35695164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void restoreChildrenState(FacesContext context) { if (getChildCount() == 0) return; Iterator kids = getChildren().iterator(); while (kids.hasNext()) { UIComponent kid = (UIComponent) kids.next(); restoreChildState(kid, context); } } COM: <s> p restore state information for all child components </s>
funcom_train/19879220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(getTexto(), null); jContentPane.add(getTexto(), null); jContentPane.add(getJButton(), null); jContentPane.add(getJButton1(), null); jContentPane.add(getJScrollPane(), null); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/6475693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element agentNumberLabel(Document readDoc, int x, int y) { double pointX = dimBoxWidth * x + dimBoxWidth / 2; double pointY = dimBoxHeight * y + dimBoxHeight / 2; Element rec = funcEllipse(readDoc, pointX, pointY, dimBoxWidth / 7, dimBoxHeight / 7, "fill:" + labelHeadColour + ";"); return rec; } COM: <s> create the label inside the head background for the number agent id </s>
funcom_train/38292380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List containerAgents(ContainerID cid) throws NotFoundException { List agents = new ArrayList(); AID[] allIds = platformAgents.keys(); for (int i = 0; i < allIds.length; ++i) { AID id = allIds[i]; AgentDescriptor ad = platformAgents.acquire(id); if (ad != null) { ContainerID cid1 = ad.getContainerID(); if (cid.equals(cid1)) { agents.add(id); } platformAgents.release(id); } } return agents; } COM: <s> return all agents living on a container </s>
funcom_train/7272516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getPreferredScrollableViewportSize() { int width = ClearableAutoCompleteTextField.this.getSize().width - 2; int rows = Math.min(getModel().getSize(), 8); int height = rows * getCellBounds(0, 0).height; return new Dimension(width, height); } COM: <s> sets the size according to the number of entries </s>
funcom_train/1807186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshButtonTexts() { feldLeeren.setText(GuiWindow.getGuiString("buttonClear")); labelSelect.setText(GuiWindow.getGuiString("labelElementSelection")); labelActions.setText(GuiWindow.getGuiString("labelActions")); labelResize.setText(GuiWindow.getGuiString("labelFieldSizeCreate")); } COM: <s> refreshes all the texts of the buttons and their labels </s>
funcom_train/46759576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FormRecordModel getFormRecord(final long formRecordId, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return ClinicalData.getFormRecord(formRecordId, call); }}; return (FormRecordModel) call(method, call); } COM: <s> get the results for the specific patient and tests in the test groups </s>
funcom_train/15548386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getRootDocumentTextField() { if (rootDocumentTextField == null) { rootDocumentTextField = new JTextField(); rootDocumentTextField.setFont(new Font("Dialog", Font.BOLD, 10)); rootDocumentTextField.setToolTipText("Select root document for file download request"); rootDocumentTextField.setBorder(BorderFactory.createLineBorder(Color.gray, 1)); } return rootDocumentTextField; } COM: <s> this method initializes root document text field </s>
funcom_train/37797218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Connection getMockConnection() throws Exception { Class.forName("net.sourceforge.sqlunit.test.mock.SQLUnitMockDriver"); Connection conn = DriverManager.getConnection( "jdbc:mock:net.sourceforge.sqlunit.test.mock.SQLUnitMockDatabase", "defaultuser", "defaultuser"); return conn; } COM: <s> acquires a mock connection </s>
funcom_train/19398584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_duplicateTransactionIdentifiers01() throws IOException { Journal journal = new Journal(getProperties()); final long startTime = journal.nextTimestamp(); Tx tx0 = new Tx(journal, startTime, false); try { // Try to create another transaction with the same identifier. new Tx(journal, startTime, false); fail("Expecting: " + IllegalStateException.class); } catch (IllegalStateException ex) { System.err.println("Ignoring expected exception: " + ex); } tx0.abort(); journal.closeAndDelete(); } COM: <s> test verifies that duplicate transaction identifiers are detected in the </s>
funcom_train/18486723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newProject(String name, String location) throws Exception { try { Object[] obj = Framework.getInstance().getFrameworkProxy() .newProject(location, name); if (obj != null) { outGlobalEvents.fireOutPin(new Object[] { new Integer(BuildapAPIConstants.PROJECT_OPENED), obj }); } } catch (Exception ex) { throw ex; } } COM: <s> create new vscb configuration </s>
funcom_train/12159029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pop(CompiledStyleSheet styleSheet) { if (styleSheet == null) { throw new IllegalArgumentException("styleSheet cannot be null"); } CompiledStyleSheet poppedStyleSheet = (CompiledStyleSheet) stack.pop(); if (poppedStyleSheet != styleSheet) { throw new IllegalStateException( "Popped style sheet " + poppedStyleSheet + " does not match expected style sheet " + styleSheet); } } COM: <s> pop the style sheet off the stack </s>
funcom_train/20748367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processCommand(String input) throws IOException { Logger.defaultLogger.log(Logger.DEBUG, "JepItemGUI.processExpression", "Processing "+input); String output = jepItem.processExpression(input); refreshSymbolTable(); setNeedsCommit(true); myOutputWriter.write(output); myOutputWriter.write("\n"); } COM: <s> process a command provided by the jpe prompt </s>
funcom_train/46640126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean validateFields() { // if our base validation fails then just return false if (!super.validateFields()) { return false; } // otherwise check this screen specific set of fields else { // make sure we have all fields populated if (getStartDate() == null) { alertError("Start Date is required!"); return false; } if (getEndDate() == null) { alertError("End Date is required!"); return false; } } return true; } COM: <s> validates that all required screen fields are populated </s>
funcom_train/124198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if (jPanel == null) { jPanel = new JPanel(); jPanel.setLayout(new BorderLayout()); jPanel.add(getJPanel1(), java.awt.BorderLayout.SOUTH); jPanel.add(getJScrollPane(), java.awt.BorderLayout.CENTER); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/30229510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Card getCardAt(int i) { if (i >= vCards.size()) return null; // ERROR: Implementing class must deal w/this Card returnMe = (Card)vCards.elementAt(i); // save ith element vCards.removeElementAt(i); // remove ith element from list return returnMe; // return ith element as requested. } COM: <s> mutator removes and returns card i from deck used in shuffle </s>
funcom_train/2616724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onMyExpenseListRemove() { if (expenseSelected != null) { myExpenseList.remove(expenseSelected); Expense ent = Roma.component(ExpenseRepository.class).load(expenseSelected.getEntity(), PersistenceAspect.FULL_MODE_LOADING, PersistenceAspect.STRATEGY_DETACHING); if (ent != null) { Roma.component(ExpenseRepository.class).delete(expenseSelected.getEntity()); } expenseSelected = null; Roma.fieldChanged(this, "myExpenseList"); } } COM: <s> method that removes an expense from the table showed </s>