__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/29726124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPane1Edit() { if (jTabbedPane1Edit == null) { jTabbedPane1Edit = new JTabbedPane(); jTabbedPane1Edit.setName("Events"); jTabbedPane1Edit.addTab("Properties", null, getJSplitPane1EditProperties(), null); jTabbedPane1Edit.addTab("Events", null, getJRemEventsView(), null); } return jTabbedPane1Edit; } COM: <s> this method initializes j tabbed pane1 edit </s>
funcom_train/23021603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int consumeInteger(String name, boolean required, int defaultValue) throws ParseException { String value = consume(name, required); if (value == null) { return defaultValue; } try { return Integer.parseInt(value); } catch (NumberFormatException e) { ParseException pe = new ParseException(CoreErrorDomain.ERR.invalidIntegerAttribute); pe.setInternalReason("Invalid integer value for attribute: '" + name + "'"); throw pe; } } COM: <s> gets the value of an integer attribute and remove it from the list </s>
funcom_train/5774390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getInTimeFull() { if (inTimeFull == null) { inTimeFull = new JTextField(); inTimeFull.setBounds(new java.awt.Rectangle(93,95,180,25)); inTimeFull.setEditable(true); } return inTimeFull; } COM: <s> this method initializes in time full </s>
funcom_train/41772780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void purchaseUpTo(int limit) throws SQLException{ int a = super.F1.retrieveAmountfromFundstbl(super.getCustomerNumber()); int count=0; String contractID; super.D1.retrieveForSalefromContracttbl(a); Iterator<String> i = super.D1.forSale.listIterator(); while(i.hasNext() && limit>=0){ contractID = i.next(); buyContract(contractID); limit = limit-super.D1.retRes(contractID); System.out.println("Contract bought."); count++; } setBought(count); return; } COM: <s> searches the database for contracts with sale status flag set to yes </s>
funcom_train/19363320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addStrongTyping(OWLEntity entity) { if (!useStrongTyping) { return; } if(!RDFOntologyFormat.isMissingType(entity, ontology)) { return; } addTriple(entity, RDF_TYPE.getIRI(), entity.accept(OWLEntityTypeProvider.INSTANCE)); } COM: <s> adds triples to strong type an entity </s>
funcom_train/12325022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected T findNext() throws CMException { T retVal = null; if (unsuccessfulFindNextCount < maxUnsuccessfulFindNextCount) { ++unsuccessfulFindNextCount; int attempts = 0; while (input.hasNext() && attempts < maxAttempts) { ++attempts; T t = input.read(); retVal = filter.applyFilter(t); if (retVal != null) { unsuccessfulFindNextCount = 0; break; } } if (attempts > maxAttempts) { logger.warning("findNext() exceeded maxAttempts: " + maxAttempts); } } return retVal; } COM: <s> reads up to </s>
funcom_train/50100637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLineX(int lineX) { this.lineX = lineX; if (content != null && content.isVisible() && content instanceof MultiRowTable) { ((MultiRowTable) content).setLineX(lineX - content.getLocation().x); content.redraw(); } label.redraw(); collapsedLabel.redraw(); } COM: <s> sets the line x </s>
funcom_train/8804016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSAuthVersion(HttpRequest request){ if (request.hasNotHeader(Header.SAuth.Value.Authorization)) request.setHeader(Header.SAuth.Value.Authorization); if (request.hasNotHeader(Header.SAuth.Value.Version)) request.setHeader(Header.SAuth.Value.Version); } COM: <s> define client request for authentication </s>
funcom_train/26602073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*private void callingdecidingHashMapRules(Object []rls){ if ( rls == null ) return; int size = rls.length; for(int i = 0; i < size; ++i){ ProductionRules productionRule = (ProductionRules)rls[i]; decidingHashMapRules(productionRule); } }*/ COM: <s> this method is used for calling recursively the deciding hash map function </s>
funcom_train/7494460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDisplayName(String id, ULocale locale) { // assume if the user called this on us, we must have handled some fallback of this id // if (isSupportedID(id)) { if (locale == null) { return id; } ULocale loc = new ULocale(id); return loc.getDisplayName(locale); // } // return null; } COM: <s> return a localized name for the locale represented by id </s>
funcom_train/32748467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Channel getChannel( final String signalName ) { Channel channel; if ( !channelMap.containsKey( signalName ) ) { channel = newChannel( signalName ); channelMap.put( signalName, channel ); } else { channel = (Channel)channelMap.get( signalName ); } return channel; } COM: <s> get a channel associated with the signal name </s>
funcom_train/33277189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SuperBlock getBranchTarget(int bci) { int target; if ((itsCodeBuffer[bci] & 0xFF) == ByteCode.GOTO_W) { target = bci + getOperand(bci + 1, 4); } else { target = bci + (short) getOperand(bci + 1, 2); } return getSuperBlockFromOffset(target); } COM: <s> get the target super block of a branch instruction </s>
funcom_train/21778386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConstantMenus(final JMenu [] constantMenus) { if(this.constantMenus == null) { this.constantMenus = new ArrayList(constantMenus.length); } for(int i = 0; i < constantMenus.length; i++) { addConstantMenu(constantMenus[i]); } } COM: <s> adds an array of jmenus to the list of constant menus </s>
funcom_train/51674761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMenu(){ add( new CopyMethod(this.comp) ); if( this.comp instanceof JTextComponent ) { add( new CutMethod(this.comp) ); } if( this.comp instanceof JTextComponent ) { add( new PasteMethod(this.comp) ); } if( this.comp instanceof JTextComponent ) { add( new JSeparator() ); add( new ClearAllMethod(this.comp) ); } } COM: <s> for different component arrow context menu includes different actions </s>
funcom_train/3921533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCopyResourceFiles_SameFolder() { try { cpViewer.copyResourceFiles(cp, cp.getProjectFolder(), null); // Shouldn't reach here fail("Should have thrown an Exception"); } catch(IOException ex) { assertTrue(true); } } COM: <s> make sure we dont copy to the same folder as the source files </s>
funcom_train/13865391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItemState(TreeItem item, boolean animate) { // Immediately complete previous open cancel(); // Open the new item if (animate) { curItem = item; opening = item.open; run(Math.min(ANIMATION_DURATION, ANIMATION_DURATION_PER_ITEM * curItem.getChildCount())); } else { UIObject.setVisible(item.childSpanElem, item.open); } } COM: <s> open the specified </s>
funcom_train/1304889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAllText(String patternString, Tree<XmlLite.Data> node, String delim) { final StringBuilder result = new StringBuilder(); final List<String> texts = getText(patternString, node, true, false); if (texts != null) { for (String text : texts) { if (result.length() > 0) result.append(delim); result.append(text); } } return result.toString(); } COM: <s> get all deep text under the node concatenating using the given delim </s>
funcom_train/31359534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getSensitivity(int buttonNo, int row){ ComponentModel cm = null; if (row >= 0) cm = dataModel.get(row); if (buttonNo >= reorder.length) return false; switch(reorder[buttonNo]){ case CREATE: return true; case DELETE: if (row < 0) return false; if (!cm.isStarted()) return true; return false; case DISCONNECT: if (row < 0) return false; if (cm.isStarted()) return true; return false; default: return (row >=0); } } COM: <s> is this button sensitive </s>
funcom_train/45269768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showTrayIcon(TrayIcon icon, String toolTip) throws AWTException { SystemTray tray = SystemTray.getSystemTray(); TrayIcon[] icons = tray.getTrayIcons(); if (icons.length > 0) { for (TrayIcon t : icons) { tray.remove(t); } } icon.setToolTip(toolTip); tray.add(icon); } COM: <s> displays specified tray icon with specified tooltip </s>
funcom_train/45622808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBootstrapperItemsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GenerateBootstrapperType_bootstrapperItems_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GenerateBootstrapperType_bootstrapperItems_feature", "_UI_GenerateBootstrapperType_type"), MSBPackage.eINSTANCE.getGenerateBootstrapperType_BootstrapperItems(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the bootstrapper items feature </s>
funcom_train/4640687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean redoMove(boolean isNetwork){ if(isNetwork && !me){ return false; } if (!redoMoves.isEmpty()){ GameMove gameMove = redoMoves.pop(); gameMove.printDoMove(); gameMove.makeMove(); moves.push(gameMove); this.numberOfMoves++; if(isNetwork){ Client.sendMsg(new InformClients(this.game, moves.peek().getBriefDo())); } return true; } else return false; } COM: <s> redoing the players last move </s>
funcom_train/16269382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // start the process off by creating a special Call. if (_regcall == null) { _regcall = new Call(this, true, false); _regcall.setUnameNpass(_username, _password); this.addNewWaitingAck(_regcall); } // now send a regReq - the process flow from that. _regcall.register(); } COM: <s> internal task to </s>
funcom_train/28592228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ensureCapacity(int newSize) { int newCap = array.length; if (newCap < newSize) { while (newCap < newSize) { newCap += newCap + 1; } Object[] newArray = new Object[newCap]; System.arraycopy(array, 0, newArray, 0, size); array = newArray; } return; } COM: <s> expands the heap capacity to handle up to size elements </s>
funcom_train/3076387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addCommonOpts(Commandline cmdLine) { cmdLine.createArgument().setLine("-p " + getPort() + " -u " + getUser()); if (!Luntbuild.isEmpty(getPassword())) { Commandline.Argument arg = cmdLine.createArgument(); arg.setLine("-P " + getPassword()); arg.setDescriptiveLine("-P ******"); } } COM: <s> add common options for various p4 command </s>
funcom_train/26448486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isTransient(PropertyMetaInfo aPMI) throws MetaInfoException { boolean res = false; if (aPMI instanceof RoleMetaInfo) { DomainObjectMetaInfo roleTypeMetaInfo = MetaInfoBroker .getInstance() .getDomainObjectMetaInfoFromDOIClassname( ((RoleMetaInfo) aPMI).getAssociatedType().getName()); if (!(roleTypeMetaInfo instanceof IdentifiedDomainObjectMetaInfo)) { res = true; } } return res; } COM: <s> checks if the given propertys data is transient or not </s>
funcom_train/31947717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSockPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ESockEntry_sock_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ESockEntry_sock_feature", "_UI_ESockEntry_type"), SailuserdataPackage.Literals.ESOCK_ENTRY__SOCK, true, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the sock feature </s>
funcom_train/51575431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void shellCommand(final String command) { if (DEBUG) { System.err.println(java.util.ResourceBundle.getBundle("anecho/JamochaMUD/TinyFugue/TinyFugueBundle").getString("JMTFCommands.shellCommand()_has_been_called.__This_is_not_yet_implemented.")); } } COM: <s> execute a shell command </s>
funcom_train/13272065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFloorThickness(float floorThickness) { if (floorThickness != this.floorThickness) { float oldFloorThickness = this.floorThickness; this.floorThickness = floorThickness; this.propertyChangeSupport.firePropertyChange(Property.FLOOR_THICKNESS.name(), oldFloorThickness, floorThickness); } } COM: <s> sets the floor thickness of this level </s>
funcom_train/36359814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Spacer getSpacer5() { if (spacer5 == null) {//GEN-END:|69-getter|0|69-preInit // write pre-init user code here spacer5 = new Spacer(16, 1);//GEN-LINE:|69-getter|1|69-postInit // write post-init user code here }//GEN-BEGIN:|69-getter|2| return spacer5; } COM: <s> returns an initiliazed instance of spacer5 component </s>
funcom_train/5222202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int save() { // If not have an id attribute this is a new record if (isSingleId()) { if (attributes.get(idColumn) == null) { return insert(); } }else if(isMultipleId()){ if(idColumns.isEmpty()){ throw new RuntimeException("You are using multiples id, you must inform then!"); } return insert(); } try { return loader.update(); } catch (SQLException e) { logger.fatal(e.getMessage()); } return 0; } COM: <s> this method saves the object </s>
funcom_train/36252927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean modify(Domain domain) { // TODO check enough resources Domain d = domains.getDomain(domain.getId()); d.setMemory(domain.getMemory()); d.setCPU(domain.getCPU()); try { resource.allocateResources(); return true; } catch (Exception e) { log.error("modifying \"" + domain.getName() + "\" resources requirement."); } return false; } COM: <s> modify resource allocation manually </s>
funcom_train/9937924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LhaEntry getNextEntry() throws LhaException, IOException { if (entry != null) dis.closeEntry(); LhaEntryReader hr = new LhaEntryReader(encoding) { protected int _read(byte[] b) throws IOException { return (in.read(b)); } }; entry = hr.readHeader(); if (entry != null) { dis = new LhaDecoderInputStream(in, entry); closed = false; } else { dis = null; closed = true; } return (entry); } COM: <s> reads the next lha entry and positions stream at the beginning of the </s>
funcom_train/21023486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePropertyGroup(){ selectedTab = tabPanel.getSelectedIndex(); // Sets the actual selectedted Tab // Removes group PropertyGroup group = (PropertyGroup) tabPanel.getWidget(selectedTab); group.removeGroup(); propertyGroup.remove(group); // Remove tab tabPanel.remove(selectedTab); // If removed tab is last the new selected tab is selectedTab -1 if (tabPanel.getWidgetCount()-1<selectedTab) { selectedTab--; } // Sets the new selected tab tabPanel.selectTab(selectedTab); } COM: <s> removes the actual property group </s>
funcom_train/12162571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddTableAttributesBorderSpacingZero() throws Exception { Element table = setUpTableAttributesBorderSpacingTests(0); assertEquals("Wrong value for border attribute", "0", table.getAttributeValue("border")); assertEquals("Wrong value for cellspacing attribute", null, table.getAttributeValue("cellspacing")); } COM: <s> test the add table attributes method </s>
funcom_train/17527322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // Extract parameters we will need String requested = (String) request.getParameter("channel"); if (requested == null) return (mapping.findForward("failed")); // set in session HttpSession session = request.getSession(false); if (session != null) session.setAttribute(ChannelFactorySet.FACTORY_SELECTOR_KEY, requested); log.info("Set channel to [" + requested + "]"); return (mapping.findForward(requested)); } COM: <s> process the specified http request and create the corresponding http </s>
funcom_train/2289106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resetCategories(CmsObject cms, CmsResource resource) throws CmsException { CmsRelationFilter filter = CmsRelationFilter.TARGETS; filter = filter.filterType(CmsRelationType.CATEGORY); filter = filter.filterResource(cms.readResource("/system/categories/")); filter = filter.filterIncludeChildren(); cms.deleteRelationsFromResource(cms.getSitePath(resource), filter); } COM: <s> removes this resource from all categories </s>
funcom_train/2033667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testObtenerObservacion() { System.out.println("obtenerObservacion"); Asociado asociado = new Asociado(); Observacion instance = new Observacion(); ArrayList<Observacion> expResult = null; ArrayList<Observacion> result = instance.obtenerObservacion(asociado); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. } COM: <s> test of obtener observacion method of class observacion </s>
funcom_train/25710138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int runBinning() { int exitVal = -1; checkBinLevels(); makeRandPCRError(); exitVal = runRemovegaps(); exitVal += runReadsynec(); exitVal += runCorrectpcr(); exitVal += runDivergencematrix(); exitVal += runBinningdanny(); return exitVal; } COM: <s> runs the binning process </s>
funcom_train/18703159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeValues() { IDialogSettings settings = getDialogSettings(); if (settings != null) { initializeValues(settings, HISTORY_HOST, host); initializeValues(settings, HISTORY_PORT, port); initializeValues(settings, HISTORY_MANAGER, managerContext); initializeValues(settings, HISTORY_USER, user); } } COM: <s> initializes states of the controls </s>
funcom_train/13674907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { m_Serving = false; //wait until pool complete while (m_Pool.size() != m_Size) { try { wait(); } catch (Exception ex) { //do nothing but wait again :) } } //remove all elements m_Pool.clear(); }//clearPool COM: <s> removes all tt castor database tt references from </s>
funcom_train/15491472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImagePlus openTiff(InputStream in, String name) { FileInfo[] info = null; try { TiffDecoder td = new TiffDecoder(in, name); if (IJ.debugMode) td.enableDebugging(); info = td.getTiffInfo(); } catch (FileNotFoundException e) { IJ.error("TiffDecoder", "File not found: "+e.getMessage()); return null; } catch (Exception e) { IJ.error("TiffDecoder", ""+e); return null; } return openTiff2(info); } COM: <s> attempts to open the specified input stream as a </s>
funcom_train/11651833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getEncoded(String k) { try { return getEncoded(k, URL_ARGUMENT_ENCODING); } catch (UnsupportedEncodingException e) { // This can't happen (how should utf8 not be supported!?!), // so just throw an Error: throw new Error("Should not happen: " + e.toString()); } } COM: <s> get the specified value url encoded using utf 8 encoding </s>
funcom_train/18068495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttribute(String name, Object value) throws DctmFileException { if (this.dctmClient.isReadOnly()) { throw new DctmFileException("Writing is not allowed"); } try { this.file.getContent().setAttribute(name, value); } catch (FileSystemException e) { throw new DctmFileException("Error setting attribute " + name + " with value " + value, e); } } COM: <s> sets an attribute </s>
funcom_train/20395402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test4_SortCustomerNationKey() throws Exception { TPPMS sort = new TPPMS(); Table table = new Customer(); File file = new File(Utils.FILEPATH_OUTPUT+"/sortoutput.txt"); long t1 = System.nanoTime(); SQL.orderBy(table, file, new int[]{table.getIndex(Customer.FIELD_C_NATIONKEY)}, TPPMS.ASC, Utils.MAX_MEM); System.out.println((System.nanoTime()-t1)/1000000); } COM: <s> test 4 sort customer nation key </s>
funcom_train/3295961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeHeightValue(float height, GridTile tileDescription, Object outputTile, int tilex, int tilez) { DataOutputStream outputFile = (DataOutputStream)outputTile; try { outputFile.writeShort((short)height); } catch (IOException e) {System.err.println(e);} } COM: <s> write the height value to tile file </s>
funcom_train/18936044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addXMPPUser(String userName, String userServer, String password) { try { new XMPPUtils().addUser( userServer, userName, password, DEFAULT_SERVER_PORT, DEFAULT_SECURE_PORT); } catch (Exception e) { JOptionPane.showMessageDialog(null, e.getMessage(), "Error on creating user", JOptionPane.ERROR_MESSAGE); } } COM: <s> creates a new xmpp acount to the xmpp user added </s>
funcom_train/8322933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isJoinRequired() { Member[] members = evaluator.getMembers(); // members[0] is the Measure, so loop starts at 1 for (int i = 1; i < members.length; i++) { if (!members[i].isAll()) { return true; } } return false; } COM: <s> returns whether a join with the fact table is required </s>
funcom_train/46744572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocationRef(DisplayModel locationRef) { if (Converter.isDifferent(this.locationRef, locationRef)) { DisplayModel oldlocationRef= new DisplayModel(this); oldlocationRef.copyAllFrom(this.locationRef); this.locationRef.copyAllFrom(locationRef); setModified("locationRef"); firePropertyChange(String.valueOf(CENSUS_LOCATIONREFID), oldlocationRef, locationRef); } } COM: <s> location for this visit </s>
funcom_train/29817323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setComponentConstraints(PComponent component, PConstraint constraints) { for (PComponentEntry entry : getComponents()) { PConstraintComponentEntry centry = (PConstraintComponentEntry) entry; if (centry.getComponent() == component) { centry.setConstraints(constraints); return; } } throw new IllegalArgumentException("Component not found."); } COM: <s> warning setting the constraints does not cause re layout of the components </s>
funcom_train/18742289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doExploreState() { start(); getExploreStateStrategy().prepare(getGts(), getState()); getExploreStateStrategy().next(); changeGts(getGts(), true); RuleTransition outTrans = getOutTransition(getState()); if (outTrans != null) { changeMatch(outTrans); changeDisplay(DisplayKind.LTS); } finish(); } COM: <s> fully explores a given state of the gts </s>
funcom_train/41163272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoMatrixExr2User entity) { EntityManagerHelper.log("deleting CoMatrixExr2User instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoMatrixExr2User.class, entity.getMatrixUserId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co matrix exr2 user entity </s>
funcom_train/2487213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JScrollPane createTree() { DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root"); createTree(root, rootBlock); JTree tree = new JTree(root) { public Insets getInsets() { return new Insets(5, 5, 5, 5); } }; return new JScrollPane(tree); } COM: <s> method create tree </s>
funcom_train/27795838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void genHeader() { println("### $ANTLR " + Tool.version + ": " + "\"" + antlrTool.fileMinusPath(antlrTool.grammarFile) + "\"" + " -> " + "\"" + grammar.getClassName() + ".py\"$"); } COM: <s> generate a header that is common to all python files </s>
funcom_train/10574250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDriverClassLoader() throws Exception { getConnection(); ClassLoader cl = ds.getDriverClassLoader(); assertNotNull(cl); assertTrue(cl instanceof TesterClassLoader); assertTrue(((TesterClassLoader) cl).didLoad(ds.getDriverClassName())); } COM: <s> jira dbcp 333 check that a custom class loader is used </s>
funcom_train/16177157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DlReader (String filename) { try { reader = new BufferedReader(new FileReader(filename)); } catch (IOException ex) { try { if (reader != null) reader.close(); } catch (IOException ex1) {} SimUtilities.showError("Error reading network file: " + filename, ex); System.exit(0); } } COM: <s> creates a dl reader to read the specified file </s>
funcom_train/3527890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { boolean isEqual = false; if (other instanceof CopyRoute) { isEqual = ((CopyRoute)other).getSourceUri().equals(getSourceUri()) && ((CopyRoute)other).getDestinationUri().equals(getDestinationUri()); } return isEqual; } COM: <s> returns code true code if the other object is a copy route </s>
funcom_train/20342315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getPresentationCommand() { if (presentationCommand == null) {//GEN-END:|35-getter|0|35-preInit // write pre-init user code here presentationCommand = new Command("Presentation", Command.OK, 0);//GEN-LINE:|35-getter|1|35-postInit // write post-init user code here }//GEN-BEGIN:|35-getter|2| return presentationCommand; } COM: <s> returns an initiliazed instance of presentation command component </s>
funcom_train/50440102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(){ try { // Get children and initialize them Enumeration enum=getChildren(); while(enum.hasMoreElements()){ ((KineticComponent)enum.nextElement()).init(); } // Initialize rate by calling doEval // m_dblValue=this.doEval(); } catch (Exception error){ // Error logging goes here error.printStackTrace(); } } COM: <s> init initailizes this and all of its children </s>
funcom_train/42903183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int set_dft_length(int num_taps) { int result, n = num_taps; for (result = 8; n > 2; result <<= 1, n >>= 1) { ; } result = range_limit(result, 4096, 131072); assert (num_taps * 2 < result); return result; } COM: <s> set to 4 x nearest power of 2 </s>
funcom_train/45471965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMapping(final Mapping mapping) throws MappingException { if (_loader == null) { _loader = mapping.getClassLoader(); } MappingUnmarshaller mum = new MappingUnmarshaller(); MappingLoader resolver = mum.getMappingLoader(mapping, BindingType.XML); _internalContext.getXMLClassDescriptorResolver().setMappingLoader(resolver); } COM: <s> sets the mapping to use during unmarshalling </s>
funcom_train/10274859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { SQLPreventRequestData.setHTTPRequest( (HttpServletRequest) req ); SQLPreventRequestData.setHTTPResponse( (HttpServletResponse) res ); chain.doFilter(req, res); } COM: <s> effects stores req and res to sqlprevent data thread local storage </s>
funcom_train/29547952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersects(Dimension d) { int x1 = (int) from.drawx; int y1 = (int) from.drawy; int x2 = (int) to.drawx; int y2 = (int) to.drawy; return (((x1 > 0 || x2 > 0) && (x1 < d.width || x2 < d.width)) && ((y1 > 0 || y2 > 0) && (y1 < d.height || y2 < d.height))); } COM: <s> check if edge intersect the given dimension </s>
funcom_train/16385545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init() { super.init(); PluginLog.logDebug("init() artifact=" + this.artifact.getName()); this.wsdlFilename = XmlSchemaHelpers.mapInterfaceToWsdlLocation(this.isDependency, this.artifact.getFullyQualifiedName(), super.rootPkg, SOAP_TYPE); } COM: <s> this is the initialization process for building all the necessary </s>
funcom_train/42268130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { PlotDatum newObject = null; try { // Make a shallow copy of this object. newObject = (PlotDatum) super.clone(); // Clone this object's data structures. if (this.symbol != null) newObject.symbol = (PlotSymbol)this.symbol.clone(); } catch (CloneNotSupportedException e) { // Can't happen. e.printStackTrace(); } // Output the newly cloned object. return newObject; } COM: <s> make a copy of this plot datum object </s>
funcom_train/45801571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getHeight() { TopicIF oType = OntopolyModelUtils.getTopicIF(getTopicMap(), PSI.ON_HEIGHT); OccurrenceIF occ = OntopolyModelUtils.findOccurrence(oType, getTopicIF()); return (occ == null ? 1 : Integer.parseInt(occ.getValue())); } COM: <s> returns the assigned height of the identity text field </s>
funcom_train/10637654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSocket_BasicStatusBeforeConnect() throws SocketException { assertFalse(this.channel1.isConnected());// not connected DatagramSocket s1 = this.channel1.socket(); assertSocketBeforeConnect(s1); DatagramSocket s2 = this.channel1.socket(); // same assertSame(s1, s2); } COM: <s> test method for datagram channel impl </s>
funcom_train/42682220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startEdit(Element el){ AttributesDialog ad = new AttributesDialog(StuffComposite.this.getShell(),el); ad.setLocation(Statics.getOriginForCenter(AttributesDialog.WIDTH, AttributesDialog.HEIGHT)); HLog.facelogger.debug("Starting properties editing"); ad.addDisposeListener(new DisposeListener(){ public void widgetDisposed(DisposeEvent e) { HLog.facelogger.debug("Properties editing finished, refreshing contents"); tv.refresh(); } }); ad.open(); } COM: <s> opens the editing window </s>
funcom_train/14128249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getJSplitPane() { if (jSplitPane == null) { jSplitPane = new JSplitPane(); jSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT); jSplitPane.setPreferredSize(new Dimension(800, 600)); jSplitPane.setTopComponent(getJPanel2()); jSplitPane.setBottomComponent(getJPanel12()); } return jSplitPane; } COM: <s> this method initializes j split pane </s>
funcom_train/51811819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddListener() { producer.fireTestListenerMessage(getName()); assertEquals("Message not delivered", 1, listener.messages.size()); assertEquals("Wrong message delivered", getName(), listener.messages.get(0)[2]); } COM: <s> adding a basic listener </s>
funcom_train/29550347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetResourceUriSkeleton() { String expectedResourceUriSkeleton = "http://" + MindRaider.profile.getHostname() + "/e-mentality/"; String actualResourceUriSkeleton = MindRaiderVocabulary .getResourceUriSkeleton(); assertEquals("actualResourceUriSkeleton is: " + actualResourceUriSkeleton, expectedResourceUriSkeleton, actualResourceUriSkeleton); } COM: <s> the get resource uri skeleton test case </s>
funcom_train/24525139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String trimAndRemoveQuoutes(String s) { s = s.trim(); if ((s.startsWith("\"") || s.startsWith("'")) && s.endsWith("\"") || s.endsWith("'")) { s = s.substring(1, s.length() - 1); } return s; } COM: <s> trims a string and removes surrounding or </s>
funcom_train/24131290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertFormInstanceInXFormsModel() { String formPlaceHolder = "%%FORM_INSTANCE%%"; String xmlDeclararion = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; replace(formPlaceHolder, xformsModel.asXML().substring(xmlDeclararion.length()), null); } COM: <s> replaces the placeholder form instance in in xml template with the xform model </s>
funcom_train/17009082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EventProducer createProducer() throws CommunicationsException { String errorReport = "Creation of EventProducer failed: "; EventProducer eventProducer = null; try { initLatch.await(); eventProducer = clientService.createEventProducer(); } catch (InterruptedException ie) { errorReport += ie.getMessage(); throwCommunicationsException(errorReport); } catch (ServiceException se) { errorReport += se.toString(); throwCommunicationsException(errorReport); } return eventProducer; } COM: <s> create a stream producer </s>
funcom_train/31124357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endReached(EntityHeader eh, Exception e) { next = null; header = null; if (outStream != null) try { outStream.flush(); outStream = null; } catch (IOException ioe) { } if (handler != null) { handler.endReached(eh, e); handler = null; } else if (e != null) { // e.printStackTrace(); } } COM: <s> this method is invoked when end of stream is reached </s>
funcom_train/3668506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String retrieveComboClass(Combo combo, Map map) { /* * for (Iterator i = map.values().iterator(); i.hasNext();) { String * value = (String)i.next(); if * (value.equals(combo.getItem(combo.getSelectionIndex()))) { return } } */ return (String) map.keySet().toArray(new String[0])[combo .getSelectionIndex()]; } COM: <s> retrieves the class related with combo selected </s>
funcom_train/28298160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setInsertNode() { String text = TransBaseText.getText(10323); pointRemInsM.setText(pointText+text); pointRemInsM.setMnemonic(text.charAt(0)); pointEditM.setEnabled(false); setInsertAccelerator(pointRemInsM); } COM: <s> sets the point menu entry to insert </s>
funcom_train/1345450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNote2() { Trajectory mapper = new Trajectory(); ArrayList<Float> coords = new ArrayList<Float>(); coords.add((float) 0); coords.add((float) 4); coords.add((float) 1); coords.add((float) 4); mapper.plot(coords); ArrayList<Note> notes = mapper.map(); assertEquals(1, notes.size()); Note note = notes.get(0); assertEquals("G", note.getStep()); assertEquals(4, note.getOctave()); assertEquals(1, note.getDuration()); } COM: <s> 1 note of pitch g and length 1 </s>
funcom_train/10154308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateMappingsHashTable(final Object obj, final ArrayList sourceMappedNodes) { if (mappingsHashTable.containsKey(obj)) { mappingsHashTable.remove(obj); } if (!sourceMappedNodes.isEmpty()) { mappingsHashTable.put(obj, sourceMappedNodes); } } COM: <s> updates the hashtable with new mappings </s>
funcom_train/22279724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encode(Encoder encoder) throws CodingException { Object keysArray[], elementsArray[]; if (count == 0) return; keysArray = keysArray(); elementsArray = elementsArray(); encoder.encodeObjectArray(keysField, keysArray, 0, keysArray.length); encoder.encodeObjectArray(elementsField, elementsArray, 0, elementsArray.length); } COM: <s> encodes the hashtable instance </s>
funcom_train/44702752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String isInChan(String channel,String nick) { if (getBot().inCommonChannel(nick)) { String[] cChans=getBot().getCommonChannels(nick); for (int i=0;i<cChans.length;i++) { if (cChans[i].equalsIgnoreCase(channel)) { return cChans[i]; } } } return null; } COM: <s> check if the nick is in a given channel </s>
funcom_train/32069178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addRequests(Collection<Request> requests) { boolean addOk = getRequests().addAll(requests); if (addOk) { for(Request request : requests) { request.setCustomer((Customer)this); } } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed requests collection to the customer collection </s>
funcom_train/7690167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String shuffleSeq(String s) { char[] a = s.toCharArray(); char swap; for (int i = 0; i < a.length-1; i++) { int r = random.nextInt(a.length-i-1) + 1; swap = a[r]; a[r] = a[i]; a[i] = swap; } return String.valueOf(a); } COM: <s> note not to sure how good this shuffling algorithm is </s>
funcom_train/4174093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DatatypeEnum getDatatype(String column) throws SQLException { if (index.containsKey(column)) { return datatype[index.get(column).intValue()]; } else { final SQLExceptionState state = SQLExceptionState.COLUMN_NOT_FOUND; throw new SQLException("Column " + column + " does not exist in dataset.", state.name(), state.code()); } } COM: <s> returns the designated columns datatype </s>
funcom_train/36230258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRadical() { try { String tmp = new String(this.getClass().getName()); return tmp.substring(tmp.lastIndexOf(".") + 1, tmp.length()); } catch (Exception e) { Logging.log.println(" getRadical Error "); Logging.log.println(" getRadical " + this.getClass().getName()); return "Error"; } } COM: <s> get the name of the object class without the packages </s>
funcom_train/2057706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hideComboBoxes() { if (brandInfoList != null) { brandInfoList.setVisible(false); } if (deviceInfoList != null) { deviceInfoList.setVisible(false); } if (codeSetInfoList != null) { codeSetInfoList.setVisible(false); } cleanCodeGrid(); } COM: <s> hides the combobox and clean the grid </s>
funcom_train/47276404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Radio addRadio(final String theName, final int theX, final int theY) { Radio myController = new Radio(controlP5, (Tab) controlP5.controlWindow.tabs().get(1), theName, theX, theY); controlP5.register(myController); return myController; } COM: <s> add a radio list to control p5 </s>
funcom_train/1377164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void createOrUpdate() { DebitTransaction acc = new DebitTransaction(); acc.setCreateDate(new Date()); acc.setUpdateDate(new Date()); acc.setDescription("Äccount Test Two"); debitTransactionDAO.createOrUpdate(acc); assertNotNull(acc.getId()); } COM: <s> test if an debit transaction is being removed correctly </s>
funcom_train/48575524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void traverse(DataHyperGraph G, Integer v, int solution_count_limit, int timeout_limit, int solutions_limit){ before_traverse(G,v); //additional init m_config_solution_count_limit = solution_count_limit; m_config_timer_limit = timeout_limit; m_config_solutions_limit= solutions_limit; HashSet<Integer> Vx = new HashSet<Integer> (); Vx.add(v); // run process on_traverse(G, v, Vx, new DataHyperGraph()); after_traverse(); } COM: <s> traverse hypergraph to find solution graph with a limit of returned result </s>
funcom_train/3542986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxHistory(int size) { maxHistory = size; int current = history.size(); if (current > size) { for (int i = current - 1; i >= size; i--) { history.remove(i); } shownHistory = history; fireContentsChanged(this, maxHistory, current); } } COM: <s> sets the max history size </s>
funcom_train/10795693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultAccessType(String type) { if ("PROPERTY".equals(type.toUpperCase())) setDefaultAccessType(AccessCode.PROPERTY); else if ("FIELD".equals(type.toUpperCase())) setDefaultAccessType(AccessCode.FIELD); else throw new IllegalArgumentException(_loc.get("access-invalid", type).toString()); } COM: <s> auto configuration method for the default access type of base classes </s>
funcom_train/16629084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void println(Bot bot, String msg) { if(msg != null){ if(!msg.startsWith("<font")){ msg = "<font color=#FFFFFF>" + msg + "</font>"; } msg = msg + "\n"; messages.add(Message.obtain(handler, TEXT, msg)); } } COM: <s> prints a string followed by a line terminator </s>
funcom_train/31100241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TTFFile loadTTF(String fileName, String fontName) { TTFFile ttfFile = new TTFFile(); try { System.out.println("Reading " + fileName + "..."); System.out.println(); FontFileReader reader = new FontFileReader(fileName); ttfFile.readFont(reader, fontName); } catch (Exception e) { e.printStackTrace(); return null; } return ttfFile; } COM: <s> read a ttf file and returns it as an object </s>
funcom_train/51178954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addJournalListToAutoCompleter() { if (autoCompleters.containsKey("journal")) { AbstractAutoCompleter ac = autoCompleters.get("journal"); Set<String> journals = Globals.journalAbbrev.getJournals().keySet(); for (String journal : journals) ac.addWordToIndex(journal); } } COM: <s> if an autocompleter exists for the journal field add all </s>
funcom_train/37823415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { if (writeProtected) return; try { out.close(); File log = new File(fileName); FileReader testReader = new FileReader(log); testReader.skip(log.length()-testString.length()); char[] streamEnd = new char[testString.length()]; testReader.read(streamEnd); testReader.close(); if (String.valueOf(streamEnd).equals(testString)) log.delete(); System.setErr(stderr); } catch (IOException e) {e.printStackTrace();} } COM: <s> closes the created logfile and redirects the standard error stream back </s>
funcom_train/3330254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SimpleType getItemType() { if (_hasReference) { SimpleType simpleType = resolveReference(_itemType); if (simpleType == null) { String err = "Unable to resolve type: " + _itemType.getName(); throw new IllegalStateException(err); } _hasReference = false; _itemType = simpleType; } return _itemType; } //-- getItemType COM: <s> returns the simple type for the items of this list type </s>
funcom_train/16490806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setActive(boolean isActive) { Boolean activeB = isActive ? Boolean.TRUE : Boolean.FALSE; if (this.getWindowDecorationStyle() == JRootPane.FRAME) { this.closeButton.putClientProperty("paintActive", activeB); this.minimizeButton.putClientProperty("paintActive", activeB); this.toggleButton.putClientProperty("paintActive", activeB); } this.getRootPane().repaint(); } COM: <s> updates state dependant upon the windows active state </s>
funcom_train/9577701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(ChangeEvent event) { if (event instanceof FYIEvent) return; if (undoInProgress || redoInProgress) return; boolean undoEmpty = undoStack.empty(); boolean redoEmpty = redoStack.empty(); if (event.isUndoable()) { if (!undoEmpty) { ChangeEvent priorEvent = undoStack.peek(); if (priorEvent.combine(event)) return; } undoStack.push(event); if (!redoStack.empty()) redoStack = new Stack<ChangeEvent>(); if (undoEmpty || !redoEmpty) fireHistoryChanged(); } } COM: <s> add a new undoable event to the undo stack </s>
funcom_train/20372788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAllPortalsFromDB() { System.out.println("GetAllPortalsFromDB"); //Collection expResult = null; Collection result = instance.GetAllPortalsFromDB(); //assertEquals(expResult, result); assertNotNull(result); // TODO review the generated test code and remove the default call to fail. //fail("The test case is a prototype."); } COM: <s> test of get all portals from db method of class br </s>
funcom_train/28754880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPurimethodother(String newVal) { if ((newVal != null && this.purimethodother != null && (newVal.compareTo(this.purimethodother) == 0)) || (newVal == null && this.purimethodother == null && purimethodother_is_initialized)) { return; } this.purimethodother = newVal; purimethodother_is_modified = true; purimethodother_is_initialized = true; } COM: <s> setter method for purimethodother </s>
funcom_train/41150404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer text = new StringBuffer(); if (m_optimizer == null || !m_optimizer.modelBuilt()) { return "SVMreg: No model built yet."; } try { text.append(m_optimizer.toString()); } catch (Exception e) { return "Can't print SMVreg classifier."; } return text.toString(); } COM: <s> prints out the classifier </s>