__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/5080765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RectD2D union(int x1, int y1) { if (x1 < x) { width += (x - x1); x = x1; } else { int right = x + width; if (x1 >= right) { right = x1 + 1; width = right - x; } } if (y1 < y) { height += (y - y1); y = y1; } else { int bottom = y + height; if (y1 >= bottom) { bottom = y1 + 1; height = bottom - y; } } return this; } COM: <s> updates this rectangles bounds to the minimum size which can hold both this </s>
funcom_train/20356313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WikiBaseFascade wikiBase = new WikiBaseFascade() { public void writeTopic(Topic topic, TopicVersion topicVersion, LinkedHashMap categories, Vector links, boolean userVisible, Object transactionObject) throws Exception { WikiBase.getDataHandler().writeTopic(topic, topicVersion, null, null, true, null); } }; COM: <s> defaul wiki base fascade for production </s>
funcom_train/31218715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Task reconsult(final File f) throws FileNotFoundException, IOException { // XXX work around prova bug and do concatenation myself Task t = createTask( new Consultable() { public String getText() { return ":- eval(ureconsult(\"" + f.getAbsolutePath() + "\"))."; } public String getKey() { return f.getAbsolutePath(); } }); return t; } COM: <s> reconsult a file </s>
funcom_train/10907021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setObjectNumber(int objnum) { this.objnum = objnum; PDFDocument doc = getDocument(); setParent(null); setDocument(doc); //Restore reference to PDFDocument after setting parent to null if (log.isTraceEnabled()) { log.trace("Assigning " + this + " object number " + objnum); } } COM: <s> sets the object number </s>
funcom_train/19461406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(ValueRecorder other) { if (other.outputFactor != outputFactor) { throw new RuntimeException( "cannot add sample with different factor"); } valueCount += other.valueCount; nullCount += other.nullCount; boolean updated = false; if (other.minValue < minValue) { updated = true; minValue = other.minValue; } if (other.maxValue > maxValue) { updated = true; maxValue = other.maxValue; } totalCount += other.totalCount; totalCount2 += other.totalCount2; return updated; } COM: <s> adds the specified value recorder to this value recorder </s>
funcom_train/48614296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteAcl(Long domainObjectId, String className) { log.debug( " deleting domain object id = " + domainObjectId + " className = " + className); IrAcl acl = irAclDAO.getAcl(domainObjectId, CgLibHelper.cleanClassName(className)); log.debug("Delete ACL " + acl); irAclDAO.makeTransient(acl); } COM: <s> delete access control list for an object identity </s>
funcom_train/13415250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public void applyBlendSettings() { blendTexture.setWrap(Texture.WrapMode.Repeat); blendTexture.setApply(Texture.ApplyMode.Combine); blendTexture.setCombineFuncRGB(Texture.CombinerFunctionRGB.Replace); blendTexture.setCombineSrc0RGB(Texture.CombinerSource.Previous); blendTexture.setCombineOp0RGB(Texture.CombinerOperandRGB.SourceColor); blendTexture.setCombineFuncAlpha(Texture.CombinerFunctionAlpha.Replace); state.setTexture(blendTexture, state.getNumberOfSetTextures()); } COM: <s> this will apply the settings for the alpha texture </s>
funcom_train/1171021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showDeck(Deck deck) { String gameType = deck.getDeckType(); if (gameType.equals(Constant.GameType.Constructed)) { showConstructedDeck(deck); } if (gameType.equals(Constant.GameType.Draft)) { showDraftDeck(deck); } if (gameType.equals(Constant.GameType.Sealed)) { showSealedDeck(deck); } }//showDeck() COM: <s> p show deck </s>
funcom_train/49636797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BundleSpecBuilder getBundleSpec(String serviceId) { File bundleFile = getServiceFile(serviceId); try { return BundleSpecBuilder.open(bundleFile); } catch (IOException e) { log.warn ("Failed to read bundle file for " + serviceId, e); return null; } } COM: <s> return the bundle specification </s>
funcom_train/16145449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addItem(String n, Component c, String strImageFile) { Image image = null; OymFrame pFrame = getParentFrame(); if (pFrame != null) image = SplashDialog.getSplashImage(pFrame.getApp(), strImageFile); addItem(n, c, image); } COM: <s> add a component to be chosen by a tab with the given label </s>
funcom_train/21686989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getNewCommand() { if (newCommand == null) {//GEN-END:|115-getter|0|115-preInit // write pre-init user code here newCommand = new Command("New interval", Command.SCREEN, 0);//GEN-LINE:|115-getter|1|115-postInit // write post-init user code here }//GEN-BEGIN:|115-getter|2| return newCommand; } COM: <s> returns an initiliazed instance of new command component </s>
funcom_train/41018093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getMBean(ObjectName objectName, Class<?> mbeanInterface) { MBeanServerConnection mbeanServerConnection = this .getMBeanServerConnection(); // get new MBean from MBeanServerConnection final Object mBean = MBeanServerInvocationHandler.newProxyInstance( mbeanServerConnection, objectName, mbeanInterface, false); return mBean; } COM: <s> returns an mbean registered on mbean server under given object name and </s>
funcom_train/4953909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTcTrend(long trendInterval) { TestSuite matchingTs = getTrendTestRun(trendInterval); if (null != matchingTs) { TestSuite tsAtEnd = spread.get(highestRunIdx); if (null != tsAtEnd) { int diff = spread.get(highestRunIdx).getNoTestCases() - matchingTs.getNoTestCases(); String ret = Integer.toString(diff); if (0 < diff) { ret = "+" + ret; } return ret; } } return "NA"; } COM: <s> gets the test case difference between two test runs indicated by the </s>
funcom_train/34840243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String isTrigger(String message) { if (StringUtils.isEmpty(message)) { return null; } char firstChar = message.charAt(0); if (triggers.contains(firstChar)) { String doubleTrigger = "" + firstChar + firstChar; if (message.startsWith(doubleTrigger)) { return doubleTrigger; } return String.valueOf(firstChar); } return null; } COM: <s> checks if is trigger </s>
funcom_train/25582179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadCenterReasonerFactoryConfiguration(String filename){ InputStream in; try { in = new FileInputStream(filename); loadCenter(in); } catch (FileNotFoundException e) { System.out.println("The confilguration file centerFactory.xml can not be found!"); e.printStackTrace(); } catch (XMLStreamException e) { System.out.println("The format of the confilguration file " + "centerFactory.xml is not correct!"); e.printStackTrace(); } } COM: <s> load the configuration file of center reasoner factory </s>
funcom_train/14135811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getRandomWord(int length) { StringBuffer str = new StringBuffer(); for (int i=0; i<length; i++) { if ((i%2)==0) str.append(getRandomConsonant()); if ((i%2)!=0) str.append(getRandomVocal()); } return str.toString(); } COM: <s> returns a random word </s>
funcom_train/46845461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getInitialPerspective() { String initialPerspective = SystemProperties.s_initialPerspective; if (initialPerspective == null) { Haystack hs = Plugin.getHaystack(); IRDFContainer c = hs.getRootRDFContainer(); initialPerspective = Utilities.getLiteralProperty(hs.m_serviceManager.getResource(), EclipseConstants.s_perspective, c); //PlatformUI.getPreferenceStore().setDefault(IWorkbenchPreferenceConstants.DEFAULT_PERSPECTIVE_ID, s_initialPerspective); } return initialPerspective; } COM: <s> returns the initial perspective for the workbench </s>
funcom_train/3925483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PROTObase getPROTO( String name ) { PROTObase result = null; if ( PROTONodes != null ) { result = (PROTObase)PROTONodes.get( name ); } if ( result == null ) { if ( parent != null ) { Scene s = (Scene)parent.getScene(); if ( s != null ) { return( s.getPROTO( name )); } } } return( result ); } COM: <s> get the proto declaration associated with a proto name </s>
funcom_train/26400742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextField createTextField(String name, String s) { JTextField theField = new JTextField(s); theField.setName(name); theField.setFont(normalFont); theField.setActionCommand(name); theField.addFocusListener(getMyFocusListener()); theField.addActionListener(getMyActionListener()); return(theField); } COM: <s> creates a text field </s>
funcom_train/24625133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Format setInputFormat(Format format, int trackID) { H264Control control = null; H264Format h264Format = (H264Format) format; int maxFrameNum = 3; // TODO IMPORTANT: GET THIS VALUE AUTOMATICALLY! sps = new SequenceParameterSet(h264Format, control, maxFrameNum); pps = new PictureParameterSet(sps); return super.setInputFormat(format, trackID); } COM: <s> sets the input </s>
funcom_train/40712868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeToFile(ObjectOutputStream out) throws IOException { out.writeInt(REVISION); out.writeInt(id); out.writeObject(getUserObject()); board.writeToFile(out); out.writeObject(displayStrategy); int numChildren = getChildCount(); out.writeInt(numChildren); for(int i = 0; i < numChildren; i++) { PageNode p = (PageNode)getChildAt(i); p.writeToFile(out); } } COM: <s> writes a page node to a stream </s>
funcom_train/13479213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean calculateVisibility() { Player player = controller.whoami(); if (player == null) return false; // should not happen if (player.equals(owner)) return true; if (player.isOmniscient()) return true; Universe universe = controller.getUniverse(); StarSystem star = universe.getStarSystemAt(position); if (star != null) { if (star.isOccupiedBy(player)) return true; if (star.ownShipInOrbit(Ship.class)) return true; } // FIXME[todo]: Check if this Ship can be seen return false; } COM: <s> calculates the visibility of this ship </s>
funcom_train/43394821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String exportWorkflow(RepositoryWorkflowBean bean) { String retStr = new String(); try { retStr = workflowExportServiceImpl.exportWorkflow(bean); // System.out.println("retStr : " + retStr); return retStr; } catch (Exception e) { return new String(e.getLocalizedMessage()); } } COM: <s> egy workflow t exportal a repository teruletere </s>
funcom_train/45237671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset(String configFile, String defaultsFile, boolean load) throws IOException { if (configFile != null) this.configFile = configFile; else throw new NullPointerException("The configuration file can't be null!"); this.defaultsFile = defaultsFile; if (load) load(); else loaded = false; } COM: <s> reconfigure the configuration </s>
funcom_train/14247010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int delete(int id) throws SQLException { PreparedStatement ps = dao.connection().prepareStatement( "DELETE FROM SC_Mail_Account WHERE Acct_Id = ?"); try { ps.setInt(1, id); return ps.executeUpdate(); } finally { ps.close(); } } COM: <s> delete a template by name </s>
funcom_train/39282156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isBlocking(String classname, String methodname, Type methodreturn, Type[] methodargs) throws ClassNotFoundException { classname = getDeclaringClass(classname, methodname, methodreturn, methodargs); if (classname == null) return false; return blocking.contains(getSignature(classname, methodname, methodreturn, methodargs)); } COM: <s> whether a specified method has blocking semantics whether the caller </s>
funcom_train/44841064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { if (this == o) { return 0; } Statement other = (Statement)o; int result = 0; result = _object.compareTo(other.getObject()); if (result == 0) { // objects are equal result = _subject.compareTo(other.getSubject()); } if (result == 0) { // subjects and objects are equal result = _predicate.compareTo(other.getPredicate()); } return result; } COM: <s> compares this statement with the supplied object </s>
funcom_train/37763929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Rule findRuleInfo(RuleMetaData rule) throws JaffaRulesFrameworkException { Rule ruleInfo = RuleRepository.instance().getRuleByName(rule.getName()); if (ruleInfo == null) { log.error("Invalid Rule " + rule); throw new JaffaRulesFrameworkException(JaffaRulesFrameworkException.INVALID_RULE, new Object[] {rule}); } return ruleInfo; } COM: <s> obtains the rule instance from the rule repository based on the rule name </s>
funcom_train/9869776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFnac(java.util.Date newVal) { if ((newVal != null && this.fnac != null && (newVal.compareTo(this.fnac) == 0)) || (newVal == null && this.fnac == null && fnac_is_initialized)) { return; } this.fnac = newVal; fnac_is_modified = true; fnac_is_initialized = true; } COM: <s> setter method for fnac </s>
funcom_train/28362231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBorderTab( final JTabbedPane tabbedPane, final String name, final Vector<BorderProxy> borders ) { final JList list = new JList(); list.setDragEnabled( true ); list.setTransferHandler( new ViewTransferHandler( list ) ); list.setListData( borders ); list.setCellRenderer( new ViewCellRenderer() ); tabbedPane.add( name, new JScrollPane( list ) ); } COM: <s> add a tab of borders to the tabbed pane </s>
funcom_train/1029857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBug35610() throws Exception { createTable("testBug35610", "(field1 int, field2 int, field3 int)"); this.stmt.executeUpdate("INSERT INTO testBug35610 VALUES (1, 2, 3)"); exercise35610(this.stmt, false); exercise35610(getConnectionWithProps("useColumnNamesInFindColumn=true").createStatement(), true); } COM: <s> tests fix for bug 35610 bug 35150 </s>
funcom_train/3859871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDisjointClassAndPackageIds() { loadModel(); Set packagesWithAmbiguosIds = testModel.things(JPackage.class, new ThingFilter() { public boolean accept(Thing thing) { return (testModel.lookupType(thing.id()) != null); } }); assertEquals(0, packagesWithAmbiguosIds.size()); } COM: <s> no class with inner classes should never be defined as a package </s>
funcom_train/805509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(PropertyChangeEvent event) { /* if (IPreferenceConstants.SHOW_SEARCH_BOX.equals(event.getProperty())) { if (Boolean.FALSE.equals(event.getNewValue())) { searchBox.setVisible(false); } else { searchBox.setVisible(true); } searchManager.markDirty(); getActionBarConfigurer().getCoolBarManager().update(true); } */ } COM: <s> listen to the ipreference constants </s>
funcom_train/28875488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPopupRepetition(Track track) { int val; int size=track.getSize(); // check for repetition // cannot be in last 2 positions if (actCol>=size-2) { jMenuItemRepetition.setEnabled(false); return; } jMenuItemRepetition.setEnabled(true); } COM: <s> set up popup menu for repetition </s>
funcom_train/12841517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object value) { this.value = value; if (this.value == null) { return; } if (getTurnEmptyFieldsToNull() == true) { if ((this.value instanceof String) && StringUtils.isBlank((String) this.value)) { this.value = null; return; } } } COM: <s> set the supplied object as the value for the object attribute </s>
funcom_train/25248716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNoSelectionColoring() { this.setBackground(new Color(51, 51, 51)); this.setBorder(new LineBorder(new Color(101, 101, 101))); seriesDescriptionText.setForeground(Color.gray); totalImagesText.setForeground(Color.gray); modalityText.setForeground(Color.gray); institutionText.setForeground(Color.gray); } COM: <s> this routine used to remove the selection coloring </s>
funcom_train/25646801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSingleCellItems(DefaultGraphCell cell) { Object userObject = cell.getUserObject(); if(userObject instanceof SystemState) { createSystemStateItems(); } else if (userObject instanceof Transition && !(userObject instanceof ImplicitTransition)) { createTransitionItems((Transition) userObject); } } COM: <s> creates the menu items for a single cell selection </s>
funcom_train/23998680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void update( float deltatime ) { if ( descriptionTimer < 0 ) { attributeDesc.setText( "" ); attributeDesc.setEnableBorder( false ); attributeDesc.setEnableBackground( false ); descriptionTimer = 0; return; } else if ( descriptionTimer == 0 ) { return; } descriptionTimer -= deltatime; } COM: <s> update the gui </s>
funcom_train/28297992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void closeSockets() { if (sock!=null) try {sock.close();} catch(Exception e) {} if (outStream!=null) try {outStream.close();} catch(Exception e) {} if (inStream!=null) try {inStream.close();} catch(Exception e) {} sock=null; outStream=null; inStream=null; } COM: <s> closes all sockets and sets them to null </s>
funcom_train/16753087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if (jPanel == null) { FlowLayout flowLayout = new FlowLayout(); flowLayout.setAlignment(FlowLayout.LEFT); flowLayout.setVgap(5); flowLayout.setHgap(0); jPanel = new JPanel(); jPanel.setLayout(flowLayout); jPanel.add(getDispose(), null); jPanel.add(getTicks(), null); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/20696079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openDialog () { // Get a working copy of preferences. try { prefs = (MUPrefs)thud.prefs.clone(); } catch (Exception e) { System.err.println("Error: prefsDialog: " + e); return; } // Update components with preferences-specific values. updateComponents(); // Note that this may make the dialog displayable as a side // effect; we might want to let the user of this class do this // themselves. In practice, they'll pretty much do this almost // immediately anyway. pack(); setLocationByPlatform(true); super.setVisible(true); } COM: <s> opens the dialog </s>
funcom_train/43998062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Page createPage(ResultSet resultSet) throws SQLException { String name = resultSet.getString("name"); String words = resultSet.getString("words"); List<String> xwords = Arrays.asList(words.split("<>")); Page page = new Page(name, xwords); return page; } COM: <s> creates page object from result set </s>
funcom_train/24050478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findCollapsesFromExistingVertices(List<Integer> collapsedVertexIndexes) { for (int i = 0; i < edge.size() - 2; i++) { Coordinate p0 = edge.getCoordinate(i); //Coordinate p1 = edge.getCoordinate(i + 1); Coordinate p2 = edge.getCoordinate(i + 2); if (p0.equals2D(p2)) { // add base of collapse as node collapsedVertexIndexes.add(new Integer(i + 1)); } } } COM: <s> adds nodes for any collapsed edge pairs which are pre existing in the </s>
funcom_train/19431108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAllowed(final GameType gameType, final Card initialCard, final CardList hand) { boolean result = false; if (gameType != GameType.PASSED_IN) { result = SkatRuleFactory.getSkatRules(gameType).isCardAllowed(gameType, initialCard, hand, this); } return result; } COM: <s> checks whether a card is allowed to be played </s>
funcom_train/50757480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getLength(int firstSegment, int lastSegment) { double length = 0; ListIterator segmentListIterator = segmentList.listIterator(firstSegment); while (segmentListIterator.hasNext() && segmentListIterator.nextIndex() <= lastSegment) length += ((Segment)segmentListIterator.next()).getLength(); return length; } COM: <s> returns the length of the given range of segments </s>
funcom_train/50291465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ String spaces = " "; if(isInteger){ return("scalar " + name + " " + description + spaces + "/" + (int)value + "/;"); } else{ return("scalar " + name + " " + description + spaces + "/" + value + "/;"); } } COM: <s> an exact representation of this scalar as one would find in the model </s>
funcom_train/22284286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getProperties(PropertyList list) { super.getProperties(list); list.setBoolean("boldSeparators", boldSeparators, true); list.setInteger("elementCount", elementCount, 1); //System.out.println("Getting For Persistence=" + getText()); list.setString("value", getText(), null); list.setString("range", getRangeString(), null); } COM: <s> get the properties of the integer field widget this widget </s>
funcom_train/48337574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object modify(Symbol s, Object o) throws BindingException { if (map.containsKey(s)) { if (modifiable) { return map.put(s, o); } else { throw new UnsupportedOperationException("Environment sealed"); } } else { throw new BindingException("Symbol not bound", s); } } COM: <s> modify the value of the specified binding which is impossible </s>
funcom_train/4283512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setResourceBundle( String bundleName ) throws MissingResourceException { this.bundleName = bundleName; if (locale==null) { locale= Locale.getDefault(); } if (bundleName != null) { bundle = ResourceBundle.getBundle( bundleName, locale, cl ); } else { bundle = null; } } COM: <s> sets this localizers resource bundle </s>
funcom_train/10563943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object convert(Object value,String dataTypeUri,ValueFactory valueFactory) throws IllegalArgumentException { if(dataTypeUri == null){ throw new IllegalArgumentException("The parsed datatype URI MUST NOT be NULL!"); } ValueConverter<?> converter = uri2converter.get(dataTypeUri); return converter != null?converter.convert(value,valueFactory):null; } COM: <s> converts the parsed value to the specified data type </s>
funcom_train/30005951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getPriorityLabel() { if (this.priorityLabel == null) { this.priorityLabel = new JLabel(LanguageController.getInstance().getString(this.plugin, "Plugin_Add_Test_Case_Panel_Priority_Label")); } return this.priorityLabel; } COM: <s> gets the priority label </s>
funcom_train/34564599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int uri(final byte[] pr, final NSNode nd) { if(Token.eq(Token.XML, pr)) return 0; final int i = pref.id(pr); if(i == 0) return 0; NSNode n = nd; while(n != null) { final int u = n.uri(i); if(u != 0) return u; n = n.par; } return 0; } COM: <s> returns the namespace uri reference for the specified prefix and node </s>
funcom_train/17111898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getMergedIntPreference(String key, ITheme currentTheme){ boolean hasPrefs = getPreferenceStore().contains(key); int value = 0; if(hasPrefs){ value = getPreferenceStore().getInt(key); } else { value = currentTheme.getInt(key); } return value; } COM: <s> the default value is the value from current theme </s>
funcom_train/3087419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean setStyleCSSProperties(Element output, JspRenderingContext jspContext, CompilationContext compileContext, Component c, String exceptionStateKey) throws JspException { if (style != null) { try { CssStyleSheetHelper.applyStyleTo(style,c); jspContext.setStylesApplied(true); } catch (StyleSheetInvalidValueException e) { compileContext.setStateAttribute(exceptionStateKey,e); return false; } catch (StyleSheetParseException e) { compileContext.setStateAttribute(exceptionStateKey,e); return false; } } return true; } COM: <s> sets the properties for a given component based on the style attribute </s>
funcom_train/863948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface ExceptionHandlers extends PipelineInterface { /** * @param start intruction offset for start of covered code * @param end intruction offset for end of covered code * @param target intruction offset for start of handler code * @param typeIndex name index for exception type to catch * @param nameIndex name index for variable name */ public void exceptionHandler( int start, int end, int target, int typeIndex, int nameIndex ); } COM: <s> interface for passing exception handler info </s>
funcom_train/35212225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeExtendedByte(int e) { if (e < 0) { throw new IllegalArgumentException("the extended byte value must not be negative, but is: "+e); } if (e < 0xff) { this.byteout.write(e); } else { this.byteout.write(0xff); this.byteout.write(e); this.byteout.write(e >> 8); } } COM: <s> write an extended byte 8 16 bit </s>
funcom_train/2272957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String close_browser() throws Exception { String info = "\tClosing browser\n"; try { ie.close(); } catch (Exception e) { info = info + "Java exception closing browser: " + e.getMessage() + "\n"; return info; } info = info + "\t\tComplete\n"; return info; } COM: <s> closes browser window </s>
funcom_train/23233872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object create(ConfigurableFactoryContext ctx) throws IllegalArgumentException { SpeakerNPC npc = instantiate(getName(ctx)); npc.put("class", getClass(ctx)); npc.setBaseHP(100); npc.setHP(getHP(ctx)); npc.setLevel(getLevel(ctx)); String description = getDescription(ctx); if (description != null) { npc.setDescription(description); } List<Path.Node> path = getPath(ctx); npc.setPath(path, path.size() > 0); npc.setDirection(getDirection(ctx)); createDialog(npc); return npc; } COM: <s> create a damaging area </s>
funcom_train/1453571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOffset(java.lang.String offset) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue) get_store() .find_attribute_user(OFFSET$0); if (target == null) { target = (org.apache.xmlbeans.SimpleValue) get_store() .add_attribute_user(OFFSET$0); } target.setStringValue(offset); } } COM: <s> sets the offset attribute </s>
funcom_train/26013884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean write(byte[] bytes, int offset, int size) { totalBytes += size; totalWrites ++; if (firstSound) { timer.stop("AudioFirstSound"); firstSound = false; if (TRACE) { timer.show("Null Trace"); } } if (false && TRACE) { System.out.println("NullAudio: write " + size + " bytes."); } return true; } COM: <s> writes the given bytes to the audio stream </s>
funcom_train/4406604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeComponentEngine(Component[] components, Engine engine) { for (Component c : components) { if (c instanceof ControllerPanel) { ((ControllerPanel)c).setEngine(engine); initializeComponentEngine(((Container)c).getComponents(), engine); }else if (c instanceof Container) { initializeComponentEngine(((Container)c).getComponents(), engine); } } } COM: <s> this method recursively searches through all the components in the ui </s>
funcom_train/22205165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeMergedTopics() { if (m_mergedTopics != null) { Iterator mergedTopicsIt = m_mergedTopics.iterator(); while (mergedTopicsIt.hasNext()) { Topic mt = (Topic) mergedTopicsIt.next(); ((OzoneTopic) mt).setBaseTopic(null); } } m_mergedTopics = null; } COM: <s> clears the list of merged topics associated with the topic object </s>
funcom_train/32061044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getInfo() { String str = ""; str += "IntArray" + "\n"; str += "count: " + count + "\n"; str += "capacity: " + ints.length + "\n"; str += "fullness: " + getFullness() + "\n"; str += "growth: " + growthfactor + "\n"; return str; } COM: <s> returns a string containing basic information about the int array </s>
funcom_train/13958096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { try { if(_thread == null) { _thread = new WorkerThread(this); _thread.setName(this.toString()); } if(!_thread.isAlive()) { _thread.start(); } } catch (Exception localException) { throw new NSForwardException(localException, "<ERXLongResponse> Exception occurred while creating long response thread: "+localException.toString()); } } COM: <s> default implementation of the </s>
funcom_train/9978204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void serialize(NodeView view, Element specific) { specific.setAttribute("xmlns:jsp", xmlns); Project.setAttributeNS(specific, xmlns, "jsp", "jsp.path", view.getSpecificProperties().getProperty("jsp.path")); //specific.setAttribute("jsp.path", view.getSpecificProperties().getProperty("jsp.path")); } COM: <s> save jsp view specific part </s>
funcom_train/5856851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void terminateActivity(String nodeName) throws EngineException,HeroException { log.debug("terminateActivity: nodeName="+nodeName); execute(nodeName,TERMINATE); try { jms.sendProjectEvent(EventConstants.TERMINATED, (project.getDetails()).getName(), nodeName, context.getCallerPrincipal().getName()); }catch(Exception e){e.printStackTrace();} } COM: <s> non automatic operation method that terminate specify activity </s>
funcom_train/49676823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshNorthPanel() { this.dayCount.setText("Day : " + CoreEngine.roundManager().currentDay()); this.currentPlayer.setText(CoreEngine.roundManager().currentPlayer() .toString()); this.currentResources.setText(CoreEngine.roundManager().currentPlayer() .getResources().toString()); } COM: <s> resfresh the informations panel of lawrence frame when the features panel </s>
funcom_train/7384909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Field getField(Object obj, String fieldname) { Class type = obj.getClass(); while (type != null) { try { Field field = type.getDeclaredField(fieldname); if (field != null) { return field; } } catch (Exception e) { // ignore } type = type.getSuperclass(); } return null; } COM: <s> returns the field with the specified name </s>
funcom_train/25792906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetHighlight() throws Exception { ProcessInstance processInstance = createMock(ProcessInstance.class); int processId = 0; expect(processInstance.getProcessId()).andReturn(processId); m_mscVisualization.setEntityHighlight(Entity.Type.PROCESS, processId); m_mscController.refreshVisualization(); replay(m_mscController, m_mscVisualization); m_mscController.setHighlight(processInstance); verify(m_mscController, m_mscVisualization); } COM: <s> test if the method set highlight really sets the highlight in the visualization </s>
funcom_train/13515454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean dropBTree(String filename) throws ChaiDBException { if (openedBTree.containsKey(filename)) { throw new ChaiDBException(ErrorCode.BTREE_ALREADY_OPENED); } String path = DbEnvironment.getDataHome().concat(File.separator).concat(filename); return new File(path).delete(); } COM: <s> drop a btree on disk </s>
funcom_train/43266502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { if (log.isDebugEnabled()) { log.debug("Initializing " + getClass().getName()); } this.setLayout(new BorderLayout()); setSize(300, 300); this.add(getButtonPanel(), BorderLayout.SOUTH); this.add(getMediaPanel(), BorderLayout.CENTER); } COM: <s> this method initializes this </s>
funcom_train/42437721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void registerSourceFile(File sourcefile) { List<File> files= m_sourceFiles.get(sourcefile.getName()); if(null == files) { files= new ArrayList<File>(); m_sourceFiles.put(sourcefile.getName(), files); } files.add(sourcefile); } COM: <s> record in an internal map the existence of a source file </s>
funcom_train/18644100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateActions(java.util.List actionIds) { for (java.util.Iterator ids = actionIds.iterator(); ids.hasNext();) { IAction action = getActionRegistry().getAction(ids.next()); if (null != action && action instanceof UpdateAction) { ((UpdateAction) action).update(); } } } COM: <s> updates the specified actions </s>
funcom_train/49211544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Reader transform(Reader reader, Map<String, Object> parameterMap) { try { File file = File.createTempFile("srx2", ".srx"); file.deleteOnExit(); Writer writer = getWriter(getFileOutputStream(file .getAbsolutePath())); transform(reader, writer, parameterMap); writer.close(); Reader resultReader = getReader(getFileInputStream(file .getAbsolutePath())); return resultReader; } catch (IOException e) { throw new IORuntimeException(e); } } COM: <s> transforms given srx 1 </s>
funcom_train/3078539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List deriveBuildTimeVcsList(List vcsList, Project antProject) { List buildVcsList = new ArrayList(); Iterator it = vcsList.iterator(); while (it.hasNext()) { Vcs vcs = (Vcs) it.next(); buildVcsList.add(vcs.deriveBuildTimeVcs(antProject)); } return buildVcsList; } COM: <s> derive the build time vcs list from specified vcs list </s>
funcom_train/35669748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLowerBoundPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LinguisticDomain_lowerBound_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LinguisticDomain_lowerBound_feature", "_UI_LinguisticDomain_type"), LCPnetPackage.Literals.LINGUISTIC_DOMAIN__LOWER_BOUND, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the lower bound feature </s>
funcom_train/44790041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel createOpacityPanel(int opacity) { JLabel lblTransparency = new JLabel( I18N.getString("StyleEditionFrame.Opacity")); //$NON-NLS-1$ JSlider slider = new JSlider(SwingConstants.HORIZONTAL, 0, 100, opacity); slider.addChangeListener(this); JPanel transparencyPanel = new JPanel(); transparencyPanel.add(lblTransparency); transparencyPanel.add(slider); return transparencyPanel; } COM: <s> this method creates and return the panel of the opacity </s>
funcom_train/5381078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() throws IOException { if (filename == null) throw new IOException("File name not specified");//$NON-NLS-1$ FileOutputStream out = null; try { out = new FileOutputStream(filename); save(out, null); } finally { if (out != null) out.close(); } } COM: <s> saves the non default valued preferences known to this preference store </s>
funcom_train/5381025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float getFloat(Properties p, String name) { String value = p != null ? p.getProperty(name) : null; if (value == null) return FLOAT_DEFAULT_DEFAULT; float ival = FLOAT_DEFAULT_DEFAULT; try { ival = new Float(value).floatValue(); } catch (NumberFormatException e) { } return ival; } COM: <s> helper function gets float for a given name </s>
funcom_train/30172265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPingGW(byte[] idPing, byte[] idClient){ String idStr = Profile.idByteToString(idClient); synchronized (this.gwsList){ Profile pr = (Profile)gwsList.get(idStr); if(pr != null){ pr.addPing(idPing); } } } COM: <s> add ping gw </s>
funcom_train/36894674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void extractAllTrees(){ Vector<Tree> out = new Vector<Tree>(); ResultSet results = CDAOUtils.executeGetAllTreesQuery(schemaModel.add(instanceModel)); //ResultSetFormatter.out(System.out, results, query); for ( ; results.hasNext() ; ) { QuerySolution soln = results.nextSolution() ; Resource r= soln.getResource("treeResource"); Tree t = new Tree(r); trees.addTree(t); System.out.println("Tree resource : " + t.getResource()); } } COM: <s> private methods that finds all the tree resources in the data using reasoning </s>
funcom_train/3889227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateSchemaType_MaxLength(String schemaType, DiagnosticChain diagnostics, Map context) { int length = schemaType.length(); boolean result = length <= 100; if (!result && diagnostics != null) reportMaxLengthViolation(ImscpRootv1p1p2Package.Literals.SCHEMA_TYPE, schemaType, length, 100, diagnostics, context); return result; } COM: <s> validates the max length constraint of em schema type em </s>
funcom_train/3793331
/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 (this == obj) { // Step 1: Perform an == test (reference test) return true; } if (!(obj instanceof SeatableEntity)) { // Step 2: Instance of check return false; } SeatableEntity se = (SeatableEntity) obj; //Step 3: Cast argument if (_seat.equals(se.getSeat()) && _commanders.equals(se.getCommanders())) return true; return false; } COM: <s> returns true if both seatable entity have the same seat number </s>
funcom_train/3273474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float effectiveBatteryCapacityMax(){ float outputMax = 0; if(powerPlants != null) for(int powerPlant = 0; powerPlant < powerPlants.length; powerPlant++) { if (powerPlants[powerPlant].componentSize == Component.SPECIALIZED) { outputMax += powerPlants[powerPlant].outputMax; } } return outputMax; } COM: <s> get the effective max battery capacity </s>
funcom_train/883218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private void moveInstance(EntityInstance instanceToBeMoved, Link masterLink) throws MultipleParentException, CompositionCycleException, LinkCardinalityException, TypeMismatchException, DuplicateTargetException, VariantException, TargetIndexOutOfBoundsException { // moveInstance(instanceToBeMoved, masterLink, masterLink.getNumberOfTargets()); // } COM: <s> moves the instance instance to be moved to master link </s>
funcom_train/19392156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void applyEffect(long time) { frameNumber++; long totalTime = totalTime(); float fps = totalTime < 1000 ? 0 : frameNumber * 1000 / totalTime; int iteration = (int) (totalTime / duration()); target.setText( "time=" + time / 1000 + "s" + "; total=" + totalTime / 1000 + "s" + "; iteration=" + iteration + "; frame=" + frameNumber + "; fps= " + fps); } COM: <s> applies the animation effect sets a text for the time total time </s>
funcom_train/5445147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getString(int Index) { if ((Index < 1) || (Index >= ItemType.length) || (ItemType[Index] != CONSTANT_STRING)) throw new ClassFormatError("Constant pool item does not exist"); return getUtf8(((Integer)ItemValue1[Index]).intValue()); } COM: <s> get the string value of a string constant </s>
funcom_train/37817813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void algorithmFinished() { if (controller.isAVLMode()) controlPane.setAVLToggleEnabled(true); setPerformButtonsEnabled(false); setUndoButtonsEnabled(true); if (tree.getHeight() > 0) clearTreeAction.setEnabled(true); controlPane.setKeyInputEnabled(true); controlPane.validateKey(); controlPane.setMessage(controller.getResult(), INFORMATION_MESSAGE); controlPane.setAnimSpeedEnabled(false); // enable save buttons connector.setSavingBlocked(false); // for explanation of the following step, see DocuPane.update() setStepDirection(false); } COM: <s> sets the enable state of the buttons when an algorithm is finished </s>
funcom_train/15716226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getAllocatedRooms() { Vector v = new Vector(); Enumeration e = rooms.keys(); int roomNumber=0; while ( e.hasMoreElements() ) { roomNumber++; String s=(String)e.nextElement(); if ( ! isRoomFree( roomNumber ) ){ String n=""+roomNumber; v.add( n );}} return v;} COM: <s> returns vector of room </s>
funcom_train/11376406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private short determineReplication() { Range<Short> replicationAmountRange = getConfig().getReplication(); Range<Long> repRange = new Range<Long>(replicationAmountRange.getLower() .longValue(), replicationAmountRange.getUpper().longValue()); short replicationAmount = (short) Range.betweenPositive(getRandom(), repRange); return replicationAmount; } COM: <s> gets the replication amount </s>
funcom_train/48876131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder sb = new StringBuilder(); sb.append("######################### Memory Dump #########################"); sb.append("\nAddress\t\tValue"); for(Integer key: dmem.navigableKeySet()) { sb.append("\n#" + key + "\t\t" + dmem.get(key)); } sb.append("\n"); return sb.toString(); } COM: <s> returns a memory dump of all altered memory cells </s>
funcom_train/50142681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(byte[] data) throws IOException { try { lock.lockForWriting(); binary = true; FileOutputStream out = new FileOutputStream(getWritableFile()); out.write(data); out.close(); lastModified = System.currentTimeMillis(); } catch (Exception e) { e.printStackTrace(); } finally { lock.releaseWriterLock(); } } COM: <s> writes the given binary data to the cache file </s>
funcom_train/8467762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EUser getUser(Integer userId) { EntityManager em = getEntityManager(); try { em.getTransaction().begin(); EUser userx = em.find(EUser.class, userId); em.getTransaction().commit(); return userx; } finally { em.close(); } } COM: <s> finds and returns </s>
funcom_train/24348701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(Graphics2D g, Body body) { // Drehung und Offset auf dem Bildschirm bestimmen ROVector2f pos = body.getPosition(); g.setColor(Color.green); g.fill(new java.awt.geom.Ellipse2D.Double(pos.getX()-getRadius(), pos.getY()-getRadius(), 2*getRadius(), 2*getRadius())); } COM: <s> draw a circle in the world </s>
funcom_train/2818368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(ServletConfig config) throws ServletException { super.init(config); if (AceLicenseManager.getInstance() .licenseFeature("ace-contact-center") == false) { throw new ServletException(AceLicenseManager.getInstance() .getErrorMessage()); } String app_root = getServletContext().getRealPath(""); ContactCenterCustomerList bean = new ContactCenterCustomerList(); bean.setPath(app_root); getServletContext().setAttribute(CUSTOMER_BEAN, bean); } COM: <s> initializes the servlet </s>
funcom_train/12524514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int get(char[] key) { int index = hashCodeChar(key), length = this.keyTable.length; while (this.keyTable[index] != null) { if (CharOperation.equals(this.keyTable[index], key)) return this.valueTable[index]; if (++index == length) { // faster than modulo index = 0; } } return -1; } COM: <s> gets the object associated with the specified key in the </s>
funcom_train/47138430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int update(final SettlementInfo sinfo) { Object[] params = new Object[] { new Long(sinfo.getSettlementId()), new Long(sinfo.getPropertyPartId()), new Integer(sinfo.getHeadCount()), sinfo.getCreated(), new Timestamp(System.currentTimeMillis()), new Long(sinfo.getId()) }; return update(params); } COM: <s> update settlement info in database </s>
funcom_train/10190256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void terminate() { retransmission_to.halt(); clearing_to.halt(); end_to.halt(); if (stateIs(STATE_TRYING)) m_sipProvider.removeSipProviderListener(new TransactionIdentifier(SipMethods.INVITE)); else m_sipProvider.removeSipProviderListener(m_transactionID); changeState(STATE_TERMINATED); transaction_listener=null; } COM: <s> method used to drop an active transaction </s>
funcom_train/35278888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Geometry makeFloor() { Box box = new Box(new Vector3f(0, -4, -5), 15, .2f, 15); Geometry floor = new Geometry("the Floor", box); Material mat1 = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); mat1.setColor("Color", ColorRGBA.Gray); floor.setMaterial(mat1); return floor; } COM: <s> a floor to show that the shot can go through several objects </s>
funcom_train/22047251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { mLog.log(Level.DEBUG, "starting thread"); synchronized (mLock) { if (mThread == null) { mThread = new Thread(this, this.getClass().getName()); //allow to exit cleanly if the VM goes down mThread.setDaemon(true); } mThread.start(); mLog.log(Level.DEBUG, "started thread"); mLock.notify(); } } COM: <s> start the thread </s>