__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/21634582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createChart() { JFreeChart chart = ChartFactory.createXYLineChart(null, "Result", "Increment", null, PlotOrientation.VERTICAL, true, true, false); ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(600, 360)); chartPanel.setDomainZoomable(true); chartPanel.setRangeZoomable(true); charts.add(chart); chartPanels.add(chartPanel); } COM: <s> create the initial chart </s>
funcom_train/48631218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeAlarm() { logger.trace("In makeAlarm."); String tone = properties.getAudioAlert(); logger.debug("Tone: " + tone); if (tone != null && !tone.equalsIgnoreCase("silent") && tone.length() > 0) { Uri ringUri = Uri.parse(tone); Ringtone ring = RingtoneManager.getRingtone(mCtx, ringUri); logger.debug("About to play tone."); if (!ring.isPlaying()) ring.play(); } else logger.debug("Alert tone empty/null."); logger.debug("Leaving makeAlarm"); } COM: <s> plays the alert tone </s>
funcom_train/5461988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlDtStartProperty(Property property, Resource parentNode, RDFContainer rdfContainer) { Node propertyValue = getRdfPropertyValue(rdfContainer, property, IcalDataType.NCAL_DATE_TIME); addStatement(rdfContainer, parentNode, NCAL.dtstart, propertyValue); } COM: <s> crawls the dtstart property </s>
funcom_train/1237717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int fromDegree(Object from, boolean excludeSameVertexEdges) { if (!excludeSameVertexEdges) return degree(from); int count = 0; Object[] vertices = verticesToNeighbors.keySet().toArray(); for (int i=0; i<vertices.length; i++) if (hasEdge(from, vertices[i]) && !vertices[i].equals(from)) count++; return count; } COM: <s> returns the number of vertices that point from this object </s>
funcom_train/2600982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configureImpl(final GENE4JJUnitSession jUnitSession) { if(Boolean.FALSE == isConfigured) { final Properties properties = new Properties(); properties.setProperty("log4j.threshold", "debug"); properties.setProperty("log4j.rootLogger", "debug,console,html"); configureConsoleAppender(jUnitSession, properties); configureHTMLAppender(jUnitSession, properties); PropertyConfigurator.configure(properties); isConfigured = Boolean.TRUE; } } COM: <s> configure log4j for the gene4j test framework </s>
funcom_train/3619281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCreationTsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Bug_creationTs_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Bug_creationTs_feature", "_UI_Bug_type"), EclipsesrsPackage.Literals.BUG__CREATION_TS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the creation ts feature </s>
funcom_train/37862113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean hasPreloadedData() { // TODO : log elsewhere ? if (preloadedData) { context.getProfiler().message(this, Profiler.OPTIMIZATIONS, null, "Preloaded NodeSets"); return true; } // if (inUpdate) // return false; // if ((parentDeps & Dependency.LOCAL_VARS) == Dependency.LOCAL_VARS) { // context.getProfiler().message(this, Profiler.OPTIMIZATIONS, null, // "Preloaded NodeSets"); // return true; // } return false; } COM: <s> if the current path expression depends on local variables from a for </s>
funcom_train/43526277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCompilationUnitPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Interface_compilationUnit_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Interface_compilationUnit_feature", "_UI_Interface_type"), CallGraphPackage.Literals.INTERFACE__COMPILATION_UNIT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the compilation unit feature </s>
funcom_train/7754001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String details () { StringBuffer sb = new StringBuffer (); sb.append ("Spectrum Name : " ); sb.append ( specName ); sb.append ("\nSpectrum Dimension : " ); sb.append ( specDimension ); sb.append ("\nListed modification date : " ); sb.append ( (new SimpleDateFormat()).format (specDate) ); return sb.toString (); } COM: <s> returns the spectrum as a long string with all the details </s>
funcom_train/24516139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayTable(){ for(int l=0;l<hashArray.size();l++){ for(int i = 0;i<hashArray.get(l).size();i++){ System.out.println(l+". list: " +((ChecksumPair) (hashArray.get(l).get(i))).toString()); } } } COM: <s> simple method used to write out the content of hash table </s>
funcom_train/2951570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintBaseLine(Graphics g, String s, int x, int y) { FontMetrics fm = g.getFontMetrics(); int width = g.stringWidth(s); int lineWidth = fm.getAscent()/12; g.setLineStyle(Graphics.LINE_SOLID); g.setLineWidth(lineWidth); g.drawLine(x, y, x+width, y); } COM: <s> paint a line along the baseline of the text for showing underline </s>
funcom_train/23867173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readMoonByCriteria() { final MoonSearchCriteria searchCriteria = new MoonSearchCriteria(); searchCriteria.setName(MOON_NAME); searchCriteria.setPosition(MOON_POSITION); final List<Moon> moons = EntityDataAccess.findByCriteria(Moon.class, searchCriteria); assertEquals("A single Moon must match the criteria", 1, moons.size()); } COM: <s> read the previously created moon by criteria </s>
funcom_train/50336318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetFrame() { sysName.setText("IAB"+counter++); userName.setText(null); url.setText(null); // format.setText(null); stream.setSelected(false); stream.setEnabled(false); //(true); loopStart.setValue(Long.valueOf(0)); loopEnd.setValue(Long.valueOf(0)); this._newBuffer = true; } COM: <s> method to populate the edit buffer frame with default values </s>
funcom_train/46436562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createBackupFilename() { Date currentDate = new Date(System.currentTimeMillis()); StringBuffer fileNameBuffer = new StringBuffer(BACKUP_FILE_PREFIX); fileNameBuffer.append(BACKUP_DATEFORMAT.format(currentDate)); fileNameBuffer.append(BACKUP_FILE_EXTENSION); return fileNameBuffer.toString(); } COM: <s> creates a new name for the backup file which will be created </s>
funcom_train/17493521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWord() throws IOException, BadSyntaxException { stok.nextToken(); if (stok.ttype == StreamTokenizer.TT_WORD) { return (stok.sval); } else throw (new BadSyntaxException( "Word expected but found something different instead. " + stok.ttype)); } COM: <s> checks for a word in the tokenizer </s>
funcom_train/39395227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mniReportBlockDetailed() { LauncherView.getInstance().showBusy(new Runnable() { public void run() { try { LauncherView.getInstance().addReport(ReportTco.createBlockDetailedTco((TcoObject)getSelectedNode(), ModelUtility.getUsageDuration())); } catch (Throwable e) { handleException(e); } } }); } COM: <s> generate the selected node as costblock in a html report </s>
funcom_train/9860445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBuilder format() { final StringBuilder buf = new StringBuilder(30); buf.append('['); for (int i = 0; i < aAttributes.length; i++) { if (i > 0) { buf.append(", "); } buf.append(aAttributes[i].format()); } buf.append("]"); return buf; } COM: <s> a formated value for this element </s>
funcom_train/8012655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isUpdateable(int col) throws DataStoreException { if (col < 0 || _desc.getColumnCount() == 0) throw new DataStoreException("Specified column (" + col + ") does not exist."); DSColumnDescriptor c = _desc.getColumn(col); return c.isUpdateable(); } COM: <s> this method returns whether a column is updateable </s>
funcom_train/5395368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetElement() { System.out.println("getElement"); String pName = ""; TableManager instance = new TableManager(); TableElement expResult = null; TableElement result = instance.getElement(pName); assertEquals(expResult, 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 element method of class org </s>
funcom_train/50757209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while (true) { if (changed) { trackPanel.repaint(); changed = false; try { Thread.sleep(refreshTime); } catch (InterruptedException e) {} } else { timeToRepaint = true; try { Thread.sleep(60000); } catch (InterruptedException e) {} timeToRepaint = false; } } } COM: <s> implementation of runnable </s>
funcom_train/36816892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void open(File file){ try{ ObjectInputStream in = new ObjectInputStream(new FileInputStream(file)); Vector rowData = (Vector)in.readObject(); Vector columnNames = (Vector)in.readObject(); tableModel.setDataVector(rowData, columnNames); in.close(); //Display the status of the Open file operation in jlblStatus jlblStatus.setText(file.getName() + "Opened"); } catch(IOException ex){ jlblStatus.setText("Error opening " + file.getName()); } catch(Exception ex){ ex.printStackTrace(); } } COM: <s> open file with the specified file instance </s>
funcom_train/49626651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAndCreateEmptyFile() { try { setFile(File.createTempFile("pulse-upload-", ".tmp", ((ServiceRequestImplConfig) PoorMansCache .getConfiguration(ServiceRequestImpl.class)) .getFileUploadTempDir())); } catch (IOException e) { throw new PulseException( "Cannot create temporary file for file upload.", e); } } COM: <s> sets and creates an empty file at the default location for uploaded </s>
funcom_train/9658749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProcessDefinition getProcessDefinition(String processDefinition) throws RemoteException{ log("getProcessDefinition", new Object[]{processDefinition}); try{ ProcessDefinition copy = (ProcessDefinition)getDefinition(processDefinition).clone(); return copy; }catch(Exception e){ e.printStackTrace(); throw new RemoteException("ProcessManagerError:"+e.getMessage(), e); } } COM: <s> this method is costly to call </s>
funcom_train/8080622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double calcZpure(Instances posInstances, Instances negInstances) { double posWeight = posInstances.sumOfWeights(); double negWeight = negInstances.sumOfWeights(); return (2.0 * (Math.sqrt(posWeight+1.0) + Math.sqrt(negWeight+1.0))) + (m_trainTotalWeight - (posWeight + negWeight)); } COM: <s> calculates the z pure value for a particular set of instances </s>
funcom_train/28762008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCsscalendarsize(String newVal) { if ((newVal != null && this.csscalendarsize != null && (newVal.compareTo(this.csscalendarsize) == 0)) || (newVal == null && this.csscalendarsize == null && csscalendarsize_is_initialized)) { return; } this.csscalendarsize = newVal; csscalendarsize_is_modified = true; csscalendarsize_is_initialized = true; } COM: <s> setter method for csscalendarsize </s>
funcom_train/29287137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addRawTextPage() { try { textEditor = new TextEditor(); int index = addPage(getTextEditor(), getEditorInput()); setPageText(index, "Raw XML"); } catch (PartInitException e) { ErrorDialog.openError( getSite().getShell(), "Error creating nested text editor page", null, e.getStatus()); FlabotPlugin.getDefault().getLogger() .error("Error creating nested text editor page: {}", e); } } COM: <s> add the raw xml text editor page </s>
funcom_train/22355728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int numberOfShownSkills() { if (!adapter.properties[UnitNodeWrapperDrawPolicy.NUMBER_OF_SHOWN_SKILLS]) return Integer.MAX_VALUE; for (int i = 1; i <= 5; ++i) { if (!adapter.properties[UnitNodeWrapperDrawPolicy.NUMBER_OF_SHOWN_SKILLS + i]) return i - 1; } return 5; } COM: <s> returns the maximum number of skill icons that should be shown </s>
funcom_train/3603323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(BundleContext context) throws Exception { super.start(context); /* Setting default properties */ if(Platform.getOS().equals(Platform.OS_WIN32)) { String winDir = getWindir(); if(winDir != null) { getPreferenceStore().setDefault(ExternaltoolsPlugin.FILE_EDITOR_TOOL,winDir+"\\notepad.exe"); } getPreferenceStore().setDefault(ExternaltoolsPlugin.COMMAND_PROMPT_TOOL,winDir+"\\system32\\cmd.exe /c start cmd.exe"); } } COM: <s> this method is called upon plug in activation </s>
funcom_train/9883194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Appearance createPointAppearance(Color3f color, float pSize) { Material material = new Material(color, color, color, color, 100.0f); material.setLightingEnable(true); Appearance appearance = new Appearance(); appearance.setPointAttributes(new PointAttributes(pSize, false)); appearance.setMaterial(material); return appearance; } COM: <s> creates a point appearance with specified colorand point size </s>
funcom_train/3946078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ResourceType_type_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ResourceType_type_feature", "_UI_ResourceType_type"), ImscpRootv1p1p2Package.eINSTANCE.getResourceType_Type(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the type feature </s>
funcom_train/51109651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int allChildrenCount() { // to avoid cascading fetch, filter prefetched blog entries Collection allBlogEntries = getToBlog().getEntryArray(); int i = 0; Iterator it = allBlogEntries.iterator(); while (it.hasNext()) { Entry next = (Entry) it.next(); if (next.isChildOf(this)) { i++; } } return i; } COM: <s> returns the number of child entries including grandchildren </s>
funcom_train/21996035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void serverDetectedInit() throws LauncherException { m_untrusted_user = getDefaultUser(); if (log.isDebugEnabled()) log.debug("MgrLauncher serverDetectedInit: " + HelperMisc.getShortClassName(getClass())); try { registerWithServer(); initStyleBean(); initMessages(); } catch (UnavailableException e) { throw new LauncherException("cannot init manager; unavailable resource", e); } } COM: <s> called once the xml rpc server has been successfully </s>
funcom_train/2243872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StatusCommand findStatusCommandByControlID(String controlID) { Element controlElement = queryElementFromXMLById(controlID); if (controlElement == null) { throw new NoSuchButtonException("Cannot find that control with id = " + controlID); } Control control = controlFactory.getControl(controlElement, Command.STATUS_COMMAND); return control.getStatusCommand(); } COM: <s> find status command by control id </s>
funcom_train/1164867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Status retweetStatus(long statusId) throws WeiboException { /*return new Status(http.post(getBaseURL() + "statuses/retweet/" + statusId + ".xml", new PostParameter[0], true), this);*/ return new Status(http.post(getBaseURL() + "statuses/retweet/" + statusId + ".json", new PostParameter[0], true)); } COM: <s> retweets a tweet </s>
funcom_train/13993646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateByValueObjects02() throws Exception { ValueObjectContainer container = testObject2Manager.createEmptyModel() .getContainer(); ValueObject valueObject = container.addNewValueObject(); valueObject.setValue(TestObject2.TEST_OBJECT, new VOElementValue( testObjects[0])); testObject2Manager.save(container); assertEquals(1, testObjects[0].getTestObject2s().size()); } COM: <s> tests that a code test object2 code is automatically added to the </s>
funcom_train/25026851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { do { while (!interrupted() && inputstrIndex < inputstr.length()) { try { runPlugIn(); // calls TextTrix to call the run function Thread.sleep(getSpeed() * 1000); // interval inputstrIndex++; // increment the message position } catch (InterruptedException e) { setStopped(true); Thread.currentThread().interrupt(); } } inputstrIndex = 0; } while (isLoop() && !isStopped()); setStopped(true); } COM: <s> runs the highlighter until code thread code becomes null </s>
funcom_train/39367009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void x1TransformThreaded(int direction, float[] paddedTraces) { // Start all of the threads. for (int i = 0; i < _x1Transformers.length; i++) { _x1Transformers[i].setData(direction, paddedTraces); } // Wait for all of the threads to finish. for (int i = 0; i < _x1Transformers.length; i++) _x1Transformers[i].waitForFinish(); } COM: <s> performs the transform along the trace second axis using threads </s>
funcom_train/4528101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNNThroughput() throws Exception { Configuration conf = new Configuration(); FileSystem.setDefaultUri(conf, "hdfs://localhost:" + 0); conf.set("dfs.http.address", "0.0.0.0:0"); NameNode.format(conf); NNThroughputBenchmark.runBenchmark(conf, new String[] {"-op", "all"}); } COM: <s> this test runs all benchmarks defined in </s>
funcom_train/37422301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Privilege findPrivilegeByName(String pName) throws ClassNotFoundException, SQLException { Vector tVect = findPrivilegeByQuery("select * from privilege where name = '" + Utility.Replace(pName) + "'"); if (tVect.size() > 0) return (Privilege) tVect.firstElement(); else return null; } COM: <s> finds a privilege in the database using its name </s>
funcom_train/33009490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder sb = new StringBuilder(getTagBitLength()+200); sb.append("EPC {scheme="); sb.append(getScheme()); sb.append(", bitLength="); sb.append(getBits().getBitLength()); sb.append(", bits=["); sb.append(getBits().toString()); sb.append("], MetaData=["); sb.append(epcMetaData); sb.append("]}"); return sb.toString(); } COM: <s> info about this epc including the scheme and bit sequence </s>
funcom_train/31097125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PDFInfo makeInfo() { /* * create a PDFInfo with the next object number and add to * list of objects */ PDFInfo pdfInfo = new PDFInfo(++this.objectcount); // set the default producer pdfInfo.setProducer(org.apache.fop.apps.Version.getVersion()); this.objects.add(pdfInfo); return pdfInfo; } COM: <s> make an info object </s>
funcom_train/974672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void recordError(String messageKey, ValidationConstraint constraint, String... strings) { if (strings.length == 1) { getDelegate().setFormComponent((IFormComponent) getComponent(strings[0])); } else { getDelegate().setFormComponent(null); } String message = getMessages().getMessage(messageKey); getDelegate().record(message, constraint); } COM: <s> recods errror to the delegate with given error message without any form </s>
funcom_train/10519327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addElements(Hashtable map, File basedir, String[] elems){ for (int i = 0; i < elems.length; i++){ CCFile f = new CCFile(basedir, elems[i]); if ( accept(f) ){ map.put(f.getPath(), f); } } } COM: <s> helper method to restrict a set of relative elements and add them </s>
funcom_train/194722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException{ Iterator iter = signalHandlerMap.keySet().iterator(); while(iter.hasNext()){ SignalDescriptor s = (SignalDescriptor)(iter.next()); SignalHandler handler = (SignalHandler)(this.signalHandlerMap.get(s)); handler.close(); } signalHandlerMap = null; } COM: <s> recklessly closes all the signal handlers </s>
funcom_train/10590910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Profile getProfile(Request theRequest) throws IOException, ServletException, Exception { try { CocoonServletRequest servletRequest = new CocoonServletRequest(theRequest); return new Profile(servletRequest); } catch (Exception e) { getLogger().error("DELI Exception while retrieving profile: ", e); throw e; } } COM: <s> process a http servlet request and either extract </s>
funcom_train/43235495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkChart(int[] morpheme, int morphemeLen, int tag, int phoneme, int nextPosition, int nextTagType, String str) { for (int i = 0; i < morphemeLen; i++) { Morpheme morph = chart[morpheme[i]]; if (morph.tag == tag && morph.phoneme == phoneme && morph.nextPosition == nextPosition && morph.nextTagType == nextTagType && morph.str.equals(str)) { return true; } } return false; } COM: <s> checks the specified morpheme is exist in the morpheme chart </s>
funcom_train/21210847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean needToExecute(IFlow current, SRResults results) { m_valueToConfirm = results.m_input; SRResults.Slot slot = results.getIthSlot(0); //first slot of previous question if (slot == null) { return results.m_overallConfidence < m_confirmationThreshold; } return slot.m_confidence < m_confirmationThreshold; } COM: <s> decides if confirmation is needed </s>
funcom_train/36131938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean verifyDestinationsPercentage() { double perc = 0; for (Destination d : vehicGenParams.destinationDistribution.keySet()) { perc += vehicGenParams.destinationDistribution.get(d); } System.out.println("Soma da porcentagem dos destinos: " + perc + " gerador: " + id); if ((perc < 99.9) || (perc > 100.01)) { return false; } else { return true; } } COM: <s> verifies if the sum of the percentages in the destination map is 100 </s>
funcom_train/22155155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean drawImage(Image img,int x,int y,Color bgcolor,ImageObserver obs) { return drawImage(img,x,y,img.getWidth(obs),img.getHeight(obs),bgcolor,obs); } COM: <s> draws an image onto the page with a backing colour </s>
funcom_train/15601227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void p_Init(byte[] Message) { p_ReceiverServiceAddress = (short)((Message[0] << 8) + (Message[1] & 0xFF)); p_SenderServiceAddress = (short)((Message[2] << 8) + (Message[3] & 0xFF)); p_Message = new byte[Message.length-4]; System.arraycopy(Message, 4, p_Message, 0, p_Message.length); } COM: <s> p initialize this message object </s>
funcom_train/11728547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveCalendarPropertySession() throws Exception { testNode.setProperty(propertyName1, c1); superuser.save(); testNode.setProperty(propertyName1, (Calendar) null); superuser.save(); assertFalse("Removing property with Node.setProperty(String, (Calendar)null) and Session.save() not working", testNode.hasProperty(propertyName1)); } COM: <s> tests if removing a code calendar code property with </s>
funcom_train/22304108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateMenuState() { boolean listHasSelection = this.showTable.hasSelection(); editShowMenuItem.setEnabled(listHasSelection); deleteShowMenuItem.setEnabled(listHasSelection); searchForNewEpisodesMenuItem.setEnabled(listHasSelection); disableShowMenuItem.setEnabled(listHasSelection); disableAutomaticSchedularMenuItem.setEnabled(listHasSelection); } COM: <s> update the menu states based on the current selection </s>
funcom_train/491276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String join(String separator) throws JSONException { int len = length(); StringBuffer sb = new StringBuffer(); for (int i = 0; i < len; i += 1) { if (i > 0) { sb.append(separator); } sb.append(JSONObject.valueToString(this.myArrayList.get(i))); } return sb.toString(); } COM: <s> make a string from the contents of this jsonarray </s>
funcom_train/18743986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RefreshableMenuItem getDeleteMenuItem() { if (this.deleteGraphItem == null) { this.deleteGraphItem = new RefreshableMenuItem() { @Override protected void refresh(ResourceKind resource) { setAction(getActions().getDeleteAction(resource)); } }; } return this.deleteGraphItem; } COM: <s> returns the menu item in the edit menu that specifies delete the </s>
funcom_train/28293144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearSessionState() { if (logger.isDebugEnabled()) { logger.debug(" :: SeqActivityTree --> BEGIN - " + "clearSessionState"); } mActivityMap = null; if (logger.isDebugEnabled()) { logger.debug(" :: SeqActivityTree --> END - " + "clearSessionState"); } } COM: <s> clears the current state of the activity tree except for its suspsend all </s>
funcom_train/25099394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCardinalityPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FeatureGroup_cardinality_feature"), getString("_UI_PropertyDescriptor_description", "_UI_FeatureGroup_cardinality_feature", "_UI_FeatureGroup_type"), FeaturemodelingPackage.Literals.FEATURE_GROUP__CARDINALITY, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the cardinality feature </s>
funcom_train/47906365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepareComponent() { if (!layoutSynced) { height = font.getHeight() + 2 * padding; if (icon == null) { // Text Label width = font.stringWidth(label) + 2 * padding; } else { // Icon width = icon.getWidth() + 2 * padding; } layoutSynced = true; } } COM: <s> prepares the layout of the title bar button </s>
funcom_train/3102478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleContainer(final IContainer container, final IPath path) throws CoreException, IOException { Assertion.valid(container); Assertion.valid(path); if (container.isAccessible()) { final IResource[] resources= container.members(); for (int index= 0; index < resources.length; index++) { handleResource(resources[index], path.append(resources[index].getName())); } } } COM: <s> handles the export of resources in a container </s>
funcom_train/26339021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Chart getChart(int type) { ByteBuffer intBuf = ByteBuffer.allocateDirect(Protocol.intSize * _game.getMaxTurn()); int ret = JavaBridge.serverCall(Protocol.sGetChart + (type << 4), _index, 0, intBuf); if (ret != Protocol.eOK) { return null; } return new Chart(intBuf, getTurn()); } COM: <s> request a chart </s>
funcom_train/47432491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFlujoCicloPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Ciclo_flujoCiclo_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Ciclo_flujoCiclo_feature", "_UI_Ciclo_type"), AgroEcoDinPackage.Literals.CICLO__FLUJO_CICLO, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the flujo ciclo feature </s>
funcom_train/26506966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean initializeRadio() { controlStream.send ("\n*** Initialize Radio\n"); try { setToFullDuplex(); // Zero offsets and set simplex queryIcomRadio(); // Query radio to set model vars. radioInitialized = true; // If all successful, set init var to true } catch (Exception e) { e.printStackTrace(); radioInitialized = false; } return (radioInitialized); } COM: <s> initializes radio to a known state </s>
funcom_train/33837116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean openConnection() { try { Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); conn = DriverManager.getConnection(getUrl(), userName, passWord); } catch (Exception ex) { ex.printStackTrace(); return false; } return true; } COM: <s> check connect to database </s>
funcom_train/32869712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertAspect(IType aspect) throws UnreachableException { try { getAspectManager(); // Check if aspect manager is reachable. new ProseClientRunner().insertAspect(aspect, getRun().getAddress(), isActive(), transactionId); ProsePlugin.getDefault().fireAspectInserted(this); } catch (CoreException e) { ProsePlugin.log(e.getStatus()); } } COM: <s> insert an aspect </s>
funcom_train/12758393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveValidators() { saveValidators(changes); deleteValidators(deletes); changes = new HashSet(); deletes = new HashSet(); saveButton.setEnabled(false); cancelButton.setEnabled(false); saveToolbarButton.setEnabled(false); cancelToolbarButton.setEnabled(false); int answer = JOptionPane.showConfirmDialog(this, "Do you want the Objex Server to load these changes now?", "Objex Server Update?", JOptionPane.YES_NO_OPTION); if (answer == JOptionPane.YES_OPTION) { updateObjexServer(); } } COM: <s> method save validators </s>
funcom_train/8046569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setHeightXYGlobal(float height){ if (height > 0){ Vector3D centerPoint = this.getCenterPointGlobal(); // this.scaleGlobal(1/this.getHeightXYGlobal(), 1/this.getHeightXYGlobal(), 1, centerPoint); // this.scaleGlobal(height, height, 1, centerPoint); float factor = (1f/this.getHeightXYGlobal())* height; this.scaleGlobal(factor, factor, 1, centerPoint); return true; }else return false; } COM: <s> scales the shape to the given height relative to world space </s>
funcom_train/5578249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent e) { if (e.getSource().equals(backButton)) doAction(CONTINUE); else if (e.getSource().equals(quitButton)) doAction(QUIT); else if (e.getSource().equals(restartButton)) doAction(RESTART); else if (e.getSource().equals(rulesButton)) doAction(RULES); else if (e.getSource().equals(howtoButton)) doAction(HOWTO); else if (e.getSource().equals(scoresButton)) doAction(SCORES); } COM: <s> action done when the mouse button is clicked </s>
funcom_train/39786645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startGhostTask(GhostTask ghostTask, int interval) { if (ghostTaskQueue != null) { return; } ghostTaskQueue = createTaskQueue(); ContainerContext containerContext = (ContainerContext) getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME); containerContext.setTaskQueueCallbackInterval(ghostTaskQueue, interval); ghostTask.startTask(this, ghostTaskQueue); } COM: <s> starts the ghost test with the specified callback interval run time </s>
funcom_train/2624967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); cameras = new ArrayList(); while (true) { final Object each = in.readObject(); if (each != null) { if (each.equals(Boolean.FALSE)) { break; } else { cameras.add(each); } } } } COM: <s> deserializes player from the provided object input stream </s>
funcom_train/42396825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWriteThrowableWithMessage() { final ClientObjectOutputStream output = createObjectOutputStream(THROWABLE, ThrowableWriter.instance); final String message = "apple"; final Throwable throwable = new Throwable(message); output.writeObject(throwable); final String expectedValues = "1,2,3,0,0"; final String text = output.getText(); assertEquals("[2,\"" + THROWABLE + "\",\"" + message + "\"," + expectedValues + "]", text); } COM: <s> this test will fail in hosted mode because the emulated throwable will </s>
funcom_train/18953156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FieldValueConvertorFactory getFieldValueConvertorFactory() { if (logger.isDebugEnabled()) { logger.debug("getFieldValueConvertorFactory() - start"); } if (logger.isDebugEnabled()) { logger.debug("getFieldValueConvertorFactory - end - return value = " + fieldValueConvertorFactory); } return fieldValueConvertorFactory; } COM: <s> used to generate convertors to convert property types from strings </s>
funcom_train/40165987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeLogin() { try { queue.put(new Runnable() { public void run() { if (loginHandler != null) { loginHandler.close(); loginHandler = null; } } }); } catch (InterruptedException ex) { Logger.getLogger(NetworkController.class.getName()).log(Level.SEVERE, null, ex); } } COM: <s> closes the login handler </s>
funcom_train/38306480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NumberFormat getScaleValueFormat() { if (attributes.isDefined(ATTR_SCALE_VALUE_FORMAT)) { return (NumberFormat) attributes.getObject(ATTR_SCALE_VALUE_FORMAT); } if (attributes.isDefined(ATTR_VALUE_FORMAT)) { return (NumberFormat) attributes.getObject(ATTR_VALUE_FORMAT); } return defaultValueFormat; } COM: <s> gets the number format for scale value output </s>
funcom_train/24379357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTypeAsXML(PromptType type) { String sXML = ""; if (type!=null){ QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "prompt"); JAXBElement<PromptType> jaxbe = new JAXBElement<PromptType>(qname, PromptType.class, type); sXML = getXML(jaxbe); } return sXML; } COM: <s> gets the prompt type as an xml string </s>
funcom_train/36108801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireSolverStopped() { if (getListeners().isEmpty()) return; //Do nothing. //Creating event. MacroSolverEvent stopEvent = new MacroSolverEvent(this, getCurrentTime(), MacroSolverEvent.STOP); //Notifying all listeners. Iterator<MacroSolverListener> iterator = getListeners().iterator(); while (iterator.hasNext()) iterator.next().stateChanged(stopEvent); } COM: <s> notification of all listeners about stopping solver work </s>
funcom_train/10858279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWhitespaceTokenizer() throws Exception { Reader reader = new StringReader("What's this thing do?"); WhitespaceTokenizerFactory factory = new WhitespaceTokenizerFactory(); factory.init(DEFAULT_VERSION_PARAM); Tokenizer stream = factory.create(reader); assertTokenStreamContents(stream, new String[] {"What's", "this", "thing", "do?"}); } COM: <s> test whitespace tokenizer factory </s>
funcom_train/42524547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumOccurenceOfLiteral(int literal) throws VariableDoesntExistException { if (literal < 0 ? variables.contains(-literal) : variables.contains(literal)) throw new VariableDoesntExistException(); int count = 0; for (int i = 0; i < clauses.size(); i++) { if (clauses.get(i).contains(literal)) count++; } return count; } COM: <s> returns the number of clauses in which the given literal occurs </s>
funcom_train/46571824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String writeLog(){ String result="0"; try { BufferedWriter writer = new BufferedWriter(new FileWriter(getLogPath(), true)); writer.write(this.msgLog); writer.newLine(); writer.close(); result = "0"; }catch (Exception cause){ result = cause.getMessage(); } return result; } COM: <s> write a log file </s>
funcom_train/45878796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getRainTotalSinceReset(CurrentMinMax reading, Date readingTime) throws IOException { byte[] nibbles = device.read(MemoryMap.RAIN_TOTAL, 8); reading.setCurrent(rain(nibbles, 0), RainfallUnit.MILLIMETRE, readingTime); if (!isCurrentOnly(reading)) { reading.setMinimum(0, RainfallUnit.MILLIMETRE, datetime(nibbles, 6)); } } COM: <s> total rainfall current rainfall in mm </s>
funcom_train/22101922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getMaxCollectionInterval(ResourceGroup g, Integer templateId) { Long max = getResourceGroupDAO().getMaxCollectionInterval(g, templateId); if (max == null) { throw new IllegalArgumentException("Invalid template id =" + templateId + " for resource " + "group " + g.getId()); } return max.longValue(); } COM: <s> get the maximum collection interval for a scheduled metric within a </s>
funcom_train/50697562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void launchButton_actionPerformed(ActionEvent e) { if (presFrame == null) { presFrame = new JPresentationFrame(host, this); } presFrame.setVisible(false); presFrame.model.setPresentation(currentPresentation); // there is room to wait here until presentation is properly loaded ?? presFrame.start(); } COM: <s> launches presentation window </s>
funcom_train/44798170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(final byte[] theBytes, final int off, final int len) throws java.io.IOException { // Encoding suspended? if (suspendEncoding) { super.out.write(theBytes, off, len); return; } for (int i = 0; i < len; i++) { write(theBytes[off + i]); } } COM: <s> calls write repeatedly until var len var </s>
funcom_train/1479018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkBanned(String hostName) { if (hostName == null) { return true; } for (int i = 0; i < bannedHosts.length; i++) { if (bannedHosts[i] != null && (hostName.startsWith(bannedHosts[i]) || hostName.equals(bannedHosts[i]))) { return true; } } return false; } COM: <s> checks to make sure the host isnt ip banned </s>
funcom_train/32775936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawVerticalString(Graphics2D g2d, FontRenderContext fdr, String text, float x, float y) { g2d.rotate(-Math.PI / 2.0); new TextLayout(text,font, fdr).draw(g2d, -y, x); g2d.rotate(Math.PI / 2.0); } COM: <s> draws a text which is rotated by 90 degrees </s>
funcom_train/36983894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { try { // do io streams need to be closed first? if (input != null) input.close(); if (output != null) output.close(); } catch (Exception e) { e.printStackTrace(); } thread = null; input = null; output = null; try { if (socket != null) socket.close(); } catch (Exception e) { e.printStackTrace(); } socket = null; } COM: <s> disconnect from the server internal use only </s>
funcom_train/1304875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readToChar(char theChar, StringBuilder result, int interruptChar) throws IOException { int codePoint = -1; while (true) { codePoint = read(); if (codePoint == -1 || codePoint == theChar || codePoint == interruptChar) break; if (result != null) result.appendCodePoint(codePoint); } return codePoint; } COM: <s> read to through the given char </s>
funcom_train/22909131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyLocationToAll() { List<ImageInfo> imageList = new ArrayList<ImageInfo>(); for (int iindex = 0; iindex < tableModel.getRowCount(); iindex++) { imageList.add(tableModel.getImageInfo(iindex)); } TaskExecutor.execute(new CopyLocationTask(COPY_LOCATION, COPY_LOCATION_ALL, tableModel, currentImage, imageList)); } COM: <s> copy the location to all images </s>
funcom_train/40327607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String replaceString(String original, String from, String to) { if ((original!=null) && (from!=null) && (to!=null)) { return replaceString(new StringBuffer(original), from, to).toString(); } else { return original; } } COM: <s> locates and replaces all occurrences of a given string with another given </s>
funcom_train/42930261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reportCacheStatistics() { log.info("There are " + cacheManager.getCacheNames().length + " active dimension caches"); for (String cacheName : cacheManager.getCacheNames()) { Cache cache = cacheManager.getCache(cacheName); Statistics statistics = cache.getStatistics(); if (log.isInfoEnabled()) { log.info(statistics.toString()); } } } COM: <s> performs the actual statistics reporting from the cache </s>
funcom_train/46826106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void transmitToTablePlayer (String usernameTo, int tableNum, ITransmittable transObject) { if (transObject instanceof CommTableMessage) ((CommTableMessage)transObject).setTableNum (tableNum); // Insure that that user is actually in this table Table table = tableList.getTable(tableNum); if (table != null) { PlayerList playerList = table.getPlayerList(); Player player = playerList.getPlayer(usernameTo); if (player != null) transmit (usernameTo, transObject); } } COM: <s> transmit a message to the specified table and specified player </s>
funcom_train/4837249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String shortestMatch(String input) { TrieNode node= root; for (int i= 0; i < input.length(); i++) { node= node.getChild(input.charAt(i)); if (node == null) return null; if (node.isTerminal()) return input.substring(0, i+1); } return null; } COM: <s> returns the shortest prefix of code input code that is matched </s>
funcom_train/15819848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private URL getEarURL(String moduleFile) { try { Object url = getWarAttribute(moduleFile, "EarURL"); if (url instanceof URL) { return (URL) url; } else { return new URL((String) url); } } catch (MalformedURLException ex) { return null; } catch (InstanceNotFoundException ex) { return null; } } COM: <s> get a context root of the ear application specified by its file name </s>
funcom_train/3760668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public Profiler newProfiler() { if ((_samplingRate == 0) || (++_sampleCount < _samplingRate)) { return NullProfiler.INSTANCE; } _sampleCount = 0; ActiveProfiler p = (ActiveProfiler) _stack.pop(); if (p != null) { p.reset(); } else { p = new ActiveProfiler(this); } return p; } COM: <s> instantiate a new profile </s>
funcom_train/32068412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addMailboxs(Collection<Mailbox> mailboxs) { boolean addOk = getMailboxs().addAll(mailboxs); if (addOk) { for(Mailbox mailbox : mailboxs) { mailbox.setEmailAddress((EmailAddress)this); } } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed mailboxs collection to the email address collection </s>
funcom_train/14373549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ArrayList intersectLabelBox(LabelBox lb, ArrayList checkLabels) { AccordionTreeDrawer d = (AccordionTreeDrawer) getCell().drawer; ArrayList returnList = new ArrayList(); Iterator iter = checkLabels.iterator(); while (iter.hasNext()) { LabelBox currLabel = (LabelBox) iter.next(); if (lb.overlaps(currLabel, d.labelbuffer)) returnList.add(currLabel); } return returnList; } COM: <s> occlusion check of label box against array of all drawn labels </s>
funcom_train/21936984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean isFragment() { // get the block 4 (if exists) final SwiftBlock4 b4 = this.getBlock4(); if (b4 != null) { final String t202 = b4.getTagValue("202"); final String t203 = b4.getTagValue("203"); // if both tag exists => this is a fragment return (t202 != null && t203 != null ? Boolean.TRUE : Boolean.FALSE); } ; return (Boolean.FALSE); } COM: <s> checks if the message is a fragment </s>
funcom_train/44164176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element declineMounds(ServerPlayer serverPlayer, Tile tile) { tile.removeLostCityRumour(); // Others might see rumour disappear ChangeSet cs = new ChangeSet(); cs.add(See.perhaps(), tile); sendToOthers(serverPlayer, cs); return cs.build(serverPlayer); } COM: <s> decline to investigate strange mounds </s>
funcom_train/45147133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void refreshBendpoints(){ List modelConstraint = getSAIConnection().getBendpoints(); List figureConstraint = new ArrayList(); for(int i=0;i<modelConstraint.size();i++){ ConnectionBendpoint cbp = (ConnectionBendpoint)modelConstraint.get(i); RelativeBendpoint rbp = new RelativeBendpoint(getConnectionFigure()); rbp.setRelativeDimensions(cbp.getFirstRelativeDimension(),cbp.getSecondRelativeDimension()); rbp.setWeight((i+1)/((float)modelConstraint.size()+1)); figureConstraint.add(rbp); } getConnectionFigure().setRoutingConstraint(figureConstraint); } COM: <s> create new bend points </s>
funcom_train/22184647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getWindowTitle(boolean labelThreads) { String emailOrThread = "Email"; if (labelThreads && threadSet != null && threadSet.size() > 0) { emailOrThread = "Thread"; } String idText = ""; if (currentEmailMessage != null) { idText += ", Message ID: " + currentEmailMessage.getMid(); } return emailOrThread + " Labeller (Message #" + labelledEmails.size() + idText + ")"; } COM: <s> builds a title string for the labelling window </s>
funcom_train/44694624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getFieldCount() { if (m_BaseLayer != null) { final FeatureCollectionWrapper fc = m_BaseLayer.getFeatureCollectionWrapper(); /** * We assume that the first attribute of the feature is its geometry, and that there is always a geometry */ return fc.getFeatureSchema().getAttributeCount() - 1; } else { return 0; } } COM: <s> returns the number of fields in the attributes table </s>
funcom_train/9705923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCachedTypes(Types types) { if (USE_SOFT_REFERENCES) { if (softTypes == null || softTypes.get() == null) { if (types != null) { softTypes = new SoftReference(types); } else { // The wsdl has no types softTypes = new SoftReference(Boolean.FALSE); } } } } COM: <s> store the cached type </s>