__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/49262722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isItemEmpty(final TreeItem item, final int level) { if (item != null && !getValue(item).isEmpty()) { return false; } if (level == 0) { return true; } TreeItem[] items; if (item == null) { items = tree.getItems(); } else { items = item.getItems(); } for (TreeItem child : items) { if (!isItemEmpty(child, level - 1)) { return false; } } return true; } COM: <s> determines if an item value is null and has no valued child </s>
funcom_train/14228176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Call createCall() throws InvalidStateException, PrivilegeViolationException, MethodNotSupportedException, ResourceUnavailableException { FreeCall ret = null; if (this.getState() == Provider.IN_SERVICE) { ret = new FreeCall(); ret.setProvider(this); this.getCallMgr().preRegister(ret); } else { throw new InvalidStateException(this, InvalidStateException.PROVIDER_OBJECT, this.getState()); } return ret; } COM: <s> create a new call object </s>
funcom_train/29587999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void shuffle(int[] array, Random random) { int l = array.length; for (int i = 0; i < l; i++) { int index = random.nextInt(l-i) + i; int temp = array[index]; array[index] = array[i]; array[i] = temp; } } COM: <s> shuffles an array </s>
funcom_train/34282821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Token modelToToken(int offs) { if (offs>=0) { try { int line = getLineOfOffset(offs); Token t = getTokenListForLine(line); while (t!=null && t.isPaintable()) { if (t.containsPosition(offs)) { return t; } t = t.getNextToken(); } } catch (BadLocationException ble) { ble.printStackTrace(); // Never happens } } return null; } COM: <s> returns the token at the specified position in the model </s>
funcom_train/6453603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rule getRule(String theName) { int colonIndex = theName.indexOf("::"); Rule localRule; if(colonIndex == -1) { localRule = (Rule) rules.get(theName); if(localRule == null) localRule = getDefaultRuleSet(); return localRule; } return Modes.resolveDelegate(this, theName); } COM: <s> answer the named rule </s>
funcom_train/46470500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChannel(int channel, String value) { int tries = 0; while (true) { try { tries++; postCommand(channel + "@" + value); return; } catch (ConnectException c) { try { Thread.sleep(25); } catch (InterruptedException e) { e.printStackTrace(); } // Try again if (tries > 1) return; } catch (IOException ioe) { System.err.println("DMX: " + ioe); return; } } } COM: <s> issues a command to the dmx server to set the specified channel </s>
funcom_train/43607512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field fieldInstance(FieldInstance fi) { /* if (! fi.type().isCanonical()) { throw new InternalCompilerError("Type of " + fi + " in " + fi.container() + " is not canonical."); } */ Field_c n = (Field_c) copy(); n.fi = fi; return n; } COM: <s> set the field instance of the field </s>
funcom_train/39001307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(byte packet[]) { short groupId; int length = (int) packet[5]; byte data[] = new byte[length]; for (int loop = 0; loop < length; loop++) { data[loop] = packet[loop + 8]; } groupId = packet[6]; print(data, groupId); } COM: <s> this function works as follows </s>
funcom_train/48617764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String execute() throws Exception { log.debug("Get news items"); newsItems = newsHelper.getNewsItems(type, newsService, currentNewsItemLocation); currentNewsItemLocation = newsHelper.getCurrentLocation(); newsItemCount = newsHelper.getNewsItemCount(); return SUCCESS; } COM: <s> allows a file to be downloaded </s>
funcom_train/10681095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isClassIn(String className) { if (false == isClassName(className)) { return false; } if (classSet.containsKey(className)) { return true; } Iterator<String> i = packList.iterator(); while (i.hasNext()) { String packName = i.next(); if (packName.substring(0, packName.lastIndexOf('*')) .equals(className.substring(0, className.lastIndexOf('.') + 1))) { return true; } } return false; } COM: <s> decide whether a class name exists in the set </s>
funcom_train/28356107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setButtonState(boolean memButtonState, boolean restoreButtonState) { memorizeButton.setEnabled(memButtonState); restoreButton.setEnabled(restoreButtonState); if (memButtonState) { memorizeButton.setBackground(Color.red); } else { memorizeButton.setBackground(Color.lightGray); } if (restoreButtonState) { restoreButton.setBackground(Color.red); } else { restoreButton.setBackground(Color.lightGray); } } COM: <s> sets the button state attribute of the parameter pv controller object </s>
funcom_train/15606130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSequence(int index, String label, Sequence sequence, SwingRange range) { long previousLocation = seqModel.cellToLocation(getTopVisibleRow(),0); seqModel.addSequence(index, label, new ViewerSequence(sequence), range); fireSequenceViewerChanged(previousLocation); } COM: <s> adds a sequence to this code multi sequence viewer code </s>
funcom_train/10545713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testColumnRemappingDerby4342() throws SQLException { JDBC.assertSingleValueResultSet(s.executeQuery( "select t1.smallintcol from " + "AllDataTypesTable t1 join AllDataTypesTable t2 " + "on t1.smallintcol=t2.smallintcol where " + "coalesce(t1.smallintcol, t1.integercol) = 1"), "1"); } COM: <s> regression test for derby 4342 </s>
funcom_train/27678510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void convertToGray32() { if (!(type==ImagePlus.GRAY8 || type==ImagePlus.GRAY16)) throw new IllegalArgumentException("Unsupported conversion"); ImageProcessor ip = imp.getProcessor(); imp.trimProcessor(); Calibration cal = imp.getCalibration(); ip.setCalibrationTable(cal.getCTable()); imp.setProcessor(null, ip.convertToFloat()); imp.setCalibration(cal); //update calibration } COM: <s> converts this image plus to 32 bit grayscale </s>
funcom_train/47513145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public byte getSquareDifference(byte x, byte y){ assert y < 0 : "y-value is below zero"; assert x < 0 : "x-value is below zero"; assert x >= mapSize : "x-value is greater than mapSize"; assert y >= mapSize : "y-value is greater than mapSize"; return grid[x][y].getDiff(); } COM: <s> retrieves the difference of propagations of a square in the map </s>
funcom_train/51343791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public long getEarliestVersionCreateTime() { assertExists(); Iterator<ITPV> itr = tps.iterator(); while(itr.hasNext()) { ITPV tpv = itr.next(); if(tpv.getName().equals(FileMetadataSchema.ID)) { return tpv.getTimestamp(); } } throw new AssertionError(); } COM: <s> note this is obtained from the earliest available timestamp of the </s>
funcom_train/18721683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkFileName(String name) { boolean returnValue; returnValue = name.matches(includeFileFilter); if ((returnValue) && (excludeFileFilter.length() > 0)) { returnValue = !name.matches(excludeFileFilter); } log.fine(returnValue + "(" + includeFileFilter + "): \"" + name + "\""); return returnValue; } COM: <s> check one single filename like document </s>
funcom_train/4514561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCommandButtonKind(CommandButtonKind commandButtonKind) { CommandButtonKind old = this.commandButtonKind; this.commandButtonKind = commandButtonKind; if (old != this.commandButtonKind) { firePropertyChange("commandButtonKind", old, this.commandButtonKind); } } COM: <s> sets the kind for this button </s>
funcom_train/3292201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean readCache() { // add insrel (default behavior) relCache.put("insrel",new Integer(-1)); // add relation definiation names for (Enumeration e=search(null);e.hasMoreElements();) { MMObjectNode n= (MMObjectNode)e.nextElement(); addToCache(n); } return true; } COM: <s> reads all relation definition names in an internal cache </s>
funcom_train/35461029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParentNotExplicitlyAligned() throws Exception { enhanceAndCheck("dcl a based, 2 b fixed bin aligned;", "(DATA_ITEM (NAME a) (STORAGE BASED)" + " (DATA_ITEM (LEVEL 2) (NAME b) (ARITHMETIC FIXED BINARY) (ALIGNMENT ALIGNED)))" ); } COM: <s> an aligned item should stay aligned if parent is not explicitly aligned </s>
funcom_train/22278748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void encode(Encoder encoder) throws CodingException { super.encode(encoder); encoder.encodeObject(MENU_KEY, menu); encoder.encodeObject(OWNER_KEY, owner); encoder.encodeObject(CHILD_KEY, child); encoder.encodeObject(MENUWINDOW_KEY, menuWindow); encoder.encodeInt(MENUITEMHEIGHT_KEY, itemHeight); encoder.encodeInt(TYPE_KEY, type); encoder.encodeBoolean(TRANSPARENT_KEY, transparent); } COM: <s> encodes the menu view instance </s>
funcom_train/32219378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(final String command) { log.debug("sending \"" + command + "\""); clientlines.add(command); gameprotocol.append(command); log.trace("are clientlines empty? " + clientlines.isEmpty()); out.println(command); out.flush(); } COM: <s> use to send commands messages to server </s>
funcom_train/23411376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUntilPathFormulaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Until_untilPathFormula_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Until_untilPathFormula_feature", "_UI_Until_type"), OMPackage.Literals.UNTIL__UNTIL_PATH_FORMULA, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the until path formula feature </s>
funcom_train/32090576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String nextTo(char d) { StringBuilder sb = new StringBuilder(stringBuilderSize); for (;;) { char c = next(); if (c == d || c == 0 || c == '\n' || c == '\r') { if (c != 0) { back(); } return sb.toString().trim(); } sb.append(c); } } COM: <s> get the text up but not including the specified character or the </s>
funcom_train/1562606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void playSequenceNote(final int note, final double duration, final int instrument, final int velocity){ try { stopCurrentSound(); currentSoundType = SOUNDTYPE_MIDI; getMidiSound().playSequenceNote(note, duration, instrument, velocity); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> plays a single note using the midi sequencer </s>
funcom_train/11763946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AbstractUnit createNewUnit(AbstractModel model, Point point) { //create a name for this unit int id = getSequence().next(); String unitName = model.getModelName() + id; AbstractUnit theNewUnit; if (model instanceof VoidModel) { //creating a new atomic model unit theNewUnit = new AtomicUnit(unitName, point,"" + id); } else{ throw new RuntimeException("Model type not supported"); } return theNewUnit; } COM: <s> create a unit from de class selected in the class </s>
funcom_train/6202645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAlignment(int begin, int end, boolean isRTL) { boolean rtl = false; switch (controller.currentOrientation) { case ALL_LTR: rtl = false; break; case ALL_RTL: rtl = true; break; case DIFFER: rtl = isRTL; break; } doc.setAlignment(begin, end, rtl); } COM: <s> set attributes for created paragraphs for better rtl support </s>
funcom_train/34849326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String properCase(String s) { String result = null; if (s != null) { if (s.length() < 2) { result = s.toUpperCase(); } else { result = s.toUpperCase().charAt(0) + s.substring(1); } } return (result); } COM: <s> simple utility to capitalize the first letter of the specified string </s>
funcom_train/11768542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeValue(K key, V value) { List<V> values = _map.get(key); if (values == null) { return false; } boolean success = values.remove(value); if (values.size() == 0) { _map.remove(key); } return success; } COM: <s> removes the value from the given key list </s>
funcom_train/18954870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeGroupID(String groupID) throws MCRException { // Since this operation is a modification of the group with ID groupID // and not of // the current group we do not need to check if the modification is // allowed. if (groupIDs.contains(groupID)) { groupIDs.remove(groupID); } } COM: <s> this method removes a group from the groups list of the user object </s>
funcom_train/23271305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAxisUpperMargin(double margin) { CategoryPlot plot = (CategoryPlot) this.chart.getPlot(); if (plot != null) { double old = plot.getRangeAxis().getUpperMargin(); plot.getRangeAxis().setUpperMargin(margin); firePropertyChange("valueAxisUpperMargin", old, margin); } } COM: <s> sets the upper margin for the value axis and fires a </s>
funcom_train/49317311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JMenuItem createFileOpenURLMenuItem() { JMenuItem menuItem = new JMenuItem("Open URL..."); menuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { htmlViewer.openURL(); } }); return menuItem; } COM: <s> create the file open url menu item </s>
funcom_train/49675871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void passConnection(Connection aConn, String aDBName) { if(aConn == null) { this.close(0); } else { iConn = aConn; iDBName = aDBName; this.setTitle(iBaseTitle + " (connected to " + iDBName + ")"); } } COM: <s> this method will be called by the class actually making the connection </s>
funcom_train/40560329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkName(String name) { // throw an IllegalArgumentException if the name is null. if (name == null) { throw new IllegalArgumentException("All arguments must " + "be instantiated."); } // throw an IllegalArgumentException if the name is empty. if (name.trim().length() == 0) { throw new IllegalArgumentException("All arguments must " + "not be empty."); } } COM: <s> checks to insure that the provided string is not null and not empty </s>
funcom_train/32057770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetFindPattern() { System.out.println("testSetFindPattern"); GPGraphpad pad = new GPGraphpad(); GPGraph graph = new GPGraph(); GraphUndoManager undo = new GraphUndoManager(); GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo); try { newDoc.setFindPattern("*"); } catch (Exception e) { fail(); } } COM: <s> test of set find pattern method of class gpdocument </s>
funcom_train/1903831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toXml(PrintWriter pw) { String msg = super.getMessage(); if (msg == null && exception != null) { msg = exception.getMessage(); } pw.println("<?xml version=\"1.0\"?>"); pw.println("<error>" + msg + "</error>"); pw.flush(); } COM: <s> print the message from this exception in xml format </s>
funcom_train/47704301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createResultDirs(Test test) { List<String> caseFileList = test.getCaseFileList(); this.onMessage("*********create result dirs..."); for (int i = 0; i < caseFileList.size(); i++) { String caseFile = (String) caseFileList.get(i); String resultPath = TestUtil.getResultDir(test, caseFile); FileUtil.createDir(resultPath); test.addResultDir(resultPath); } } COM: <s> create directory for test result </s>
funcom_train/5451214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isEnabled() { int Cntr; EnDisableI menuItem; for (Cntr = 0; Cntr < getMenuComponentCount(); Cntr++) { menuItem = getIdeMenuItem(Cntr); if (menuItem.isEnabled()) return true; } return true; // BUG in Swing JMenu!!! Beacuse when the menu is disabled it does't work properly! // return false; } COM: <s> returns true if all its children menu items sub menues are enabled </s>
funcom_train/38995981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendRaw(String text) { try { text += "\n"; out.write(text.getBytes()); server.getNotifier().notifyMessageReceived(new SentMessage(server, text)); } catch (Exception ex) { System.err.println("ERROR: " + ex.getMessage()); System.err.println("\tTried sending : " + text); ex.printStackTrace(); } } COM: <s> sends the given text without delay </s>
funcom_train/25528319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double sumWithWeights() { double dSum = 0; // 1st pass - Find sum for (TKeyType dKey : hDistro.keySet()) { if (dKey instanceof Double) dSum += ((Double)dKey * getValue(dKey)); else dSum += getValue(dKey); } return dSum; } COM: <s> sums over all the values taking into account the keys as weights </s>
funcom_train/18440059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFirstName(final String firstName) { if (firstName == null) throw new IllegalArgumentException("first name can not be null."); if (firstName.length() > 20) throw new IllegalArgumentException("first name can not be longer than 20 characters."); if (firstName.length() < 2) throw new IllegalArgumentException("first name must be at least 2 characters."); this.firstName = firstName; } COM: <s> set the first name of the user </s>
funcom_train/44171040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Tension getTension(Player player) { if (player == null) { throw new IllegalStateException("Null player."); } else { Tension newTension = tension.get(player); if (newTension == null) { newTension = new Tension(Tension.TENSION_MIN); } tension.put(player, newTension); return newTension; } } COM: <s> gets the hostility this player has against the given player </s>
funcom_train/42738138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(String textField, String text) { GuiText t = new GuiText(textField); //the text field //check whether the text field is editable and enabled assertTrue(t.isEditable() && t.isEnabled()); //set the text t.setText(text); //check the text in the text fiedl assertEquals(t.getText(), text); } COM: <s> enter a text in the specified text field </s>
funcom_train/51452208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getNewProjectMenuItem() { if (newProjectMenuItem == null) { newProjectMenuItem = new JMenuItem(); newProjectMenuItem.setText("New"); newProjectMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, Event.ALT_MASK, true)); newProjectMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { newProject(); } }); } return newProjectMenuItem; } COM: <s> get a new project menu item </s>
funcom_train/47615985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getPanel_Main() { if (panel_Main == null) { panel_Main = new JTabbedPane(); panel_Main.addTab("Huidige staat", huidigestaat.getPanel()); panel_Main.addTab("Geschiedenis", geschiedenis.getPanel()); panel_Main.addTab("Instellingen", instellingen.getPanel()); panel_Main.addTab("Grafische weergave", getPanel_GrafischeWeergave()); } return panel_Main; } COM: <s> creates the panel holding the different tabs </s>
funcom_train/10362992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Bundle installBundleRecord(String location, int startLevel) { try { // install Bundle installedBundle = bundleContext.installBundle(location); // set start level startLevelService.setBundleStartLevel(installedBundle, startLevel); return installedBundle; } catch (BundleException e) { log.error("Bundle installation failed: " + location); } return null; } COM: <s> install the bundle to framework </s>
funcom_train/31211364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean supportsResultSetType(int type) throws SQLException { try { if(Trace.isEnabled()) Trace.trace(getId()); checkClosed(); boolean result=(type==ResultSet.TYPE_FORWARD_ONLY); if(Trace.isEnabled()) Trace.traceResult(result); return result; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> returns whether a specific resultset type is supported </s>
funcom_train/25487866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double compareTo(EObject leftElement, EObject rightElement) { if(leftElement.eClass().eGet(leftElement.eClass().eClass().getEStructuralFeature("name")).equals(rightElement.eClass().eGet(rightElement.eClass().eClass().getEStructuralFeature("name")))) { return 1.0; } return 0; } COM: <s> method compares the meta class types of both elements </s>
funcom_train/3701920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getHeaderParams() { Map map = new LinkedHashMap(getParams()); Iterator it = getQueryParamKeys(); String strKey; while (it.hasNext()) { strKey = (String) it.next(); map.remove(strKey); } return (map); } // of method COM: <s> get a copy of the params that should be sent out as headers </s>
funcom_train/18721726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setDomAttribute(String location1, Namespace elementSpace1, String attrName1, String attrValue, Namespace namespace) { if ((attrName1 == null) || (attrValue == null)) { return; } Element targetElement = simpleXpath(location1, elementSpace1, null, true); if (targetElement != null) { targetElement.setAttribute(attrName1, attrValue, namespace); } } COM: <s> set a dom attribute with a processing instruction </s>
funcom_train/22542819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private QueryKey getQueryKey() { byte[] queryKey = new byte[4]; // De-Obfuscate it with our random pad! for(int i = 0; i < RANDOM_PAD.length; i++) { queryKey[i] = (byte)(messageId[i] ^ RANDOM_PAD[i]); } return QueryKey.getQueryKey(queryKey, true); } COM: <s> extracts and returns the query key from the guid </s>
funcom_train/45255862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(boolean force) { if (perspectiveBar == null) { return; } perspectiveBar.update(force); if (currentLocation == LEFT) { ToolItem[] items = perspectiveBar.getControl().getItems(); boolean shouldExpand = items.length > 0; if (shouldExpand != trimVisible) { perspectiveBar.getControl().setVisible(true); trimVisible = shouldExpand; } if (items.length != trimOldLength) { LayoutUtil.resize(trimControl); trimOldLength = items.length; } } } COM: <s> update the receiver </s>
funcom_train/36849085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verify(final Unit builder) { final List<Command> currentCommands = builder.getCurrentCommands(); if (currentCommands.isEmpty()) { return waitingForBuildSiteToClear; } final Command currentCommand = currentCommands.get(0); final int commandId = currentCommand.getId(); return commandId == OldCmdHelper.CMD_RECLAIM.value; } COM: <s> verify the task and the units current orders match </s>
funcom_train/48390969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addDataArrivedHandler(com.smartgwt.client.widgets.tree.events.DataArrivedHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.tree.events.DataArrivedEvent.getType()) == 0) setupDataArrivedEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.tree.events.DataArrivedEvent.getType()); } COM: <s> add a data arrived handler </s>
funcom_train/3060135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String generateDeleteRowString() { final String[] pkColumns; if (hasIdentifier) { pkColumns = rowSelectColumnNames; } else { pkColumns = ArrayHelper.join(keyColumnNames, rowSelectColumnNames); } Update update = new Update() .setTableName(qualifiedTableName) .addColumns(keyColumnNames, "null"); if (hasIndex) update.addColumns(indexColumnNames, "null"); return update.setPrimaryKeyColumnNames(pkColumns) .toStatementString(); } COM: <s> generate the sql update that updates a particular rows foreign </s>
funcom_train/18801800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDayCount30ISDA() { final SerialDate d1 = SerialDate.createInstance(1, SerialDate.APRIL, 2002); final SerialDate d2 = SerialDate.createInstance(2, SerialDate.APRIL, 2002); final int count = SerialDateUtilities.dayCount30ISDA(d1, d2); assertEquals(1, count); } COM: <s> problem 30 360 isda day count </s>
funcom_train/28121809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Preferences deleteNode() { Preferences oCurrentNode = getCurrentNode(); Preferences oParentNode = oCurrentNode.parent(); if (oParentNode != null) { try { oCurrentNode.removeNode(); sync(oParentNode); setCurrentNode(oParentNode); } catch (BackingStoreException oEx) { oEx.printStackTrace(); } } return oParentNode; } COM: <s> deletes the current node and its children </s>
funcom_train/3176632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeNotify() { // remember map if (currentMap!=null) REGISTRY.put("map", currentMap.getKey()); // remember split REGISTRY.put("split", split.getDividerLocation()); // override super.removeNotify(); } COM: <s> component lifecycle were not needed anymore </s>
funcom_train/44137592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onResize(int w, int h) { if(m_Media != null) { m_Media.getProperties().setW(w * m_SlidePanel.getCoeff()); m_Media.getProperties().setH(h * m_SlidePanel.getCoeff()); } } COM: <s> call when component is removed </s>
funcom_train/47572629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxtInicioMes() { if (txtInicioMes == null) { txtInicioMes = new JTextField(); txtInicioMes.setLocation(new Point(41, 5)); txtInicioMes.setPreferredSize(new Dimension(20, 20)); txtInicioMes.setSize(new Dimension(20, 20)); txtInicioMes.setText("11"); } return txtInicioMes; } COM: <s> this method initializes txt inicio mes </s>
funcom_train/28298172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean onBackgroundRemove() { if (mainPane.getMap().getBkImage()!=null) { TransMapBackgroundDlg bk = new TransMapBackgroundDlg(); bk.removeImage(mainPane); mainPane.actualizeInfos(); mainPane.setMenuState(); return true; } return false; } COM: <s> remove the actual background image </s>
funcom_train/15410826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveEnhanced(PersistRequestBean<?> request) { EntityBeanIntercept intercept = request.getEntityBeanIntercept(); if (intercept.isReference()) { // its a reference... if (request.isPersistCascade()) { // save any associated List held beans intercept.setLoaded(); saveAssocMany(false, request); intercept.setReference(); } } else { if (intercept.isLoaded()) { // Need to call setLoaded(false) to simulate insert update(request); } else { insert(request); } } } COM: <s> insert or update the bean depending on persist control and the bean state </s>
funcom_train/27747192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelection (int value) { checkWidget(); if (value < 0) return; int hAdjustment = OS.gtk_range_get_adjustment (handle); OS.gtk_signal_handler_block_by_data (hAdjustment, SWT.Selection); OS.gtk_adjustment_set_value (hAdjustment, value); OS.gtk_signal_handler_unblock_by_data (hAdjustment, SWT.Selection); } COM: <s> sets the single em selection em that is the receivers </s>
funcom_train/2388178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void decrypt( byte[] buffer ) throws PasswordSafeException { /* The endian conversion is simply to make this compatible with * use in previous versions of PasswordSafe (in ECB mode). Why * the inversion is necessary for CBC mode and why it has to * "cancelled out" in this (ECB mode), I don't know but it * is the only way to get the correct ordering for the * CBC and ECB contexts within a standard password safe file. */ Util.bytesToLittleEndian(buffer); super.decrypt(buffer); Util.bytesToLittleEndian(buffer); } COM: <s> decrypts code buffer code in place </s>
funcom_train/37806740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeRequestPriority(final String id, final FreenetPriority newPrio) { final List<String> msg = new LinkedList<String>(); msg.add("ModifyPersistentRequest"); msg.add("Global=true"); msg.add("Identifier="+id); msg.add("PriorityClass=" + newPrio.getNumber()); fcpPersistentConnection.sendMessage(msg); } COM: <s> no answer from node is expected </s>
funcom_train/31037394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void skipNext() throws IOException { if (isNextConstructed()) { int num = decodeConstructed(in.peekTag()); while (!endOf(num)) skipNext(); } else { matchTag(in.peekTag(), false); in.skip((long)in.decodeLength()); } } COM: <s> skips the next encoded asn </s>
funcom_train/43245175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNOKTwoZip() { System.out.println("getNOKTwoZip"); EmergencyContactDG2Object instance = new EmergencyContactDG2Object(); String expResult = ""; String result = instance.getNOKTwoZip(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get noktwo zip method of class org </s>
funcom_train/10748613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToGenericString() throws Exception { String s = AnnotatedField.class.getField("buz").toGenericString(); System.out.println(s); assertEquals( "public static transient volatile" + " java.lang.reflect.TwoParamType<java.lang.String, ?>" + " java.lang.reflect.AnnotatedField.buz", s); } COM: <s> to generic string should return a string exactly matching </s>
funcom_train/966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void debugDisplayBoardPosition(BoxConfigurationStorageHashtable storage, int boardPositionIndex, final boolean graphicOutput, final boolean waitForEnter) { byte[] temp = new byte[packedBoardByteSize]; storage.copyBoxConfiguration(temp, boardPositionIndex / playerSquaresCount); int playerPosition = boardPositionIndex % playerSquaresCount; debugDisplayBoxConfiguration(temp, playerPosition, graphicOutput, waitForEnter); } COM: <s> displays the passed board position for debug purposes </s>
funcom_train/14326948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void extendToolGroups(OpModule parentModule) { Iterator<OpToolGroupType> it = parentModule.getToolGroups(); while (it.hasNext()) { OpToolGroupType parentToolGroup = it.next(); if (!(this.getToolGroupsMap().containsKey(parentToolGroup.getName()))) { this.toolGroups.add(parentToolGroup); } } } COM: <s> extends the tool groups from the parent module </s>
funcom_train/48502716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cipher createCipher() { Cipher c = new AesCipher(); String key = keys.get(); if (key == null) { if (globalKey == null) { setUpGlobalKey(); } key = globalKey; } if (key == null) { throw new IllegalStateException("A cipher key is required."); } c.setKey(key); return c; } COM: <s> create the cipher of the aes algorithm </s>
funcom_train/25601885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean call(final Runnable runnable) throws Exception { final TranslationThread subject=(TranslationThread) runnable; if (subject.getTimeout()!=-1 && System.currentTimeMillis() < subject.getTimeout()) { return true; } subject .getResponse() .setEndState( new ResponseStateBean(ResponseCode.ERROR, "Thread pool and queue are full. Waited until max time for a request was exceeded. Translation cannot be executed.")); return false; } COM: <s> is executed after a translation thread is rejected and cannot be executed </s>
funcom_train/32802249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBracketString() { if (bracketPairs.size() < 1) { return ""; } String result = ""; for (tudresden.ocl20.pivot.language.ocl.resource.ocl.IOclBracketPair bracketPair : bracketPairs) { String isClosingStr = "0"; if (bracketPair.isClosingEnabledInside()) { isClosingStr = "1"; } result += bracketPair.getOpeningBracket() + bracketPair.getClosingBracket() + isClosingStr; } return result; } COM: <s> returns this bracket set as code string code </s>
funcom_train/40612057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readString() throws IOException { int len = in.readInt(); if (len == -1) { return null; } StringBuilder buff = new StringBuilder(len); for (int i = 0; i < len; i++) { buff.append(in.readChar()); } String s = buff.toString(); s = StringUtils.cache(s); return s; } COM: <s> read a string </s>
funcom_train/12193023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Set getPermissionSet(Principal principal) { Set permissions = EMPTY_SET; permissions = updateGroupPermissions(maps[GROUP_POSITIVE], principal, permissions); permissions = updateGroupPermissions(maps[GROUP_NEGATIVE], principal, permissions); permissions = updateIndividualPermissions(maps[INDIVIDUAL_POSITIVE], principal, permissions); permissions = updateIndividualPermissions(maps[INDIVIDUAL_NEGATIVE], principal, permissions); return permissions; } COM: <s> get the set of permissions that are granted to the specified principal </s>
funcom_train/42403185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getMaximumDataUrlLength(final String property, final int defaultValue) { int maxDataUrl = defaultValue; final String value = System.getProperty(property); if (false == Tester.isNullOrEmpty(value)) { try { maxDataUrl = Integer.parseInt(value); } catch (final NumberFormatException bad) { throwException(new ImageFactoryGeneratorException("Unable to retrieve the numerical value of the system property \"" + property + "\".")); } } return maxDataUrl; } COM: <s> helper which fetches the maximum data url length from a gwt property </s>
funcom_train/39972960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJOpenSourceButton() { if (jOpenSourceButton == null) { jOpenSourceButton = new JButton(); jOpenSourceButton.setPreferredSize(new Dimension(100, 40)); jOpenSourceButton.setSize(new Dimension(100, 40)); jOpenSourceButton.setText("Open Source"); jOpenSourceButton.addActionListener(this); } return jOpenSourceButton; } COM: <s> this method initializes j open source button </s>
funcom_train/22826869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toVerboseString() { StringBuffer result = new StringBuffer(); result.append("Database ["); result.append(getName()); result.append("] tables:"); for (int idx = 0; idx < getTableCount(); idx++) { result.append(" "); result.append(getTable(idx).toVerboseString()); } return result.toString(); } COM: <s> returns a verbose string representation of this database </s>
funcom_train/40448653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { System.err.println("LayoutMaker start starting"); while(relaxer!=null) { stop(); Thread.currentThread().yield(); } System.err.println("LayoutMaker start going"); if (true/*graph.partial*/) layoutStarChords(); else layoutScramble(); System.err.println("LayoutMaker start finished"); runRelax(); repaint(); } COM: <s> initiates the loop that tries to relax the graph into a better layout </s>
funcom_train/3589447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRequestUntil() { String ret = ""; int idx1 = getRequestURL().indexOf("until="); if (idx1 >= 0) { int idx2 = getRequestURL().indexOf("&", idx1); if (idx2 <= 0) { idx2 = getRequestURL().length(); } ret = getRequestURL().substring(idx1 + 6, idx2); } return ret; } COM: <s> returns the until query param returned by the most recent response </s>
funcom_train/29837978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XYDataset createDataset() { final String[] sData = { "Giraffe", "Gazelle", "Zebra", "Gnu" }; final SampleYSymbolicDataset data = new SampleYSymbolicDataset("BY Sample", 40, sData, 4, 20, new String[] { "B Fall", "B Spring", "B Summer", "B Winter" }); return data; } COM: <s> creates a dataset consisting of two series of monthly data </s>
funcom_train/7308735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AudioInputStream getAudioInputStream(File file) throws UnsupportedAudioFileException, IOException { InputStream inputStream = new FileInputStream(file); try { return getAudioInputStream(inputStream, (int) file.length()); } catch (UnsupportedAudioFileException e) { inputStream.close(); throw e; } catch (IOException e) { inputStream.close(); throw e; } } COM: <s> obtains an audio input stream from the file provided </s>
funcom_train/1115917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getAllButton() { if (allButton == null) { allButton = new JButton(); ResourceHelper.setText(allButton, "select_all"); allButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { for (int i = 0; i < ReminderTimes.getNum(); ++i) { alarmBoxes[i].setSelected(true); } } }); } return allButton; } COM: <s> this method initializes all button </s>
funcom_train/32185943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDisplayFormat(Format displayFormat) { Format oldDisplayFormat = this.displayFormat; GridBox gb = (GridBox) getParent(); this.displayFormat = displayFormat; if (gb != null) gb.firePropertyChange(this, PROPERTY_COLUMN_DISPLAY_FORMAT, oldDisplayFormat, displayFormat); } COM: <s> set the display format for this column </s>
funcom_train/49704599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GroupedSearchResults executeInSearcher(ISearcher searcher) throws SearcherException{ return searcher.search( (AQuery)params.get(0), (Integer)params.get(1), (Integer)params.get(2), (AGroup)params.get(3), (Integer)params.get(4), (AFilter)params.get(5), (ASort)params.get(6)); } COM: <s> executes the query with the given params </s>
funcom_train/43887684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getGeometryName() { if (defaultGeom == null) { for (Iterator i = attributes.iterator(); i.hasNext();) { AttributeType attribute = (AttributeType) i.next(); if (attribute instanceof GeometryType) { return attribute.getName().getLocalPart(); } } return null; } return defaultGeom; } COM: <s> return the current default geometry </s>
funcom_train/18648453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getId() { String ret=""; if (getParent() != null) { int index=getParent().eContents().indexOf(this); ret = ((ScenarioObjectImpl)getParent()).getId()+"/"+ index; } else if (eContainer() != null) { int index=eContainer().eContents().indexOf(this); ret = ""+index; } return(ret); } COM: <s> this method returns the id of the scenario object </s>
funcom_train/49197045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCommand(Request request) { if (request instanceof ReconnectRequest) { Object view = ((ReconnectRequest) request).getConnectionEditPart() .getModel(); if (view instanceof View) { Integer id = new Integer( VspacemapsVisualIDRegistry.getVisualID((View) view)); request.getExtendedData().put(VISUAL_ID_KEY, id); } } return super.getCommand(request); } COM: <s> extended request data key to hold editpart visual id </s>
funcom_train/13890472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startRecording() throws IOException, ClassNotFoundException { isRecording = true; isTesting = false; resetSystem = true; if (maxId == null) { loadMaxId(); } if (!maxId.isLimit()) { maxId.incLimit(); // ie start new dialog at new limit ordinal } } COM: <s> dialog test start recordning incoming start test and end points </s>
funcom_train/3839956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void roomClosed(String roomname, Vector<String> leavers) { _name_room.remove(roomname); int i; String player; for (i = 0; i < _hallUsers.size(); i++) { player = _hallUsers.elementAt(i); _playername_clientchannel.get(player) .sendHallRoomClosing(roomname, leavers); } _nlogger.debug("Room <" + roomname + "> has been terminated"); } COM: <s> sends a notification to hall users that a game has ended </s>
funcom_train/33368209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete() throws SQLException { // delete this department if (!super.delete()) return false; dbm.exec("delete from Department where id = '" + getID() + "'"); dbm.exec("delete from CollegeDepartments where deptID = '" + getID() + "'"); dbm.exec("delete from DepartmentCourses where deptID = '" + getID() + "'"); return true; } COM: <s> removes this code department code from the database </s>
funcom_train/20741650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long getId(String i_paramName) { String strValue = getParam(i_paramName); if (strValue == null) { return null; } try { Long id = Long.valueOf(strValue); return id; } catch (Exception ex) { // catch any exception here and just ignore it - return null in this case return null; } } COM: <s> reads param from httprequest and convert it into id </s>
funcom_train/3763581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { log.debug("TimerWorkflowStarter.run()"); log.debug("Spring Starter:"+processFlow); File myFile = new File("."); log.debug("Current directory:"+myFile.getAbsolutePath()); // Load the workflow try{ processFlow.startWorkflow(); } catch (Throwable t){ //Log and rethrow - because this is a Timer Service , we cannot throw the exception log.warn("Error in Timer Service",t); } } COM: <s> called by the timer task start the specified workflwos </s>
funcom_train/2628480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetData() { System.out.println("getData"); GUITypeWrapper instance = new GUITypeWrapper(new GUIType()); GUIType expResult = new GUIType(); instance.dGUIType = expResult; GUIType result = instance.getData(); assertEquals(expResult, result); } COM: <s> test of get data method of class guitype wrapper </s>
funcom_train/3086170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _addOptions(ListBox lb, String[] options) { boolean addItems = false; if (lb.getModel() != null && lb.getModel() instanceof DefaultListModel) addItems = true; if (lb.getModel() == null) addItems = true; if (addItems) { DefaultListModel model = new DefaultListModel(); for (int i = 0; i < options.length; i++) { String val = options[i]; model.add(val); } lb.setModel(model); } } COM: <s> adds a string of options string to the component </s>
funcom_train/31529742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initMenus() { //Setup Menu popupMenu = new DCPopupMenu(); propertiesMI = new JMenuItem("Properties"); propertiesMI.addActionListener(this); deleteMI = new JMenuItem("Delete"); deleteMI.addActionListener(this); popupMenu.add(propertiesMI); popupMenu.add(deleteMI); } COM: <s> create the menus for the master tile </s>
funcom_train/44101587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getInnerCriteria(){ String res = this.criteria; if (this.embraced){ res = "(" + res.trim() + ")"; } else if (!this.embraced){ //res = res.substring(1, res.length()-1); } return res; } COM: <s> gets the criteria string representation for this ocriteria </s>
funcom_train/37637794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setThickness(int edge, int lineThickness) { if (edge == SwingConstants.TOP) { thickness.top = lineThickness; } if (edge == SwingConstants.LEFT) { thickness.left = lineThickness; } if (edge == SwingConstants.BOTTOM) { thickness.bottom = lineThickness; } if (edge == SwingConstants.RIGHT) { thickness.right = lineThickness; } } //end setThickness COM: <s> set the thickness of an edge </s>
funcom_train/5373473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeLineBackgroundListener(LineBackgroundListener listener) { checkWidget(); if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); removeListener(LineGetBackground, listener); // use default line styler if last user line styler was removed. if (isListening(LineGetBackground) == false && userLineBackground) { StyledTextListener typedListener = new StyledTextListener(defaultLineStyler); addListener(LineGetBackground, typedListener); userLineBackground = false; } } COM: <s> removes the specified line background listener </s>
funcom_train/29690333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeTempValuesToAdapter() { for (int i = 0; i < getRowCount(); i++) { try { String rowName = new String(); rowName = (String) namedDoubleValues.getNames().get(i); Double doubleValue = (Double) (tempValues.get(i)); namedDoubleValues.setNamedDoubleValue(rowName, doubleValue .doubleValue()); } catch (ValueNameNotFoundException e) { System.err .println("Problem to get value from NamedDoubleValues Adapter"); } } } COM: <s> method write temp values to adapter </s>