__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/7627052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { synchronized(this) { try { mExternalCache.clear(); mNeedsCacheLoad = true; mDatabaseHelper.getWritableDatabase().delete(SSL_CACHE_TABLE, null, null); } catch (SQLException ex) { Log.d(TAG, "Error removing SSL cached entries ", ex); // ignore - nothing we can do about it } } } COM: <s> reset the database and internal state </s>
funcom_train/8357398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJTablesPanel() { if (jTablesPanel == null) { jTablesPanel = new JPanel(); jTablesPanel.setLayout(new BorderLayout()); jTablesPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,0,0,0)); jTablesPanel.add(getJFrequencyTablePanel(), java.awt.BorderLayout.NORTH); jTablesPanel.add(getJCountsTablePanel(), java.awt.BorderLayout.SOUTH); } return jTablesPanel; } COM: <s> this method initializes j table panel </s>
funcom_train/4519991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flipHorizontally() { int width = bufferedImage.getWidth(); int height = bufferedImage.getHeight(); BufferedImage result = new BufferedImage(width, height, BufferedImage.TYPE_INT_BGR); for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { int rgb = bufferedImage.getRGB(x, y); result.setRGB(width - x - 1, y, rgb); } } bufferedImage = result; } COM: <s> flips the image horizontally </s>
funcom_train/44079870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersects(Graphics g, CellView value, Rectangle r) { if (value instanceof EdgeView && g != null && value != null) { this.view = (EdgeView) value; installAttributes(view); Graphics2D g2 = (Graphics2D) g; if (g2.hit(r, createShape(), true)) return true; Rectangle2D rect = getLabelBounds(view); if (rect != null) return rect.intersects(r); } return false; } COM: <s> returns true if the edge shape intersects the given rectangle </s>
funcom_train/16454615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getColumnClass(int columnIndex) { Class clazz = String.class; switch (columnIndex) { case COLUMN_NAME: clazz = String.class; break; case COLUMN_LEVEL: clazz = YASLLoggingLevels.class; break; case COLUMN_TARGET: clazz = YASLLoggingTargets.class; break; } return clazz; } COM: <s> returns the most specific superclass for all the cell values in the </s>
funcom_train/2385906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IChatMessage createPrivateMessage(int aMessageId, IChatSender aSender, String aReceiver, String aText) { IChatTextMessage privateMessage = new IChatTextMessage(aMessageId, aSender, PRIVATE_TAG, aText, aReceiver); return privateMessage; } COM: <s> creates private i chat message </s>
funcom_train/10748472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHashCode() { StackTraceElement ste = new StackTraceElement("class", "method", "file", 1); StackTraceElement ste1 = new StackTraceElement("class", "method", "file", 1); assertEquals("hash codes should equal", ste.hashCode(), ste1.hashCode()); } COM: <s> method under test int hash code </s>
funcom_train/42435019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeleteUserA1() { try { User bj1 = (User) brianJones.clone(); adminServiceAPI.addUser(adminUser, bj1); ArrayList<User> registeredUsers = adminServiceAPI.getRegisteredUsers(adminUser); assertEquals(1, registeredUsers.size()); adminServiceAPI.deleteUser(adminUser, bj1); registeredUsers = adminServiceAPI.getRegisteredUsers(adminUser); assertEquals(0, registeredUsers.size()); } catch(CSTException exception) { exception.printErrors(); fail(); } } COM: <s> delete user from a one item list </s>
funcom_train/21609777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enqueue(QueueElementIF element) throws SinkException { if (DEBUG) System.err.println("httpConnection.enqueue: "+element); httpResponder resp = (httpResponder)element; httpResponse packet = resp.getResponse(); BufferElement bufarr[] = packet.getBuffers(resp.sendHeader()); tcpconn.enqueue_many(bufarr); } COM: <s> enqueue outgoing data on this connection </s>
funcom_train/32080916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean forceFocus () { checkWidget (); // if (display.focusEvent == SWT.FocusOut) return false; Decorations shell = menuShell (); shell.setSavedFocus (this); if (!isEnabled () || !isVisible () || !isActive ()) return false; if (isFocusControl ()) return true; shell.setSavedFocus (null); OS.UIElement_Focus (handle); if (isDisposed ()) return false; shell.setSavedFocus (this); return isFocusControl (); } COM: <s> forces the receiver to have the em keyboard focus em causing </s>
funcom_train/11659086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expression createExpression(TagScript script, String attributeName, String value) throws JellyException { ExpressionFactory factory = getExpressionFactory(script); TagLibrary tagLibrary = script.getTagLibrary(); if (tagLibrary != null) return tagLibrary.createExpression(factory, script, attributeName, value); return CompositeExpression.parse(value, factory); } COM: <s> creates an expression using the expression factory returned by get expression factory </s>
funcom_train/22760375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(BundleContext context) throws Exception { super.start(context); //add required icons: final String[] icons = new String[] { "icons/ckbox/checked.gif", //$NON-NLS-1$ "icons/ckbox/unchecked.gif", //$NON-NLS-1$ }; ImageRegistry imgReg = getImageRegistry(); for(int i=0;i<icons.length;i++) { imgReg.put(icons[i],getImageDescriptor(icons[i])); } } COM: <s> this method is called upon plug in activation </s>
funcom_train/20534860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getSalir() { if (Salir == null) { Salir = new JButton(); Salir.setText("Salir"); Salir.setSize(new Dimension(94, 34)); Salir.setLocation(new Point(173, 289)); Salir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.exit(0); } }); } return Salir; } COM: <s> this method initializes salir </s>
funcom_train/46629404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPracticesToProgram(Integer programId, Integer[] practiceIds, String token, Locale locale) throws ValidationFailedException, ProgramException, UserException, PracticeException, SessionExpiredException { for (Integer practiceId : practiceIds) { addPracticeByIdToProgram(programId, practiceId, token, locale); } } COM: <s> adds practices to a program </s>
funcom_train/48762228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double extractFeature( int start, int length ) { double total = 0; for( int i=start; i<start + length; i++ ) { total += series[i % series.length]; } //System.err.println( "extractFeature: total = " + total + // "; length = " + length ); return ((double)total/(double)length); } COM: <s> its unclear what the best feature extraction technique is </s>
funcom_train/39534637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeCellPanel(SVGVisualResourceObject resObj){ if(resObj!=null){ JPanel panel=(JPanel)cellPanels.get(resObj); if(panel!=null){ if(panel.getParent()!=null){ panel.getParent().remove(panel); } panel.removeAll(); } cellPanels.remove(resObj); } } COM: <s> removes the cell panel representing the given resource object </s>
funcom_train/11590467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int countColumns(HtmlNewspaperTable newspaperTable) { int columnCount = 0; for(Iterator it = newspaperTable.getChildren().iterator(); it.hasNext(); ) { UIComponent uiComponent = (UIComponent)it.next(); if (uiComponent instanceof UIColumn && ((UIColumn)uiComponent).isRendered()) { columnCount++; } } return columnCount; } COM: <s> count the number of columns in the speicifed newspaper table </s>
funcom_train/34128103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageIcon getImage( String name) { if (DEBUG) System.out.println("ImageLoader.getImage("+name+")"); ImageIcon icon = (ImageIcon)images.get(name); if (icon == null) { if (DEBUG) System.out.println("classLoader.findResource: "+((ExtensionClassLoader)classLoader).findResource(name)); icon = new ImageIcon(classLoader.getResource(name)); images.put(name, icon); } return icon; } COM: <s> gets an image for the string supplied </s>
funcom_train/42398821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String consumePostData(final HttpServletRequest request) throws IOException { Checker.notNull("parameter:request", request); final StringBuffer buf = new StringBuffer(); final char[] chars = new char[1024]; BufferedReader reader = null; try { reader = request.getReader(); while (true) { final int readCount = reader.read(chars); if (-1 == readCount) { break; } buf.append(chars, 0, readCount); } return buf.toString(); } finally { InputOutput.closeIfNecessary(reader); } } COM: <s> helper which consumes all of the post data from the given request and </s>
funcom_train/7618528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawPosText(String text, float[] pos, Paint paint) { if (text.length()*2 > pos.length) { throw new ArrayIndexOutOfBoundsException(); } native_drawPosText(mNativeCanvas, text, pos, paint.mNativePaint); } COM: <s> draw the text in the array with each characters origin specified by </s>
funcom_train/50177651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void detachObject(final DbObject obj) { obj.dbClass.data.deallocateDataIndex(obj.dataIndex); pageMapper.deallocatePages(obj.pageNums); obj.globalState = DbConstants.STATE_OBJ_DETACHED; objects[obj.indexId] = null; if (rootIndex == obj.indexId) { rootIndex = -1; } freeIndexIds.add(obj.indexId); obj.indexId = -1; obj.versionId = -1; obj.dbClass = null; obj.transContext = null; } COM: <s> deallocates all object resources </s>
funcom_train/34193592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEyeFrameManager(FrameManager eyeFrameManager) { // Register framemanager to animation timer timer.setEyeFrameManager(eyeFrameManager); // Register framemanager to graph display graphTabPanel.setEyeFrameManager(eyeFrameManager); // Set total frame for frame scrolling setTotalFrame(timer.getScreenFrameManager(), eyeFrameManager); // Reset viewing position frameScrollingJPanel.setCurrentFrame(1); } COM: <s> require set offset to be called first to make the scrolling panel working </s>
funcom_train/32800759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamedElementPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_NamedLiteralExpCS_namedElement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NamedLiteralExpCS_namedElement_feature", "_UI_NamedLiteralExpCS_type"), OclPackage.Literals.NAMED_LITERAL_EXP_CS__NAMED_ELEMENT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the named element feature </s>
funcom_train/24085751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Value clone() { try { Value clone = (Value)super.clone(); clone.id = 0; clone.scale = null; // created-timestamp is automatically set to now clone.setChangeLog(new ChangeLog(this.getChangeLog().getChangedBy())); return clone; } catch (CloneNotSupportedException e) { // never thrown return null; } } COM: <s> returns an object with the same values </s>
funcom_train/1532773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isStructurallyEqual(String input1, String input2) { if (input1.equals(input2)) return true; try { // parse both input expressions ValidExpression ve1 = casParser.parseGeoGebraCASInput(input1); String input1normalized = casParser.toString(ve1, ExpressionNode.STRING_TYPE_GEOGEBRA_XML); ValidExpression ve2 = casParser.parseGeoGebraCASInput(input2); String input2normalized = casParser.toString(ve2, ExpressionNode.STRING_TYPE_GEOGEBRA_XML); // compare if the parsed expressions are equal return input1normalized.equals(input2normalized); } catch (Throwable th) { } return false; } COM: <s> returns true if the two input expressions are structurally equal </s>
funcom_train/36550401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintIcon(Component c, Graphics g, int x, int y) { int w = c.getWidth(); int h = c.getHeight(); g.drawImage(myIcon.getImage(), 0, 0, w, h, c); } COM: <s> draws this icon at the proper size </s>
funcom_train/33264033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRowArg( int rowIndex, Object arg ) { ensureRowCount(rowIndex+1); Gadget gadgets[] = listgrid.getGadgets(); RowPanel row = (RowPanel)(((ListGridItem)gadgets[rowIndex]).getGadget()); row.setArg( arg ); } COM: <s> set row arg </s>
funcom_train/44386472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renameIconIndex(String oldIconItemIndex, String newIconItemIndex) { int promptIndex = myIconIndex.indexOf(oldIconItemIndex); if (promptIndex >= 0) { myIconIndex.removeElementAt(promptIndex); myIconIndex.insertElementAt(newIconItemIndex, promptIndex); } } COM: <s> rename an icon index with a given name if the icon index exists </s>
funcom_train/51338343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_bufferFlushedByIterator() { final UnsynchronizedUnboundedChunkBuffer<String> buffer = new UnsynchronizedUnboundedChunkBuffer<String>( 3/* chunkCapacity */); buffer.add("a"); assertSameIterator(new String[] { "a" }, buffer.iterator()); } COM: <s> verify that elements are flushed when an iterator is requested so </s>
funcom_train/6129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshPageCounter(){ int pageSize = panel.getContent().getRecordsPerPage(); model.setPageSize(pageSize); int pageCount = model.getPageCount(); recordSpinner.setModel(new SpinnerNumberModel(1,1,pageCount,1)); panel.getContent().getAmount().setText(Integer.toString(pageCount)); } COM: <s> updates available pages counter when number of records in table or </s>
funcom_train/14307928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RolloverButton createButton(String resname, String tooltip) { Icon icon = GUIUtilities.loadIcon(resname); RolloverButton init = new RolloverButton(icon); Insets zeroMargin = new Insets(0, 0, 0, 0); init.setMargin(zeroMargin); init.setToolTipText(tooltip); return init; } COM: <s> create a tool bar button </s>
funcom_train/44508167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void ensureRealms() { Collection<Realm> realms = getRealms(); if (realms == null || realms.isEmpty()) { if (log.isInfoEnabled()) { log.info("No Realms configured. Defaulting to failsafe PropertiesRealm."); } Realm realm = createDefaultRealm(); setRealm(realm); } } COM: <s> ensures at least one realm exists and if not calls </s>
funcom_train/3974464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean containsOnlyAllowedChildren(Node node, String[] allowedChildren) { NodeList childNodes = node.getChildNodes(); for (int i = 0; i < childNodes.getLength(); i++) { if (!Tools.contains(allowedChildren, childNodes.item(i).getNodeName())) { return false; } } return true; } COM: <s> ensures that a certain node contains only white listed children </s>
funcom_train/12560914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lSetFont(Font font) { // Only update native resource if it exists. if (nativeId != DisplayableLFImpl.INVALID_NATIVE_ID) { setFont0(nativeId, font.getFace(), font.getStyle(), font.getSize()); } lRequestInvalidate(true, true); } COM: <s> notifies l amp f of a font change in the corresponding </s>
funcom_train/2522134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCustom(boolean custom) { if (custom && this.customPossible) { this.lastSelected = this.dropdown.getSelectedIndex(); this.isCustom = true; } else { if (lastSelected == -1) this.setToDefault(); else this.dropdown.setSelectedIndex(this.lastSelected); this.isCustom = false; } } COM: <s> programmatically changes between standard and custom mode </s>
funcom_train/18052143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getSvFileExitMenuItem() { if (svFileExitMenuItem == null) { svFileExitMenuItem = new JMenuItem(); svFileExitMenuItem.setText("Exit"); svFileExitMenuItem .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { performSave(); SecureVault.getInstance().quit(); } }); } return svFileExitMenuItem; } COM: <s> this method initializes svfile exit menu item </s>
funcom_train/31980654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeCommunity(String resourceId) { Object o = communityMaps.get(resourceId); if (o == null) { LOG.warn("FileMapper Tried to remove a community that did not exist. Id " + resourceId); return; } CommunityFileMap comMap = ((CommunityFileMap) o); comMap.remove(); communityMaps.remove(resourceId); } COM: <s> removes a community from the community list </s>
funcom_train/28353004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void makeContentView() { final Box mainView = new Box( BoxLayout.Y_AXIS ); getContentPane().add( mainView ); mainView.add( makeStopperView() ); mainView.add( _objectivesContainer ); mainView.add( makeButtonView() ); mainView.add( Box.createVerticalStrut( 15 ) ); } COM: <s> make the content view </s>
funcom_train/4755019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkSufficientData(final RealMatrix matrix) { int nRows = matrix.getRowDimension(); int nCols = matrix.getColumnDimension(); if (nRows < 2 || nCols < 2) { throw new MathIllegalArgumentException( LocalizedFormats.INSUFFICIENT_ROWS_AND_COLUMNS, nRows, nCols); } } COM: <s> throws illegal argument exception of the matrix does not have at least </s>
funcom_train/7272402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getOrdinalForTabComponent(Component c) { for(Map.Entry<GUIMediator.Tabs, Tab> entry : TABS.entrySet()) { if(entry.getValue().getComponent().equals(c)) return entry.getKey().ordinal(); } return -1; } COM: <s> returns the ordinal of the enum that points to the tab </s>
funcom_train/45108020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getJSystemProperty(String key) throws Exception { jemmySupport.report("going to get value of " + key + " from jsystem properties file"); final String value = JSystemProperties.getInstance().getPreference(key); jemmySupport.report("got from jsystem properties: " + key + " = " + value); return value != null ? value : ""; } COM: <s> return the value of attached to the specified key in the jsystem </s>
funcom_train/31650185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String showSBIEForTrue( String display ) { boolean show = sp.getShowSBIE().booleanValue(); if ( hasError() ) { show = Boolean.valueOf( request.getParameter("enableSBIE") ).booleanValue(); } if ( show ) { return display; } else { return ""; } } COM: <s> returns given string if show sbie is true otherwise </s>
funcom_train/7620289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int allocateAppWidgetId() { try { if (mPackageName == null) { mPackageName = mContext.getPackageName(); } return sService.allocateAppWidgetId(mPackageName, mHostId); } catch (RemoteException e) { throw new RuntimeException("system server dead?", e); } } COM: <s> get a app widget id for a host in the calling process </s>
funcom_train/2289428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteResource(String resourceName, String exportpoint) { File file = getExportPointFile(resourceName, exportpoint); if (file.exists() && file.canWrite()) { // delete the file (or folder) file.delete(); // also delete empty parent directories File parent = file.getParentFile(); if (parent.canWrite()) { parent.delete(); } } } COM: <s> deletes a file or a folder in the real file sytem </s>
funcom_train/9394958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String name, int value) throws IllegalArgumentException { ObjectSlot slot = findSlot(name, Integer.TYPE); if (slot == null) { throw new IllegalArgumentException(); } slot.fieldValue = Integer.valueOf(value); slot.defaulted = false; // No longer default value } COM: <s> find and set the int value of a given field named </s>
funcom_train/45598709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isHTMLPanel(String panel) { return (panel.equals("InfoPanel") && xmlObject.resources_LicencePanel_license_src_info.endsWith(".html")) || (panel.equals("LicencePanel") && xmlObject.resources_LicencePanel_license_src_license.endsWith(".html")); } COM: <s> checks whether it is a html panel to insert resource </s>
funcom_train/15866828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onMouseButtonPressed(MouseDevice mouseDevice, int button, int x, int y) { System.out.println("Mouse Pressed"); posState.setMousePressed(true); if (button == MouseCode.LEFT_BUTTON) { // Up-left point tryPicking(Corner.UP_LEFT, button, x, y); } } COM: <s> method trys to pick a point if successful it will do an individual </s>
funcom_train/22215936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCaption(Hashtable<String, Object> data) { Object titleFieldValue = data.get(titleColumn.getName()); if (captionQuery == null && titleFieldValue != null) return titleFieldValue.toString(); else if (captionQuery == null && titleFieldValue == null) return ""; else return insertParameters(captionQuery, data); } COM: <s> get caption string </s>
funcom_train/15678284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBuffer_LastPointDoubled () { // polyline with 4 vertices, LinearRing2D curve = new LinearRing2D(new Point2D[]{ new Point2D(100, 100), new Point2D(200, 100), new Point2D(200, 200), new Point2D(100, 200), new Point2D(100, 100) }); BufferCalculator bc = BufferCalculator.getDefaultInstance(); CirculinearDomain2D buffer = bc.computeBuffer(curve, 20); assertFalse(buffer==null); assertFalse(buffer.isEmpty()); assertEquals(2, buffer.boundary().continuousCurves().size()); } COM: <s> test buffer for a polyline with first and last point equal </s>
funcom_train/50217617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doSave(IProgressMonitor monitor) { commitPages(true); freemarkerTemplateEditor.doSave(monitor); try { IFreemarkerTemplateSettings templateSettings = getTemplateSettings(); if (templateSettings != null) { templateSettings.save(); } refresh(); } catch (Exception e) { IStatus status = new Status(IStatus.ERROR, FreemarkerUIPlugin.PLUGIN_ID, 0, "Error while saving settings", e); ErrorDialog.openError(getSite().getShell(), "Settings error", "Error while saving settings", status); } editorDirtyStateChanged(); } COM: <s> saves the multi page editors document </s>
funcom_train/15921689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ClassDef currLocalClass() { ClassDef curr = context.currentClassDef(); while (curr != null) { if (curr.isLocal() || curr.isAnonymous()) return curr; if (curr.isTopLevel()) break; curr = Types.get(curr.outer()); } return null; } COM: <s> get the currently enclosing local class or null </s>
funcom_train/50607594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { synchronized(this) { //StringBuffer s = new StringBuffer("(fitness=").append(fitness); StringBuffer s = new StringBuffer("(dist=").append(1/fitness); // s.append(",["); // boolean comma = false; // for (int i=0; i<city.length; i++) { // if (comma) // s.append("-"); // else // comma = true; // s.append(city[i]); // } // s.append("])"); return s.toString(); } } COM: <s> converts this object to a string representation </s>
funcom_train/46718162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getConvertedValue(Method setterMethod, String fieldValue) throws ObjectBoxException { Class[] parameterTypes = setterMethod.getParameterTypes(); if(parameterTypes.length!=1) { throw new ObjectBoxException("Wrong number of parameters for a setter setterMethod, expected 1 but found "+parameterTypes.length); } Class requiredParameter = parameterTypes[0]; return converters.convertFromString(requiredParameter,fieldValue); } COM: <s> converts a string representing a field value into the appropriate type for a </s>
funcom_train/19793402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addCollaboration(Collaboration c) throws IOException { String id = makeId(c.getName()); if (this.ids.contains(id) || this.collaborations.containsKey(id)) { throw new IOException("Duplicate ID: " + id); } else { storeCollaboration(c); } } COM: <s> add a collaboration </s>
funcom_train/23319797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CTabFolder createContainer(Composite parent) { // use SWT.FLAT style so that an extra 1 pixel border is not reserved // inside the folder parent.setLayout(new FillLayout()); final CTabFolder newContainer = new CTabFolder(parent, SWT.BOTTOM | SWT.FLAT); newContainer.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { int newPageIndex = newContainer.indexOf((CTabItem) e.item); pageChange(newPageIndex); } }); return newContainer; } COM: <s> creates an empty container </s>
funcom_train/27824824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedEntities(Collection entities) { if (!m_selectedEntities.equals(entities)) { m_selectedEntities.clear(); Iterator iterator=entities.iterator(); while (iterator.hasNext()) { Object object=iterator.next(); if (object instanceof Entity) m_selectedEntities.add(object); } updateSelectionType(); fireSelectedEntitiesChanged(); } } COM: <s> makes specified entites selected </s>
funcom_train/19838989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SimpleArtistList lookupArtists(String[] ids) throws StrandsServiceException { assertNotEmpty("ids", ids); Map<String, String[]> parameter = new HashMap<String, String[]>(); parameter.put("id", ids); return (SimpleArtistList) request("/lookup/artists", parameter); } COM: <s> returns metadata for the given artist ids </s>
funcom_train/33453480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SurfaceProperties initializeModellingInstance(Pointer model, double scale, Pointer instance) { IntByReference pV = new IntByReference(); IntByReference pI = new IntByReference(); engine.initializeModellingInstance(model, pV, pI, scale, instance); int noVertices = pV.getValue(); int noIndices = pI.getValue(); return new SurfaceProperties(model, instance, noVertices, noIndices, scale); } COM: <s> the surfaces of the ifc 3 d geometry object i </s>
funcom_train/1591188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTime(final ReadableInstant instant) { long instantMillis = DateTimeUtils.getInstantMillis(instant); Chronology instantChrono = DateTimeUtils.getInstantChronology(instant); DateTimeZone zone = instantChrono.getZone(); if (zone != null) { instantMillis = zone.getMillisKeepLocal(DateTimeZone.UTC, instantMillis); } setTime(instantMillis); } COM: <s> set the time from another instant </s>
funcom_train/1733885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getKeyword() { if (KeywordFrequency_Type.featOkTst && ((KeywordFrequency_Type)jcasType).casFeat_keyword == null) jcasType.jcas.throwFeatMissing("keyword", "us.timetrack.type.KeywordFrequency"); return jcasType.ll_cas.ll_getStringValue(addr, ((KeywordFrequency_Type)jcasType).casFeatCode_keyword);} COM: <s> getter for keyword gets record the keyword </s>
funcom_train/13390742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setThresholdValues(ThresholdValues tValues) { if(tValues == null) throw new NullPointerException("tValues is null"); thresholdManager.setThresholdValues(tValues); if(localRef!=null) localRef.setThresholdValues(getThresholdValues()); else { logger.warning("Cannot set ThresholdValues for a remote WatchDataSource"); } } COM: <s> set the threshold values for the threshold manager </s>
funcom_train/22027230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getNearestValue(double val) { try { return rangeTest(val); } catch (IllegalArgumentException e) { if ( val < range[LO] ) { val = range[LO]; } else { val = range[HI]; } System.out.println("Convert:getNearestValue(" + val + "): " + e + ", returning " + val); return val; } } COM: <s> returns the nearest value within the range </s>
funcom_train/26369860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMP3ConfigSetValue(){ if ( config == null ){ try{ String value; config = new MP3Config(); config.setConfigValue( "test123", "testvalue" ); value = config.getConfigValue( "test123" ); assertTrue( value.equals( "testvalue" )); } catch( Exception e ){ fail( "Error creating config" + e ); } } } COM: <s> tests the setting and retrieving of a config value </s>
funcom_train/16743563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillIn(SnpStatistics rhs) { rhs.duplicateHeaderCount = this.duplicateHeaderCount; rhs.missingDataCount = this.missingDataCount; rhs.numDeletions = this.numDeletions; ArrayUtils.arrayCopy(rhs.mCountAmpHeteroAllele, this.mCountAmpHeteroAllele, rhs.mCountAmpHeteroAllele.length); this.mCountsAmp.fill(rhs.mCountsAmp.mCounts); this.mCountsGenotype.fill(rhs.mCountsGenotype.mCounts); } COM: <s> duplicates the information in this object into the argument object </s>
funcom_train/26476217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setADFFunctionSets( int adf_idx, Class[] fs, Class[] ts ) throws ParametersNotProperlySetException { if (definitive) throw new ParametersNotProperlySetException("The parameters are definitive: no change possible."); if (nADF==0) throw new ParametersNotProperlySetException("No ADF defined yet."); adfFSet[adf_idx] = fs; adfTSet[adf_idx] = ts; } COM: <s> set the function and the terminal set of an adf </s>
funcom_train/25010751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumberOfImages(final String name) throws Exception { logger.debug("getNumberOfImages(" + name + ")"); if (!imagesMap.containsKey(name)) { throw new ImageNotFoundException("ImagesLoader Error - " + "imagesMap does not contain key " + name); } ArrayList<BufferedImage> list = imagesMap.get(name); int size = list.size(); list = null; return size; } COM: <s> returns the number of images stored in the hashmap for a specific group </s>
funcom_train/14461778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRelativeRowCol() { if (fRwRel || fColRel) { short opc= 0; if (parent_rec!=null) opc= parent_rec.getOpcode(); // protocol for shared formulas, conditional formatting, data validity and defined names only (type B cell addresses!) if (opc==SHRFMLA || opc==CONDFMT || opc==DVAL) { this.formulaRow= parent_rec.getRowNumber(); this.formulaCol= parent_rec.getColNumber(); } } } COM: <s> set the formula row and formula col for relatively referenced ptg refs </s>
funcom_train/46620693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Button getAboutOkButton() { if (iAboutOkButton == null) { try { iAboutOkButton = new Button(); iAboutOkButton.setName("AboutOkButton"); iAboutOkButton.setLabel("OK"); } catch (Throwable iExc) { handleException(iExc); } } return iAboutOkButton; } COM: <s> return the about ok button property value </s>
funcom_train/42955549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBuilding() { if (RoomNumber_Type.featOkTst && ((RoomNumber_Type)jcasType).casFeat_building == null) jcasType.jcas.throwFeatMissing("building", "nu.mine.summerflower.type.RoomNumber"); return jcasType.ll_cas.ll_getStringValue(addr, ((RoomNumber_Type)jcasType).casFeatCode_building);} COM: <s> getter for building gets building containing this room </s>
funcom_train/46337301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetIgnoreCase() { System.out.println("setIgnoreCase"); assertTrue(OpbBooleanHelper.isIgnoreCase()); OpbBooleanHelper.setIgnoreCase(false); assertFalse(OpbBooleanHelper.isIgnoreCase()); OpbBooleanHelper.setIgnoreCase(true); assertTrue(OpbBooleanHelper.isIgnoreCase()); } COM: <s> test of set ignore case method of class com </s>
funcom_train/3441848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIntCount(int value) { assert(phase() == DISBURSE_PHASE); // assert that this is the whole pass; no other reads allowed assert(valuesRemainingForDebug() == length()); int total = 0; for (int k = length(); k > 0; k--) { if (getInt() == value) { total += 1; } } resetForSecondPass(); return total; } COM: <s> return the occurrence count of a specific value in this band </s>
funcom_train/43933254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invoke(String method, Object[] params, IPendingServiceCallback callback) { log.debug("invoke method: {} params {} callback {}", new Object[] { method, params, callback }); // get it from the conn manager RTMPConnection conn = connManager.getConnection(); if (conn == null) { log.info("Connection was null 2"); } else { ((IServiceCapableConnection) conn).invoke(method, params, callback); } } COM: <s> invoke a method on the server and pass parameters </s>
funcom_train/31414859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadMappingPrimaryKey(Element el) { Attribute at = el.getAttribute("pkGen"); if(at!=null) { pkGenName = at.getValue(); try { classLoader.loadClass(pkGenName); } catch(Exception ex) { logger.fatal(pkGenName + " not found.", ex); } } } COM: <s> builds the primary key generator </s>
funcom_train/50960713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setQueryText(String text) { try { queryText.remove(0, queryText.getLength()); queryText.insertString(0, text, new SimpleAttributeSet()); } catch (Exception e) { e.printStackTrace(); } setUpdateNeeded(true); myQuery.setChanged(); } COM: <s> sets the actual text of this query line </s>
funcom_train/10792712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void add(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new MappingStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) { _flush = true; _flushSchema = true; } } COM: <s> add the mapping for the given instance </s>
funcom_train/39397375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Decision makePreDecision(FilterProcessResult filterProcessResult, int maxResults) { Decision preDecision = makeDecision(filterProcessResult); if (preDecision.isSpam()) { return preDecision; // once decided on spam, it will never change to ham } // TODO: We could decide on ham if current spam results + 'open' results < min_spam return null; // decision is still ham, so we have to wait for remaining results } COM: <s> to calculate a pre decision we can call the standard make decision method </s>
funcom_train/5866786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContent(Media media) { if (_src != null || media != _media) { _media = RepeatableMedia.getInstance(media); //Use RepeatableMedia since it might be reloaded //if the component is invalidated or overlapped wnd (Bug 1896797) _src = null; if (_media != null) ++_medver; //enforce browser to reload invalidate(); //safer than smartUpdate } } COM: <s> sets the content of the flash directly </s>
funcom_train/29926176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void ensureCapacity(Dimension req) { if (offscreenBuffer == null) { createNewBuffer(req.width, req.height); } else { int w = offscreenBuffer.getWidth(null); int h = offscreenBuffer.getHeight(null); if ((w < req.width) || (h < req.height)) { if (w < req.width) { w = req.width;} if (h < req.height) { h = req.height;} // should I try to free something? createNewBuffer(w,h); } } } COM: <s> this method sets up all the instance variables </s>
funcom_train/27944895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List connectors(int type) { List cons=new LinkedList(); for (int i=0; i<allConnectors.length; i++) { if ((allConnectors[i].type()&type)!=0) { cons.add(allConnectors[i]); } } return cons; } COM: <s> returns the list of all known </s>
funcom_train/3785220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCanvasSize(int size) { /* setCanvasSize */ if(size>0) { /* force canvas to preferred size */ setCanvasSize(size,size); } /* force canvas to preferred size */ else { Dimension d= getPreferredSize(); setCanvasSize(d.width, d.height); } } /* setCanvasSize */ COM: <s> set canvas size change the size of this canvas </s>
funcom_train/6458190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { for (;;) { try { HttpPacketEncoder enc = new HttpPacketEncoder(KiznaProtocol.PROTOCOL_HTTP_WAIT, sessionID, cryptKey); HttpPacketDecoder resp = doHttpRequest(enc); if ((resp.getID() & KiznaProtocol.PROTOCOL_HTTP_TYPE_MASK) == KiznaProtocol.PROTOCOL_HTTP_WAIT_OK) { updated = true; if (notifyObject != null) { synchronized (notifyObject) { notifyObject.notify(); } } Thread.sleep(3000); } } catch (Exception e) { System.err.println("http-wait: " + e); } } } COM: <s> establishes the connection with the server and tells the server to keep </s>
funcom_train/22028692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rowToColumn(Object[][] data) { for (int col=0; col<modelRow.length; col += 1) { Object column = columns.elementAt(col); for (int row=0; row<data.length; row += 1) { System.arraycopy( ArrayFuncs.flatten(data[row][col]), 0, column, row*sizes[col], sizes[col] ); } } } COM: <s> convert the data from a row to a flattened column format </s>
funcom_train/26509279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isElement(Object e) { if (!(e instanceof TupleElement)) return false; Object[] ee = ((TupleElement)e).getElements(); if (ee.length!=sets.length) return false; for (int i=0; i<sets.length; i++) { if (!sets[i].isElement(ee[i])) return false; } return true; } COM: <s> checks if an element is contained in this set </s>
funcom_train/15892251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initNS() { IExtensionRegistry registry = Platform.getExtensionRegistry(); IExtensionPoint extensionPoint = registry.getExtensionPoint("nl.ealse.pampus.model"); IConfigurationElement[] extensions = extensionPoint.getConfigurationElements(); for (int i = 0 ; i < extensions.length ; i++) { IConfigurationElement extension = extensions[i]; String modelUri = extension.getAttribute("uri"); EPackage.Registry packageRegistry = EPackage.Registry.INSTANCE; ePackage = packageRegistry.getEPackage(modelUri); } } COM: <s> get the namespace prefix and uri for the configured model </s>
funcom_train/46760288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FeeScheduleModel getFeeSchedule(final long feeScheduleId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return BillingData.getFeeSchedule(feeScheduleId, chain, call); }}; return (FeeScheduleModel) call(method, call); } COM: <s> same transaction return the single fee schedule model for the primary key </s>
funcom_train/10594959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCopletInstances(Collection copletInstances) { this.copletInstances = new HashMap(); final Iterator i = copletInstances.iterator(); while ( i.hasNext() ) { final CopletInstance current = (CopletInstance) i.next(); this.copletInstances.put(current.getId(), current); } } COM: <s> set all coplet instances </s>
funcom_train/34733806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void expectCVContentTypeInitialization() { // expect DAO calls to lookup each predefined CV content type by name // and to insert each such type into persistent store for (CVContentType contentType : StaticDataManagerImpl.CONTENT_TYPES) { expect(cvDAO.findCVContentTypeByName(contentType.getName())).andReturn( null); expect(cvDAO.insertCVContentType(contentType)).andReturn(contentType); } } COM: <s> program mock expectations for cv content type initialization </s>
funcom_train/29829065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sortGroups() { root.removeAllChildren(); TreeMap tmpMap = (TreeMap) groups.clone(); while (!tmpMap.isEmpty()) { Object o = tmpMap.firstKey(); BSGroupNode gr = (BSGroupNode)tmpMap.get(o); root.add(gr); gr.sortNodes(); tmpMap.remove(o); } } COM: <s> sorts groups in roster tree </s>
funcom_train/51620337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPattern(String patternString) { cache.clear(); if (patternString == null || patternString.equals("")) { //$NON-NLS-1$ matcher = null; } else { String pattern = patternString + "*"; //$NON-NLS-1$ if (includeLeadingWildcard) { pattern = "*" + pattern; //$NON-NLS-1$ } matcher = new StringMatcher(pattern, true, false); } } COM: <s> the pattern string for which this filter should select </s>
funcom_train/7660784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToNanos() { for (long t = 0; t < 10; ++t) { assertEquals(1000000000 * t, TimeUnit.SECONDS.toNanos(t)); assertEquals(1000000 * t, TimeUnit.MILLISECONDS.toNanos(t)); assertEquals(1000 * t, TimeUnit.MICROSECONDS.toNanos(t)); assertEquals(t, TimeUnit.NANOSECONDS.toNanos(t)); } } COM: <s> to nanos correctly converts sample values in different units to </s>
funcom_train/7348703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { if (bulletImage == null || (checkImage(bulletImage, this) & ERROR) != 0) { g.setColor(Color.red); g.fillRect(0, 0, size().width, size().height); } else { g.drawImage(bulletImage, 0, 0, this); } } COM: <s> paint the bullet or error indicator </s>
funcom_train/10908340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Numeric getBorderPrecedence(int side) { switch (side) { case CommonBorderPaddingBackground.BEFORE: return borderBeforePrecedence; case CommonBorderPaddingBackground.AFTER: return borderAfterPrecedence; case CommonBorderPaddingBackground.START: return borderStartPrecedence; case CommonBorderPaddingBackground.END: return borderEndPrecedence; default: return null; } } COM: <s> return the value for the border precedence property </s>
funcom_train/9202732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMinimumMaximum(double minimumAngle, double maximumAngle) { // make sure the min < max if (minimumAngle > maximumAngle) throw new IllegalArgumentException("The minimum angle must be smaller than the maximum angle."); // wake up the bodies this.body1.setAsleep(false); this.body2.setAsleep(false); // set the limits this.maximumAngle = maximumAngle; this.minimumAngle = minimumAngle; } COM: <s> sets both the maximum and minimum limit angles </s>
funcom_train/29420082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void store() { OutputStream out = null; try { out = new FileOutputStream(this.file); prop.store(out, null); } catch (Exception e) { e.printStackTrace(); } finally { if (out != null) { try { out.close(); } catch (IOException e1) { } out = null; } } } COM: <s> save the properties to file </s>
funcom_train/29638611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getPositiveInitParameter(String name, int defaultValue) { String val = getInitParameter(name); if ( val == null || val.trim().equals("") ) return defaultValue; int ret = Integer.parseInt(val.trim()); if ( ret < 0 ) throw new NumberFormatException("Negative value not allowed for " + "init parameter " + name); return ret; } COM: <s> read a positive int parameter from the servlets configuration </s>
funcom_train/50150928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setYear(int year) { if (year<-9999) year=-9999; if (year>9999) year=9999; int month=getMonth(); int day=getDayOfMonth(); int hour=getHour(); int minute=getMinute(); int second=getSecond(); if ((month==2)&&(day>28)) { if (year!=((year/4)*4)) day=28; gc.set(year,month-1,day,hour,minute,second); } else gc.set(GregorianCalendar.YEAR,year); if (debug) System.out.println(this.toString()); } COM: <s> set date year </s>
funcom_train/9184075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ShareTuple update(ShareTuple template, ShareTuple newTuple) { // parameter checking if (newTuple == null || newTuple == null) throw new IllegalArgumentException( "The new tuple for updating is null"); if (!template.isMaster()) throw new IllegalArgumentException("must be a master"); if (template.getDest().isUnspecified()) { throw new IllegalArgumentException( "Unspecified is not allowed for update"); } return doUpdate(template, newTuple); } COM: <s> update a local share tuples content and version </s>
funcom_train/44602383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_xpost_01() { compileAndExecGivenStatementExpectRuntimeError( "X.java", "public class X {\n" + " //@ signals (Exception e) false;\n" + " void m() {\n" + " throw new RuntimeException();\n" + " }\n" + "}\n", "new X().m()", null, JMLInternalExceptionalPostconditionError.class); } COM: <s> is exceptional postcondition checked </s>
funcom_train/41725293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTransaction(Transaction transaction) { // finding place where to insert transaction for (int i = 0; i < trans.size(); i++) { Transaction tmp = getTransaction(i); if (tmp.getDate().getTime() <= transaction.getDate().getTime()) { trans.insertElementAt(transaction, i); return; } } trans.addElement(transaction); } COM: <s> adds a transaction to the container updating a balance </s>
funcom_train/6519203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scan(Scanner aScanner) { LinkedList<String> fields = new LinkedList<String>(); String temp = ""; while (aScanner.hasNext()) { temp = aScanner.next(); if (!temp.trim().isEmpty()) // a hack, probably better to fix the // regex expressions. fields.add(temp); } // while String[] stringFields = FlatFile.toStringArray(fields.toArray()); aFlatFileModel = new FlatFile(stringFields); } // scan() COM: <s> a utility method used by all 3 constructors </s>