__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/34760012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void terminate() { if (currentServer != null) { disconnect(); } println("Session ending"); printDelayCount(".", 500, 3); printDelay("halt complete", 2000); exitDelay(5000); printlnDelay("User session ended " + System.currentTimeMillis(), 2500); } COM: <s> quit the game by terminating the terminal session </s>
funcom_train/32040552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateMatchPersonsType_Enumeration(String matchPersonsType, DiagnosticChain diagnostics, Map context) { boolean result = MATCH_PERSONS_TYPE__ENUMERATION__VALUES.contains(matchPersonsType); if (!result && diagnostics != null) reportEnumerationViolation(ImsldPackage.eINSTANCE.getMatchPersonsType(), matchPersonsType, MATCH_PERSONS_TYPE__ENUMERATION__VALUES, diagnostics, context); return result; } COM: <s> validates the enumeration constraint of em match persons type em </s>
funcom_train/31192937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getLanguages() { // children() of rootnode is enum of RegLangSetNodes Vector rs = new Vector(); for(Enumeration e = getRoot().children(); e.hasMoreElements();) rs.add( ((RegLangSetNode) e.nextElement()).getRegLangSet() ); return rs; } COM: <s> returns a vector of all reg lang set objects present in this session </s>
funcom_train/11102092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAllowFlawedContext(Class c, String state) throws Exception { Class[] params = {String.class}; java.lang.reflect.Method m = c.getDeclaredMethod("setAllowFlawedContext", params); m.invoke(null, new Object[] {state}); } COM: <s> call the static set allow flawed context method on the specified class </s>
funcom_train/39062063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNextSchemaIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IMarkingRoot_nextSchemaId_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IMarkingRoot_nextSchemaId_feature", "_UI_IMarkingRoot_type"), MarkingPackage.eINSTANCE.getIMarkingRoot_NextSchemaId(), true, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the next schema id feature </s>
funcom_train/3832982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOpacity( double opacity ) { if ( opacity > 1 ) { opacity = 1; } else if ( opacity < 0 ) { opacity = 0; } CssParameter fillOp = StyleFactory.createCssParameter( "fill-opacity", "" + opacity ); cssParams.put( "fill-opacity", fillOp ); } COM: <s> sets the value of the opacitys css parameter opacity as a value </s>
funcom_train/44166891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Nation getVacantNation() { //System.out.println("NationOptions: " + nationOptions); for (Entry<Nation, NationState> entry : nationOptions.getNations().entrySet()) { if (entry.getValue() == NationState.AVAILABLE) { return entry.getKey(); } } return null; } COM: <s> returns a vacant nation </s>
funcom_train/4920439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddOfficeFloorInputManagedObjectTwice() { // Record issue in adding twice this.record_issue("Office floor input managed object INPUT already added"); // Add the input managed object twice this.replayMockObjects(); OfficeFloorInputManagedObject moFirst = this.node .addInputManagedObject("INPUT"); OfficeFloorInputManagedObject moSecond = this.node .addInputManagedObject("INPUT"); this.verifyMockObjects(); // Should be the same input managed object assertEquals("Should be same input managed object on adding twice", moFirst, moSecond); } COM: <s> ensures issue if adding the </s>
funcom_train/47998698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkMap(String mapName) throws SQLException { Connection con = getConnection(); Statement stmt = con.createStatement(); String sqlCommand = "SELECT Name FROM Map WHERE Name = '" + mapName + "'"; ResultSet rs = stmt.executeQuery(sqlCommand); if (rs.next() && rs.getString("Name").equals(mapName)) { stmt.close(); con.close(); return true; } stmt.close(); con.close(); return false; } COM: <s> checks if a map exist </s>
funcom_train/16578057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel5() { if (jPanel5 == null) { jPanel5 = new JPanel(); jPanel5.setLayout(null); jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder( null, PluginServices.getText(this, "seleccionar_srs"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); jPanel5.setBounds(5, 205, 485, 173); jPanel5.add(getJScrollPane2(), null); } return jPanel5; } COM: <s> this method initializes j panel5 </s>
funcom_train/21606260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void afterPropertiesSet() { this.systemPrefs = (this.systemTreePath != null) ? Preferences.systemRoot().node(this.systemTreePath) : Preferences.systemRoot(); this.userPrefs = (this.userTreePath != null) ? Preferences.userRoot().node(this.userTreePath) : Preferences.userRoot(); } COM: <s> this implementation eagerly fetches the preferences instances </s>
funcom_train/46161781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateVisualProperties() { VisualPropertyMessage newProperties = null; synchronized (visualProperties) { visualProperties.setScale(new ScaleConverter(visual.scale.getCopy(visual)).getScale()); visualProperties.setVisible(visual.isShowing.getValue().booleanValue()); newProperties = new VisualPropertyMessage(visualProperties); } fireNodeUpdated(newProperties); } COM: <s> update the properties for this models visual based on the current state </s>
funcom_train/15680212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateSpinner() { if( spinner != null && !spinner.isDisposed() ) { spinner.setMinimum( getMinimum() ); spinner.setMaximum( getMaximum() ); spinner.setIncrement( getIncrement() ); spinner.setPageIncrement( getPageIncrement() ); } } COM: <s> update the spinner particulars with set values </s>
funcom_train/24152956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetMonth() { System.out.println("setMonth"); CalendarPanel calendar = new CalendarPanel(); DefaultCalendarModel model = new DefaultCalendarModel(); model.setSelectedMonth(9); calendar.setModel(model); calendar.setMonth(10); int res = model.getSelectedMonth(); assertEquals("Wrong month: ", 10, res); assertFalse("Wrong munth: ", 9 == res); } COM: <s> test of set month method of class com </s>
funcom_train/46590881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Scenario buildScenario(String scenarioXmlFile) throws Exception { // obtain the scenario stream InputStream stream = dataRepository.getStream(ResourcePackage.SCENARIO, scenarioXmlFile, ResourceType.XML); // un-marshal the scenario object Scenario scenario = xmlManager.unmarshal(stream); //run all the Managers on the Scenario object List<Player> players = scenario.getPlayers(); MapSetupController controller = mapSetUpControllerFactory.getMapSetUpController(players); controller.validateAndSetup(scenario.getGamemap()); return scenario; } COM: <s> loads a new scenario and returns the properly set up instance </s>
funcom_train/48588113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CalendarEventEntry createSingleEvent(String eventTitle, String eventContent, Person author, String domainName, String calendarId) throws ServiceException, IOException, Exception { return createEvent(eventTitle, eventContent, author, null, false, null, domainName, calendarId); } COM: <s> creates a single occurrence event </s>
funcom_train/15626018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canShow(@NotNull final GameObject<?, ?, ?> gameObject, @NotNull final NamedFilterConfig filterOutConfig) { reset(filterOutConfig); if (hasGlobalMatch(filterOutConfig)) { match(filterOutConfig, gameObject); return !reset(filterOutConfig); } return !match(filterOutConfig, gameObject); } COM: <s> returns whether this filter matches a </s>
funcom_train/39986899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToInputList(List<Bar> list) { if (list == null) { throw new NullPointerException("addToInputList(List<Bar>) cannot handle a null parameter!"); } else { if (inputList == null) { inputList = new ArrayList<Bar>(); } inputList.addAll(list); } } COM: <s> add some time period items to the input list </s>
funcom_train/10984077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTemplate(String template) { if ((template == null) || (template.length() == 0)) { throw new IllegalStateException("Template cannot be null or empty."); } if (template.equals(_template)) { return; } _template = template; _isParsed = false; _parsedTemplate = null; } COM: <s> reset the string form of the template </s>
funcom_train/48126308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validate(File file) { if (file.isDirectory()) return false; String patternFileName = taskInfo.getDeletedFileNameLike(); // check filename if (file.getName().matches(patternFileName)) { // check time long timeModified = file.lastModified(); long currentTime = System.currentTimeMillis(); long numberhrs = TimeUtil .getNumberHours(currentTime - timeModified); if (numberhrs >= taskInfo.getDeletedTime()) { return true; } } return false; } COM: <s> checking file match with task delete info condition </s>
funcom_train/18598229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Dbms dbms, String id, Element xml, String changeDate, boolean updateDateStamp, ServiceContext context) throws SQLException { updateDb(dbms, id, xml, changeDate, xml.getQualifiedName(), updateDateStamp); } COM: <s> updates an xml element into the database </s>
funcom_train/44441715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkMasterPassword(char[] p) throws IOException { if (context.getEncrypter() == null) { throw new IOException("Encrypter not available."); } return isEncrypted() ? context.getEncrypter().decryptString(pwmgr.getUserPassword(), p). equals(ENC) : false; } COM: <s> test if the password file can be decrypted given the master password </s>
funcom_train/46153856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateRuler() { if (cell != null && node != null) { if (cell instanceof RulerInfoHolder) { SceneWorker.addWorker(new RulerWorkCommit(node, cell.getCellID().toString(), (RulerInfoHolder) cell)); } } } COM: <s> update the rendering of the ruler cell after a change has been made </s>
funcom_train/50341068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIcon(String name, NamedIcon icon) { if (log.isDebugEnabled()) log.debug("\""+getName()+"\" setIcon \""+name+"\" icon= "+icon); _iconMap.put(name, icon); } COM: <s> place icon by its bean state name </s>
funcom_train/26272888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean firePrepareToCommitEvent() { List fireList = new ArrayList( resourceControllers.values() ); boolean retval = false; for ( int k=0; k<fireList.size(); ++k ) { IResourceController controller = (IResourceController)fireList.get(k); retval = controller.prepareToCommit( this ); if ( !retval) return false; } return true; } COM: <s> inquire all registered resource controllers if they </s>
funcom_train/3080833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnName(int column) { StringBuffer sb = new StringBuffer(); int value = column; do { int digit = value % 26; sb.insert(0, (char) ('A' + digit)); value = value / 26 - 1; } while (value >= 0); return sb.toString(); } COM: <s> returns the value found at the given coordinate within the table </s>
funcom_train/9436879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPersonal(String personal) { if (personal != null) { personal = REMOVE_OPTIONAL_DQUOTE.matcher(personal).replaceAll("$1"); personal = UNQUOTE.matcher(personal).replaceAll("$1"); personal = DecoderUtil.decodeEncodedWords(personal); if (personal.length() == 0) { personal = null; } } this.mPersonal = personal; } COM: <s> set name part from utf 16 string </s>
funcom_train/12868163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void unsetLocalVariables(Environment environment) { environment.unset(Environment.Variable.FILE_NAME.getName()); environment.unset(Environment.Variable.FILE.getName()); environment.unset(Environment.Variable.PACKAGE.getName()); environment.unset(Environment.Variable.FILE_FORMAT.getName()); environment.unset(Environment.Variable.TAB_SIZE.getName()); } COM: <s> unsets the local macro variables </s>
funcom_train/42259182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String edit() throws IOException { // if a user's id is passed in if (id != null) { // lookup the user using that id try { patient = _patientManager.getPatient(id); } catch (final PatientNotFoundException e) { addActionError(getText("errors.patient.notfound", id.toString())); } } else { patient = new Patient(); } return SUCCESS; } COM: <s> grab the patient from the database based on the id passed in </s>
funcom_train/12862643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void restartSequence() { String sequenceName = getSequenceName(); if (sequenceName == null) { return; } try { DbUnitDataSourceUtils.restartSequence(getConnection(), sequenceName); } catch (Exception e) { log.debug("Couldn't restart sequence: " + sequenceName); } } COM: <s> start the id sequence from a high value to avoid conflicts with test </s>
funcom_train/37598517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(Hashtable h) { Object o = h.get("main"); if (o == null) { fromMain = false; } else { try { Boolean b = (Boolean) o; fromMain = b.booleanValue(); } catch (Exception e) {} } o = h.get("properties"); if (o == null) { properties = null; } else { try { String s = (String) o; properties = (PropertyResourceBundle) ResourceBundle.getBundle(s); } catch (Exception e) { e.printStackTrace(); } } } COM: <s> instantiates the object with values from a hashtable </s>
funcom_train/18658110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void installConfiguration(String configName) { configurationHandler = new XMLFileHandler(configFile.getName()); try { org.jconfig.ConfigurationManager.getInstance().load(configurationHandler, configName); } catch (ConfigurationManagerException cme) { log.warning(cme.getMessage()); } config = org.jconfig.ConfigurationManager.getConfiguration(); propagateConfiguration(config); // add update of messages locale } COM: <s> install the configuration identified by code config name code </s>
funcom_train/12116772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PolygonMode getPolygonMode() { PolygonMode polygonMode = (PolygonMode) opengl.getStateMachine().get(GL.GL_POLYGON_MODE); if (polygonMode != null) { return polygonMode; } else { int i[] = new int[2]; opengl.getGl().glGetIntegerv(GL.GL_POLYGON_MODE, i, 0); PolygonMode currPolygonMode = new PolygonMode(i[0], i[1]); opengl.getStateMachine().set(GL.GL_POLYGON_MODE, currPolygonMode); return currPolygonMode; } } COM: <s> returns the current </s>
funcom_train/51337925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_shutdownNow() throws InterruptedException, ExecutionException { final NonBlockingLockManager<String> service = new NonBlockingLockManager<String>( 10/* maxConcurrency */, true/* predeclareLocks */, new MockExecutor(null/*delegate*/)); try { assertTrue(service.isOpen()); } finally { assertFalse(service.isShutdown()); service.shutdownNow(); assertTrue(service.isShutdown()); } } COM: <s> test startup and fast shutdown </s>
funcom_train/50533153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean _downStop(Event event) { // *** Get an exclusive lock try { stateLock.writeLock(); try { state = NULL_STATE; retransmitter.Stop(); reqTbl.clear(); upTbl.clear(); addr = null; // *** Revoke the exclusive lock } finally { stateLock.writeUnlock(); } } catch(RWLock.IntException ex) { Trace.println("TOTAL", Trace.ERROR, ex.getMessage()); } return(true); } COM: <s> handle a stop event travelling down the stack </s>
funcom_train/28984290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getAsymmetricNumberOfTests () { if (asymmetricNumberOfTests == null) {//GEN-END:|186-getter|0|186-preInit // write pre-init user code here asymmetricNumberOfTests = new TextField ("Number of tests to run:", "1", 2, TextField.NUMERIC);//GEN-LINE:|186-getter|1|186-postInit // write post-init user code here }//GEN-BEGIN:|186-getter|2| return asymmetricNumberOfTests; } COM: <s> returns an initiliazed instance of asymmetric number of tests component </s>
funcom_train/10927198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSession(BindingSession session) { this.session = session; Object userObj = session.get(SessionParameter.USER); user = userObj instanceof String ? userObj.toString() : null; Object passwordObj = session.get(SessionParameter.PASSWORD); password = passwordObj instanceof String ? passwordObj.toString() : null; } COM: <s> sets the current session </s>
funcom_train/26100555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getWeight( ){ int weight = object.getWeight()+position.getWeight(); for(LocalAssignment local : global.anwserList) { if(!local.equals(this)) { //tak dla pewności, by nie uwzględniać //siebie przy liczeniu wagi int temp = position.getDistance(local.getPosition()); temp *= object.getFlow(local.getObject()); weight += temp; } } return weight; } COM: <s> calculates weight of code this code local assignment </s>
funcom_train/4272678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void countryChanged(ValueChangeEvent event) { SelectItem[] cityItems = getCityItems(); if (cityItems == null) { selectedCities = new String[0]; } else { // Select the first city in the list, for that country selectedCities = new String[]{ cityItems[0].getValue().toString() }; } // reset effect valueChangeEffect.setFired(false); } COM: <s> value change listener for the country change event </s>
funcom_train/37619447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void clear(int bit) { if (bit < 0) { throw new IndexOutOfBoundsException(Integer.toString(bit)); } ensureCapacity(bit); if (bits1 == null) bits0 &= ~(1L << bit); // we know that bit <= 64 else bits1[subscript(bit)] &= ~(1L << (bit & MASK)); } COM: <s> clears a bit </s>
funcom_train/7453601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getMCC(final double threshold) { double tp = getTP(threshold); double tn = getTN(threshold); double fp = getFP(threshold); double fn = getFN(threshold); return (tp*tn-fp*fn) / Math.sqrt((tp+fp)*(tp+fn)*(tn+fp)*(tn+fn)); } COM: <s> matthews correlation coefficient mcc </s>
funcom_train/2786244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StringBuffer getXSLTBase() { StringBuffer result = new StringBuffer(XML_DECLARATION) .append(XMLUnit.getXSLTStart()); String tmp = result.toString(); int close = tmp.lastIndexOf('>'); if (close == -1) { close = tmp.length(); } result.insert(close, getNamespaceDeclarations()); return result; } COM: <s> what every xsl transform needs </s>
funcom_train/18111906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTownPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ContactDetails_Town_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ContactDetails_Town_feature", "_UI_ContactDetails_type"), BioDBPackage.Literals.CONTACT_DETAILS__TOWN, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the town feature </s>
funcom_train/40321908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setString(String parameter, String value){ if(getType().acceptParameter(parameter)){ this.parameters.put(parameter, value); } else { throw new IllegalArgumentException("Invalid parameter for '" + type.name() + "' message: was '" + parameter + "', expected in " + Arrays.toString(type.getParameters()) + "."); } } COM: <s> sets the message parameter as string </s>
funcom_train/12836541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void shuffle() { Stack newDeck = new Stack(); int randIndex; Random randSequence = new Random(); for(int i = this.deck.size() ; i > 0 ; i--){ randIndex = Math.abs(randSequence.nextInt() % i) ; newDeck.addElement (this.deck.elementAt(randIndex)); this.deck.removeElementAt (randIndex); } this.deck = newDeck; } COM: <s> shuffle the deck </s>
funcom_train/11655674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MonitorStats cloneMonitorStats() { return new MonitorStats(current.getHealth(), current.getLoad(), current.getCpuLoad(), current.getMemLoad(), current.getThreadLoad(), current.getHost(), current.getPort(), current.getProtocol(), current .getTimeStamp()); } COM: <s> a clone method to clone the stats </s>
funcom_train/4311629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object tryPlugIn(String className, String path) { Object o = IJ.runPlugIn(className, path); if (o instanceof ImagePlus) { // plugin extends ImagePlus class ImagePlus imp = (ImagePlus)o; if (imp.getWidth()==0) o = null; // invalid image else width = IMAGE_OPENED; // success } else { // plugin does not extend ImagePlus; assume success width = IMAGE_OPENED; } return o; } COM: <s> attempts to open the specified path with the given plugin </s>
funcom_train/44554512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Setting getSetting(String sSettingsKey) { for (Iterator iter = htGroups.values().iterator(); iter.hasNext(); ) { SettingsGroup group = (SettingsGroup) iter.next(); Setting setting = group.getSetting(sSettingsKey); if (setting != null) return setting; } return null; } COM: <s> retrieves a setting </s>
funcom_train/2583501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMsSegmentedTimeline() { // verify attributes set during object construction assertEquals(1, this.msTimeline.getSegmentSize()); assertEquals(0, this.msTimeline.getStartTime()); assertEquals(5, this.msTimeline.getSegmentsIncluded()); assertEquals(2, this.msTimeline.getSegmentsExcluded()); } COM: <s> tests that the new method that created the ms timeline segmented </s>
funcom_train/44183170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String doStripRegexMatch(String url, String pat) { Matcher matcher = TextUtils.getMatcher(pat, url); String retVal = (matcher != null && matcher.matches())? checkForNull(matcher.group(1)) + checkForNull(matcher.group(2)): url; TextUtils.recycleMatcher(matcher); return retVal; } COM: <s> run a regex that strips elements of a string </s>
funcom_train/11103066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User findUserByUsername(String username) { EntityManager em = entityManager(); User user = null; try { Query query = em.createNamedQuery(USERNAME_QUERY); query.setParameter("username", username); user = (User) query.getSingleResult(); return user; } catch (NoResultException e) { return null; } finally { em.close(); } } COM: <s> p return the code user code with the specified username if any </s>
funcom_train/41055308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(ASTclause node, Object data) throws Exception { int numChildren = node.jjtGetNumChildren(); Object result = null; //System.out.println("Got a clause with " + numChildren + " children"); for(int i=0; i< numChildren; i++) { //System.out.println(node.children[i].getClass()); result = node.children[i].jjtAccept(this, null); } return result; } COM: <s> a clause only evaluates its sub ast s </s>
funcom_train/36002760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Path getSourcePath(final File[] files, final String jarPath) { String sourcesPath = jarPath.replace(".jar", "-sources.jar"); for (File file : files) { String path = file.getAbsolutePath(); if (path.equals(sourcesPath)) { return new Path(path); } } return null; } COM: <s> retrieves corresponding source jar if any </s>
funcom_train/34557199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hideColumnHeader() { if (isRendered()) { Element el = getEl().child("div[class=x-grid3-header]"); Ext.fly(el).setStyle("display", "none"); } else { addListener("render", new Function() { public void execute() { hideColumnHeader(); } }); } } COM: <s> hides the column header of the grid </s>
funcom_train/8087930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParameterDefs(ArrayList<Attribute> paramDefs) throws Exception { m_parameterDefs = paramDefs; if (!m_func.legalNumParams(m_parameterDefs.size())) { throw new Exception("[BuiltInMath] illegal number of parameters for function: " + m_functionName); } } COM: <s> set the structure of the parameters that are expected as input by </s>
funcom_train/925479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkRequestAuthenticator(String sharedSecret, int packetLength, byte[] attributes) throws RadiusException { byte[] expectedAuthenticator = updateRequestAuthenticator(sharedSecret, packetLength, attributes); byte[] receivedAuth = getAuthenticator(); for (int i = 0; i < 16; i++) if (expectedAuthenticator[i] != receivedAuth[i]) throw new RadiusException("request authenticator invalid"); } COM: <s> checks the received request authenticator as specified by rfc 2866 </s>
funcom_train/8410952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void errorMessage(String msg) throws IOException { String str = msg + ", read " + m_br.toString(); if (m_Lines > 0) { int line = Integer.parseInt(str.replaceAll(".* line ", "")); str = str.replaceAll(" line .*", " line " + (m_Lines + line - 1)); } throw new IOException(str); } COM: <s> throws error message with line number and last token read </s>
funcom_train/14296792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ElementSet Attribute() { if (orderedAttributes == null) { orderedAttributes = super.Attribute().sort(new Comparator() { public int compare(Object o1, Object o2) { Cm3Attribute a1 = (Cm3Attribute) o1; Cm3Attribute a2 = (Cm3Attribute) o2; return a1.OrderAsInt() - a2.OrderAsInt(); } }); } return orderedAttributes; } COM: <s> returns an element set that contains the ordered attributes </s>
funcom_train/38312435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void translateAndRotate(int x, int y, int alpha) { if( alpha % 90 != 0 ) { throw new IllegalArgumentException( "BoardElement.rotate(): " +"only alpha dividable by 90 allowed."); } position = rotateInFactorySection( getPosition(), alpha ).translate(x, y); } COM: <s> translates rotates the local position direction of a board element when </s>
funcom_train/50488545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getKeys() { List l = new LinkedList(); Set readTables = new HashSet(); addKeys(l, defaultResourceTable); readTables.add(defaultResourceTable.toLowerCase()); for (Iterator i = tablesByPattern.keySet().iterator(); i.hasNext();) { String table = (String) i.next(); if (readTables.contains(table.toLowerCase())) continue; addKeys(l, table); } return new ListEnumeration(l); } COM: <s> connect to all the resource tables and finds out the available keys </s>
funcom_train/7766216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireSelectionChanged(final String queryID, final Widget sender, StringTree tree, final String type) { ArrayList<ISelectionListener> queryChangedList = new ArrayList<ISelectionListener>(this); for (ISelectionListener listener : queryChangedList) { listener.onSelectionChange(queryID, sender, tree, type); } } COM: <s> fires to all classes that implement query listener that the query has changed </s>
funcom_train/27768801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean remove(Object o) { CacheableEntry entry = (CacheableEntry)map.remove(o); if(entry != null){ entry.getPrevious().setNext(entry.getNext()); entry.getNext().setPrevious(entry.getPrevious()); entry.invalidate(); reaper.wakeup(); return true; } return false; } COM: <s> removes a single instance of the specified element from this </s>
funcom_train/26485641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnNames(String columns) { // Log the entry into the method. logger.debug("METHOD_ENTRY"); logger.debug("... with param: columns=" + columns); StringTokenizer st = new StringTokenizer(columns, ","); this.columns = new ArrayList(); while (st.hasMoreElements()) { this.columns.add(new Column(st.nextToken())); } } COM: <s> set the names of columns to be inserted into </s>
funcom_train/5721743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performSecurityConstraints(FacesContext facesContext) { String viewId = facesContext.getViewRoot().getViewId(); if (logger.isDebugEnabled()) { logger.debug("check security constraints of viewid "+viewId); } for (Page page: getPageStack(viewId)) { for (SecurityConstraint constraint: page.getSecurityConstraints()) { constraint.performConstraint(); } } } COM: <s> check if all security constraints are fulfilled </s>
funcom_train/32372248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Hunter isChased(Hunter hunter) { for(Player player : bot.getEnemyTeam().getAllPlayers()) { if(!player.isPilot() || player.getHunter() == null || player.getHunter().isDestroyed() || player.getCurrentTarget() != hunter) continue; if(canChase(player.getHunter(), hunter)) return player.getHunter(); } return null; } COM: <s> checks if the given </s>
funcom_train/15921603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TargetFactory targetFactory() { if (target_factory == null) { target_factory = new TargetFactory(getOptions().output_directory, getOptions().output_ext, getOptions().output_stdout, getOptions().reporter); } return target_factory; } COM: <s> get the target factory object for this extension </s>
funcom_train/4300788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void openFile() throws HsqlException { try { FileOutputStream fos = new FileOutputStream(outFile, true); outDescriptor = fos.getFD(); fileStreamOut = new BufferedOutputStream(fos, 2 << 12); } catch (IOException e) { throw Trace.error(Trace.FILE_IO_ERROR, Trace.Message_Pair, new Object[] { e.getMessage(), outFile }); } } COM: <s> file is opened in append mode although in current usage the file </s>
funcom_train/33882079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOrthogonal(Point a, Point b) { if (a.x == b.x) { if (a.y == b.y - 1 || a.y == b.y + 1) return true; } else if (a.y == b.y) { if (a.x == b.x - 1 || a.x == b.x + 1) return true; } return false; } COM: <s> best used if points are distance 1 away </s>
funcom_train/47675038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element buildXML(MsgElement root) { Element element = convertMsgToXmlElement(root); if (root.isLeaf()) { return element; } Enumeration children = root.children(); while (children.hasMoreElements()) { MsgElement child = (MsgElement) children.nextElement(); element.addContent(buildXML(child)); } return element; } COM: <s> build the xml file the </s>
funcom_train/3361578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CardTerminal getTerminal(String name) { if (name == null) { throw new NullPointerException(); } try { for (CardTerminal terminal : list()) { if (terminal.getName().equals(name)) { return terminal; } } return null; } catch (CardException e) { return null; } } COM: <s> returns the terminal with the specified name or null if no such </s>
funcom_train/41164739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(AgStatusExercises1 entity) { EntityManagerHelper.log("saving AgStatusExercises1 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 ag status exercises1 </s>
funcom_train/9679914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTestConstructor2() { cat.info("Testing NCLOC for Test second constructor"); final BinClass test = (BinClass) getType("Test"); assertEquals( "LOC", 1, NclocMetric.calculate(test.getDeclaredConstructors()[1])); cat.info("SUCCESS"); } COM: <s> tests ncloc for test second constructor </s>
funcom_train/3768151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateFileSuffix(String suffix) { File file = getSelectedFile(); if (file == null) return; String filename = file.getPath(); int lp = filename.lastIndexOf("."); if (lp == -1) return; filename = filename.substring(0,lp) + "." + suffix; setSelectedFile(new File(filename)); } COM: <s> updates the suffix of the currently selected file when user changes the </s>
funcom_train/7457579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ByteString consumeByteString() throws ParseException { List<ByteString> list = new ArrayList<ByteString>(); consumeByteString(list); while (currentToken.startsWith("'") || currentToken.startsWith("\"")) { consumeByteString(list); } return ByteString.copyFrom(list); } COM: <s> if the next token is a string consume it unescape it as a </s>
funcom_train/22126098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pushElement(String name) { // If this is the first element pushed... if (_elemStack.empty()) registerStdStreams(); // Create the new element and push it into the stack. _currElem = new Element(name); _elemStack.push(_currElem); // Set the out buffer so output is captured into the new element. _contentOut.buffer = _currElem.getContentBuffer(); } COM: <s> p creates an element with the specified name and pushes it onto the </s>
funcom_train/32776767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void removeAgent(SituatedAgent agent) { // if (this.agents.contains(agent)) { // this.agents.remove(agent); // // bei allen r�umlichen Gruppen dieses space elements als Mitglied // // austragen // for (int i = 0; i < this.attributeAreas.size(); i++) { // AttributeArea area = (AttributeArea) attributeAreas // .elementAt(i); // if (area.isSpatialGroup()) { // area.getGroup().leave(agent); // } // } // } // } COM: <s> removes the agent from this space elements list of agents </s>
funcom_train/37607139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void defaultRed() { itx = ccc.get().getIntrsCount(); for (int kkk = 0; kkk < itx; kkk++) ccc.get().useIntrs(kkk).setRedC(-1); bb8.setBackground(Color.lightGray); ermsg.setText(OMsg.KXP372); ermsg.setForeground(ccc.get().getColors(ccc.get().INFORMATION)); } // end defaultRed() COM: <s> set all red to 1 so default time is used </s>
funcom_train/47860895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void applyForeground(Component renderer, ComponentAdapter adapter) { Color color = adapter.isSelected() ? getSelectedForeground() : getForeground(); if (isLegacy() && color != null) { renderer.setForeground(color); } else { renderer.setForeground(blend(renderer.getForeground(), color)); } } COM: <s> applies a suitable foreground for the renderer component within the </s>
funcom_train/7619733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadUrl(String url) { mLoadInitFromJava = true; if (URLUtil.isJavaScriptUrl(url)) { // strip off the scheme and evaluate the string stringByEvaluatingJavaScriptFromString( url.substring("javascript:".length())); } else { nativeLoadUrl(url); } mLoadInitFromJava = false; } COM: <s> load a url from the network or the filesystem into the main frame </s>
funcom_train/32093182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setConfiguration(String[] strConfig) { if ( strConfig.length < 1 ) { System.err.println("[StreamSelector] Need at least one config parameter!"); return false; } m_streams = new short[strConfig.length]; for (int i = 0; i < strConfig.length; i++) { m_streams[i] = Short.parseShort(strConfig[i]); } return true; } COM: <s> defines all column ids which you want to select </s>
funcom_train/263802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JDive buildJDive(UddfFileDive uddfDive, UddfFileGasDefinitions gasDefinitions) throws UddfException { Dive udcfDive = this.buildUdcfDive(uddfDive, gasDefinitions); JDive jDive = new JDive(UddfDigesterConfigurator.DEFAULT_UNITS, udcfDive); return jDive; } COM: <s> builds a jdive from an uddf dive </s>
funcom_train/42358601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applySearch(INode<RMPerson> patternRootNode) { // remove all rows from model clean(); // inform gui about data and structural tablemodel changes fireTableStructureChanged(); fireTableDataChanged(); fireOperationStart(); // Execute server command in a new thread currentCommandWorker = new SearchCommandWorker(patternRootNode); // WORKAROUND: Since jdk_6u18 does not execute the worker! ExecutorService executor = Executors.newCachedThreadPool(); executor.execute(currentCommandWorker); // currentCommandWorker.execute(); } COM: <s> starts the search in the currently displayed region with the search </s>
funcom_train/19686037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void longToVector(){ seqnb = getInt(); DsmHist.removeAllElements(); int dim = getInt(); for(int i = 0; i < dim; i++){ Dsm hist = new Dsm(); long dstId = getLong(); hist.setDestId(dstId); long srcId = getLong(); hist.setSourceId(srcId); int msgId = getInt(); hist.setMessageId(msgId); DsmHist.insertElementAt(hist, i); } } COM: <s> this method takes the destination source and message id to create </s>
funcom_train/12867018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getNextEmptySlot(List list) { int result = -1; for (int i = 0, size = list.size(); i < size; i++) { if (list.get(i) == null) { return i; } // end if } // end for return result; } // end getNextEmptySlot() COM: <s> returns the index of the next empty slot in the given list </s>
funcom_train/3368581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read() throws IOException { int c = in.read(); if (c >= 0) monitor.setProgress(++nread); if (monitor.isCanceled()) { InterruptedIOException exc = new InterruptedIOException("progress"); exc.bytesTransferred = nread; throw exc; } return c; } COM: <s> overrides code filter input stream </s>
funcom_train/26661593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkMcmScpAvail() { String resp = ""; try { Object o = server.invoke(mcmScuServiceName, "checkMcmScpAvail", null, null ); resp = (String) o; } catch ( Exception x ) { if ( log.isDebugEnabled() ) log.debug( "Exception occured in checkMcmScpAvail: "+x.getMessage(), x ); } return "OK".equals( resp ); } COM: <s> checks if media creation scp is available </s>
funcom_train/36493846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void export(Page page) { if (page == null) return; Page parent = page.getParent(); while (parent != null) { this.exportManager.export(parent, NULL_NOTIFIABLE); parent = parent.getParent(); } this.exportManager.export(page, NULL_NOTIFIABLE); this.exportManager.export(page.getSpace(), NULL_NOTIFIABLE, false); } COM: <s> p export a </s>
funcom_train/35715530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addListener(Class clazz, EventListener listener) { Control[] children= getChildren(); for (int i= 0; i < children.length; i++) { if (children[i] != null && !children[i].isDisposed()) addListener(clazz, children[i], listener); } ListenerInfo info= new ListenerInfo(); info.fClass= clazz; info.fListener= listener; fCachedListeners.add(info); } COM: <s> adds the given listener object to the internal book keeping under </s>
funcom_train/12116365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNormal(Vector3D normal) { Vector3D cached = (Vector3D) opengl.getStateMachine().get(StateMachine.NORMAL); if (cached == null || !cached.equals(normal)) { opengl.getStateMachine().set(StateMachine.NORMAL, normal); opengl.getGl().glNormal3f(normal.getX(), normal.getY(), normal.getZ()); } } COM: <s> sets the current normal vector </s>
funcom_train/18480844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPatchSet(PatchSet p_set) { if (PatchSet.cmp(p_set,this.p_set) != 0) { PatchSet old = this.p_set ; this.p_set = p_set ; notifyChanged(PATCHSET,old,p_set) ; createContents() ; } } COM: <s> sets the set of patches </s>
funcom_train/5463120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj instanceof Functor) { Functor f2 = (Functor)obj; if (name.equals(f2.name) && args.length == f2.args.length) { for (int i = 0; i < args.length; i++) { if (!args[i].equals(f2.args[i])) return false; } return true; } } return false; } COM: <s> equality is based on structural comparison </s>
funcom_train/32144593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ResourceBundle getBundle(Locale locale) { ResourceBundle resourceBundle = (ResourceBundle) langBundles.get(locale); if (resourceBundle == null) { String resName = bundleName; resourceBundle = ResourceBundle.getBundle(resName, locale); langBundles.put(locale, resourceBundle); } return resourceBundle; } COM: <s> return the resource bundle for a locale </s>
funcom_train/29619276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JScrollPane getJGeneralNotesScrollPane() { if (jGeneralNotesScrollPane == null) { jGeneralNotesScrollPane = new JScrollPane(); jGeneralNotesScrollPane.setBounds(383, 25, 216, 72); jGeneralNotesScrollPane.setViewportView(getJGeneralNotesField()); } return jGeneralNotesScrollPane; } COM: <s> this method initializes j general notes scroll pane </s>
funcom_train/3576574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JCheckBox getCheckVisualizar() { if (ivjCheckVisualizar == null) { try { ivjCheckVisualizar = new JCheckBox(); ivjCheckVisualizar.setName("CheckVisualizar"); ivjCheckVisualizar.setSelected(true); ivjCheckVisualizar.setText(GestorIdiomasFtol.getInstance().getString(FtolLangConstants.BRW_PREVISUALIZAR)); } catch (Throwable ivjExc) { handleException(ivjExc); } } return ivjCheckVisualizar; } COM: <s> return the check visualizar property value </s>
funcom_train/964555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initComponents() { companyField = new JTextField(); contactField = new JTextField(); ptiField = new JTextField(6); powerField = new JTextField(10); radiusField = new JTextField(8); diameterField = new JTextField(8); } COM: <s> creates intializes and configures the ui components </s>
funcom_train/3741878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getRankScore(UserDataContainer v) { MutableDouble rankScore = (MutableDouble) v.getUserDatum(getRankScoreKey()); if (rankScore != null) { return rankScore.doubleValue(); } else { throw new FatalException("setRemoveRankScoresOnFinalize(false) must be called before evaluate()."); } } COM: <s> given an edge or node returns the corresponding rank score </s>
funcom_train/4984657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createUpdate() throws UpdateFailedException { int updatesPerformed = 0; try { for (Iterator<Updater> uitr = updaters.iterator(); uitr.hasNext();) { Updater u = uitr.next(); u.update(this); updatesPerformed++; } } catch (UpdateFailedException e) { setMutable(false); throw e; } try { if (updatesPerformed > 0) { serializeUpdate(); } } catch (IOException ioe) { throw new UpdateFailedException(ioe); } } COM: <s> perform all submitted updates then attempt to serialize the update </s>
funcom_train/13491303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean tokenize_list(final Object[] r, final List bindings) { String in = (String) r[0]; String sep = (String) r[1]; Object[] retobj = new Object[3]; String[] res = in.split(sep); retobj[0] = in; retobj[1] = sep; retobj[2] = res; if (!returnObjectMatched(r[2], res)) return Boolean.FALSE; bindings.add(retobj); return Boolean.TRUE; } COM: <s> tokenize a string returning tokens as a list </s>
funcom_train/1535165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArea() { if (ancestors[0].params[0] - params[0] != 0) area = Math.abs((ancestors[0].params[0] - params[0]) * (((ParametricSurfaceDiamond) parents[0]).params[1] - params[1])); else area = Math .abs((((ParametricSurfaceDiamond) parents[1]).params[0] - params[0]) * (ancestors[0].params[1] - params[1])); } COM: <s> sets area to the base area of the diamond parameter wise </s>
funcom_train/26570345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Position getStartPositionOnScreen(int player) { if (player < 0 || player >= startX.length) { throw new IllegalArgumentException( "Invalid player number: " + player); } return new Position( topX + (startX[player] * TILEWIDTH), topY + (startY[player] * TILEHEIGHT)); } COM: <s> returns the starting position of a given </s>