__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/4973163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPelvicCircleInstrument() { PelvicCircleInstrument instrument = new PelvicCircleInstrument(); int retcode= PelvicCircleEditor.makeDialog((JFrame)BoogiepantsDisplayWindow.getInstance(), instrument); if(retcode==PelvicCircleEditor.SUCCESS){ instrumentContainer.add(instrumentContainer.getLastPushed(), instrument); instrumentContainer.displayNew(); } } COM: <s> adds a new pelvic circle instrument to the current instrument group </s>
funcom_train/870178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testGetXLinkType() { try { List<Xlink> fragments = store.<Xlink>getXMLResources("Arc"); AssertJUnit.assertTrue(fragments.size() > 0); Xlink fragment = fragments.get(0); AssertJUnit.assertEquals("arc", fragment.getXlinkType()); } catch (XBRLException e) { Assert.fail(e.getMessage()); } } COM: <s> test getting the type of xlink fragment </s>
funcom_train/22034468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupServer() throws VisADException, RemoteException { MDisplay = new DisplayImplJ2D(Name + "_Messenger", null); RemoteMDisplay = new RemoteDisplayImpl(MDisplay); MDisplay.addMessageListener(this); CollabID = 0; setDimension(JAVA2D_2D); } COM: <s> sets up data needed for this cell to be a server </s>
funcom_train/14226765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putByteArray(byte byteArray[], int pos) throws ByteBufferException { if (pos + byteArray.length <= buffer.length) { System.arraycopy(byteArray, 0, buffer, pos, byteArray.length); } else throw new ByteBufferException("ByteBuffer index of bound"); } COM: <s> stores a byte array in a given position of the buffer </s>
funcom_train/25528716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void afterMove() { if (!Silent) // DEBUG LINES synchronized (System.err) { System.err.println(this.getName() + ":" + "Move finished..."); } ////////////// super.afterMove(); // Inform dispatcher on complete move addBehaviour(new InformForCompleteMoveBehaviour()); } COM: <s> updates dispatcher upon arrival to target container </s>
funcom_train/44790652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setB(float b) { float[] lab = this.getLab(); lab[2] = b; ColorimetricColor c = new ColorimetricColor(lab[0], lab[1], lab[2]); this.redRGB = c.getRedRGB(); this.greenRGB = c.getGreenRGB(); this.blueRGB = c.getBlueRGB(); } COM: <s> set the second chromatic component in the cielab color reference system </s>
funcom_train/23245804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PreparedStatement prepareStatement(final String sql) { try { PreparedStatement preparedStatement; preparedStatement = getConnection().prepareStatement(sql); return preparedStatement; } catch (SQLException e) { throw new OsmosisRuntimeException( "Unable to create database prepared statement.\n" + "SQL=" + sql + "\n" + "DB-URL=" + this.myDatabaseURL + "\n" + "Schema-Version=" + getSchemaVersion(), e); } } COM: <s> creates a new database prepared statement </s>
funcom_train/29296751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object retrieveSingleObjectMatching(StrataObject anObject, Query aQuery) { TunnelAgent theRequestAgent = new TunnelAgent(); theRequestAgent.setServiceObject(anObject); theRequestAgent.setServiceObjectMethodName("retrieveSingleObjectMatching"); theRequestAgent.addParameter(aQuery); theRequestAgent.setReturnObjectType(StrataObject.class); TunnelAgent theResponseAgent = service(theRequestAgent); Object theObject = theResponseAgent.getReturnObject(); return theObject; } COM: <s> retrieve single object matching method comment </s>
funcom_train/25798372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getAlbums(final DataResponse<ArrayList<Album>> response, final Context context) { mHandler.post(new Command<ArrayList<Album>>(response, this) { @Override public void doRun() throws Exception { response.value = music(context).getAlbums(MusicManager.this, getSortBy(SortType.ALBUM), getSortOrder()); } }); } COM: <s> gets all albums from database </s>
funcom_train/21711024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEvictable() { if (isEvictionProhibited()) { return false; } /* * An IN can be evicted if its resident children are all LNs, because * those children can be logged and stripped before this node is * evicted. */ if (hasNonLNChildren()) { return false; } return true; } COM: <s> returns whether this node can be evicted </s>
funcom_train/13693034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectLinksOnSelectedNodes(){ GuiLink tmplink = null; for(Enumeration en = links.elements(); en.hasMoreElements();) { tmplink = (GuiLink)en.nextElement(); if (tmplink == null) continue; if (tmplink.source.selectionMode || tmplink.target.selectionMode) { tmplink.setSelectionMode(true); } } repaint(); } COM: <s> selects links which touch selected nodes </s>
funcom_train/48406531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDirectionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_WorkDefinitionParameter_direction_feature"), getString("_UI_PropertyDescriptor_description", "_UI_WorkDefinitionParameter_direction_feature", "_UI_WorkDefinitionParameter_type"), SpemxtcompletePackage.eINSTANCE.getWorkDefinitionParameter_Direction(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the direction feature </s>
funcom_train/963334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int f(int x, int c, int k) { if (2 * x > c) { return 2 * (c / k) - 2 * (c - x) / k; } else if (2 * x < c) { return 2 * (x / k); } else { return c / k; } } COM: <s> calculates value of ccm dual feasible function for the given argument </s>
funcom_train/25195313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String visitDecorExpr(DecorExpr theDecorExpr){ final StringBuilder result = new StringBuilder(); result.append(indentString + "<DecorExpr>"); indent(); result.append(visit(theDecorExpr.getExpr())); outdent(); result.append(indentString + "</DecorExpr>"); return result.toString(); } COM: <s> decor expr visit the expr </s>
funcom_train/21081093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeArea(Long accessorId, Visibility visibility) { File dir = new File(getBaseDir(accessorId, visibility)); LOGGER.debug("deleting "+ dir); if (IOHelper.delete(dir)) { LOGGER.debug(dir + " deleted"); } else { LOGGER.warn(dir + " could not be deleted"); } } COM: <s> remove the area of the given accessor for the given visibility </s>
funcom_train/26324529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAlign(int align) throws FCException { switch (align) { case LEFT: align = SwingConstants.LEFT; break; case CENTER: align = SwingConstants.CENTER; break; case RIGHT: align = SwingConstants.RIGHT; break; default: throw new FCException("Illegal alignment."); } _textPane.setAlignmentX(align); _list.setAlignmentX(align); } COM: <s> sets the alignment of text in this fcfield </s>
funcom_train/19537638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getInitiativeToken() { InitiativeList list = MapTool.getFrame().getCurrentZoneRenderer().getZone().getInitiativeList(); int index = list.getCurrent(); return index != -1 ? list.getToken(index).getId().toString() : ""; } COM: <s> get the token that has the current initiative </s>
funcom_train/7379063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel buildExecutorsPanel() { BoxLayout l = new BoxLayout(ongoingExecutorPanes, BoxLayout.Y_AXIS); ongoingExecutorPanes.setLayout(l); JScrollPane scrollPane = new JScrollPane(ongoingExecutorPanes); scrollPane.setPreferredSize(new Dimension(500, 400)); JPanel pane = new JPanel(); pane.setBorder(BorderFactory.createTitledBorder("Ongoing")); pane.setLayout(new BorderLayout(5, 5)); pane.add(scrollPane, BorderLayout.CENTER); return pane; } COM: <s> builds the panel with the executors </s>
funcom_train/7827359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addGradientItems(Menu menu, MenuItemListener menuListener) { if (menu.getItemCount() != 0) { new MenuItem(menu, SWT.SEPARATOR); } menuListener.customGradientMI = new MenuItem(menu, SWT.NONE); menuListener.customGradientMI.setText(GraphicsExample.getResourceString("Gradient")); //$NON-NLS-1$ menuListener.customGradientMI.addListener(SWT.Selection, menuListener); GraphicsBackground gb = new GraphicsBackground(); menuListener.customGradientMI.setData(gb); } COM: <s> adds the gradient menu item </s>
funcom_train/26328174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run_insert( data_table_model disp_t, data_table_model upd_t,JFrame fram_) { fram_.getGlassPane().setVisible(true); inserter c1 = new inserter(disp_t,upd_t,fram_); Thread util1 = new Thread(c1); util1.start(); } COM: <s> basically just fires the thread to insert into table </s>
funcom_train/1069059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStereotypeDisplay(Stereotype st) { // bugfix: a selected element is not necessary a diagram element (ex: selection in the outline) if(getDiagramElement() == null) { return; } // property to add creation com.cea.papyrus.diagraminterchange2.di2.Property property = Di2Factory.eINSTANCE.createProperty(); property.setKey(ModelerHelper.PROPERTY_STEREOTYPE_DISPLAY); property.setValue(st.getQualifiedName()); // add the property getDiagramElement().getProperty().add(property); } COM: <s> add a stereotype to the list of stereotypes to display </s>
funcom_train/31294128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resultRejected(final ResultEvent resultEvent) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("result rejected"); } final Result result = (Result) resultEvent.getSource(); final RecognitionResult recognitionResult = new Jsapi10RecognitionResult(result); final SpokenInputEvent event = new SpokenInputEvent(input, SpokenInputEvent.RESULT_REJECTED, recognitionResult); input.fireInputEvent(event); } COM: <s> an code result rejected code event has occured indicating that a </s>
funcom_train/1813201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePlayerState() { if (mp != null) { if (enabled && playingMusic > 0) { if (!mp.isPlaying()) { Log.i(TAG, "Starting music"); mp.start(); Toast.makeText(this, getText(R.string.musicOn), Toast.LENGTH_SHORT).show(); } } else { if (mp.isPlaying()) { Log.i(TAG, "Stopping music"); mp.stop(); Toast.makeText(this, getText(R.string.musicOff), Toast.LENGTH_SHORT).show(); } } } } COM: <s> starts and stops music player </s>
funcom_train/36680442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMap(String category, Map map) { if (!maps.containsKey(map.getMapName())) { maps.put(map.getMapName(), map); addMapCategory(category, new Map(map)); } else { logger.warn("Map name " + map.getMapName() + " is already cached"); } } COM: <s> add the map to the map cache and to the category </s>
funcom_train/28494426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onSelectionChanged(SelectionChangedEvent event) { if(event.getSelection() instanceof IStructuredSelection) { IStructuredSelection selection = (IStructuredSelection) event.getSelection(); Property prop = (Property) selection.getFirstElement(); if(prop != null) _viewer.setCellEditors(new CellEditor[] {new TextCellEditor(), prop.getCellEditor(_table)}); } } COM: <s> called if a table row is selected </s>
funcom_train/13209442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEverythingOccupied(int[][] field) { for (int l=0; l<field.length; l++) { for (int r=0; r<field.length; r++) { if (field[l][r]==-1) return false; } } return true; } COM: <s> retursn true if all fields are occupied </s>
funcom_train/20367321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeCollisions(Set parentSet, Set childSet) { if (parentSet == null || childSet == null) return; Iterator parents = parentSet.iterator(); while (parents.hasNext()) { EnhancedPosition parentRegion = (EnhancedPosition) parents.next(); if ( ((JavaPositionMetadata)parentRegion.getMetadata()).isOverlap() && hasCollision(parentRegion, childSet)) { parents.remove(); } } } COM: <s> determines what regions in the parent list collide with regions in the </s>
funcom_train/25457544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getCBUserRunNo() { if (CBUserRunNo == null) { CBUserRunNo = new JCheckBox(); CBUserRunNo.setSelected(false); CBUserRunNo.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { if (CBUserRunNo.isSelected()) { CBSameSeed.setSelected(false); } } }); } return CBUserRunNo; } COM: <s> this method initializes cbuser run no </s>
funcom_train/50862596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWorkTime(double workTime) { completedWorkTime += workTime; if (completedWorkTime > getRequiredWorkTime()) { completedWorkTime = getRequiredWorkTime(); } // Fire construction event if (isSalvaging) { site.fireConstructionUpdate(ADD_SALVAGE_WORK_EVENT, this); } else { site.fireConstructionUpdate(ADD_CONSTRUCTION_WORK_EVENT, this); } } COM: <s> adds work time to the construction stage </s>
funcom_train/45758218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putAll(Map t) { cleanUp(); for (Iterator i = t.entrySet().iterator(); i.hasNext();) { Map.Entry e = (Map.Entry) i.next(); Object k = e.getKey(); map.put(k, new Entry(k, e.getValue(), queue)); } } COM: <s> copies all of the mappings from the specified map to this map </s>
funcom_train/10521739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setReturnType(Class returnType, QName xmlReturnType) { if (!_isOneWay && returnType != void.class) { super.setReturnType(returnType, xmlReturnType); } else { _call.setReturnType(XMLType.AXIS_VOID); } } COM: <s> set the return type for the call </s>
funcom_train/4510896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sessionUnavailable(LocalClientSession session) { if (session.getAddress() != null && routingTable != null && session.getAddress().toBareJID().trim().length() != 0) { // Update route to unavailable session (anonymous or not) routingTable.addClientRoute(session.getAddress(), session); } } COM: <s> notification message sent when a client sent an unavailable presence for the session </s>
funcom_train/5462188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlLastModifiedProperty(Property property, Resource parentNode, RDFContainer rdfContainer) { Node propertyValue = getRdfPropertyValue(rdfContainer, property, IcalDataType.DATE_TIME); addStatement(rdfContainer, parentNode, NCAL.lastModified, propertyValue); } COM: <s> crawls the last modified property </s>
funcom_train/45452498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructorAccessors() throws Exception { String possibleAnswer = "Test answer"; PossibleAnswer testPossibleAnswer = new PossibleAnswer(testQuestionType, possibleAnswer); assertNotNull("Unable to create possible answer", testPossibleAnswer); assertEquals("Possible answer inconsistent", possibleAnswer, testPossibleAnswer.getValue()); } COM: <s> test creating a possible answer and using its accessors </s>
funcom_train/2805016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CompRoot getDefaultValue(String objectName) { Class targetClass = commands.getClass(); try { Field targetField = targetClass.getField(objectName); try { return (CompRoot) targetField.get(commands); } catch (IllegalAccessException e) {} } catch (NoSuchFieldException e) {} return null; } COM: <s> obtains the default value for a field </s>
funcom_train/49018385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getShuffleFile() { int index = (int) (new Random().nextFloat() * hmItems.size()); ArrayList<File> files = new ArrayList<File>(FileManager.getInstance().getFiles()); if (files.size() == 0) { return null; } return files.get(index); } COM: <s> return a shuffle mounted file from the entire collection </s>
funcom_train/18049365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void highlightLastRow(int row) { int lastrow = svEditFieldsTable.getRowCount(); if (row == lastrow - 1) { svEditFieldsTable.setRowSelectionInterval(lastrow - 1, lastrow - 1); } else { svEditFieldsTable.setRowSelectionInterval(row + 1, row + 1); } svEditFieldsTable.setColumnSelectionInterval(0, 0); } COM: <s> highlights the rows of the table until the end </s>
funcom_train/17201344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateClass(RVMClass klass, FieldLayoutContext fieldLayout) { /* * Save the new field layout. */ klass.setFieldLayoutContext(fieldLayout); klass.setInstanceSizeInternal(ObjectModel.computeScalarHeaderSize(klass) + fieldLayout.getObjectSize()); klass.setAlignment(fieldLayout.getAlignment()); } COM: <s> update the rvmclass with context info </s>
funcom_train/18807892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHashcode() { final Millisecond m1 = new Millisecond(599, 23, 45, 7, 9, 10, 2007); final Millisecond m2 = new Millisecond(599, 23, 45, 7, 9, 10, 2007); assertTrue(m1.equals(m2)); final int hash1 = m1.hashCode(); final int hash2 = m2.hashCode(); assertEquals(hash1, hash2); } COM: <s> two objects that are equal are required to return the same hash code </s>
funcom_train/17207308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String formatStats() { String policy = formatPolicy(); if (!policy.equals("")) { policy = " ("+policy+")"; } return String.format("%s, %d yields%s%n",thread.getName(),yieldCount,policy); } COM: <s> format yield statistics as a string </s>
funcom_train/9558904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeState(DataOutputStream dos) throws IOException { dos.writeInt(MBEANS_STATE_FILE_VERSION_1); dos.writeInt(mbeanServers.size()); synchronized(mbeanServers) { Iterator<JmxMBeanServer> it = mbeanServers.iterator(); while (it.hasNext()) { JmxMBeanServer mbeanServer = it.next(); dos.writeUTF(mbeanServer.getJmxServiceUrl().toString()); dos.writeUTF(mbeanServer.getDisplayName()); } } dos.flush(); dos.close(); } COM: <s> write the mbean servers list to the given stream </s>
funcom_train/8085466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean copyToClipboard() { StringSelection selection; Clipboard clipboard; if (m_Info.getSelectedIndices().length != 1) return false; selection = new StringSelection(((JLabel) m_Info.getSelectedValue()).getText()); clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); clipboard.setContents(selection, selection); return true; } COM: <s> copies the currently selected error message to the clipboard </s>
funcom_train/9559169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChart(JFreeChart chart) { // stop listening for changes to the existing chart if (this.chart != null) { this.chart.removeChangeListener(this); this.chart.removeProgressListener(this); } // add the new chart this.chart = chart; if (chart != null) { this.chart.addChangeListener(this); this.chart.addProgressListener(this); } this.refreshBuffer = true; } COM: <s> sets the chart that is displayed in the panel </s>
funcom_train/22895497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Symbol inCryptoPeekKey() { if (false == this.inCrypto()) { throw new IllegalStateException(__me + ".inCryptoPeekKey(): " + "invoked outside in-crypto context!"); } if (this.keyStack.isEmpty()) { throw new RuntimeException(__me + ".inCryptoPeekKey(): " + "empty key stack, should NOT happen!"); } return (Symbol)this.keyStack.peek(); } COM: <s> in an in crypto context between calls to pre post crypto return </s>
funcom_train/18643940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void warning(String details, Throwable exc) { if (m_session != null && m_session.getConfiguration() != null && m_session.getConfiguration().getServiceTracker() != null) { m_session.getConfiguration().getServiceTracker(). warning(m_session, details, exc); } } COM: <s> this method reports a warning regarding the processing </s>
funcom_train/1842738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBooleanProperty(String key, boolean defaultValue) { try { return getBooleanProperty(key); } catch (Exception e) { log.info("Taking default value ("+defaultValue+") for property "+key+" ("+e.getMessage()+")"); return defaultValue; } } COM: <s> retrieve a boolean property along certain typical boolean values </s>
funcom_train/18398200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Webflow getWebflowByIndex(int index) { Webflow webflow = null; if (webflowStack.size() > index) { webflow = (Webflow) webflowStack.elementAt(index); } else if (webflowStack.size() > 0) { webflow = (Webflow) webflowStack.elementAt(webflowStack.size() - 1); } return webflow; } COM: <s> gets a webflow given its index </s>
funcom_train/25134903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Insets parseInsets(String insets, String errorMsg) throws SAXException { StringTokenizer tokenizer = new StringTokenizer(insets); return new Insets(nextInt(tokenizer, errorMsg), nextInt(tokenizer, errorMsg), nextInt(tokenizer, errorMsg), nextInt(tokenizer, errorMsg)); } COM: <s> convenience method to return an insets object </s>
funcom_train/22844124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFactory(Factory factory) { String nameOfGood = factory.product.goodName; int countOfGoods = factory.product.onStorage; /** Print out some Info */ System.out.println("We can buy here up to " + countOfGoods + " " + nameOfGood); /** So let us buy one of them */ server.buyGoods(factory.number, 1); } COM: <s> the info is here </s>
funcom_train/9363998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void prepareView(View view) { // Take requested dimensions from child, but apply default gravity. FrameLayout.LayoutParams requested = (FrameLayout.LayoutParams)view.getLayoutParams(); if (requested == null) { requested = new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT); } requested.gravity = Gravity.CENTER; view.setLayoutParams(requested); } COM: <s> prepare the given view to be shown </s>
funcom_train/18239661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getBoundsInDeviceSpace(){ Rectangle rootBounds = rootGlyph.getBounds(); //must convert to device space Rectangle deviceBounds = new Rectangle( (int)(rootBounds.x *scaleFactor), (int)(rootBounds.y *scaleFactor), (int)(rootBounds.width *scaleFactor), (int)(rootBounds.height *scaleFactor) ); return deviceBounds; } COM: <s> get the bounds of this graphic context </s>
funcom_train/9237749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Action createAction() { return new Action( AliasWrapper.getAliasWrapper().getGroupName(), getName(), new ActionType[] {CoreActionType.UNKNOWN_COMMAND, }, getResponse(), getArguments(), ""); } COM: <s> creates an action corresponding to this alias </s>
funcom_train/33282377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node jsxFunction_parentNode() { if (currentNode_ == root_) { return null; } Node newNode = currentNode_; do { newNode = newNode.getParent(); } while (newNode != null && !isNodeVisible(newNode) && newNode != root_); if (newNode == null || !isNodeVisible(newNode)) { return null; } currentNode_ = newNode; return newNode; } COM: <s> moves to and returns the closest visible ancestor node of the current </s>
funcom_train/5437319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void finalize() throws Throwable { try { // Nothing to do if this Filter does not have a // descriptor. if(descriptor == null) { return; } long pointer = descriptor.getDescriptor(); PcapWrapper wrapper = PcapWrapper.newInstance(); wrapper.freeFilter(this); } finally { super.finalize(); } } COM: <s> frees the code associated with the filter </s>
funcom_train/11085745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Source marshal(InputStream is) throws IOException, ClassNotFoundException { Object obj = new ObjectInputStream(is).readObject(); Writer w = new StringWriter(); XStream xstream = new XStream(new DomDriver()); xstream.toXML(obj, w); String request = w.toString(); logger.debug("Remote invocation request: {}", request); return new StringSource(request); } COM: <s> marshal the byte content of the input stream to an xml source </s>
funcom_train/48338724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate() throws TupleException { super.validate(); if (null == lease) { throw new InvalidTupleException("Null lease for listen response (" + this + ")"); } else if (Duration.ANY >= duration) { throw new InvalidTupleException("Invalid duration (" + duration + ") for listen response (" + this + ")"); } } COM: <s> validate this listen response </s>
funcom_train/18052199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveXsdFolder(IPath path, IFolder now){ d.method("moveXsdFolder(IPath path="+path.toString()+", IFolder now="+now.getProjectRelativePath().toString()+")"); Element folder = getXsdFolder(path); folder.detach(); @SuppressWarnings("unused") Element newParent = getXsdFolder(now.getProjectRelativePath().removeFirstSegments(1).removeLastSegments(1).toString()); newParent.addContent(folder); setDirty(true); } COM: <s> move xsd folder </s>
funcom_train/45114544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCopyFileFromRemoteClientToServer() throws Exception{ File f = new File(ftpServer.getDefaultUserHomeDirectory(),"FTPRemoteClientTest3.class"); f.delete(); assertTrue(!f.exists()); ftpRemoteClient.copyFileFromRemoteClientToLocalMachine(".\\FTPRemoteClientTest2.class","FTPRemoteClientTest3.class"); assertTrue(f.exists()); assertTrue(f.delete()); ftpRemoteClient.closeFTPSession(); } COM: <s> verifies that coping file from remote machine to local machine </s>
funcom_train/43890275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RenderedOp bilinear(RenderedOp src) { // using filtered subsample operator to do a subsampling final ParameterBlockJAI pb = new ParameterBlockJAI("filteredsubsample"); pb.addSource(src); pb.setParameter("scaleX", new Integer(downsampleStep)); pb.setParameter("scaleY", new Integer(downsampleStep)); pb.setParameter("qsFilterArray", new float[] { 1.0f }); pb.setParameter("Interpolation", new InterpolationBilinear()); return JAI.create("filteredsubsample", pb); } COM: <s> performs a bilinear interpolation on the provided image </s>
funcom_train/24652958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PortalParameters toPortalParameters() throws OperatorException { PortalParameters pp = new PortalParameters(); pp.setCallback(getCallback()); pp.setFailure(getFailure()); pp.setSuccess(getSuccess()); pp.setName(getName()); if (getSkin() != null) { pp.setSkin(getSkin()); } return pp; } COM: <s> convert this model to the portal parameters object </s>
funcom_train/47145664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMenuSheet(MenuSheet ms) { if (m_msCurrent != null) { m_msCurrent.setVisible(false); } m_msCurrent = ms; if (m_msCurrent != null) { m_msCurrent.setVisible(true); } onMenuSheetSet(m_msCurrent); revalidate(); repaint(); } COM: <s> sets and displays a menu sheet </s>
funcom_train/3115259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showNow(Component invoker, int x, int y) { /** * To see if we should trigger a piemenu for event type of hyperlink if * not, trigger Denim's piemenu. */ if (showEventPieMenu(x, y)) { return; } this.invoker = invoker; super.showNow(invoker, x, y); } COM: <s> show the pie menu without delay </s>
funcom_train/46261642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawMe(Graphics g) { if(active){ //Color tempColor = g.getColor(); g.setColor(myColor); g.drawRect(Math.min(p1.x,p2.x), Math.min(p1.y,p2.y), Math.abs(p1.x-p2.x), Math.abs(p1.y-p2.y)); //g.setColor(tempColor); } } COM: <s> draw the selection box to the canvas </s>
funcom_train/37017869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void display(String keyStart){ for(int i= 0; i < theListToDisplay.size(); i++){ DisplayMetaFrame displayMetaFrame= (DisplayMetaFrame)theListToDisplay.elementAt(i); thePanel.add(displayMetaFrame); } thePanel.revalidate(); thePanel.repaint(); } COM: <s> display all the frames </s>
funcom_train/17489534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enable(String log_name) throws IOException { if (logstream == null) { // no logstream, so make one logfile_name = log_name; if (logfile_name != null) { logstream = new OutputStreamWriter(new FileOutputStream(new File(logfile_name))); } else { File lfile = createNewFile(logfile_prefix, logfile_suffix, logfile_dir); logfile_name = lfile.toString(); logstream = new OutputStreamWriter(new FileOutputStream(lfile)); } } logging = true; } COM: <s> enable logging making sure that there is an underlying logstream </s>
funcom_train/51572223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAuditFileGetSet() throws Exception { Uncle uncle = new Uncle(); assertNull(uncle.getAuditFile()); File auditFile = new File("myDir/myProject.audit"); uncle.setAuditFile(auditFile); assertEquals(auditFile, uncle.getAuditFile()); } COM: <s> test audit file get set </s>
funcom_train/19421219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepareOutput(HttpServletRequest req) { EaasyStreet.logTrace("[In] SavedSearchUserEdit.prepareOutput()"); super.prepareOutput(req); OptionListSourceFactory factory = new TableOptionListSourceFactory(); OptionListSource ols = factory.getOptionListSource("Authority"); if (ols != null) { List authorityOptions = ols.getOptions(); req.setAttribute("authorityOptions", authorityOptions); } EaasyStreet.logTrace("[Out] SavedSearchUserEdit.prepareOutput()"); } COM: <s> called by the code controller code to obtain unformatted </s>
funcom_train/9237866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean callChannelModeChanged(ChannelInfo cChannel, ChannelClientInfo cChannelClient, String sHost, String sModes) { CallbackOnChannelModeChanged cb = (CallbackOnChannelModeChanged)getCallbackManager().getCallbackType("OnChannelModeChanged"); if (cb != null) { return cb.call(cChannel, cChannelClient, sHost, sModes); } return false; } COM: <s> callback to all objects implementing the channel mode changed callback </s>
funcom_train/40792926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand1() { if (cancelCommand1 == null) {//GEN-END:|78-getter|0|78-preInit // write pre-init user code here cancelCommand1 = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|78-getter|1|78-postInit // write post-init user code here }//GEN-BEGIN:|78-getter|2| return cancelCommand1; } COM: <s> returns an initiliazed instance of cancel command1 component </s>
funcom_train/42090359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Resource diffResource(Resource refMod, Resource runMod){ result=resEnv.createInterResource(); result.getContents().addAll(EcoreUtil.copyAll(refMod.getContents())); diffElem((EObject)result.getContents().iterator().next(),(EObject)runMod.getContents().iterator().next()); return result; } COM: <s> calculate about if we want to change run mod to just the </s>
funcom_train/46660479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int toPacked() { int yi = Math.round(y * 1023); int ui = Math.round((u + 0.5f) * 1023); int vi = Math.round((v + 0.5f) * 1023); yi = Math.max(0, Math.min(yi, 1023)); ui = Math.max(0, Math.min(ui, 1023)); vi = Math.max(0, Math.min(vi, 1023)); return yi << 20 | ui << 10 | vi; } COM: <s> convert this color to 30 bit quantized packed approximation </s>
funcom_train/1481196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Token next(final Token reusableToken) throws IOException { assert reusableToken != null; if (iter == null) iter = lst.iterator(); // Since this TokenStream can be reset we have to maintain the tokens as immutable if (iter.hasNext()) { Token nextToken = (Token) iter.next(); return (Token) nextToken.clone(); } return null; } COM: <s> returns the next token out of the list of cached tokens </s>
funcom_train/2578251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RectangleConstraint toUnconstrainedHeight() { if (this.heightConstraintType == LengthConstraintType.NONE) { return this; } else { return new RectangleConstraint(this.width, this.widthRange, this.widthConstraintType, 0.0, this.heightRange, LengthConstraintType.NONE); } } COM: <s> returns a constraint that matches this one on the width attributes </s>
funcom_train/10907120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateTf(String fontName, double fontSize, boolean multiByte) { checkInTextObject(); if (!fontName.equals(this.currentFontName) || (fontSize != this.currentFontSize)) { writeTJ(); this.currentFontName = fontName; this.currentFontSize = fontSize; this.useMultiByte = multiByte; writeTf(fontName, fontSize); } } COM: <s> updates the current font </s>
funcom_train/35492599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void message(List plrs, KonquestProtocolCommand msg) { Iterator iter = plrs.iterator(); while(iter.hasNext()) { Player plr = (Player) iter.next(); ClientConnection con = (ClientConnection) playerConnections.get(plr); con.sendMessage(msg); } } COM: <s> sends a message to a list of players </s>
funcom_train/17785413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBasicEnums() { delayTestFinish(TEST_DELAY); getService("testBasicEnums").echo_BasicEnums(Basic.A, new AsyncCallback<Basic>() { public void onFailure(Throwable caught) { rethrowException(caught); } public void onSuccess(Basic result) { assertEquals(Basic.A, result); finishTest(); }}); } COM: <s> test that basic enums can be used over rpc </s>
funcom_train/37565014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void evaluate() { QueryTranslator.setUrlBoost(scoreParams[0] / scoreParams[2]); QueryTranslator.setAnchorBoost(scoreParams[1] / scoreParams[2]); QueryTranslator.setPhraseBoost(phraseParam / (1 - phraseParam)); this.score = testNutch(); } COM: <s> finds the score for this parameter setting </s>
funcom_train/50229115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AppConfig loadAppConfigFromJNDI() { try { Context initCtx = new InitialContext(); Context envCtx = (Context)initCtx.lookup("java:comp/env"); AppConfig config = (AppConfig)envCtx.lookup(jndiConfigResource); if (config != null) { return config; } } catch (NamingException ignored) {} return null; } COM: <s> load the app config as a jndi resource </s>
funcom_train/11785776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int generateBarCode() { Account[] accs = getAllAccounts(); int[] codes = new int[accs.length]; for (int i = 0; i < accs.length; i++) { codes[i] = accs[i].getBarcode(); } Arrays.sort(codes); int barcode; for (barcode = 10000; barcode < codes.length + 10000; barcode++) { if (barcode != codes[barcode - 10000]) { return barcode; } } return barcode; } COM: <s> generates a bar code for a new account </s>
funcom_train/43133269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getWindowWidth() { String windowWidth = prop.getProperty("window.width"); if (windowWidth == null) { windowWidth = "800"; } try { return Integer.parseInt(windowWidth); } catch (NumberFormatException e) { logger.error("the window.width property is not an integer : "+e.getMessage()); return 800; } } COM: <s> get the windows width </s>
funcom_train/18787841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TaggedValue getOrAddTag(MetaElement element, TagDefinition definition) { TaggedValue tag = element.getTaggedValue(definition.getName()); if (tag == null) { tag = new TaggedValue("false", definition); element.addTaggedValue(tag); } return tag; } COM: <s> returns the required tag </s>
funcom_train/14360469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File f) { if (f != null) { if (f.isDirectory()) { return true; } String extension = getExtension(f); if (extension != null && this.filters.get(getExtension(f)) != null) { return true; } } return false; } COM: <s> return true if this file should be shown in the directory pane </s>
funcom_train/36189320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties getProperties() { Properties props = new Properties(); PSSProperty[] ps = m_ps.getProperties(); for (int i = 0; i < ps.length; i++) { if (ps[i].getValue() != PSSProperty.NO_VALUE) { props.put(ps[i].getName(), ps[i].getValue()); } } return props; } COM: <s> gets the list of properties </s>
funcom_train/12185221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTranscodingGIFToBMP() throws Throwable { InputStream stream = TestUtilities. doImageTranscodeTest(expectations, OutputImageRules.COLOURBMP24, "tcm.gif", null, true); RenderedOp image = JAI.create("ImageRead", ImageIO.createImageInputStream(stream)); image.getRendering(); } COM: <s> convert gif to 24 bit bmp 2007102509 </s>
funcom_train/25935587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printExampleOutput(String extractorName) throws IOException, ExtractionException { ExtractorFactory<?> factory = getFactory(extractorName); ExampleInputOutput example = new ExampleInputOutput(factory); String output = example.getExampleOutput(); if (output == null) { throw new IllegalArgumentException("Extractor " + extractorName + " provides no example output"); } System.out.println(output); } COM: <s> prints an output example for the given extractor </s>
funcom_train/12181511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { IWorkbenchPage activePage = PlatformUI.getWorkbench(). getActiveWorkbenchWindow(). getActivePage(); activePage.showView( "com.volantis.mcs.eclipse.ab.views" + ".layout.FormatAttributesView").setFocus(); } catch (PartInitException e) { EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e); } } COM: <s> the action ensures that the format attributes view associated with the </s>
funcom_train/32979840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean cacheWrite(String fullFilePath, String data) { /* cacheWrite */ try { String cacheFile= cacheFile= createCacheFileName(fullFilePath); boolean flag= writeFileToDisk(cacheFile, data); return(flag); } catch (Exception e) { return(false); } } /* cacheWrite */ COM: <s> cache write write string into file in local cache </s>
funcom_train/17498060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public ThrowStatement throwStatement() throws ParseException { Token b, e; Expression exp; b = jj_consume_token(THROW); exp = expression(); e = jj_consume_token(SEMICOLON); {if (true) return new ThrowStatement(exp, filename, b.beginLine, b.beginColumn, e.endLine, e.endColumn);} throw new Error("Missing return statement in function"); } COM: <s> parses a throw statement </s>
funcom_train/7541096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean endSequenceDetected(ICharacterScanner scanner) { int readCount = 1; int c; while ((c = scanner.read()) != ICharacterScanner.EOF) { if (fEndSequence.length > 0 && c == fEndSequence[0] && scanner.getColumn() == fColumn + 1) { // Check if the specified end sequence has been found. if (sequenceDetected(scanner, fEndSequence, true)) return true; } readCount++; } for (; readCount > 0; readCount--) scanner.unread(); return false; } COM: <s> returns whether the end sequence was detected </s>
funcom_train/49167617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void adjustSize(int windowWidth, int windowHeight) { int scrollWidth = windowWidth - body.getAbsoluteLeft() - 9; if (scrollWidth < 1) { scrollWidth = 1; } int scrollHeight = windowHeight - body.getAbsoluteTop() - 9; if (scrollHeight < 1) { scrollHeight = 1; } body.adjustSize(scrollWidth, scrollHeight); } COM: <s> adjusts the widgets size such that it fits within the windows client </s>
funcom_train/49651264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCancelCommand1() { if (cancelCommand1 == null) {//GEN-END:|94-getter|0|94-preInit // write pre-init user code here cancelCommand1 = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|94-getter|1|94-postInit // write post-init user code here }//GEN-BEGIN:|94-getter|2| return cancelCommand1; } COM: <s> returns an initiliazed instance of cancel command1 component </s>
funcom_train/39102220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsCommand(String commandName) { Assert.pre(commandName != null, "Parameter commandName is not null"); for (int i = stack.size() - 1; i >= 0; i--) { Context c = (Context) stack.elementAt(i); if (c.containsCommand(commandName)) return true; } return false; } COM: <s> search for the presence of a command name in the context stack </s>
funcom_train/39825012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onMessage(Message message) { if (message instanceof TextMessage) { TextMessage msg = (TextMessage) message; try { System.out.println("CONSUMER: Processing message: " + msg.getText()); } catch (JMSException e) { System.out.println("Exception in onMessage(): " + e.toString()); } } else { monitor.allDone(); } } COM: <s> casts the message to a text message and displays its text </s>
funcom_train/12663778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addField(final String name, final String fieldType) { final Properties types = getTypeProperties(); final String prefix = "type.field."; String fields = types.getProperty("type.fields"); types.setProperty(prefix + name + ".type", fieldType); types.setProperty("type.fields", addToPropertiesList(name, fields)); } COM: <s> adds a field to the type properties </s>
funcom_train/42773310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void recieve(MouseEvent me) { IFigure cursorTarget = getCursorTarget(); this.widgetUnderCursor = widgetFinder.getWidget(cursorTarget); if (cursorTarget != null && cursorTarget.getCursor() == null) { this.currentCursor = currentTool.getCursor(widgetUnderCursor != null ? widgetUnderCursor : me.widget, cursorTarget); if (me.widget instanceof Composite) { ((Composite)me.widget).setCursor(this.currentCursor); } } } COM: <s> updates the widget under the mouse event </s>
funcom_train/23467472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addConcretePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BoundProcessModel_concrete_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BoundProcessModel_concrete_feature", "_UI_BoundProcessModel_type"), TemplatePackage.Literals.BOUND_PROCESS_MODEL__CONCRETE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the concrete feature </s>
funcom_train/3556356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isWhitespace(char testChar) { try { return (_charFlags[testChar] & CHARFLAG_WHITESPACE) != 0; } catch (ArrayIndexOutOfBoundsException ex) { Integer extFlags = (Integer)_extCharFlags.get(new Integer(testChar)); return (extFlags != null && (extFlags.intValue() & CHARFLAG_WHITESPACE) != 0); } } COM: <s> this method checks if the character is a whitespace </s>
funcom_train/24243127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateString(int length) { String chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; String pass = ""; for (int x = 0; x < length; x++) { int i = (int) Math.floor(Math.random() * chars.length() - 1); pass += chars.charAt(i); } return pass; } COM: <s> generate a random string </s>
funcom_train/29903542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMark(String mark) { if ((mark!=null) && (this.mark!=null)) if (mark.compareTo(this.mark)==0) return; undoHistory.addFirst(this.getMark()); undoHistory.addFirst("setMark"); if (!JRipplesEIG.redoInProgress) clearRedoHistory(); this.mark = mark; JRipplesEIG .fireJRipplesEIGChanged(node, JRipplesEIGNodeEvent.NODE_MARK_CHANGED, JRipplesEIG.UNDOABLE); } COM: <s> associates eig mark with the node </s>
funcom_train/14377779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readString() throws IOException { int len = readInt(); if (len == -1) { return null; } if (len == 0) { return ""; } byte bb[] = new byte[len]; super.read(bb, 0, len); return new String(bb, 0, len); } COM: <s> reads a length specified string from a file </s>