__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/43881069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void accepts(FeatureVisitor visitor, ProgressListener progress) throws IOException {
Iterator iterator = null;
if (progress == null) progress = new NullProgressListener();
try{
float size = size();
float position = 0;
progress.started();
for( iterator = iterator(); !progress.isCanceled() && iterator.hasNext(); progress.progress( position++/size )){
try {
Feature feature = (Feature) iterator.next();
visitor.visit(feature);
}
catch( Exception erp ){
progress.exceptionOccurred( erp );
}
}
}
finally {
progress.complete();
close( iterator );
}
}
COM: <s> taken from data feature collection </s>
|
funcom_train/50531808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String padZeroes(long value, int radix) {
final int width = this.byteWidth * 2;
final char formatChar = (radix == 16) ? 'x' : ((radix == 8) ? 'o' : 'd');
final String FORMAT = String.format("%%0%d%c", width, formatChar);
final String retVal = String.format(FORMAT, value);
return retVal;
}
COM: <s> this utility method pads the appropriate number of zeroes to the front </s>
|
funcom_train/11428373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WebClient query(String name, Object ...values) {
if (!"".equals(name)) {
getCurrentBuilder().queryParam(name, values);
} else {
addParametersToBuilder(getCurrentBuilder(), name, values[0], ParameterType.QUERY);
}
return this;
}
COM: <s> updates the current uri query parameters </s>
|
funcom_train/48455192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String execute() {
if (cancel != null) {
return CANCEL;
}
if (ServletActionContext.getRequest().getMethod().equals("GET")) {
if (SessionUtil
.isPersonLoggedIn(ServletActionContext.getRequest().getSession())) {
return LOGGED_IN;
}
return INPUT;
}
return SUCCESS;
}
COM: <s> when method get input is returned </s>
|
funcom_train/8690209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addProperty(String n, String v) {
if (userProperty) {
if (getProject().getUserProperty(n) == null) {
getProject().setInheritedProperty(n, v);
} else {
log("Override ignored for " + n, Project.MSG_VERBOSE);
}
} else {
getProject().setNewProperty(n, v);
}
}
COM: <s> add a name value pair to the project property set </s>
|
funcom_train/51591903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(String name, int value) {
if (conf.containsKey(name)) {
if (!conf.getProperty(name).equals("" + value)) {
changed = true;
}
} else {
changed = true;
}
conf.setProperty(name, "" + value);
}
COM: <s> set a configuration setting integer value </s>
|
funcom_train/3044001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey) {
return new StringBuffer(30)
.append(" add constraint ")
.append(constraintName)
.append(" foreign key (")
.append( StringHelper.join(", ", foreignKey) )
.append(") references ")
.append(referencedTable)
.toString();
}
COM: <s> the syntax used to add a foreign key constraint to a table </s>
|
funcom_train/17939654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onMode(IRCUser user, String nickPass, String modes) {
String nickAct = user.getNick();
int index = moep.getSelectedIndex();
String line = "* Mode: "+ nickAct +" sets mode: "+ modes +" "+ nickPass;
moep.updateTab(index, line, moep.getServerColor());
}
COM: <s> fired when a user mode is set </s>
|
funcom_train/13994079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getSelectedItem() {
if (selected != null) {
return selected;
} else {
StringBuffer result = new StringBuffer();
addInfoText(result, " Probleme ", ValidationMessageClass.ERROR);
addInfoText(result, " Warnungen ", ValidationMessageClass.WARNING);
addInfoText(result, " Hinweise ",
ValidationMessageClass.INFORMATION);
return result.toString();
}
}
COM: <s> returns the selected message or a string displaying the number of </s>
|
funcom_train/18808927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSubIntervalCount(int row, int column) {
int result = 0;
TaskSeries series = (TaskSeries) this.data.get(row);
int tasks = series.getItemCount();
if (column < tasks) {
Task task = series.get(column);
result = task.getSubtaskCount();
}
return result;
}
COM: <s> returns the number of sub intervals for a given item </s>
|
funcom_train/12644781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AWTEvent peekEvent(int id) {
synchronized (this.proxy) { // 6370528
for (int i = NUM_PRIORITIES - 1; i >= 0; i--) {
EventQueueItem q = queues[i].head;
for (; q != null; q = q.next) {
if (q.id == id) {
return q.event;
}
}
}
return null;
}
}
COM: <s> return the first event with the specified id if any </s>
|
funcom_train/7687684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupKeypad() {
// for each view id listed in the displaymap
View button;
for (int viewId : mDisplayMap.keySet()) {
// locate the view
button = mDialerView.findViewById(viewId);
// Setup the listeners for the buttons
button.setOnTouchListener(this);
button.setClickable(true);
button.setOnKeyListener(this);
}
}
COM: <s> setup the keys on the dialer activity using the keymaps </s>
|
funcom_train/42943701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchAllNotes() {
//new String[] {KEY_ROWID, KEY_COURSE, KEY_TITLE, KEY_DUEDATE,
// KEY_BODY}
return mDb.query(DATABASE_TABLE, null, null, null, null, null, null);
}
COM: <s> return a cursor over the list of all notes in the database </s>
|
funcom_train/42268287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BeanTemplate TemplateToBean(Template tp){
Objectify ofy = ObjectifyService.begin();
BeanTemplate btp = new BeanTemplate(tp.getId(),tp.getName(), tp.getShortLib(), tp.getDescription());
ArrayList<BeanTag> lst = new ArrayList<BeanTag>();
for(Key<Tag> kTag : tp.getAssociatedTags()){
Tag tag = ofy.get(kTag);
lst.add(this.tagToBean(tag));
}
btp.setAssociatedTags(lst);
return btp;
}
COM: <s> make a bean template with a template </s>
|
funcom_train/49608997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getPathologies() throws Throwable {
EntityManager em = null;
try {
ListCommand lc = ExtUtils.getListCommand(Pathology.class,this);
em = EntityManagerProvider.getInstance().getEntityManager();
ListResponse res = BusinessObjectsFacade.getInstance().getPathologiesBO().getPathologies(username, em, lc);
ExtUtils.sendListResponse(res,this);
}
catch (Throwable ex) {
ExtUtils.sendErrorResponse(ex.getMessage(), response);
throw ex;
}
finally {
if (em!=null)
EntityManagerProvider.getInstance().releaseEntityManager(em);
}
}
COM: <s> return a list of pathology objects encoded in json format </s>
|
funcom_train/23028909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getTextsFields() {
if (textsFields == null) {
try {
GridLayout gridLayout2 = new GridLayout();
gridLayout2.setRows(1);
gridLayout2.setColumns(1);
textsFields = new JPanel();
textsFields.setLayout(gridLayout2);
textsFields.add(getMinIlosc(), null);
} catch (java.lang.Throwable e) {
// TODO: Something
}
}
return textsFields;
}
COM: <s> this method initializes texts fields </s>
|
funcom_train/49349873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
String line;
InputStreamReader reader = new InputStreamReader(stream);
BufferedReader buffer = new BufferedReader(reader);
try {
line = buffer.readLine();
while (line != null) {
if ((writer != null) && (line != null)) {
writer.write(line + "\n");
}
line = buffer.readLine();
}
} catch (IOException e) {
throw new RuntimeException(e);
}
}
COM: <s> consumes the output </s>
|
funcom_train/19407981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SetValue flatten() {
if (!elemType().isCollection())
throw new RuntimeException("Set `" + type()
+ "' cannot be flattened");
CollectionType c2 = (CollectionType) elemType();
SetValue res = new SetValue(c2.elemType());
Iterator it = fElements.iterator();
while (it.hasNext()) {
CollectionValue elem = (CollectionValue) it.next();
Iterator it2 = elem.iterator();
while (it2.hasNext()) {
Value elem2 = (Value) it2.next();
res.add(elem2);
}
}
return res;
}
COM: <s> returns a new flattened set </s>
|
funcom_train/2759792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Scriptable initParentScope() {
//
// TODO: this code should not be here - let the all the tags
// inherit from a base class and place this code there...
Window window = (Window) getParent(Window.class, false);
if(window != null) {
if(window.getParentScope() == null) {
window.setParentScope(window.initParentScope());
}
return window;
}
ScriptableObject scope = Context.getCurrentContext().initStandardObjects();
return scope;
}
COM: <s> initializes the parent scope </s>
|
funcom_train/22470939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Keyword shallowCopy() {
Keyword keywordCopy = new Keyword();
keywordCopy.setName(getName());
if (_parent != null) {
try {
keywordCopy.setParent(_parent.shallowCopy());
} catch (KeywordCycleException e) {
// Won't happen, since we're copying an existing (thus consistent) Keyword
}
}
_children = null;
return keywordCopy;
}
COM: <s> creates a clone of this keyword </s>
|
funcom_train/4557865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSingUpClosePrivacePolicyWindow() {
repEng.newStep("314", "Sign up-Close Privacy Policy window");
//1. Launch http://hobbes.ontometrics.com/magnetportal/
//2. Click the Manage You Assets link.
//3. Click the Publish Magnet link in the Albums/Tracks page.
//4. Click the cart icon.
//5. Click Sign up button.
//6. Click Privacy Policy link.
//7. Click Close button.
// The "Privacy Policy" will be closed.
}
COM: <s> 314 sign up close privacy policy window </s>
|
funcom_train/16103197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnCancelHost() {
if (btnCancelHost == null) {
btnCancelHost = new JButton();
btnCancelHost.setText(rb.getString("dialog.cancel")); //$NON-NLS-1$
}
btnCancelHost.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
btnCancelActionPerformed(e);
}
});
return btnCancelHost;
}
COM: <s> this method initializes btn cancel host </s>
|
funcom_train/42667322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenuItem getJMenuReload() {
if (jMenuReload == null) {
jMenuReload = new JMenuItem();
jMenuReload.setText("Reload");
jMenuReload.setName("menuReload");
jMenuReload.setMnemonic(KeyEvent.VK_R);
jMenuReload.setToolTipText("Reload the image files");
jMenuReload.setAction(new Actioneer(this, jMenuReload));
}
return jMenuReload;
}
COM: <s> this method initializes j menu reload </s>
|
funcom_train/22578643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void padOctet() {
for ( int pad = offset3+1; pad < 4; pad++ ) {
octet[pad] = (byte)'=';
}
clearOctet(); // Because the next operation is
// to get the byte from octet,
// and since octet is loaded,
// the offset is 0.
}
COM: <s> if the octet is not fully loaded yet pad it with </s>
|
funcom_train/16103737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnSaveShortLink() {
if (this.btnSaveShortLink == null) {
this.btnSaveShortLink = new JButton();
this.btnSaveShortLink.setText(rb.getString("dialog.save")); //$NON-NLS-1$
this.btnSaveShortLink.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
saveShortLink();
}
});
this.btnSaveShortLink.setEnabled(false);
}
return this.btnSaveShortLink;
}
COM: <s> this method initializes btn save short link </s>
|
funcom_train/812966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void refreshVisuals() {
TableFigure tableFigure = (TableFigure) getFigure();
Point location = tableFigure.getLocation();
SchemaDiagramPart parent = (SchemaDiagramPart) getParent();
Rectangle constraint = new Rectangle(location.x, location.y, -1, -1);
parent.setLayoutConstraint(this, tableFigure, constraint);
}
COM: <s> reset the layout constraint and revalidate the content pane </s>
|
funcom_train/14417962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mMax(SymmetricMatrix second, SymmetricMatrix dest) {
if (sizeM != second.sizeM) {
throw new IllegalArgumentException("Invalid argument");
}
dest.resize(sizeM);
for (int i = m.length - 1; i >= 0; i--)
dest.m[i] = (m[i] > second.m[i] ? m[i] : second.m[i]);
}
COM: <s> sets the elements of dest matrix to the maximum corresponding elements of </s>
|
funcom_train/13258625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInputRouting(String text, final String property, Container cont) {
// Creates a Map with Routing Strategies Names, then delegates addInputCombo to create
// graphical components
Map<String, String> distributions = new TreeMap<String, String>();
RoutingStrategy[] all = RoutingStrategy.findAll();
for (RoutingStrategy element : all) {
distributions.put(element.getClass().getName(), element.toString());
}
addInputCombo(text, property, cont, distributions);
}
COM: <s> adds an input field to chose a for a routing strategy </s>
|
funcom_train/34083321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayMessage(String msg) {
Toast t = Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT);
t.setGravity(Gravity.TOP, 0, 70);
if(msg.length() > 20) {
t.setDuration(Toast.LENGTH_LONG);
} else {
t.setDuration(Toast.LENGTH_SHORT);
}
t.show();
}
COM: <s> helper method used to display pop up message </s>
|
funcom_train/44287872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCombo(int column, ComboBoxCode combo) {
if (isHierarchical())
++column;
if (column < getColumnCount()) {
tableModel.setCombo(combo, column);
getColumnModel().getColumn(column).setCellEditor(new DefaultCellEditor(combo));
}
}
COM: <s> attachs to the column a combobox </s>
|
funcom_train/33860112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NonTerm embed(String languageName) throws LangNotFoundError, LanguageDefinitionError{
// Gets a languaje name, and returns that languages non terminal
// Also embeds all rules of that language.
Language embedded = Language.languages.get(languageName);
if (embedded == null)
throw LangNotFoundError.languageNotFound(languageName);
else{
//currentLanguage.nt(embedded.start.name);
for (SyntaxRule rule : embedded.rules)
currentLanguage.addEmbeddedRule(rule, embedded);
return embedded.start;
}
}
COM: <s> embed another language </s>
|
funcom_train/3904098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addChoicePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ControlModeType_choice_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ControlModeType_choice_feature", "_UI_ControlModeType_type"),
ImsssPackage.Literals.CONTROL_MODE_TYPE__CHOICE,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the choice feature </s>
|
funcom_train/40941454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void declareOutCursors(SqlOutCursorParam... outCursors){
if (rowMappers.size() != outCursors.length)
throw new PersistenceException("Number of OUT CURSORS defined does not match expected");
for (int i = 0;i < outCursors.length;i++){
RowMapperAdapter rmad = rowMappers.get(i);
SqlOutCursorParam outCur = outCursors[i];
rmad.setRm(new MultiLevelBeanRowMapperForProcedureCursor(outCur.getBeanClass()));
}
}
COM: <s> records the out cursors detected in this procedure </s>
|
funcom_train/7660467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPark() {
Thread t = new Thread(new Runnable() {
public void run() {
try {
LockSupport.park();
} catch(Exception e){
threadUnexpectedException();
}
}
});
try {
t.start();
Thread.sleep(SHORT_DELAY_MS);
LockSupport.unpark(t);
t.join();
}
catch(Exception e) {
unexpectedException();
}
}
COM: <s> park is released by unpark occurring after park </s>
|
funcom_train/25469241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLoading() {
setChildren(createLoadingNode());
TreeModel model = tree.getModel();
if (model instanceof DefaultTreeModel) {
DefaultTreeModel defaultModel = (DefaultTreeModel) model;
int[] indices = new int[getChildCount()];
for (int i = 0; i < indices.length; i++) {
indices[i] = i;
}
defaultModel.nodesWereInserted(LazyLoadingTreeNode.this, indices);
}
}
COM: <s> set the loading state </s>
|
funcom_train/44779787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkRenderer() throws JspException {
if ( !( panel instanceof IDatagridRenderer ) ) {
throw new JspException( "Bad use of <layout:datagrid> : the renderer " +
panel.getClass().getName() +
" does not implement IDatagridRenderer. Please use the model attribute and/or configure Struts-Layout properly" );
}
}
COM: <s> check the renderer is an instaneof idatagrid renderer </s>
|
funcom_train/42850050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertInstructionAt(Instruction instruction, Integer index) throws ProgramException {
try {
this.code.insertElementAt(instruction, index);
}
catch (ArrayIndexOutOfBoundsException e) {
throw new ProgramException("Error while inserting instruction " + instruction
+ ", at the index [" + index + "], the index is out of range, program length: "
+ this.code.size());
}
}
COM: <s> insert the instruction at the index specified </s>
|
funcom_train/46261550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DrawingObject selectObject(int x,int y){
objectSelected=false;
for(int i=0; i < canvasObjects.size();i++){
if(canvasObjects.get(i).isPointInObject(x,y)){
//move to the top
canvasObjects.add(canvasObjects.remove(i));
objectSelected=true;
break;
}
}
//System.out.println("select "+objectSelected);
if(objectSelected){
return canvasObjects.get(canvasObjects.size()-1);
}else{
return null;
}
}
COM: <s> selects an object at point x y </s>
|
funcom_train/40234277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matrix recognize( Matrix x ) throws Exception{
if ( x.getRowDimension() != layers.get( 0 ).prevSize() ){
throw new Exception( "Net can't recognize image because of it's size." );
}
for ( ActiveLayer layer : layers ){
x = layer.activateLayer( x );
}
return x;
}
COM: <s> recognize input image </s>
|
funcom_train/14327148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getMaxAttachmentSizeBytes() {
if (configuration == null) {
return OpConfigurationManager.DEFAULT_MAX_ATTACHMENT_SIZE * MB_TO_BYTE_CONVERSION_UNIT;
}
Integer maxAttachmentSize = configuration.getMaxAttachmentSize();
if (maxAttachmentSize == null) {
maxAttachmentSize = OpConfigurationManager.DEFAULT_MAX_ATTACHMENT_SIZE;
}
return maxAttachmentSize * MB_TO_BYTE_CONVERSION_UNIT;
}
COM: <s> returns the maximum size configured for attachments in bytes </s>
|
funcom_train/3746873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ValidationErrors validate(HttpServletRequest request, HttpSession session) {
ValidationErrors validationErrors = new ValidationErrors();
if (StringHandling.isNullOrEmpty(this.group.getName())) {
validationErrors.add(new ValidationError("errors.addressBook", new ValidationField("groupRight.name", "com.ivata.portal.business.ApplicationResources")));
}
return validationErrors;
}
COM: <s> p validates the form contents </s>
|
funcom_train/3720992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(String text) throws java.beans.PropertyVetoException {
String oldText = this.text;
vetoableChangeSupport.fireVetoableChange("text", oldText, text);
this.text = text;
propertyChangeSupport.firePropertyChange("text", oldText, text);
}
COM: <s> setter for property text </s>
|
funcom_train/38494410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setLanguageAsDefault () {
try {
((Ini.Section) mainIni.getIniSectionData().getSubSection("MAIN_SETTINGS")).setSubSectionValue("language", MultiLingual.getCurrentLanguageCode() + "");
saveIni();
} catch (Ini.SubSectionNotFoundException e) {
}
}
COM: <s> changes the language entry in the ini file and saves it </s>
|
funcom_train/19270871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int read2Digits(CharSequenceScanner scanner) throws IllegalDateFormatException {
int highDigit = scanner.readDigit();
if (highDigit == -1) {
return -1;
}
int lowDigit = scanner.readDigit();
if (lowDigit == -1) {
throw new IllegalDateFormatException(scanner.getOriginalString());
}
return (highDigit * 10) + lowDigit;
}
COM: <s> this method reads two digits from the given code scanner code </s>
|
funcom_train/34586063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set() {
input.setParameters();
input.addToWorkflow(input.getModule(), 0);
filter.setParameters();
filter.addToWorkflow(filter.getModule(), 1);
algorithm.setParameters();
algorithm.addToWorkflow(algorithm.getModule(), 2);
output.setParameters();
output.addToWorkflow(output.getModule(), 3);
}
COM: <s> sets default workflow for wizard with 4 tabs for each tab sets null </s>
|
funcom_train/25332180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetReverseComplementSequenceAsString_Integer_Integer() {
Integer begin = 5;
Integer end = 10;
DAAssembledDNASequence instance = new DAAssembledDNASequence();
String expResult = "";
String result = instance.getReverseComplementSequenceAsString(begin, end);
assertEquals(expResult, result);
}
COM: <s> test of get reverse complement sequence as string method of class daassembled dnasequence </s>
|
funcom_train/22791445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeAppl(WindowEvent e) {
try {
Parameters.P_SORT_PROJ_COLUMN.setValue(applContext.getParameters(), projTable.getSortedColumn().getName());
applContext.closeAppl(false);
} catch (Throwable ex) {
showMessage("Can't save data.", ex);
}
}
COM: <s> a close window event </s>
|
funcom_train/26485009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeXML(XMLWriter out) {
out.startElement("section");
out.attr("height", minHeight);
if (pageBreak) out.attr("pagebreak", pageBreak);
ListWriter.writeList(out, fields);
ListWriter.writeList(out, lines);
suppressionProc.writeXML(out);
out.endElement();
}
COM: <s> writes this section and all it contains as an xml tag </s>
|
funcom_train/10628267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToBigIntegerExactException() {
String a = "-123809648392384754573567356745735.63567890295784902768787678287E-10";
BigDecimal aNumber = new BigDecimal(a);
try {
aNumber.toBigIntegerExact();
fail("java.lang.ArithmeticException has not been thrown");
} catch (java.lang.ArithmeticException e) {
return;
}
}
COM: <s> to big integer exact </s>
|
funcom_train/51697861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void CalcTreeVariableImportanceAndError(ArrayList<int[]> test) {
correct=CalcTreeErrorRate(test);
for (int m=0;m<RandomForest.M;m++){
ArrayList<int[]> data=RandomlyPermuteAttribute(CloneData(test),m);
int correctAfterPermute=0;
for (int[] arr:data){
int prediction=Evaluate(arr);
if (prediction == GetClass(arr))
correctAfterPermute++;
}
importances[m]+=(correct-correctAfterPermute);
}
}
COM: <s> responsible for gauging the error rate of this tree and </s>
|
funcom_train/23867197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readHtmlTagByCriteria() {
final HtmlTagSearchCriteria searchCriteria = new HtmlTagSearchCriteria();
searchCriteria.setTag(TAG);
searchCriteria.setDescription(DESCRIPTION);
final List<HtmlTag> htmlTags = EntityDataAccess.findByCriteria(HtmlTag.class, searchCriteria);
assertEquals("A single HtmlTag must match the criteria", 1, htmlTags.size());
}
COM: <s> read the previously created html tag by criteria </s>
|
funcom_train/37482531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void browseForDir() {
JFileChooser fd = new JFileChooser(new File(tFileName.getText().trim()));
fd.setFileSelectionMode(JFileChooser.FILES_ONLY);
int option = fd.showOpenDialog(this);
// save current values
if (option == JFileChooser.APPROVE_OPTION
&& fd.getSelectedFile() != null) {
tFileName.setText(fd.getSelectedFile().getPath());
}
}
COM: <s> add all files in a directory to sort </s>
|
funcom_train/43922767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List toSchemaAttributes() {
if ((schemaBase == null) || schemaBase.equals("--")) {
return null;
}
List list = new ArrayList();
for (Iterator i = attributes.iterator(); i.hasNext();) {
Object obj = i.next();
if (obj instanceof AttributeForm) {
AttributeForm form = (AttributeForm) obj;
list.add(form.toConfig());
}
}
return list;
}
COM: <s> generate dto attributes list for the types editor action </s>
|
funcom_train/9937923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*protected void drawLegendItem(Graphics g, Color labelColor, String label, int x, int y) {
int side = 10;
g.setColor(labelColor);
g.fillRoundRect(x, y, side, side, 2, 2);
g.setFont(fontItemLegend);
g.drawString(label, x + side + 5, y + 10);
}*/
COM: <s> draws one item in the legend at the specified coordinates </s>
|
funcom_train/31503776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getEarliestStart() {
Date res = null;
Iterator it = selectedTasks.iterator();
while (it.hasNext()) {
Task task = (Task) it.next();
Date d = task.getStart().getTime();
if (res == null) {
res = d;
continue;
}
if (d.before(res))
res = d;
}
return res;
}
COM: <s> returns the earliest start date </s>
|
funcom_train/43193102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(int featureId, Object value) {
int originalId = featureId;
featureId = getAdjustedFeatureId(featureId);
adjustElements(featureId);
@SuppressWarnings("unchecked")
List<Object> list = (List<Object>) elements[featureId];
if (list != null) {
int index = list.indexOf(value);
Notification notification = new Notification(this, Notification.REMOVE, originalId, value, null, list.size());
list.remove(index);
notifyListeners(notification);
}
}
COM: <s> remove the value from the list feature with the given id </s>
|
funcom_train/39790385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LayoutDirection getRenderLayoutDirection() {
if (layoutDirection == null) {
if (locale == null) {
if (parent == null) {
if (applicationInstance == null) {
return null;
} else {
return applicationInstance.getLayoutDirection();
}
} else {
return parent.getRenderLayoutDirection();
}
} else {
return LayoutDirection.forLocale(locale);
}
} else {
return layoutDirection;
}
}
COM: <s> returns the rendered code layout direction code of the </s>
|
funcom_train/36999811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String dump() {
StringBuffer result = new StringBuffer();
for (int i=0;i<count;i++) {
if (globalRef[i]!=null) {
for(Entry e=globalRef[i]; e!= null; e=e.next)
result.append("globalRef["+i+"]="+JavaBridge.objectDebugDescription(e.value)+"\n");
}
}
return result.toString();
}
COM: <s> return a string representation of the global ref table </s>
|
funcom_train/3328349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void increaseSize() {
Object[] pointer = elements;
int length = (pointer.length > 0) ? pointer.length : 1;
elements = new Object[(length*3)/2 + 1];
System.arraycopy(pointer, 0, elements, 0, pointer.length);
pointer = null;
} //-- increaseSize
COM: <s> basically the same as a vector </s>
|
funcom_train/50383045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeChild(INodeData child) {
if (!children.contains(child)) {
return;
}
final List<INodeData> oldChildren = new ArrayList<INodeData>(children);
children.remove(child);
final List<INodeData> newChildren = new ArrayList<INodeData>(children);
child.removeParent(this);
getNotifier().scheduleWork(new Runnable() {
public void run() {
getListeners().firePropertyChange(
new PropertyChangeEvent(this, PROPERTY_DATA_CHILDREN,
oldChildren, newChildren));
}
});
}
COM: <s> remove inode data from list of children </s>
|
funcom_train/7520266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fail(int rank) {
failed[rank]=true;
if (failed[coord] == true) {
int i;
for (i=coord ; (i < failed.length) && failed[i] ; i++) ;
if (i < failed.length) {
coord=i;
} else {
throw new AppiaGroupError("No Coordinator !!!!!!");
}
am_coord= (my_rank == coord);
}
}
COM: <s> marks a member as failed and if necessary recomputes the </s>
|
funcom_train/17362297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getSwitchMode() {
if (SwitchMode == null) {
SwitchMode = new JButton();
SwitchMode.setBounds(new Rectangle(280, 260, 110, 25));
SwitchMode.setText("Switch mode");
SwitchMode.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setContentPane(getJContentPane());
}
});
}
return SwitchMode;
}
COM: <s> this method initializes switch mode </s>
|
funcom_train/825205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMesh(Bone bone, boolean clear) {
bone.updateMesh(clear);
clear = false;
Enumeration en = bone.getAllChildren();
while (en.hasMoreElements()) {
Bone b = (Bone) en.nextElement();
updateMesh(b, false);
}
}
COM: <s> the method to update the mesh </s>
|
funcom_train/34557026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBackgroundColor(String backgroundColor) throws IllegalStateException {
if(!chartRendered) {
JavaScriptObjectHelper.setAttribute(chartConfig, "backgroundColor", backgroundColor);
} else {
error("The charts background color can only be set before the chart has been rendered.");
}
}
COM: <s> the background color of the swf </s>
|
funcom_train/4306588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fill() {
int type = transform.getType();
if (type != Transform.TYPE_IDENTITY) {
pushTransform();
transform.clear();
}
internalFillRect(CoreMath.toFixed(surfaceWidth), CoreMath.toFixed(surfaceHeight));
if (type != Transform.TYPE_IDENTITY) {
popTransform();
}
}
COM: <s> fills the entire surface with the current color </s>
|
funcom_train/13563314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writePlansFile(String path){
PopulationWriter populationWriter = new PopulationWriter(scenario.getPopulation(), scenario.getNetwork());
try{
// write plans file (generated population)
File f = new File( path );
if(!f.exists())
f.mkdirs();
System.out.println("Writing plans file to " + f.getCanonicalPath() + "/plans.xml");
populationWriter.write(f.getCanonicalPath()+"/plans.xml");
}
catch(Exception e){
e.printStackTrace();
}
}
COM: <s> writes plans file for generated population </s>
|
funcom_train/41071081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProxyHost(String proxyHost) throws java.beans.PropertyVetoException {
String oldProxyHost = this.proxyHost;
vetoableChangeSupport.fireVetoableChange(PROP_PROXYHOST, oldProxyHost, proxyHost);
this.proxyHost = proxyHost;
propertyChangeSupport.firePropertyChange(PROP_PROXYHOST, oldProxyHost, proxyHost);
}
COM: <s> set the value of proxy host </s>
|
funcom_train/30206396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConfig(String config) {
if (config == null || config.trim().length() == 0) {
this.config = "<config />";
} else {
ParamParser.parseXmlToDocument(config, "error.param.config");
this.config = config;
}
}
COM: <s> set the config for the itrigger class </s>
|
funcom_train/9701915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IPHPClassDeclarationBuilder addMember(String variable) {
if (variable.startsWith("private") || variable.startsWith("protected") || variable.startsWith("public")){ //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
members.add(variable);
} else {
members.add("private "+variable); //$NON-NLS-1$
}
return this;
}
COM: <s> add a member </s>
|
funcom_train/1942177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FieldAttribute getIdentifierDescriptor() throws SQLException {
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT inventoryattribute_displayname FROM InventoryAttribute WHERE inventoryattribute_type='identifier'");
rs.first();
FieldAttribute ret = new FieldAttribute("identifier", rs.getString(1), "-1", "", "50|");
stmt.close();
return ret;
}
COM: <s> gets the identifier descriptor from the database </s>
|
funcom_train/46458083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private State getState() {
if (isSelected() && !isArmed()) {
// normal black tick
return SELECTED;
} else if (isSelected() && isArmed()) {
// don't care grey tick
return PART_SELECTED;
} else {
// normal deselected
return NOT_SELECTED;
}
}
COM: <s> the current state is embedded in the selection armed </s>
|
funcom_train/25057080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copySequence(BaseSequenceEntity src, BaseSequenceEntity dst) {
dst.setEntityId(src.getEntityId());
dst.setCameraAcc(src.getCameraAcc());
dst.setExternalAcc(src.getExternalAcc());
dst.setDefline(src.getDefline());
dst.setSequence(src.getSequence());
}
COM: <s> copies the sequence data from a source to a destination </s>
|
funcom_train/28983453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getSendSubject () {
if (sendSubject == null) {//GEN-END:|101-getter|0|101-preInit
// write pre-init user code here
sendSubject = new TextField ("Subject:", null, 64, TextField.ANY);//GEN-LINE:|101-getter|1|101-postInit
// write post-init user code here
}//GEN-BEGIN:|101-getter|2|
return sendSubject;
}
COM: <s> returns an initiliazed instance of send subject component </s>
|
funcom_train/14328635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cursorClose() throws SQLException {
if (cursorName != null) {
statement.clearWarnings();
String sql;
if (isSybase) {
sql = "CLOSE " + cursorName +
"\r\nDEALLOCATE CURSOR " + cursorName;
} else {
sql = "CLOSE " + cursorName +
"\r\nDEALLOCATE " + cursorName;
}
cursorTds.submitSQL(sql);
}
rowData = null;
}
COM: <s> closes the result set </s>
|
funcom_train/7614538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FontPeer createFontPeer(String name, int style, int size, int logicalIndex){
FontPeer peer;
if (logicalIndex != -1){
peer = createLogicalFontPeer(name, style, size);
}else {
peer = createPhysicalFontPeer(name, style, size);
}
return peer;
}
COM: <s> returns instance of font peer logical or physical according to the </s>
|
funcom_train/45936454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List members() {
List l = visibleMemberMapFields.getLeafClassMembers(configuration);
if (l == null)
return null;
l.addAll(visibleMemberMapEnumConst.getLeafClassMembers(configuration));
Iterator iter = l.iterator();
List inclList = new LinkedList();
FieldDoc member;
while (iter.hasNext()) {
member = (FieldDoc) iter.next();
if (member.constantValue() != null) {
inclList.add(member);
}
}
return inclList;
}
COM: <s> return the list of visible constant fields for the given classdoc </s>
|
funcom_train/46495882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean inSameGroup(T t_one, T t_two) {
if(! m_node_to_leader_hash.containsKey(t_one)) { return false; }
if(! m_node_to_leader_hash.containsKey(t_two)) { return false; }
return getRootCell(t_one).m_leader == getRootCell(t_two).m_leader;
}
COM: <s> is same group tests to see if these two members are transitively joined </s>
|
funcom_train/41208029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(int x, int y) {
int absX = getAbsoluteX() + getScrollX();
int absY = getAbsoluteY() + getScrollY();
return (x >= absX && x < absX + getWidth() && y >= absY && y < absY + getHeight());
}
COM: <s> returns true if the given absolute coordinate is contained in the component </s>
|
funcom_train/26222139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initLogger() {
logger = Logger.getLogger( NAMESPACE );
logger.setUseParentHandlers( false );
removeAllLogHandlers();
logger.setLevel( Level.ALL );
// default log handler is a ConsoleHandler
ConsoleHandler console = new ConsoleHandler();
console.setLevel( Level.ALL );
console.setFormatter( new PlainFormatter() );
logger.addHandler( console );
}
COM: <s> initializes the logger </s>
|
funcom_train/39466637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addShoulderPeak(Peak shoulderPeak) {
boolean boo = true;
if (shoulderPeaks.contains(shoulderPeak))
shoulderPeaks.remove(shoulderPeak);
if (shoulderPeak.getArea() < this.getArea()) {
//System.out.println("Added shoulder peak " + shoulderPeak + " size is " + shoulderPeaks.size());
boo = shoulderPeaks.add(shoulderPeak);
this.recalculate();
return boo;
}
else
return false;
}
COM: <s> adds another peak thats on the shoulder of this one </s>
|
funcom_train/37639758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _updateBackgroundColor() {
// Get the new value.
Color back = DrJava.getConfig().getSetting(DEFINITIONS_BACKGROUND_COLOR);
// Change the background color for the doc list.
_model.getDocCollectionWidget().setBackground(back);
// We also need to immediately repaint the foremost scroll pane.
_repaintLineNums();
}
COM: <s> updates the background color for the doc list </s>
|
funcom_train/20741463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void restoreTailFromRecycle(int i_indexTo) {
List<Crumb> res = getHaed(m_trailRecycle, i_indexTo);
List<Crumb> remainder = getTail(m_trailRecycle, i_indexTo + 1);
// refresh the recycle
m_trailRecycle.clear();
if (remainder != null) {
m_trailRecycle.addAll(remainder);
}
if (res != null) {
m_trail.addAll(res);
}
}
COM: <s> restores tail from recycle </s>
|
funcom_train/2408352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private void initialize() {
// this.setSize(150, 400);
// this.setContentPane(getJContentPane());
// this.setTitle("JFrame");
// this.addWindowListener(new java.awt.event.WindowAdapter() {
// public void windowClosing(java.awt.event.WindowEvent e) {
// System.exit(0);
// }
// });
// this.locateOnScreen();
// }
COM: <s> this method initializes this </s>
|
funcom_train/3369628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenuItem getItem(int pos) {
if (pos < 0) {
throw new IllegalArgumentException("index less than zero.");
}
Component c = getMenuComponent(pos);
if (c instanceof JMenuItem) {
JMenuItem mi = (JMenuItem) c;
return mi;
}
// 4173633
return null;
}
COM: <s> returns the code jmenu item code at the specified position </s>
|
funcom_train/1807113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMarker() {
int indexOfLastTurn = turnHistory.size() - 1;
if (markerIndexes.size() < MAX_MARKER_COUNT) {
markerIndexes.add(indexOfLastTurn);
} else {
JOptionPane.showMessageDialog(GuiWindow.getInstance(), GuiWindow
.getErrorMessage("maxMarkerReached"), GuiWindow
.getErrorMessage("titleInformation"),
JOptionPane.INFORMATION_MESSAGE);
}
}
COM: <s> adds a game marker </s>
|
funcom_train/7508555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMakeNullCipher() throws ConfigurationException {
String className = "javax.crypto.NullCipher";
javax.crypto.Cipher nullCipher =
ObjFactory.make(className, "NullCipher");
assertTrue( nullCipher instanceof javax.crypto.NullCipher );
System.out.println("W00t! Watch out NSA...we have a NullCipher and we're not afraid to use it!");
}
COM: <s> test that null cipher object is correctly returned </s>
|
funcom_train/34451346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStartThreadPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_MInvocationAction_startThread_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_MInvocationAction_startThread_feature",
"_UI_MInvocationAction_type"),
M3ActionsPackage.Literals.MINVOCATION_ACTION__START_THREAD,
true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null, null));
}
COM: <s> this adds a property descriptor for the start thread feature </s>
|
funcom_train/4207984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFirstValue(ReportedData.Row row, String key) {
try {
final Iterator rows = row.getValues(key);
while (rows.hasNext()) {
return (String)rows.next();
}
}
catch (Exception e) {
Log.error("Error retrieving the first value.", e);
}
return null;
}
COM: <s> returns the first value found in the reported data </s>
|
funcom_train/21694160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void find(File file, Visitor visitor) throws Exception {
ANTLRFileStream fs = new ANTLRFileStream(file.toString());
Java1_5Lexer lex = new Java1_5Lexer(fs);
TokenRewriteStream tokens = new TokenRewriteStream(lex);
Java1_5Parser grammar = new Java1_5Parser(tokens);
CommonTree tree = (CommonTree) grammar.compilationUnit().getTree();
findClassesAndPackage(tree, visitor);
}
COM: <s> find will return all suspected classes within a java file </s>
|
funcom_train/173237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSubtypeOf(MarkerType superType) {
if (id.equals(superType.getId())) {
return true;
}
for (int i = 0; i < supertypeIds.length; ++i) {
MarkerType sup = model.getType(supertypeIds[i]);
if (sup != null && sup.isSubtypeOf(superType)) {
return true;
}
}
return false;
}
COM: <s> returns whether this marker type is considered to be a subtype of </s>
|
funcom_train/40616912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getBaseDir() {
String dir = baseDir;
if (config != null) {
if (config.reopen) {
dir = RecordingFileSystem.PREFIX + "memFS:" + dir;
}
if (config.splitFileSystem) {
dir = FileSystemSplit.PREFIX + "16:" + dir;
}
}
// return "split:nioMapped:" + baseDir;
return dir;
}
COM: <s> get the base directory for tests </s>
|
funcom_train/36518347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void joinTable(RemoteLobbyContext lobbyContext) {
assert (lobbyContext != null);
try {
tableContext = lobbyContext.joinHoldemTable(new TableId(0), new AsynchronousHoldemTableListener(
displayExecutor, listener));
} catch (RemoteException e) {
throw new IllegalStateException(e);
} catch (IllegalActionException e) {
logger.warn("You cannot join the desired table", e);
throw new IllegalStateException(e);
}
}
COM: <s> join table to receive events for this table </s>
|
funcom_train/22121051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handle(final Event event) {
synchronized (eventListeners) {
for (final Map.Entry<EventHandler, EventConstraint> entry : eventListeners.entrySet()) {
if (entry.getValue().accepts(event)) {
new Thread() {
public void run() {
entry.getKey().handle(event);
}
}.start();
}
}
}
}
COM: <s> adds an event to the event channel which then propagates the event to </s>
|
funcom_train/12305775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toFtpCmdArgument() {
StringBuffer msg = new StringBuffer();
for (int i=0;i<datainfo.length;i++) {
msg.append( String.valueOf(datainfo[i]) );
if (i+1 != datainfo.length) msg.append( "," );
}
return msg.toString();
}
COM: <s> returns the host port information in the </s>
|
funcom_train/28473431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getGenomicRegionPanel() {
if (genomicRegionPanel == null) {
genomicRegionPanel = new JPanel();
genomicRegionPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
genomicRegionPanel.add(getRegionComboBox(), null);
getCacheAllButton();
getCacheAllProgressBar();
if (!Constants.EXTERNAL_DIST){
genomicRegionPanel.add(getCacheAllButton(), null);
genomicRegionPanel.add(getCacheAllProgressBar(), null);
}
genomicRegionPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
}
return genomicRegionPanel;
}
COM: <s> this method initializes genomic region panel </s>
|
funcom_train/41475699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void establishCallToRegisteredPhone(String toUri) {
Conference conf = currentWorkspaceState.getConference();
// Call the guy on all possible phones
String[] toCallableUris = new String[] {toUri};
for(String uri : toCallableUris) {
CallParticipant toParticipant = CallParticipantManager.instance().getCallParticipant(uri);
toParticipant.setConference(conf);
String remoteUserName = user.getName();
toParticipant.setName(remoteUserName);
dialParticipant(toParticipant);
}
}
COM: <s> establish call with all uris registered for the user under the supplied uri </s>
|
funcom_train/13668816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object delete(Comparable key, Object value) {
Object o = null;
try {
o = internalDelete(root, new KeyAndValue(key, value));
} catch (Exception e) {
throw new BTreeNodeValidationException("Error while deleting key='" + key + "' value='" + value + "'", e);
}
if (o != null) {
size--;
}
getPersister().saveBTree(this);
// TODO flush or not?
// persister.flush();
return o;
}
COM: <s> todo manage collision </s>
|
funcom_train/32061833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetTechnique() {
System.out.println("setTechnique");
ContainerView instance =
ContainerView.createNewWithFlow("cv", Right, Down, 0,
newIP(10, 100));
instance.setTechnique( new FlowTechnique(Left, Down, 0) );
}
COM: <s> test of set technique method of class container view </s>
|
funcom_train/46789483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addRecord(String recordName) {
if (recordName != null) {
if (recordName.length() > 0) {
//Message.debug("JavaData: RecordDialog: "
// + "Adding a new Data object with name "
// + recordName, Message.LEVEL.TWO);
Data data = DataFactory.createData(recordName);
dm.add(recordName, data);
setData(dm);
}
}
}
COM: <s> add a new record to the data manager and display it </s>
|
funcom_train/178772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Edge nextInEdge() {
if (this != target.lastInEdge()) {
EdgeIterator targetIns = target.inEdges();
Edge indexEdge = null;
while (targetIns.hasNext()) {
Edge currentEdge = targetIns.nextEdge();
if (currentEdge == this) {
indexEdge = currentEdge;
break;
}
}
if (indexEdge != null)
return targetIns.nextEdge();
}
return null;
}
COM: <s> returns the successor of this edge in the list of ingoing </s>
|