__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
|---|---|---|
funcom_train/50488202
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public StrBuffer append(String str) {
int oldlen = str.length();
int newlen = this.numchar + oldlen;
if (newlen > this.mybuf.length)
moreStorage(newlen);
str.getChars(0, oldlen, this.mybuf, this.numchar);
this.numchar = newlen;
return this;
}
COM: <s> appends the argument string to this string buffer </s>
|
funcom_train/818630
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String describe() {
StringBuffer sb = new StringBuffer();
sb.append("For every currently selected node in the graph view, this ");
sb.append("plugin additionally selects each neighbor of that node if ");
sb.append("the canonical names of the two nodes have the same last letter.");
return sb.toString();
}
COM: <s> gives a description of this plugin </s>
|
funcom_train/37823285
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void log(String title) {
StringBuffer buf = new StringBuffer(title);
buf.append("\n new tree: "+algo.getTree().getNodesAsInteger()+", "+algo.getTree().getEdges());
buf.append("\n new stack: "+algo.getStack());
buf.append("\n new current node: "+algo.getCurrentNode());
logger.log(LOGGER_LEVEL, buf.toString());
}
COM: <s> logs the current node tree nodes and stack </s>
|
funcom_train/19810329
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Cursor fetchNote(long rowId) throws SQLException {
Cursor mCursor =
mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID,
KEY_TITLE, KEY_BODY}, KEY_ROWID + "=" + rowId, null,
null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;
}
COM: <s> return a cursor positioned at the note that matches the given row id </s>
|
funcom_train/47587547
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean login(String userName, String password) {
String message = "" + LOGIN + DELIMITER + userName + DELIMITER + password;
this.sendToSocket(message);
String ans = this.readFromSocket();
String[] tokens = ans.split(DELIMITER);
if (tokens[0].equals("MEMBER")) {
this._user = (Member) XMLUtils.deserialize(tokens[1]);
return true;
}
if (tokens[0].equals("ERROR")) {
this.handleErrorMessage(tokens[1]);
return false;
} else {
System.err.println("unexcpected reply from server!");
return false;
}
}
COM: <s> when the surfer chooses to login </s>
|
funcom_train/31100286
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void processMessage(MessageEvent event) {
switch (event.getMessageType()) {
case MessageEvent.ERROR:
System.err.print("ERROR: " + event.getMessage());
break;
case MessageEvent.LOG:
System.out.print("LOG: " + event.getMessage());
break;
default:
System.out.print("Unknown message type: " + event.getMessage());
}
}
COM: <s> the method process message has to be overwritten to handle the message events </s>
|
funcom_train/46764921
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void update(Observable obs, Object arg) {
if (obs instanceof RoomConnection && arg instanceof ParticipantsChange){
ParticipantsChange pc = (ParticipantsChange)arg;
final boolean available = pc.isAvailable();
final String nick = pc.getNick();
final String resource = pc.getResource();
final Participant p = new Participant(nick,resource);
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
if (available){
if (!contains(p)){
addElement(p);
}
}
if (!available){
if (contains(p)){
removeElement(p);
}
}
}
});
fireIntervalAdded(this,0,this.getSize());
}
}
COM: <s> update the model when new participants changes arrive </s>
|
funcom_train/9499556
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean isParentOf(GeoElement geo) {
if (algoUpdateSet != null) {
Iterator it = algoUpdateSet.getIterator();
while (it.hasNext()) {
AlgoElement algo = (AlgoElement) it.next();
for (GeoElement element : algo.output)
if (geo == element) // child found
return true;
}
}
return false;
}
COM: <s> returns whether geo depends on this object </s>
|
funcom_train/25099304
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addResistancePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_HardwareConnector_resistance_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_HardwareConnector_resistance_feature", "_UI_HardwareConnector_type"),
HardwaremodelingPackage.Literals.HARDWARE_CONNECTOR__RESISTANCE,
true,
false,
false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the resistance feature </s>
|
funcom_train/34620663
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void addPathsToCombo() {
// Get DialogSettings
IDialogSettings settings = DeftPlugin.getInstance().getDialogSettings();
// Get section of DialogSettings and add to stored path to the combo box
IDialogSettings section = settings.getSection(DIALOG_SETTINGS_SECTION);
if (section != null) {
String[] paths = section.getArray(DIALOG_SETTINGS_ENTRY);
combo.setItems(paths);
combo.setText(paths[0]);
combo.update();
}
}
COM: <s> adds all paths of previously used repositories to the combo box of this </s>
|
funcom_train/28686809
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void clear() {
getTagListBox(ALL_TAG_LIST_BOX).getItems().clear();
getTagListBox(LOOKUP_TAG_LIST_BOX).getItems().clear();
Clients.evalJavaScript("clearAll();");
clearReader(TRAIN_TRACKER_READER1);
clearReader(TRAIN_TRACKER_READER2);
clearReader(TRAIN_TRACKER_READER3);
}
COM: <s> clears the current results from the ui </s>
|
funcom_train/44389073
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ActionErrors validate(ActionMapping mapping,HttpServletRequest request) {
ActionErrors actionErrors = new ActionErrors();
if (username == null || username.length() <= 0) {
actionErrors.add("login",new ActionError("login.username.blank"));
return actionErrors;
}
if (password == null || password.length() <= 0) {
actionErrors.add("password",new ActionError("login.password.blank"));
return actionErrors;
}
return actionErrors;
}
COM: <s> method validate test if the fields are not null </s>
|
funcom_train/2388167
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void updateRecord(PwsEntryBean newEntry) {
if (log.isDebugEnabled())
log.debug("Dialog has been edited, updating safe"); //$NON-NLS-1$
getPwsDataStore().updateEntry(newEntry);
if (isDirty()) {
saveOnUpdateOrEditCheck();
}
//TODO: this should only be called if the the update changes visible fields
updateViewers();
}
COM: <s> updates an existing record </s>
|
funcom_train/29618352
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private MgisRadioButton getJRadioPartialDuplication() {
if (jRadioPartialDuplication == null) {
jRadioPartialDuplication = new MgisRadioButton();
jRadioPartialDuplication.setText(AppTextsDAO.get("LABEL_PARTIAL"));
jRadioPartialDuplication.setValue("2");
m_duplicationType.add(jRadioPartialDuplication);
jRadioPartialDuplication.setBounds(189, 90, 97, 19);
}
return jRadioPartialDuplication;
}
COM: <s> this method initializes j radio partial duplication </s>
|
funcom_train/34111538
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void cancelCheckout(){
if (table.isDocumentSelected() && table.getDocument() != null) {
// ServiceDefTarget endPoint = (ServiceDefTarget) documentService;
// endPoint.setServiceEntryPoint(Config.OKMDocumentService);
Main.get().mainPanel.browser.fileBrowser.status.setFlagCheckout();
// documentService.cancelCheckout(table.getDocument().getPath(), callbackCancelCheckOut);
}
}
COM: <s> document cancel checkout </s>
|
funcom_train/18330229
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void add(Object property, ErrorItem message) {
ActionMessageItem item = messages.get(property);
List<ErrorItem> list = null;
if ( item == null ) {
list = new ArrayList<ErrorItem>();
item = new ActionMessageItem(list, iCount++);
messages.put(property, item);
}
else {
list = item.getList();
}
list.add(message);
}
COM: <s> add a message to the set of messages for the specified property </s>
|
funcom_train/32328559
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setLocale(final LocaleSupport locale) {
try {
setBundle(locale.getBundle());
add(locale);
Settings.set(SETTINGS_KEY, locale.getClass().getName());
} catch (final MissingResourceException ex) {
ExceptionHandlers.getGeneralHandler().handle(ex);
} catch (final ResourceException ex) {
ExceptionHandlers.getGeneralHandler().handle(ex);
}
}
COM: <s> sets the current locale and updates resources </s>
|
funcom_train/38957765
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addBIstBevorzugtPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Weiche_bIstBevorzugt_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Weiche_bIstBevorzugt_feature", "_UI_Weiche_type"),
ModelrailwayPackage.Literals.WEICHE__BIST_BEVORZUGT,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the bist bevorzugt feature </s>
|
funcom_train/43579581
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public double getAsDouble(final String name) {
final Object val = params.get(name);
if (val == null) {
return 0.0d;
}
if (val instanceof Boolean) {
return ((Boolean) val).equals(Boolean.TRUE) ? 1.0d : 0.0d;
}
if (val instanceof Integer) {
return ((Integer) val).doubleValue();
}
if (!(val instanceof Double)) {
return 0.0d;
}
return ((Double) val).doubleValue();
}
COM: <s> get the value for an double number parameter </s>
|
funcom_train/13491605
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Class getClass(Object obj) {
if (obj instanceof Predicate) return Predicate.class;
if (obj instanceof Function) return Function.class;
if (obj instanceof ConstantTerm) return ConstantTerm.class;
if (obj instanceof ComplexTerm) return ComplexTerm.class;
if (obj instanceof VariableTerm) return VariableTerm.class;
if (obj instanceof Prerequisite) return Prerequisite.class;
if (obj instanceof Fact) return Fact.class;
if (obj instanceof Rule) return Rule.class;
if (obj instanceof ClauseSet) return ClauseSet.class;
if (obj instanceof DataSource) return DataSource.class;
return obj==null?null:obj.getClass();
}
COM: <s> get the class name of an object </s>
|
funcom_train/30005617
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void preview(String adress, String user, String password, String name) {
DBAdapter con = new DBConnection(adress, user, password, name);
int result = con.connect();
if(processErrorCode(result)) {
if(this.processErrorCode(con.existsProject())) {
// preview
System.out.print("ok");
}
}
con.disconnect();
}
COM: <s> this functions preview the operations which will be done in an synchronization </s>
|
funcom_train/29617444
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setLayout(null);
jPanel.add(getMyTextField(), null);
jPanel.add(getMyTextField2(), null);
jPanel.add(getMyTable(),null);
MouseListener listener = new DragMouseAdapter();
MyTextField.addMouseListener(listener);
MyTextField2.addMouseListener(listener);
MyTable.addMouseListener(listener);
LoadLine2MyTable();
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/8483456
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void event_goOnline() {
this.receive(new Event("goOnline") {
public void process(Object myself) {
try {
Address myAddress = communicationBus_.connect();
Logging.VirtualMachine_LOG.info(this + ": interpreter online, address = " + myAddress);
} catch (NetworkException e) {
Logging.VirtualMachine_LOG.fatal(this + ": could not connect to network:", e);
}
}
});
}
COM: <s> signals that this vm can connect to the underlying network channel </s>
|
funcom_train/16490173
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ComponentState getPrevColumnState(int columnIndex) {
if (this.header.isEnabled()
&& this.header.getTable().isEnabled()
&& SubstanceDefaultTableHeaderCellRenderer.isColumnSorted(
this.header.getTable(), columnIndex))
return ComponentState.SELECTED;
if (prevStateMap.containsKey(columnIndex))
return prevStateMap.get(columnIndex);
return ComponentState.DEFAULT;
}
COM: <s> returns the previous state for the specified column </s>
|
funcom_train/3543280
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void checkWarningState() {
boolean warning = (table.getRowCount() == 0)
&& (table.getModel().getRowCount() > 0);
if (warning != this.onWarning) {
this.onWarning = warning;
for (FilterEditor editor : getEditors()) {
editor.setWarning(warning);
}
}
}
COM: <s> verifies if the current filter is hiding all table rows </s>
|
funcom_train/3092380
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void run() {
try {
boolean isAtBottom;
while( true ) {
// TODO: this is slow and jerky, come up with a better strategy
Thread.sleep( 100 );
while( buffer.available() > 0 ) {
if (!processLine(readLine())) {
return;
}
}
}
} catch( Exception e ) {
System.err.println( "The buffer monitor has crashed: " + e + "\n" );
e.printStackTrace(IOHandler.ORIGINAL_ERR);
}
}
COM: <s> checks this monitors buffer for new data every 100 ms and appends </s>
|
funcom_train/36851355
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String toString() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
StringBuilder sb = new StringBuilder(50);
sb.append(sdf.format(begin));
sb.append(" - ");
sb.append(sdf.format(end));
return sb.toString();
}
COM: <s> returns the objects content as string </s>
|
funcom_train/8439365
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Command getOkCommand() {
if (okCommand == null) {//GEN-END:|204-getter|0|204-preInit
// write pre-init user code here
okCommand = new Command("\u041E\u041A", Command.OK, 0);//GEN-LINE:|204-getter|1|204-postInit
// write post-init user code here
}//GEN-BEGIN:|204-getter|2|
return okCommand;
}
COM: <s> returns an initiliazed instance of ok command component </s>
|
funcom_train/50484545
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setSelectedItem(Object o) {
if (contentComponent instanceof JTable)
System.out.println("EntityPanel: setSelectedItem on a JTable not implemented yet.");
else if (contentComponent instanceof JList)
((JList)contentComponent).setSelectedValue(o, true);
else
selectedItem = o;
}
COM: <s> set the currently selected item </s>
|
funcom_train/29792700
|
/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 (obj != null && obj instanceof Privilege) {
Privilege privilege = (Privilege)obj;
return (privilege.getUserID().equals(getUserID())) &&
(privilege.getCourseID().equals(getCourseID()));
}
else
return false;
}
COM: <s> compares the current privilege with another for equality </s>
|
funcom_train/121522
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Object last() {
if (!empty()) {
LogoLink cur = head;
while (cur.next != null)
cur = cur.next;
return cur.data;
} else {
if (logoErrors)
throw new RuntimeException("Last does not like [] as input.");
else throw new RuntimeException("Cannot use last on an empty list");
}
}
COM: <s> returns a reference to the last object in the list </s>
|
funcom_train/3155821
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void onRemoveButton() {
final Object[] toRemove = _listComponent.getSelectedValues();
for (int n = 0; n < toRemove.length; n++) {
_fileList.remove(toRemove[n]);
}
_listComponent.setListData(_fileList);
notifyListener();
}
COM: <s> callback invoked by the remove button </s>
|
funcom_train/7277403
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean readChatHeader(Header header) throws IOException {
if (!HTTPHeaderName.CHAT.matches(header)) {
return false;
}
if (setHostAndPort(header.getValue())) {
uploader.setChatEnabled(true);
uploader.setBrowseHostEnabled(true);
} else {
throw new ProblemReadingHeaderException();
}
return true;
}
COM: <s> read the chat portion of a header </s>
|
funcom_train/28298208
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeImage(TransMap mainPane) {
TransBaseMap map = mainPane.getMap();
if (map!=null) {
err=map.setBkImage(null);
mainPane.repaint();
if (err!=0) TransBaseText.printError(err, mainPane);
} else TransBaseText.printError(-10320, mainPane);
}
COM: <s> removes the image and shows a blank background </s>
|
funcom_train/49154825
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setDefaultImports(String packageList) {
importSet.clear();
if (null!=packageList) {
packageList = packageList.trim();
if (0<packageList.length()) {
Vector v = StringUtils.split(packageList,',');
importSet.addAll(v);
}
}
}
COM: <s> set default import set </s>
|
funcom_train/24372715
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private OMElement firstChildWithLocalName(OMElement ele, String localName) {
for (Iterator it = ele.getChildElements(); it.hasNext();) {
OMElement child = (OMElement) it.next();
if (child.getLocalName().equals(localName)) {
return child;
}
}
return null;
}
COM: <s> placed here to remove dependency on xds classes </s>
|
funcom_train/9523231
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void printLSeqsList(Vector<Vector<Vector<Vector<LockEvent>>>> LSeqsList) {
System.out.println("Printing LSeqsList after collectLockSequences----------------");
for (Vector<Vector<Vector<LockEvent>>> LSeqs : LSeqsList) {
System.out.println("---------Thread---------");
for (Vector<Vector<LockEvent>> L : LSeqs) {
System.out.println("-------Frame-------");
for (Vector<LockEvent> LBranch : L) {
System.out.println("----Branch----");
for (LockEvent e : LBranch) {
System.out.println("--Event--");
e.print();
}
}
}
}
}
COM: <s> prints the lseqs list for debugging purposes </s>
|
funcom_train/32380389
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testAddResourceForFailure() {
System.out.println("testAddResourceForFailure");
Resources resource = null;
ResourceManager resManager = new ResourceManager();
int expResult = IdentityMgmtConstants.ACTION_FAILED;
int result = resManager.addResource(resource);
assertEquals(expResult, result);
}
COM: <s> test of add resource method of class com </s>
|
funcom_train/3272975
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Fleet getFleet(int fleetNum) {
Fleet fleet;
for(Enumeration units = fleets.elements(); units.hasMoreElements();){
fleet = (Fleet) (units.nextElement());
// Update this fleetNumber
if (fleet.fleetNumber() == fleetNum) {
return fleet;
}
}
return null;
}
COM: <s> get the fleet with the specified fleet number </s>
|
funcom_train/10955650
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setFilterConfig(FilterConfig filterConfig) {
try {
init(filterConfig);
} catch (ServletException se) {
LOG.error("Couldn't set the filter configuration in this filter", se);
}
ServletContextSingleton singleton = ServletContextSingleton.getInstance();
singleton.setServletContext(filterConfig.getServletContext());
}
COM: <s> dummy setter for </s>
|
funcom_train/9748178
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void setHeater(int heat, int safetyCutoff, boolean lock) throws IOException {
//System.out.println(material + " extruder heater set to " + heat + " limit " + safetyCutoff);
if (lock)
{
waitTillNotBusy();
communicator.lock();
}
try {
communicator.sendMessage(snap, new RequestSetHeat((byte)heat, (byte)safetyCutoff));
}
finally {
if (lock) communicator.unlock();
}
}
COM: <s> set the raw heater output value and safety cutoff </s>
|
funcom_train/3460133
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int getTagSize(int type) {
int size = 0;
if (allow(ID3V1, type)) {
size += id3v1.getSize();
}
if (allow(ID3V2, type)) {
// Extra check because size will return at least 10
// because of header, even if the tag doesn't exist
if (id3v2.tagExists()) {
size += id3v2.getSize();
}
}
return size;
}
COM: <s> returns the current size of the tag s in bytes </s>
|
funcom_train/8095902
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected boolean isOutlier(Instance inst) {
boolean result;
int i;
result = false;
for (i = 0; i < m_AttributeIndices.length; i++) {
// non-numeric attribute?
if (m_AttributeIndices[i] == NON_NUMERIC)
continue;
result = isOutlier(inst, i);
if (result)
break;
}
return result;
}
COM: <s> returns whether the instance is an outlier or not </s>
|
funcom_train/28756557
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setDetailstr(String newVal) {
if ((newVal != null && this.detailstr != null && (newVal.compareTo(this.detailstr) == 0)) ||
(newVal == null && this.detailstr == null && detailstr_is_initialized)) {
return;
}
this.detailstr = newVal;
detailstr_is_modified = true;
detailstr_is_initialized = true;
}
COM: <s> setter method for detailstr </s>
|
funcom_train/50848664
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String escapeSpecChar( String str ) {
StringBuffer b = new StringBuffer();
for (int i=0;i<str.length();i++)
{
char c = str.charAt(i);
if ( (c=='\'')|| (c=='\"') ||(c=='\\') ) b.append('\\');
b.append(c);
}
str=b.toString();
return str ;
}
COM: <s> utility for escaping special characteres before isertion update of db </s>
|
funcom_train/8234540
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void createCallCancel() {
try {
Request cancelRequest = inviteCTid.createCancel();
cancelCTid = sipProvider.getNewClientTransaction(cancelRequest);
if (ringingReceived) {
cancelCTid.sendRequest();
}
ringingReceived = false;// Now next time caller will be able to
// cancel it
System.out.println("On going Call request cancelled");
} catch (SipException e) {
e.printStackTrace();
}
}
COM: <s> create cancel request for a pending out going call </s>
|
funcom_train/27974796
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean addExtension(String ext) {
// first Char should be dot
if(ext.indexOf(".") != 0) ext = "." + ext;
/*
if(ext.lastIndexOf(".")
throw new CmsException("Format error on extension " +ext +
": Too many dots.");
*/
if(extensions.indexOf(ext) == -1) {
extensions.add(ext);
return true;
}
return false;
}
COM: <s> adds an extension </s>
|
funcom_train/2026950
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void closeConnection(Connection connection) {
try {
if (connection != null && !connection.isClosed()) {
if (!connection.getAutoCommit()) {
connection.setAutoCommit(true);
}
connection.close();
}
} catch (SQLException e) {
// Ignore while closing resources.
}
}
COM: <s> resets the auto commit mode of a database connection and silently closes </s>
|
funcom_train/29717621
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setTransportId( int transportId ) {
this.conveyance = transportId;
// If we were unloaded, set the appropriate flags.
//this is not true for launched aircraft
if ( transportId == Entity.NONE && !(this instanceof Aero)) {
this.unloadedThisTurn = true;
this.done = true;
}
}
COM: <s> record the id of the code entity code that has loaded this unit </s>
|
funcom_train/1297475
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void drawPath(Canvas canvas, List<PointF> points, Paint paint, boolean circular) {
Path path = new Path();
path.moveTo(points.get(0).x, points.get(0).y);
for (int i = 1; i < points.size(); i++) {
path.lineTo(points.get(i).x, points.get(i).y);
}
if (circular) {
path.close();
}
canvas.drawPath(path, paint);
}
COM: <s> the graphical representation of a path </s>
|
funcom_train/49092647
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int match(String expr, int col1, int col2) {
String s = text();
if (s == null) {
return -1;
}
if (col1 > 0) {
s = s.substring(col1 + 1, s.length());
}
int a = _search(s, expr);
if (a < 0) {
return -1;
}
a += col1 + (col1 > 0 ? 1 : 0);
if (a > col2) {
return -1;
}
return a;
}
COM: <s> returns the first match of expr between col1 and col2 </s>
|
funcom_train/1490986
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getRenderValue (HttpServletRequest request, MessageSource messageSource, Locale locale, Object bean){
try {
String propertyValue = BeanUtils.getProperty(bean, fieldName);
return getFieldValue(messageSource, locale, propertyValue);
} catch (Exception e) {
logger.error(e.getMessage(), e);
return null;
}
}
COM: <s> create a value for this field </s>
|
funcom_train/3897627
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void menuAboutToShow(IMenuManager menuManager) {
super.menuAboutToShow(menuManager);
MenuManager submenuManager = null;
submenuManager = new MenuManager(ReloadEMFPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
populateManager(submenuManager, createChildActions, null);
menuManager.insertBefore("edit", submenuManager);
}
COM: <s> this populates the pop up menu before it appears </s>
|
funcom_train/19406943
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Action getClearLogAction() {
if (null == m_ClearLogAction) {
m_ClearLogAction = new ClearLogAction("Clear log", new ImageIcon(
this.getClass().getResource(
// m_ResourcePath + "editdelete.png")),
m_ResourcePath + "edittrash.png")), m_Gui, m_Main);
}
return m_ClearLogAction;
}
COM: <s> returns the clear log action </s>
|
funcom_train/8605708
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setCurrentHpPercent(int hpPercent) {
hpLock.lock();
try {
int maxHp = getMaxHp();
this.currentHp = (int) ((long) maxHp * hpPercent / 100);
if (this.currentHp > 0)
this.alreadyDead = false;
}
finally {
hpLock.unlock();
}
}
COM: <s> this method can be used for npcs to fully restore its hp </s>
|
funcom_train/13450889
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Object get(final Object key) {
Object result = hashtable.get(key);
if (result == null) {
throw new IllegalArgumentException("Can't find key " + key
+ " in SafeHashtable");
}
if (NULL_PLACE_HOLDER.equals(result)) {
result = null;
}
return result;
}
COM: <s> returns the value to which the specified key is mapped in this hashtable </s>
|
funcom_train/15628988
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean doRandFillAbove(final boolean performAction) {
final MapView<G, A, R> mapView = getSelection();
if (mapView == null) {
return false;
}
if (performAction) {
fillRandom(mapView, insertionModeSet.getTopmostInsertionMode());
}
return true;
}
COM: <s> executes the rand fill above action </s>
|
funcom_train/46696148
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetParameterClass() {
System.out.println("getParameterClass");
BasicParameter instance = new BasicParameter();
instance.setParameterClass(String.class);
Class expResult = String.class;
Class result = instance.getParameterClass();
assertEquals(expResult, result);
}
COM: <s> test of get parameter class method of class basic parameter </s>
|
funcom_train/26405298
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int getState() {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.entering(GroupTxnManagerTransaction.class.getName(),
"getState");
}
synchronized (stateLock) {
if (operationsLogger.isLoggable(Level.FINER)) {
operationsLogger.exiting(GroupTxnManagerTransaction.class.getName(),
"getState", new Integer(trstate));
}
return trstate;
}
}
COM: <s> this method returns the state of the transaction </s>
|
funcom_train/19385825
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testCheckParams06() {
jcc.setJcHome(jcHome);
jcc.setPackageName("my.package");
jcc.setPackageAID(aid1);
jcc.setMajorVersion(1);
try {
jcc.checkParams();
failNoException();
}
catch(BuildException e) {}
}
COM: <s> major version set but not minor version </s>
|
funcom_train/14421603
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Shell activeShell() {
Shell activeShell = (Shell) UIThreadRunnable.syncExec(display, new WidgetResult() {
public Widget run() {
return display.getActiveShell();
}
});
if (activeShell != null)
return activeShell;
return (Shell) UIThreadRunnable.syncExec(display, new WidgetResult() {
public Widget run() {
Shell[] shells = getShells();
for (int i = 0; i < shells.length; i++)
if (shells[i].isFocusControl())
return shells[i];
return null;
}
});
}
COM: <s> return the active shell </s>
|
funcom_train/34038227
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean semanticEventBefore(SemanticEvent se, String msg) {
if (super.semanticEventBefore(se,msg)) return true;
else if (Document.MSG_CLOSE==msg) {
// periodically write history in case of crash
if (periodcnt_++ > PERIOD) { writeHistory(); periodcnt_=0; }
} else if (Multivalent.MSG_EXIT==msg || Browser.MSG_CLOSE==msg) {
writeHistory();
}
return false;
}
COM: <s> write out history at exit exit browser instance and every so many </s>
|
funcom_train/44945151
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public List getCheckedElements() {
if (isOkToUse(fTableControl)) {
// workaround for bug 53853
Object[] checked= ((CheckboxTableViewer) fTable).getCheckedElements();
ArrayList res= new ArrayList(checked.length);
for (int i= 0; i < checked.length; i++) {
res.add(checked[i]);
}
return res;
}
return new ArrayList(fCheckElements);
}
COM: <s> gets the checked elements </s>
|
funcom_train/21004211
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void setDateTime(int year, int month, int day, F UT) {
// set the day, should be called before all calculations
// Time.set_day(2004,3,4,new Mathf(8));
Time.set_day(year, month, day, UT);
}
COM: <s> set date and time </s>
|
funcom_train/47320993
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void preFlop() {
logStep("pre-flop");
step = Step.PREFLOP;
dealOneCard();
dealOneCard();
for (PlayerWrapper player : players) {
Card[] cards = playerHands.get(player).getCards().toArray(new Card[2]);
player.getPlayer().receive(this, cards);
}
int utgIndex = players.size() > 2 ? UTG : 0;// at two dealer is also UTG
logger.debug("{} is Under The Gun", players.get(utgIndex));
askAllPlayers(true);
}
COM: <s> deal 2 x 1 cards to each player </s>
|
funcom_train/48386018
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testExecuteWithSharkConnection() {
WfResource wfResource = (WfResource) enhydraSharkTemplate.execute(connectInfo, new EnhydraSharkConnectionCallback() {
public Object doWithEnhydraSharkConnection(SharkInterface sharkInterface, SharkConnection sharkConnection) throws Exception {
return sharkConnection.getResourceObject();
}
});
assertNotNull(wfResource);
}
COM: <s> test operation with shark connection </s>
|
funcom_train/12164479
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testExternal() throws Exception {
StyleSheetsConfig config = new StyleSheetsConfig();
StyleSheetExternalGenerationConfiguration value =
new StyleSheetExternalGenerationConfiguration();
config.setExternalCacheConfiguration(value);
StyleSheetExternalGenerationConfiguration result =
config.getExternalCacheConfiguration();
assertNotNull("Result should not be null", result);
assertEquals("Initial value and result should match", value, result);
}
COM: <s> test the set get methods for the external cache configuration </s>
|
funcom_train/36874858
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void outputFile(){
String workspace = Platform.getInstanceLocation().getURL().toString();
workspace = workspace.substring(6, workspace.length());
String project = source.replace(workspace, "");
// Check to see if it's not located in the ssvchecker folder already
if(!source.startsWith(workspace + "ssvchecker/")){
output = workspace + "ssvchecker/" + project + "/";
}
else{
output = source;
}
// Create the folder structure
if(!(new File(output)).exists())
(new File(output)).mkdirs();
}
COM: <s> get the outputs filename </s>
|
funcom_train/45243402
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String doSite(String command) throws IOException, FTPException {
FTPResponse response = processCommand(new FTPCommand(
FTPCommand.SITE_PARAMETERS, command));
// FIXME : parse response
// FIXME : if response is multiline, read them all...
// FIXME : ... return collected information
return response.getOriginalMessage(); // FIXME : remove me
}
COM: <s> this command is used by the server to provide services specific </s>
|
funcom_train/7725345
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean equals(User other) {
return ((nick == null && other.nick == null) || (nick != null && nick.equals(other.nick))) &&
((address == null && other.address == null) || (address != null && address.equals(other.address))) &&
port == other.port;
}
COM: <s> checks if two user objects represent the same user </s>
|
funcom_train/2422302
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean canHaveHistory() {
if (location == null) {
return false;
}
// The reason this method is not on the DataLocation level is that the history
// property is applicable only to Sources, and DataLocations are used by both
// sources and targets.
DataLocationType type = location.getDataLocationType();
return (type != DataLocationType.Database) && (type != DataLocationType.JMS);
}
COM: <s> checks if this code source code can have a history </s>
|
funcom_train/5376439
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int hashCode() {
/*
* Either both methodName and declaringClass are null, or neither are
* null.
*/
if (methodName == null) {
// all unknown methods hash the same
return 0;
}
// declaringClass never null if methodName is non-null
return methodName.hashCode() ^ declaringClass.hashCode();
}
COM: <s> return this stack trace element objects hash code </s>
|
funcom_train/41401279
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean authenticate(String username, String password) {
if (username == null || username.equals("")) {
return false;
}
String lookupName = Authentication.class.getName();
Authentication authentication = (Authentication) beanFactory_
.getBean(lookupName);
return authentication.authenticate(username, password) && isUserAllowed(username);
}
COM: <s> calls the authentication bean to do the actual authentication and checks </s>
|
funcom_train/2292889
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected int displayedTo() {
if (getSize() != 0) {
if (!isPrintable()) {
if (getCurrentPage() * getMaxItemsPerPage() < getSize()) {
return getCurrentPage() * getMaxItemsPerPage();
}
}
}
return getSize();
}
COM: <s> returns the number from 1 of the last displayed item </s>
|
funcom_train/20630608
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean isValidClass(String className){
if (!super.isValidClass(className)) {
return false;
}
if (!loadedlist.contains(className)) { // Get one instance of a class.
Object module = createModule(className, moduleClass);
if (module != null) {
list.add(module);
loadedlist.add(className);
return true;
}
}
return false;
}
COM: <s> overrides the super class method to create the list of modules </s>
|
funcom_train/8682264
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private StringBuffer normalize(CharSequence source, StringBuffer target) {
if (form == NO_ACTION || source.length() == 0) {
return new StringBuffer(source.toString());
}
// First decompose the source into target,
// then compose if the form requires.
internalDecompose(source, target);
if ((form & COMPOSITION_MASK) != 0) {
internalCompose(target);
}
return target;
}
COM: <s> normalizes text according to the chosen form </s>
|
funcom_train/22909633
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void selectAllWithNewLocation() {
clearSelection();
for (int row = 0; row < getRowCount(); row++) {
ImageInfo imageInfo = ((ImagesTableModel) getModel()).getImageInfo(row);
if (imageInfo.hasNewLocation()) {
addRowSelectionInterval(row, row);
}
}
}
COM: <s> select all images with a new updated location </s>
|
funcom_train/35530331
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void joinRoom(Long roomId, Long connectionId) throws ServerException {
Room room = rooms.get(roomId);
if (room == null) throw new ServerException(9);
if (room.getFirstPlayer() == connectionId) throw new ServerException(20);
synchronized (room) {
if (room.getFirstPlayer() == null) throw new ServerException(21);
if (room.getSecondPlayer() != null) throw new ServerException(22);
room.setSecondPlayer(connectionId);
}
}
COM: <s> performs joining the room by a user </s>
|
funcom_train/43268805
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Collection findAll() throws DAOException {
String queryString = "SELECT cn FROM " +
"org.mbari.vars.knowledgebase.model.LWConceptName cn";
Collection params = new ArrayList();
List results = (List) super.find(queryString, params);
Collections.sort(results);
return results;
}
COM: <s> retrieves all concept names from the database </s>
|
funcom_train/50575211
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int getSubkeyDword(String subkey) throws IOException, KeyNotFoundException, InterruptedException {
String str = getSubkeyValue(subkey);
if (!str.startsWith("dword:")) throw new IOException("registry parse");
return Integer.parseInt(str.substring(6), 16);
}
COM: <s> returns the dword value of a subkey </s>
|
funcom_train/39350345
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean offsetBulkCopy(ObjectReference src, Offset srcOffset, ObjectReference dst, Offset dstOffset, int bytes) {
// Either: bulk copy is supported and this is overridden, or
// write barriers are not used and this is never called
if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(false);
return false;
}
COM: <s> a number of offsets are about to be copied from object </s>
|
funcom_train/45229986
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public JSONString getMessageTextString() {
JSONString messageTextString = null;
JSONObject responseObject = getResponseObject();
if (responseObject != null) {
JSONValue messageTextValue = responseObject.get("messageText");
if (messageTextValue != null) {
messageTextString = messageTextValue.isString();
}
}
return messageTextString;
}
COM: <s> gets the message text string attribute of the response parser object </s>
|
funcom_train/39549844
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void renderingStopped() {
haltProgressivePaintThread();
if (doubleBufferedRendering) {
suspendInteractions = false;
}
gvtTreeRenderer = null;
if (needRender) {
renderGVTTree();
needRender = false;
} else {
immediateRepaint();
}
if (eventDispatcher != null) {
eventDispatcher.setEventDispatchEnabled(true);
}
}
COM: <s> the actual implementation of gvt rendering cancelled and </s>
|
funcom_train/2641998
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public double min() {
if (size() == 0) {
throw new IllegalStateException("cannot find minimum of an empty list");
}
double min = Double.POSITIVE_INFINITY;
for (int i = 0; i < _pos; i++ ) {
if ( _data[i] < min ) {
min = _data[i];
}
}
return min;
}
COM: <s> finds the minimum value in the list </s>
|
funcom_train/42652215
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getObjectDescription(Application application, E obj) throws ClassNotFoundException {
ObjectClass mc = requireModel(application).getClassByName(getObjectClass(obj), true);
return "[" + mc.getSimpleName() + "] " + getId(mc, obj);
}
COM: <s> returns a textual description of the object </s>
|
funcom_train/3786816
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void init(int size)
{ /* init */
clear();
this.maxSamples= size;
if(maxSamples==0)
{
idxSampleList= null;
expRawValues= null;
expValues= null;
}
else
{
idxSampleList= new int[maxSamples];
expRawValues= new float[maxSamples];
expValues= new float[maxSamples];
}
} /* init */
COM: <s> init initialize expression list to specified size if 0 </s>
|
funcom_train/5318781
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void setupLighting() {
Light lights[] = null;
if(scene != null)
lights = scene.getLightNodes();
if (lights == null) {
BranchGroup lightBG = new BranchGroup();
BoundingSphere lightBounds =
new BoundingSphere(new Point3d(), Double.MAX_VALUE);
headLight = new DirectionalLight(new Color3f(1.0f,1.0f,1.0f),
new Vector3f(0,0,-1));
headLight.setCapability(Light.ALLOW_STATE_WRITE);
headLight.setInfluencingBounds(lightBounds);
lightBG.addChild(headLight);
sceneRoot.addChild(lightBG);
}
}
COM: <s> setup the worlds lighting </s>
|
funcom_train/50151926
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void performUpgrade() throws Exception {
String dbtype = Prefs.getPref(PrefName.DBTYPE);
for( int i = 0; i < updSql.length; i++ )
{
if (dbtype.equals("mysql")) {
Errmsg.getErrorHandler().notice(Resource.getResourceString("update_error") + updSql[i]);
continue;
}
log.info("Running Upgrade SQL:" + updSql[i]);
JdbcDB.execSQL(updSql[i]);
}
}
COM: <s> execute the upgrade sql </s>
|
funcom_train/46220101
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private int parseInt(ActionRequest request, String paramName) {
int i = 0;
if (request.getParameter(paramName) != null && !request.getParameter(paramName).equals("")) {
i = Integer.parseInt(request.getParameter(paramName));
}
return i;
}
COM: <s> parses an integer input field </s>
|
funcom_train/17724829
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getPaymentCancelledUrl() {
if (this.paymentCancelledUrl != null) {
return this.paymentCancelledUrl;
}
ValueBinding vb = getValueBinding("paymentCancelledUrl"); //NOI18N
if (vb != null) {
return (String) vb.getValue(getFacesContext());
}
return null;
}
COM: <s> returns the url to which customers browser is returned if payment is </s>
|
funcom_train/32308440
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public static class BadLineException extends IOException {
/** readResource will set this to the right value. */
String filename=null;
/** ditto. */
int line=0;
public BadLineException(String message) { super(message); }
public String toString() {
if (filename==null) return super.toString();
return super.toString() + " ("+filename+": line "+line+")";
}
}
COM: <s> exception thrown by the methods in code parse util code </s>
|
funcom_train/51193987
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getHTTPReply( byte[] responseBody, int responseCode ) throws NexusException {
StringBuffer reply = new StringBuffer();
if (responseBody != null) {
reply.append( new String( responseBody ) );
reply.append( "\n" );
}
reply.append( "HTTP Response Code: " + responseCode );
return reply.toString();
}
COM: <s> retrieve a reply from an http message post </s>
|
funcom_train/13199550
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void postOriginFlowEvent(FlowContext flowContext) {
//
// get output
String outputLine = (String)flowContext.getItem().getProperty(SERVERSOCKET_LINE_READER_OUTPUT_PROPERTY);
//
// print output
if (outputLine != null)
out.println(outputLine);
//
// TODO: EXEPTIONS!!!!
}
COM: <s> hook from consumer life cycle called after listener execution </s>
|
funcom_train/33134240
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private OutputStream getOutputStream(String name) throws IOException {
if (name.endsWith(".zip")) {
int pos = name.lastIndexOf(File.separator);
ZipOutputStream os = new ZipOutputStream(new FileOutputStream(name));
ZipEntry zipEntry = new ZipEntry(name.substring(pos + 1, name.length() - 4));
os.putNextEntry(zipEntry);
return os;
} else {
return new FileOutputStream(name);
}
}
COM: <s> gets the output stream attribute of the main object </s>
|
funcom_train/25488315
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void checkInputs() {
String M1Extension = new Path(new File(textM1.getText()).getPath()).getFileExtension();
String M2Extension = new Path(new File(textM2.getText()).getPath()).getFileExtension();
if(M1Extension.equals(M2Extension)) {
getWizard().enableNext();
getWizard().enableFinish();
}else {
getWizard().disableFinish();
getWizard().disableNext();
}
}
COM: <s> checks whether the file extensions of both model files equal </s>
|
funcom_train/16565285
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public double eval(VarMap v, FuncMap f) {
int numParam = bag.size();
for (int i = 0; i < numParam; i++)
of[i] = child(i).eval(v, f);
double result = f.getFunction(name, numParam).of(of, numParam);
if (negate) result = -result;
return result;
}
COM: <s> evaluates each of the children storing the result in an internal double array </s>
|
funcom_train/48215371
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testDailySameDay() {
r.setFrequency(new Frequency(Frequency.DAILY));
calendar.set(2004, 0, 26, 11, 00); // 2004/01/26 11:00
calendar2.set(2004, 0, 26, 11, 30, 30); // 2004/01/26 11:30:30
assertEquals(r.nextOccurrence(calendar.getTime()), calendar2.getTime());
}
COM: <s> ensures that next occurrence date base date works </s>
|
funcom_train/39536939
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void registerListener(DataChangedListener listener) {
listeners.add(listener);
if(! isUpdating){
synchronized (this) {isUpdating=true;}
TimerTask task=new TimerTask(){
@Override
public void run() {
requestUpdate();
synchronized (InvalidityNotifier.this) {isUpdating=false;}
}
};
updateTimer.schedule(task, 3000);
}
}
COM: <s> registers a new data changed listener </s>
|
funcom_train/28601265
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void draw() {
if (this.menu == null)
this.setMenu();
this.menu
.draw(this.xPos, this.yPos, RoB.display.getDoubleBufferedGraphics(), JadeMenu.VERTICAL, JadeMenu.LEFT, 0, 0, JadeMenu.HORIZONTAL, 0, 0);
}
COM: <s> draw the menu to the current scene </s>
|
funcom_train/46166913
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean better(Computer c) {
if (this.RAMSize >= c.getRAMSize() &&
this.diskSize >= c.getDiskSize() &&
this.programRuntime >= c.getProgramRuntime()) {
if (this.RAMSize > c.getRAMSize() ||
this.diskSize > c.getDiskSize() ||
this.programRuntime > c.getProgramRuntime()) {
return true;
} else
return false;
} else
return false;
}
COM: <s> checks if this computer is better than the computer in the argument </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.