__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/49670795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void beforeQuickAccess(final MainMenu mainMenu) { for (final Plugin plugin : getActivePlugins()) { try { if (plugin.canHookBeforeQuickAccessList()) { plugin.beforeQuickAccess(mainMenu); } } catch (final Exception e) { log.error("Could not load plugin before quick access", e); } } } COM: <s> hooks in before quick access menu </s>
funcom_train/7644442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pushCallStack() { StackTraceElement[] eles = (new Throwable()).getStackTrace(); int i; for (i = 1; i < eles.length; i++) { if (!eles[i].getClassName().equals(this.getClass().getName())) { break; } } this.callStack.push(eles[i]); } COM: <s> pushes the call stack </s>
funcom_train/48909194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getRbTodos() { if (rbTodos == null) { rbTodos = new JRadioButton(); rbTodos.setBounds(new Rectangle(391, 15, 64, 25)); rbTodos.setText("Todos"); rbTodos.setOpaque(false); rbTodos.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { verificarSeleccion(); } }); } return rbTodos; } COM: <s> this method initializes rb todos </s>
funcom_train/3417850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getCurrentCodePointCount() { char c1 = text.current(); if (Character.isHighSurrogate(c1) && text.getIndex() < text.getEndIndex()) { char c2 = text.next(); text.previous(); if (Character.isLowSurrogate(c2)) { return 2; } } return 1; } COM: <s> returns the count of next character </s>
funcom_train/18876614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getStringValueAtIndex(int index, int nbBits) { int charSize = 6; String res = ""; //$NON-NLS-1$ for (int i = 0; i < nbBits; i+=charSize){ int b = getIntValueAtIndex(index + i, charSize); if (b != 0) { char c = b < 32 && b >= 0 ? (char)(b + 64) : (char)b; res = res + c; } else { break; } } return res; } COM: <s> extract the required text coded in 6 bits ascii from this </s>
funcom_train/44870223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMDrawStringBean getWCMDrawStringBean1() { if (WCMDrawStringBean1 == null) { WCMDrawStringBean1 = new WCMDrawStringBean(); WCMDrawStringBean1.setString("f (#) = # \ng (#) = #"); WCMDrawStringBean1.setValue2(getFValue()); WCMDrawStringBean1.setValue3(getXInput()); WCMDrawStringBean1.setValue4(getGValue()); WCMDrawStringBean1.setValue1(getXInput()); } return WCMDrawStringBean1; } COM: <s> this method initializes wcmdraw string bean1 </s>
funcom_train/32795349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanAllRwiElements() { CollectInstrumentedElementsVisitor ciev = new CollectInstrumentedElementsVisitor(); rwiElements = ciev.getAllInstrumentedElements(); conf.clean = true; for (int i = 0; i < rwiElements.length; i++) { addElementTypesToNode((RwiNode) rwiElements[i]); } run(); for (int i = 0; i < rwiElements.length; i++) { removeElementTypesFromNode((RwiNode) rwiElements[i]); } } COM: <s> cleans all elements that are currently instrumented by running the injector </s>
funcom_train/43988501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAdapterReflectsModelChanges() { ValueModel model = new ValueHolder(); SingleListSelectionAdapter adapter = new SingleListSelectionAdapter(model); for (int index : INDICES) { model.setValue(new Integer(index)); assertEquals("New adapter index", index, adapter.getMinSelectionIndex()); } } COM: <s> checks that changes to the underlying value model update the adapter </s>
funcom_train/49440508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String browseForFile(String startFile) { JFileChooser fc = new JFileChooser(startFile); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); int retVal = fc.showDialog(this, "Select file"); if (retVal==JFileChooser.APPROVE_OPTION) { return(fc.getSelectedFile().getAbsolutePath()); } return(null); } COM: <s> browses for a file </s>
funcom_train/890019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateText(Article article, Errors errors) { // While there are words in the list... Iterator iterator = wordList.iterator(); while (iterator.hasNext()) { // If text contains word String word = (String) iterator.next(); if (article.getText().indexOf(word) != -1) { log.error("Encountered word: " + word); errors.rejectValue("text", null, "Text contains Star-Trek word: " + word); } } } COM: <s> validates that the text does not contain words from the list </s>
funcom_train/37246776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertInstructionAt(Instruction instruction, int index) { instructions.insertElementAt(instruction, index); //set index of instruction instruction.setIndex((short)index); int size = instruction.getNumberOfUsedBytes(); //fill vector with dummy entries that indices are still correct for (int i=1; i<size; ++i) { instructions.insertElementAt(new Object(), index+1); } } COM: <s> insert an instruction at a given position </s>
funcom_train/44987173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void yetDone(long done) { //System.out.println("done: "+done); this.done = done; if(this.size>0L){ //long part = size/done; this.proz = (int)(100.0d/size*done); //owner.setStatus(""+proz+"%"); if(owner!=null) owner.getProgressBar().setValue(this.proz); }/* else{ this.progressBar.setValue(0); }*/ } COM: <s> setting the value </s>
funcom_train/38540478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateSize() { if(firstIntervalIdx == -1 && lastIntervalIdx == -1) { size = 0; return; } float min = getMin(); float max = getMax(); if (min == max) size = 1; else if (min > max) size = 0; else size = Integer.MAX_VALUE; } COM: <s> utility function to adjust size of set </s>
funcom_train/31667645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calculatePositions(final TreeMapNode root) { if (root == null) { return; } final List<TreeMapNode> v = root.getChildren(); if (v != null && !v.isEmpty()) { calculatePositionsRec(root.getX(), root.getY(), root.getWidth(), root.getHeight(), this.sumWeight(v), v); } } COM: <s> calculate the positions for all the elements of the root </s>
funcom_train/11011308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void process() throws IOException { MissingRecordAwareHSSFListener listener = new MissingRecordAwareHSSFListener(this); formatListener = new FormatTrackingHSSFListener(listener); HSSFEventFactory factory = new HSSFEventFactory(); HSSFRequest request = new HSSFRequest(); if(outputFormulaValues) { request.addListenerForAllRecords(formatListener); } else { workbookBuildingListener = new SheetRecordCollectingListener(formatListener); request.addListenerForAllRecords(workbookBuildingListener); } factory.processWorkbookEvents(request, fs); } COM: <s> initiates the processing of the xls file to csv </s>
funcom_train/36956061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IRegion getTextBlockFromSelection(ITextSelection selection, IDocument document) { try { IRegion line= document.getLineInformationOfOffset(selection.getOffset()); int length= selection.getLength() == 0 ? line.getLength() : selection.getLength() + (selection.getOffset() - line.getOffset()); return new Region(line.getOffset(), length); } catch (BadLocationException x) { // should not happen RubyPlugin.log(x); } return null; } COM: <s> creates a region describing the text block something that starts at </s>
funcom_train/2389150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCbxBusinessratio2() { if (cbxBusinessratio2 == null) { cbxBusinessratio2 = new JComboBox(); cbxBusinessratio2.setBounds(new Rectangle(238, 176, 171, 25)); cbxBusinessratio2.setEnabled(false); cbxBusinessratio2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { if (cbxBusinessratio1.getSelectedIndex() != 0) { cbxResult.setEnabled(true); } } }); //FillCombobox(cbxBusinessratio2); } return cbxBusinessratio2; } COM: <s> this method initializes cbx businessratio2 </s>
funcom_train/43875197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { Injector injector = Guice.createInjector(new CoreModule(), new AbstractModule() { @Override protected void configure() { bind(Engine.class).to(StandardEngine.class); } }); engine = injector.getInstance(Engine.class); engine.start(); } COM: <s> starts the workflow </s>
funcom_train/9641848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initContextMenu() { // initalize the context menu MenuManager menuMgr = new MenuManager(); menuMgr.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); Menu menu = menuMgr.createContextMenu(this.treeViewer.getTree()); this.treeViewer.getTree().setMenu(menu); getSite().registerContextMenu( "org.vikamine.eclipse.views.attributeNavigator.popup", menuMgr, this.treeViewer); getSite().setSelectionProvider(this.treeViewer); } COM: <s> inits the context menu </s>
funcom_train/50557606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAndPredicate(String field, Object value, int operator) { if (result == null){ result = getPredicate(field, value, operator); }else{ Predicate predicate = getPredicate(field, value, operator); result = Predicates.getIntersection(result, predicate); } } COM: <s> adds a feature to the and predicate attribute of the conditions object </s>
funcom_train/20845355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getCustomSerializer(String className){ ServiceTracker serviceTracker = null; try { serviceTracker = new ServiceTracker(AdapterActivator.CONTEXT, AdapterActivator.CONTEXT.createFilter("(osgi2dpwsObject="+className+")"),null); } catch (InvalidSyntaxException e) { e.printStackTrace(); } serviceTracker.open(); Object serializer = serviceTracker.getService(); return serializer; } COM: <s> returns the serializer of the given class name </s>
funcom_train/46695295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBuildingStatus() { System.out.println("buildingStatus"); ActorByMode instance = new ActorByMode(); assertEquals(State.UNINITIALIZED,instance.buildingStatus()); instance.buildQuery("", "", false); assertEquals(State.READY,instance.buildingStatus()); } COM: <s> test of building status method of class actor by mode </s>
funcom_train/10149721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSqlServerResultSet(final short ssDT, final short colType, final String colName) { if (colType == DatabaseMetaData.procedureColumnReturn ) { final String prompt = "Does this procedure return a result set?"; final String title = "Result Type Confirmation"; final int buttonNumber = ControlFactory.showConfirmDialog(prompt, title, false); return buttonNumber == 0; } return false; } COM: <s> this method checks for sql server specific limitations about use of </s>
funcom_train/18746975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CtrlAut buildWhileDo(CtrlAut first, CtrlAut second) { // get the automaton guard before the omegas are removed CtrlGuard firstGuard = first.getInitGuard(); // sequentially compose first and second buildSeq(first, second); return buildLoop(first, firstGuard); } COM: <s> constructs a while automaton using a given automaton as condition </s>
funcom_train/29019366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground) { draw(gc, x, y, selectionStart, selectionEnd, selectionForeground, selectionBackground, 0); } COM: <s> draws the receivers text using the specified gc at the specified </s>
funcom_train/35321133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void firePropertyChange(String propertyName, Object oldValue, Object newValue) { if (oldValue == null || newValue == null || !oldValue.equals(newValue)) { firePropertyChange(new PropertyChangeEvent(this.source, propertyName, oldValue, newValue)); } } COM: <s> reports a bound property update to listeners </s>
funcom_train/49938440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void executeCall(final HttpRequestBase pRequest, final HttpClient pClient) { HttpResponse response; try { response = pClient.execute(pRequest, HTTP_CONTEXT); if (response.getEntity() != null) { response.getEntity().consumeContent(); } } catch (IOException e) { throw new RuntimeException("Unable to execute request", e); } } COM: <s> p refactoring once and only once 3o </s>
funcom_train/3409151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean implies(Permission permission) { if (hasAllPerm) { // internal permission collection already has AllPermission - // no need to go to policy return true; } if (!staticPermissions && Policy.getPolicyNoCheck().implies(this, permission)) return true; if (permissions != null) return permissions.implies(permission); return false; } COM: <s> check and see if this protection domain implies the permissions </s>
funcom_train/46336396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetElements() { System.out.println("getElements"); OpbComment instance = new OpbComment(""); List<Map<String, String>> expResult = new ArrayList<Map<String, String>>(); List<Map<String, String>> result = instance.getElements(); assertEquals(expResult, result); } COM: <s> test of get elements method of class opb comment </s>
funcom_train/18068155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateGameFieldCanvas() { // Update the contents of Game Field this.createBufferStrategy(2); bufferStrategy = this.getBufferStrategy(); Graphics g = bufferStrategy.getDrawGraphics(); Graphics2D g2 = (Graphics2D) g; renderGameField(g2); bufferStrategy.show(); } COM: <s> update the game field gui with the contents in game field matrix </s>
funcom_train/11514107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TestSuite make() { this.result = new TestSuite(); this.prefix = getBaseName(startingClass); result.setName(prefix); BulkTest bulk = makeFirstTestCase(startingClass); ignored = new ArrayList<String>(); String[] s = bulk.ignoredTests(); if (s != null) { ignored.addAll(Arrays.asList(s)); } make(bulk); return result; } COM: <s> makes a hierarchal test suite based on the starting class </s>
funcom_train/3116264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCloseButtonEnabled(boolean flag) { if (flag) { addWindowListener(winListener); } else { WindowListener[] wls = (WindowListener[])(this.getListeners(WindowListener.class)); for (int i = 0; i < wls.length; i++) { removeWindowListener(wls[i]); } } } COM: <s> enables or disables the close button </s>
funcom_train/32780281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNumber(int n) { // check the new number for the lane if (n < 0) { sendWarning("The given number is " + "wrong.", getClass().getName() + ": " + getQuotedName() + ", Method: setNumber( " + "int n)", "Tne type that is negative does not make sense.", "Make sure to provide a positive value for the number " + "for the Lane to be changed."); return; } this.number = n; } COM: <s> sets the number of this lane to a new value </s>
funcom_train/300325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String resolveTagNameForClass(Class tagClass) { String className = getUnqualifiedClassName(tagClass); if (className.endsWith("Tag")) { String firstCharInLowerCase = className.substring(0, 1).toLowerCase(); return firstCharInLowerCase + omitFirstCharAndLastThreeChars(className); } return className; } COM: <s> given a tag handler code class code returns its i tag name i </s>
funcom_train/31477978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void commandUseItem() throws IOException { Item item = World.getInstance().getItemTable().getItem(in.readInt()); if (controller.isCombatMode()) { if (item instanceof Character) { player.execute(new AttackAction(1000, (Character)item)); // TODO: read attack duration } else { System.out.println("Attacking allowed on characters only (will be changed later)"); } } else { player.use(item); } sendOk(); } COM: <s> reads one id and makes the player use the item </s>
funcom_train/51011085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readArticles() throws Exception { try { Connection con = connect(); try { con.setReadOnly(true); if (board == null) board = bdb.getNewsBoard(con, bid); // redundant results = adb.getArticles(con, bid); } finally { con.close(); } } catch (Exception e) { Log.error(e); results = null; throw e; } } COM: <s> reads the selected portion of articles chronologically </s>
funcom_train/14240887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPackage(MPackage newPackage) { if(!isInDiagram(newPackage)) { GraphModel gm = Globals.curEditor().getGraphModel(); LayerPerspective lay = (LayerPerspective)getEditor().getLayerManager().getActiveLayer(); FigPackage newPackageFig = new FigPackage( gm, newPackage); getEditor().add( newPackageFig); lay.putInPosition( (Fig)newPackageFig); getEditor().damaged( newPackageFig); } } COM: <s> add a package to the current diagram </s>
funcom_train/4467063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createDojoWidget() throws Exception { JavaScriptObject jsStartDate = startDate == null ? null : DateUtil.getJSDate(startDate); JavaScriptObject jsEndDate = endDate == null ? null : DateUtil.getJSDate(endDate); this.dojoWidget = createDatePicker(jsStartDate, jsEndDate); } COM: <s> create the dojo widget to choose a date from a calendar </s>
funcom_train/19179898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rebuildSQLListing(java.util.List queries) { historyQueries = new ArrayList(); historyPosition = -1; querySelection.removeAllItems(); for (int loop = 0; loop < queries.size(); ++loop) { addToCombo(querySelection, queries.get(loop)); } } COM: <s> reloads the list of queries in the combobox </s>
funcom_train/18455477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUniqueGlobalKeys() { List allGlobalKeys = Algs.collect(Algs.flatten(Algs.map(ATTRS, new Function() { public Object[] with(Class attrCls) { return GraphLayoutAttrs.newBuilder(attrCls).globalKeys(); }}))); assertEquals(new HashSet(allGlobalKeys).size(), allGlobalKeys.size()); } COM: <s> p tests that all the known global attribute keys are unique </s>
funcom_train/9480930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void log(Level logLevel, String msg, Throwable thrown) { if (!internalIsLoggable(logLevel)) { return; } LogRecord record = new LogRecord(logLevel, msg); record.setLoggerName(this.name); record.setThrown(thrown); setResourceBundle(record); log(record); } COM: <s> logs a message of the specified level with the supplied </s>
funcom_train/25710173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int runRemovegaps() { String[] command = { binaryDirectory + "removegaps" + binaryExtension, workingDirectory + "sequencesfasta.txt", workingDirectory + "numbers.dat", workingDirectory + "fasta.dat", Boolean.toString(masterVariables.getDebug()) }; return runApplication("Remove Gaps", command, true); } COM: <s> run the removegaps program </s>
funcom_train/48702001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStatus(String newStatus, MyProfile my) throws Exception { String hash = Hash.SHA1(DHTProtocol.PREFIX_USERSTATUS + my.getFUID()); OpenDHT.put(ips, hash, RSA.sign(newStatus, RSA.toPrivateKey(my.getPrivateKey()), null), OpenDHT.MAX_TTL); } COM: <s> update your own status </s>
funcom_train/41399971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setList(List list) { int indexOld = delegate.size() - 1; int indexNew = list.size() - 1; this.delegate = list; fireIntervalRemoved(this, 0, indexOld); fireIntervalAdded(this, 0, indexNew); } COM: <s> sets the code java </s>
funcom_train/8629497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void debugCodeAssign(String className, int type, int id, String value) { if (trace.isDebugEnabled()) { trace.debugCode(className + " " + PREFIX[type] + id + " = " + getTraceObjectName() + "." + value + ";"); } } COM: <s> write trace information as an assignment in the form </s>
funcom_train/3653669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void install() { Connection conn = null; try { conn = getDataSource().getConnection(); installScript.execute(conn); } catch (SQLException e) { throw new DatabaseException(e); } finally { try { if (null != conn) { conn.close(); } } catch (SQLException e) { } } } COM: <s> if the database has been configured with an installation </s>
funcom_train/33601529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restart() { Logger.println("(ExecutionManager.restart) Starting execution manager"); stoppedMsgsLock.lock(); this.stopped = false; //process stopped messages while (!stoppedMsgs.isEmpty()) { acceptor.processMessage(stoppedMsgs.remove()); } stoppedMsgsLock.unlock(); Logger.println("(ExecutionManager.restart) Finished stopped messages processing"); } COM: <s> restarts this execution manager </s>
funcom_train/29528681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hammingDistance(Solution solutionOne, Solution solutionTwo) { int distance = 0; for (int i = 0; i < problem_.getNumberOfVariables(); i++) { distance += ((Binary)solutionOne.getDecisionVariables()[i]). hammingDistance((Binary)solutionTwo.getDecisionVariables()[i]); } return distance; } // hammingDistance COM: <s> calculate the hamming distance between two solutions </s>
funcom_train/33161913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deselectAll( Graph graph ) { // deselect all nodes Iterator iterator = graph.getNodes().iterator() ; while ( iterator.hasNext() ) { ((GraphNode)iterator.next()).unhighlight() ; } // deselect all connections iterator = graph.getConnections().iterator() ; while ( iterator.hasNext() ) { ((GraphConnection)iterator.next()).unhighlight() ; } } COM: <s> unhighlights all nodes and connections in the graph </s>
funcom_train/19421809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reload() { EaasyStreet.logTrace(METHOD_IN + className + RELOAD_METHOD); if (!StringUtils.nullOrBlank(className)) { String attributeName = className + ".optionListSourceMap"; EaasyStreet.removeContextAttribute(attributeName); EaasyStreet.logInfo("OptionListSourceFactoryBase: removing context attribute \"" + attributeName + "\"."); } EaasyStreet.logTrace(METHOD_OUT + className + RELOAD_METHOD); } COM: <s> p removes all cached option list source objects forcing a new </s>
funcom_train/3113213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateDistances(MouseEvent evt) { int dx = Math.abs(pressedX - evt.getX()); int dy = Math.abs(pressedY - evt.getY()); if (dx > distX) { distX = dx; } if (dy > distY) { distY = dy; } } // of updateDistances COM: <s> calculate the farthest we have been since we pressed the mouse </s>
funcom_train/2309284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createInstance(String user, String password, String instance, String description) { try { validateUser(user, password); AdminDatabase.instance().validateNewInstance(instance); setPandora(Pandora.createInstance()); getPandora().memory().createMemory(instance); getPandora().memory().switchMemory(instance); setInstance(AdminDatabase.instance().createInstance(instance, user, description)); new Bootstrap().bootstrapMemory(getPandora().memory()); } catch (Exception failed) { failed.printStackTrace(); this.error = failed; return; } setConnected(true); } COM: <s> create a new pandora instance </s>
funcom_train/7689120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calcMaxTick() { // Find the nearest multiple of majorTick above maxData if (maxData == 0) { maxTick = 0; } else if (maxData < 0.0) { // Added so that negative values are handled correctly -- AJD maxTick = -Math.floor(-maxData / majorTick) * majorTick; } else { maxTick = Math.ceil(maxData / majorTick) * majorTick; } } COM: <s> calculate the optimum maximum tick </s>
funcom_train/51103238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getGroupByAttributes() { List list = new ArrayList(); Iterator it = super.getAttributes().iterator(); while (it.hasNext()) { DerivedDbAttribute attr = (DerivedDbAttribute) it.next(); if (attr.isGroupBy()) { list.add(attr); } } return list; } COM: <s> returns attributes used in group by as an unmodifiable list </s>
funcom_train/36951626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String resolveToOSPath(IPath path) { if (path != null) { IResource res = null; if (path.getDevice() == null) { // if there is no device specified, find the resource res = getResource(path); } if (res == null) { return path.toOSString(); } IPath location = res.getLocation(); if (location != null) { return location.toOSString(); } } return null; } COM: <s> returns the os path for the given aboslute or workspace relative path </s>
funcom_train/31069669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeProperties(Properties properties) throws PropertyException { properties.setStringProperty(Constants.PK_COMPONENT_DESCRIPTION, component.getDescription()); properties.setStringProperty(Constants.PK_COMPONENT_VERSION, component.getVersion()); // properties.setObjectProperty(PersistenceConstants.PK_COMPONENT_PRODUCER, component.getProducer()); } COM: <s> update the properties with the embedlet variables </s>
funcom_train/47906393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeComponent() { titleBar.setPadding(tm.getTitlebarPadding()); titleBar.setWidth(width); titleBar.setPosition(0, 0); titleBar.prepareComponent(); baseContainer = new StackedContainer(); baseContainer.setPosition(0, titleBar.getHeight()); baseContainer.setWidth(width); baseContainer.setView(this); baseContainer.prepareComponent(); } COM: <s> initializes the internal fields and the layout of the form </s>
funcom_train/44572607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verifyAbruptSpecBody(JmlSpecBodyClause[] clauses) { boolean result = true; for (int i = 0; i < clauses.length; i++) if (!clauses[i].isAbruptSpecBody()) { utility.reportTrouble( new PositionedError( clauses[i].getTokenReference(), JmlMessages.BAD_ABRUPT_SPEC_BODY )); result = false; } return result; } COM: <s> returns true if all elements of the argument are abrupt spec </s>
funcom_train/46840791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getOpenFileName(File path) { File file = getFile(path, true); if (file != null) { file = addExtension(file); if (!file.exists()) { JOptionPane.showMessageDialog(null, "File does not exist: " + file.getAbsolutePath(), "Error!", JOptionPane.ERROR_MESSAGE); return null; } } return file; } COM: <s> returns file for open operation or null if the file does not exist </s>
funcom_train/34131884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void remove( InputPane pane) { if (DEBUG) System.out.println( "InputView.remove( "+pane+")"); tabs.remove( pane); pane.cleanup(); views.removeElement( pane); parent.updateSelectedView(); if ( views.size() == 0) { // Workaround for paint bug! tabs.setTabLayoutPolicy( JTabbedPane.WRAP_TAB_LAYOUT); tabs.setTabLayoutPolicy( JTabbedPane.SCROLL_TAB_LAYOUT); } } COM: <s> removes a view from the list of views </s>
funcom_train/11321582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HtmlStringBuffer append(Object value) { String string = String.valueOf(value); int length = string.length(); int newCount = count + length; if (newCount > characters.length) { expandCapacity(newCount); } string.getChars(0, length, characters, count); count = newCount; return this; } COM: <s> append the raw object value of the given object to the buffer </s>
funcom_train/29617964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJAccessionNumberField() { if (jAccessionNumberField == null) { jAccessionNumberField = new MgisTextField(); jAccessionNumberField.setFieldType(MgisTextField.FIELDTYPE_NUMERIC); jAccessionNumberField.setDocument(jAccessionNumberField.new JTextFieldLimit(4, false)); jAccessionNumberField.setBounds(239, 52, 30, 20); } return jAccessionNumberField; } COM: <s> this method initializes j accession number field </s>
funcom_train/29849894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPair(int nodeOfPatternGraph, int nodeOfTargetGraph) { coreSetOfPatternGraph[nodeOfPatternGraph] = nodeOfTargetGraph; coreSetOfTargetGraph[nodeOfTargetGraph] = nodeOfPatternGraph; currentLengthOfCore++; int k; for (k = currentLengthOfCore; k < numberOfNodesInPatternGraph; k++) { compatibilityMatrix[k][nodeOfTargetGraph] = false; } refine(); } COM: <s> adds the pair to the core set of the state </s>
funcom_train/26387388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readInt() throws RiffFormatException { try { if (littleEndian) { return in.read() << 0 | in.read() << 8 | in.read() << 16 | in.read() << 24; } else { return in.read() << 24 | in.read() << 16 | in.read() << 8 | in.read() << 0; } } catch (IOException ex) { throw new RiffFormatException(ex); } } COM: <s> read an integer </s>
funcom_train/16643436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addResourceBundle(final String bundleName) { LOGGER.trace("Add the resource bundle {}", bundleName); final ClassLoader loader = Thread.currentThread().getContextClassLoader(); final ResourceBundle bundle = ResourceBundle.getBundle(bundleName, locale, loader); if (bundle != null) { bundles.add(bundle); } } COM: <s> adds the resource bundle </s>
funcom_train/3920183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActivityRef createActivityRef(LD_DataComponent dc) { ActivityRef activityRef = null; if(dc instanceof LearningActivity) { activityRef = new LearningActivityRef((LearningActivity)dc); } else if(dc instanceof SupportActivity) { activityRef = new SupportActivityRef((SupportActivity)dc); } else if(dc instanceof ActivityStructure) { activityRef = new ActivityStructureRef((ActivityStructure)dc); } return activityRef; } COM: <s> create an activity ref from a component </s>
funcom_train/47236045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cobrarFactura() throws Exception { int[] LlistaParaFacturar = vnf.getListaParaFacturar(); int i; if (LlistaParaFacturar.length != 0) { cf.clearConceptesFactura(); for (i = 0; i < LlistaParaFacturar.length; i++) { cf.addConcepteFactura(LlistaParaFacturar[i]); } cf.facturaNova(); vf.bSync.doClick(); } finalizaNuevaFactura(0); } COM: <s> cobrar la factura </s>
funcom_train/32062721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createLookAndFeel() { l.finest("Creating the look and feel..."); LookAndFeel laf=new OmniConLookAndFeel(); boolean installed=false; for(LookAndFeelInfo i:UIManager.getInstalledLookAndFeels()) if(i.getClassName()==laf.getClass().getName()) installed=true; if(!installed) UIManager.installLookAndFeel(laf.getName(), laf.getClass().getName()); } COM: <s> configures the look and feel and installs any extra ones </s>
funcom_train/937885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void previousMonth() { final int month = getMonth(); if (month == 0) { setMonth(11); fireYearChangeListenerYearDecreased(new YearChangeEvent(this)); } else { setMonth(month - 1); } fireChangeListenerStateChanged(new ChangeEvent(this)); } COM: <s> changes to the previous month </s>
funcom_train/1174569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scaleWithGetScaledInstance(Graphics2D g2, ScalingInfo info, int hints) { Image srcImage = getSourceImage(info); Image scaledImage = srcImage.getScaledInstance(info.targetWidth, info.targetHeight, hints); g2.drawImage(scaledImage, info.x, info.y, null); } COM: <s> p scale with get scaled instance </s>
funcom_train/13385198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MediumFileTO createMTOfromRS(ResultSet rs) throws SQLException { MediumFileTO obj = new MediumFileTO(); obj.mod = VectorTime.parse(rs.getString(TABLE_MEDIUMFILES_MODVECTOR)); obj.relPath = rs.getString(TABLE_MEDIUMFILES_RELPATH); obj.filename = rs.getString(TABLE_MEDIUMFILES_NAME); obj.syncTime = VectorTime.parse(rs .getString(TABLE_MEDIUMFILES_SYNCVECTOR)); obj.digest = rs.getString(TABLE_MEDIUMFILES_DIGEST); obj.size = rs.getLong(TABLE_MEDIUMFILES_SIZE); return obj; } COM: <s> create medium file to object from sql result set </s>
funcom_train/23288119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Graphics g) { dbImage = createImage(this.getSize().width, this.getSize().height); dbg = dbImage.getGraphics(); dbg.setColor(getBackground()); dbg.fillRect(0, 0, this.getSize().width, this.getSize().height); dbg.setColor(getForeground()); paint(dbg); g.drawImage(dbImage, 0, 0, this); } COM: <s> double buffering to prevent flickers </s>
funcom_train/43827470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GlobalReferenceDeclaration_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GlobalReferenceDeclaration_name_feature", "_UI_GlobalReferenceDeclaration_type"), DeclarationPackage.Literals.GLOBAL_REFERENCE_DECLARATION__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the name feature </s>
funcom_train/35220261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getFirstDayOfWeek() { switch(Calendar.getInstance().getFirstDayOfWeek()) { case Calendar.SUNDAY: return 0; case Calendar.MONDAY: return 1; case Calendar.TUESDAY: return 2; case Calendar.WEDNESDAY: return 3; case Calendar.THURSDAY: return 4; case Calendar.FRIDAY: return 5; case Calendar.SATURDAY: return 6; } return -1; } COM: <s> gets the first day of the current week </s>
funcom_train/10591249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SourceProperty getSourceProperty(String uri, String name) throws SourceException { SourceProperty property = null; if (m_delegate instanceof InspectableSource) { property = ((InspectableSource) m_delegate).getSourceProperty(uri,name); } if (property == null && m_descriptor != null) { property = m_descriptor.getSourceProperty(m_delegate,uri,name); } return property; } COM: <s> get the source property on the wrapped source </s>
funcom_train/39001633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean enqueue(Object newObj) { synchronized (this) { if (numberOfElements < dataArray.length) { dataArray[tailIndex] = newObj; tailIndex++; tailIndex %= dataArray.length; numberOfElements++; this.notify(); //wake up a consumer thread return true; } else { this.notify(); //wake up a consumer thread return false; } } } COM: <s> puts a new object into the queue if it is not full </s>
funcom_train/125781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private VarNameSelector getTrendShiftName() { if (trendShiftName == null) { trendShiftName = new VarNameSelector(); trendShiftName.setEnabled(false); trendShiftName.setLocation(185, 212); trendShiftName.setSize(150, 20); trendShiftName.setVarName("trendshift"); } return trendShiftName; } COM: <s> this method initializes trend shift name </s>
funcom_train/2885651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isDeploymentSupported() throws SmartFrogException, IOException { if (!(controller instanceof DynamicSmartFrogClusterController)) { return false; } DynamicSmartFrogClusterController clusterController = getSfController(); return clusterController.isFarmerAvailable() && clusterController.getFarmer().isDeploymentServiceAvailable(); } COM: <s> test for deployment being supported </s>
funcom_train/23852101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getBitVectorLength(HierarchicalClusterNode<S> node) throws ClusteringException { logger.trace("Entering getBitVectorLength"); Preconditions.checkArgument(isSinglePropertyDistance()); PropertyDefinition propDef = propertyVector.iterator().next(); return node.getContent().getBitFingerprintLength(propDef); } COM: <s> extracts the bit vector length from a bit vector container </s>
funcom_train/49670629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createShell(final String title) { shell = new Shell(TrayManager.getInstance().getShell(), SWT.SHELL_TRIM | SWT.DOUBLE_BUFFERED); shell.setLocation(shell.getParent().toDisplay(100, 100)); shell.setImage(IconFactory.getInstance() .getUncachedIcon("hawkscope16.png")); shell.setText(title); shell.setLayout(SharedStyle.LAYOUT); shell.layout(); } COM: <s> creates the main </s>
funcom_train/4111535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedTab(char c) { if (Character.isLetter(c)) { this.setSelectedIndex((Character.toUpperCase(c) - 'A')); } else { this.setSelectedIndex(this.getTabCount() - 1); } setupDocument(this.getSelectedTextPane()); } COM: <s> sets the tab of this alphabetical tab pane to </s>
funcom_train/46155681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyComponentsDisplayChanged(DisplayMode newMode){ logger.info("[ANNO PLUGIN] notify listeners of display change, new state is: " + newMode ); for(AnnotationComponent ac: componentListeners){ logger.info("[ANNO PLUGIN] notifying.."); ac.setLocalDisplayMode(newMode); } } COM: <s> notify all components of the new global display policy </s>
funcom_train/50205068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JPanel createButtonComponent (String label, ActionListener al, IfcSaveableComponent saver) { JPanel msgPanel1 = new JPanel(); msgPanel1.setBorder(BorderFactory.createEmptyBorder(8,8,8,8)); msgPanel1.setLayout(new GridLayout(0,1,8,8)); JButton button = new JButton (label); button.addActionListener(al); msgPanel1.add (button); registerAlterButtonListener (button, saver); return msgPanel1; } COM: <s> creates a buttoncomponent and register it to handle editing </s>
funcom_train/3393378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int errorCount() { if (delegateCompiler != null && delegateCompiler != this) return delegateCompiler.errorCount(); else { if (werror && log.nerrors == 0 && log.nwarnings > 0) { log.error("warnings.and.werror"); } return log.nerrors; } } COM: <s> the number of errors reported so far </s>
funcom_train/21963871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValue() { String testString = "more random words; take that!"; StringCharacterStream stream = new StringCharacterStream(testString); StringBuffer temp = new StringBuffer(); while (stream.hasNext()) { temp.append(stream.getNext()); } assertEquals(testString,temp.toString()); } COM: <s> tests to make sure that the data that is iterated out matches that </s>
funcom_train/45718786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toStringOf(String elementName, Object element) { try { StringWriter writer = new StringWriter(); XmlSerializer serializer = Xml.createSerializer(); serializer.setOutput(writer); serialize(serializer, elementName, element, false); return writer.toString(); } catch (IOException e) { throw new IllegalArgumentException(e); } } COM: <s> shows a debug string representation of an item entity </s>
funcom_train/44848668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerMenuContributions(IExtendibleMenuContributions inContributions) { for (IExtendibleMenuContribution lContribution : inContributions.getContributions()) { String lMenuID = lContribution.getExtendibleMenuID(); ExtendibleMenuHandler lExtendibleMenu = extendibleMenus.get(lMenuID); if (lExtendibleMenu == null) { extendibleMenus.put(lMenuID, new ExtendibleMenuHandler(lContribution)); } else { lExtendibleMenu.addContribution(lContribution); } } } COM: <s> registers the contributions to the extendible menus </s>
funcom_train/21503576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRealizedSubsystemPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SubsystemRealization_realizedSubsystem_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SubsystemRealization_realizedSubsystem_feature", "_UI_SubsystemRealization_type"), DMLPackage.Literals.SUBSYSTEM_REALIZATION__REALIZED_SUBSYSTEM, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the realized subsystem feature </s>
funcom_train/28617278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JMenu createColorMenu(String title, String attribute) { CommandMenu menu = new CommandMenu(title); for (int i=0; i<ColorMap.size(); i++) menu.add( new ChangeAttributeCommand( ColorMap.name(i), attribute, ColorMap.color(i), view() ) ); return menu; } COM: <s> creates the color menu </s>
funcom_train/12156938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CachingResponseWrapper createCachingResponse(boolean isNone) { HttpServletResponseMock servletResponse = new HttpServletResponseMock("servletResponse", expectations); if (isNone) { servletResponse.expects.setContentType("TEXT").any(); servletResponse.expects.getWriter().returns( new PrintWriter(new ByteArrayOutputStream())); } servletResponse.expects.getCharacterEncoding().returns("ISO-8859-1"); return new CachingResponseWrapper(servletResponse); } COM: <s> create a caching response wrapper to be used by the test </s>
funcom_train/34628682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buf = new StringBuffer(); int n = size(); for (int i=0; i<n; i++) { buf.append(elementAt(i)); if ( (i+1)<n ) buf.append(" "); } return buf.toString(); } COM: <s> return string of current buffer contents non destructive </s>
funcom_train/37570768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getUser(Id userId) throws ModelException { try { Integer id = ((IntegerIdImpl)userId).integerValue(); EJBUser user = m_userHome.findByPrimaryKey(id); return user.toVO(); } catch (Exception exception) { throw new ModelException("The EJBUserFacadeBean did not find a User entity for ID " + userId + "."); } } COM: <s> return a user object by its id </s>
funcom_train/38388306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void procedurecolumns(PyObject qualifier, PyObject owner, PyObject procedure, PyObject column) { clear(); String q = getMetaDataName(qualifier); String o = getMetaDataName(owner); String p = getMetaDataName(procedure); String c = getMetaDataName(column); try { this.fetch.add(getMetaData().getProcedureColumns(q, o, p, c)); } catch (SQLException e) { throw zxJDBC.newError(e); } } COM: <s> gets the columns for the procedure </s>
funcom_train/43410475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteMoradas(int entidadeID) { try { Statement stmt = (Statement) con.createStatement(); String query = "delete from moradas where entcod=" + entidadeID; stmt.executeUpdate(query); stmt.close(); } catch (Exception e) { logger.log(Level.SEVERE, e.getStackTrace()[0].getMethodName() + "**" + lg + "** ", e); } } COM: <s> removes all addresses of an entity in db </s>
funcom_train/2845067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void chainAnnotations(Annotation a, Annotation b) { getAnnotationFile().setSaved(false); if (prevMap.get(a) == null) { heads.add(a); } nextMap.put(a, b); prevMap.put(b, a); } COM: <s> creates a chain between the two specified annotations </s>
funcom_train/17092173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Spacer getSpacer() { if (spacer == null) {//GEN-END:|32-getter|0|32-preInit // write pre-init user code here spacer = new Spacer(16, 1);//GEN-LINE:|32-getter|1|32-postInit // write post-init user code here }//GEN-BEGIN:|32-getter|2| return spacer; } COM: <s> returns an initiliazed instance of spacer component </s>
funcom_train/37740235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProcessWrapper getProcess () throws RemoteException { if (wrappedProcessCache == null) { WorkflowService wfs = WorkflowServiceConnection .instance("workflowServiceConnection").getWorkflowService(); wrappedProcessCache = new ProcessMutableWrapper (wfs, processMgr, processKey); } return wrappedProcessCache; } COM: <s> return the selected process </s>
funcom_train/20727264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addSendMessageThread(String userName,SendMessageThread thread) { synchronized (userSendMessageThreadMap) { LinkedList<SendMessageThread> threadList = userSendMessageThreadMap.get(userName); if (threadList != null) { // add message to activ list threadList.add(thread); } else { // create new list threadList = new LinkedList<SendMessageThread>(); threadList.add(thread); userSendMessageThreadMap.put(userName, threadList); } return threadList.size(); } } COM: <s> for each user a list of all thread which are currently sending </s>
funcom_train/40007388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetInstructorDAO() { System.out.println("setInstructorDAO"); InstructorDAO instructorDAO = null; InstructorServiceImpl instance = new InstructorServiceImpl(); instance.setInstructorDAO(instructorDAO); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set instructor dao method of class instructor service impl </s>
funcom_train/15555674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getHorizontalSplitPane1_2() { if (horizontalSplitPane1_2 == null) { horizontalSplitPane1_2 = new JSplitPane(); horizontalSplitPane1_2.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); horizontalSplitPane1_2.setDividerLocation(80); horizontalSplitPane1_2.setTopComponent(getStepInformationPanel()); horizontalSplitPane1_2.setBottomComponent(getExecutionPanel()); horizontalSplitPane1_2.setDividerSize(5); } return horizontalSplitPane1_2; } COM: <s> this method initializes horizontal split pane1 2 </s>