__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/30216505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetContacts() { System.out.println("getContacts"); ContactController instance = new ContactController(); List<Contact> result = instance.getContacts(); assertNotNull(result); assertTrue("The contact list must contain some items", result.size() > 1); } COM: <s> test of get contacts method of class org </s>
funcom_train/12563603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeCHeader() { writeCopyright(); pl(""); pl("#include <string.h>"); pl("#include <kni.h>"); pl("#include <midpError.h>"); pl("#include <midpMalloc.h>"); pl("#include <midpServices.h>\n"); } COM: <s> writes romized images c file header </s>
funcom_train/15884639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JProgressBar getJProgressBar() { if (jProgressBar == null) { jProgressBar = new JProgressBar(); jProgressBar.setIndeterminate(false); jProgressBar.setStringPainted(true); jProgressBar.setAlignmentX(LEFT_ALIGNMENT); } return jProgressBar; } COM: <s> this method initializes j progress bar </s>
funcom_train/3709903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getMinWavelength (int row, int extension) { if (extension > 0 && extension <= nextend) { try { Row rowdesc = (Row)descriptor[extension-1].elementAt(row-1); return rowdesc.w1; } catch (IndexOutOfBoundsException e) { return 0; } } else { return 0; } } COM: <s> returns the minimum wavelength stored in the given row </s>
funcom_train/19810891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onKeyUp(Widget sender, char keyCode, int modifiers) { if(sender instanceof TextBox){ TextBox userBox = reg.getUserNameBox(); TextBox emailBox = (TextBox) sender; if(emailBox.getText().indexOf("@") == -1){ userBox.setText(emailBox.getText()); }else{ String username = emailBox.getText().substring(0,emailBox.getText().indexOf("@")); userBox.setText(username); } } } COM: <s> parses the username as the part of the msoe email address before the </s>
funcom_train/13985369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hasContentHeader() { Iterator<Byte> itrTypes = types.iterator(); Iterator<String> itrData = elements.iterator(); int counter = 0; while(itrTypes.hasNext()) { byte currentType = itrTypes.next(); if(currentType != CRLF) { final String currentString = itrData.next().toLowerCase(); if(currentString.startsWith("content-length:")) { return counter; } } counter++; } return -1; } COM: <s> p method to check if a content length header exists </s>
funcom_train/36259327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReorderingListener(final ReorderingListener newListener) { reorderingListener = newListener; if (newListener == null) { if (reorderingEnabled) { reorderingEnabled = false; if (upDownButtonsVisible) { hideUpDownButtons(); } this.invalidate(); } } else { if (!reorderingEnabled) { reorderingEnabled = true; this.invalidate(); } } } COM: <s> register the reordering listener for the list </s>
funcom_train/3619420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFrequencyDurationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UseCase_frequencyDuration_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UseCase_frequencyDuration_feature", "_UI_UseCase_type"), EclipsesrsPackage.Literals.USE_CASE__FREQUENCY_DURATION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the frequency duration feature </s>
funcom_train/37062562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTheFields() { jTextNumber = new JTextField(); jTextType = new JTextField(); jTextName = new JTextField(); jTextWatt = new JTextField(); jTextTime = new JTextField(); jTextFilename = new JTextField(); jTextDescription = new JTextArea(); } COM: <s> initialize the input output fields </s>
funcom_train/33588774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextField_EAN13() { if (jTextField_EAN13 == null) { jTextField_EAN13 = new JTextField(); jTextField_EAN13.setColumns(14); jTextField_EAN13.setBounds(100, 140, 215, 19); } return jTextField_EAN13; } COM: <s> this method initializes j text field6 </s>
funcom_train/43094974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVisible(boolean visible) { if (isVisible() == visible) { return; } super.setVisible(visible); if (visible) { populate(); } else { for (int i = getFigs().size() - 1; i >= 0; --i) { Fig f = getFigAt(i); if (f instanceof FigFeature) { removeFig(f); } } } } COM: <s> if a features compartment is set to invisible then remove all its </s>
funcom_train/44710164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateWidget(PageState state, Element parent) { Element checkboxGroup = parent.newChildElement (getElementTag(), BEBOP_XML_NS); exportAttributes(checkboxGroup); for ( Iterator i = getOptions(state); i.hasNext(); ) { Option o = (Option)i.next(); o.generateXML(state, checkboxGroup); } } COM: <s> p generates dom fragment </s>
funcom_train/786053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addRow() { int r; if ( m_openrows == null || m_openrows.isEmpty() ) { r = ( m_firstid == 0 ? ++m_curid : --m_firstid ); } else { int key = m_openrows.firstKey(); r = m_openrows.remove(key); } return r; } COM: <s> add a new row to management </s>
funcom_train/27904770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set forward(State [] initial_state) { Set reachable = univ.createEmptySet(); // convert to state index. int [] initial = new int[size]; for(int i = 0; i < size; i++) initial[i] = initial_state[i].extraindex; reachable.insert(initial); // the initial state is always reachable g_r = reachable; traverse(initial); g_r = null; return reachable; } COM: <s> forward from a given initial state </s>
funcom_train/17009608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String expandCommand(final String cmd) { String expCmd = cmd; expCmd = expCmd.replaceAll("NAMENODE", namenode); expCmd = expCmd.replaceAll("JOBTRACKER", jobtracker); expCmd = expCmd.replaceAll("CLITEST_DATA", clitestDataDir); expCmd = expCmd.replaceAll("USERNAME", username); return expCmd; } COM: <s> expand the commands from the test config xml file </s>
funcom_train/32185136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object value) { if (!isCompatModeOn()) throw new IllegalStateException("this method is deprecated as of v1.2 and cannot be called unless compat mode is on, use getUserObject() instead; RadioButton no longer has a value dedicated to itself"); Object oldValue = this.value; value = value == null ? "" : value; this.value = value; firePropertyChange(this, "value", oldValue, value); } COM: <s> assigns a user defined code object code to this code radio button code </s>
funcom_train/39168238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() throws Exception { super.setUp(); indexURL = new File(File.createTempFile("abc", "abc").getParentFile(), "test-index"); if(!indexURL.exists() || !indexURL.isDirectory()) indexURL.mkdir(); } COM: <s> this method sets up the parameters for the files to be testes it </s>
funcom_train/23056849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanBar(JComponent component, BarCustomizer customizer) { if ( logger.isDebugEnabled() ) { logger.debug("entering cleanBar with " + component); } if ( customizer != null ) { if ( customizer.avoidSuccessiveSeparators() ) { this.mergeSeparators(component); } } if ( logger.isDebugEnabled() ) { logger.debug("exiting cleanBar with " + component); } } COM: <s> method that clean a bar component </s>
funcom_train/14462231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public col addCellToCol(BiffRec cell){ col cx = (col)cols[cell.getColNumber()]; if(cx == null) { col newcol = new col(this); newcol.add(cell); cols[cell.getColNumber()] = newcol; }else{ cx.add(cell); } return cx; } COM: <s> add a cell to a column </s>
funcom_train/28266418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void deRegisterRoom(String roomName) { ChatRoom cr; synchronized(roomList) { if (roomList.containsKey(roomName)) { cr = roomList.get(roomName); if (cr.isEmpty()) roomList.remove(cr.getName()); RocketServer.log().info(cr + " room was removed"); } } } COM: <s> removes a room internaly after a remove room msg signal </s>
funcom_train/47314454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getSuitcaseButton() { if (suitcaseButton == null) { suitcaseButton = new JButton(); suitcaseButton.setText(localization .getProperty("loc-SteeringTab-suitcaseButton")); suitcaseButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { startSuit(); } }); } return suitcaseButton; } COM: <s> this method initializes suitcase button </s>
funcom_train/43993349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateStatus() { if (null == rich.formattor) { rich.formattor = rich.richText.getFormatter(); return; } bold.setDown( rich.formattor.isBold() ); italic.setDown( rich.formattor.isItalic() ); subscript.setDown( rich.formattor.isSubscript() ); underline.setDown( rich.formattor.isUnderlined() ); superscript.setDown( rich.formattor.isSuperscript() ); strikethrough.setDown( rich.formattor.isStrikethrough() ); } COM: <s> updates the status of all the stateful buttons </s>
funcom_train/37578129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { this.imageWidth = image.getWidth(); this.imageHeight = image.getHeight(); this.stepX = getWidth()/2; this.stepY = getHeight()/2; this.top = 0; this.bottom = getHeight(); this.left = 0; this.right = getWidth(); } COM: <s> initializes the width and heigth of the image as well as the </s>
funcom_train/16454092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public YASLResourceManager getResourceManager() { YASLResourceManager resManager; if(singletonMap.containsKey(KEY_RESOURCE_MANAGER)) { resManager = (YASLResourceManager)singletonMap.get(KEY_RESOURCE_MANAGER); } else { resManager = new YASLResourceManagerImpl(); singletonMap.put(KEY_RESOURCE_MANAGER, resManager); } return resManager; } COM: <s> returns the resource manager using the standard resource </s>
funcom_train/26639097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); elements = new Object[maxElements]; int size = in.readInt(); for (int i = 0; i < size; i++) { elements[i] = in.readObject(); } start = 0; end = size; full = (size == maxElements); } COM: <s> read the buffer in using a custom routine </s>
funcom_train/4194118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onCallClosed( Call call, Message resp ) { printLog( "onCallClosed", "Init..." ); if ( call != this.call ) { printLog( "onCallClosed", "NOT the current call." ); return; } printLog( "onCallClosed", "CLOSE/OK." ); if ( listener != null ) { listener.onUaCallClosed( this ); } changeStatus( UA_IDLE ); } COM: <s> callback function called when arriving a response after a bye request </s>
funcom_train/44282725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void requestPatchDump(int bankNum, int patchNum) { int checkSum = -(0x0c + patchNum + 0x05 +0x40) & 0x7f; send(SYS_REQ.toSysexMessage(getDeviceID(), new SysexHandler.NameValue("patchNum", patchNum), new SysexHandler.NameValue("checkSum", checkSum))); } COM: <s> request a patch to midi device </s>
funcom_train/29310913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BlockDataStorageInfo getInfo() { int[] blockFillSizes = new int[blocks.size()]; for(int i=0; i<blocks.size(); i++) { try { blockFillSizes[i] = (int)blocks.get(i).length(); } catch (IOException e) { System.err.println("Exception when assembling block data storage info!"); e.printStackTrace(); blockFillSizes[i] = blockSize; } } return new BlockDataStorageInfo(file, partitionLevel, blocks.size(), blockSize, blockFillSizes); } COM: <s> returns information about the current usage of this block data storages blocks </s>
funcom_train/11733105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeNode(ChildNodeEntry entry) throws RepositoryException { try { if (entry == null) { return false; } else { removeNode(entry.getId()); nodeState.removeChildNodeEntry(entry.getId()); nodeState.setStatus(ItemState.STATUS_EXISTING_MODIFIED); return true; } } catch (ItemStateException e) { throw new RepositoryException(e); } } COM: <s> removes the child node with the given child node entry </s>
funcom_train/27722462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadData() { if (!continueAfterSaveOption()) { statusMessage(res.getString("File_load_cancelled")); return; } statusMessage(res.getString("Loading_file")); String filename = findDataFilename(System.getProperty("USER.DIR"), props.getSecureDataFilename(), FileDialog.LOAD); loadData(filename); } COM: <s> load the data file into the tree based on the file chosen </s>
funcom_train/42213706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String generateUniqueIdMD5(String workgroupIdString, String runIdString) { String passwordUnhashed = workgroupIdString + "-" + runIdString; MessageDigest m = null; try { m = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } m.update(passwordUnhashed.getBytes(),0,passwordUnhashed.length()); String uniqueIdMD5 = new BigInteger(1,m.digest()).toString(16); return uniqueIdMD5; } COM: <s> create the md5 hashed password for the xmpp ejabberd user </s>
funcom_train/3010863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String list(Collection<?> c, String separator) { if (c == null) { return null; } StringBuffer buf = new StringBuffer(); int i = 0; for (Object obj : c) { if (i++ > 0) { buf.append(separator); } buf.append(obj); } return buf.toString(); } COM: <s> format a string listing all the elements of the specified collection </s>
funcom_train/34907970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCilPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Spoj_cil_feature"), getString("_UI_Spoj_cil_description"), GebzPackage.Literals.SPOJ__CIL, true, false, true, null, getString("_UI_SpojePropertyCategory"), null)); } COM: <s> this adds a property descriptor for the cil feature </s>
funcom_train/8711520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addStatement(AstNode statement) { assertNotNull(statement); if (statements == null) { statements = new ArrayList<AstNode>(); } int end = statement.getPosition() + statement.getLength(); this.setLength(end - this.getPosition()); statements.add(statement); statement.setParent(this); } COM: <s> adds a statement to the end of the statement list </s>
funcom_train/36900026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String type2string(Class<?> type) { String name = type.getCanonicalName(); //TODO rewrite it in the following manner: if type is connected anyhow with the old package if (needsConversion(type)) name = CodeGeneratorSettings.EDITOR_BEANS_PACKAGE + '.' + makeNewClassName(type); return changeBinPackage(name); } COM: <s> converts type to its name to use in code </s>
funcom_train/442159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String doublet(byte x1, byte x2, byte y1, byte y2) { return byteToBase(x1) + "" + byteToBase(x2) + "/" + byteToBase(y1) + "" + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ byteToBase(y2); } COM: <s> return a string representation of a doublet </s>
funcom_train/4519032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JComponent getIntervalComponent(Interval interval, Rectangle intervalRect, boolean overlapping) { TimeBarRenderer renderer = getRenderer(interval.getClass()); if (renderer == null) { throw new RuntimeException("no suitable renderer registered"); } JComponent component = renderer.getTimeBarRendererComponent(this, interval, false, overlapping); component.setBounds(intervalRect); return component; } COM: <s> retrieve the jcomponent for an interval </s>
funcom_train/18864934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ensureCapacity(int minCapacity) { if (minCapacity > cache.length) { int oldCapacity = cache.length; BigDecimal oldCache[] = cache; int newCapacity = oldCapacity + 5; if (newCapacity < minCapacity) { newCapacity = minCapacity; } cache = new BigDecimal[newCapacity]; System.arraycopy(oldCache, 0, cache, 0, oldCapacity); } } COM: <s> increases the capacity of this tt big decimal cache tt instance if </s>
funcom_train/50396130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changePermissions(String path, boolean read, boolean write, boolean execute) throws BaseFault { ChangePermissionsDocument req = ChangePermissionsDocument.Factory.newInstance(); req.addNewChangePermissions().setPath(path); PermissionsType permissions=PermissionsType.Factory.newInstance(); permissions.setReadable(read); permissions.setWritable(write); permissions.setExecutable(execute); req.getChangePermissions().setPermissions(permissions); sms.ChangePermissions(req); } COM: <s> change the owners permissions for a resource </s>
funcom_train/3812805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double filterOutput(double[] spectrum) { double output = 0.0f; int indexSpectrum; for (int i = 0; i < this.weight.length; i++) { indexSpectrum = this.initialFreqIndex + i; if (indexSpectrum < spectrum.length) { output += spectrum[indexSpectrum] * this.weight[i]; } } return output; } COM: <s> compute the output of a filter </s>
funcom_train/44770409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFirst(PathElement elem) { if (queue.isEmpty()) { isNormalized &= !elem.denotesCurrent(); leadingParent = elem.denotesParent(); } else { isNormalized &= !elem.denotesCurrent() && (!leadingParent || elem.denotesParent()); leadingParent |= elem.denotesParent(); } queue.addFirst(elem); } COM: <s> inserts the element at the beginning of the path to be built </s>
funcom_train/45872339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CcdbMicroscopyData getCCDBData(int mpid) throws OMTOfflineException{ CcdbMicroscopyData data = null; if (OntoMorph2.isOfflineMode()) { throw new OMTOfflineException("Cannot access CCDB Data because you are in offline mode!"); } try { GetCCDBMicroscopyDataService ws = new GetCCDBMicroscopyDataService(); data = ws.getGetCCDBMicroscopyDataPort().getCCDBMicroscopy(mpid); } catch (Exception e) { throw new OMTException("Problem loading CCDB Data", e); } return data; } COM: <s> returns a wrapper around any data from the ccdb </s>
funcom_train/44017620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parse(String input, MarkupLanguage language) { Writer writer = new StringWriter(); MarkupParser parser = new MarkupParser(language); parser.setBuilder(new DocBookDocumentBuilder(writer)); parser.parse(input, false); return StringUtils.replace(writer.toString(), "<chapter><title></title>", ""); } COM: <s> parses the input string and returns a doc book fragment without any </s>
funcom_train/46494855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getJSplitPaneTreeContent() { if (jSplitPaneTreeContent == null) { jSplitPaneTreeContent = new JSplitPane(); jSplitPaneTreeContent.setDividerSize(5); jSplitPaneTreeContent.setDividerLocation(150); jSplitPaneTreeContent.setRightComponent(getJScrollPaneContent()); jSplitPaneTreeContent.setLeftComponent(getJScrollPaneodTree()); } return jSplitPaneTreeContent; } COM: <s> this method initializes j split pane tree content </s>
funcom_train/1060091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypeinfoPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SimpleSemanticModelElement_typeinfo_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SimpleSemanticModelElement_typeinfo_feature", "_UI_SimpleSemanticModelElement_type"), Di2Package.Literals.SIMPLE_SEMANTIC_MODEL_ELEMENT__TYPEINFO, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the typeinfo feature </s>
funcom_train/25504706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Font loadWidgetFont(String[] widgetKey) throws ResourceUnavailableException { assert widgetKey != null; assert widgetKey.length == 2; assert widgetKey[0] != null; assert widgetKey[1] != null; final String[] key = new String[] { widgetKey[0], widgetKey[1] + ".font" }; return loadFont(key); } COM: <s> load a widgets font attribute </s>
funcom_train/33606568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFlipVertical(){ System.out.println("flipVertical"); TemperleyLiebTerm x=new TemperleyLiebTerm(); x.initLUL(2,3,3); x.flipVertical(); assertEquals("233","{(1-8)(2-5)(3-4)(6-7)} in TL(3,5)",x.toLongString()); } COM: <s> test of flip vertical method </s>
funcom_train/50189080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireResultComment(SAXEvent saxevent) { if (hasTraceListeners()) { // count of registered tracelisteners int countListener = traceListeners.size(); for (int i = 0; i < countListener; i++) { TraceListener currentListener = (TraceListener) traceListeners.elementAt(i); // call the according method on tracelistener currentListener.resultComment(saxevent); } } } COM: <s> indicates the comment event of the result document </s>
funcom_train/25579684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Component getAcceleratorAnchor() { if (getImpl().getParent() instanceof JTabbedPane) { JTabbedPane tp = (JTabbedPane) getImpl().getParent(); int idx = tp.indexOfComponent(getImpl()); if (idx != -1 && tp.getTabComponentAt(idx) != null) { return tp.getTabComponentAt(idx); } } return getImpl(); } COM: <s> gets the accelerator anchor </s>
funcom_train/8691512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPackages(String src) { StringTokenizer tok = new StringTokenizer(src, ","); while (tok.hasMoreTokens()) { String p = tok.nextToken(); PackageName pn = new PackageName(); pn.setName(p); addPackage(pn); } } COM: <s> set the packages to javadoc on </s>
funcom_train/21112896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel addImage(int errorType) { JLabel labelS = new JLabel(); switch (errorType) { case ERROR_ICON: labelS.setIcon(GUITools.loadIcon("windows-error.png")); break; case INFO_ICON: labelS.setIcon(GUITools.loadIcon("windows-info.png")); break; case QUESTION_ICON: labelS.setIcon(GUITools.loadIcon("windows-question.png")); break; case WARNING_ICON: labelS.setIcon(GUITools.loadIcon("windows-warning.png")); break; default: labelS.setIcon(GUITools.loadIcon("windows-error.png")); } return labelS; } COM: <s> adds the required image to the center panel </s>
funcom_train/18808352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRenderer(int index, XYItemRenderer renderer) { XYItemRenderer existing = getRenderer(index); if (existing != null) { existing.removeChangeListener(this); } this.renderers.set(index, renderer); if (renderer != null) { renderer.setPlot(this); } configureDomainAxes(); configureRangeAxes(); notifyListeners(new PlotChangeEvent(this)); } COM: <s> sets a renderer and sends a </s>
funcom_train/31200979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addTile(final TileWidgetWrapper tile, final int columnIndex) { // no duplicate tile allowed on a single layout if (!containsTile(tile.getTileId())) { // ensure column has acceptable range int checkedColumnIndex = Math.min(MAX_COLUMNS - 1, Math.max(0, columnIndex)); Column column = columns.get(checkedColumnIndex); column.add(tile); } } COM: <s> adds the tile this this layout </s>
funcom_train/1339685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Renderable getCachedArea(BrainInfo_ID area, String section) { String key = (area == null ? null : area.getId().toString()) + ":" + section; //$NON-NLS-1$ SoftReference<Renderable> shpRef = shapes.get(key); if (shpRef != null) { return shpRef.get(); } else { return null; } } COM: <s> get an area that is cached </s>
funcom_train/8394965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSmartphone() { return (isIphoneOrIpod() || isS60OssBrowser() || isSymbianOS() || isAndroid() || isWindowsMobile() || DetectWindowsPhone7() || isBlackBerry() || isPalmWebOS() || isPalmOS() || isGarminNuvifone()); } COM: <s> check to see whether the device is any device </s>
funcom_train/3412398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object readResolve() { // The instances of SystemColor are tightly controlled and // only the canonical instances appearing above as static // constants are allowed. The serial form of SystemColor // objects stores the color index as the value. Here we // map that index back into the canonical instance. return systemColorObjects[value]; } COM: <s> the design of the </s>
funcom_train/23794348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void perform() { // reset flags in case an exception is thrown inside "perform" // and it doesn't return normally ir.postDominatorTree = null; // compute post-dominators, // leaves info in scratch object of basic blocks LTDominators.perform(ir, false, unfactor); // create the dominator tree, relies on dominator info being // in scratch object of basic blocks DominatorTree.perform(ir, false); } COM: <s> main driver for the post dominator calculation </s>
funcom_train/50490291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clearProperties() { super.setId(null); name = null; value = null; hasValue = true; defaultBody = null; bodyString = null; asLink = false; forceLink = false; linkBody = null; processed = false; placeHolder = RssConstants.DEFAULT_PLACE_HOLDER; maxLength = RssConstants.LENGTH_NO_TRUNCATE; } COM: <s> resets the tags properties to their initial condition </s>
funcom_train/10388354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeServletMapping(String pattern) { String name = null; synchronized (servletMappingsLock) { name = servletMappings.remove(pattern); } Wrapper wrapper = (Wrapper) findChild(name); if( wrapper != null ) { wrapper.removeMapping(pattern); } mapper.removeWrapper(pattern); fireContainerEvent("removeServletMapping", pattern); } COM: <s> remove any servlet mapping for the specified pattern if it exists </s>
funcom_train/40943655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double dailyConsumption(FillUp other) { double difference_ms = date.getTime() - other.date.getTime(); double days = difference_ms / 1000 / 3600 / 24; if (days < 0.5) { days = 1.0; // Avoid division by zero if two fill-ups on the // same day. } return quantity / days; } COM: <s> calculates average daily consumption between two fill ups </s>
funcom_train/21060280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(String text) { try { document.stopUndo(); document.replace(0, document.getLength(), text, null, true); setCaretPosition(0); document.startUndo(); scrollRectToVisible(new Rectangle(0, 0, 0, 0)); } catch (BadLocationException bl) { bl.printStackTrace(); } } COM: <s> sets the entire text of this text area </s>
funcom_train/11123105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void messageReceived(IoBuffer buffer) throws Exception { synchronized (decodeLock) { decoderBuffer.putBuffer(buffer); // One of those property will be set by the constructor and the other // one should be set by the readIdentification method if (clientVersion == null || serverVersion == null) { if (readIdentification(decoderBuffer)) { decoderBuffer.compact(); } else { return; } } decode(); } } COM: <s> main input point for the mina framework </s>
funcom_train/8009907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClassName(String sClass) { super.setClassName(sClass); if (sClass != null) { _hteSSPart1.setClassName(sClass); _hteSSPart2.setClassName(sClass); _hteSSPart3.setClassName(sClass); _htSeparator1.setClassName(sClass); _htSeparator2.setClassName(sClass); } } COM: <s> specifies the style class to be used for the ssn component </s>
funcom_train/17694933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void singleComparatorTestI() { final Collection<Comparator<Person>> comparators = new LinkedList<Comparator<Person>>(); comparators.add(new NameComparator()); final ComposedComparator<Person> fixture = new ComposedComparator<Person>(comparators); Collections.sort(persons, fixture); Assert.assertSame(JANE_10, persons.get(0)); Assert.assertSame(JILL_30, persons.get(1)); // nothing certain about the last two } COM: <s> checks a sorting using a composed comparator containing only </s>
funcom_train/13668946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void internalFlush() { try{ isFlushing = true; if(ndfs.canFlushCommittedTransaction()){ Collection<NdfsTransaction> transactions = new ArrayList<NdfsTransaction>(); synchronized (transactionsToFlush) { // copy all transactions to flush to another list transactions.addAll(transactionsToFlush); // then clear main list transactionsToFlush.clear(); } Iterator<NdfsTransaction> iterator = transactions.iterator(); while(iterator.hasNext()){ internalFlush(iterator.next()); } } }finally{ isFlushing = false; } } COM: <s> check if there are transactions to flush </s>
funcom_train/48190511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PosIntfposmain update(PosIntfposmain entity) { LogUtil.log("updating Intfposmain instance", Level.INFO, null); try { PosIntfposmain result = entityManager.merge(entity); LogUtil.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { LogUtil.log("update failed", Level.SEVERE, re); throw re; } } COM: <s> persist a previously saved intfposmain entity and return it or a copy of </s>
funcom_train/20404858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onScrollPositionChanged() { final int scrollPosY = scenesScrollPanel.getScrollPosition(); mainPanel.setWidgetPosition(locationBar, 0, TIMELINE_PANEL_HEIGHT - scrollPosY); final int scrollPosX = scenesScrollPanel.getHorizontalScrollPosition(); mainPanel.setWidgetPosition(timeline, LOCATION_PANEL_WIDTH - scrollPosX, 0); mainPanel.setWidgetPosition(addLocationButton, LOCATION_WIDGET_GAP - 2, locationBar.getAbsoluteTop() + locationBar.getOffsetHeight() + LOCATION_WIDGET_GAP); } COM: <s> updates the positions of the location bar and the timeline after the </s>
funcom_train/26461301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String normalize(Object obj) { StringTokenizer st = new StringTokenizer(obj.toString().trim(), " \t\r\n"); StringBuffer buffer = new StringBuffer(128); while (st.hasMoreTokens()) { buffer.append(st.nextToken()); if (st.hasMoreTokens()) { buffer.append(" "); } } return buffer.toString(); } COM: <s> normalizes a string so that strings generated on different platforms can be compared </s>
funcom_train/22368948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readAudioObject(ILocalAudioObject audioObject) { // Don't read from formats not supported by Jaudiotagger if (!localAudioObjectValidator.isOneOfTheseFormats(audioObject.getUrl(), LocalAudioObjectFormat.APE, LocalAudioObjectFormat.MPC)) { readInformation(audioObject, true); } audioObject.setReadTime(System.currentTimeMillis()); } COM: <s> reads a file </s>
funcom_train/7483250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteDocuments(Term[] terms) throws CorruptIndexException, IOException { ensureOpen(); try { boolean doFlush = docWriter.bufferDeleteTerms(terms); if (doFlush) flush(true, false); } catch (OutOfMemoryError oom) { hitOOM = true; throw oom; } } COM: <s> deletes the document s containing any of the </s>
funcom_train/39395371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(final File theDataFolder) { // started as "Plugin-Collection" this.dataFolder = theDataFolder; javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { // @see plugins/org.tcotool.core.runtime/plugin.xml // [extension-point id="*"] loadPlugins("ReportTco", false); loadPlugins("ReportTco", true); loadPlugins("ReportFinance", false); loadPlugins("ReportFinance", true); loadPlugins("Extras", false); } }); } COM: <s> application entry point </s>
funcom_train/25656774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Properties getDefaults() { Properties p = new Properties(); p.put(INDEXOR_DIR, DEFAULT_INDEX_DIR); p.put(CommonProperties.INDEXER_MACHINE, DEFAULT_RMI_SERVER); p.put(CommonProperties.INDEXER_PORT, CommonProperties.DEFAULT_INDEXER_PORT); p.put(CommonProperties.INDEXER_RMI_SERVICENAME, CommonProperties.DEFAULT_INDEXER_SERVICENAME); return p; } COM: <s> set up the default properties </s>
funcom_train/50846858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTimestamp() throws Exception { testGetXXX("getTimestamp"); ResultSet rs = this.newFOROJdbcResultSet(); rs.next(); rs.close(); try { rs.getTimestamp(1); fail("Allowed getTimestamp after close()"); } catch (SQLException ex) { assertEquals( "error code", ex.getErrorCode(), -ErrorCode.X_24501); } } COM: <s> test of get timestamp method of interface java </s>
funcom_train/14500748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test01signOk() throws Exception { byte[] data = readFile(sampleOk); final GenericSignRequest request = new GenericSignRequest(100, data); final GenericSignResponse response = (GenericSignResponse) workerSession.process(WORKER1, request, new RequestContext()); assertEquals("requestId", 100, response.getRequestID()); Certificate signercert = response.getSignerCertificate(); assertNotNull(signercert); } COM: <s> test signing of a simple pdf </s>
funcom_train/50141532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getUsers(String role) throws NotFoundException { List result = new LinkedList(); Enumeration enum = rolesTable.keys(); while (enum.hasMoreElements()) { String key = (String) enum.nextElement(); Hashtable rolesOfUser = (Hashtable) rolesTable.get(key); if (rolesOfUser.containsKey(role)) { result.add(key); } } return result; } COM: <s> gets the users attribute of the default roles authenticator object </s>
funcom_train/9853616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addIRCEventListener(IRCEventListener listener) { if (listener == null) throw new IllegalArgumentException("Listener is null."); int len = listeners.length; IRCEventListener[] oldListeners = listeners; listeners = new IRCEventListener[len + 1]; System.arraycopy(oldListeners, 0, listeners, 0, len); listeners[len] = listener; } COM: <s> adds a new </s>
funcom_train/10626632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddServiceClassBeanContextServiceProviderboolean() { // Instantiate services and add service BeanContextServicesSupport sup = new BeanContextServicesSupport(); sup.addService(Object.class, getProvider(), true); assertEquals("One service should be registered", 1, sup.services.size()); } COM: <s> test method add service with class bean context service provider boolean </s>
funcom_train/14177536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void componentResized(ComponentEvent e) { horizontalBar.setValues(0,100,0,originalDimension.width-displaySurface.getWidth()); verticalBar.setValues(0, 100, 0,originalDimension.height-displaySurface.getHeight()); System.out.println(Integer.toString(originalDimension.width-displaySurface.getWidth()) + " " + Integer.toString(originalDimension.height-displaySurface.getHeight())); } COM: <s> to track the component resizement to dimension the scrollbars </s>
funcom_train/1385890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnArticoli() { if (btnArticoli == null) { try { btnArticoli = new JButton(); btnArticoli.setText("Articoli"); // Generated btnArticoli.setPreferredSize(new Dimension(120, 70)); // Generated btnArticoli.addActionListener(myActionListener); } catch (java.lang.Throwable e) { // TODO: Something } } return btnArticoli; } COM: <s> this method initializes btn articoli </s>
funcom_train/28897439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildMatrices() { { Transform t = new Transform(); t.setIdentity(); t.setRotation(rotation); t.setScale(scale); t.setTranslation(translation); mtTransform = t; } { Transform t = new Transform(); t.setIdentity(); t.setRotation(rotation); t.setScale(scale); mtNormalTransform = t; } setTransformed(true); } COM: <s> code build matrices code updates the world and rotation matrix </s>
funcom_train/36971349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init(Class[] classes) throws SQLException, ClassCastException { if (classes == null) { return; } if (prevClasses == null || !classes.equals(prevClasses)) { prevClasses = classes; queries = new TKPrepQuery[classes.length]; for (int i = 0; i < classes.length; i++) { queries[i] = (TKPrepQuery) TKWebmanDBManager.newQuery(classes[i]); } } } COM: <s> initializes query objects as given in an array of classes </s>
funcom_train/31359744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServerComponentModel getServer(){ if (node == null) { System.out.println("ComponentModel not in tree!"); return null; } if (this.server != null) return this.server; ComponentTreeNode currNode = node; while (currNode != null){ if (currNode.getUserObject() instanceof ServerComponentModel) { this.server = (ServerComponentModel) currNode.getUserObject(); return this.server; } currNode = (ComponentTreeNode)currNode.getParent(); } System.out.println("ComponentModel not on server!"); return null; } COM: <s> convience function to find the server this service or module is on </s>
funcom_train/28325540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List smartList(Class fromClass, String[] projections, String[] whereEqual,Object[] parameters, String[] orderBy) { return smartList(fromClass, projections, WhereClause.getWhereClauseFromStringsEq(whereEqual, parameters), OrderBy.getOrderByFromStrings(orderBy)); } COM: <s> returns list of pojos </s>
funcom_train/40120475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List runTokenizerSequence(CharSequence context, List input, ITokenizer[] tokenizers) { List output = new ArrayList(); for (int i = 0; i < tokenizers.length; ++i) { if (i > 0) output = new ArrayList(); tokenizers[i].tokenize(context, input, output); input = output; } return output; } COM: <s> runs a list of tokenizers on some input </s>
funcom_train/33610806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDomain2(SampleSet<Double> newDomain) { if (sampler2 != newDomain && newDomain != null) { if (sampler2 instanceof ChangeBroadcaster) ((ChangeBroadcaster) sampler2).removeChangeListener(this); sampler2 = newDomain; if (sampler2 instanceof ChangeBroadcaster) ((ChangeBroadcaster) sampler2).addChangeListener(this); updateDomainPlottable(); firePlottableChanged(); } } COM: <s> sets domain of the second parameter </s>
funcom_train/40478016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTexture() { // Create and initialize the WebGLTexture objects. textureFront = createTexture(Resources.INSTANCE.textureSkyboxFt()); textureBack = createTexture(Resources.INSTANCE.textureSkyboxBk()); textureTop = createTexture(Resources.INSTANCE.textureSkyboxUp()); textureBottom = createTexture(Resources.INSTANCE.textureSkyboxDn()); textureLeft = createTexture(Resources.INSTANCE.textureSkyboxLf()); textureRight = createTexture(Resources.INSTANCE.textureSkyboxRt()); checkErrors(); } COM: <s> initializes the textures of this example </s>
funcom_train/3083296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAddedPath(TreePath path) { for (int counter = paths.length - 1; counter >= 0; counter--) if (paths[counter].equals(path)) return areNew[counter]; throw new IllegalArgumentException("path is not a path identified by the TreeSelectionEvent"); } COM: <s> returns true if the path identified by path was added to the </s>
funcom_train/22064440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endDraggingFrame(JComponent comp) { super.endDraggingFrame(comp); if ( comp.getClass().toString().compareTo( "class DmzPaneEntity" ) ==0 ) { ((DmzPaneEntity) comp ).setHasMoved(); comp.getParent().repaint(); } } COM: <s> after the gui stabilises paint our bit </s>
funcom_train/3087800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int compareNonNullMethods(Method m1, Method m2) { int rc = m1.getName().compareTo(m2.getName()); if (rc == 0) { // sort on modifiers int mod1 = m1.getModifiers(); int mod2 = m1.getModifiers(); rc = mod1 - mod2; if (rc == 0) { // sort on parameters int parmCount1 = m1.getParameterTypes().length; int parmCount2 = m2.getParameterTypes().length; rc = parmCount1 - parmCount2; } } return rc; } COM: <s> compares 2 non null methods according to name modifier and parameter </s>
funcom_train/10388272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(String s) { switch (type) { case T_STR: if( strValue==null && s!=null) return false; return strValue.equals( s ); case T_CHARS: return charC.equals( s ); case T_BYTES: return byteC.equals( s ); default: return false; } } COM: <s> compares the message bytes to the specified string object </s>
funcom_train/41826337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isJACMethodEnabled(String method) { return (JDUtilities.getConfiguration() == null || !JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_CAPTCHA_JAC_DISABLE, false)) && JACMethod.hasMethod(method) && JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_JAC_METHODS + method.toLowerCase(), true); } COM: <s> returns if the method is enabled </s>
funcom_train/48416020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void load() { Iterator iterator = loaders.iterator(); while (iterator.hasNext()) { FeederLoader loader = (FeederLoader) iterator.next(); loader.setRepository(this); log.debug("Loading from: " + loader.getClass()); loader.loadPlugins(this); } } COM: <s> loads macros from all loaders into plugins </s>
funcom_train/50862759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasNormalMalfunction() { boolean result = false; if (hasMalfunction()) { Iterator<Malfunction> i = malfunctions.iterator(); while (i.hasNext()) { Malfunction malfunction = i.next(); if ((malfunction.getWorkTime() - malfunction.getCompletedWorkTime()) > 0D) result = true; } } return result; } COM: <s> checks if entity has any normal malfunctions </s>
funcom_train/29840031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (object == null) { return false; } if (object == this) { return true; } if (object instanceof CombinedDomainCategoryPlot) { CombinedDomainCategoryPlot plot = (CombinedDomainCategoryPlot) object; if (super.equals(object)) { boolean b0 = ObjectUtils.equal(this.subplots, plot.subplots); boolean b1 = (this.totalWeight == plot.totalWeight); boolean b2 = (this.gap == plot.gap); return b0 && b1 && b2; } } return false; } COM: <s> tests the plot for equality with an arbitrary object </s>
funcom_train/7273883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearMappings() { // TODO Service.stop() synchronized(DEVICE_LOCK) { LOG.debug("start cleaning"); if (_tcp != null) removeMapping(_tcp); if (_udp != null) removeMapping(_udp); LOG.debug("done cleaning"); } } COM: <s> schedules a shutdown hook which will clear the mappings created </s>
funcom_train/8362580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(Object item) { Iterator it = list.iterator(); while (it.hasNext()) { Variable currVariable = (Variable) it.next(); if ( currVariable != null && currVariable.toString().equals(item.toString()) ) { return true; } } return false; } COM: <s> checks if list contains specified objects string representation </s>
funcom_train/32056838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetSource() { System.out.println("testSetSource"); Object obj = null; JGraph jgraph = new JGraph(); CellMapper cellmapper = null; EdgeView edge = new EdgeView(obj, jgraph, cellmapper); PortView portview = null; edge.setSource(portview); } COM: <s> this function tests set source function of edge view class </s>
funcom_train/40410987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addServer(GsaClient client) { // move it to after the last row with data in it rowDataList.add(new RowData(client)); int row = rowDataList.size() - 1; logger.info("Row " + String.valueOf(row) + " updated"); // since there will be latency in GData call, refresh the hostname/address first fireTableRowsUpdated(row, row); } COM: <s> adds new gsa server </s>
funcom_train/45120807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEngineVersion() throws Exception { report.step("Testing The JSystemAgent getEngineVersion() Method"); try { report.report("Agent " + agentSysObj.client.getId() + " using Jrunner version " + agentSysObj.client.getEngineVersion(), 0); } catch (Exception e) { report.report("Unable to get " + agentSysObj.client.getId() + "JRunner version", 1); } } COM: <s> printing the jrunner version at the agent </s>
funcom_train/46190204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUploadActionForBlogImages() throws Exception { request.setParameter("path", "/"); request.setParameter("type", FileMetaData.BLOG_IMAGE); action.process(request, response); assertEquals("uploadImageToBlog.secureaction", action.getModel().get("uploadAction")); } COM: <s> tests that the upload action is set correctly for blog images </s>