__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10821119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFailureCompressionNotWorking() throws IOException { if (skip) return; long rawDataSize = writeRecords(10000, false, false, false); if (!compression.equalsIgnoreCase(Compression.Algorithm.NONE.getName())) { Assert.assertTrue(out.getPos() < rawDataSize); } closeOutput(); } COM: <s> verify that the compressed data size is less than raw data size </s>
funcom_train/50556109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showHTMLDocument(String s, String targetFrame) { if (s != null) { if (targetFrame == null) { targetFrame = viewer.name; } showDocument(new CalHistoryItem(null, targetFrame, null, null, null), s, false, HISTORY_NEW, 0); } } COM: <s> formats and displays the specified string as an html document in the named </s>
funcom_train/2804421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addMenuItems(JPopupMenu menu) { super.addMenuItems(menu); JMenuItem item = new JMenuItem(controller.getResourceString("SelectFilesMenuItem")); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { selectFilesCallback(); } }); menu.add(item); return true; } COM: <s> adds all the popup menu items that this object uses </s>
funcom_train/23011547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getFieldDouble(Record rec, int fieldIndex) { Object obj = getFieldValue(rec, fieldIndex); return MapUtils.toDouble(obj); // if(s == null) return 0d; // if( s instanceof Double) return ((Double)s).doubleValue(); // return Double.valueOf(s.toString()).doubleValue(); } COM: <s> reads the value of the fields data into a double value </s>
funcom_train/12565885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EnyarokRPZone getZone() { // Use onAdded()/onRemoved() to grab a reference to the zone and save // as a attribute. // During zone transfer zone is set to null for a short period of time // which causes lots of problems, so we use the old zone until the new // one is set. return lastZone; } COM: <s> get the zone this entity is in </s>
funcom_train/29830215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireOptionsReceived(InfoQuery iq, PubsubOptions options, String id) { for (Enumeration e = pubsubListeners.elements(); e.hasMoreElements(); ) { BSPubsubListener listener = (BSPubsubListener) e.nextElement(); listener.optionsReceived(iq, options, id); } } COM: <s> notifies pubsub listeners about result of options request </s>
funcom_train/47683391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Double getValueAsDouble(String p_path) { Field target; Double result = null; if ((target = getField(p_path)) != null) { result = target.getValueAsDouble(); } else { throw new IllegalArgumentException("The referenced field \"" + p_path + "\" does not exist."); } return result; } COM: <s> retrieves the value of the field instance as a double independent of the </s>
funcom_train/33942961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setArrowImage() { if (collapsed) { try { arrow.setImage(Activator.getImageDescriptor("/icons/expandbar/dropdownarrow.png").createImage()); } catch (Exception e) { Logger.logError(e, "Icon dropdownarrow.png not found"); } } else { try { arrow.setImage(Activator.getImageDescriptor("/icons/expandbar/dropuparrow.png").createImage()); } catch (Exception e) { Logger.logError(e, "Icon dropuparrow.png not found"); } } } COM: <s> set the arrow image to collapsed or uncollapsed depending on the state of </s>
funcom_train/25828619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateNewValueOfCurrentSimulationStep() { // check if the simulation must be stop forced (before all steps end)... if (envSim.isForceStopSimulation()) { System.out.println("Simulation stoped by: StopSimulationEvent!"); this.currentSimulationStep = this.totalSimulationSteps + 1; } else { this.currentSimulationStep++; } } // calculateNewValueOfCurrentSimulationStep COM: <s> finds out the next value of code current simulation step code </s>
funcom_train/39197475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(AjaxRequestTarget target) { Request request = RequestCycle.get().getRequest(); if (Boolean.parseBoolean(request.getRequestParameters().getParameterValue("hidden").toString())) { // Attention: don't use close() as this might result in an // endless AJAX request loop marker = null; latLng = null; } } COM: <s> update state from a request to an ajax target </s>
funcom_train/9236116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWordAtIndex(final int lineNumber, final int index) { if (lineNumber == -1) { return ""; } final int[] indexes = canvas.getSurroundingWordIndexes(getTextFromLine(lineNumber), index); return getTextFromLine(lineNumber, indexes[0], indexes[1]); } COM: <s> returns the surrouding word at the specified position </s>
funcom_train/22154990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getPageDimension() { Rectangle r = page.getMedia(); // if were landscape or seascape, then we swap the dimensions which // should fool existing code. int rot = page.getOrientation(); if(rot==90 || rot==270) return new Dimension(r.height-r.y,r.width-r.x); return new Dimension(r.width-r.x,r.height-r.y); } COM: <s> returns the pages dimensions in pixels </s>
funcom_train/17624340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() { for (int i = 0; i < maxX; i++) { System.arraycopy(bricks[i], 0, bricksBackup[i], 0, maxY); } listBackup.clear(); listBackup.addAll(list); } COM: <s> saves bricks copy </s>
funcom_train/2585378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRangeLowerBound() { DefaultStatisticalCategoryDataset d1 = new DefaultStatisticalCategoryDataset(); d1.add(1.0, 2.0, "R1", "C1"); assertEquals(1.0, d1.getRangeLowerBound(false), EPSILON); assertEquals(-1.0, d1.getRangeLowerBound(true), EPSILON); } COM: <s> some checks for the get range lower bound method </s>
funcom_train/22827257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeCopyDataStatement(Table sourceTable, Table targetTable, StringBuilder ddl) { LinkedHashMap<Column, Column> columnMap = getCopyDataColumnMapping(sourceTable, targetTable); writeCopyDataStatement(sourceTable, targetTable, columnMap, ddl); } COM: <s> writes a statement that copies the data from the source to the target </s>
funcom_train/3815182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayMap() { SwingUtilities.invokeLater(new Runnable() { public void run() { getContentPane().remove(imagePanel); getContentPane().add(mapPanel, BorderLayout.CENTER); speakButton.setEnabled(true); validate(); repaint(); } }); } COM: <s> replaces the splash s4 logo with the map </s>
funcom_train/10532500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CodeGenerator getGenerator() { if (_generator == null) { /* Locate the class that wraps the Velocity code generation process */ AnnotationProcessorEnvironment env = getAnnotationProcessorEnvironment(); try { _generator = new VelocityGenerator(env); } catch (Exception e) { throw new CodeGenerationException("Unable to create code generator", e); } } return _generator; } COM: <s> returns the code generator instance supporting this processor instantiating a new </s>
funcom_train/7505329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isQueryParameter(int parameterIndex, Class<?>[] parameterTypes, Annotation[][] parameterAnnotations) { return !isMaxResultsParameter(parameterIndex, parameterTypes, parameterAnnotations) && !isFirstResultParameter(parameterIndex, parameterTypes, parameterAnnotations); } COM: <s> check if a parameter is a parameter for the query </s>
funcom_train/5678507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doAction (String o) { if (o.equals("Ignore")) { S.addIgnored(S.wrongWord()); setVisible(false); } else if (o.equals("Learn")) { S.addPrivate(S.wrongWord()); setVisible(false); } else if (o.equals("Continue")) { setVisible(false); } else if (o.equals("Replace") || o.equals("Word")) { replace(); setVisible(false); } else if (o.equals("Suggest")) suggest(); else super.doAction(o); // handles "Close" } COM: <s> what to do with the mistake </s>
funcom_train/22573124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doNewTopic() { IDataModelObject context = getForumTopicManager().getContext(); if(context != null) { Dialog dialog = new NewForumTopicDialog(getSite().getShell(), context, getForumTopicManager()); dialog.open(); } } COM: <s> add a new forum topic </s>
funcom_train/11103808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onActivate() { if (expressions.length < 1) { return; } FacesContext context = FacesContext.getCurrentInstance(); Application application = context.getApplication(); ValueBinding vb = null; for (int i = 0; i < expressions.length; i++) { vb = application.createValueBinding(expressions[i]); vb.setValue(context, values[i]); values[i] = null; } } COM: <s> p restore the values specified by our configured expressions </s>
funcom_train/40554863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Resource addLinkedData(Resource resource) { // SINDICE String uri = SindiceApiManager.performTermSearch(new String[] { osName }, "AND", null); if (uri != null) { resource.addProperty(RDFS.seeAlso, uri); } return resource; } COM: <s> adds linked data </s>
funcom_train/43256798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public AbstractResultObject handleEvaluation(Document request) { // AbstractResultObject back = null; // //checks the type of the request // if // (request.getRootElement().getAttribute("type").getValue().equals("R-Command")) // { // AbstractEvaluation eval = EDATRequestParser.getRequests(request); // EDAT_R_Connector rCon = new EDAT_R_Connector(); // back = rCon.execCommand(eval.getRCode()); // } // return back; // } COM: <s> handles a given request </s>
funcom_train/18028978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCanonizeFill() { System.out.println("canonizeFill"); QDataSet ds = null; WritableDataSet expResult = null; WritableDataSet result = DataSetUtil.canonizeFill(ds); 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 canonize fill method of class data set util </s>
funcom_train/16796220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addValue(int column, double value) { if (column>=maxColumns) addColumns(); if (column<0 || column>=maxColumns) throw new IllegalArgumentException("Column out of range"); if (counter==0) throw new IllegalArgumentException("Counter==0"); if (columns[column]==null) { columns[column] = new double[maxRows]; if (headings[column]==null) headings[column] = "---"; if (column>lastColumn) lastColumn = column; } columns[column][counter-1] = value; } COM: <s> adds a value to the end of the given column </s>
funcom_train/3613281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreation() throws Exception { assertNotNull(this.l); assertEquals(0, this.l.getLineNumber()); assertTrue(this.l.hasNextLine()); try { this.l.getCurrentLine(); fail(); } catch (final NoSuchElementException ex) { // is expected } } COM: <s> tests creation of a new lookahead reader and reading of the first line </s>
funcom_train/39876550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAvailableRestoreSets(RestoreObserver observer) { int err = -1; RestoreObserverWrapper obsWrapper = new RestoreObserverWrapper(mContext, observer); try { err = mBinder.getAvailableRestoreSets(obsWrapper); } catch (RemoteException e) { Log.d(TAG, "Can't contact server to get available sets"); } return err; } COM: <s> ask the current transport what the available restore sets are </s>
funcom_train/3874298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doStartTag() { if(initialized == false) { scope = pageContext.getRequest(); br = (String) scope.getAttribute("blade_root"); manager = (ThemeManager) scope.getAttribute("blade_theme"); refreshContext(); initialized = true; if(id.length() == 0) { id = ((IDGenerator) scope.getAttribute("blade_id")).getId(); } } return EVAL_BODY_INCLUDE; } COM: <s> does basic tag initialization </s>
funcom_train/11687606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchOn() throws Exception { if (endpoint.getChildren() != null) { for (Endpoint e : endpoint.getChildren()) { if (e.getMetricsMBean() != null) { e.getMetricsMBean().switchOn(); } } } else { if (endpoint.getContext() != null) { endpoint.getContext().switchOn(); } } } COM: <s> switch on a leaf endpoint or all endpoints on a group from maintenence </s>
funcom_train/28473332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getMaxDistancePanel() { if (maxDistancePanel == null) { maxDistancePanel = new JPanel(); maxDistancePanel.setLayout(new FlowLayout(FlowLayout.LEFT)); maxDistancePanel.add(ignoreLabel1, null); maxDistancePanel.add(getMaxComparisonDistField(), null); maxDistancePanel.add(ignoreLabel2, null); maxDistancePanel.setAlignmentX(Component.LEFT_ALIGNMENT); } return maxDistancePanel; } COM: <s> this method initializes max distance panel </s>
funcom_train/16467419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RightClickAction parseRightClickAction() throws IOException { MapPositionImpl mapPosition = parseMapPosition(); short memoryId = input.readShort(); ObjectType objectType = ObjectType.valueOf(input.readShort()); QueueType queueType = QueueType.valueOf(input.readByte()); return new RightClickAction(sequence, frame, player, mapPosition, memoryId, objectType, queueType); } COM: <s> parses a right click action </s>
funcom_train/12551115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean nodeHighlighted(char c) { //Get the node's index int my_index = translateCharIndex(c); //If the node isn't activated, it is not highlighted if(!my_nodeset[my_index].isActivated()) return false; //Return the node's highlighting return my_nodeset[my_index].isHighlighted(); } COM: <s> function node highlighted </s>
funcom_train/31343417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object pObject) { boolean lEqualName = false; boolean lEqualLink = false; if (pObject instanceof IPersonalAttachment) { if (((IPersonalAttachment) pObject).getName() .equals(this.getName())) { lEqualName = true; } if (((IPersonalAttachment) pObject).getLink().equals(getLink())) { lEqualLink = true; } } if (lEqualName && lEqualLink) { return true; } return false; } COM: <s> compares the given object for equal name and url </s>
funcom_train/50846033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDOMSource() throws Exception { String expected = "<kid id='1'><stuff id='2'>Is fun</stuff></kid>"; JDBCSQLXML instance = new JDBCSQLXML(expected); DOMSource source = instance.getSource(DOMSource.class); JDBCSQLXML instance2 = new JDBCSQLXML(source); DOMSource source2 = instance2.getSource(DOMSource.class); this.assertXmlEquals(source, source2); } COM: <s> test of get source method of class org </s>
funcom_train/26245909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendUnitValue(StringBuffer buffer, int value, String unit) { if (value > 0) { if (buffer.length() > 0) { buffer.append(" "); } if (unit.length() > 2) { buffer.append(value).append(" ").append(unit); if (value > 1) { buffer.append("s"); } } else { // If using abbreviations for units, use simpler form. buffer.append(value).append(unit); } } } COM: <s> append a numerical value plus its units to a string </s>
funcom_train/35311123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getParagraphElement(int pos) { Element e; for (e = getDefaultRootElement(); ! e.isLeaf(); ) { int index = e.getElementIndex(pos); e = e.getElement(index); } if(e != null) return e.getParentElement(); return e; } COM: <s> gets the paragraph element at the offset code pos code </s>
funcom_train/17142572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isConcaveArch() { if (_lineType != LineType.CURVE_ARCH) return false; if (!DoubleCalculations.sameSign(lastDist,nextDist) ) return true; if (areaPositiveDistance > areaNegativeDistance) { return DoubleCalculations.sameSign(areaPositiveDistance,lastDist); } else { return DoubleCalculations.sameSign(areaNegativeDistance,lastDist); } } COM: <s> line type needs to be set first </s>
funcom_train/3786661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLMsetStr() { /* getLMsetStr */ String msg= ""; for (int k=0;k<nbrLandmarks;k++) { /* build string */ msg += cvLMsetToPrintStr(k)+"\n"; } return(msg); } /* getLMsetStr */ COM: <s> get lmset str get the printable report for all landmarks </s>
funcom_train/48125817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(E element) { _element_weight_pair_list.add(_bin_locate_pos(element.getWeight(), isIncremental), element); if (sizeLimit > 0 && _element_weight_pair_list.size() > sizeLimit) { int size_of_results = _element_weight_pair_list.size(); _element_weight_pair_list.remove(size_of_results - 1); } } COM: <s> add a new element in the queue </s>
funcom_train/3836795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelSplit() { if (jPanelSplit == null) { GridLayout gridLayout2 = new GridLayout(); gridLayout2.setRows(2); gridLayout2.setColumns(1); jPanelSplit = new JPanel(); jPanelSplit.setPreferredSize(new java.awt.Dimension(622, 40)); jPanelSplit.setLayout(gridLayout2); jPanelSplit.add(getJPanelTransport(), null); jPanelSplit.add(getJPanelBarGlobalEdit(), null); } return jPanelSplit; } COM: <s> this method initializes j panel split </s>
funcom_train/5166319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getTerminal(int a_index) { CommandGene[] functions = getFunctions(); int len = functions.length; for (int j = 0; j < len && functions[j] != null; j++) { if (functions[j].getArity(m_ind) == 0) { if (--a_index < 0) { return j; } } } return -1; } COM: <s> gets the ith terminal in this chromosome </s>
funcom_train/5798563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(String dbUrl, String dbDriver, String username, String password) throws ClassNotFoundException, SQLException { if (dbUrl == null || dbDriver == null || username == null || password == null) { throw new IllegalArgumentException("Cannot take null parameters."); } Class.forName(dbDriver); this.url = dbUrl; this.username = username; this.password = password; } COM: <s> initialize a new database pool with the given database username and </s>
funcom_train/11707067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf(char c, int offset) throws IndexOutOfBoundsException { if (offset < 0) { throw new IndexOutOfBoundsException(); } int pos = this.start + offset; while (pos < this.end) { if (this.chars[pos] == c) { return pos - this.start; } ++pos; } return -1; } COM: <s> find an occurence of a given character after some position </s>
funcom_train/31645831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processStringToken() { // Variables StringBuffer buffer; char charValue; // Loop Through String buffer = new StringBuffer(); charValue = data.charAt(dataIndex); while (dataIndex < dataLength && isStringTokenChar(charValue) == true) { buffer.append(charValue); dataIndex += 1; if (dataIndex < dataLength) { charValue = data.charAt(dataIndex); } } currentToken = STRING_TOKEN; currentTokenValue = buffer.toString(); } // processStringToken() COM: <s> process entire string token </s>
funcom_train/29939464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IContentProvider getSourceContentProvider() { return new IStructuredContentProvider() { @Override public Object[] getElements(Object inputElement) { Collection<IFile> files = newTarget.sourceFiles(); return files.toArray(new IFile[0]); } @Override public void dispose() {} @Override public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} }; } COM: <s> returns the content provider of the multiple source code widget </s>
funcom_train/15743006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void refreshSarosSupport(final JID jid) { Utils.runSafeAsync(log, new Runnable() { public void run() { boolean supported = discoveryManager.isSarosSupported(jid); log.debug("discovered: " + supported); //$NON-NLS-1$ refreshUserList(); } }); } COM: <s> triggers the discovery manager to discover saros supportance and refreshes </s>
funcom_train/29287541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void redo() { if (isPreCondition) wasAdded = responsibility.getPreconditions().add(condition); else wasAdded = responsibility.getPostconditions().add(condition); if (condition.getFamily() != null) { condition.getFamily().getAssociatedResponsibilities().add(condition.getSourceResponsibility()); } if (condition.getEvent() != null) { condition.getEvent().getAssociatedConditions().add(condition); } } COM: <s> adds the conditions to the responsibility list </s>
funcom_train/51538908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void repaintDisplayable(int x, int y, int w, int h) { // We mark the body layer as dirty if (alertLayer != null && alertLayer.visible) { alertLayer.addDirtyRegion(x, y, w, h); } else { bodyLayer.addDirtyRegion(x, y, w, h); } requestRepaint(); } COM: <s> request a repaint of a region of the current displayable </s>
funcom_train/125494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append(getClass().getName() + "[name=" + name); for (int i = 0; i < tsList.size(); i++) buffer.append("," + tsList.get(i)); buffer.append("]"); return buffer.toString(); } COM: <s> gets a string representation of this project </s>
funcom_train/5223968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(JInternalFrame frame, int x, int y) { if (desktopScrollpane.getNumberOfFrames() < MAX_FRAMES) { desktopScrollpane.add(dListener, frame, x, y); createFrameAssociates((JScrollInternalFrame) frame); } JInternalFrame[] lista = desktopScrollpane.getAllFrames(); Gerenciador.setListaDeFrames(lista); } COM: <s> adds an internal frame to the scrollable desktop pane </s>
funcom_train/7645205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addURL(URL url) { try { URL search = createSearchURL(url); urls = addURL(urls, search); orgUrls = addURL(orgUrls, url); synchronized (extensions) { extensions.put(search, null); } } catch (MalformedURLException e) { } } COM: <s> adds the specified url to the search list </s>
funcom_train/2665020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getEntireSQLScriptWithPlatformEolChar() { String platformEolStr = StringUtilities.getEolStr(); String result = _sqlPanelAPI.getEntireSQLScript(); if (result != null && !"".equals(result) && !platformEolStr.equals("\n")) { result = result.replaceAll("\\n", platformEolStr); } return result; } COM: <s> bug 2119937 windows eol chars crlf are converted to linux eol lf </s>
funcom_train/3589429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRequestMetadataPrefix() { String ret = ""; int idx1 = getRequestURL().indexOf("metadataPrefix="); if (idx1 >= 0) { int idx2 = getRequestURL().indexOf("&", idx1); if (idx2 <= 0) { idx2 = getRequestURL().length(); } ret = getRequestURL().substring(idx1 + 15, idx2); } return ret; } COM: <s> returns the metadata prefix query param returned by the most recent response </s>
funcom_train/43095129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateNameText() { if ((getOwner() == null) || (getOwner() instanceof CommentEdge)) return; String nameStr = Notation.generate(this, Model.getFacade().getName(getOwner())); name.setText(nameStr); calcBounds(); setBounds(getBounds()); } COM: <s> generate the notation for the modelelement and stuff it into the text fig </s>
funcom_train/2557534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeStart(String name, String prefix) throws Exception{ String text = indenter.push(); if(last == Tag.START) { append('>'); } flush(); append(text); append('<'); if(!isEmpty(prefix)) { append(prefix); append(':'); } append(name); last = Tag.START; } COM: <s> this method is used to write a start tag for an element </s>
funcom_train/40685259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPolylineMouseOutHandler(final PolylineMouseOutHandler handler) { maybeInitPolylineMouseOutHandlers(); polylineMouseOutHandlers.addHandler(handler, new VoidCallback() { @Override public void callback() { PolylineMouseOutEvent e = new PolylineMouseOutEvent(Polyline.this); handler.onMouseOut(e); } }); } COM: <s> this event is fired when the mouse moves out of a polyline </s>
funcom_train/10382860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getResourceType() { String result = null; if (attributes != null) { Attribute attribute = attributes.get(TYPE); if (attribute != null) { try { result = attribute.get().toString(); } catch (NamingException e) { // No value for the attribute } } } if (result == null) { if (collection) result = COLLECTION_TYPE; } return result; } COM: <s> get resource type </s>
funcom_train/44340662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addChild(CS child) { if (child == null) return false; else if (children == null) { children = new ArrayList(3); children.add(child); return true; } else if (!children.contains(child)) { children.add(child); return true; } else return false; } COM: <s> add a new child to the children of the current cs </s>
funcom_train/23278868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LaunchBoard getLaunchBoard(long id){ List objects = getHibernateTemplate().findByNamedQueryAndNamedParam("launchBoard.getbyId", "id", id); if (objects.size()!=1) return null; return (LaunchBoard) objects.get(0); } COM: <s> returns the launch board related to the given id </s>
funcom_train/8408232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsAll(Bag other) { boolean result = true; Iterator i = other.uniqueSet().iterator(); while (i.hasNext()) { Object current = i.next(); boolean contains = getCount(current) >= other.getCount(current); result = result && contains; } return result; } COM: <s> returns code true code if the bag contains all elements in </s>
funcom_train/868840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Scenario getScenario() throws XBRLException { List<Scenario> scenarios = this.<Scenario>getChildren("org.xbrlapi.impl.ScenarioImpl"); if (scenarios.size() == 0) return null; if (scenarios.size() == 1) return scenarios.get(0); throw new XBRLException("There is more than one scenario in context " + this.getIndex()); } COM: <s> get the scenario of the context </s>
funcom_train/12531360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateSeatAllocation() { SeatAllocationMethod sam = getSeatAllocationMethod(); if (null != sam) this.resultTied = this.getSeatAllocationMethod().allocateSeats(this.getTotalSeats(), this.getResults()); else { for (ResultsTable.Row r : this.getResults()) r.setSeats((short)0); this.resultTied = true; } } COM: <s> asks the current </s>
funcom_train/49409058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void accept(final DIDLVisitorType visitor) { if (visitor == null) { throw new IllegalArgumentException(); } visitor.visitStart(this); for (DIDLInfoType didlInfo: getDIDLInfos()) { didlInfo.accept(visitor); } for (ItemType item: getItems()) { item.accept(visitor); } visitor.visitEnd(this); } COM: <s> implements the visitor pattern for serialization </s>
funcom_train/51782669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resizeSe(double diffx, double diffy) { tmpSize.setSize(node.getSize().getWidth() + diffx, node.getSize().getHeight() + diffy); new CornerSnap(editor.getDiagram(), tmpPos, tmpSize).snapRightLower(); } COM: <s> resize using the se handle </s>
funcom_train/4300830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object set(int index, Object element) { if (index >= elementCount) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " >= " + elementCount); } if (index < 0) { throw new IndexOutOfBoundsException("Index out of bounds: " + index + " < 0"); } Object replacedObj = elementData[index]; elementData[index] = element; return replacedObj; } COM: <s> replaces the element at given position </s>
funcom_train/40503140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertTab(String text, boolean asHTML, int beforeIndex) { Label item; if (asHTML) item = new HTML(text); else item = new Label(text); item.addClickListener(this); item.setStyleName("gwt-TabBarItem"); panel.insert(item, beforeIndex + 1); } COM: <s> inserts a new tab at the specified index </s>
funcom_train/10281958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireTaskFailed(XFeedEvent event) { XFeedListener[] lListeners = (XFeedListener[]) listeners .toArray(new XFeedListener[] {}); for (int i = 0; i < lListeners.length; i++) { XFeedListener lListener = lListeners[i]; if (listeners.contains(lListener)) { lListener.taskFailed(event); } } } COM: <s> fire an event notifying any listener of a unsuccesful task completion </s>
funcom_train/47108314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLayout( FormLayoutManager layout ) { if( this.layout == layout ) return; FormLayoutManager oldLayout = this.layout; if( oldLayout != null ) oldLayout.setContainer( null ); this.layout = layout; if( layout != null ) layout.setContainer( this ); if( model != null && model.eventProvider != null ) model.eventProvider.fireLayoutChanged( this, oldLayout, layout ); } COM: <s> sets the form layout manager for this form container </s>
funcom_train/14428278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasSamples(final double startTime, final double endTime) { final int startIndex = binarySearch(startTime); final int endIndex = binarySearch(endTime); if ((startIndex == 0) && (endIndex == 0)) { return (startTime <= samples[0].time) && (endTime >= samples[0].time); } else { return (startIndex != endIndex); } } COM: <s> determines whether or not the line has samples within the given time </s>
funcom_train/5726966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Folder createRootFolderForDomainObject(Long domainIdentifier) { Validate.notNull(domainIdentifier, "DomainIdentifier must not be null."); logger.debug("Creating new root folder for domain object " + domainIdentifier); Folder folder =new FolderImpl(); folder.setName(""); folder.setParent(null); folder.setCreated(new Date()); folder.setDomainIdentifier(domainIdentifier); getFolderDao().create(folder); defineSecurityPermission(folder, domainIdentifier); return folder; } COM: <s> creates a new root folder for the domain object </s>
funcom_train/51537868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getKeyCode(int gameAction) { // SYNC NOTE: no locking necessary as we are doing a static // table lookup and getKeyCode() is implemented natively int n = UIToolkit.getToolkit().getEventMapper().getKeyCode(gameAction); //int n = KeyConverter.getKeyCode(gameAction); if (n == 0) { throw new IllegalArgumentException(); } return n; } COM: <s> gets a key code that corresponds to the specified game action on the </s>
funcom_train/3115250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getType() { Style style = getStyleRef(); Color color = style.getDrawColor(); if (color.equals(DEFAULT_ORG_ARROW_COLOR)) { return ORG; } else if (color.equals(DEFAULT_NAV_ARROW_COLOR)) { return NAV; } else { assert false; // "Arrow isn't ORG or NAV" return -1; } } COM: <s> returns the type of arrow arrow </s>
funcom_train/44656020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRestoreColumnOrder() { TransientSettings settings = new TransientSettings(); settings.setString("table.columnOrder", "0,3,1,2"); memento.restoreColumnOrder(settings); memento.saveColumnOrder(settings); assertTrue(settings.contains("table.columnOrder")); assertEquals("0,3,1,2", settings.getString("table.columnOrder")); } COM: <s> still got a bug in it </s>
funcom_train/35848615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStringGenerationNoAction() { ActionStateNotationUml notation = new ActionStateNotationUml(aActionState); String notationStr = notation.toString(aActionState, null); assertEquals("Notation not correctly generated " + "(for absent entry-action)", "", notationStr); } COM: <s> test if the string for an absent entry action is correct </s>
funcom_train/12836397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean setXML(String xmlString){ try { int indexFirstBracket=xmlString.indexOf("("); int indexLastBracket=xmlString.lastIndexOf(")"); xmlString=xmlString.substring(indexFirstBracket+1,indexLastBracket); this.map=new StringHashMap(xmlString); return true; } catch (org.dom4j.DocumentException e) { e.printStackTrace(); return false; } } COM: <s> a private method which sets the xml content string to the map </s>
funcom_train/11004911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getMarginRight(){ EscherOptRecord opt = (EscherOptRecord)getEscherChild(_escherContainer, EscherOptRecord.RECORD_ID); EscherSimpleProperty prop = (EscherSimpleProperty)getEscherProperty(opt, EscherProperties.TEXT__TEXTRIGHT); int val = prop == null ? EMU_PER_INCH/10 : prop.getPropertyValue(); return (float)val/EMU_PER_POINT; } COM: <s> returns the distance in points between the right edge of the </s>
funcom_train/40667195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String trimFront(String s) { if (s == null || s.length() == 0) { return s; } int index = 0; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) == ' ' || s.charAt(i) == '\t') ++index; else break; } return s.substring(index); } COM: <s> utility to trim horizontal whitespace from the front of a string </s>
funcom_train/51205462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JFieldFk fObjID_ArticleType() throws JException { if(m_fObjID_ArticleType == null) { m_fObjID_ArticleType = new JFieldFk("ObjID_ArticleType", this, new JArticleType()); m_fObjID_ArticleType.setVisibleName("Type product"); } return m_fObjID_ArticleType; } COM: <s> foreign key naar type product </s>
funcom_train/17750382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assign(T pValue) { /* null value ok */ notNull(returnType); if (pValue!=null && !returnType.isPrimitive()) { //TODO(csallner) check primitive check(returnType.isAssignableFrom(pValue.getClass())); } value = pValue; } COM: <s> assigns a dynamic runtime value </s>
funcom_train/39163584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getSelectedCollection(){ ArrayList resultsList = new ArrayList(); for (int i=0; i<targetListModel.getSize(); i++){ resultsList.add(targetListModel.getElementAt(i)); }// End for return (Collection) resultsList; }// getSelectedCollection() COM: <s> returns the target collection </s>
funcom_train/22232383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAppearance(Appearance appearance) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_APPEARANCE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("AlternateAppearance0")); if (isLive()) ((AlternateAppearanceRetained)this.retained).setAppearance(appearance); else ((AlternateAppearanceRetained)this.retained).initAppearance(appearance); } COM: <s> sets the appearance of this alternate appearance node </s>
funcom_train/48527561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Id makeTarget(RingId id, int length) { byte[] current = id.getRingId().toByteArray(); byte[] bytes = new byte[current.length]; for (int j=0; j<collection.BASE * length; j++) bytes[bytes.length - 1 - j] = current[bytes.length - 1 - j]; return factory.buildNormalId(bytes); } COM: <s> utility method for building a target id of specified length all remaining bytes </s>
funcom_train/16795707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void convertToGray32() { if (type==ImagePlus.GRAY32) return; if (!(type==ImagePlus.GRAY8||type==ImagePlus.GRAY16||type==ImagePlus.COLOR_RGB)) throw new IllegalArgumentException("Unsupported conversion"); ImageProcessor ip = imp.getProcessor(); imp.trimProcessor(); Calibration cal = imp.getCalibration(); imp.setProcessor(null, ip.convertToFloat()); imp.setCalibration(cal); //update calibration } COM: <s> converts this image plus to 32 bit grayscale </s>
funcom_train/8468188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void perceive() { try { SimulatorService simulator = getSimulator(); Set<Ied> ieds = simulator.sensedIeds(this.agent); for (Ied ied : ieds) { adoptBelief("BELIEF(ied"+ied.getLocation()+","+ied.getStatus()+")"); } } catch(PerceptorException e) { e.printStackTrace(); } } COM: <s> percieve the possible movements and the contents of the squares around </s>
funcom_train/14365125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveData(Object shell_p) { // Check if data is dirty. if (isDirty()) { _isDirty = !_dataAccessor.saveData(_root, shell_p); // Notify listeners only if data are saved if (!_isDirty) { updateDataStatusListeners(); } } } COM: <s> save data if needed this methods always checks if data are dirty </s>
funcom_train/12814018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnAlias(String name){ String alias = null; Iterator<Map.Entry<String,String> > it = lstColumnsAlias().entrySet().iterator(); while(alias == null && it.hasNext()){ Map.Entry<String, String> item = it.next(); if (item.getValue().equalsIgnoreCase(name)) alias = item.getKey(); } return alias; } COM: <s> gets the alias which corresponds to the given column name if any </s>
funcom_train/45133511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStackTraceAsString() { StringWriter s= new StringWriter(); PrintWriter p = new PrintWriter(s); this.printStackTrace(p); String response=s.toString(); try { s.close(); p.close(); } catch (Exception e) {} return response; } COM: <s> returns the exceptions stack trace in a string </s>
funcom_train/3379764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Credentials getCreds(PrincipalName sname, Realm srealm) { Credentials[] list = getCredsList(); if (list == null) { return null; } else { for (int i = 0; i < list.length; i++) { if (sname.match(list[i].sname) && (srealm.toString().equals(list[i].srealm.toString()))) { return list[i]; } } } return null; } COM: <s> gets a credentials for a specified service </s>
funcom_train/3350478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassLoader getPluginClassLoader() { if (classLoaderHolder == null) { classLoaderHolder = new VmIsolateLocal<ClassLoader>(); } if (classLoaderHolder.get() == null) { if (system) { classLoaderHolder.set(ClassLoader.getSystemClassLoader()); } else { classLoaderHolder.set(createClassLoader()); } } return classLoaderHolder.get(); } COM: <s> gets the classloader of this plugin descriptor </s>
funcom_train/3419049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean abort() throws LoginException { if (debug) System.out.println("\t\t[LdapLoginModule] " + "aborted authentication"); if (succeeded == false) { return false; } else if (succeeded == true && commitSucceeded == false) { // Clean out state succeeded = false; cleanState(); ldapPrincipal = null; userPrincipal = null; authzPrincipal = null; } else { // overall authentication succeeded and commit succeeded, // but someone else's commit failed logout(); } return true; } COM: <s> abort user authentication </s>
funcom_train/15865747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isSessionDebug() { HttpSession session = this.request.getSession(false); if(session !=null){ Object o = session.getAttribute( "jet_debug"); if( o != null ){ return ((Boolean)o).booleanValue(); } } return false; } COM: <s> indocates if the servlet context is in debug modus </s>
funcom_train/38315489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doEndTag() throws JspTagException { String val = null; JLCPUser user = (JLCPUser)pageContext.getAttribute("currentUnapprovedUser"); if (user == null) return SKIP_PAGE; val = user.getEmailAddress(); JspWriter out = pageContext.getOut(); try { out.write(val); } catch (IOException e) { throw new JspTagException("Error writing to page"); } return EVAL_PAGE; } COM: <s> print out a users email </s>
funcom_train/8087581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(PrintWriter output, int w, int d) { DecimalFormat format = new DecimalFormat(); format.setDecimalFormatSymbols(new DecimalFormatSymbols(Locale.US)); format.setMinimumIntegerDigits(1); format.setMaximumFractionDigits(d); format.setMinimumFractionDigits(d); format.setGroupingUsed(false); print(output,format,w+2); } COM: <s> print the matrix to the output stream </s>
funcom_train/10656835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInsertString03() throws Exception { doc = new DisAbstractedDocument(new NoUndoContent()); doc.addDocumentListener(this); doc.addUndoableEditListener(this); doc.insertString(0, "\u05DC\u05DD", null); checkCalledEvents(false, true, false, false); assertNotNull(insert.getChange(doc.getBidiRootElement())); } COM: <s> tests which events are fired at rtl text insert </s>
funcom_train/2408324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int out = getClass().getName().hashCode(); out ^= lowest; out ^= defaultValue; if (array != null) { for (int i = 0; i < array.length; i++) { out ^= array[i]; } } return out; } COM: <s> returns the hash code of this object </s>
funcom_train/14166066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCapabilities(){ this.setCapability(Shape3D.ALLOW_GEOMETRY_READ); this.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE); this.setCapability(Shape3D.ALLOW_APPEARANCE_READ); this.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE); // this.setCapability(Shape3D.ENABLE_PICK_REPORTING); // this.setCapability(Shape3D.ALLOW_PICKABLE_READ); // this.setCapability(Shape3D.ALLOW_PICKABLE_WRITE); } COM: <s> set this capabilities </s>
funcom_train/21885034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOrderPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ASTFeature_order_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ASTFeature_order_feature", "_UI_ASTFeature_type"), AstPackage.Literals.AST_FEATURE__ORDER, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the order feature </s>
funcom_train/7417366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSONArray generateChoiceItems(String choicesString) throws JSONException { String[] choices = choicesString.split(","); JSONArray items = new JSONArray(); for (int i = 0; i < choices.length; i++) { JSONObject item = new JSONObject(); item.put("id", choices[i]); item.put("title", choices[i]); item.put("value", choices[i]); /* Add to item to item list */ items.put(item); } return items; } COM: <s> generates the options of a choice type </s>
funcom_train/1754778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getAllMethodsRecursive(ClassDoc clazz, List<MethodDoc> methods) { if (clazz == null) return; if (methods == null) { throw new IllegalArgumentException("methodes must not be null"); } MethodDoc[] origins = clazz.methods(); if (origins != null && origins.length > 0) { for (MethodDoc methodDoc : origins) { methods.add(methodDoc); } } getAllMethodsRecursive(clazz.superclass(), methods); } COM: <s> gets all methods from also the inherited ones </s>
funcom_train/45026240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endMethodTest(IDDTTestCase test, String testName) { int testCount = test.countMethodTests(); String method = test.getName(); log.info("[" + test.getClass() + "] (" + this.testRuns + "/" + testCount + ") method \"" + method + "\", test \"" + testName + "\""); } COM: <s> notify about end of method test execution </s>