__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/5077764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void primSetZoom(double zoom) { Point p1 = getViewport().getClientArea().getCenter(); Point p2 = p1.getCopy(); Point p = getViewport().getViewLocation(); double prevZoom = this.zoom; this.zoom = zoom; pane.setScale(zoom); fireZoomChanged(); getViewport().validate(); p2.scale(zoom / prevZoom); Dimension dif = p2.getDifference(p1); p.x += dif.width; p.y += dif.height; setViewLocation(p); } COM: <s> sets the zoom level to the given value </s>
funcom_train/20043996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _isLast() { requiredMethod("last()") ; boolean result = true ; try { result = oObj.isLast() ; } catch (SQLException e) { log.println("Exception occured :") ; e.printStackTrace(log) ; result = false ; } tRes.tested("isLast()", result) ; } COM: <s> the method is called immediatly after code last code </s>
funcom_train/29864520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean startService(Long bundleID) { boolean started = false; Bundle[] bundleList = bc.getBundles(); Bundle b; for (int i=0;i<bundleList.length;i++) { b = bundleList[i]; if ( b.getBundleId() == bundleID ) try { b.start(); started = true; } catch (BundleException e) { Log log = Log.getInstance(); log.writeToLog("Failed to start service with ID=" + bundleID, Log.WARNING); e.printStackTrace(); } } return started; } COM: <s> method to start a service installed on the ubi node </s>
funcom_train/20823060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getChannelDmxLevel(final long now, final int channelIndex) { float max = 0; for (int i = 0; i < context.getNumberOfChannelLevelProviders(); i++) { float level = context.getChannelLevelProvider(i).getValue(now, channelIndex); if (level > max) { max = level; } } return Dmx.getDmxValue(max); } COM: <s> answer the level for the channel with given index using </s>
funcom_train/3004924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateIdsFromInvocator( String idsFromParameter ) { if ( _oids == null ) { _oids = new Vector( 5 ); } else { _oids.removeAllElements(); } String[] resultIds = idsFromParameter.split( ", " ); for ( int index = 0; index < resultIds.length; index++ ) { _oids.add( new Long( resultIds[index] ) ); } } COM: <s> update the oids from the parameter retrieved by a invocator </s>
funcom_train/4518435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMaxDate(TimeBarViewerInterface emitting, JaretDate maxDate) { for (TimeBarViewerInterface viewer : _viewers) { if (!emitting.equals(viewer)) { // do not set on the emitting viewer viewer.removePropertyChangeListener(this); viewer.setMaxDate(maxDate.copy()); viewer.addPropertyChangeListener(this); } } } COM: <s> set the maximum date value for all viewers but the emitting viewer </s>
funcom_train/29834230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getTrackWidth() { // This strange calculation is here to keep the // track in proportion to the thumb. final double kIdealTrackWidth = 7.0; final double kIdealThumbHeight = 16.0; final double kWidthScalar = kIdealTrackWidth / kIdealThumbHeight; if (slider.getOrientation() == SwingConstants.HORIZONTAL) { return (int) (kWidthScalar * getThumbSize().height); } else { return (int) (kWidthScalar * getThumbSize().width); } } COM: <s> returns the shorter dimension of the track </s>
funcom_train/47897899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getMessageString(String txt) { Date dt = new Date(java.lang.System.currentTimeMillis()); SimpleDateFormat sdf = new SimpleDateFormat("MMM dd h:mm:ss"); String mess = "["+sdf.format(dt)+"] "; if (user !=null) mess += user.getName() + ": " ; mess += txt; return mess; } COM: <s> a helper method to get a formatted message string </s>
funcom_train/11655100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRateString() { double rate = getRate(); if (rate == Double.MAX_VALUE) { return "N/A"; } String unit = "sec"; if (rate < 1.0) { rate *= 60.0; unit = "min"; } if (rate < 1.0) { rate *= 60.0; unit = "hour"; } String rval = rateFormatter.format(rate) + "/" + unit; return (rval); } COM: <s> returns a string that represents the throughput associated for this </s>
funcom_train/3468700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doSetUserMode(String Nick, String OpMode) { /** * Falid OpMode Are * a, i, w, r, o, 0, s * to add use + prefix, and - prefix to remove * example +a, +o, +s, -a */ writeMessage("MODE "+Nick+" "+OpMode); } COM: <s> method that used to change a user mode </s>
funcom_train/26615032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItem6() { if (jMenuItem6 == null) { jMenuItem6 = new JMenuItem(); jMenuItem6.setText("Refresh Servers"); jMenuItem6.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent e) { refreshServers(); } }); } return jMenuItem6; } COM: <s> this method initializes j menu item6 </s>
funcom_train/4757658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TeXFormula add(Atom el) { if (el != null) { if (el instanceof MiddleAtom) middle.add((MiddleAtom)el); if (root == null) root = el; else { if (!(root instanceof RowAtom)) root = new RowAtom(root); ((RowAtom) root).add(el); } } return this; } COM: <s> inserts an atom at the end of the current formula </s>
funcom_train/37036427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWrapperLifecycle(String listener) { synchronized (wrapperLifecycles) { String results[] =new String[wrapperLifecycles.length + 1]; for (int i = 0; i < wrapperLifecycles.length; i++) results[i] = wrapperLifecycles[i]; results[wrapperLifecycles.length] = listener; wrapperLifecycles = results; } } COM: <s> add the classname of a lifecycle listener to be added to each </s>
funcom_train/4237358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTotal() { System.out.println("getTotal"); ImplNotaDeConsumo instance = new ImplNotaDeConsumo(); instance.setTotal(204.50); Double expResult = 204.50; Double result = instance.getTotal(); assertEquals(expResult, result); } COM: <s> test of get total method of class restaurante </s>
funcom_train/27748412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addProjectRunner(String newBuildFileName) { try { ProjectRunner runner = new ProjectRunner(newBuildFileName); addProjectRunner(runner); } catch (IllegalArgumentException e1) { JOptionPane.showMessageDialog(this, "Build File does not exists.", "Add Build File", JOptionPane.ERROR_MESSAGE); } } COM: <s> adds the new project using the specified build file </s>
funcom_train/47104655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnemiesToLevel(int level){ for(int i = 0; i < landArray.length; i++){ for(int k = 0; k < landArray[0].length; k++){ if(landArray[i][k].getEnemy() != null){ landArray[i][k].getEnemy().setLevel(level); } } } } COM: <s> sets all of the enemies on the current level to the specified </s>
funcom_train/7959641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCompatibleGroup(DockGroup g){ if (g == null) return false; if (this.equals(g)){ return true; } else if (this.isAncestorOf(g)) { return true; } else if (g.isAncestorOf(this)){ return true; } else if (parent != null){ return parent.isCompatibleGroup(g.parent); } else { return false; } } COM: <s> returns true is this group is compatible with the given parameter </s>
funcom_train/22165793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void AddType(NamedEntityTypeEnumI pi_Type, String pi_UID, NamedEntityExplanation pi_Info) { // set bit, set uid, explain m_BitValue.set(pi_Type.BitPos()); if (!pi_UID.equals(NO_GUID)) AddUID(pi_Type.BitPos(), pi_UID); AddNewInfo(pi_Info); } COM: <s> add a primitive type to this entity type e </s>
funcom_train/782470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Item newClassItem(final String value) { key2.set(CLASS, value, null, null); Item result = get(key2); if (result == null) { pool.put12(CLASS, newUTF8(value)); result = new Item(index++, key2); put(result); } return result; } COM: <s> adds a class reference to the constant pool of the class being build </s>
funcom_train/11759886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void terminate() { try { //log("TERM"); try { for (ICartagoContext ctx: openContexts.values()){ try { ctx.disposeArtifact(ctx.lookupArtifact("$msgbox-"+this.id.getName(),-1),-1); ctx.quitWorkspace(); } catch (Exception ex){ //ex.printStackTrace(); //log("Internal error in agent msgbox disposal. "); } } } catch (Exception ex){ ex.printStackTrace(); log("Internal error in agent msgbox disposal. "); } bootWSP.notifyTermination(id); } catch (Exception ex){ ex.printStackTrace(); } } COM: <s> shutdowns the agent </s>
funcom_train/7725404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setConnected(boolean value) { isConnected = value; if(isConnected) { connectButton.setText("Disconnect"); connectButton.requestFocus(); } else { connectButton.setText("Connect"); } updateClientList(fileSharer.getClientList()); hubAddressPanel.setEditable(!isConnected); hubPortPanel.setEditable(!isConnected); yourPortPanel.setEditable(!isConnected); nickPanel.setEditable(!isConnected); tabbedPane.setSelectedIndex(0); repaint(); } COM: <s> sets the is connected variable and updates the caption of the connect </s>
funcom_train/17059965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(ChangeEvent e) { Object src = e.getSource(); if(src != null && src instanceof MainPanel) { MainPanel mainPanel = (MainPanel) src; int selectedIndex = mainPanel.getSelectedIndex(); if(selectedIndex == MainPanel.TAB_USERS) { updateRoleList(null); } } } COM: <s> handle a change of tabs from the main panel i </s>
funcom_train/18895554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void check() { assert rootId != AVLNode.NULL_NODE || nrNodes == 0 : "AVLFile is empty but nrNodes == " + nrNodes; assert rootId == AVLNode.NULL_NODE || nrNodes > 0 : "AVLFile not empty but nrNodes == " + nrNodes; } COM: <s> debug check that the structure of the tree is as expected </s>
funcom_train/39243864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getOrganisationType() { String orgTypeName = ""; Organisation org = user.getOrganisation(); if (null != org) { OrganisationType orgType = org.getOrganisationType(); if (null != orgType) { orgTypeName = orgType.getName(); } } return orgTypeName; } COM: <s> get the name of the organisation type of the current user </s>
funcom_train/2516650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int multipleResourcePools() { List<Object> pools = dbc.getGeneralDao().selectAll(ResourcePool.class); int count = pools.size(); int deleted = 0; for (int i = 0; i < pools.size() - 1; i++) { Object toDelete = pools.get(i); dbc.getOodb().delete(toDelete); deleted++; } logger.info(deleted + " surplus resource pools deleted"); return count; } COM: <s> returns the number of pools deleted leaving just one </s>
funcom_train/43988953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClear() { testClear(createEmptyArrayListModel()); testClear(createEmptyLinkedListModel()); testClear(createSingleElementArrayListModel()); testClear(createSingleElementLinkedListModel()); testClear(createFilledArrayListModel()); testClear(createFilledLinkedListModel()); } COM: <s> tests the clear operation on different observable lists </s>
funcom_train/13967003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IndexAttribute createAttribute(String propertyName, NSDictionary propertyDefinition) { IndexAttribute attribute = new IndexAttribute(this, propertyName, propertyDefinition); NSMutableDictionary attributes = _attributes.mutableClone(); attributes.setObjectForKey(attribute, propertyName); _attributes = attributes.immutableClone(); return attribute; } COM: <s> creates a new </s>
funcom_train/16630149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getText_owl_datei() { if (text_owl_datei == null) { text_owl_datei = new JTextField(); text_owl_datei.setBounds(new Rectangle(5, 43, 295, 23)); //text_owl_datei.setText("http://grafrotz.dyndns.org/aulo-109.owl"); //text_owl_datei.setText("http://grafrotz.dyndns.org/aulo-object-unter.owl"); text_owl_datei.setText("http://mariobachmann.dyndns.org/aulo-109-op.owl"); //text_owl_datei.setText("file:/home/grafrotz/dipl/aulo_object_properties/AULO-Ontology-Martberg-Waldgirmes-1-09.owl"); } return text_owl_datei; } COM: <s> this method initializes text owl datei </s>
funcom_train/43193100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(int featureId, Object value) { int originalId = featureId; featureId = getAdjustedFeatureId(featureId); adjustElements(featureId); @SuppressWarnings("unchecked") List<Object> list = (List<Object>) elements[featureId]; if (list == null) { list = createList(); elements[featureId] = list; } Notification notification = new Notification(this, Notification.ADD, originalId, null, value, list.size()); list.add(value); notifyListeners(notification); } COM: <s> add the value to the list feature with the given id </s>
funcom_train/3927205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sameAs( TokenEnumerator other ) { int l1 = length(); int l2 = other.length(); if ( l1 != l2 ) { return( false ); } for ( int i = 0; i < l1; i++ ) { if ( charAt( i ) != other.charAt( i )) { return( false ); } } return( true ); } COM: <s> compare the current token to one in another token enumerator </s>
funcom_train/31905175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void leftTextChanged(String text) throws DOMException { text = "rect(" + getValue().getTop().getCssText() + ", " + getValue().getRight().getCssText() + ", " + getValue().getBottom().getCssText() + ", " + text + ")"; textChanged(text); } COM: <s> called when the left value text has changed </s>
funcom_train/32813624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File encodeFileName(File file) { try { File orig = file.getAbsoluteFile(); if (orig.equals(this.directoryRoot)) { return orig; } else { File encodedParent = this.encodeFileName(orig.getParentFile()); return new File(encodedParent, this.encodeFileName(encodedParent, orig.getName())); } } catch (IOException e) { Logger.defaultLogger().error(e); throw new IllegalArgumentException(e.getMessage()); } } COM: <s> hash the file name </s>
funcom_train/11719632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Node getNode(Session session, RemoteNode remote) { if (remote instanceof RemoteVersion) { return factory.getVersion(session, (RemoteVersion) remote); } else if (remote instanceof RemoteVersionHistory) { return factory.getVersionHistory(session, (RemoteVersionHistory) remote); } else { return factory.getNode(session, remote); } } COM: <s> utility method to create a local adapter for a remote node </s>
funcom_train/18894459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validate() throws IllegalStateException { if (mp3ModelResource == null) { throw new IllegalStateException("Mp3Model Resource has not been set."); } if (schemaModelResource == null) { throw new IllegalStateException("SchemaModel Resource has not been set."); } if (fsModelResource == null) { throw new IllegalStateException("FileSystemModel Resource has not " + "been set."); } } COM: <s> throws an exception if the model resources are not set </s>
funcom_train/29881674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setToInitialValues() { mZoomArrayIndex = 13; // Start out with index 13 = 0.36d. If auto zoom width is on, will redraw after mCurrentZoomFactor = 0.36d; // 36% zoom is a good initial default if auto zoom isn't turned on mIsZoomModeZoomWidth = true; } COM: <s> set to initial values </s>
funcom_train/16676338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SpinnerValue addSpinnerValue(int value, int min, int max, int step) { if (this.type != OptionType.SPINNER && type != OptionType.UNKNOWN) { throw new IllegalStateException(I18n.getString("Option.exception.spinnerValuesOnlyBeAddedToSpinner")); //$NON-NLS-1$ } SpinnerValue val = new SpinnerValue(value, min, max, step); addValue(val); return val; } COM: <s> creates a value which is displayed with the spinner option type </s>
funcom_train/25065212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Widget createRightArrow() { Image right_arrow = right_arrow_template.createImage(); right_arrow.setStyleName("pagingPanelNextImage"); right_arrow.addClickListener(new NextClickListener()); nextArrows.add(right_arrow); return right_arrow; } COM: <s> creates the next paging control image </s>
funcom_train/30197009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValutazione() throws Exception { System.out.println("valutazione"); /* ActionMapping mapping = null; ActionForm form = null; HttpServletRequest request = null; HttpServletResponse response = null; MenuIntervistatoreAction instance = new MenuIntervistatoreAction(); ActionForward expResult = null; ActionForward result = instance.valutazione(mapping, form, request, response); assertEquals(expResult, result); */ } COM: <s> test of valutazione method of class com </s>
funcom_train/331586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changedThreading() { PamProcess pamProcess; int nP; for (int i = 0; i < pamControlledUnits.size(); i++) { nP = pamControlledUnits.get(i).getNumPamProcesses(); for (int iP = 0; iP < nP; iP++) { pamProcess = pamControlledUnits.get(i).getPamProcess(iP); pamProcess.changedThreading(); } } } COM: <s> loop over all units and processes telling them to </s>
funcom_train/13878125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int compareRulerLine(Position position, IDocument document, int line) { if (position.getOffset() > -1 && position.getLength() > -1) { try { int annotationLine = document.getLineOfOffset(position.getOffset()); if (line == annotationLine) return 1; if (annotationLine <= line && line <= document.getLineOfOffset(position.getOffset() + position.getLength())) return 2; } catch (BadLocationException x) { } } return 0; } COM: <s> returns the distance to the ruler line </s>
funcom_train/20497344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { super.paint(g); // Drawing the Circles for (int i = 1; i <= 7; i++) { for (int j = 1; j <= 6; j++) { ovalX = 130 + (i * 60); ovalY = (j * 60); if (x >= ovalX && x <= 50 + ovalX) { if (y >= ovalY && y <= 50 + ovalY) { paintCircles(); } } } } } COM: <s> drawing the circles in the grid filling them with the right color if </s>
funcom_train/41730534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLexOrderRoundTrip() { System.out.println("Testing LexOrder marshalling/unmarshalling:"); LexOrder compare = new LexOrder(); compare.add("x"); compare.add("x2"); compare.add("y"); compare.add("y2"); Map comparisons = new HashMap(); comparisons.put(new Integer(1), compare); runTest("./lexorder.xml",comparisons); } COM: <s> test of unmarshall marshall lex order </s>
funcom_train/39570560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void inc() { long x; long sum; int carry = 1; // add one for (int i = 0; i < nlen; i++) { x = difference[i] & 0x0ffffffffL; sum = x + carry; if (sum >= 0x100000000L) { carry = 1; } else { carry = 0; } difference[i] = (int) sum; } } COM: <s> increment this distance </s>
funcom_train/50552315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static private void removeImageElements(Element position) { // remove all <img> elements position.removeChildren("img"); // recurse List children = position.getChildren(); Iterator childIterator = children.iterator(); while (childIterator.hasNext()) { Element curElement = (Element) childIterator.next(); removeImageElements(curElement); } } COM: <s> removes all img elements that are descendants of the given element </s>
funcom_train/35837724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToLayout() { if (nAlignment == UIToolBarController.HORIZONTAL_ALIGNMENT) { gc.gridx = 0; gc.gridy = 0; gb.setConstraints(button, gc); gc.gridx = 1; gc.gridy = 0; gb.setConstraints(bar, gc); } else { gc.gridx = 0; gc.gridy = 0; gb.setConstraints(button, gc); gc.gridx = 0; gc.gridy = 1; gb.setConstraints(bar, gc); } add(button); add(bar); validate(); fullSize = getPreferredSize(); } COM: <s> adds the toolbar and panel controller button to this panel </s>
funcom_train/28425895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getMaxIdleTime(JComboBox combo) { int sec = 0; Object selObj = combo.getSelectedItem(); if (!selObj.equals(IDLE_SECONDS[0])) { try { sec = Integer.parseInt(selObj.toString()); } catch(NumberFormatException ex) { GuiUtils.showErrorMessage(this, ex.getMessage()); } } return sec; } COM: <s> get max idle time in sec </s>
funcom_train/21436996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void showFlavors(Transferable t) { DataFlavor[] flavors = t.getTransferDataFlavors(); for(int i=0; i<flavors.length; i++ ) { System.out.println(flavors[i].getMimeType() + ": " + flavors[i].getHumanPresentableName()); } } COM: <s> print the flavours available for a transferable object </s>
funcom_train/1536669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public GeoPoint3D Point3D(String label, Path path) { // try (0,0,0) //AlgoPoint3DOnPath algo = new AlgoPoint3DOnPath(cons, label, path, 0, 0, 0); //GeoPoint3D p = algo.getP(); GeoPoint3D p = Point3D(label,path,0,0,0,true); /* TODO below // try (1,0,0) if (!p.isDefined()) { p.setCoords(1,0,1); algo.update(); } // try (random(),0) if (!p.isDefined()) { p.setCoords(Math.random(),0,1); algo.update(); } */ return p; } COM: <s> point3 d on a 1 d path without cartesian coordinates </s>
funcom_train/47812213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initTable() { table.addWidget("firstname", "firstname", textBoxFirstname); table.addWidget("name", "name", textBoxName); table.addWidget("email", "email", textBoxEMail); table.addWidget("status", "status", lbStatus); table.addWidget("team", "team", lbTeam); } COM: <s> this method iniate the table </s>
funcom_train/3423791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void cleanTableView() { if (++fLargeCount < 0) { // Overflow. We actually need to visit the chain state array. if (fAttributeTableViewChainState != null) { for (int i = fTableViewBuckets - 1; i >= 0; --i) { fAttributeTableViewChainState[i] = 0; } } fLargeCount = 1; } } COM: <s> purges all elements from the table view </s>
funcom_train/3427650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processFallbacks(Parser parser) { Vector children = getContents(); if (children != null) { final int count = children.size(); for (int i = 0; i < count; i++) { SyntaxTreeNode child = (SyntaxTreeNode)children.elementAt(i); if (child instanceof Fallback) { Fallback fallback = (Fallback)child; fallback.activate(); fallback.parseContents(parser); if (_fallbacks == null) { _fallbacks = new Vector(); } _fallbacks.addElement(child); } } } } COM: <s> scan and process all fallback children of the unsupported element </s>
funcom_train/25978752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration enumerateAttributeNames() { Vector result = new Vector(); Enumeration enum = this.attributes.elements(); while (enum.hasMoreElements()) { XMLAttribute attr = (XMLAttribute) enum.nextElement(); result.addElement(attr.getFullName()); } return result.elements(); } COM: <s> returns an enumeration of all attribute names </s>
funcom_train/21913540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNumberOfColumnsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UIMGridLayout_numberOfColumns_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UIMGridLayout_numberOfColumns_feature", "_UI_UIMGridLayout_type"), UIMPackage.Literals.UIM_GRID_LAYOUT__NUMBER_OF_COLUMNS, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the number of columns feature </s>
funcom_train/21334366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPermissionsFromMaskString(String mask) { if (mask.length() != 4) { throw new IllegalArgumentException("Mask length must be 4"); } try { setPermissions(new UnsignedInteger32(String.valueOf( Integer.parseInt(mask, 8)))); } catch (NumberFormatException nfe) { throw new IllegalArgumentException( "Mask must be 4 digit octal number."); } } COM: <s> set permissions given a unix style mask </s>
funcom_train/4360765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Service findService(String name) { if (name == null) { return (null); } synchronized (services) { for (int i = 0; i < services.length; i++) { if (name.equals(services[i].getName())) { return (services[i]); } } } return (null); } COM: <s> return the specified service if it exists otherwise return </s>
funcom_train/1304892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFirstText(String patternString, Tree<XmlLite.Data> node) { if (patternString == null) return null; final String[] pattern = splitPatternAttribute(patternString); final XPath xpath = getXPath(pattern); final String result = (pattern.length == 2) ? xpath.getFirstText(node, pattern[1]) : xpath.getFirstText(node); return result; } COM: <s> convenience method for getting the first matching nodes text </s>
funcom_train/11650847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIntParameter(String name) throws NumberFormatException { if (params == null || !params.containsKey(name)) { throw new NumberFormatException("No value for parameter named '" + name + "'."); } return Integer.decode(params.get(name)).intValue(); } COM: <s> get the value of a specified parameter as an integer </s>
funcom_train/46112332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TextFragment makeFragment1Bis (String extra) { TextFragment tf = new TextFragment(); tf.append(TagType.OPENING, "b", "{B}"); tf.append("A"); tf.append(TagType.CLOSING, "b", "{/B}"); tf.append("B"); tf.append(TagType.PLACEHOLDER, "br", "{BR/}"); tf.append("C "+extra); return tf; } COM: <s> makes a fragment code b a b b br c extra code </s>
funcom_train/1488360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCellsEnclosedBy() { try { Set<Integer> results = CellIdUtils.getCellsEnclosedBy(-90, -89, -180, -179); assertTrue(results.contains(0)); assertTrue(results.size()==1); results = CellIdUtils.getCellsEnclosedBy(-90, (float)-88, -180, (float)-178); assertTrue(results.contains(0)); assertTrue(results.contains(1)); assertTrue(results.contains(360)); assertTrue(results.contains(361)); assertTrue(results.size()==4); } catch (UnableToGenerateCellIdException e) { fail(e.getMessage()); } } COM: <s> the cells enclosed by should return cells that are partially enclosed also </s>
funcom_train/12655490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateVariablePositions() { if (effectStructure != null) { // update positions and set it to the effect structure variableDimensions = new HashMap<Variable, Rectangle2D>(); for (Map.Entry<Variable, DefaultGraphCell> entry : varCellMapping.entrySet()) { variableDimensions.put(entry.getKey(), GraphConstants.getBounds(entry.getValue() .getAttributes())); } effectStructure.setVariableDimensions(variableDimensions); } } COM: <s> read positions of all variables and save them in effect structure </s>
funcom_train/28262660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getPacketByte(int channelIndex, int bufferIndex) { // #define get_packet_byte(c,b) // (BX_SELECTED_CONTROLLER((c)).buffer[(b)]) int result = channels[channelIndex].getSelectedController().getBuffer()[bufferIndex]; return result; } COM: <s> get packet byte </s>
funcom_train/47103944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Bounds checkBounds(int row, int col){ int rows = GameWorld.getInstance().getLand().length; int cols = GameWorld.getInstance().getLand()[0].length; if(row < 0 || row > rows-1 || col < 0 || col > cols-1) return Bounds.OUTSIDE; if(row == 0 || row == rows-1 || col == 0 || col == cols-1) return Bounds.BORDER; else return Bounds.INSIDE; } COM: <s> checks to see whether the specified row and column is on </s>
funcom_train/37721726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyTable() { TableCopyGUI tcg = new TableCopyGUI(); Dimension dim = tcg.getPreferredSize(); Util.newFrame(tcg, "Import", true, true, true, true, dim.width, dim.height + 20, tcg.cancel, admin); } COM: <s> copy a table </s>
funcom_train/3102276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getLineIndentation(final IDocument document, final int offset) throws BadLocationException { Assertion.valid(document); Assertion.nonNegative(offset); final IRegion region= document.getLineInformationOfOffset(Math.min(document.getLength() - 1, offset)); final int start= region.getOffset(); final int end= getWhitespaceEnd(document, start, offset); if (end > start) { return document.get(start, end - start); } return ""; //$NON-NLS-1$ } COM: <s> returns the line indentation of the line containing the specified offset </s>
funcom_train/43557366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String formatInt(int intVal){ String hexStr = Integer.toHexString(intVal); StringBuffer buf = new StringBuffer("00000000"); int start = 8 - hexStr.length(); // >= 0 buf.replace(start, 8, hexStr); return buf.toString(); } COM: <s> int val 0 length 8 string </s>
funcom_train/47534136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MPDStatus getStatus() throws MPDServerException { long time = System.currentTimeMillis(); // update only if last update is older than 1 sec if (time-statustime > 1000) { List<String> response = mpdConnection.sendCommand(MPD_CMD_STATUS); mpdStatus.updateStatus(response); } return mpdStatus; } COM: <s> retrieves status of the connected server </s>
funcom_train/22395686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NetworkAccountNode findAccountForConfig(AccountConfig accountConfig) { NetworkAccountNode[] networkAccounts = getNetworkAccounts(); for(int i=0; i<networkAccounts.length; i++) { if(accountConfig.equals(networkAccounts[i].getAccountConfig())) { return networkAccounts[i]; } } return null; } COM: <s> find the account node matching the provided account configuration </s>
funcom_train/20394402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getCssSelector(Control control) { String selector = ClickUtils.getCssSelector(control); if (selector == null) { throw new IllegalArgumentException("No selector could be found for" + " the control: " + control.getClass().getName() + "#" + control.getName()); } return selector; } COM: <s> get the css selector for the given control </s>
funcom_train/35054031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initGlobalLayout() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setTitle("Factory Demo"); _contentPane = (JPanel) getContentPane(); _contentPane.setLayout( new BoxLayout(_contentPane, BoxLayout.PAGE_AXIS)); _contentPane.setMinimumSize(new Dimension(300, 180)); _contentPane.setPreferredSize(_contentPane.getMinimumSize()); _contentPane.setBorder( BorderFactory.createEmptyBorder(20, 20, 20, 20)); } // initGlobalLayout COM: <s> does the initialization of the global layout </s>
funcom_train/2408304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { CharIntMap out = new CharIntMap(); out.lowest = lowest; out.defaultValue = defaultValue; if (array != null) { out.array = new int[array.length]; System.arraycopy(array, 0, out.array, 0, array.length); } return out; } COM: <s> returns a deep clone of this char int map </s>
funcom_train/35872620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(WMSParameters params) throws CacheException { String key = generateKey(params); if(key != null && key.length() > 0) { try { cache.remove(key); } catch(NullPointerException npe) { log.error("Cache not setup: ", npe); throw new CacheException(npe); } catch(CacheException ce) { log.error("Could not remove tile from cache: " + key, ce); } } else { log.error("Could not remove tile from cache, key is missing."); } } COM: <s> removes a tile from the cache </s>
funcom_train/13111008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getStringValue(Object value) { String svalue = null; if (value == null) { svalue = "-"; } else if (value instanceof Boolean) { svalue = Msg.getMsg(Env.getCtx(), ((Boolean)value).booleanValue() ? "Yes" : "No"); } else if (value instanceof Timestamp) { SimpleDateFormat df = DisplayType.getDateFormat(); svalue = df.format((Timestamp)value); } else { svalue = value.toString(); } return svalue; } COM: <s> translated string representation of the provided value </s>
funcom_train/17468357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(GeneratedMessage.GeneratedExtension<?, ?> extension) { if (extension.getDescriptor().getJavaType() == FieldDescriptor.JavaType.MESSAGE) { add(new ExtensionInfo(extension.getDescriptor(), extension.getMessageDefaultInstance())); } else { add(new ExtensionInfo(extension.getDescriptor(), null)); } } COM: <s> add an extension from a generated file to the registry </s>
funcom_train/7344606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj instanceof SimplePooledConnection) { return realConnection.hashCode() == (((SimplePooledConnection) obj).realConnection.hashCode()); } else if (obj instanceof Connection) { return hashCode == obj.hashCode(); } else { return false; } } COM: <s> allows comparing this connection to another </s>
funcom_train/32906300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int computeDelay() { // Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) // and the specified value (exclusive), drawn from this random number // generator's sequence int randomWait = random.nextInt( MAX_VAR_DELAY + 1 ); return BASE_DELAY + randomWait; } COM: <s> evaluate random delay time between base delay and base delay max var delay </s>
funcom_train/24000641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetType() throws Exception { JOCLAstParser p = new JOCLAstParser(OclTypeRegistry.OclBooleanType); p.define("self", OclTypeRegistry.OclBooleanType); OclExpressionAst ast = p.parse("self"); OclParsedExpression instance = new OclParsedExpression((LetAst)ast); assertEquals(OclTypeRegistry.OclBooleanType,instance.getType()); } COM: <s> test of get type method of class ocl parsed expression </s>
funcom_train/18094498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g){ this.makeMediumFont(g); g.setColor(255, 255, 255); g.fillRect(0, 0, getWidth(), getHeight()); g.setColor(0,0,0); this.drawKeyConf(g); } COM: <s> paints this screen </s>
funcom_train/41489896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toXML() { return "<position class='" + getClass().getName() + "' id='" + getId() + "' >" + (getJobDescription() == null ? "" : getJobDescription().toXML()) + (getDepartment() == null ? "" : getDepartment().toXML()) + "</position>"; } COM: <s> lt position class xperiment </s>
funcom_train/3516822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exportXML(String targetUser, String fileName) throws RemoteException, IOException { /* throws RemoteException */ JavaSpace05 space = locateSpace(Resources.LOCAL_SPACE); JavaSpaceExport exporter = new JavaSpaceExport(service.getBadge(), service.getProjectName(), space); exporter.export(targetUser, fileName); } COM: <s> export the regular contents of the java space in an xml file </s>
funcom_train/49052970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QuerySet union(QuerySet qs) throws SQLException { hasRan(); unionSet = (unionSet == null) ? "\nUNION " + qs.compileSelect() : unionSet + "\nUNION " + qs.compileSelect(); unionData.addAll(qs.getData()); sourceTables.addAll(qs.getSourceTables()); return this; } COM: <s> accepts a select type queryset and builds </s>
funcom_train/3023311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reportAverageStatements(ProjectMetrics projectData) { // Public Methods double top = projectData.getStatementTotal(); double bottom = projectData.getMethodTotal(); System.out.println("[000] " + projectData.getStatementTotal() + " total number of statements in " + projectData.getMethodTotal() + " methods."); System.out.println("[000] " + "Average: " + (top / bottom)); } COM: <s> reports on the average number of statements </s>
funcom_train/8492826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getBpp() { if (bpp == null) { bpp = new JComboBox(); bpp.addItem("8"); // 0 bpp.addItem("16"); // 1 bpp.addItem("24"); // 2 bpp.addItem("32"); // 3 bpp.setBounds(new Rectangle(120, 95, 129, 21)); bpp.setSelectedIndex(2); } return bpp; } COM: <s> this method initializes bpp </s>
funcom_train/2287262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkParams() { if ((m_defaultCollectorName == null) || (m_defaultCollectorParam == null)) { throw new CmsIllegalArgumentException(Messages.get().container( Messages.ERR_COLLECTOR_DEFAULTS_INVALID_2, m_defaultCollectorName, m_defaultCollectorParam)); } } COM: <s> checks if the required parameters have been set </s>
funcom_train/1797588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAncestor(String ancestor) { // check if setting to existing value if (this.ancestor == null ? ancestor != null : !this.ancestor.equals(ancestor)) { // set to new value for customer parameter this.ancestor = ancestor; setStringCustomParameter("ancestor", ancestor); } } COM: <s> sets the content with the given ancestor </s>
funcom_train/5774401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getInVariant() { if (inVariant == null) { inVariant = new JTextField(); inVariant.setBounds(new java.awt.Rectangle(92,95,181,25)); inVariant.setEditable(true); } return inVariant; } COM: <s> this method initializes in variant </s>
funcom_train/11069893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDatamodelSimultaneousJexl() throws Exception { exec01 = SCXMLTestHelper.getExecutor(datamodel01jexl, new JexlContext(), new JexlEvaluator()); assertNotNull(exec01); exec02 = SCXMLTestHelper.getExecutor(datamodel01jexl, new JexlContext(), new JexlEvaluator()); assertNotNull(exec02); assertFalse(exec01 == exec02); runtest(); } COM: <s> test the stateless model simultaneous executions </s>
funcom_train/38297465
/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) { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(1); gridLayout.setColumns(2); jPanel = new JPanel(); jPanel.setLayout(gridLayout); jPanel.setPreferredSize(new Dimension(20, 20)); jPanel.add(getJButtonOk(), null); jPanel.add(getJButtonCancel(), null); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/26529216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addScheduleData(EVSchedule schedule) { schedule.calcIndividualValues(); Iterator i = schedule.periods.iterator(); while (i.hasNext()) addPeriodData((Period) i.next()); // add data in the EVMetrics objects. ((EVMetricsRollup) metrics).addMetrics(schedule.getMetrics()); } COM: <s> sum period data from the given schedule into this schedule </s>
funcom_train/11023387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testProtectedParentMethod() { String property = "protectedMapped"; Class clazz = MappedPropertyChildBean.class; try { MappedPropertyDescriptor desc = new MappedPropertyDescriptor(property, clazz); fail("Property '" + property + "' found in " + clazz.getName()); } catch (Exception ex) { } } COM: <s> test protected method in parent </s>
funcom_train/24139189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int computeElementHashCode(){ int hashCode = 1; Iterator<T> i = elements.iterator(); while (i.hasNext()) { T obj = i.next(); hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode()); } return hashCode; } COM: <s> computes hashcode of collection without </s>
funcom_train/14012109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enqueueTask(TaskQueueHandle taskQueue, Runnable task) { synchronized (taskQueueMap) { List taskList = (List) taskQueueMap.get(taskQueue); if (taskList == null) { taskList = new ArrayList(); taskQueueMap.put(taskQueue, taskList); } taskList.add(task); } } COM: <s> enqueues a task to be run during the next client server </s>
funcom_train/45018390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRunNumberPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXentry_runNumber_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXentry_runNumber_feature", "_UI_NXentry_type"), NexusPackageImpl.Literals.NXENTRY__RUN_NUMBER, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the run number feature </s>
funcom_train/22033413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearSwitches(DataRenderer re) { Enumeration pairs = ((Vector) switches.clone()).elements(); while (pairs.hasMoreElements()) { SwitchSet ss = (SwitchSet) pairs.nextElement(); if (ss.renderer.equals(re)) { switches.removeElement(ss); } } } COM: <s> clear all pairs in switches that involve re </s>
funcom_train/34053283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateProgress(final int progress, final int max) { handler.post(new Runnable() { @Override public void run() { dialog.setMessage(context.getText(R.string.import_progress_loading)); if (max != -1) { dialog.setMax(max); } dialog.setProgress(progress); } }); } COM: <s> updates the progress bar in the dialog </s>
funcom_train/34889189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRetryMessage() { String msg = null; if (this.retries == 0) { msg = "First try. " ; if (this.maxRetries != 0) { msg += " Will make "; } } else if (this.retries == 1) { msg = "1 of "; } else { msg = this.retries + " of "; } msg = msg + getMaxRetryMessage(); return msg; } COM: <s> provides a retry message for logging </s>
funcom_train/12245108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setF0ValueVector(Vector vec) { // System.err.println("tmpVec: "+Util.printVec(vec)); Vector<F0Val> tmp = new Vector<F0Val>(vec.size()); for (int i = 0; i < vec.size(); i++) { int pos = i * (100 / vec.size()); tmp.add(new F0Val(pos, (Integer) vec.elementAt(i))); } setF0vals(tmp); // System.err.print(toString()); } COM: <s> set a new f0 contour placed equidistantly </s>
funcom_train/39172076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void toolLoaded(Resource res) { List<Action> actions = ((ActionsPublisher)res).getActions(); List<JMenuItem> items = new ArrayList<JMenuItem>(); for(Action a : actions) { items.add(addMenuItem(a)); } itemsByResource.put(res, items); } COM: <s> add the actions published by the given tool to their appropriate </s>
funcom_train/50159830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getVocabLogString( String metadataVocabString ) { StringBuffer out = new StringBuffer(); out.append( "<lc>" + getVocabStripped( "learningcontext", metadataVocabString ) + "</lc>" ); out.append( "<rt>" + getVocabStripped( "resourcetype", metadataVocabString ) + "</rt>" ); return out.toString(); } COM: <s> gets the metadata vocab criteria selected at the time of the query </s>
funcom_train/42035658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean queueUI(long delay, Runnable runnable) { synchronized(RokonActivity.runnableLock) { for(int i = 0; i < MAX_RUNNABLE; i++) { if(Scene.uiRunnable[i] == null) { Scene.uiRunnable[i] = runnable; uiRunnableTime[i] = delay + Time.getDrawTicks();; return true; } } return false; } } COM: <s> queues a runnable to be executed after a given delay </s>
funcom_train/139935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUCSCQuery(){ BioSeq aseq = igbService.getSeqMapView().getAnnotatedSeq(); if (aseq == null) { return ""; } String UcscVersion = getUcscGenomeVersion(aseq.getVersion()); if(!UcscVersion.isEmpty()){ return "db=" + UcscVersion + "&position=" + getRegionString(); } return ""; } COM: <s> generates part of ucsc query url for current genome coordinates </s>