__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/19429409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addDependency(JType t) { if (t != null && !dependencies.contains(t)) { dependencies.add(t); int nif = t.interfaceCount(); for (int i = 0; i < nif; i++) { addDependency(t.getInterface(i)); } if (t instanceof JClass) { addDependency(((JClass) t).superclass()); } } } COM: <s> add a referenced type to the dependencies set </s>
funcom_train/3704956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fixLayout() { Dimension dimOld = f.getSize(); Dimension dimTmp = f.getSize(); dimTmp.setSize(dimOld.getWidth() + 1, dimOld.getHeight() + 1); f.setSize(dimTmp); f.setSize(dimOld); } // of method COM: <s> things dont always appear correctly so resize to fix </s>
funcom_train/11792858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getTransportType(AAType aa) { URI uriTransportType = aa.getTransportType(); int intTransportType = -1; if (uriTransportType.toString().equalsIgnoreCase( ClientProperties.TRANSPORT_TYPE_DISCRETE_AS_STRING)) { intTransportType = ClientProperties.TRANSPORT_TYPE_DISCRETE; } else if (uriTransportType.toString().equalsIgnoreCase( ClientProperties.TRANSPORT_TYPE_BUNDLED_ZIP_AS_STRING)) { intTransportType = ClientProperties.TRANSPORT_TYPE_BUNDLED_ZIP; } return intTransportType; } COM: <s> returns the transport type of a given aatype object </s>
funcom_train/48706398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object invoke(ExtContext context) { if (context.getBean() == null || context.getMethod() == null) { throw new ExtDirectException(ExtDirectException.ErrorCode.EXECUTE_ERROR, "Unable to find the specified bean or method") .addDetail("context", context); } return ReflectionUtils.invokeMethod(context.getMethod(), context.getBean(), context.getArgs()); } COM: <s> internal invocation of exception </s>
funcom_train/26475450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public SimpleDate date(int dayOfMonth, int month, int year) { if (dayOfMonth > 31) throw new IllegalArgumentException("The day of month is greater than 31"); if (month > 11) throw new IllegalArgumentException("The month is greate than 11"); return new SimpleDateImpl(dayOfMonth, month, year); } COM: <s> return a new instance of type tt simple date tt for the given </s>
funcom_train/948687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Serializable symmetricDecryption(byte[] cipherBytes, SecretKey key) throws Exception { Cipher decryptCipher = Cipher.getInstance("DESede"); decryptCipher.init(Cipher.DECRYPT_MODE, key); byte[] objectBytes = decryptCipher.doFinal(cipherBytes); ByteArrayInputStream bs = new ByteArrayInputStream(objectBytes); ObjectInputStream is = new ObjectInputStream(bs); Serializable object = (Serializable) is.readObject(); return object; } COM: <s> decrypts an object with the specified key using the triple des algorithm </s>
funcom_train/12763430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void storeRegistration() { String registrationString = ""; for (String kind : registry.keySet()) { char indicator = '-'; if (registered.contains(kind)) { indicator = '+'; } registrationString = registrationString + indicator + kind + " "; } IPreferenceStore store = ParsedWaypointPlugin.getDefault().getPreferenceStore(); store.setValue(PreferenceConstants.REGISTERED_DEFINITIONS, registrationString); } COM: <s> saves the registration information </s>
funcom_train/43852256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean found(final byte[] tok, final byte[] lng) { final String t = Token.string(tok).toLowerCase(); final String s = Token.string(lng).toLowerCase(); return t.matches('^' + s + "($|-)|-" + s + "($|-)"); } COM: <s> simple method to find language attribute inside specified token </s>
funcom_train/32877929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dump() { if (basicMap != null) { System.out .println("\nDumping of XMP elements\n----------------------------------"); _dumpMap(basicMap); } if (mmMap != null) { System.out .println("\nDumping of xapMM elements\n----------------------------------"); _dumpMap(mmMap); } if (dcMap != null) { System.out .println("\nDumping of dc elements\n----------------------------------"); _dumpMap(dcMap); } if (safeMap != null) { System.out .println("\nDumping of safe elements\n----------------------------------"); _dumpMap(safeMap); } } COM: <s> generic debug helper to dump the various hash map s </s>
funcom_train/45293596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JFrame openMaxqGUI(boolean isEdit) { MaxqFrame maxqGUI = null; try { maxqGUI = createMaxQFrame(); if (!isEdit) { maxqGUI.newFile("com.bitmechanic.maxq.generator.CompactGenerator"); } else { maxqGUI.openFile(); } } catch (Exception e) { // TODO: catch exception } return maxqGUI.getMainFrame(); } COM: <s> open max q gui to record new websequence </s>
funcom_train/1665494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restartNonPersistent() { Logger.info(this, "Restarting non persistent query"); for(final Iterator queryIt = getRunningQueue().iterator() ; queryIt.hasNext();) { final FCPTransferQuery query = (FCPTransferQuery)queryIt.next(); if(!query.isPersistent() && !query.isFinished()) query.start(this); } Logger.info(this, "Restart done."); } COM: <s> restart non persistent and non finished queries being in the runnin queue </s>
funcom_train/4123539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileFilter getDefaultFileFilter() { FileFilter ff = new FileFilter() { public boolean accept(File file) { String name = file.getName(); return (name.length() >= 4 && name.substring(name.length()-4).equals(".fsg")); } }; return ff; } COM: <s> gets the default file filter </s>
funcom_train/39465630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findNext() { int i = this.cursor; if ( i < list.size() && i >= 0 ) { for ( File file = list.get( i ) ; i <= list.size() ; file = list.get( ++i ) ) { if ( file != null && filter.acceptFile( file ) ) { return i; } } } return -1; } COM: <s> tries cursor if not advance until </s>
funcom_train/25504634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open() throws ResourceUnavailableException { final Shell parent = getParent(); Shell dialog = new Shell(parent, getStyle()); try { setupDialog(dialog); dialog.open(); final Display display = parent.getDisplay(); while (!dialog.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } dialog = null; } finally { // Make sure dialog is disposed in case of an exception if (dialog != null) { dialog.dispose(); } } } COM: <s> open and display the vminfo dialog </s>
funcom_train/39911086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCurrentSession() { System.out.println("currentSession"); Session expResult = null; Session result = HibernateUtil.currentSession(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of current session method of class buissness </s>
funcom_train/3058104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toSqlString(SessionFactoryImplementor sessionFactory, Class persistentClass, String alias) throws HibernateException { String[] columns = AbstractCriterion.getColumns(sessionFactory, persistentClass, propertyName, alias, EMPTY_MAP); if (columns.length!=1) throw new HibernateException("Cannot order by multi-column property: " + propertyName); return columns[0] + ( ascending ? " asc" : " desc" ); } COM: <s> render the sql fragment </s>
funcom_train/47242883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* public void testProjectFieldsMapped_projectType() { assertClassMapping(Project.class, "Project"); assertAllFieldsMappedExcept(SetUtil.make("artifacts", "status", "initialStatus", "idMap"), true); assertClassMapping(ProjectType.class, "ProjectType"); assertAllFieldsMapped(true); // } COM: <s> this test verifies the many to one relationship project project type is </s>
funcom_train/36460852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(int bits, int count) { nbb += count; if (nbb > 32) { int extra = nbb - 32; bb |= (bits >> extra); storeBits(); bb = bits << (32 - extra); nbb = extra; } else { bb |= bits << (32 - nbb); } } COM: <s> writes the least significant count bits from bits </s>
funcom_train/3156265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logParameter(Request request) { Parameter param = null; for (int n = 0; n < request.getNumParameters(); n++) { param = request.getParameterAt(n); _logger.info("... Parameter: name=" + param.getName() + " value=" + param.getValueAsText()); } } COM: <s> logs the parameter of the request to the sinks attached </s>
funcom_train/37828104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void closeAllOpenResults() { if (this.openResults != null) { for (Iterator iter = this.openResults.iterator(); iter.hasNext();) { ResultSet element = (ResultSet) iter.next(); try { element.close(); } catch (SQLException sqlEx) { AssertionFailedException.shouldNotHappen(sqlEx); } } this.openResults.clear(); } } COM: <s> close any open result sets that have been held open </s>
funcom_train/28177991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUser (String userName, String password) throws RbacException{ try{ if(findUserByLogin(userName) != null){ throw new RbacException("error : this user already exists"); } //add the user UserType user = of.createRbacModelTypeRbacTypeUsersTypeUserType(); user.setId(generateUserId()); user.setLogin(userName); user.setPassword(password); getUser().add(user); }catch(JAXBException jaxbe){ throw new RbacException("error : Can't create a new User"); } } COM: <s> create a new rbac user </s>
funcom_train/48558898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTextField3() { if (textField3 == null) {//GEN-END:|225-getter|0|225-preInit textField3 = new TextField("\u041F\u043E\u0440\u0442", null, 32, TextField.ANY);//GEN-LINE:|225-getter|1|225-postInit }//GEN-BEGIN:|225-getter|2| return textField3; } COM: <s> returns an initiliazed instance of text field3 component </s>
funcom_train/36400927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setId(String id) throws KeyCollisionException { if (id == null) { throw new NullPointerException("Every BibtexEntry must have an ID"); } try { firePropertyChangedEvent(ID_FIELD, _id, id); } catch (PropertyVetoException pv) { throw new KeyCollisionException("Couldn't change ID: " + pv); } _id = id; } COM: <s> sets this entrys id provided the database containing it </s>
funcom_train/32156075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSpinner getNbDays() { if (nbDays == null) { nbDays = new JSpinner(new SpinnerNumberModel(2, 1, 30, 1)); nbDays.setBounds(new Rectangle(490, 105, 60, 22)); daysLabel = new JLabel(); daysLabel.setBounds(new Rectangle(330, 105, 150, 22)); daysLabel.setText(NumberOfDays); daysLabel.setHorizontalAlignment(JLabel.RIGHT); } return nbDays; } COM: <s> this method initializes nb days </s>
funcom_train/33150177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void appendToFile(File f) { try { FileWriter w = new FileWriter(f.getCanonicalPath(), true); w.write("appended"); w.close(); } catch (Exception e) { fail("Failed to create fixture: File appendage failed,"); } } COM: <s> append to a file </s>
funcom_train/35682410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetHostBytesFromContent() { try { byte[] payload = LegStarMessage.getHostBytesFromContent( HostData.toByteArray("01020304")); assertEquals(SINGLEPART_MINIMAL_MESSAGE, HostData.toHexString(payload)); } catch (HostMessageFormatException e) { fail("testGetHostBytesFromContent failed " + e); } } COM: <s> check convenience methods to quickly single part messages from content </s>
funcom_train/3350507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void listUnfinishedPlugins() { for (PluginDescriptor descr : registry) { try { final Plugin pi = descr.getPlugin(); if (pi.isActive()) { if (!pi.isStartFinished()) { BootLogInstance.get().error("Plugin " + descr.getId() + " has not yet finished"); } } } catch (PluginException ex) { // Ignore } } } COM: <s> list of started but unfinished plugins </s>
funcom_train/23619462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateRes() { //offset is reset to 0 if(offset != 0) { offset = 0; } // determine the best resolution ttempo = tempo.getPerMinute(); if (ttempo < 50) { this.setResolution(this.SRES); } else if (ttempo < 110) { this.setResolution(0.125); } else if (ttempo < 230) { this.setResolution(0.25); } else if (ttempo < 470) { this.setResolution(0.5); } } COM: <s> updates the resolution to be optimal given the current tempo </s>
funcom_train/18938050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private char checkSpecialChar( CharReader reader ) throws IOException, SpecialCharException { char nextNext = reader.readChar(); if ( specialChar.contains( nextNext ) ) { // It is the treatment for the actual special character " and \, but // it probably // have to change to another special characters. return nextNext; } throw new SpecialCharException( CompilerMessages.BAD_SPECIAL_CHAR( reader.getActualLine() ) ); } COM: <s> check if the next character readed form reader is a valid special one </s>
funcom_train/47140238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMnemonic (char cMnemonic) { m_cMnemonic = cMnemonic; synchronized (getPeerLock()) { if (m_jmiPeer != null) { m_jmiPeer.setMnemonic (cMnemonic); } if (m_jmMenuPeer != null) { m_jmMenuPeer.getItem(0).setMnemonic (cMnemonic); } } } COM: <s> set the mnemonic of this menu sheet item </s>
funcom_train/25716871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveTo(int x, int y) { this.animState.setDirection(ImageOperations.getDirectionFromMouse(x, y, this.getX(), this.getY())); this.animState.setX(x - 32); this.animState.setY(y - 32); // testing for crap this.animState.setAnimationType(AnimationType.MOVING, this); } COM: <s> moves this army to point x y </s>
funcom_train/19865672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean decodeFrame() throws JavaLayerException { try { Header h = stream.readFrame(); if (h == null) { return false; } SampleBuffer output = (SampleBuffer) decoder.decodeFrame(h, stream); synchronized (this) { audio.write(output.getBuffer(), 0, output.getBufferLength()); } stream.closeFrame(); } catch (Throwable e) { throw new JavaLayerException("Exception decoding audio frame", e); } return true; } COM: <s> decodes a frame an plays it </s>
funcom_train/50034188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addMember(final String email, final String projectName, final boolean isLeader) throws HibouTechnicalException { Transaction tr = null; Session session = null; try { session = HibernateUtil.openSession(); tr = session.beginTransaction(); session.save(new TakePart((Project)session.get(Project.class,projectName), (User)session.get(User.class,email), isLeader)); tr.commit(); } catch (Exception e) { if(tr != null) { tr.rollback(); } throw new HibouTechnicalException(e); } finally { session.close(); } return true; } COM: <s> add a member to a project </s>
funcom_train/15569291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeModelById(long _id, DataModel _options) throws NException { HashMap context=null; _options=preRule(_id,context,removeRule,_options); storage.removeModelById(_id,_options); postRule(null,context,removeRuleFinish,_options); } COM: <s> code remove model by id code removes the model by id </s>
funcom_train/15914660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void weedWants(TradeList list) { Iterator wantsI = wants.iterator(); while (wantsI.hasNext()) { Integer want = (Integer) wantsI.next(); if (!list.itemAvailable(want)) { wantsI.remove(); } } Iterator wantersI = wanters.iterator(); while (wantersI.hasNext()) { Integer wanter = (Integer) wantersI.next(); if (!list.itemAvailable(wanter)) { wantersI.remove(); } } } COM: <s> removes all wants and wanters that dont exist in the </s>
funcom_train/43094433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canAddNode(Object node) { if (super.canAddNode(node)) return true; if (containsNode(node)) { return false; } return Model.getFacade().isAActor(node) || Model.getFacade().isAUseCase(node) || Model.getFacade().isAPackage(node); } COM: <s> determine if the given node can validly be placed on this </s>
funcom_train/7419171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void normalizePoolsAndLanes(Container process) { if (!(process.getChildNodes().get(0) instanceof Pool)) { /* Create a new pool around and append the process */ Pool newPool = factory.createPool(); newPool.setLabel("satellite"); Lane lane = factory.createLane(); lane.getChildNodes().addAll(process.getChildNodes()); newPool.getChildNodes().add(lane); addNode(newPool, process, process); addNode(lane, process, process); } } COM: <s> checks if a given process flow is surrounded by a pool </s>
funcom_train/41208573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(Component cmp) { boolean found = false; int count = getComponentCount(); for (int i = 0; i < count; i++) { Component c = getComponentAt(i); if (c.equals(cmp)) { return true; } if (c instanceof Container) { found = ((Container) c).contains(cmp); if (found) { return true; } } } return false; } COM: <s> returns true if the given component is within the hierarchy of this container </s>
funcom_train/45230002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject getRequestorObject() { JSONObject requestorObject = null; JSONObject responseObject = getResponseObject(); if (responseObject != null) { JSONValue requestorValue = responseObject.get("requestor"); if (requestorValue != null) { requestorObject = requestorValue.isObject(); } } return requestorObject; } COM: <s> gets the requestor object attribute of the response parser object </s>
funcom_train/45623146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRulesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CodeAnalysisType_rules_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CodeAnalysisType_rules_feature", "_UI_CodeAnalysisType_type"), MSBPackage.eINSTANCE.getCodeAnalysisType_Rules(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the rules feature </s>
funcom_train/46858662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMovementZone(Unit unit) throws JawException { activeUnitCheck(unit, "SetMovementZone"); List<Location> moveZone; if (map.isValid(unit.getLocation())) { moveZone = map.getMovementZone(unit); unit.setMoveZone(moveZone); } } COM: <s> build and set a move zone for the unit given as parameter </s>
funcom_train/19432867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object theObject) { if ( !(theObject instanceof VolatilityEnum) ) { throw new ClassCastException("Can't compare to " + theObject.getClass().getName()); } VolatilityEnum enum = (VolatilityEnum) theObject; return this.getLevel().compareTo(enum.getLevel()); } COM: <s> ordering from most to least volatile </s>
funcom_train/6488277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showURL(String url) throws BrowserControlException { String cmd = "NOT YET DEFINED"; try { cmd = path + " " + flags + " " + url; Process p = Runtime.getRuntime().exec(cmd); } catch(IOException ex) { throw new BrowserControlException(ex.getMessage()); //throw new BrowserControlException("Could not invoke browser, cmd='" + cmd + "'. Reason: "+ex.getMessage()); } } COM: <s> display a file in the configured browser </s>
funcom_train/35293107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printParameters(LinkedHashMap<String, Class<?>> params) { Iterator<Entry<String, Class<?>>> it = params.entrySet().iterator(); while (it.hasNext()) { Entry<String, Class<?>> next = it.next(); out.print("final "); printType(next.getValue()); out.print(' '); out.print(next.getKey()); if (it.hasNext()) { out.print(", "); } } } COM: <s> prints a parameter list e </s>
funcom_train/25823135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreeNode copy() { TreeNode newnode = null; try { newnode = (TreeNode) this.clone(); } catch (CloneNotSupportedException e) { return null; } newnode.nodes = new TreeNode[this.nodes.length]; for (int i = 0; i < this.nodes.length; ++i) { newnode.nodes[i] = this.nodes[i].copy(); } return newnode; } COM: <s> this method creates a new deep copy of this node </s>
funcom_train/3701933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void update() { if (flagContinue == false) { return; } //// 1. Check our window. Don't issue another query if too soon. long curTime = System.currentTimeMillis(); long lastQueryTime = getLastQueryTimeAsMillis(); if (curTime - lastQueryTime < WINDOW) { return; } //// 2. Do the query. query(); } // of method COM: <s> update the tuple on demand </s>
funcom_train/4888325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addGroup(MuleUser user, String group) throws RemoteException{ // make sure its a valid user if(getUserFromDB(user.username,user.password) == null){ return false; } if(getGroupFromDB(group) != null){ // already created return false; } // create the group MuleGroup muleGroup = new MuleGroup(group); muleGroup.addUser(user.username); // create the image directory File file = new File(root.getPath()+File.separator+group); file.mkdir(); db.set(muleGroup); db.commit(); return true; } COM: <s> adds a group </s>
funcom_train/4780477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String renameUser(Document document, String userName, String newUserName) throws AppException, AppException { if (userName == null) { throw new AppException("application.error.userrequired"); } if (newUserName == null) { throw new AppException("application.error.newuserrequired"); } User user = document.findUser(userName); if (user == null) { throw new AppException("application.error.unabletofinduser", userName); } user.setName(newUserName); return new FileGenerator(document).generate(true); } COM: <s> renames an existing user </s>
funcom_train/9276260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNCharacterStream() throws SQLException{ try { Reader r = null; ps.setNCharacterStream(0,r,0); fail("setNCharacterStream should not be implemented"); } catch(SQLFeatureNotSupportedException sqlfne) { //Do Nothing, This happens as expected } } COM: <s> tests the set ncharacter stream method of the prepared statement interface </s>
funcom_train/2953034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveSettings() { DocumentType doctype = this.getDocumentType(); if (doctype != null) { this.settings.put(SETTINGS_PUBLIC_ID, doctype.getPublicId()); String key = SETTINGS_ROOT_ELEMENT_PREFIX + doctype.getPublicId(); this.settings.put(key, this.getRootElementName()); } } COM: <s> called from the wizards perform final method to save the settings for </s>
funcom_train/40614407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { try { if (isDebugEnabled()) { debugCode("executeUpdate("+quote(sql)+", "+autoGeneratedKeys+");"); } return executeUpdateInternal(sql); } catch (Exception e) { throw logAndConvert(e); } } COM: <s> executes a statement and returns the update count </s>
funcom_train/33814666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getCadastroTabelaFaixaMenu() { if (cadastroTabelaFaixaMenu == null) { cadastroTabelaFaixaMenu = new JMenu(); cadastroTabelaFaixaMenu.setText("Faixas"); cadastroTabelaFaixaMenu.add(getCadastroTabelaFaixaSalarioFamiliaMenuItem()); cadastroTabelaFaixaMenu.add(getCadastroTabelaFaixaINSSMenuItem1()); cadastroTabelaFaixaMenu.add(getCadastroTabelaFaixaIRPFMenuItem2()); } return cadastroTabelaFaixaMenu; } COM: <s> this method initializes cadastro tabela faixa menu </s>
funcom_train/8640757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getCropBox(int index) { PdfDictionary page = pageRefs.getPageNRelease(index); PdfArray cropBox = (PdfArray)getPdfObjectRelease(page.get(PdfName.CROPBOX)); if (cropBox == null) return getPageSize(page); return getNormalizedRectangle(cropBox); } COM: <s> gets the crop box without taking rotation into account </s>
funcom_train/2582986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getColumnKeys() { // the CategoryDataset interface expects a list of categories, but // we've stored them in an array... if (this.categoryKeys == null) { return new ArrayList(); } else { return Collections.unmodifiableList(Arrays.asList( this.categoryKeys)); } } COM: <s> returns a list of the categories in the dataset </s>
funcom_train/12905692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getCheckedValue(Object bean) { Object checkedValue = null; try { if (bean != null) { if (this.getAttribute("name") != null) { checkedValue = BeanUtils.getProperty(bean, (String)this.getAttribute("name")); } } } catch (Exception ex) { return null; } return checkedValue; } COM: <s> get checked value by formbean </s>
funcom_train/8692911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected XMLReader installXMLFilter(XMLReader reader) { XMLFilter filter = getXMLFilter(); if (filter != null) { // find the root XMLFilter XMLFilter root = filter; while (true) { XMLReader parent = root.getParent(); if (parent instanceof XMLFilter) { root = (XMLFilter) parent; } else { break; } } root.setParent(reader); return filter; } return reader; } COM: <s> installs any xmlfilter objects required to allow the sax event stream to </s>
funcom_train/16857721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cacheInsupported(){ ContactServiceAsync async = GWT.create(ContactService.class); async.getContacts((String)getIntent().getExtra("filtre"), new AsyncCallback<ArrayList<ContactComplet>>() { public void onFailure(Throwable caught) { Window.alert("Error!"); } public void onSuccess(ArrayList<ContactComplet> result) { getListContactAdapter().setValues(result); displayData(); UIObject.setVisible(DOM.getElementById("loadingdiv"), false); } }); } COM: <s> treatment in the case of a navigator that does not support </s>
funcom_train/17471869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAcounts(ArrayList<Account> accounts) { int lastID=0; this.accountList = accounts; for(int i=0; i<accountList.size(); i++) { if(accountList.get(i).getId()>lastID) { lastID=accountList.get(i).getId(); } } if(lastID!=0 && nextAccountId==FIRSTACCOUNTID) this.nextAccountId=lastID+1; } COM: <s> add a new list of accounts to the already existent one </s>
funcom_train/10357598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void dispatchEvent(MailEvent event, List listeners) { // iterate through the listeners list calling the handlers. for (int i = 0; i < listeners.size(); i++) { try { event.dispatch(listeners.get(i)); } catch (Throwable e) { // just eat these } } } COM: <s> dispatch an event to a list of listeners </s>
funcom_train/42818599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initForRecognition() throws Exception { captureWidth = Integer.parseInt(prop.getProperty("webcam.widthBig")); captureHeight = Integer.parseInt(prop.getProperty("webcam.heightBig")); framerate = Integer.parseInt(prop.getProperty("webcam.frameRateBig")); doInit(); } COM: <s> initialises the webcam with a big image capture </s>
funcom_train/12199707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ByteBuffer getOptionalBody(Vector<TLV> optionalParameters) throws ValueNotSetException { ByteBuffer optBody = new ByteBuffer(); int size = optionalParameters.size(); TLV tlv = null; for (int i = 0; i < size; i++) { tlv = optionalParameters.get(i); if ((tlv != null) && tlv.hasValue()) { optBody.appendBuffer(tlv.getData()); } } return optBody; } COM: <s> creates buffer with all the optional parameters contained in </s>
funcom_train/2266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLevelValid() { StringBuilder validityMessage = new StringBuilder(); // Let the board check if it is valid. boolean levelIsValid = board.isValid(validityMessage); // If the level is invalid the editor mustn't be left and the // reason for the invalidity is displayed. if (levelIsValid == false) { displayInfotext(validityMessage.toString()); applicationGUI.setEditorMenuItemEnabled(false); } else { displayInfotext(""); applicationGUI.setEditorMenuItemEnabled(true); } return levelIsValid; } COM: <s> returns whether the current level is valid </s>
funcom_train/8338548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(JButton button, String text, Icon icon) { if (icon != null) { button.setIcon(icon); } button.setVerticalTextPosition(SwingConstants.BOTTOM); button.setHorizontalTextPosition(SwingConstants.CENTER); // Remove button borders in OS X Leopard (and hopefully future OS X releases) button.putClientProperty("JButton.buttonType", "toolbar"); if (text != null) { button.setText(text); } buttonBar.add(button); } COM: <s> add a button that will be added as a button to the toolbar </s>
funcom_train/8059642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setupOAuth(OAuthAccessor accessor, String rpcServerUrl) { if (accessor == null || rpcServerUrl == null) { throw new IllegalArgumentException("Accessor and RPCServerURL have to be non-null"); } consumerDataMap.put(rpcServerUrl, new ConsumerData(accessor, rpcServerUrl)); } COM: <s> sets the oauth related properties that are used to sign the outgoing </s>
funcom_train/2611959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createDictionary(BufferedReader in) throws IOException { String line = ""; while (line != null) { line = in.readLine(); if (line != null && line.length() > 0) { line = new String(line.toCharArray()); putWord(line); } } } COM: <s> constructs the dictionary from a word list file </s>
funcom_train/14585500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQuickGameStats() { String items[] = { offense, ofScore + "", defense, dfScore + "", "Offense: ", offense, Txtflo.convertDown(down) + " and " + startYdsToGo + "", yardline, Txtflo.convertTime(time), "Quarter " + quarter }; String quick = Txtflo.makeListColumns(items, 2, 17); return quick; } COM: <s> gets a brief summary of the game stats </s>
funcom_train/4026034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLocked(String resourceName) throws RepositoryException { if( resources != null && ! containsResource(resourceName) ) { throw new RepositoryException("Repository doesn't contain resource name '" + resourceName + "'"); } File resourceFileLock = new File(repositoryLocation, getFileLockName(resourceName)); return resourceFileLock.exists(); } COM: <s> returns code true code if a resource is locked in writing mode </s>
funcom_train/22232217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { long bits = 1L; bits = 31L * bits + HashCodeUtil.doubleToLongBits(radius); bits = 31L * bits + HashCodeUtil.doubleToLongBits(center.x); bits = 31L * bits + HashCodeUtil.doubleToLongBits(center.y); bits = 31L * bits + HashCodeUtil.doubleToLongBits(center.z); return (int) (bits ^ (bits >> 32)); } COM: <s> returns a hash code value for this bounding sphere object </s>
funcom_train/38315487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doEndTag() throws JspTagException { String val = null; SiteMessage message = (SiteMessage)pageContext.getAttribute("currentSiteMessage"); if (message == null) return SKIP_PAGE; val = String.valueOf(message.getId()); JspWriter out = pageContext.getOut(); try { out.write(val); } catch (IOException e) { throw new JspTagException("Error writing to page"); } return EVAL_PAGE; } COM: <s> print out a messages id </s>
funcom_train/22260805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addApplication(int kind, IFile inputFile, String outputFileName, IContainer outputFolder, String mainClass, String compilerParams) { applications.add(new Application(this, kind, inputFile, outputFileName, outputFolder, mainClass, compilerParams)); } COM: <s> add new code application code to output </s>
funcom_train/4492999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor( int red, int green, int blue ){ for ( int i = 0; i < LED.length; i++ ) { LED[i].setOff(); LED[i].setRGB((red==0)?0:255,(green==0)?0:255,(blue==0)?0:255); } } COM: <s> set red green or blue on non zero or off zero </s>
funcom_train/33333180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String disabledReason(final AuthenticationSession session) { if (session == null) { return null; } final int len = method.getParameterTypes().length; final Object[] parameters = new Object[len]; parameters[0] = AuthenticationSessionUtils.createUserMemento(session); // TODO: need to change to pick up as non-static rather than static return (String) InvokeUtils.invokeStatic(method, parameters); } COM: <s> will only check provided that a </s>
funcom_train/41466563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPriority(int priority) throws IllegalArgumentException { if (priority < 0 || priority > 15) { IllegalArgumentException invalidArgumentException = new IllegalArgumentException("The priority for Contextparam should be between 0 and 15. The value passed is = " + priority); // invalidArgumentException.setInfoCode(ExceptionInfoCode.INV_PRIORITY_VAL); throw invalidArgumentException; } this.priority = priority; } COM: <s> the method can be used to set the priority value for this context </s>
funcom_train/10801385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String fromBackingFieldName(String name) { // meta is null when enhancing persistence-aware FieldMetaData fmd = _meta == null ? null : _meta.getField(name); if (_meta != null && isPropertyAccess(fmd) && _fieldsToAttrs != null && _fieldsToAttrs.containsKey(name)) return (String)_fieldsToAttrs.get(name); else return name; } COM: <s> if using property access see if there is a different persistent </s>
funcom_train/26401353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyCookies(WebResponse from, org.apache.cactus.WebRequest to) { for (int i = 0; i < from.getNewCookieNames().length; i++) { String name = from.getNewCookieNames()[i]; String value = from.getNewCookieValue(name); to.addCookie(name, value); } } COM: <s> copy the new cookies received by the response to the new request </s>
funcom_train/44708827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bind(String value) { if ( m_nUnboundVars == 0 ) { final String msg = "Programmer's error. All vars have been bound already. "; s_log.error(msg + m_fragments); throw new IllegalStateException(msg); } m_bindVars.add(value); m_nUnboundVars--; } COM: <s> binds the next available placeholder that has not been bound yet </s>
funcom_train/43358333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addLineNumber(Set<Integer> lineNumbers) { LineNumberTable lnt = getCode().getLineNumberTable(); if (lnt == null) { lineNumbers.add(Integer.valueOf(-lineNumbers.size())); } else { int line = lnt.getSourceLine(getPC()); if (line < 0) { lineNumbers.add(Integer.valueOf(lineNumbers.size())); } else { lineNumbers.add(Integer.valueOf(line)); } } } COM: <s> add the current line number to a set of line numbers </s>
funcom_train/3373424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getPreferredSpan(int axis) { switch (axis) { case View.X_AXIS: return 1; case View.Y_AXIS: if (size > 0) { return size + SPACE_ABOVE + SPACE_BELOW + topMargin + bottomMargin; } else { if (noshade != null) { return 2 + SPACE_ABOVE + SPACE_BELOW + topMargin + bottomMargin; } else { return SPACE_ABOVE + SPACE_BELOW + topMargin +bottomMargin; } } default: throw new IllegalArgumentException("Invalid axis: " + axis); } } COM: <s> calculates the desired shape of the rule </s>
funcom_train/1798175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(MetadataContext other) { if (this == other) { return 0; } int compare = compareAltFormat(altFormat, other.altFormat); if (compare != 0) { return compare; } compare = compareString(projection, other.projection); if (compare != 0) { return compare; } // Compare versions. return compareVersion(version, other.version); } COM: <s> compare two context objects to order them </s>
funcom_train/39314206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetOpaque() { System.out.println("testGetOpaque"); selectallTool myAll=new selectallTool(); myAll.setOpaque(false); assertEquals(myAll.getOpaque(), false); myAll.setOpaque(true); assertEquals(myAll.getOpaque(), true); } COM: <s> test of get opaque method of class selectall tool </s>
funcom_train/45598546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getProgramGroup() { Element programGroup = xml.createElement("programGroup"); programGroup.setAttribute("defaultName", xmlObject.shortcuts_programGroup_defaultName); programGroup.setAttribute("location", xmlObject.shortcuts_programGroup_location.replace("Applications (recommended)", "applications").replace("Start Menu", "startMenu")); return programGroup; } COM: <s> gets the program group element </s>
funcom_train/9187908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validateAnnotation(JCAnnotation a, Symbol s) { validateAnnotationTree(a); if (!annotationApplicable(a, s)) log.error(a.pos(), "annotation.type.not.applicable"); if (a.annotationType.type.tsym == syms.overrideType.tsym) { if (!isOverrider(s)) log.error(a.pos(), "method.does.not.override.superclass"); } } COM: <s> check an annotation of a symbol </s>
funcom_train/21437142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onAbout() { try { JDialog dlg = new JDialog((JFrame) null, "About GlycanBuilder", true); JEditorPane html = new JEditorPane(GlycanBuilderApplet.class .getResource("/html/about_builder.html")); html.setEditable(false); html.setBorder(new EmptyBorder(20, 20, 20, 20)); dlg.add(html); dlg.setSize(320, 320); dlg.setResizable(false); dlg.setLocationRelativeTo(this); dlg.setVisible(true); } catch (Exception e) { LogUtils.report(e); } } COM: <s> show the about menu </s>
funcom_train/36147455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteAll(Class type) throws PersistentException { getConnectionOffline().deleteAll(type); Enumeration objsEnum = getConnectionOffline().enumerate(type); Vector ls = (Vector) getParameter(OPERATION_DELETE); while (objsEnum.hasMoreElements()) { Object obj =objsEnum.nextElement(); if (!ls.contains(obj)) ls.addElement(obj); } } COM: <s> deletes all objects in the device </s>
funcom_train/4786209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NewEvent fireInsert(Date date, boolean allDayEvent) { checkWidget(); CalendarableItem item = new CalendarableItem(date); item.setAllDayEvent(allDayEvent); item.setStartTime(date); item.setEndTime(incrementHour(date, getDefaultEventDuration())); CalendarableItemEvent e = new CalendarableItemEvent(); e.calendarableItem = item; if (fireEvents(e, insertHandlers)) { // TODO: Only refresh the affected days refresh(); return (NewEvent) e.result; } return null; } COM: <s> requests that the event editor attempt to insert a new element by calling </s>
funcom_train/5776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshData(){ try { countLines(); readData(); } catch (IOException e) { e.printStackTrace(); } JTableHeader header = owner.getTableHeader(); owner.setTableHeader(new JTableHeader()); fireTableStructureChanged(); fireTableDataChanged(); owner.setTableHeader(header); } COM: <s> refreshes table contents using specified charset start line and splitting regular expression </s>
funcom_train/19107217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getInsertDate() { try { String date = mElement.getAttributeValue("insertdate"); if (date == null) { return new Date(); } else { return XMLModel.DATE_FORMAT.parse(date); } } catch (Exception e) { e.printStackTrace(); return new Date(); } } COM: <s> gets the instert date </s>
funcom_train/32080284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackground (int index, Color color) { checkWidget (); if (color != null && color.isDisposed ()) SWT.error (SWT.ERROR_INVALID_ARGUMENT); int count = Math.max (1, parent.getColumnCount ()); if (0 > index || index > count - 1) return; if (cellBackground == null) cellBackground = new Color [count]; cellBackground [index] = color; updateBackground (index); if ((parent.style & SWT.VIRTUAL) != 0) cached = true; } COM: <s> sets the background color at the given column index in the receiver </s>
funcom_train/48390123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addEventMovedHandler(com.smartgwt.client.widgets.calendar.events.EventMovedHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.calendar.events.CalendarEventMoved.getType()) == 0) setupEventMovedEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.calendar.events.CalendarEventMoved.getType()); } COM: <s> add a event moved handler </s>
funcom_train/31627286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() throws Exception { properties = new Properties(); properties.load(getClass().getClassLoader().getResourceAsStream( "jms.properties")); BrokerContext bctx = new BrokerContext(); BrokerContainerFactoryImpl bcf = new BrokerContainerFactoryImpl(); bcf.setPersistenceAdapter(new VMPersistenceAdapter()); broker = bcf.createBrokerContainer(properties.getProperty(BROKER_NAME), bctx); broker.addConnector(properties.getProperty(PROVIDER_URL)); broker.start(); } COM: <s> starts the active mq message broker </s>
funcom_train/4505747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGlobalAllowedUsers(Collection<String> allowedUsers) { StringBuilder buf = new StringBuilder(); for (String jid : allowedUsers) { buf.append(jid).append(","); } JiveGlobals.setProperty("plugin.broadcast.allowedUsers", buf.toString()); } COM: <s> sets the collection of addresses of users allowed to send broadcast </s>
funcom_train/13392746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeDeploymentDirActive() throws Exception { // the oar state is set to waiting and this stops us from acting on deployment oarState = OarDeployerState.WAITING_FOR_PROVISION_MONITOR; // create deployment controller and set its dependencies (normally an IOC container would do this deploymentController = createDeploymentController(); // create the directory watcher dirWatcher = createDirectoryWatcher(scanPeriod); } COM: <s> make a deployment directory active </s>
funcom_train/49319321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Coordinates toB1950() { switch (getEquinox()) { case B1950_EQUINOX: return this; case J2000_EQUINOX: Point2D.Double out = wcscon.fk524(new Point2D.Double(getRa(), getDec())); return new Coordinates(out.x, out.y, B1950_EQUINOX); default: return null; } } COM: <s> returns the coordinates converted to the b1950 equinox </s>
funcom_train/20678677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeCustomVarsToCookie() { StringBuffer sb = new StringBuffer(); for (Iterator it = this.keySet().iterator(); it.hasNext();) { String name = it.next().toString(); if (!isBuiltInVarible(name)) { appendValue(sb, name, getClientValue(name)); } } if (sb.length() > 0) { addPermanentCookieToResponse(COOKIE_CFCLIENT, SmithString .URLEncodedFormat(sb.toString(), ApplicationServices.BYTE_CHARSET)); } } COM: <s> packs client variables and stores them to http response cookie in the </s>
funcom_train/4289488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIndexPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PropertyReferenceExpression_index_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PropertyReferenceExpression_index_feature", "_UI_PropertyReferenceExpression_type"), RequirementsPackage.Literals.PROPERTY_REFERENCE_EXPRESSION__INDEX, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the index feature </s>
funcom_train/18722025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getDistance(Object o1, Object o2) { if (o1 instanceof JDomVisualDescriptor && o2 instanceof JDomVisualDescriptor) { JDomVisualDescriptor c1 = (JDomVisualDescriptor) o1; JDomVisualDescriptor c2 = (JDomVisualDescriptor) o2; return (float) c1.getDistance(c2); } else { return -1f; } } COM: <s> allows the distance calculations based on visual descriptors </s>
funcom_train/43622675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Point getTreeMousePoint(int column, MouseEvent me) { // could inline as it wasn't the place to fix for broken RToL return new Point(me.getX() - getCellRect(0, column, false).x, me.getY()); } COM: <s> this is a patch provided for issue 980 swingx which should </s>
funcom_train/13479559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateAccess(int mask, boolean clear) { Player player = controller.whoami(); int access = 0; super.updateAccess(mask,clear); if ((mask & ACCESS_INSPECT) != 0) { if ((player == null) || (player.equals(_ruler))) { access |= ACCESS_INSPECT; } } if ((mask & ACCESS_ADMIN) != 0) { if ((player != null) && (player.equals(_ruler))) { access |= ACCESS_ADMIN; } } setAccess(access,mask); } COM: <s> update access for this colony </s>
funcom_train/14096642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prettyPrintsReport(File logDir) throws Exception { if ((!logDir.exists()) || (!logDir.isDirectory())) { throw new Exception("Error: LOGDIR " + logDir.getAbsolutePath() + " seems not a valid directory. "); } File html_logs_report_file=new File(logDir.getAbsolutePath()+File.separator+"report.html"); prettyPrintsReport(logDir, html_logs_report_file); } COM: <s> create the pretty print html document of log report </s>
funcom_train/23709383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public mxRectangle graphModelChanged(mxIGraphModel sender, List changes) { mxRectangle dirty = processChanges(changes, true); view.validate(); mxRectangle tmp = processChanges(changes, false); if (tmp != null) { if (dirty == null) { dirty = tmp; } else { dirty.add(tmp); } } removeSelectionCells(getRemovedCellsForChanges(changes)); return dirty; } COM: <s> called when the graph model changes </s>