__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/49319599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveAs(String filename) { if (_resultComponent instanceof Saveable) { try { ((Saveable) _resultComponent).saveAs(filename); } catch (Exception e) { DialogUtil.error(e); } } else { DialogUtil.error(_I18N.getString("saveNotSupportedForObjType")); } } COM: <s> save the current query result to the selected file </s>
funcom_train/37518384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkingComplete() { checkLocalVarUsage(); // pass reachability information and definite assignment // information for non-local declarations to the surrounding // context if (cachedParent != null) { //@ assert nestedFlowControlContext; cachedParent.replaceVariableInfoUpTo(parentIndex, variableInfo); cachedParent.setReachable(isReachable); } // pass definite assignment information for fields to the // surrounding context parent.replaceFieldInfoUpTo(fieldCount(), fieldInfo); } COM: <s> p registers that this context is no longer needed </s>
funcom_train/14463306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toCompatibleString() { if (_methodToString != null) { try { return (String) _methodToString.invoke(this, (Object[]) null); } catch (Exception e) { Logger.logWarn("Error in calling CompatibleBigDecimal.toString"); } } return null; } COM: <s> compatible to string functionality </s>
funcom_train/22571324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkCycles(IShapeModel source, IShapeModel target) { for(IConnectionModel connection : source.getTargetConnections()) { if(connection.getSource().equals(target)) { return true; } if(checkCycles(connection.getSource(), target)) { return true; } } return false; } COM: <s> this is checking for cycles </s>
funcom_train/40621109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void becomeCollapsed() { cancelAllTimers(); // Now hide. if (isAttached()) { adjustmentsForCollapsedState(); hiding(); } else { // onLoad will ensure this is correctly displayed. Here we just ensure // that the panel is the correct final hidden state. Forcing the state to // is hidden regardless of what is was. state = State.IS_HIDDEN; } } COM: <s> display this panel in its collapsed state </s>
funcom_train/33481310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void layout() { addButton(playButton); addButton(pauseButton); addButton(stopButton); addButton(replayButton); addButton(ratioButton); addSeparator(); addButton(speedButton); addText("s"); addSpacer(); addSpacer(); addSpacer(); addItem(new ToolbarItem(countDownLabel.getElement())); addSeparator(); addButton(followButton); addFill(); addButton(maxButton); setTrackedViewMode(TrackedViewMode.MULTI_TRACK); preProgressStatus = curProgressStatus = ProgressStatus.PLAY; } COM: <s> layout the toolbar </s>
funcom_train/4760939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void halfInterval() { Interval<C> v = ring.engine.halfInterval(ring.root, ring.algebraic.modul); //System.out.println("old v = " + ring.root + ", new v = " + v); ring.setRoot(v); } COM: <s> real algebraic number half interval </s>
funcom_train/41787469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnvironment(Environment env) { m_env = env; try { // causes setSource(File) to be called and // forces the input stream to be reset with a new file // that has environment variables resolved with those // in the new Environment object reset(); } catch (IOException ex) { // we won't complain about it here... } } COM: <s> set the environment variables to use </s>
funcom_train/21515216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IFiniteStateMachineBuilder newBuilder() throws Exception { String builderClassStr = System.getProperty("org.ofsm.machinebuilder"); if(builderClassStr == null) { return new FiniteStateMachineBuilder(); } else { Class<IFiniteStateMachineBuilder> builderClass = (Class<IFiniteStateMachineBuilder>)Class.forName(builderClassStr); return builderClass.newInstance(); } } COM: <s> create new machine builder object </s>
funcom_train/46916341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteAllCourses(Session hibSession) { for (Iterator i = getCourseOfferings().iterator(); i.hasNext(); ) { CourseOffering co = (CourseOffering) i.next(); Event.deleteFromEvents(hibSession, co); Exam.deleteFromExams(hibSession, co); hibSession.delete(co); } } COM: <s> delete all course offerings in the instructional offering </s>
funcom_train/51120094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface ReadOnlyStatusChangeNotifier { /** Registers a new read-only status change listener for this * Property. * * @param listener the new Listener to be registered */ public void addListener(Property.ReadOnlyStatusChangeListener listener); /** Remove a previously registered read-only status change listener. * * @param listener listener to be removed */ public void removeListener( Property.ReadOnlyStatusChangeListener listener); } COM: <s> the interface for adding and removing </s>
funcom_train/27664468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPatientBirthDate(String d_str) { final String fn = "setPatientBirthDate: "; DateFormat df = new SimpleDateFormat("yyyyMMdd"); try { setPatientBirthDate(df.parse(d_str)); } catch (ParseException e) { log.error(fn + "Bad date format - '" + d_str + "'"); e.printStackTrace(); } } COM: <s> sets the patient birth date from a string </s>
funcom_train/9674639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canPerformDelete(IResource[] resources) { if (resources == null || resources.length == 0) return false; //only delete: // all resources are projects // no projects with other types int type = getResourcesType(resources); if ((type != IResource.PROJECT) || ((type & IResource.PROJECT) == 0)){ return false; } // no phatom resources allowed for (IResource r : resources) if (r.isPhantom()) return false; return true; } COM: <s> checks wether the given selection can be deleted </s>
funcom_train/50219809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ColorUIResource parseColor(String s) { int red = 0; int green = 0; int blue = 0; try { StringTokenizer st = new StringTokenizer(s, ","); red = Integer.parseInt(st.nextToken()); green = Integer.parseInt(st.nextToken()); blue = Integer.parseInt(st.nextToken()); } catch (Exception e) { System.out.println(e); System.out.println("Couldn't parse color :" + s); } return new ColorUIResource(red, blue, green); } COM: <s> parse a comma delimited list of 3 strings into a color </s>
funcom_train/15608848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public OID generateOIDInNameSpace (String nameSpace) { // if (!uniqueNumberGenerators.containsKey(nameSpace)) // uniqueNumberGenerators.put(nameSpace, new UniqueNumberGenerator()); // UniqueNumberGenerator numGen=(UniqueNumberGenerator)uniqueNumberGenerators.get(nameSpace); // String nextValue=numGen.getNextValueAsString(); // postOIDGenerated(nameSpace); // return new OID(nameSpace,nextValue); // } COM: <s> removed null genome version id causes significant problems </s>
funcom_train/6493107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkEndGame(final boolean isBlk) { boolean isEnd = false; MyListEnumerator piecesEnu = null; // get opponent piece for counting if (isBlk) { piecesEnu = new MyListEnumerator(whPieces); } else { piecesEnu = new MyListEnumerator(bkPieces); } // if any other piece is not a king then there are more than 1 piece int i = 0; while (piecesEnu.hasMoreElements()) { i++; piecesEnu.nextElement(); } if (i == 1) { isEnd = true; } return isEnd; } COM: <s> check to see if opponent has only a king left </s>
funcom_train/4878449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateGraphics(final Graphics2D graphics, final Rectangle bounds) { assert graphics != null : "graphics is null"; assert bounds != null : "bounds is null"; graphics.setColor(getColor()); graphics.fillRect(bounds.x, bounds.y, bounds.width, bounds.height); getSplashScreen().update(); } COM: <s> updates the whole graphics of this component by redrawing it on the </s>
funcom_train/34526467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateComboBox() { try { Collection<DataSourceConfiguration> configurations = studioContext.getDataConfigurationMgr().getDataSourceConfigurations("ds.salesforce"); dataSourcesCmb.removeAll(); for (DataSourceConfiguration configuration : configurations) { String name = configuration.getName(); dataSourcesCmb.addItem(name); } } catch(Exception ex) { String msg = ex.getMessage(); if (msg == null) { msg = "Unable to initialize the dialog."; } DialogMgr.showError(this, msg); } } COM: <s> populates the combobox with the available salesforce data source names </s>
funcom_train/49756583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UPBDeviceI getDeviceAt(int deviceIndex) { synchronized(networkDevices) { if ((deviceIndex < 0) || (deviceIndex >= actualDeviceCount)) return null; int deviceCount = 0; for (UPBDeviceI theDevice: networkDevices) { if (theDevice == null) continue; if (deviceCount == deviceIndex) return theDevice; deviceCount++; } return null; } } COM: <s> given an index between 0 and the device count 1 return the device </s>
funcom_train/23833402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadFresnelConfig(String language) throws Exception { RepositoryConnection configConn = confRepository.getConnection(); configConn.remove((Resource)null, null, null); configConn.commit(); configConn.close(); HashMap<String,String> parameters = new HashMap<String,String>(); parameters.put("lang", language); File fresnelDir = new File(dataRoot + "/" + fresnelDirectory); for (File f : fresnelDir.listFiles(new RDFFilenameFilter())) { loadTriples(confRepository, f, parameters); } } COM: <s> loads fresnel configuration substituting the lang </s>
funcom_train/32061484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendOnMission(Mission newmission, Game game) { argcheckNull(newmission, "newmission"); if (!(newmission.isExecutableOn(this, game))) throwIAE("Can't send taskforce on mission. Mission is " + "not executable on this taskforce."); mission = newmission; owner.infodb.trackTaskforceMission(this); } COM: <s> gives this taskforce a mission to go on </s>
funcom_train/29915116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFullname(ResultSet rs) throws UserDataSourceException, SQLException { if(getSetting(NAMECOLUMNS).equals(NAMECOLUMNS_FULLNAME)){ return removeNullFromResult(rs,3); } if(getSetting(NAMECOLUMNS).equals(NAMECOLUMNS_FIRSTANDSURNAME)){ return removeNullFromResult(rs,3) + " " + removeNullFromResult(rs,4); } if(getSetting(NAMECOLUMNS).equals(NAMECOLUMNS_FIRSTMIDDLEANDSURNAME)){ return removeNullFromResult(rs,3) + " " + removeNullFromResult(rs,4) + " " + removeNullFromResult(rs,5); } return null; } COM: <s> returns the full name from the result set depending </s>
funcom_train/38287529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DOMIntervalSet computeGlobalSelection() { updateLocalSelection(); // shift pressed or shift + ctrl pressed if (getCurrentInput().isShiftKeyDown()) { // simple interval return this.localSelection; } // keys are illegaly pressed, don't change viewer's selection return getXMLGraphicalViewer().getDOMSelection(); } COM: <s> computes actual selection made by keyboard arrows to set to viewer </s>
funcom_train/2993029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void highlightObject(VisualObject vo) { // Turn off any highlighting that currently exists this.initHighlight(); // Draw a highlighter around this object this.setHighlighter(new VisualObject(vo.getShape().getBounds2D(), redBrushThick, null)); // Move to the correct place highlighter.setTransform(vo.getTransform()); // Display on map this.addObject(highlighter); } COM: <s> call to turn on highlighting set object selected </s>
funcom_train/10237822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextFieldDBname() { if (jTextFieldDBname == null) { jTextFieldDBname = new JTextField(); jTextFieldDBname.setBounds(new Rectangle(195, 69, 167, 23)); jTextFieldDBname.setHorizontalAlignment(JTextField.CENTER); } return jTextFieldDBname; } COM: <s> this method initializes j text field dbname </s>
funcom_train/51451937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextField() { if (jTextField == null) { jTextField = new JTextField(); jTextField.getDocument().addDocumentListener(new javax.swing.event.DocumentListener() { public void changedUpdate(DocumentEvent e) { } public void insertUpdate(DocumentEvent e) { updateAddButton(); } public void removeUpdate(DocumentEvent e) { updateAddButton(); } }); } return jTextField; } COM: <s> this method initializes j text field </s>
funcom_train/46703916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modifyComponentAttributes() { getComponent(Person.FIRSTNAME).setStyle("width", "100px"); getComponent(Person.SURNAME).setStyle("width", "100px"); getComponent(Person.CASH).setStyle("color", "red"); } COM: <s> how to set some attributes </s>
funcom_train/38553151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTheObvious() { AllPassFilter filter = new AllPassFilter(); assertTrue(filter.allowDebug()); assertTrue(filter.allowInfo()); assertTrue(filter.allowWarning()); assertTrue(filter.allowError()); assertTrue(filter.allowFatal()); assertTrue(filter.allowNetTrace()); } COM: <s> test that everything gets set to true in the all pass filter </s>
funcom_train/17606729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void signalProcessInstance(final long processInstanceId) { this.jbpmTemplate.execute(new JbpmCallback() { public Object doInJbpm(JbpmContext context) { GraphSession graphSession = context.getGraphSession(); ProcessInstance processInstance = graphSession .getProcessInstance(processInstanceId); processInstance.signal(); context.save(processInstance); return null; } }); } COM: <s> instructs the main path of execution to continue by taking the default </s>
funcom_train/32316206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSourcePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DataPropertyAssoziation_source_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DataPropertyAssoziation_source_feature", "_UI_DataPropertyAssoziation_type"), OdmPackage.Literals.DATA_PROPERTY_ASSOZIATION__SOURCE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the source feature </s>
funcom_train/23948764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resetMembers() { // This method should operate on the object that is supposed to replace this set of properties. mEntityCode.delete(0, mEntityCode.length()); setName(new StringBuilder() ); setDesc(new StringBuilder() ); setType(new StringBuilder() ); setGender(new StringBuilder() ); setCountryType(new StringBuilder() ); getDob().clear(); getIdDocument().clear(); getPobCountry().clear(); getAddressCountry().clear(); getCitizenshipCountry().clear(); getListAKAs().clear(); setRecordAction(null); getEntity_sources().clear(); } COM: <s> reset the class fields associated with one record </s>
funcom_train/43111828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConvertPref2Xls() throws Exception { String inFile = ClassLoader.getSystemResource("xml/simple.xml") .getFile(); ConversionManager cm = new ConversionManager(); String outFile = "./tmp/xml_smoke.xls"; FileUtil.delete(outFile); new File("./tmp").mkdirs(); cm.convert(inFile, outFile); assertTrue(new File(outFile).exists()); assertTrue(new File(outFile).length() > 0); } COM: <s> smoke test to see if excel file will be generated from preference file </s>
funcom_train/3907172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element ensureChildElement(Element parentElement, String elementName) { if(parentElement != null) { Element child = parentElement.getChild(elementName, parentElement.getNamespace()); if(child == null) { addChildElement(parentElement, elementName); } else { return child; } } return null; } COM: <s> ensure that the given element has a given default child element </s>
funcom_train/35848394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveReceiver() throws Exception { Object role = Model.getCollaborationsFactory().createClassifierRole(); Model.getCommonBehaviorHelper().setReceiver(elem, role); Model.getCommonBehaviorHelper().setReceiver(elem, null); ThreadHelper.synchronize(); assertEquals(0, model.getSize()); assertTrue(model.isEmpty()); } COM: <s> test set receiver with null argument </s>
funcom_train/48495433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findX(double x) { x -= xMin; x *= invXStep; // TODO: torus int xx = (int) Math.floor(x); // while (xx<0)xx+=xSize; // while (xx>=xSize) xx-= xSize; if (xx < 0) xx = 0; else if (xx >= xSize) xx = xSize - 1; return xx; } COM: <s> returns the grid x coordinate corresponding to the space x coordinate </s>
funcom_train/21954147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnabled(boolean newValue) { for (int i = 0; i < searchTerms.size(); i++) { SearchEntryPair currentPair = (SearchEntryPair) searchTerms.elementAt(i); currentPair.form.setEnabled(newValue); currentPair.connector.getCombo().setEnabled(newValue); } buttonOne.setEnabled(newValue); buttonTwo.setEnabled(newValue); } COM: <s> sets whether or not this panel is enabled </s>
funcom_train/28339690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Interval computeHull(Interval I) { double dblMin = Math.min(this.getMinEndPt(), I.getMinEndPt()); double dblMax = Math.max(this.getMaxEndPt(), I.getMaxEndPt()); return new Interval(dblMin, dblMax); } COM: <s> compute and return the smallest interval containing both this interval </s>
funcom_train/38290722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assignFrom(final ExportContext other) { this.documentDir = other.documentDir; this.documentExtension = other.documentExtension; this.documentName = other.documentName; this.documentURL = other.documentURL; this.isRoot = other.isRoot; this.parentNamespace = other.parentNamespace; this.processingSource = other.processingSource; this.resultDir = other.resultDir; this.resultExtension = other.resultExtension; this.resultName = other.resultName; this.resultURL = other.resultURL; } COM: <s> assigns all data from given context </s>
funcom_train/51704591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logEx(Level level, Throwable e, String keyOrMessage, Object[] arguments){ if (logger.isLoggable(level)){ try { logger.log(level, MessageFormat.format( rb.getString(keyOrMessage), arguments), e); } catch (MissingResourceException mre) { logger.log(level, MessageFormat.format( keyOrMessage, arguments), e); logger.log(Level.FINEST, mre.getLocalizedMessage()); } } } COM: <s> logs a a message with an array of arguments and a </s>
funcom_train/43099598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int compareUserObjects(Object obj, Object obj1) { if ((obj instanceof Diagram || Model.getFacade().isABase(obj)) && (obj1 instanceof Diagram || Model.getFacade().isABase(obj1))) { String name = getName(obj); String name1 = getName(obj1); int ret = name.compareTo(name1); return ret; } return 0; } COM: <s> alphabetic ordering of user object names instead of type names </s>
funcom_train/26327010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add_marker(JComponent marker) {Dimension dim = scrol_panel.getPreferredSize(); Dimension dim_ent = marker.getPreferredSize(); if (items.size() == 0) scrol_panel.setPreferredSize( new Dimension(dim_ent.width, dim_ent.height +8 ) ); else scrol_panel.setPreferredSize( new Dimension(dim_ent.width, dim.height + dim_ent.height) ); scrol_panel.add(marker); } COM: <s> adds any component descending from jcomponent as </s>
funcom_train/2711305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void singleTag(String namespaceURI, String localName, String qName, Attributes atts, String text, ContentHandler handler) throws SAXException { handler.startElement(namespaceURI, localName, qName, atts); handler.characters(text.toCharArray(), 0, text.length()); handler.endElement(namespaceURI, localName, qName); } COM: <s> flattens out a single tag with starting tag and attributes </s>
funcom_train/45252834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ViewLayoutRec getViewLayoutRec(IViewReference ref, boolean create) { ViewLayoutRec result = getViewLayoutRec(ViewFactory.getKey(ref), create); if (result == null && create==false) { result = getViewLayoutRec(ref.getId(), false); } return result; } COM: <s> returns the view layout rec for the given view reference </s>
funcom_train/23410431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOwlsProcessPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ActionGrounding_owlsProcess_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ActionGrounding_owlsProcess_feature", "_UI_ActionGrounding_type"), TasksPackage.Literals.ACTION_GROUNDING__OWLS_PROCESS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the owls process feature </s>
funcom_train/13719898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addComic(final Comic comic) { SwingUtilities.invokeLater(new Runnable() { public void run() { logger.debug("Adding comic " + comic.getName() + " to Comicbook."); // Add the comic to the book comics.put(comic.getName(), comic); // Notify every listener for the creation of a new comic. setChanged(); notifyObservers(comics); } }); } COM: <s> adds a comic to the currently known comics </s>
funcom_train/29845209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValidMatchFor(String ec_number) { if (!quadNumber.isValidQuadNumber()) return false; try { QuadNumber testNumber = new QuadNumber(ec_number); if (!testNumber.isValidQuadNumber()) return false; else { return testNumber.isValidMatchFor(quadNumber); } } catch (StringIndexOutOfBoundsException e) { // ec_number is not a valid quadnumber return false; } } COM: <s> if a entry is the same as the given true is returned </s>
funcom_train/40951485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setContainerHeight() { if (height != null && !"".equals(height)) { int contentH = getOffsetHeight() - tHead.getOffsetHeight(); contentH -= getContentAreaBorderHeight(); if (contentH < 0) { contentH = 0; } bodyContainer.setHeight(contentH + "px"); } } COM: <s> ensures scrollable area is properly sized </s>
funcom_train/7639207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(FileDescriptor termFd, FileOutputStream termOut) { mTermOut = termOut; mTermFd = termFd; mTextSize = 10; mForeground = Term.WHITE; mBackground = Term.BLACK; updateText(); mTermIn = new FileInputStream(mTermFd); mReceiveBuffer = new byte[4 * 1024]; mByteQueue = new ByteQueue(4 * 1024); } COM: <s> call this to initialize the view </s>
funcom_train/7421965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calcImproperTerminatingMarkings() { if (improperTerminatingMarkings != null) return; improperTerminatingMarkings = new HashSet<Marking>(); for (Marking marking : rg.getMarkings()) { // if end marking have token and end marking doesn't have all tokens // of the net if (marking.getNumTokens(net.getFinalPlace()) > 0 && marking.getNumTokens(net.getFinalPlace()) != marking.getNumTokens()) { improperTerminatingMarkings.add(marking); } } } COM: <s> calculates markings which have token in end state and in other states </s>
funcom_train/43467173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testString() { assertEquals("String [value=char[] [{H,e,l,l,o, ,W,o,r,l,d,!}], " + "offset=0, count=12, hash=0]", ToStringFacade .toString("Hello World!")); } COM: <s> tests support for strings </s>
funcom_train/43876501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServiceContext getServiceContext() { ServiceContext serviceContext = new ServiceContext(); serviceContext.setCompanyId(getCompanyId()); serviceContext.setAddGuestPermissions(true); serviceContext.setCreateDate(new Date()); serviceContext.setScopeGroupId(getGroupId()); serviceContext.setUserId(getUserId()); return serviceContext; } COM: <s> service context holds current request parameters user id company id </s>
funcom_train/12906396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTerminal() throws ConflictException, ParseException { Expr expr = Parser.parse("a<b"); BindingSet set = descender.descendTerminal((ExprBooleanTerminal) expr, Boolean.TRUE, new BindingSet()); assertEquals(set.size(), 1); assertTrue(set.eval(expr).isTrue()); } COM: <s> michael kinoti and atul chouhan </s>
funcom_train/29718767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void copy(final TaskDefinition _taskDefinition) { super.copy(_taskDefinition); this.steps.addAll(_taskDefinition.getSteps()); this.taskDescriptors.addAll(_taskDefinition.getTaskDescriptors()); this.guidances.addAll(_taskDefinition.getGuidances()); this.alternatives = _taskDefinition.getAlternatives(); this.purpose = _taskDefinition.getPurpose(); } COM: <s> copy the values of the specified task definition into the current instance </s>
funcom_train/36635854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(ObjectOutputStream out) throws IOException { //Write the class of this treeable out.writeObject(this.getClass().getName()); //Write this treeables name out.writeObject(name); //Write that nodes data saveData(out); //Write the children if(children != null ) { out.writeInt(children.size()); for (Iterator iter = children.iterator(); iter.hasNext();) { SceneNode currChild = (SceneNode) iter.next(); currChild.save(out); } } else { out.writeInt(0); } } COM: <s> writes the treeable out to the data stream </s>
funcom_train/34849190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testShortFlag() { Switch mySwitch = new Switch("mySwitch"); mySwitch.setShortFlag('c'); assertEquals('c', mySwitch.getShortFlag()); assertEquals(new Character('c'), mySwitch.getShortFlagCharacter()); } COM: <s> tests the ability to set get the switchs short flag </s>
funcom_train/42269073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String clearDiv(String content) { //System.out.println("TinyMCEPanel clearDiv"); String newContent = content.replaceAll("^<div[^<]*>", ""); String newContent2 = newContent.replaceAll("</div>$", ""); return newContent2.replaceAll("<a href=\"/site/", "<a href=\"/"); } COM: <s> remove the div that includes the content after a displaying in the htmlpanel </s>
funcom_train/37586200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String _getQuoteType(String quote) { if (_cursor.atStart() || _cursor.atFirstItem()) return quote; else if (_cursor.prevItem().getType().equals("\\")) { _cursor.prev(); _cursor.remove(); return "\\" + quote; } else return quote; } COM: <s> helper function for insert new quote </s>
funcom_train/4461607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unlock() { if(DEBUG_LOCK) System.err.println(" [" + sequenceListLockCount + "] Unlocking sequence list: " + Thread.currentThread()); synchronized(sequenceListLock) { sequenceListLockCount--; if(sequenceListLockCount != 0) return; // unlock threadLockingUs = null; sequenceListLock.notifyAll(); } if(DEBUG_LOCK) System.err.println(" [" + sequenceListLockCount + "] Sequence list unlocked: " + Thread.currentThread()); } COM: <s> unlock sequence list </s>
funcom_train/37420962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mobileLeaving(int roomID, Mobile<? extends Character, ? extends Controller> m) { if (!mobiles.removeFromBucket(new Integer(roomID), m)) { logger.error("Tried to remove a mobile from empty room or is not in that room"); } } COM: <s> handles a mobile leaving a room </s>
funcom_train/38551964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isStored(DataPointCode dataPointCode) { Cube42NullParameterException.checkNull(dataPointCode, "dataPointCode", "isStored", this); if(this.cachedCodes.contains(dataPointCode)) { return true; } this.getAvailableDataPointCodes(); if(this.cachedCodes.contains(dataPointCode)) { return true; } return false; } COM: <s> method that checks to see if the specified data point is being stored </s>
funcom_train/2630279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTransform(final AffineTransform transform) { if (transform == null) { this.transform = null; } else { getTransformReference(true).setTransform(transform); } invalidatePaint(); invalidateFullBounds(); firePropertyChange(PROPERTY_CODE_TRANSFORM, PROPERTY_TRANSFORM, null, this.transform); } COM: <s> set the transform applied to this node </s>
funcom_train/2854263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeSet moveFrom (NodeSet otherSet) { if (otherSet == null) throw new NullPointerException("null copy set"); if (!otherSet.isEmpty()) { Iterator it = otherSet.iterator(); while (it.hasNext()) nodes.add((Node)it.next()); otherSet.clear(); } return this; } COM: <s> copy the nodes from another node set into this one then </s>
funcom_train/14355539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void lookupCustomerBO() throws FacadeException { if (customerBO == null) { try { CustomerBOLocalHome home = (CustomerBOLocalHome) ServiceLocator .getInstance().getLocalHome("webpresso/customerBOLocal"); customerBO = home.create(); } catch (ServiceLocatorException e) { handleException("lookup for CustomerBO failed", e); } catch (Exception e) { handleException("create for CustomerBO failed", e); } } } COM: <s> get a reference to customer business object and store in </s>
funcom_train/31040774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Map computePropertyDescriptorsFor(IPropertySource source) { IPropertyDescriptor[] descriptors = source.getPropertyDescriptors(); Map result = new HashMap(descriptors.length * 2 + 1); for (int i = 0; i < descriptors.length; i++) { result.put(descriptors[i].getId(), descriptors[i]); } return result; } /** COM: <s> returns an map of property descritptors keyed on id for the </s>
funcom_train/43913118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws IOException { if (closed) { return; } closed = true; out_buffer.close(); out_buffer = null; out_real = null; // get rid of our local pointer response = null; // get rid of our local pointer //if (out_real != null) // removed so the user has to close their stream // out_real.close(); } COM: <s> closes the stream </s>
funcom_train/7655865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read() throws IOException { // read the next byte int byteRead = in.read(); // update digest only if // - digest functionality is on // - eos has not been reached if (isOn && (byteRead != -1)) { digest.update((byte)byteRead); } // return byte read return byteRead; } COM: <s> reads the next byte and returns it as an </s>
funcom_train/936013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getFinalEFPanel() { if (finalEFPanel == null) { finalEFPanel = new JPanel(); java.awt.BorderLayout borderLayout51 = new BorderLayout(); finalEFPanel.setLayout(borderLayout51); borderLayout51.setVgap(4); finalEFPanel.add(getFinalEFLabel(), java.awt.BorderLayout.NORTH); finalEFPanel.add(getFinalEFScrollPane(), java.awt.BorderLayout.CENTER); } return finalEFPanel; } COM: <s> this method initializes j panel4 </s>
funcom_train/42718987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addType(String typeName,String toTypeName,boolean userCallable) { if(typeName==null) return false; OntologyNode child=new OntologyNode(typeName,userCallable); if(toTypeName!=null) { OntologyNode parent=this.getTypeNode(toTypeName); if(parent==null) { return false; } parent.addChild(child); } else this.types.add(child); return true; } COM: <s> add a type name to the type ontology </s>
funcom_train/42110855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putReplace(K key, V value) { Collection<V> resultantCollection = initialiseGetCollection(key); // If list, replace if (collectionType_ == LIST_COLLECTION) { List<V> listCollection = (List<V>) resultantCollection; if (resultantCollection.contains(value)) listCollection.set(listCollection.indexOf(value), value); else resultantCollection.add(value); } else if (collectionType_ == SORTED_SET_COLLECTION) { // If set, it'll replace anyway resultantCollection.add(value); } } COM: <s> explicitly replaces a value if it is equal to the value being added </s>
funcom_train/38415201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addProfile(ProfileConfig profile) { if (profiles==null || profiles.length==0) { profiles = new ProfileConfig[1]; profiles[0] = profile; } else { ProfileConfig[] myProfiles = new ProfileConfig[profiles.length+1]; System.arraycopy(profiles, 0, myProfiles, 0, profiles.length); myProfiles[profiles.length] = profile; profiles = myProfiles; } } COM: <s> add a new profile to the array b profiles b </s>
funcom_train/5897709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void renderProperties(ContentRenderer renderer) throws IOException { super.renderProperties(renderer); render(renderer, "type", _type.split(":")[0]); if (_chartStyle != null) render(renderer, "chartStyle", _chartStyle); render(renderer, "jsonModel", getJSONResponse(transferToJSONObject(getModel()))); if (!_type.equals("pie")) render(renderer, "jsonSeries", getJSONResponse(_seriesList)); } COM: <s> render properties method will bind the attributes with flash chart </s>
funcom_train/21017642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IElement createVerticalLine(RenderingSystem renderingSystem) { RectElement result = (RectElement) FactoryRegistry.createElement( RectElement.TYPE, renderingSystem); result.setWidth(GRID_LINE_WIDTH); result.setHeight(CELL_HEIGHT); IColorFactory colorFactory = renderingSystem.getColorFactory(); result.setFillColor(colorFactory.createColor(0, 0, 0, 255)); result.setStrokeColor(colorFactory.createColor(0, 0, 0, 255)); return result; } COM: <s> creates a vertical line for the table grid </s>
funcom_train/20622525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveProperties() throws Exception { // In ApelConfig.saveProperties() always add "server_url" property into the config file, // we need to look into it if it is necessary. If not, we may take out it from ApelConfig. -- YX moduleConfig.saveProperties(); } COM: <s> save any property values previously stored using the </s>
funcom_train/31486597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerHashAlgorithm(int id, String jcename, String textname) { HashStrings.put(new Integer(id),jcename); if (textname != null) { HashTextNames.put(new Integer(id),textname); HashTextNamesReverse.put(textname,new Integer(id)); } } COM: <s> register a new hash algorithm </s>
funcom_train/9238040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean callChannelCTCP(final ChannelInfo cChannel, final ChannelClientInfo cChannelClient, final String sType, final String sMessage, final String sHost) { final CallbackOnChannelCTCP cb = (CallbackOnChannelCTCP)getCallbackManager().getCallbackType("OnChannelCTCP"); if (cb != null) { return cb.call(cChannel, cChannelClient, sType, sMessage, sHost); } return false; } COM: <s> callback to all objects implementing the channel ctcp callback </s>
funcom_train/8323805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkNosMeasures(int nosMeasures) { msgRecorder.pushContextName("Recognizer.checkNosMeasures"); try { if (nosMeasures == 0) { String msg = mres.NoMeasureColumns.str( aggTable.getName(), dbFactTable.getName() ); msgRecorder.reportError(msg); returnValue = false; } } finally { msgRecorder.popContextName(); } } COM: <s> make sure there was at least one measure column identified </s>
funcom_train/28658349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawString(String str, int col, int row, int aAttr) { ivCrtBuffer.drawString(str, col, row, aAttr); repaint(col * ivCrtBuffer.getCharSize().width, row * ivCrtBuffer.getCharSize().height, str.length() * ivCrtBuffer.getCharSize().width, ivCrtBuffer.getCharSize().height); } COM: <s> draws a string with the given attribute </s>
funcom_train/10595956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void informBranchPoint() { if (this.generator == null) { return; } if (!this.autoCachingPoint) { return; } this.nextIsCachePoint = true; if (this.getLogger().isDebugEnabled()) { this.getLogger().debug("Informed Pipeline of branch point"); } } COM: <s> determine if the given branch point </s>
funcom_train/28200079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(String[] original, String[] newversion) { ArrayList<Object> root = new ArrayList<Object>(); for (int i = 0; i < original.length; i++) { placeString(root, original[i], i); } this.root = compress(root); this.results = newversion; } COM: <s> data structure to needed to store the </s>
funcom_train/22718456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeForeignKeys(ArrayList foreignKeys) throws IOException { writeStartElement(FileOpener.XML_ELEMENT_FOREIGN_KEYS); for (Iterator i = foreignKeys.iterator(); i.hasNext(); ) { writeForeignKey((ForeignKey)i.next()); } writeEndElement(FileOpener.XML_ELEMENT_FOREIGN_KEYS); } COM: <s> write out all the foreign keys in xml format </s>
funcom_train/5908369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ListModel getSubModel(Object value, int nRows) { final LinkedList data = new LinkedList(); nRows = nRows < 0 ? _nRows : nRows; for (int i = 0, j = _model.getSize(); i < j; i++) { Object o = _model.getElementAt(i); if (_comparator.compare(value, o) == 0) { data.add(o); if (--nRows <= 0) break; // done } } return new ListModelList(data); } COM: <s> returns the subset of the list model data that matches the specified </s>
funcom_train/35081754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element toXML () { Element e = new Element ("currency") . addContent (new Element ("symbol").setText (getSymbol())) . addContent (new Element ("name").setText (getName())); e.setAttribute ("id", getId()); return e; } COM: <s> creates a jdom element as defined in </s>
funcom_train/31562065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MaverickString XTD(MaverickString result, ConstantString width) { result.clear(); String val = Long.valueOf(toString(), 16).toString(); while (width.intValue() - val.length() > result.length()) { result.append('0'); } result.append(val); return result; } COM: <s> converts a hexadecimal value to decimal notation </s>
funcom_train/50846543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetHoldability_HOLD_CURSORS_OVER_COMMIT() throws Exception { int holdability = ResultSet.HOLD_CURSORS_OVER_COMMIT; Connection conn = newConnection(); conn.setHoldability(holdability); int actualHoldability = conn.getHoldability(); SQLWarning warning = conn.getWarnings(); if (warning == null) { assertEquals("Holdability:", holdability, actualHoldability); } else { while(warning != null) { printWarning(warning); warning = warning.getNextWarning(); } } } COM: <s> test of set holdability method of interface java </s>
funcom_train/2587482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List createList(final int initialSize) { if (this.listType.equals("stack")) { return new Stack(); } if (this.listType.equals("linked-list")) { return new LinkedList(); } if (this.listType.equals("vector")) { return new Vector(initialSize); } return new ArrayList(initialSize); } COM: <s> creates a list </s>
funcom_train/5276195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receivedApplicationEvent(YApplicationEvent ev) { log4j.debug("receivedApplicationEvent " + ev.toString()); if (ev.getName() == UiConstants.PERSON_SELECTED) { log4j.debug("PERSON_SELECTED event received"); Person person = (Person) ev.getValue(); workoutTypeModel.setPerson(person); workoutTypeModel.refreshSelectedWorkoutTypes(); } } COM: <s> handling of person selected events </s>
funcom_train/15884473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doClose() throws ProtocolException { if (datagramSocket != null) { datagramSocket.close(); } if (datagramQueue != null) { // the queue can be nill since we didn't manage to // perform a successful accept, and some one else // closed us. datagramDispatcher.deregister(datagramQueue.getId()); datagramQueue.close(); } } COM: <s> closes the wrapped datagram socket </s>
funcom_train/31931843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openOutcomeViewer(String fileName) { try { new OutcomeViewer(fileName); } catch (BlitzException be) { error(null, "Can't open outcome viewer", be); JOptionPane.showMessageDialog(this, "Unable to open Outcome Viewer on file\n\"" + fileName + "\"", "Open Error", JOptionPane.ERROR_MESSAGE); } } COM: <s> open a viewer on the outcome file specified by code file name code </s>
funcom_train/4514673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void refresh() { if (panel != null) { setGrid(); panel.removeAll(); panel.setLayout(gridLayout); for (int i = 0; i < monthCalendar.length; i++) { if (monthCalendar[i] != null) { panel.add(monthCalendar[i]); if (gridWidth > 0 && gridHeight > 0) { monthCalendar[i].setPreferredSize(new Dimension( gridWidth, gridHeight)); } } } panel.updateUI();// Refresh all month calendars } } COM: <s> rearrange month calendars </s>
funcom_train/40320969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Player opposite(Player player){ Player opponent = Player.EMPTY; /* Set opponent color. */ if (player == Player.BLACK){ opponent = Player.WHITE; } else if (player == Player.WHITE){ opponent = Player.BLACK; } else {System.err.println("The player must have a color!");} return opponent; } COM: <s> returns the opposite of the color opponents color </s>
funcom_train/44656733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean replaceWith(Collection collection) { boolean changed = false; if (items.size() > 0) { items.clear(); changed = true; } if (items.addAll(0, collection) && !changed) { changed = true; } if (changed) { fireContentsChanged(-1, -1); } return changed; } COM: <s> replace this list models items with the contents of the provided </s>
funcom_train/48527451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeObject(Object o, String field) throws IOException { if (o == null) { writeNull(field); } else if (getReference(o) != null) { writeReference(o, field); } else { writeObjectUnshared(o, field, true); } } COM: <s> method which writes an object to the stream as the given field name </s>
funcom_train/42826796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isCursorMove(Event event){ if(movingPanelElement!=null){ int cursorY = DOM.eventGetClientY(event); int initialY = movingPanelElement.getAbsoluteTop(); int cursorX = DOM.eventGetClientX(event); int initialX = movingPanelElement.getAbsoluteLeft(); if(initialY <= cursorY && initialX <= cursorX) return true; else return false; }else return false; } COM: <s> is cursor in moving state </s>
funcom_train/25144927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected NamedValue searchByValue(String text) { List<NamedValue> namedValues = getValues(); if (namedValues == null) { return null; } // search by value for (NamedValue nv : namedValues) { if (nv.getValue() != null && nv.getValue().toString().equals(text)) { return nv; } } return null; } COM: <s> return the name of the </s>
funcom_train/10268315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getNodeWithId(String id, List nodeList) { String nodeId ; // find the node with this id for (int i=0;i<nodeList.size();i++) { Element eNode = (Element) nodeList.get(i) ; nodeId = eNode.getChildText("id") ; if ((id.compareTo(nodeId) == 0)) return eNode ; } return null ; } COM: <s> find the node with the id passed in the list of xml nodes </s>
funcom_train/50892486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStringFieldDoubleEncoding() throws Exception { String testValue = "Hello \\'Master\\', whassup"; StringField field = new StringField(testValue); String result = field.toMessageString(); String CORRECT = "T'Hello \\'Master\\', whassup'"; assertEquals("String must not have double escape chars.", CORRECT, result); } COM: <s> check if it works correct if an already escaped </s>
funcom_train/16450098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isOverClearButton ( Point p ) { return ( this.iconVisible && p.x >= this.buttonX && p.x <= this.buttonX + clearImage.getIconWidth () && p.y >= this.buttonY && p.y <= this.buttonY + clearImage.getIconHeight () ); } COM: <s> checks if is over clear button </s>
funcom_train/13994976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDelegate(ValueObjectModel newDelegate) { if (!newDelegate.equals(delegate)) { if (delegate != null) { delegate.removeModelListener(validationEventForwarder); delegate.removeValueObjectModelListener(modelEventForwarder); } delegate = newDelegate; properties.setFallback(delegate.getProperties()); newDelegate.addModelListener(validationEventForwarder); newDelegate.addValueObjectModelListener(modelEventForwarder); modelEventDelegate.fireEvent(); validationEventDelegate.fireEvent(); } } COM: <s> sets the delegate </s>
funcom_train/26345518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void abort() throws IOException { // gThread.ret = 0; cfg.setAbort(true); ipSync(); send("ABOR"); aborted = true; /* * panel.getFrame().getStatusArea().append("ABOR\n", "black"); aborted = * true; cbuf.clear(); cbuf.put("ABOR\r\n"); cbuf.flip(); * sc.write(encoder.encode(cbuf)); cbuf.clear(); * Utilities.print("ABOR\n"); */ // getReply(); } COM: <s> sends ip sync and abor </s>
funcom_train/44876104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRecursiveNotAllowedForFiles() { monitor = new FileChangeMonitor(500, 1); try { monitor.addSource(new File(baseDir, "one.txt"), true); fail("Recursive flag not allowed for files (only for directories)"); } catch (IllegalArgumentException e) { // expected } } COM: <s> negative test case that makes sure that a code true code </s>