__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/12837479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeMenuOption(String optionName) throws PresentationException {
MenuOption option = getMenuOptionWithName(optionName);
try {
removeMenuOption(option, 0);
} catch (PresentationException e) {
throw new PresentationException("Circular reference encountered when trying to remove menu option ["
+ optionName + "] from menu [" + this.getName() + "].", e);
}
}
COM: <s> removes the menu option having the argument option name </s>
|
funcom_train/24137968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
/* aborting flag can be set from other thread also,
* so we should handle this in a thread safe/synchronized way*/
if (!aborting) {
synchronized(this) { aborting = true; }
try { connectionNotifier.close(); }
catch (IOException e) { e.printStackTrace(); }
}
}
COM: <s> this function closes the bluetooth connection notifier </s>
|
funcom_train/38463711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getFieldType(Field field) throws StorageException {
Integer type = (Integer)javaFieldTypeMap.get(field);
if(type == null) {
String fieldName = (field != null ? field.getName() : null);
throw new StorageException("No such field: " + javaClass.getName() + "." + fieldName);
}
return type;
}
COM: <s> returns the type of a field as established in </s>
|
funcom_train/39366606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean testOuterReshape() {
int[][] startingShapes = { { 2, 3, 4, 5, 6 }, { 1, 2, 7, 5 }, { 1, 2, 4, 5 } };//,{100,105,150, 71} };
COM: <s> test outer reshape tests the out reshape functions for the block </s>
|
funcom_train/46381425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUserToCellChannel(WonderlandClientID clientID) {
if (cellChannelRef == null)
return;
// issue 963: the session may be null if the user is logging out
ClientSession session = clientID.getSession();
if (session != null) {
cellChannelRef.getForUpdate().join(session);
}
}
COM: <s> add user to the cells channel if there is no channel simply return </s>
|
funcom_train/17530341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected T get(Object key, boolean createIfNeeded) throws Space4JException {
T returned = null;
Map<Object, T> tags = (Map<Object, T>) persister.getSpace().getObject(getSpaceKey());
if(tags.containsKey(key)) {
returned = tags.get(key);
} else {
if(createIfNeeded) {
returned = create(key);
save(returned);
}
}
return returned;
}
COM: <s> return object if already exists </s>
|
funcom_train/50872768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCopy2() {
OMForeign foreign = new OMForeign();
foreign.setObject("12");
foreign.setAttribute("id","1");
OMForeign copy = (OMForeign) foreign.copy();
assertTrue(foreign.attributes != copy.attributes &&
foreign.getObject() != copy.getObject());
}
COM: <s> test copy method </s>
|
funcom_train/20296014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkColumn(int lastRow, int lastCol, Cell color) {
int count = 1;
for (int i = lastRow + 1; i < height; i++) {
if (board[i][lastCol].equals(color)) {
count++;
continue;
}
break;
}
for (int i = lastRow - 1; i >= 0; i--) {
if (board[i][lastCol].equals(color)) {
count++;
continue;
}
break;
}
if (count >= winTokens) {
return true;
}
return false;
}
COM: <s> returns true if the given cell is one of a column </s>
|
funcom_train/7979563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void extract(CrawlURI curi, ReplayCharSequence dir) {
logger.log(Level.FINEST, "Extracting URIs from FTP directory.");
Matcher matcher = DIR.matcher(dir);
while (matcher.find()) {
String file = matcher.group(1);
addExtracted(curi, file);
}
}
COM: <s> extracts ftp links in a directory listing </s>
|
funcom_train/29820296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void waitForTransactionsToFinish() throws InterruptedException {
//LOGGER.info("Waiting for transactions");
Iterator<CoreTransaction> transactions =
transactionManager.activeTransactions().iterator();
while (transactions.hasNext()) {
transactions.next().join();
}
//LOGGER.info("END OF: Waiting for transactions");
}
COM: <s> wait for all active transactions to finish </s>
|
funcom_train/2357561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Phrase other) {
int length = size();
int otherLength = other.size();
for (int i = 0; i < length; i++) {
if (i < otherLength) {
int difference = getWordID(i) - other.getWordID(i);
if (difference != 0) return difference;
} else {
//same but other is shorter, so we are after
return 1;
}
}
if (length < otherLength) {
return -1;
} else {
return 0;
}
}
COM: <s> compares the two strings based on the lexicographic order </s>
|
funcom_train/14515068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test03RemoveKeyPair() throws Exception {
log.trace(">test03RemoveKeyPair()");
CertTools.installBCProvider();
TestTools.getKeyRecoverySession().removeKeyRecoveryData(admin, cert);
assertTrue("Couldn't remove keys from database", !TestTools.getKeyRecoverySession().existsKeys(admin, cert));
log.trace("<test03RemoveKeyPair()");
}
COM: <s> tests removes all keydata </s>
|
funcom_train/11362939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printTable(XADataSource xaDataSource) throws SQLException {
XAConnection xaConnection = xaDataSource.getXAConnection();
Connection connection = xaConnection.getConnection();
PreparedStatement selectStatement = connection.prepareStatement(SELECT_TABLE);
ResultSet set = selectStatement.executeQuery();
pw.write("<center><br><table>");
pw.write("<tr BGCOLOR=#FFCC33>");
pw.write("<td><font face=\"Tahoma\"><b>VALUES</font></td>");
pw.write("</tr>");
while (set.next()) {
pw.write("<tr>");
pw.write("<td><font face=\"Tahoma\">");
pw.write(set.getString("value"));
pw.write("</font></td>");
pw.write("</tr>");
}
pw.write("</table><br></center>");
}
COM: <s> prints the table </s>
|
funcom_train/33789845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JScrollPane getBaseScrollPane() {
if (baseScrollPane == null) {
baseScrollPane = new JScrollPane();
baseScrollPane.setBounds(new Rectangle(15, 45, 420, 420));
/*Dimension d = new Dimension(420, 420);
baseScrollPane.setMinimumSize(d);
baseScrollPane.setMaximumSize(d);
baseScrollPane.setPreferredSize(d);*/
baseScrollPane.setViewportView(getVisCortaPanel());
baseScrollPane.setOpaque(false);
baseScrollPane.getViewport().setOpaque(false);
}
return baseScrollPane;
}
COM: <s> this method initializes table scroll pane </s>
|
funcom_train/16218504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean update(long elapsedTime) {
if (this.active) {
this.currentTick += elapsedTime;
if (this.currentTick >= this.delay) {
// time elapsed!
// currentTick = 0;
// synch the current tick to make the next tick accurate
this.currentTick -= this.delay;
return (action = true);
}
}
return (action = false);
}
COM: <s> updates code shareable timer code </s>
|
funcom_train/25840160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void check() {
Message message = new Message();
boolean result = true;
for ( Statement<?> statement : statements ) {
if ( !statement.check() ) {
message.eol();
statement.describe( message );
message.flush();
result = false;
}
}
if ( !result ) {
message.flush();
throw new AssertionError( message.toString() );
}
}
COM: <s> checks this assertion </s>
|
funcom_train/45117378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copySutToTestsFolder(File sutFile) throws IOException {
File classDir = new File(JSystemProperties.getCurrentTestsPath());
if (sutFile.getAbsolutePath().startsWith(classDir.getAbsolutePath())) {
File sutSrcFile = new File(JSystemProperties.getInstance()
.getPreference(FrameworkOptions.TESTS_SOURCE_FOLDER)
+ sutFile.getAbsolutePath().substring(
classDir.getAbsolutePath().length()));
FileUtils.copyFile(sutFile, sutSrcFile);
}
}
COM: <s> copies the sut file from the classes folder to the source folder </s>
|
funcom_train/7581853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getComponentsPane() {
if (componentsPane == null) {
userNameLabel = new JLabel();
userNameLabel.setBounds(new Rectangle(16, 30, 98, 30));
userNameLabel.setText(MessageManager
.getMessage("ProfileWindow.ProfileName"));
userNameLabel.setHorizontalAlignment(SwingConstants.RIGHT);
componentsPane = new JPanel();
componentsPane.setLayout(null);
componentsPane.add(userNameLabel, null);
componentsPane.add(getUserNameTextField(), null);
}
return componentsPane;
}
COM: <s> this method initializes components pane </s>
|
funcom_train/44707650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateURL(BigDecimal itemId, BigDecimal taskId) {
final StringBuffer url = new StringBuffer
(ContentItemPage.getItemURL(itemId, ContentItemPage.WORKFLOW_TAB));
// XXX task, approve, and action were constants; restore them
url.append("&action=approve&task=").append(taskId.toString());
return url.toString();
}
COM: <s> generates a link to the workflow tab in the item management part </s>
|
funcom_train/5375392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
final StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(getLabel());
stringBuffer.append("("); //$NON-NLS-1$
IUndoContext[] contexts = getContexts();
for (int i = 0; i < contexts.length; i++) {
stringBuffer.append(contexts[i].toString());
stringBuffer.append(',');
}
stringBuffer.append(')');
return stringBuffer.toString();
}
COM: <s> the string representation of this operation </s>
|
funcom_train/29709790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getYDistance(Rectangle rec1, Rectangle rec2, boolean top) {
if (rec1.getCopy().intersect(rec2).height > 0) {
return 0;
} else {
if (top) {
return rec1.getTop().y - rec2.getTop().y;
} else {
return rec1.getBottom().y - rec2.getBottom().y;
}
}
}
COM: <s> distance from rec1 to rec2 at y coordination if top compare top </s>
|
funcom_train/49080107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void callCommandListener( Command cmd ) {
if (this.cmdListener != null) {
try {
this.cmdListener.commandAction(cmd, this );
} catch (Exception e) {
//#debug error
Debug.debug("unable to process command [" + cmd.getLabel() + "]: " + e.getMessage(), e );
}
}
}
COM: <s> calls the command listener with the specified command </s>
|
funcom_train/42681468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finishCurrentMove() {
if (tookASeat()) {
LOGGER.info(name + " ends move (token " + movingToken + ')');
try {
tableWrapper.cardPut(movingToken);
}
catch (MauMauTableException e) {
viewer.handleMauMauTableException(e);
LOGGER.error(e);
}
}
else
LOGGER.warn(name + " is not connected to any table yet");
}
COM: <s> closes the players current move </s>
|
funcom_train/27780202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read(IListInStream in) throws java.io.IOException {
uid = in.readUID() + lastUid;
w = in.readW();
handle = in.readHANDLE();
len = ((int) handle) & 1;
if (len == 1) {
// proximity list in separate file
handle = (handle >>> 1) + lastHandle;
lastHandle = handle;
}
lastUid = uid;
}
COM: <s> read an inverted list </s>
|
funcom_train/16663138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSecuence() {
try{
MidiSequenceParser parser = new MidiSequenceParser(this.songManager,MidiSequenceParser.DEFAULT_PLAY_FLAGS,getMode().getCurrentPercent(),0);
MidiSequenceHandler sequence = getSequencer().createSequence(this.songManager.getSong().countTracks() + 2);
parser.parse(sequence);
this.infoTrack = sequence.getInfoTrack();
this.metronomeTrack = sequence.getMetronomeTrack();
} catch (MidiPlayerException e) {
e.printStackTrace();
}
}
COM: <s> agrega la secuencia </s>
|
funcom_train/28108418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean loadData(File f) throws IOException {
DataHolder dH = dataModule.getDataHolder(f);
if (dH != null) {
this.dataHolder = dH;
// inform and updtate the GUI
try {
configurator.updateGUI();
} catch (Exception e1) {
log.debug("updateGUI failed");
e1.printStackTrace();
}
return true;
}
System.out.println("The DataHolder could not be loaded");
return false;
}
COM: <s> loads a data from disk </s>
|
funcom_train/44156666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restore() {
if (m_desktop == null || m_desktop.getAllFrames() == null
|| m_desktop.getAllFrames().length < 1) {
return;
}
JInternalFrame activeframe = m_desktop.getSelectedFrame();
if (activeframe != null) {
if (activeframe.isMaximum() || activeframe.isIcon()) {
// if it is minimized, it must be deiconified
deiconify_frame(activeframe);
restore_frame(activeframe);
}
}
}
COM: <s> restores the selected frame from its maximized state </s>
|
funcom_train/46151680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cell fromWFS(WFSCell wfsCell) {
Cell cell = new Cell(wfsCell.getCellName());
// get the cell glo setup from this cell
try {
setupCell(cell, wfsCell.getCellSetup());
} catch (Exception ex) {
throw new RuntimeException("Error converting cell " +
wfsCell.getCanonicalName(), ex);
}
return cell;
}
COM: <s> translate a wfs cell into a cell </s>
|
funcom_train/3990225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSercePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BadanieOkresowe_serce_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_serce_feature", "_UI_BadanieOkresowe_type"),
PrzychodniaPackage.Literals.BADANIE_OKRESOWE__SERCE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the serce feature </s>
|
funcom_train/15564408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initViewingRectangle() {
if(viewingRectangle == null) {
viewingRectangle = new Rectangle2D.Double(0.0, 0.0, 1.0, 1.0);
}
double width = this.getWidth();
double height = this.getHeight();
if(width > height) {
normalizedVRheight = 1.0;
normalizedVRwidth = 1.0 * (width / height);
}
else {
normalizedVRwidth = 1.0;
normalizedVRheight = 1.0 * (height / width);
}
}
COM: <s> creates a viewing rectangle and sets the size of the </s>
|
funcom_train/11654369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePreActionListener(Class<?> action, ActionListener listener) {
if (action != null) {
HashSet<ActionListener> set = preActionListeners.get(action.getName());
if (set != null) {
set.remove(listener);
preActionListeners.put(action.getName(), set);
}
}
}
COM: <s> allows an action listener to be removed from receiving notifications of a </s>
|
funcom_train/3375008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerComponent(JComponent component) {
component.removeMouseListener(this);
component.addMouseListener(this);
component.removeMouseMotionListener(moveBeforeEnterListener);
component.addMouseMotionListener(moveBeforeEnterListener);
component.removeKeyListener(accessibilityKeyListener);
component.addKeyListener(accessibilityKeyListener);
}
COM: <s> registers a component for tooltip management </s>
|
funcom_train/48336786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return new String("service="+service+",function="+function+",input="+input+
",host="+host+",port="+port+",id="+id+",requestTag="+requestTag);
}
COM: <s> this method returns a printable version of this class </s>
|
funcom_train/26322547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List search(ISearchVisitor item, String queryString) throws IOException, ParseException {
IndexSearcher searcher = new IndexSearcher(getIndexDir());
Query query = item.getQuery(queryString, analyzer);
Hits hits = searcher.search(query);
List searchIds = new ArrayList();
for (int i = 0; i < hits.length(); i++) {
Document doc = hits.doc(i);
searchIds.add(item.getKey(doc));
}
searcher.close();
return searchIds;
}
COM: <s> this method will search the index for the given query string </s>
|
funcom_train/46693117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean deleteItems() {
if(table.getSelectionCount() <= 0) {
return false;
}
// loop over the table, removing any selected items
pushUndo(true);
table.setRedraw(false);
for(int i=0; i<table.getItemCount(); i++) {
if(table.isSelected(i)) {
table.remove(i);
i--;
}
}
table.setRedraw(true);
updateFileStatus(true);
colorRows();
updateItemCount();
return true;
}
COM: <s> deletes all the selected items </s>
|
funcom_train/41163611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoUserExer1Group entity) {
EntityManagerHelper.log("deleting CoUserExer1Group instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoUserExer1Group.class, entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co user exer1 group entity </s>
|
funcom_train/45421758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPubMedDocumentFactoryCallByName() {
try {
this.manager = new EbssDocumentFactoryManager(this.path,
this.properties);
EbssDocumentFactory pubmed = new PubMedDocumentFactory(this.path,
this.pubmedFactoryName, this.properties);
EbssDocumentFactory factory = this.manager
.getDocumentFactoryInstance(this.pubmedFactoryName);
assertTrue(factory.getName().compareTo(pubmed.getName()) == 0);
} catch (EbssException e) {
assertTrue(e.getCode() == EbssException.DOCUMENT_FACTORY_MANAGER_ERR);
fail(e.getMessage());
}
}
COM: <s> test call to pub med document factory by name </s>
|
funcom_train/48869478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(Product p, Connection conn) throws DataException, SQLException {
PreparedStatement ps = conn.prepareStatement("update Product set PRICE = ? where PRODUCTID = ?");
ps.setDouble(1, p.getPrice());
ps.setString(2, p.getId());
ps.executeUpdate();
}
COM: <s> updates a product object to the db </s>
|
funcom_train/51349006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append("{ zpath=" + zpath);
sb.append(", conditionsatisfied=" + conditionsatisfied);
sb.append(", disconnected=" + disconnected);
toString(sb); // extension hook
sb.append("}");
return sb.toString();
}
COM: <s> return a representation of the watcher state non blocking </s>
|
funcom_train/8795477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getAudio( short[] buffer, int length, Resampler resampler, boolean snapBack ) {
// Dont attempt to generate audio when no mixer step calculated.
if(period==0) return;
// Obtain the resampled audio
instrumentPlayer.getAudio( buffer, length, resampler, snapBack );
// Idea for XM/IT player - update instrument envelopes here.
}
COM: <s> get resampled audio into the specified buffers </s>
|
funcom_train/21057805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StandardGate clone() {
//get new StandardGate, empty
StandardGate g = new StandardGate(); //this.operation, this.getNumberOfInputs(), this.getInputNamesMap(), this.getOutputName());
//copy the info (using copyInfo() method of BaseGate base class)
this.copyInto(g);
//remained info
g.operation = this.operation;
return g;
}
COM: <s> clones the gate </s>
|
funcom_train/49875950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List queryWordPingyings(String str , String separete){
List chars = queryWord(str);
List charsPinying = multiplySet(chars);
List pingyingStrings = new ArrayList(charsPinying.size());
for(int i = 0 ; i<= charsPinying.size() -1 ; i++){
List pingying = (List) charsPinying.get(i);
String pingyingS = StringUtils.join(pingying.iterator(), separete);
pingyingStrings.add(pingyingS);
}
return pingyingStrings ;
}
COM: <s> will query the ping ying string of a word </s>
|
funcom_train/3152238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getInitParameterMap() {
synchronized (initParamMapSync) {
if (initParamMap==null) {
initParamMap=new EnumerationMap(servletConfig.getInitParameterNames(),
new KeyResolver() {
public Object resolve(Object key) {
return servletConfig.getInitParameter((String)key);
}
});
}
}
return initParamMap;
}
COM: <s> get a map of servlet init parameter names to values </s>
|
funcom_train/1779291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void accept(final ClassVisitor cv) {
String[] exceptions = new String[this.exceptions.size()];
this.exceptions.toArray(exceptions);
MethodVisitor mv = cv.visitMethod(access,
name,
desc,
signature,
exceptions);
if (mv != null) {
accept(mv);
}
}
COM: <s> makes the given class visitor visit this method </s>
|
funcom_train/32125729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean linkOccursInPath(int i,int j,Vector<Integer> solution){
for(int k=0;k<solution.size()-1;k ++){
if(solution.get(k) == i && solution.get(k+1) == j){
return true;
}
}
return false;
}
COM: <s> determine whether a link i j exists in a vector </s>
|
funcom_train/38993970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double categorize(ArgumentTree argumentTree, DeductiveArgument parent, DeductiveArgument node){
Set<DeductiveArgument> children = argumentTree.getNeighbors(node);
if(parent != null) children.remove(parent);
if(children.isEmpty())
return 1;
double sumChildren = 1;
for(DeductiveArgument child: children)
sumChildren += this.categorize(argumentTree, node, child);
return 1d/sumChildren;
}
COM: <s> categorizes the node in the given tree </s>
|
funcom_train/9576978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void PopulateSEQ() {
fileList.clear();
File[] files = DirectoryLister.GetSubDirectoires(base);
for (int y = 0; y < files.length; y++) {
String add = files[y].toString().substring(
files[y].toString().lastIndexOf("/") + 1,
files[y].toString().length());
fileList.addElement(add);
}
}
COM: <s> populate the sequence list </s>
|
funcom_train/38389958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getElementOfInput(IEditorInput input) {
if (input instanceof IClassFileEditorInput)
return ((IClassFileEditorInput)input).getClassFile();
else if (input instanceof IFileEditorInput)
return ((IFileEditorInput)input).getFile();
else if (input instanceof JarEntryEditorInput)
return ((JarEntryEditorInput)input).getStorage();
return null;
}
COM: <s> returns the element contained in the editor input </s>
|
funcom_train/25716593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object removeChild(int index) {
JSObject children = (JSObject) jsObject.getMember("childNodes");
Number length = (Number) children.getMember("length");
if (length == null || length.intValue() < index) {
return null;
}
Object result = children.getSlot(index);
if (result != null) {
jsObject.call("removeChild", new Object[] { result });
}
return JCPUtils.box(result);
}
COM: <s> removes a child node given its position </s>
|
funcom_train/18112097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPrivacyOfPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PrivacyCategory_PrivacyOf_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PrivacyCategory_PrivacyOf_feature", "_UI_PrivacyCategory_type"),
BioDBPackage.Literals.PRIVACY_CATEGORY__PRIVACY_OF,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the privacy of feature </s>
|
funcom_train/27727183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(String title){
System.out.println(title);
System.out.println(this.Year+","+this.Month+","+this.Day+" "+this.Hour+":"+this.Min+":"+this.Sec);
}
COM: <s> print out the date </s>
|
funcom_train/9367013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTabCount() {
int children = getChildCount();
// If we have dividers, then we will always have an odd number of
// children: 1, 3, 5, ... and we want to convert that sequence to
// this: 1, 2, 3, ...
if (mDividerDrawable != null) {
children = (children + 1) / 2;
}
return children;
}
COM: <s> returns the number of tab indicator views </s>
|
funcom_train/12547986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeHue(double change) {
float[] hsbvals = Color.RGBtoHSB(color.getRed(), color.getGreen(),
color.getBlue(), null);
hsbvals[0] += ((float) change) / 360f;
setColor(Color.getHSBColor(hsbvals[0], hsbvals[1], hsbvals[2]));
}
COM: <s> changes the current color by the given hue angle </s>
|
funcom_train/16594783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JComponent getJPanelPreview() {
if (jPanelPreview == null) {
jPanelPreview = new StylePreviewer();
jPanelPreview.setPreferredSize(new java.awt.Dimension(100,100));
jPanelPreview.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));
((StylePreviewer) jPanelPreview).setShowOutline(true);
}
return jPanelPreview;
}
COM: <s> this method initializes j panel preview </s>
|
funcom_train/35955317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showNewTemplateHelp(final String docName) {
String msg = "No existing template matched the structure of \"" + docName + "\", \n"
+ "so a new template was auto-generated.\n\n"
+ "Update the default settings and click save when finished.";
JOptionPane.showMessageDialog(this, msg, "New Template", JOptionPane.INFORMATION_MESSAGE);
}
COM: <s> helper to show an info messgae about the new template setup process </s>
|
funcom_train/5593188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readMessage(IRCMessage message) {
debugLog.fine(name + " received message");
if (message.isNumeric()) {
processNumeric(message);
} else if (message.isNamed()) {
processNamed(message);
} else if (message.isCtcpRequest()) {
processCtcpRequest(message);
} else if (message.isCtcpReply()) {
processCtcpReply(message);
}
}
COM: <s> receives the specified code ircmessage code from this </s>
|
funcom_train/9238806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getOtherModeString(final byte nValue) {
final char[] modes = new char[hChanModesOther.size()];
Byte nTemp;
int i = 0;
for (char cTemp : hChanModesOther.keySet()) {
nTemp = hChanModesOther.get(cTemp);
if (nTemp == nValue) { modes[i++] = cTemp; }
}
// Alphabetically sort the array
Arrays.sort(modes);
return new String(modes).trim();
}
COM: <s> get modes from h chan modes other that have a specific value </s>
|
funcom_train/32016720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AuthToken getAuthenticationToken(String userid, String cred) {
AuthToken token = null;
Get_authToken get_authToken = new Get_authToken();
get_authToken.setUserID(userid);
get_authToken.setCred(cred);
try {
token = binding.get_authToken(get_authToken);
} catch (Exception ex) {
}
return token;
}
COM: <s> this function is to get an authantication token from the ws context store </s>
|
funcom_train/14421931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deselect() {
if (log.isDebugEnabled())
log.debug("Deselecting " + SWTUtils.toString(widget));
assertEnabled();
if (!isChecked()) {
if (log.isDebugEnabled())
log.debug("Widget " + SWTUtils.toString(widget) + " already deselected, not deselecting again.");
return;
}
asyncExec(new VoidResult() {
public void run() {
if (log.isDebugEnabled())
log.debug("Deselecting " + widget);
((Button) widget).setSelection(false);
}
});
notifyListeners();
}
COM: <s> deselect the checkbox </s>
|
funcom_train/17416123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rotateRight() {
if (status == NORMAL) {
status = RIGHT;
} else if (status == LEFT) {
status = NORMAL;
} else if (status == DOWNSIDE) {
status = LEFT;
} else if (status == RIGHT) {
status = DOWNSIDE;
}
updateThumbImage();
notifyListeners();
}
COM: <s> rotates internal thumbnail image to right and updates the </s>
|
funcom_train/11322561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMessageInheritance() {
MockContext.initContext(Locale.ENGLISH);
MessagesMap map = new MessagesMap(Test2TextField.class, Control.CONTROL_MESSAGES);
assertFalse(map.isEmpty());
assertTrue(map.size() > 30);
assertTrue(map.containsKey("name"));
assertEquals("Test1TextField", map.get("name"));
assertEquals("Test2TextField", map.get("classname"));
}
COM: <s> check that message inheritance works properly for custom controls </s>
|
funcom_train/9704724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void mapXmlStream(HashMap map, boolean packageIsKey) throws BuildException {
try {
mapXmlReader = StAXUtils.createXMLStreamReader(mapInputStream);
mapXmlReader(map, packageIsKey);
//ensure this clean up so that the next invocation does not have any stale state
mapXmlReader = null;
} catch ( Exception e ) {
throw new BuildException(e);
}
}
COM: <s> load a mapping input stream and save it to the map </s>
|
funcom_train/25980284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void release() throws Exception {
if (manager != null) {
manager.release();
DBConnection.release();
ConnInfo.release();
TxDicc.release();
manager = null;
}
if (log.isDebugEnabled())
log.debug(".release exited client="+clients);
clients--;
}
COM: <s> shutdown dbprism connection cache proxy </s>
|
funcom_train/50531274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getInsertInvite_menuitem() {
if (insertInvite_menuitem == null) {
insertInvite_menuitem = new JMenuItem();
insertInvite_menuitem.setText(I18n.getString("insertinvitation")+"...");
insertInvite_menuitem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
insertInvitation();
}
});
}
return insertInvite_menuitem;
}
COM: <s> this method initializes inset invite menuitem </s>
|
funcom_train/15680038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateButtonEnableStatus() {
buttonRemoveProperty.setEnabled( ( propertyTree.getSelectionCount() != 0 ) );
buttonEditProperty.setEnabled( ( propertyTree.getSelectionCount() != 0 ) );
buttonRemoveSelector.setEnabled( ( selectorTree.getSelectionCount() != 0 ) );
}
COM: <s> sets the buttons enabled or disabled based on the selection of the property </s>
|
funcom_train/34339662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand5() {
if (okCommand5 == null) {//GEN-END:|39-getter|0|39-preInit
// write pre-init user code here
okCommand5 = new Command("Agregar", Command.OK, 0);//GEN-LINE:|39-getter|1|39-postInit
// write post-init user code here
}//GEN-BEGIN:|39-getter|2|
return okCommand5;
}
COM: <s> returns an initiliazed instance of ok command5 component </s>
|
funcom_train/4615384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processResults(HTMLTestResults results, HttpResponse res) throws IOException {
res.setContentType("text/html");
OutputStream out = res.getOutputStream();
Writer writer = new OutputStreamWriter(out, StringUtil.__ISO_8859_1);
results.write(writer);
writer.flush();
}
COM: <s> print the test results out to the html response </s>
|
funcom_train/36190421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean compareNodes(SessionPlanNode otherNode) {
boolean returnValue = false;
if (this.Handle == otherNode.getHandle()
&& this.isRequired() == otherNode.isRequired()
&& this.service.getServiceId().equals(otherNode.getService().getServiceId())) {
returnValue = true;
}
return returnValue;
}
COM: <s> compare the attributes of two nodes </s>
|
funcom_train/22967383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPackageNameWithSlashWithoutModel() throws XavaException {
if (packageNameWithSlashWithoutModel == null) {
String packageName = getPackageName();
if (packageName == null) return null;
packageNameWithSlashWithoutModel = Strings.change(packageName, ".", "/");
packageNameWithSlashWithoutModel = packageNameWithSlashWithoutModel.substring(0, packageNameWithSlashWithoutModel.lastIndexOf('/'));
}
return packageNameWithSlashWithoutModel;
}
COM: <s> package using instead of </s>
|
funcom_train/3341112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConfiguration(Device device, NetDeviceConfig config) {
final Preferences devPrefs = devConfigsPrefs.node(device.getId());
devPrefs.put(CONFIG_CLASS_NAME_KEY, config.getClass().getName());
config.store(devPrefs);
}
COM: <s> set the configuration data for the given device </s>
|
funcom_train/44852662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getVersion() {
try {
QueryResult lVersions = select();
while (lVersions.hasMoreElements()) {
return lVersions.nextAsDomainObject().get(KEY_ID).toString();
}
}
catch (VException exc) {
LOG.error("Error encountered while retrieving the version information!", exc);
}
catch (SQLException exc) {
LOG.error("Error encountered while retrieving the version information!", exc);
}
return DFT_VERSION;
}
COM: <s> retrieves the stored version information </s>
|
funcom_train/5668491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File searchCurrentDir(File[] aFileList) {
File smaller = aFileList[0];
for (int i = 1; i < aFileList.length; i++) {
File file = aFileList[i];
int result = file.compareTo(smaller);
if (result < 0) smaller = file;
}
if (!smaller.isDirectory())
return smaller.getParentFile();
else
return smaller;
}
COM: <s> this method looking for current directory in dn d file list </s>
|
funcom_train/17433787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean heuristicallyConstant(VariableElement e) {
// Fields declared in interfaces are logically
// constants, JLSv3 section 9.3.
if (e.getEnclosingElement().getKind() == INTERFACE)
return true;
else if (e.getKind() == FIELD
&& e.getModifiers().containsAll(
EnumSet.of(PUBLIC, STATIC, FINAL)))
return true;
else {
// A parameter declared final should not be named like
// a constant, neither should exception parameters.
return false;
}
}
COM: <s> using heuristics return </s>
|
funcom_train/2580115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExplodePercent(Comparable key, double percent) {
if (key == null) {
throw new IllegalArgumentException("Null 'key' argument.");
}
if (this.explodePercentages == null) {
this.explodePercentages = new TreeMap();
}
this.explodePercentages.put(key, new Double(percent));
fireChangeEvent();
}
COM: <s> sets the amount that a pie section should be exploded and sends a </s>
|
funcom_train/325540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void drawLogAxis(Graphics2D g2d) {
ArrayList<Point> axisPoints = getLogPoints(false);
// axis values are set in the same function and held
for (int i = 0; i < axisPoints.size(); i++) {
drawTickAndLabel(g2d, axisPoints.get(i), axisValues.get(i));
}
}
COM: <s> draw a logarithmic axis on the graphics context </s>
|
funcom_train/12548007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setEditing(String item) {
int i;
for (i = 0; i < parameterModel.getRowCount(); i++)
if (parameterModel.getValueAt(i, 0).equals(item))
break;
if (i == parameterModel.getRowCount()) // We need to create it.
parameterModel.setValueAt(item, --i, 0);
int column = parameterTable.convertColumnIndexToView(1);
parameterTable.editCellAt(i, column);
parameterTable.requestFocus();
}
COM: <s> this will edit the value for a particular parameter in the parameter </s>
|
funcom_train/8045522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdownServer() throws SQLException {
try {
this.io.sendCommand(MysqlDefs.SHUTDOWN, null, null, false, null, 0);
} catch (Exception ex) {
SQLException sqlEx = SQLError.createSQLException(
Messages.getString("Connection.UnhandledExceptionDuringShutdown"),
SQLError.SQL_STATE_GENERAL_ERROR, getExceptionInterceptor());
sqlEx.initCause(ex);
throw sqlEx;
}
}
COM: <s> used by mini admin to shutdown a my sql server </s>
|
funcom_train/14108524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PSObjectDict where(final PSObject key) {
// First look in the non-permanent dictionaries
for (int i = dictStack.size() - 1; i >= 0; i--) {
PSObjectDict dict = dictStack.get(i);
if (dict.known(key)) {
return dict;
}
}
return null;
}
COM: <s> search the dictionary that defines a specific key </s>
|
funcom_train/3897800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File askExportFolder() {
// Ask for the File Name
String previewSavePath = ReloadEMFEditorAdvisor
.openDirPathDialog(PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell(),
"Select an empty folder for saving CP preview");
// User Cancelled
if (previewSavePath == null)
return null;
// Get the chosen File
File file = new File(previewSavePath);
// Create if it doesn't exist
file.mkdirs();
return file;
}
COM: <s> prompt the user for a folder to export files to </s>
|
funcom_train/17361419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getProfilePath() {
if (profilePath == null) {
setProfilePath(new File(System.getProperty("user.dir"), PROFILE_DEFAULT_DIR).getAbsoluteFile());
}
if (!profilePath.exists()) {
profilePath.mkdir();
}
return profilePath;
}
COM: <s> returns directory where profile is created </s>
|
funcom_train/45226243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void drawOldScreen(Graphics g,int left,int top){
if (fullScreen)
g.drawImage(oldScreen, left, top, Graphics.TOP|Graphics.LEFT);
else
g.drawRegion(oldScreen, 0, contentTop, width, contentHeight, Sprite.TRANS_NONE, left, top+contentTop, Graphics.TOP | Graphics.LEFT);
}
COM: <s> old screen drawing method </s>
|
funcom_train/26266946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void push(final Packet p) {
if (p == null) {
FlowError.complain("Null packet reference in 'push' method call: " + getName());
}
if (this != p.owner) {
FlowError.complain("Packet not owned by current component, or component has terminated");
}
stack.push(p);
p.clearOwner();
}
COM: <s> push packet onto stack and clear owner reference </s>
|
funcom_train/863010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHtmlParser() throws Exception {
String htmlContent = FileUtils.readFileToString(new File(
"testdata_in/file1.htm"), "iso-8859-1");
final Parser parser = Parser.createParser(htmlContent, null);
NodeList linkNodes = parser
.extractAllNodesThatMatch(new NodeClassFilter(LinkTag.class));
Node[] nodes = linkNodes.toNodeArray();
for (Node node : nodes) {
System.out.println("Node: " + node.toHtml());
}
}
COM: <s> test html parser </s>
|
funcom_train/9887495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isRemote(String name) {
String remoute = this.cfg.getString("algorithm.remote");
if (remoute == null) {
return false;
}
StringTokenizer tokenizer = new StringTokenizer(remoute, ":");
String str;
while (tokenizer.hasMoreTokens()) {
str = tokenizer.nextToken();
if (str.trim().toUpperCase().equals(name.toUpperCase())) {
return true;
}
}
return false;
}
COM: <s> returns true if algorithm with a specified name was configured </s>
|
funcom_train/18660887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMonthNodeCount( Integer year, Integer month ) {
logger.fine( year + " " + month );
try {
return getNodes( year, month ).size();
} catch ( NullPointerException ex ) {
logger.info( "Got a NPE on Year " + year + " Month " + month );
return 0;
}
}
COM: <s> returns the number of nodes in a month of a year </s>
|
funcom_train/46768937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadBundle() {
try {
FileInputStream istream = new FileInputStream("src/test/resources/Tmx20Test.000.xml");
Tmx20 tmx = new Tmx20();
this.setStore(tmx.read(istream));
istream.close();
} catch (Exception e) {
/* do nothing */;
}
}
COM: <s> this method is responsible for setting up the locale store object </s>
|
funcom_train/50911198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Real2 distanceOutside(Real2 p) {
Real2 r2 = null;
if (p != null) {
double dx = xrange.distanceOutside(p.getX());
double dy = yrange.distanceOutside(p.getY());
if (!Double.isNaN(dx) && !Double.isNaN(dy)) {
r2 = new Real2(dx, dy);
}
}
return r2;
}
COM: <s> gets minimum x and y translations required to move point into range </s>
|
funcom_train/47184024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int updateCode(OverrideReasonBean orc) throws DBException {
Connection conn = null;
PreparedStatement ps = null;
try {
conn = factory.getConnection();
ps = conn.prepareStatement("UPDATE DrugReactionOverrideCodes SET Description = ? " + "WHERE Code = ?");
ps.setString(1, orc.getDescription());
ps.setString(2, orc.getORCode());
return ps.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
throw new DBException(e);
} finally {
DBUtil.closeConnection(conn, ps);
}
}
COM: <s> updates a particular codes description </s>
|
funcom_train/37508240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JTextField getTextWidth() {
if (m_textWidth == null) {
m_textWidth = new JTextField();
m_textWidth.setPreferredSize(new Dimension(50,
m_textWidth.getPreferredSize().height));
m_textWidth.setEditable(false);
m_textWidth.setEnabled(false);
}
return m_textWidth;
}
COM: <s> returns the textfield for the scale width </s>
|
funcom_train/3651241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if ((null == obj) || (obj.getClass() != getClass())) {
return false;
}
PagerAddress other = (PagerAddress)obj;
return other.pagerID.equals(pagerID) &&
(other.coverage == coverage) &&
other.snppServer.equals(snppServer);
}
COM: <s> compares two addresses for equality </s>
|
funcom_train/12129843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaintFrom(PBounds localBounds, PNode childOrThis) {
if (parent != null) {
if (childOrThis != this) {
localToParent(localBounds);
}
else if (!getVisible()) {
return;
}
parent.repaintFrom(localBounds, this);
}
}
COM: <s> pass the given repaint request up the tree so that any cameras can </s>
|
funcom_train/29025294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransform(Transform transform) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (transform != null && transform.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (data.gdipGraphics == 0 && transform == null) return;
initGdip();
int /*long*/ identity = identity();
if (transform != null) {
Gdip.Matrix_Multiply(identity, transform.handle, Gdip.MatrixOrderPrepend);
}
Gdip.Graphics_SetTransform(data.gdipGraphics, identity);
Gdip.Matrix_delete(identity);
data.state &= ~DRAW_OFFSET;
}
COM: <s> sets the transform that is currently being used by the receiver </s>
|
funcom_train/19844672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getObjectWidth(int groupID, int objectID) {
if (groupID >= 0 && groupID < objectGroups.size()) {
ObjectGroup grp = (ObjectGroup) objectGroups.get(groupID);
if (objectID >= 0 && objectID < grp.objects.size()) {
GroupObject object = (GroupObject) grp.objects.get(objectID);
return object.width;
}
}
return -1;
}
COM: <s> returns the width of a specific object from a specific group </s>
|
funcom_train/35284165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void appendVertexReference(int basicVertexIndex, int resultIndex, Map<Integer, List<Integer>> vertexReferenceMap) {
List<Integer> referenceList = vertexReferenceMap.get(Integer.valueOf(basicVertexIndex));
if (referenceList == null) {
referenceList = new ArrayList<Integer>();
vertexReferenceMap.put(Integer.valueOf(basicVertexIndex), referenceList);
}
referenceList.add(Integer.valueOf(resultIndex));
}
COM: <s> this method fills the vertex reference map </s>
|
funcom_train/50865853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IntPoint getLabelLocation(IntPoint unitPosition, Icon unitIcon) {
int unitX = unitPosition.getiX();
int unitY = unitPosition.getiY();
int iconHeight = unitIcon.getIconHeight();
int iconWidth = unitIcon.getIconWidth();
return new IntPoint(unitX + (iconWidth / 2) + LABEL_HORIZONTAL_OFFSET,
unitY + (iconHeight / 2));
}
COM: <s> gets the label draw postion on map panel </s>
|
funcom_train/20841017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addURL(String newURL) {
if (edits.size() > m_IdxAdd) {
edits.setElementAt(new UndoableURL(newURL), m_IdxAdd++);
for (int i = m_IdxAdd; i < edits.size(); i++) {
edits.removeElementAt(i);
}
} else {
edits.addElement(new UndoableURL(newURL));
m_IdxAdd++;
}
}
COM: <s> adds the url </s>
|
funcom_train/17279224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUnit() {
String unit = "";
if(unitSelector != null) {
unit = unitSelector.getSelectedItem().toString();
}
else if(unitName != null) {
unit = unitName.getText();
}
else {
unit = UNIT_PT;
}
if(unit.equalsIgnoreCase(UNIT_PT)) {
unit = "";
}
return unit;
}
COM: <s> get the unit string of this size selector panel </s>
|
funcom_train/6356712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public enum LabelSpec {
/**
* No child label (i.e. the peer contains only a child widget, and
* asLabel() returns null).
*/
NONE,
/**
* The label right side appears next to the widget left side.
*/
NEAR_LEFT,
/**
* The label right side appears away from the widget left side.
*/
FAR_LEFT,
/**
* The label left side appears next to the widget right side.
*/
NEAR_RIGHT,
/**
* The label left side appears away from the widget right side.
*/
FAR_RIGHT;
}
COM: <s> specification for the child label </s>
|
funcom_train/13692881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateNodes(GuiNode node){
GuiNode tmpnode;
for(Enumeration en = nodes.elements(); en.hasMoreElements();) {
tmpnode = (GuiNode)en.nextElement();
if (tmpnode == null)
continue;
if (node.id == tmpnode.id) {
tmpnode = node;
}
}
setNodes(nodes);
setLinks(links);
repaint();
}
COM: <s> updates the node vector </s>
|
funcom_train/43199104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRelative(Person person) {
int index = model.returnStaticEndorsementIndex("is-relative");
try {
if (endorsementsRecord.isEmpty()) {
return false;
}
if (endorsementsRecord.containsKey(person.getId())) {
if (siblings.contains(person)
|| endorsementsRecord.get(person.getId()).getStaticEndorsements()[index]) {
return true;
}
}
} catch (Exception e) {e.printStackTrace();}
return false;
}
COM: <s> is this person endorsed as a relative includes siblings </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.