__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/37822032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartitionView() { partitionView = new PartitionPanel(params, beamer); partitionView.getForwardButton().addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { partitionView.writeObservation(); createFrequencyView(); } }); partitionView.getBackButton().addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { setView(xInputView); } }); // content.add(partitionView, BorderLayout.CENTER); setView(partitionView); } COM: <s> creates a new code partition panel code object and adds action </s>
funcom_train/25282719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startStreaming() { try { video_processor_enabled = true; while (!v_in.startStream()) Thread.sleep(100); filter_mgr.enableFilter("ScreenDrawer", true); final Thread th_main = new Thread(new RunnableProcessor()); th_main.start(); PManager.getDefault().state = ProgramState.STREAMING; filter_mgr.submitDataObjects(); } catch (final Exception e) { e.printStackTrace(); } } COM: <s> starts video streaming </s>
funcom_train/25823175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prettyPrint(boolean file) { try { if (!file) doPrettyPrint(System.out, ""); else { FileOutputStream f = new FileOutputStream("protocol.html"); doPrettyPrint(f, ""); f.close(); } } catch (IOException e) { System.out.println("Error while writing protocol state"); } } COM: <s> pretty prints the protocol and denotes the states </s>
funcom_train/37076808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char charAt(int position) { int basePair = getBasePair(position); if (reference.getRange().getLow() <= basePair && basePair <= reference.getRange().getHigh()) { return reference.getBaseAt(basePair); } else { return '\0'; // TODO: throw out of range exception } } COM: <s> returns the base on the reference sequence for a given position </s>
funcom_train/3098983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processResponse(ResolverResponseMsg resolverResponseMsg) { ACL responseAcl = null; try { responseAcl = new ACL(resolverResponseMsg.getResponse()); } catch (ParserException e) { Log.current.errorPrintln(e.getMessage()); Log.current.printStackTrace(e); System.exit(1); } Log.current.println("Received " + ECHO_HANDLER_NAME + " response\n" + responseAcl.toString()); } COM: <s> processes the echo response messages </s>
funcom_train/4260379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dump( File file ) throws IOException { String parent = file.getParent(); if (parent != null) { File dir = new File(parent); dir.mkdirs(); } DataOutputStream dos = null; try { dos = new DataOutputStream(new FileOutputStream(file)); dump(dos); } finally { if (dos != null) { dos.close(); } } } COM: <s> dump class to a file </s>
funcom_train/9019236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Size2D arrangeNN(Canvas g2) { Rectangle2D contentSize = new Rectangle2D.Double(); if (this.line != null) { contentSize.setRect(this.line.getBounds2D()); } if (this.shape != null) { contentSize = contentSize.createUnion(this.shape.getBounds2D()); } return new Size2D(contentSize.getWidth(), contentSize.getHeight()); } COM: <s> performs the layout with no constraint so the content size is determined </s>
funcom_train/5551525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double nextExponential(double mean) { if (mean < 0.0) { throw new IllegalArgumentException ("Exponential mean must be >= 0"); } RandomGenerator rand = getRan(); double unif = rand.nextDouble(); while (unif == 0.0d) { unif = rand.nextDouble(); } return -mean * Math.log(unif); } COM: <s> returns a random value from an exponential distribution with the given </s>
funcom_train/29862432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateSelectionStats() { LearnStat stats = new LearnStat(); LearnStat wordStats; for(LearnWord word : interrogator.getSelectedWords()) { wordStats = word.getStats(); stats.success += wordStats.success; stats.total += wordStats.total; } this.selectionStats = stats; } COM: <s> recomputes the statistics of selected words </s>
funcom_train/22339197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPane() { if (this.jScrollPane == null) { this.jScrollPane = new JScrollPane(); this.jScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); this.jScrollPane.setViewportBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); this.jScrollPane.setViewportView(getJHelpPane()); } return this.jScrollPane; } COM: <s> this method initializes j scroll pane </s>
funcom_train/2675728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Integer getClientId(HttpServletRequest req) { String path = req.getPathInfo(); if (path.equals("")) { return null; } while (path.length() > 1 && path.charAt(0) == '/') { path = path.substring(1); } int endPos = path.indexOf('/'); if (endPos != -1) { path = path.substring(0, endPos); } try { return Integer.parseInt(path); } catch (NumberFormatException e) { return null; } } COM: <s> return the client id from a url like send 123456 12 123456 </s>
funcom_train/45863512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadPlugin(Plugin plugin,boolean override) throws PluginExistsException{ for (String tType:plugin.getHandledMessageTypes()){ if ((!override)&&(_plugins.get(tType)!=null)){ throw new PluginExistsException("Plugin for message type "+tType+" already exists"); } } for (String tType:plugin.getHandledMessageTypes()){ _plugins.put(tType, plugin); } } COM: <s> insert a plugin to the plugins container </s>
funcom_train/50865613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reallocateIndexes() { int rowCount = sourceModel.getRowCount(); // Set up a new array of indexes with the right number of elements // for the new data model. indexes = new int[rowCount]; // Initialise with the identity mapping. for (int row = 0; row < rowCount; row++) { indexes[row] = row; } } COM: <s> reset index row mappings </s>
funcom_train/4448493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { if(this.cachedWriter != null) { this.cachedWriter.flush(); this.cachedWriter.close(); this.cachedWriter = null; } if(this.outstream != null) { this.content = this.outstream.toByteArray(); this.outstream.close(); this.outstream = null; } log.debug("CLOSED"); } COM: <s> close this cached content from further writing </s>
funcom_train/26221421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ExitStarterInternalFrame getExitStarterInternalFrame() { if (exitStarterInternalFrame == null) { exitStarterInternalFrame = new ExitStarterInternalFrame(); exitStarterInternalFrame.setBounds(new Rectangle(2 * LOW_WID, LOG_HEI, LOW_WID, 200)); } return exitStarterInternalFrame; } COM: <s> this method initializes exit starter internal frame </s>
funcom_train/32056995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSourceActions() { System.out.println("testGetSourceActions"); String name = "test"; String[] files = new String[2]; for (int x = 0; x < 2; x++) files[x] = "file" + x; GPLibraryPanel lPanel = new GPLibraryPanel(name, files, 2); GPLibraryPanel.DNDTransferHandler handle = lPanel.new DNDTransferHandler(); JComponent comp = new JPanel(); assertTrue(handle.getSourceActions(comp) == 3); } COM: <s> test of get source actions of class gplibrary panel </s>
funcom_train/51142103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configureUrlForProxy(URL url) throws IOException { if (_proxyInfo.useProxy()) { URLConnection connection = url.openConnection(); String password = _proxyInfo.getUserName() + ":" + _proxyInfo.getPassword(); String encodedPassword = new BASE64Encoder().encode(password.getBytes()); connection.setRequestProperty("Proxy-Authorization", encodedPassword); } } COM: <s> set the proxy information on a urls connection </s>
funcom_train/8039436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTwoParamConstructorBadFacility() { Layout layout = new PatternLayout(); SyslogAppender appender = new SyslogAppender(layout, 25); assertEquals("user", appender.getFacility()); assertEquals(false, appender.getFacilityPrinting()); assertEquals(layout, appender.getLayout()); assertNull(appender.getSyslogHost()); assertTrue(appender.requiresLayout()); } COM: <s> test two parameter constructor with unexpected facility </s>
funcom_train/13991370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBlueVal(int blueVal) { if ((blueVal < 0) && (this.blueVal != 0)) { this.blueVal = 0; createColor = true; } else if ((blueVal > 255) && (this.blueVal != 255)) { this.blueVal = 255; createColor = true; } else if (blueVal != this.blueVal) { this.blueVal = blueVal; createColor = true; } } COM: <s> sets the rgb blue value component of the font </s>
funcom_train/28420195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String deploy(String suName, String suZipPath) throws DeploymentException { final String taskName = "deploy"; boolean isSuccess = true; // TODO i18n LOG.info("Deploying the su " + suName + "in the SA:" + suZipPath); // DO nothing... String retMsg = createComponentTaskResultXML(taskName, isSuccess); return retMsg; } COM: <s> deploy a service unit to the component </s>
funcom_train/11742269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataMap getDataMap() { if (getObjEntity() != null) { return getObjEntity().getDataMap(); } if (getDbEntity() != null) { return getDbEntity().getDataMap(); } if (getProcedure() != null) { return getProcedure().getDataMap(); } return null; } COM: <s> to simplify overriding this implementation checks whether there is a non null </s>
funcom_train/3116895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Style getStyle(final DeviceType deviceType) { deviceType.verifyTypeIsNotAll(); DamaskUtils.checkValidArgument( isVisibleToDeviceType(deviceType), this + " supports " + getDeviceType() + ", not " + deviceType); final Style style = (Style)styles.get(deviceType); if (style == null) { return HYPERLINK; } else { return style; } } COM: <s> returns how this trigger should be rendered for the specified device </s>
funcom_train/46526295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refillAgent2dContainers(IPortrayableIn2D agent) { if (agent instanceof RametAgent) { agent2dContainers.get(Agent2dContainerNames.rametAgentsContainer) .getAgents().add((RametAgent) agent); } else if (agent instanceof ClonalPlantAgent) { agent2dContainers.get(Agent2dContainerNames.cloPlaAgnetsContainer) .getAgents().add((ClonalPlantAgent) agent); } } COM: <s> this method puts teh passed in agent into one of the agent2d containers </s>
funcom_train/2496958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addGroup(String id) throws DataAccessException { try { DAOFactory factory = (DAOFactory) DAOFactory.getFactory(); ApplicationDAO appDAO = (ApplicationDAO) factory.getApplicationDAO(); GroupEntity group = new GroupEntity(); group.setId(id); appDAO.addGroup(group, entity); } catch(DataAccessException dae) { FacesMessages.instance().add(dae.getMessage()); log.error(dae); throw new LdapLookupException(dae); } } COM: <s> adds the specified group to the app acl </s>
funcom_train/20797745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadTags() { final File file = getTagFile(); if(file.exists()){ Reader reader = null; try { reader = new BufferedReader(new FileReader(file)); final Tag[] _tags = TagIoFactory.create(TagIoFormat.MEMENTO).readTags(reader, null); for(Tag tag : _tags){ tags.put(tag.getId(), tag); } } catch(Exception ex){ TaggerLog.error(ex); } finally { IoUtils.closeQuietly(reader); } } } COM: <s> load the tags from the persistance file </s>
funcom_train/1429410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(String[] arguments) { this.arguments = arguments; // Make an instance of the default player for music and movies to accelerate // first playback. If the players are the same, only one instance will be created. getMediaPlayer(FileType.MUSIC); getMediaPlayer(FileType.VIDEO); } COM: <s> initializes the media manager with arguments that will be passed to the </s>
funcom_train/5508784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ElementFragment getTextFragment(String node) { String id = node; if (TextElementFragments.containsKey(id)) { return (ElementFragment) TextElementFragments.get(id); } else { ElementFragment newFragment = new TextElementFragmentImpl(node, domDocument); TextElementFragments.put(id, newFragment); return newFragment; } } COM: <s> gets the text fragment attribute of the element fragment factory object </s>
funcom_train/10659838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test03() { try { new RealmCallback(null); fail("IllegalArgumentException should be thrown for null prompt"); } catch (IllegalArgumentException e) { } try { new RealmCallback(""); fail("IllegalArgumentException should be thrown for empty prompt"); } catch (IllegalArgumentException e) { } } COM: <s> test for code realm callback string prompt code constructor </s>
funcom_train/9549873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonDCIBrowse() { if (jButtonDCIBrowse == null) { jButtonDCIBrowse = new JButton(); jButtonDCIBrowse.setText("Browse"); jButtonDCIBrowse.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent e) { getDCIFile(); } }); } return jButtonDCIBrowse; } COM: <s> this method initializes j button dcibrowse </s>
funcom_train/50480910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (valid) { try { OmniSocket s = accept(); synchronized (this) { if (eventHandler != null) { eventHandler.notify(OmniEventHandler.EV_CONNECT, s, this); } } //jdk1.4 } catch (SocketTimeoutException e) { //jdk1.4 System.out.println("OmniListener: Warning: it appears someone set SO_TIMEOUT on this socket."); } catch (IOException e) { } } } COM: <s> accepts connections and notifies the user </s>
funcom_train/35063047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean consume(int ch){ offset++; if(ch==0x0D){ skipLF = true; line++; col = 0; return true; }else if(ch==0x0A){ if(skipLF){ skipLF = false; return false; }else{ line++; col = 0; return true; } }else{ skipLF = false; col++; return true; } } COM: <s> return value tells whether the given character </s>
funcom_train/15609479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void postSubFeatureAdded(Feature addedFeature) { new FeatureNotificationObject(this, addedFeature, NOTE_SUBFEATURE_ADDED, true).run(); // Set up a notifcation with this as the primary feature, and // the added sub feature as the secondary feature. getNotificationQueue() .addQueue(new FeatureNotificationObject(this, addedFeature, NOTE_SUBFEATURE_ADDED, false)); } COM: <s> post a note sub feature added onto the queue </s>
funcom_train/50062332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String controlID() { String retnStr = ""; if (hasSegment("MSH")) { retnStr = get("MSH.10"); } else if (hasSegment("BHS")) { retnStr = get("BHS.11"); } // if - else if return retnStr == null ? "" : retnStr; } // controlID COM: <s> returns the control id value of the context hl7 message object </s>
funcom_train/50688625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParameter(String name, Object value) { for (XMLFilter next = first; next != last.getParent(); next = (XMLFilter) next.getParent()) { if (next instanceof XMLTransformer) { XMLTransformer transformer = (XMLTransformer) next; transformer.setParameter(name, value); } } } COM: <s> set the named stylesheet parameter for all transformers found in the </s>
funcom_train/3382285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeRange(int fromIndex, int toIndex) { modCount++; int numMoved = size - toIndex; System.arraycopy(elementData, toIndex, elementData, fromIndex, numMoved); // Let gc do its work int newSize = size - (toIndex-fromIndex); while (size != newSize) elementData[--size] = null; } COM: <s> removes from this list all of the elements whose index is between </s>
funcom_train/9893946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { try { properties = new Properties(); File f = new File(CONFIG_FILE_NAME); if (!f.exists() || !f.canRead()) { return; } FileInputStream fIn = new FileInputStream(f); BufferedInputStream bIn = new BufferedInputStream(fIn); Properties p = new Properties(); p.loadFromXML(bIn); properties = p; System.getProperties().putAll(properties); bIn.close(); fIn.close(); } catch (IOException ex) { log.error("error", ex); } } COM: <s> initiates the instance and tries to load the user config from a config </s>
funcom_train/7270878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTitle() { switch(_TYPE) { case Selector.SCHEMA: return I18n.tr("Media"); case Selector.FIELD: return XMLUtils.getResource(_VALUE); case Selector.PROPERTY: return propertyType.getTitle(); default: throw new IllegalArgumentException("invalid type: " + _TYPE); } } COM: <s> determines the title of this selector </s>
funcom_train/23157639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createChain() { Noise osc = new Noise(this, Noise.WHITE_NOISE, this.sampleRate, this.channels); Envelope env = new Envelope(osc, new double[] {0.0, 0.0, 0.1, 1.0, 0.3, 0.0}); Comb comb = new Comb(env, delay, decay); SampleOut sout = new SampleOut(comb); } COM: <s> this method is automatically called on startup to initialise </s>
funcom_train/10494697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(ServletConfig config) throws ServletException { super.init(config); java.util.Enumeration en = config.getInitParameterNames(); while (en.hasMoreElements()) { String parm = (String) en.nextElement(); String value = config.getInitParameter(parm); TradeConfig.setConfigParam(parm, value); } } COM: <s> servlet initialization method </s>
funcom_train/44821948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUndefinedRecursively () { for (int i=0; tables != null && i < tables.length; i++) { tables[i].setUndefinedRecursively(); } for (int i=0; procedures != null && i < procedures.length; i++) { procedures[i].setUndefinedRecursively(); } } COM: <s> recursively set all children to be undefined </s>
funcom_train/18352823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createPanel() { if(Task.getTasks((Goal)goalPointer.getCapCommon()).size() == 0){ mainPanel.add(new JLabel("No Tasks")); return; } Pro.get().imprintAndExec(new CreateGoalExecPanel(this)); } COM: <s> creates the code jpanel code for this component </s>
funcom_train/44666483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getButtonPanel() { if (buttonPanel == null) { FlowLayout flowLayout3 = new FlowLayout(); buttonPanel = new JPanel(); buttonPanel.setLayout(flowLayout3); flowLayout3.setHgap(20); flowLayout3.setVgap(10); buttonPanel.add(getCancelButton(), null); buttonPanel.add(getOkButton(), null); } return buttonPanel; } COM: <s> this method initializes j panel1 </s>
funcom_train/33232988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void AddCard(Card crd,int deck,int LearnType) { if (!Cats.contains(crd.getCategory())) Cats.add(crd.getCategory()); crd.setDeckID(deck); Deck tmpDeck; tmpDeck=((Deck)Decks.get(deck)); tmpDeck.addCard(crd,1); // changed(null); // crd.setRevision(revision); } COM: <s> use this method to add a card to a specific deck </s>
funcom_train/37790637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkViewStyle(ViewFactory.ViewStyle aStyle) { ViewFactory.ViewStyle[] styles = getSupportedViewStyles(); if (styles == null) throw new IllegalStateException("No styles are set!"); boolean supported = false; for (int i = 0; i < styles.length; i++) { if (styles[i].equals(aStyle)) { supported = true; break; } } if (!supported) throw new IllegalArgumentException("Style not supported:" + aStyle); } COM: <s> check if the style is supported </s>
funcom_train/41165653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoParagraphCheckList entity) { EntityManagerHelper.log("deleting CoParagraphCheckList instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoParagraphCheckList.class, entity.getCheckListId()); 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 paragraph check list entity </s>
funcom_train/9642968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPopupMenu createPopupMenu() { JPopupMenu menu = new JPopupMenu(); for (Iterator iter = getFilters().iterator(); iter.hasNext();) { AttributeFilter filter = (AttributeFilter) iter.next(); JCheckBoxMenuItem item = new JCheckBoxMenuItem(new AddFilterAction( filter)); item.setSelected(getFilterable().containsFilter(filter)); menu.add(item); } return menu; } COM: <s> creates the popup menu </s>
funcom_train/16533155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Appearance getTextAppearance() { Appearance textAppearance = new Appearance(); textAppearance.setCapability(Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_WRITE); textAppearance.setCapability(Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_READ); RenderingAttributes attrib = new RenderingAttributes(); // Selected node should set the depth testing function to always draw, this // way it draws on "top" of everything else drawn so far (used in conjunction // with an OrderedGroup to allow selected nodes to be on top of everything) if (node.isSelected()) { attrib.setDepthTestFunction(RenderingAttributes.ALWAYS); textAppearance.setRenderingAttributes(attrib); } return textAppearance; } COM: <s> this method creates an appearance for the actual text to use </s>
funcom_train/43326231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public float max() { if (data==null) return Float.NaN; float maxv = data[0][0]; for (int i=0; i<data.length; i++) for (int j=0; j<data[0].length; j++) if (data[i][j] > maxv) maxv = data[i][j]; return(maxv); } COM: <s> whats the maximum value in the matrix </s>
funcom_train/23236247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AnimatedSprite getAnimatedWalk(final Sprite tiles, final int row, final double width, final double height) { Sprite [] frames = SpriteStore.get().getSprites(tiles, row, 4, width, height); frames[3] = frames[1]; return new AnimatedSprite(frames, 100L, false); } COM: <s> extract a walking animation for a specific row </s>
funcom_train/32213130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void start() { stop(); if (this.getNumberOfMillisecondsToWaitForHeartbeat() <= 0) return; timer = new javax.swing.Timer (this.getNumberOfMillisecondsToWaitForHeartbeat(), this); timer.start(); //System.out.println("started timer"); } COM: <s> start monitoring the arrival of heartbeats </s>
funcom_train/23867784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigDecimal squareRoot(final int precision) { if (this.signum() == -1) { throw new ArithmeticException("Can't compute the square root of negative value:" + this.toPlainString()); } else if (this.signum() == 0) { return ZERO; } return squareRoot(this, precision); } COM: <s> computes the square root of this big decimal </s>
funcom_train/35716593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void internalAdd(TemplatePersistenceData data) { if (!data.isCustom()) { // check if the added template is not a duplicate id String id= data.getId(); for (Iterator it= fTemplates.iterator(); it.hasNext();) { TemplatePersistenceData d2= (TemplatePersistenceData) it.next(); if (d2.getId() != null && d2.getId().equals(id)) return; } fTemplates.add(data); } } COM: <s> adds a template to the internal store </s>
funcom_train/36473136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeExternal(DataOutputStream dos) throws IOException { ExtUtil.writeNumeric(dos, getID()); ExtUtil.writeString(dos, ExtUtil.emptyIfNull(getName())); ExtUtil.write(dos, new ExtWrapNullable(getTitle())); ExtUtil.write(dos, new ExtWrapListPoly(getChildren())); ExtUtil.write(dos, model); ExtUtil.write(dos, new ExtWrapNullable(localizer)); ExtUtil.write(dos, new ExtWrapList(conditions)); } COM: <s> writes the form definition object to the supplied stream </s>
funcom_train/21306068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemGaitu() { if (jMenuItemGaitu == null) { jMenuItemGaitu = new JMenuItem(); jMenuItemGaitu.setText("Txartela gaitu"); jMenuItemGaitu.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { txartGaitu.setVisible(true); } }); } return jMenuItemGaitu; } COM: <s> this method initializes j menu item gaitu </s>
funcom_train/9869599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTipo(Integer newVal) { if ((newVal != null && this.tipo != null && (newVal.compareTo(this.tipo) == 0)) || (newVal == null && this.tipo == null && tipo_is_initialized)) { return; } this.tipo = newVal; tipo_is_modified = true; tipo_is_initialized = true; } COM: <s> setter method for tipo </s>
funcom_train/7589264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hammingDistance(Solution solutionOne, Solution solutionTwo) { int distance = 0; for (int i = 0; i < problem_.getNumberOfVariables(); i++) { distance += ((Binary)solutionOne.getDecisionVariables().variables_[i]). hammingDistance((Binary)solutionTwo.getDecisionVariables().variables_[i]); } return distance; } // hammingDistance COM: <s> calculate the hamming distance between two solutions </s>
funcom_train/20968487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command get_exitCommand() { if (exitCommand == null) {// GEN-END:MVDGetBegin5 // Insert pre-init code here exitCommand = new Command("Exit", Command.EXIT, 1);// GEN-LINE:MVDGetInit5 // Insert post-init code here }// GEN-BEGIN:MVDGetEnd5 return exitCommand; }// GEN-END:MVDGetEnd5 COM: <s> this method returns instance for exit command component and should be </s>
funcom_train/26207625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getSolution() throws IllegalStateException { if (this instanceof FzySolutionSet); else { try { throw new IllegalStateException( " The class '" + this.getClass().getName() + "' has illegally accessed this method. "); } catch (IllegalStateException ise) { setChanged(); notifyObservers(new FSEvent(this, "Error", ise)); } } return resolvedValue; } COM: <s> return the current solution domain value of this fzy solution set </s>
funcom_train/26364992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean ignoreTag(String tag){ //These tags always come through and the end tags don't come until the Connection is closed //so they can be safely ignored for now if (tag.toLowerCase().equals("?xml") || tag.toLowerCase().equals("stream:stream")){ return true; } else{ return false; } } COM: <s> check to see this tag should be ignored </s>
funcom_train/20325281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openLinkInWikipedia() { if (Desktop.isDesktopSupported()) { Desktop desktop = Desktop.getDesktop(); // http://en.wikipedia.org/w/index.php?title=Special:Search&search=dsfksdfdsf try { String word = null; if (lastSelected != null) { word = lastSelected.getWord(); } URI uri = new URI("http", "en.wikipedia.org", "/wiki/" + word, null); desktop.browse(uri); } catch (Exception e) { e.printStackTrace(); } } else { // TODO: error handling } } COM: <s> opens the browser at wikipedia </s>
funcom_train/49804228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startMachineVsMachine() { while (!board.isGameOver()) { currentPlayer = getNextPlayer(player); move = ai.getAIMove(board, player, currentPlayer.getId(), 3); board.move(currentPlayer, move); view.frame.update(view.frame.getGraphics()); //TODO: implement threading } view.rewardWinner(currentPlayer); } COM: <s> this method starts a game of two ai players playing against themselves </s>
funcom_train/20885348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIllegalSingleSubRecordCSV() { IllegalSingleSubRecordDTO dto = createIllegalSingleSubRecordDTO(); try { JSefaTestUtil.assertRepeatedRoundTripSucceeds(CSV, dto); fail("TypeMappingException expected but not thrown"); } catch (IOFactoryException e) { assertTrue(true); } } COM: <s> tests a dto with a complex field containing a single sub record csv </s>
funcom_train/8530158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean parse(boolean complete) throws XNIException, IOException { try { boolean more = scanner.scanDocument(complete); if (!more) { cleanup(); } return more; } catch (XNIException e) { cleanup(); throw e; } catch (IOException e) { cleanup(); throw e; } } // parse(boolean):boolean COM: <s> parses the document in a pull parsing fashion </s>
funcom_train/26447260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RoleMetaInfo getRoleBMetaInfo() throws MetaInfoException { // access the cache RoleMetaInfo res = this.roleBCache; if (res == null) { // cache miss -> create a new instance res = this.createThisRoleBMetaInfo(); // allow navigation from the role to the association res.setAssociationMetaInfo(this); // update the cache this.roleBCache = res; } return res; } COM: <s> accessor for the role b meta info </s>
funcom_train/23712457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnect() { // todo disconnect protocol is missing towards the peer. Will only // disconnect on this channel side connected = false; try { if (connectable != null) { connectable.removeLinkById(outLink.getLinkId()); } outLink.stop(); inLink.stop(); if (transport != null) { transport.stop(); } } catch (Exception e) { logger.error("Exception ignored.", e); } } COM: <s> method that disconnects the channel </s>
funcom_train/7620029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSingleLine(boolean single) { int inputType = EditorInfo.TYPE_CLASS_TEXT; if (!single) { inputType |= EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE | EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES | EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT; } mSingle = single; setHorizontallyScrolling(single); setInputType(inputType); } COM: <s> set whether this is a single line textfield or a multi line textarea </s>
funcom_train/43866498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private boolean checkSendConditions(Message tempMsg, int index) { // boolean ret = false; // ret = MovementArea.isWithinRadius(tempMsg.getData().getNodeInfo(), tempMsg.getTargetNodes().get(index).getNodeId()) && // !Broker.nodeActive[tempMsg.getTargetNodes().get(index).getNodeId()]; // return ret; // } COM: <s> checks whether a temp msg can be sent </s>
funcom_train/33149121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Line2D convert(Line2D l) { double x1 = xToPixel(l.getX1()); double y1 = yToPixel(l.getY1()); double x2 = xToPixel(l.getX2()); double y2 = yToPixel(l.getY2()); l.setLine(x1, y1, x2, y2); return l; } COM: <s> converts a line from user coordinates to pixels </s>
funcom_train/37607718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSpdLim(float speed) { dspd = speed; int stct, fgct; stct = this.getStCount(); if (xport != MINITRAFF_EXPORT) for (int kkk = 0; kkk < stct; kkk++) { OStreet sss = this.useSt(kkk); fgct = sss.getFragCount(); for (int mmm = 0; mmm < fgct; mmm++) { OFragment frag = sss.useFrag(mmm); if (frag.isVehMPHDft()) frag.setRevSLth(frag.getFLth()); } } } COM: <s> sets the tt ocity tt default fragment speed limit </s>
funcom_train/14355549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void lookupContactBO() throws FacadeException { if (contactBO == null) { try { ContactBOLocalHome home = (ContactBOLocalHome) ServiceLocator .getInstance().getLocalHome("webpresso/contactBOLocal"); contactBO = home.create(); } catch (ServiceLocatorException e) { handleException("lookup for ContactBO failed", e); } catch (Exception e) { handleException("create for ContactBO failed", e); } } } COM: <s> get a reference to contact business object and store in </s>
funcom_train/251715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleWrite(WriteFileTask task) { boolean succesful = false; try { succesful = task.writeFile(); } catch (IOException e) { e.printStackTrace(); } WriteFileEvent event = new WriteFileEvent(task.getFile(), task .getAttachment(), succesful); try { enqueue(task.getQueue(), event); } catch (TaskQueueException e1) { e1.printStackTrace(); } catch (UnknownTaskQueueException e1) { e1.printStackTrace(); } } COM: <s> write the specified data to the file </s>
funcom_train/19387450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEntry(DocumentBuffer buffer, String viewName) { if (!buffer.isUntitled()) { try { String path = buffer.getFile().getCanonicalPath(); setEntry(path, viewName, buffer.getProperties()); } catch (IOException ioe) { Log.log(Log.ERROR, this, ioe); } } }//}}} //{{{ setEntry() COM: <s> adds or updates an entry in the buffer history for an open file </s>
funcom_train/18504468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawText(Point position, String text, int color) { Point absPos=this.getAbsolutePosition(); absPos.x+=position.x; absPos.y+=position.y; if (display != null) display.drawText(absPos, text, color); else log.error("Control.drawText failed, display is null (class " + this.getClass().getName() + ")"); } COM: <s> draw a text </s>
funcom_train/13803659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void currentCoordinateSnapshot(Node node) { if ( layout == null ) { logger.log(Priority.ERROR, "currentCoordinateSnapshot(): No layout"); return; } Coordinates origCoord = layout.getCoordinates(node, layout.getGraph()); origCoords.put(node, origCoord); } COM: <s> store the nodes current position </s>
funcom_train/14093585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTagHandlersTagHandler() { Element element = m_fixture.newElement("taghandlers", new String[] { "action", "add", "tagname", "abc", "classname", "junit.extensions.xml.elements.NoOpTagHandler" }); IXMLTestCase testcase = m_fixture.getTestCase(); m_tagHandlersTagHandler = new TagHandlersTagHandler(element, testcase); } COM: <s> test the consturctor with testcase </s>
funcom_train/3175153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getStringData() throws IOException { StringWriter out = new StringWriter(); PropertyWriter writer = new PropertyWriter(out, true); for (int i=0;i<props.size();i++) writer.write(0, (Property)props.get(i)); return out.toString(); } COM: <s> lazy lookup string representation </s>
funcom_train/34454202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AjaxResponse onLocationSelectionDisCat(AjaxActionEvent event){ String locationIdParameter = event.getParameters().get("locationID"); Long locationID = (locationIdParameter!=null)?Long.parseLong(locationIdParameter):-1; event.getHttpRequest().getSession().setAttribute("LocationID", locationID); return loadDiscountCategoryMgmt(event); } COM: <s> saves the selected location id in the current user session </s>
funcom_train/48691570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveHand(int hands, int hour, int minute, int second) { if((hands&ClockFace.HAND_HOUR) == ClockFace.HAND_HOUR) this.hour.move(hour); if((hands&ClockFace.HAND_MINUTE) == ClockFace.HAND_MINUTE) this.minute.move(minute); if((hands&ClockFace.HAND_SECOND) == ClockFace.HAND_SECOND) this.second.move(second); this.state = ClockFace.STATE_HANDS; this.repaint(); } COM: <s> moves a hand to the indicated time value </s>
funcom_train/42670696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startTaskManager() { String[] schedule = new File(FOLDER_SCHEDULE).list(); for (int i = 0; i < schedule.length; i++) { taskManager = new TaskManager(this, FOLDER_SCHEDULE + schedule[i]); taskManager.run(); } } COM: <s> this method initialize and scheduleds every task that need to be excuted </s>
funcom_train/50067488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tree Type(Type t) { if (t == null) return null; Tree tp; switch (t.tag) { case BYTE: case CHAR: case SHORT: case INT: case LONG: case FLOAT: case DOUBLE: case BOOLEAN: case VOID: tp = TypeIdent(t.tag); break; case CLASS: Type outer = t.outer(); Tree clazz = outer.tag == CLASS && t.tsym.owner.kind == TYP ? Select( Type(outer), t.tsym) : QualIdent(t.tsym); tp = clazz; break; case ARRAY: tp = TypeArray(Type(t.elemtype())); break; case ERROR: tp = TypeIdent(ERROR); break; default: throw new AssertionError("unexpected type: " + t); } return tp.setType(t); } COM: <s> create a tree representing given type </s>
funcom_train/2731553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExistTerm visit(ExistTerm exist) { logger.debug("<ExistTerm>"); ExistTerm newExist = ruleFactory.createExistTerm(); visitQuant(exist, newExist); logger.debug("<Before>" + printer.visit(exist) + "</Before>"); logger.debug("<After>" + printer.visit(newExist) + "</After>"); logger.debug("</ExistTerm>"); return newExist; } COM: <s> makes substitutions on an exist term </s>
funcom_train/8311752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration namedAccessIterator(Object contextNode, ContextSupport support, String localName, String namespacePrefix, String namespaceURI) throws UnsupportedAxisException { NamedAccessNavigator nav = ((NamedAccessNavigator) (support.getNavigator())); return nav.getAttributeAxisIterator(contextNode, localName, namespacePrefix, namespaceURI); } COM: <s> gets the iterator for the attribute axis that supports named access </s>
funcom_train/28368092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isNormallyFinished() { final boolean isEndedByAction = actionStatus == Status.end; final boolean hasReachLastAction = ((actionStatus == Status.success) || (actionStatus == Status.skipped)) && (executionPoint == getActions().size()); return isEndedByAction || hasReachLastAction; } COM: <s> conditions for a normal end </s>
funcom_train/45716144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initAfterUnmarshalling(IBaseOJ parent) { super.initAfterUnmarshalling(parent); if (ytemDefList == null) { ytemDefList = new ArrayList(); } for (int i = 0; i < ytemDefList.size(); i++) { ((YtemDefOJ) ytemDefList.get(i)).initAfterUnmarshalling(this); } } COM: <s> initialize and propagate </s>
funcom_train/21611925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParseControlIfTernaryVariableArguments() throws MUParserException { ParseTree pt = parser.parse("control", "if( condition, var1, var2 )"); System.out.println("parse tree: " + pt); checkParsing(pt, "if", "(", "variable", "variable", "variable", ")"); } COM: <s> parses i if i control in ternary version with variable arguments </s>
funcom_train/28371532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { portNumberInfo = new JLabel(); portNumberInfo.setText("Server running on port 38080"); jContentPane = new JPanel(); jContentPane.setLayout(new FlowLayout()); jContentPane.add(getOpenBrowserPlayr(), null); jContentPane.add(getOpenBrowserR2Q2(), null); jContentPane.add(portNumberInfo, null); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/42877101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DefaultListModel getAllArtistValues() { List<String> tmp = getAllValues("Artist", null, true); // copy sorted list to the model DefaultListModel model = new DefaultListModel(); for (Iterator<String> clipIter = tmp.iterator(); clipIter.hasNext();) { model.addElement(clipIter.next()); } return model; } COM: <s> gets all artists known by the data pool </s>
funcom_train/34141123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setManagePluginsPreferenceState() { boolean hasInstalledPlugins = !PluginManager.getPlugins(getPackageManager()).isEmpty(); mManagePluginsScreen.setEnabled(hasInstalledPlugins); if (hasInstalledPlugins) { mManagePluginsScreen.setIntent(new Intent(this, PluginPreferencesActivity.class)); } } COM: <s> sets the state of the manage plug ins preference </s>
funcom_train/3652812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected short addStringConstant(StringConstant constant) { StringConstant testConstant = (StringConstant)stringConstants. get(constant.getValue()); if (testConstant != null) { return testConstant.index; } else { stringConstants.put(constant.getValue(), constant); return addConstant(constant); } } COM: <s> specialty method used for adding unique string constants </s>
funcom_train/42642947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTermPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IVocabularyEntry_term_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IVocabularyEntry_term_feature", "_UI_IVocabularyEntry_type"), DigitalHPSPackage.Literals.IVOCABULARY_ENTRY__TERM, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the term feature </s>
funcom_train/5865134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIdentity(int button) { _button = button; final int label; switch (button) { case YES: label = MZul.YES; _evtnm = "onYes"; break; case NO: label = MZul.NO; _evtnm = "onNo"; break; case RETRY: label = MZul.RETRY; _evtnm = "onRetry"; break; case ABORT: label = MZul.ABORT; _evtnm = "onAbort"; break; case IGNORE: label = MZul.IGNORE; _evtnm = "onIgnore"; break; case CANCEL: label = MZul.CANCEL; _evtnm = "onCancel"; break; default: label = MZul.OK; _evtnm = "onOK"; break; } setLabel(Messages.get(label)); setId("btn" + _button); } COM: <s> sets the identity </s>
funcom_train/15889212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setupInterface(String ipAddr,Integer commTimeOutInSec) throws Exception{ this.ipAddr = ipAddr; this.commTimeoutInSec = commTimeOutInSec; this.openClient(); this.setInterfaceName(interfaceName); this.setInterfaceGpibAddr(getInterfaceGpibAddr()); this.setCommTimeout(commTimeoutInSec); this.closeClient(); } COM: <s> setup interface for communication </s>
funcom_train/26383089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getUnmatched() { Map unmatched=new HashMap(); Iterator propertyIt=properties.iterator(); while (propertyIt.hasNext()) { PersistentProperty property=(PersistentProperty)propertyIt.next(); if (property instanceof MatchProperty) unmatched.put(property.getName(),property); } return unmatched; } COM: <s> returns the unmatched ones of these properties hashed on name </s>
funcom_train/48404155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addDragResizeStartHandler(com.smartgwt.client.widgets.events.DragResizeStartHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.DragResizeStartEvent.getType()) == 0) setupDragResizeStartEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.DragResizeStartEvent.getType()); } COM: <s> add a drag resize start handler </s>
funcom_train/51616106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(Result result) throws TransformerException { Transformer identity = TransformerFactory.newInstance().newTransformer(); identity.setOutputProperty("omit-xml-declaration", "yes"); identity.transform(new StreamSource(new StringReader(TEST_DATA)), result); } COM: <s> writes test data string xml formatted to result </s>
funcom_train/22053742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHoldingTypes() { return (hasHoldingOfType(HoldingData.LAW) ? "Law " : "") + (hasHoldingOfType(HoldingData.GUILD) ? "Guild " : "") + (hasHoldingOfType(HoldingData.TEMPLE) ? "Temple " : "") + (hasHoldingOfType(HoldingData.SOURCE) ? "Source " : ""); } COM: <s> returns a string containing a list of all types of holdings character has </s>
funcom_train/8331381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCleanResizeEnabled(boolean enabled) { if (enabled != isCleanResizeEnabled()) { if (enabled) { cleanResizeListener = new CleanResizeListener(); borderlessChild.addControlListener(cleanResizeListener); } else { borderlessChild.removeControlListener(cleanResizeListener); cleanResizeListener = null; } } } COM: <s> specifies whether the particular mechanism for resizing with less flicker </s>
funcom_train/1942246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { this.confpanel.remove(1); this.attribute = new JComboBox(((ComponentType)this.select.getSelectedItem()).getAttributes()); this.attribute.setPrototypeDisplayValue(AbstractFilterRule.prototype); this.attribute.setSelectedIndex(-1); this.confpanel.add(this.attribute); this.confpanel.setVisible(false); this.confpanel.setVisible(true); this.select.requestFocus(); } } COM: <s> event listener method </s>
funcom_train/17492286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(BlockStatement node) { // Enter a new scope context.enterScope(); // Do the type checking of the nested statements checkList(node.getStatements()); // Leave the current scope and store the defined variables // (a map of String-Class mappings) in the "variables" property node.setProperty(NodeProperties.VARIABLES, context.leaveScope()); return null; } COM: <s> visits a block statement </s>
funcom_train/2321623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runFile(String fileName) throws GhostscriptException { IntByReference exitCode = new IntByReference(); GhostscriptLibrary.instance.gsapi_run_file(getNativeInstanceByRef().getValue(), fileName, 0, exitCode); //test exit code if (exitCode.getValue() != 0) { throw new GhostscriptException("Cannot run file on Ghostscript interpreter. Error code " + exitCode.getValue()); } } COM: <s> sends file ghostscript interpreter </s>