__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/16538142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getStepsText() { if (stepsText == null) { NumberFormat integerFormat = NumberFormat.getIntegerInstance(); integerFormat.setParseIntegerOnly(true); stepsText = new JFormattedTextField(integerFormat); stepsText.setValue(config.getNSteps()); stepsText.setToolTipText("Maximum number of time-steps in the simulation"); stepsText.setHorizontalAlignment(JTextField.TRAILING); } return stepsText; } COM: <s> this method initializes steps text </s>
funcom_train/13875000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addVariablePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RelationDomainAssignment_variable_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RelationDomainAssignment_variable_feature", "_UI_RelationDomainAssignment_type"), QvtrelationPackage.Literals.RELATION_DOMAIN_ASSIGNMENT__VARIABLE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the variable feature </s>
funcom_train/13958932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NSArray loggers() { NSMutableArray result = new NSMutableArray(); for (Enumeration e = allLoggers().objectEnumerator(); e.hasMoreElements();) { Logger log = (Logger)e.nextElement(); while (log != null) { addLogger(log, result); log = (Logger)log.getParent(); } } return result; } COM: <s> gets all of the configured </s>
funcom_train/37555970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getBounds () { checkWidget (); int hwnd = parent.handle; RECT rect = new RECT (); rect.left = handle; if (OS.SendMessage (hwnd, OS.TVM_GETITEMRECT, 1, rect) == 0) { return new Rectangle (0, 0, 0, 0); } int width = rect.right - rect.left; int height = rect.bottom - rect.top; return new Rectangle (rect.left, rect.top, width, height); } COM: <s> returns a rectangle describing the receivers size and location </s>
funcom_train/3138052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadState() throws ZMailException { IPath pluginStateLocation = ZMailPlugin.getDefault().getStateLocation().append(STATE_FILE); File file = pluginStateLocation.toFile(); if (file.exists()) { try { DataInputStream dis = new DataInputStream(new FileInputStream(file)); setMailClients(readState(dis)); dis.close(); } catch (IOException e) { throw new ZMailException(ERROR_LOAD_STATE, e); } } else { setMailClients(new HashMap()); } } COM: <s> method load state </s>
funcom_train/7347235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean mkdir() { dbg("mkdir: " + getPath()); try { BufferedReader r = new BufferedReader(new InputStreamReader(httpPost(url, getPath(), "mkdir", "1"))); String result = br2string(r); if ("1".equals(result)) { return true; } else { dbg("mkdir Failed: " + result); return false; } } catch(IOException x) { x.printStackTrace(); return false; } } COM: <s> creates a new directory on the remote web server </s>
funcom_train/32783553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Unit findByID(final String theID, final boolean exact) { final Unit unit; if (root != null) { unit = root.findByID(theID, exact); } else { unit = null; } return ((unit == null) && (!exact) ? root : unit); } COM: <s> find by id </s>
funcom_train/19053001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getCurTableCell() { Element currCellElem = WWEHTMLUtilities.findElementUp(HTML.Tag.TH.toString(), ((WWEHTMLDocument) getDocument()).getCharacterElement(getSelectionStart())); if (currCellElem == null) currCellElem = WWEHTMLUtilities.findElementUp(HTML.Tag.TD.toString(), ((WWEHTMLDocument) getDocument()).getCharacterElement(getSelectionStart())); return currCellElem; } COM: <s> get the table cell at the current caret position </s>
funcom_train/9132384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseFile(SensorContext context, File report, Project project) { TestSuites testSuites = getTestSuites(report); List<PhpUnitTestReport> fileReports = readSuites(testSuites); for (PhpUnitTestReport fileReport : fileReports) { saveTestReportMeasures(context, project, fileReport); } } COM: <s> parses the report file </s>
funcom_train/36107126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(Iterator<Data> iter, String command){ if(!iter.hasNext()) { if(command!=null) System.out.println("--- No data obtained for "+command); else System.out.print("[]"); return; } if(command!=null) System.out.println("--- Results of "+command); else System.out.print("{"); while(iter.hasNext()){ print(iter.next(), command); } if(command==null)System.out.print("}"); } COM: <s> used both by this callback and directly by </s>
funcom_train/18255250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArea(int x, int y, int width, int height) { this.x = x; this.y = y; this.width = width; this.height = height; name = "Move Random Within " + x + ", " + y + " -> " + width + ", " + height; } COM: <s> the agent must select its new location from within this area </s>
funcom_train/35749322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pushTransform() { predraw(); FloatBuffer buffer; if (stackIndex >= stack.size()) { buffer = BufferUtils.createFloatBuffer(18); stack.add(buffer); } else { buffer = (FloatBuffer) stack.get(stackIndex); } GL.glGetFloat(GL11.GL_MODELVIEW_MATRIX, buffer); buffer.put(16, sx); buffer.put(17, sy); stackIndex++; postdraw(); } COM: <s> push the current state of the transform from this graphics contexts </s>
funcom_train/25738585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getSumOfResiduesMass() { if (isAmbiguous()) { throw new IllegalStateException("mass infos unavailable"); } if (startIndexInRoot == 0) { return root.cumulResidueMasses[endIndexInRoot]; } else { return root.cumulResidueMasses[endIndexInRoot] - root.cumulResidueMasses[startIndexInRoot - 1]; } } COM: <s> returns the sum of amino acid residues masses without nc termini m </s>
funcom_train/4233081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (this == o) { return true; } if (o instanceof XYTimeSeriesDataItem) { XYTimeSeriesDataItem d = (XYTimeSeriesDataItem)o; return period.equals(d.getPeriod()) && x.equals(d.getX()) && y.equals(d.getY()); } return false; } COM: <s> test if this object is equal to another </s>
funcom_train/39102185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { this.command.initialiseAction(param); this.command.doAction(); this.command.finaliseAction(); } catch (Throwable e) { // Invoke the exception action on the command e.printStackTrace(); this.command.exceptionAction(e); } // Signal to the outside world that the command completed this.completed = true; } COM: <s> perform the actial execution of the command </s>
funcom_train/20826210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearPatch() { Dimmers dimmers = context.getShow().getDimmers(); for (int i = 0; i < dimmers.size(); i++) { dimmers.get(i).setChannel(null); } // context.getShow().updateChannelInputs(); // ???? } COM: <s> removes the patch information from all dimmers sets all </s>
funcom_train/46787045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPrecedesPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Message_precedes_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Message_precedes_feature", "_UI_Message_type"), EZRealtimePackage.Literals.MESSAGE__PRECEDES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the precedes feature </s>
funcom_train/24527380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IContext bind(String key, IContext context)throws SecurityException, ObjectAlreadyBoundException{ lazyInitContexts(); synchronized (m_contexts){ if ( m_contexts.get(key) != null ) { throw new ObjectAlreadyBoundException("Context "+getKey() +" already contains '"+ key+"'"); } m_contexts.put(key, context); return context; } } COM: <s> accepts object and icontext items </s>
funcom_train/4365083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendByteChunk(ByteChunk bc) { if (bc == null) { log.error(sm.getString("ajpmessage.null"), new NullPointerException()); appendInt(0); appendByte(0); return; } appendBytes(bc.getBytes(), bc.getStart(), bc.getLength()); } COM: <s> write a byte chunk out at the current write position </s>
funcom_train/46761735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VisitTypeModel getVisitType(final long visitTypeId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return PatientData.getVisitType(visitTypeId, chain, call); }}; return (VisitTypeModel) call(method, call); } COM: <s> same transaction return the single visit type model for the primary key </s>
funcom_train/12914010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double boundValue(double oldValue, double newValue) { if (lowerFlag && newValue < lowerBound) newValue += relaxation.relaxation() * (lowerBound - newValue); if (upperFlag && newValue > upperBound) newValue += relaxation.relaxation() * (upperBound - newValue); return newValue; } COM: <s> if the new value is outside the bounds move it towards the bounds </s>
funcom_train/15677358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CubicBezierCurve2D subCurve(double t0, double t1) { t0 = Math.max(t0, 0); t1 = Math.min(t1, 1); if (t0 > t1) return null; double dt = t1 - t0; Vector2D v0 = tangent(t0).times(dt); Vector2D v1 = tangent(t1).times(dt); return new CubicBezierCurve2D(point(t0), v0, point(t1), v1); } COM: <s> computes portion of bezier curve </s>
funcom_train/1050397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshFromLibraryFolder() { BolBase.init(this.getClass()); compositionBase.addFolderRecursivelyAndGetOutdated(Config.pathToTals); ArrayList<Composition> outdated = compositionBase.addFolderRecursivelyAndGetOutdated(Config.pathToCompositions); for (Composition c: outdated) { if (c.getDataState() != DataState.NEW) { compositionBase.removeComposition(c); } } } COM: <s> re inits bol base and refreshes compositionbase from the library folder </s>
funcom_train/43045209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendDirectMessageAsync(String id, String text, TwitterListener listener) { getDispatcher().invokeLater(new AsyncTask(SEND_DIRECT_MESSAGE, listener, new String[] {id, text}) { public void invoke(TwitterListener listener,Object[] args) throws TwitterException { listener.sentDirectMessage(sendDirectMessage( (String) args[0], (String) args[1])); } }); } COM: <s> sends a new direct message to the specified user from the authenticating user </s>
funcom_train/36074984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calculateFISOutput(){ /*The sum of all firing strengths*/ this.sumOfFiringStrenghts = 0; /*The sum of all rule output times the firing strength*/ double fw = 0; TakagiSugenoRule rule; for (int i = 0; i < this.rules.size(); i++){ rule = this.rules.get(i); rule.calculateFiringStrength(); rule.calculateRuleOutput(); sumOfFiringStrenghts += rule.firingStrength; fw += rule.firingStrength*rule.ruleOutput; } this.output = fw/sumOfFiringStrenghts; } COM: <s> calculate the output of the fis </s>
funcom_train/22369095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int countFilesInDir(File dir) { int files = 0; if (!isInterrupt()) { File[] list = dir.listFiles(); if (list == null) { return files; } for (File element : list) { if (localAudioObjectValidator.isValidAudioFile(element)) { files++; } else if (element.isDirectory()) { files = files + countFilesInDir(element); } } } return files; } COM: <s> count files in dir </s>
funcom_train/50933210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renumberAtomIdsSequentially() { List<String> fromIdList = this.getAtomIds(); List<String> toIdList = MoleculeTool.createSequentialAtomIds("a", fromIdList.size()); renumberAtomIds(fromIdList, toIdList); } COM: <s> force renumbering to a1 a2 </s>
funcom_train/46136756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getExecutionLogFilePath() { if (this.executionLogFilePath == null) { try { this.executionLogFilePath = File.createTempFile(Resources.EXECUTION_FILENAME, null).getAbsolutePath(); } catch (final IOException e) { Console.error(e); } } return this.executionLogFilePath; } COM: <s> gets the execution log file path </s>
funcom_train/20029485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand() { if (itemCommand == null) {//GEN-END:|104-getter|0|104-preInit // write pre-init user code here itemCommand = new Command("Item", Command.ITEM, 0);//GEN-LINE:|104-getter|1|104-postInit // write post-init user code here }//GEN-BEGIN:|104-getter|2| return itemCommand; } COM: <s> returns an initiliazed instance of item command component </s>
funcom_train/13122306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStylesDotXml() throws IOException, DocumentTemplateException { File templateFile = new File("test-data/header-template.odt"); Map model = new HashMap(); model.put("name", "Mirko"); try { processZippedTemplate(templateFile, model); fail("undetected invalid reference to 'title' in styles.xml"); } catch (DocumentTemplateException expected) { } } COM: <s> header footer are in styles </s>
funcom_train/7265954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object readResolve() { synchronized (getClass()) { int index = (vendorId & Integer.MAX_VALUE) % VENDORS.length; Vendor vendor = VENDORS[index]; if (vendor == null || vendor.vendorId != vendorId) { vendor = this; VENDORS[index] = vendor; } return vendor; } } COM: <s> check the cache and replace this instance with the cached instance </s>
funcom_train/3388347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void crc32File(ZipEntry e, File f) throws IOException { CRC32OutputStream os = new CRC32OutputStream(); copy(f, os); if (os.n != f.length()) { throw new JarException(formatMsg( "error.incorrect.length", f.getPath())); } os.updateEntry(e); } COM: <s> computes the crc32 of a file </s>
funcom_train/28117083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void close(MessageReceiver receiver) throws Exception { if (receiver != null) { if (log.isDebugEnabled()) { Destination destination = receiver.getDestination(); log.debug("Closing receiver for destination=" + DestinationHelper.getName(destination)); } // invoke remove to destroy any durable topic subscription receiver.remove(); } } COM: <s> helper to close a message receiver </s>
funcom_train/21471683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String removeBackSlashes(String text) { if (text.length() <= 2) return text; int offset = 0, length = text.length(), offset1 = 0; String newText = ""; while (offset < length) { offset1 = text.indexOf('\\', offset); if (offset1 < 0) { newText = newText + text.substring(offset); break; } newText = newText + text.substring(offset, offset1) + text.substring(offset1 + 1, offset1 + 2); offset = offset1 + 2; } return newText; } COM: <s> remove the backslashes from the given string </s>
funcom_train/49200015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addModulesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ModuleCategory_modules_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ModuleCategory_modules_feature", "_UI_ModuleCategory_type"), ExhibitionPackage.Literals.MODULE_CATEGORY__MODULES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the modules feature </s>
funcom_train/9663631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getTableHeight() { String height = DOM.getStyleAttribute(getElement(), "height"); if (height != null && height.endsWith("px")) { return Integer.parseInt(height.substring(0, height.indexOf("px"))); } else { return getOffsetHeight(); } } COM: <s> this method returns an actual table height </s>
funcom_train/8013046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValue() { try { if (_ds != null) { if (_helper.isDataDirty()) return getSelValue(); else return _ds.getFormattedString(_dsCol); } } catch (DataStoreException ex) { ex.printStackTrace(); return null; } return getSelValue(); } COM: <s> returns the value of the data in the component </s>
funcom_train/44459496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void projectNodeChanged(ProjectNode node) { // If the current node is null, then deselect if (node == null) { // TODO // If the current node is not null, select and expand it } else { TreePath path = node.getTreePath(); _tree.setSelectionPath(path); _tree.expandPath(path); } } COM: <s> callback method called when the current project node changed on the </s>
funcom_train/11378129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shiftLeft(int bits) { if (bits != 0) { if (bits < 64) { hi8 <<= bits; hi8 |= (lo8 >>> (64 - bits)); lo8 <<= bits; } else if (bits < 128) { hi8 = lo8 << (bits - 64); lo8 = 0; } else { hi8 = 0; lo8 = 0; } } } COM: <s> shift the number a given number of bit positions </s>
funcom_train/48710079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsEdge(Vertex a, Vertex b) { int indexA = getVertexIndex(a); int indexB = getVertexIndex(b); int[][] m = getAdjacencyMatrix(); if (m != null && indexA >= 0 && indexB >= 0 && m[indexA][indexB] == 1) { return true; } else { return false; } } COM: <s> checks if the given edge is in graph </s>
funcom_train/40448289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bulletin(String message) { synchronized(host.clients) {// for each client playing the active game for (int clientNum= 0; clientNum<host.clients.size(); clientNum++) { ClientLiaison client= host.clients.elementAt(clientNum); if (client==null || client.game!=game || client.empty) continue; client.sendMessage(message); } } } COM: <s> puts a short message in the status field of each client </s>
funcom_train/6267076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { if (!(other instanceof RouteList)) return false; RouteList that = (RouteList) other; if (this.size() != that.size()) return false; ListIterator it = this.listIterator(); ListIterator it1 = that.listIterator(); while (it.hasNext()) { Route route = (Route) it.next(); Route route1 = (Route) it1.next(); if (!route.equals(route1)) return false; } return true; } COM: <s> order is important when comparing route lists </s>
funcom_train/14604937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValid() { if(this.startToken == null) { return false; } if(this.filterList.isEmpty()) { return false; } for(Iterator it=filterList.iterator(); it.hasNext();) { LdapFilter filter = (LdapFilter)it.next(); if(filter == null || !filter.isValid()) { return false; } } return true; } COM: <s> checks if this filter component including all subfilters </s>
funcom_train/23267826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTipoOperacion() { System.out.println("setTipoOperacion"); String tipoOperacion = ""; Movimientos instance = new Movimientos(); instance.setTipoOperacion(tipoOperacion); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set tipo operacion method of class capa negocios </s>
funcom_train/9769584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test(expected=IllegalArgumentException.class) public void testConstructorCheckNoPair() { Combo[] combos = new Combo[] {this.bamboo_seq, this.bamboo_seq2, this.circle_trp, this.circle_trp2, this.wind_trp}; new Scoreentry_TWO_SUITS_ONLY(combos); } COM: <s> check if it fails if a pair is missing </s>
funcom_train/9563988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperty(String anExpr) throws ProperyProviderException { int tmpPos; if (anExpr != null && (tmpPos = anExpr.indexOf('=')) > -1) { setProperty(anExpr.substring(0, tmpPos), anExpr.substring(tmpPos + 1)); } else { throw new ProperyProviderException("Wrong setProperty(...) expression."); } } COM: <s> sets property from given parameter </s>
funcom_train/1915441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validation(ResultSchema schema){ switch(type){ case VALUE: { boolean l = leftV.validation(schema); boolean r = rightV.validation(schema); if(l && r && ( ( leftV.getColName() != null && leftV.constvalue != null ) || rightV.getColName() != null && rightV.constvalue != null )) return true; return false; } case AND: { boolean l = leftB.validation(schema); boolean r = rightB.validation(schema); return l && r; } case OR: { boolean l = leftB.validation(schema); boolean r = rightB.validation(schema); return l || r; } case ANY: case ALL: case IN: { //check one-row~ } } return false; } COM: <s> check the correctness of boolean operation </s>
funcom_train/4497302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeString(String string) throws IOException { String encoding; if (shiftJIS) { encoding = "SJIS"; } else if (ansi) { encoding = "cp1252"; } else { encoding = "UTF-8"; } writeBytes(string.getBytes(encoding)); stream.write(0); offset++; } COM: <s> writes an utf 8 encoded null terminated string </s>
funcom_train/8241435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { model = new ApplicationModel(); //RootPanel.get("logo").add(new LogoImage("images/logo153.png")); RootPanel.get("menu").add(new MainMenu(model)); RootPanel.get("centralPart").add(new StartPanel(model)); //RootPanel.get("statistics").add(new StatisticsPanel()); } COM: <s> this is the entry point method </s>
funcom_train/36547895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Integer getNextTemplateVersionByTitle( String documentTitle ) throws SQLException { Integer documentVersion = -1; Document document; document = IbatorClient.getDocumentDao().selectTemplateByTitle( documentTitle ); if ( document != null ) { documentVersion = IbatorClient.getDocumentVersionDao().selectNextDocumentVersionByDocumentId( document.getId() ); } return documentVersion; } COM: <s> gets the next template version by title </s>
funcom_train/8323027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(PrintWriter pw, String prefix) { SqlQuery sqlQuery = getSqlQuery(); pw.print(prefix); pw.print(getName()); pw.print(" ("); pw.print(getBitPosition()); pw.print("): "); pw.print(generateExprString(sqlQuery)); } COM: <s> prints this column </s>
funcom_train/33840082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteColumns(int start, int len) throws FitsException { getData(); try { rowLen = table.deleteColumns(start, len); nCol -= len; } catch (Exception e) { throw new FitsException("Error deleting columns from BinaryTable:"+e); } } COM: <s> delete a set of columns </s>
funcom_train/535872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTitle() { if (this.title == null) { throw new IllegalStateException("Title is null, track initialization broken"); } if (this.title.length() == 0) { throw new IllegalStateException("Title is empty, track initialization broken"); } return this.title; } COM: <s> return the track title </s>
funcom_train/3515209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SMTPTest removePendingTest(SMTPTestTarget target, SMTPTest test) { final SortedMap<Long, SMTPTest> targetMap = getPendingTests(target); if (targetMap == null) { return null; } return targetMap.remove(new Long(test.getSentTime())); } COM: <s> removes a test from the pending test list </s>
funcom_train/34873541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCompete() { doCompete("*", "*"); doCompete("#", "#"); doCompete("\\", "\\"); doCompete("*", "#"); doCompete("*", "\\"); doCompete("#", "\\"); } COM: <s> test for the compete method </s>
funcom_train/50922627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void extendLineToAverageLength(double targetLength, int moveableEnd) { Line2 line2 = this.getEuclidLine(); Real2 moveXY = line2.getXY(moveableEnd); Real2 staticXY = line2.getXY(1-moveableEnd); Real2 vector = moveXY.subtract(staticXY); double length = vector.getLength(); vector = vector.multiplyBy(targetLength / length); Real2 newXY = staticXY.plus(vector); line2.setXY(newXY, moveableEnd); this.setLine2(line2); } COM: <s> moves movable end to create line of target length </s>
funcom_train/40932016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IGamePlayer checkPlayer(int playerId) { synchronized (players) { if (dataRefs.get(playerId, -1) == -1) { throw new IllegalArgumentException("Invalid playerId: " + playerId + " " + dataRefs.size()); } IGamePlayer player = players.get(dataRefs.get(playerId), null); if (player == null) { throw new IllegalArgumentException("Invalid playerId: " + playerId + ", callback doesn't exist"); } return player; } } COM: <s> checks given player id and returns appropriated igame player instance </s>
funcom_train/4912271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean containsVowel(String word) { for (int i = 0; i < word.length(); i++) { if (i > 0) { if (vowel(word.charAt(i), word.charAt(i - 1))) { return true; } } else { if (vowel(word.charAt(0), 'a')) { return true; } } } return false; } COM: <s> checks whether there is a vowel within word or not </s>
funcom_train/40340527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ChangeCurrentPlayerState(StateBase newState) { PlayerList.get(m_currentPlayer).getCurrentState().Exit(); PlayerList.get(m_currentPlayer).setPreviousState( PlayerList.get(m_currentPlayer).getCurrentState()); PlayerList.get(m_currentPlayer).setCurrentState(newState); PlayerList.get(m_currentPlayer).getCurrentState().Enter(); PlayerList.get(m_currentPlayer).getCurrentState().Draw( GameFrame.getInstance()); } COM: <s> changes the current players state to new state </s>
funcom_train/18939349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void test_AT_115_1_startingPeerWithoutNetworkOfFavorsFile() throws Exception { // Start the peer req_010_Util.startPeer(); // Expect the Network of favours status to be empty Map<String, PeerBalance> knownPeerBalances = new HashMap<String, PeerBalance>(); NetworkOfFavorsStatus networkOfFavorsStatus = new NetworkOfFavorsStatus(knownPeerBalances); req_035_Util.getNetworkOfFavoursStatus(networkOfFavorsStatus); } COM: <s> this test contains the following steps </s>
funcom_train/26415925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClickWrongItem() throws Exception { EventQueue.invokeAndWait(new Runnable() { public void run() { frame.getContentPane().add(box); frame.pack(); frame.setVisible(true); } } ); Droid.waitOnEventQueue(); JComboBoxPilotImpl actor = new JComboBoxPilotImpl(box); try { actor.clickItem(-1); fail("Should have thrown IllegalArgument 1"); } catch (IllegalArgumentException ex) { // pass } try { actor.clickItem(3); fail("Should have thrown IllegalArgument 2"); } catch (IllegalArgumentException ex) { // pass } } COM: <s> assert that click item throws illegal argument if index is invalid </s>
funcom_train/777453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJadeServiceSetGetObjectNameDomain() { JadeService jadeService = new JadeService(); final String OBJECT_NAME_DOMAIN = "foo"; jadeService.setObjectNameDomain(OBJECT_NAME_DOMAIN); String objectNameDomain = jadeService.getObjectNameDomain(); assertEquals( OBJECT_NAME_DOMAIN, objectNameDomain ); } COM: <s> test access to object name domain </s>
funcom_train/44898466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean readBooleanAttribute(Properties props, String name) { String val = props.getProperty(name); if (val != null) val = val.trim(); boolean result = "true".equalsIgnoreCase(val) || "yes".equalsIgnoreCase(val); logger.info(name + " = " + result); return result; } COM: <s> reads a boolean valued attribute and returns true if it </s>
funcom_train/28754065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setResequence(Long newVal) { if ((newVal != null && this.resequence != null && (newVal.compareTo(this.resequence) == 0)) || (newVal == null && this.resequence == null && resequence_is_initialized)) { return; } this.resequence = newVal; resequence_is_modified = true; resequence_is_initialized = true; } COM: <s> setter method for resequence </s>
funcom_train/925927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeExternal(ObjectOutput out) throws IOException { //write the verion of this MetaData so it can be read properly out.writeInt(META_DATA_VERSION); //write data for version 0 out.writeUTF(fileName); out.writeLong(fileSize); out.writeUTF(type); out.writeUTF(mimeType); fileHash.writeExternal(out); } COM: <s> writes this code meta data code to the given output </s>
funcom_train/13260583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean OUTtoMVAScaling(String srcPath, String dstPath) { //source xsd String srcXsdPath = XSDSchemaLoader.loadSchema(XSDSchemaLoader.JSIM_MODEL_RESULTS); //destination xsd String dstXsdPath = XSDSchemaLoader.loadSchema(XSDSchemaLoader.JMVA_MODEL_DEFINITION); //xslt transformation String transPath = XSDSchemaLoader.loadSchema(XSDSchemaLoader.OUT_TO_JMVA_SCALING); configureTransformer(srcPath, dstPath, transPath, srcXsdPath, dstXsdPath); return transform(); } COM: <s> transform an xml file containing the simulation results simmodeloutput </s>
funcom_train/28123016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void redrawColor() { if (isDangling()) return; java.awt.Color c = getRecommendedColor(); VisualiserExtension.setBackground(c); ConnectorExtension.setBackground(c); VerticalLink.setBackground(c); VisualiserLink.setBackground(c); VisualiserArrow.setColor(c); ConnectorArrow.setColor(c); } COM: <s> recolor existing lines </s>
funcom_train/20675416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBounds(final EntityView item) { if (!manageBounds) { return; } final Shape shape = getShape(item); if (shape == null) { item.setBounds(item.getX(), item.getY(), 0, 0); } else { GraphicsLib.setBounds(item, shape, getStroke(item)); } } COM: <s> calculates and sets the bounding rectangle for an item </s>
funcom_train/33624459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init(CountryPreferences preferences) { Image loadingImage=new Image( GWT.getModuleBaseURL() + "ajax-loader.gif"); loadingImage.setStyleName("loading image"); loadingImagePopup = new PopupPanel(false,true); loadingImagePopup.setAnimationEnabled(false); loadingImagePopup.setStyleName(constants.cwLoadingPopupPanelStyle()); loadingImagePopup.setWidget(loadingImage); loadingImagePopup.center(); loadingImagePopup.show(); this.preferences = preferences; getSocialInfo(); } COM: <s> this is the entry point method </s>
funcom_train/9369809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setToDefaults() { fontScale = 1; mcc = mnc = 0; locale = Locale.getDefault(); userSetLocale = false; touchscreen = TOUCHSCREEN_UNDEFINED; keyboard = KEYBOARD_UNDEFINED; keyboardHidden = KEYBOARDHIDDEN_UNDEFINED; hardKeyboardHidden = HARDKEYBOARDHIDDEN_UNDEFINED; navigation = NAVIGATION_UNDEFINED; navigationHidden = NAVIGATIONHIDDEN_UNDEFINED; orientation = ORIENTATION_UNDEFINED; screenLayout = SCREENLAYOUT_SIZE_UNDEFINED; } COM: <s> set this object to the system defaults </s>
funcom_train/35224308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addStackFrame(JsDebugStackFrame frame) { List<IStackFrame> list = new ArrayList<IStackFrame>(); list.add(frame); for (IStackFrame stackFrame : this.stackFrames) { list.add(stackFrame); } this.stackFrames = list.toArray(new IStackFrame[list.size()]); fireResumeEvent(DebugEvent.STEP_END); fireSuspendEvent(DebugEvent.BREAKPOINT); fireChangeEvent(DebugEvent.CONTENT); } COM: <s> add statck frame to thread and fire resume event and breakpoint event </s>
funcom_train/31529583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRequiredAttribute(Node node, String name, String defaultValue) throws ParseException { String result = getAttribute(node, name, null); if (result == null || result.length() == 0) if (strict || defaultValue == null) throw new ParseException("The "+node.getNodeName()+" element must specify a "+name+" attribute."); if (result == null) return defaultValue; else return result; } COM: <s> returns the same result as get attribute except that if strict </s>
funcom_train/31976698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int MAIL_INCLUDE(CommandEvent event, String context, String filename) throws Exception{ EmailMessage mail = (EmailMessage) event.instance.nv.get(context); PrintStream hold = event.instance.out; ByteArrayOutputStream baos = new ByteArrayOutputStream(); event.instance.out = new PrintStream(baos); parent.log(TemplateLogger.INFORM,"Including "+filename+" in email"); event.tr.decodeTemplate(event.instance,filename); mail.Append(baos.toString(),""); event.instance.out = hold; return 1; } COM: <s> include a file inline into the email decoding it into the stream </s>
funcom_train/25838961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void foundFrequentItemSet(int[] itemset, int support) { if (usedAsLibrary) { this.setChanged(); notifyObservers(itemset); } else {System.out.println(Arrays.toString(itemset) + " ("+ ((support / (double) numTransactions))+" "+support+")");} } COM: <s> triggers actions if a frequent item set has been found </s>
funcom_train/19177833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Results executeSelect(String SQL) throws dbException { Results rs = null; try { Statement st = connection.createStatement(); rs = new Results(st, SQL, SELECT); } catch(SQLException e) {throw new dbException("Database: executeSelect(" + SQL + ") failed", e);} return rs; } COM: <s> execute a select type query </s>
funcom_train/44975558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputStream getFilteredStream (InputStream is) throws IOException { // this implementation will delete all low characters (<= 0x0f) ByteArrayOutputStream baos = new ByteArrayOutputStream( ); int b ; while ( (b = is.read() )>=0 ) { if (b>0xf) { baos.write( b ); } } return new ByteArrayInputStream ( baos.toByteArray() ) ; } COM: <s> return an input stream utf 8 compatible </s>
funcom_train/32945628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getRejReasons() { List rejReasons = new ArrayList(); Iterator<RejReason> it = rejReasonOids.values().iterator(); while(it.hasNext()) { RejReason rejReason = it.next(); rejReasons.add(rejReason); } return rejReasons; } COM: <s> gets all reasons in the system </s>
funcom_train/50492349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object o1, Object o2) { if (!((o1 instanceof snipsnap.api.snip.Snip) && (o2 instanceof snipsnap.api.snip.Snip))) { throw new ClassCastException(); } return compare((snipsnap.api.snip.Snip) o1, (snipsnap.api.snip.Snip) o2); } COM: <s> implementation of the comparator interface compare method that </s>
funcom_train/17681396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeScript(String script) throws Exception { init(); JdbcConnectionSource conSrc = ((JdbcStorageManagerFactory)smf).getConnectionSource(); Connection con = null; try { runScript(con, script); } finally { if (con != null) { try { conSrc.returnConnection(con); } catch (SQLException e) { // ignore } } } } COM: <s> execute the given script agains the datastore </s>
funcom_train/4511202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxCacheSize(int maxCacheSize) { this.maxCacheSize = maxCacheSize; CacheFactory.setMaxSizeProperty(name, maxCacheSize); // It's possible that the new max size is smaller than our current cache // size. If so, we need to delete infrequently used items. cullCache(); } COM: <s> sets the maximum size of the cache </s>
funcom_train/10843053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLevel( final String level ) { if ( BOOT_MARKER.equalsIgnoreCase(level) ) { this.startLevel = -1; } else { this.startLevel = Integer.valueOf(level); if ( this.startLevel < 0 ) { throw new IllegalArgumentException("Start level must either be '" + BOOT_MARKER + "' or non-negative: " + level); } } } COM: <s> set the level field </s>
funcom_train/21363940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadDriver() { try { Class.forName("com.mysql.jdbc.Driver").newInstance(); } catch (ClassNotFoundException cnfe) { cnfe.printStackTrace(); } catch (IllegalAccessException iae) { iae.printStackTrace(); } catch (InstantiationException ie) { ie.printStackTrace(); } } COM: <s> method responsible for loading the my sql jdbc driver </s>
funcom_train/8514383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRange(double[] range, int scale) { setXAxisMin(range[0], scale); setXAxisMax(range[1], scale); setYAxisMin(range[2], scale); setYAxisMax(range[3], scale); } COM: <s> sets the axes range values </s>
funcom_train/7518235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(ControleVistos entity) { EntityManagerHelper.log("saving ControleVistos instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved controle vistos entity </s>
funcom_train/4973157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addScaleInstrument() { ScaleLineInstrument instrument = new ScaleLineInstrument(); int retcode= ScaleEditor.makeDialog((JFrame)BoogiepantsDisplayWindow.getInstance(), instrument); if(retcode==ScaleEditor.SUCCESS){ instrumentContainer.add(instrumentContainer.getLastPushed(), instrument); instrumentContainer.displayNew(); instrument.setRelocate(); } } COM: <s> adds a new scale instrument to the current instrument group </s>
funcom_train/28171091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsClosed() { System.out.println("isClosed"); BezierPath instance = new BezierPath(); boolean expResult = true; boolean result = instance.isClosed(); 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 is closed method of class org </s>
funcom_train/29955600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAll() { try { File dir = new File(m_test_input_dir); parseDirectory(dir); log.debug("done"); } catch (Exception e) { log.warn(e.getMessage()); e.printStackTrace(); Assert.fail(); } } COM: <s> run generator against all files specified in property test </s>
funcom_train/2278688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRequestsObservation(long newNumberOfRequests) { if (startNumberOfRequests) { startNumberOfRequests = false; oldNumberOfRequests = newNumberOfRequests; } long count = newNumberOfRequests - oldNumberOfRequests; if (count < 0){ count = 0; } numberOfRequests.addOrUpdate(System.currentTimeMillis(), count); oldNumberOfRequests = newNumberOfRequests; } COM: <s> adds the requests observation </s>
funcom_train/15416429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCookiesToConnection(URLConnection urlconnection) { if (cookieMap.size() < 1) { return; } StringBuffer sb = new StringBuffer(); boolean first = true; Enumeration<HttpCookie> e = cookieMap.elements(); while (e.hasMoreElements()) { HttpCookie cookie = (HttpCookie) e.nextElement(); if (first) { first = false; } else { sb.append("; "); } sb.append(cookie.getNameValue()); } urlconnection.setRequestProperty("Cookie", sb.toString()); } COM: <s> set the cookies to the url connection </s>
funcom_train/3834363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MapOperation getSelectedMapOperation() { MapOperation[] mss = getOfferedMapOperations(); MapOperation ms = mss[0]; for (int i = 0; i < mss.length; i++) { if ( mss[i].isSelected() ) { ms = mss[i]; break; } } return ms; } COM: <s> returns the map operation that is marked as selected </s>
funcom_train/25825371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rotate(GL2 gl) { // Rotate clockwise if (rotateClockwise == true) zRot -= ROTATION_SPEED * (elapsedTime / 1000.0); // Rotate counterclockwise if (rotateCounterclockwise == true) zRot += ROTATION_SPEED * (elapsedTime / 1000.0); // Apply the camera rotation gl.glRotated(zRot, 0, 0, 1); } COM: <s> rotates the camera either clockwise or counterclockwise </s>
funcom_train/48266837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(TCPClientAbstract theTcpClient) { if (_myTcpPacketListener != null && !_myTcpPacketListener.equals(this)) { _myTcpPacketListener.remove(theTcpClient); } theTcpClient.dispose(); _myTCPClients.removeElement(theTcpClient); SNetwork.printProcess("TCPServer", "removing TCPClient."); } COM: <s> remove a tcp client from the servers client list </s>
funcom_train/9536922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBooleanRef() { if ((this.getvt() & VariantTypeMask) == VariantBoolean && (this.getvt() & VariantByref) == VariantByref) { return getVariantBooleanRef(); } else { throw new IllegalStateException( "getBooleanRef() only legal on byRef Variants of type VariantBoolean, not " + this.getvt()); } } COM: <s> public cover for native method </s>
funcom_train/36082129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean index(O o, String name, String tags, String description, float strength) { try { IndexWriter w = new IndexWriter(dir, analyzer, IndexWriter.MaxFieldLength.UNLIMITED); w.addDocument(newDocument(o, name, tags, description, strength)); w.commit(); w.close(); } catch (CorruptIndexException e) { logger.error(e); return false; } catch (LockObtainFailedException e) { logger.error(e); return false; } catch (IOException e) { logger.error(e); return false; } return true; } COM: <s> name title tags keywords separated by commas </s>
funcom_train/8491489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToolBar getToolBar() { if (toolBar == null) { toolBar = new JToolBar(); toolBar.setFloatable(false); toolBar.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); toolBar.setPreferredSize(new Dimension(101, 33)); toolBar.add(getResetLeftPanel()); toolBar.add(getPlayButtonMenu()); toolBar.add(getLoadButtonMenu()); toolBar.add(getSaveButtonMenu()); // toolBar.add(getAddNewCoreMenu()); } return toolBar; } COM: <s> this method initializes tool bar </s>
funcom_train/37651070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getImage(String key, String iconPath) { ImageRegistry registry = getImageRegistry(); Image image = registry.get(key); if (image == null) { ImageDescriptor descriptor = getImageDescriptor(iconPath); if (descriptor != null) { registry.put(key, descriptor); image = registry.get(key); } } return image; } COM: <s> get an image corresponding to the severity </s>
funcom_train/48704052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEntry(final int index, final FileListEntry entry) { synchronized (list) { list.add(index, entry); if (!SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(new Runnable() { public void run() { fireTableRowsInserted(index, index); } }); } else fireTableRowsInserted(index, index); } } COM: <s> add an entry to the table model and fire a change event </s>
funcom_train/7508528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetAccountName() throws AuthenticationException { System.out.println("setAccountName"); DefaultUser user = createTestUser("setAccountName"); String accountName = ESAPI.randomizer().getRandomString(7, DefaultEncoder.CHAR_ALPHANUMERICS); user.setAccountName(accountName); assertEquals(accountName.toLowerCase(), user.getAccountName()); assertFalse("ridiculous".equals(user.getAccountName())); } COM: <s> test of set account name method of class org </s>
funcom_train/50569508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ByteCodesPanel getByteCodesPanel() { ByteCodesEditorSupport bes = (ByteCodesEditorSupport) cloneableEditorSupport(); ByteCodesDocument doc = (ByteCodesDocument) bes.getDocument(); if (doc == null) { // In this unlikely case, just return a new instance to // avoid a null pointer exception. return new ByteCodesPanel(); } return doc.getByteCodesPanel(); } COM: <s> retrieve the byte codes display panel </s>
funcom_train/3596304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applyResourcesString(String resource_descriptions) { if (resource_descriptions==null) { return; } String [] ress = resource_descriptions.split(","); for (int j=0; j<ress.length; j++) { try { forceResourceLoad(ress[j]); } catch (Exception ex) { Debug.print("Failed to force resource load " + ress[j] + "! Ignored.", Debug.ERROR); } } } COM: <s> we have a string passed as a property nxt resources try to </s>