__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/18432936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ItemLabelPosition getSeriesPositiveItemLabelPosition(int series) {
// FIXME: Shouldn't this be lookupPositiveItemLabelPosition(int)
// look up the position table
ItemLabelPosition position = (ItemLabelPosition)
this.positiveItemLabelPositionList.get(series);
if (position == null) {
position = this.basePositiveItemLabelPosition;
}
return position;
}
COM: <s> returns the item label position for all positive values in a series </s>
|
funcom_train/19436851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPackage() {
// -- create the result object
String result = "";
// -- add the delimiter
handler.addReplacement("delimiter", "\\.");
// -- parse the content
result = parser.parse(content.toString());
// -- append raw data
result += raw;
// -- return the result
return result;
}
COM: <s> get the resource as a package </s>
|
funcom_train/18341070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(String username, String password, ProxyInfo info) throws IllegalStateException {
if (listener == null)
throw new IllegalStateException("Listener not set");
listener.connecting(this);
this.userID = username;
this.password = password;
/* send the initial command */
if (cmdHandler instanceof ConnectionHandler) {
((ConnectionHandler) cmdHandler).connect(info, DEFAULT_HOST, DEFAULT_PORT, username, password);
connected = true;
}
}
COM: <s> connect to the aim server </s>
|
funcom_train/33703968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMoneyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Account_money_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Account_money_feature", "_UI_Account_type"),
BankabeulePackage.Literals.ACCOUNT__MONEY, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the money feature </s>
|
funcom_train/29829015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setConnectButton(boolean connected) {
Icon icon = new ImageIcon(ClassLoader.getSystemResource(connected?
"images/disconnect.gif" : "images/connect.gif"));
connectButton.setIcon(icon);
connectButton.setToolTipText(connected? "Disconnect" : "Connect");
connectButton.setSelected(connected);
}
COM: <s> sets state of button for dis connecting </s>
|
funcom_train/269219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLink( ) {
//! It would be nice to cache this but in an editor it can change
// See if I have an HREF attribute courtesy of the enclosing A tag:
AttributeSet anchorAttr = (AttributeSet)
this.fElement.getAttributes().getAttribute(HTML.Tag.A);
if (anchorAttr != null) {
return anchorAttr.isDefined(HTML.Attribute.HREF);
}
return false;
}
COM: <s> is this image within a link </s>
|
funcom_train/33122702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Hashtable getCVSDataKeys() {
Hashtable hashtable = null;
RootArg.class.getClass(); // Force the class to load...
try
{
Workspace ws = VAJ.getWorkspace();
if (ws.testToolOptions(CVS_DATA))
{
hashtable = (Hashtable) ws.getToolOptions(CVS_DATA).getData();
}
else
{
System.out.println("Creating new table");
hashtable = new Hashtable();
}
}
catch (Exception e)
{
e.printStackTrace();
hashtable = new Hashtable();
}
return hashtable;
}
COM: <s> get the cvs data out of the workspace </s>
|
funcom_train/8196775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTickLabelFont(Font font) {
if (font == null) {
throw new IllegalArgumentException("Null 'font' argument.");
}
if (!this.tickLabelFont.equals(font)) {
this.tickLabelFont = font;
notifyListeners(new PlotChangeEvent(this));
}
}
COM: <s> sets the tick label font and sends a </s>
|
funcom_train/46064885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayNoNewsDialog() {
// noNewsTextView.setVisibility(TextView.VISIBLE);
// display dialog box
// when no news
AlertDialog alertDialog = new AlertDialog.Builder(MyTeamsTab.this)
.create();
alertDialog.setTitle(getText(R.string.noteam_alert_title));
alertDialog.setMessage(getText(R.string.noteam_alert_body));
alertDialog.setButton(getText(R.string.noteam_alert_button),
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
return;
}
});
alertDialog.show();
}
COM: <s> display dialog no news </s>
|
funcom_train/30005451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel getJLabelVersion() {
if (this.jLabelVersion == null) {
jLabelVersion = new JLabel();
jLabelVersion.setFocusable(false);
jLabelVersion.setFont(new java.awt.Font("Tahoma",java.awt.Font.ITALIC, 10));
}
return this.jLabelVersion;
}
COM: <s> returns a label to display the version of a plugin </s>
|
funcom_train/18193681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XmlDocument load(InputStream inputStream) throws XmlParserException {
try {
SAXParserFactory saxFactory = SAXParserFactory.newInstance();
SAXParser saxParser = saxFactory.newSAXParser();
saxParser.parse(inputStream, this);
return new XmlDocument(rootNode);
}
catch (Exception e) {
throw new XmlParserException("Unable to parse XML file", e);
}
}
COM: <s> loads a xml document from the input stream given as a parameter </s>
|
funcom_train/48339090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getChildren() {
synchronized (GLOBAL_LOCK) {
ensureAlive();
ensureAlive(this);
if (null == children) {
return Collections.EMPTY_LIST;
} else {
ArrayList list = new ArrayList(children.size());
Iterator iter = children.values().iterator();
while (iter.hasNext()) {
Environment child = (Environment)iter.next();
if (DUMMY != child) {
list.add(child.name);
}
}
return list;
}
}
}
COM: <s> get the names of all child environments </s>
|
funcom_train/45271151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getCodeContent(String filename){
String completeContent="";
//Projects available headers
String[] headerResources=absr.getHeaderFileNames();
//TODO: Find depending headers
//first level headers in Sourcefile
String[] headers=this.getHeadersForFile(filename);
String temppath;
for (String s:headers){
devmsg("File: "+filename+" contains HEADER: "+s);
for (String s1:headerResources){
//include every header available for parsing
if (s1.contains(s)){
temppath=s1;
completeContent+=getFileContentOnly(temppath);
}
}
}
completeContent+=getFileContentOnly(filename);
return completeContent;
}
COM: <s> just reads a file and its headers </s>
|
funcom_train/42464315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* public void moveMail(String folder, String fileName, String targetFolder) {
String mail = loadText(DataAccess.MAIL, folder + "/" + fileName, false);
if (mail.length() > 0) {
saveText(DataAccess.MAIL, targetFolder + "/" + fileName, mail, false);
deleteFile(MAIL, folder + "/" + fileName);
}
} */
COM: <s> move a mail from one folder to another </s>
|
funcom_train/22402065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Edge addEdge(Node start, Node end) {
synchronized (gc) {
try {
EdgeView view = ViewManager.getInstance().createEdgeView();
return addEdge(start, end, view);
} catch (ViewManager.UnknownViewTypeException ex) {
WilmaMain.showErrorDialog("Couldn't get default view", ex);
return null;
}
}
}
COM: <s> add the new edge of the default type to the cluster </s>
|
funcom_train/35683291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getValueForName(final String name) {
for (int i = 0; i < fEntryNamesAndValues.length; i++) {
String[] entry = fEntryNamesAndValues[i];
if (name.equals(entry[0])) {
return entry[1];
}
}
return fEntryNamesAndValues[0][0];
}
COM: <s> given the name label of an entry return the corresponding value </s>
|
funcom_train/6205017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String createURLString(IGaijinElement[] elements) {
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < elements.length; i++) {
if (i > 0) {
buffer.append(",");
}
try {
buffer.append(GaijinElementURL.create(elements[i]).toString());
} catch (GaijinModelException e) {
}
}
return buffer.toString();
}
COM: <s> creates a comma delimited string of gaijin urls </s>
|
funcom_train/46719120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstraintMetaLanguage() throws Throwable {
OPFPackage pack = createTestPackage(true,true,true,true, true);
pack.getMetadata().getLanguages().clear();
runConstraintChecks(pack,1,true,OPFConstraintViolation.Type.META_NO_LANGUAGE, false);
}
COM: <s> constraint check at least one language set in metadata </s>
|
funcom_train/8260673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Session getJCRSession() throws UnexpectedInternalProblemException {
try {
if (session == null) {
session = getJCRRepository().login(
new SimpleCredentials(WasabiConstants.JCR_LOGIN, WasabiConstants.JCR_LOGIN.toCharArray()));
}
// logger.info("Session used: " + ((JCASessionHandle) session).getXAResource().toString());
return session;
} catch (Exception e) {
throw new UnexpectedInternalProblemException(WasabiExceptionMessages.JCR_REPOSITORY_FAILURE, e);
}
}
COM: <s> returns a jca handle that is connected to a jcr session </s>
|
funcom_train/32764995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void add( final GenericRecord record ) {
final Object value = record.valueForKey( PRIMARY_KEY );
Set<GenericRecord> recordSet = RECORD_SET_TABLE.get( value );
if ( recordSet == null ) {
recordSet = new HashSet<GenericRecord>();
RECORD_SET_TABLE.put( value, recordSet );
}
recordSet.add( record );
}
COM: <s> add a record keyed by its primary key </s>
|
funcom_train/18661369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getRid() {
if ( myNode.getPictureCollection().getTreeModel() != null ) {
myNode.getPictureCollection().getTreeModel().removeTreeModelListener( myTreeModelListener );
}
pi.removePictureInfoChangeListener( myPictureInfoChangeListener );
setVisible( false );
dispose();
}
COM: <s> close the editor window and release all listeners </s>
|
funcom_train/44852463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QueryResult selectOfGroupPublished(String inGroupID, OrderObject inOrder) throws VException, SQLException {
KeyObject lKey = new KeyObjectImpl();
lKey.setValue(QuestionHome.KEY_GROUP_ID, new Long(inGroupID));
lKey.setValue(BOMHelper.getKeyStates(QuestionHome.KEY_STATE, WorkflowAwareContribution.STATES_PUBLISHED));
return select(lKey, inOrder);
}
COM: <s> returns the published contributions of the specified group </s>
|
funcom_train/27824267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean save() {
try {
try {
m_module.getAppDriver().startWaitState();
save(m_oimodel);
m_kaonConnectionEvolutionLogs.save();
}
finally {
m_module.getAppDriver().endWaitState();
}
return true;
}
catch (KAONException error) {
m_module.getAppDriver().displayErrorNotification(error);
return false;
}
}
COM: <s> saves the oi model and the evolution log </s>
|
funcom_train/19288178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOneLock(String description) {
holdFiredTableChangeEvents++;
if (holdFiredTableChangeEvents==1) {
if (guiListeners.size()>0)
for (DataTableModelGUIListener listener : guiListeners) {
listener.tableLocked(description);
}
}
Maintenance.debugOutput("DataTableModel: added a lock for the table change events for '"+getTableName()+"', "+holdFiredTableChangeEvents+" holds");
}
COM: <s> start holding the firing of events add one more thing thats holding this </s>
|
funcom_train/48869013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToggleButton getActionAssociationButton() {
if (actionAssociationButton == null) {
actionAssociationButton = new JToggleButton("Action Association",new ImageIcon("resources/images/association.png"));
actionAssociationButton.setToolTipText("Action Association");
group.add(actionAssociationButton);
actionAssociationButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setSelectedButton(ACTION_ASSOCIATION);
}
});
}
return actionAssociationButton;
}
COM: <s> this method initializes action association button </s>
|
funcom_train/19810882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collaborations getCollaborationsByResearcher(String id) {
String organization = null;
if (this.uniqueId.contains(id) && this.uniqueIdResearcher.containsKey(id)) {
organization = toUniqueId(this.uniqueIdResearcher.get(id).getOrganization());
return this.getCollaborationsByOrganization(organization);
}
else {
return null;
}
}
COM: <s> return collaborations that relative to a given researcher id null if not found </s>
|
funcom_train/36647581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserStream getUserAndFriendsStream() {
try {
return DailyMileUtil.getGson()
.fromJson(getSecuredResource(DailyMileUtil.USER_AND_FRIENDS_STREAM_URL),
UserStream.class);
} catch (Exception e) {
throw new RuntimeException("Unable to fetch user and friends stream", e);
}
}
COM: <s> retrieve a stream belonging to the user and the users friends </s>
|
funcom_train/45193079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose() {
try {
// forcefully tear down all handlers...
m_connectionManager.disconnect(HTTP_LISTENER, true);
}
catch (Exception e) {
getLogger().error("Unexpected error while shutting down HTTP listener", e);
}
m_connectionManager = null;
m_socketManager = null;
}
COM: <s> component disposal trigger by the container during which </s>
|
funcom_train/50703303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String element(String s, boolean open) {
String out = "\n";
if (open) { // \n<element>++
return out+indent(true)+"<" + s + ">";
} else if (last) { // \n<elem> ... </elem>--
indent(false);
return "</" + s + ">";
} else { // ... </element>\n --</element>
return out+indent(false)+"</" + s + ">";
}
}
COM: <s> opens closes an xml element </s>
|
funcom_train/40222347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected RectangleHierarchy calculateChildR3(Rectangle tree, Rectangle r) {
/** if rectangles share a bottom edge then no R3 child. */
if (tree.y + tree.height == r.y + r.height) return null;
Rectangle r3 = new Rectangle (tree.x, r.y + r.height, tree.width, tree.y + tree.height - r.y - r.height);
return new RectangleHierarchy(r3);
}
COM: <s> return the r3 child or null if it is empty </s>
|
funcom_train/8337564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadWorkspacesFromStream() {
if (started.get()) throw new IllegalStateException("Loading already started. A new instance " +
"of this class should be created instead of calling this method again.");
started.set(true);
SAXParser parser;
try {
parser = SAXParserFactory.newInstance().newSAXParser();
parser.parse(in, saxHandler);
} catch (CancellationException e) {
//do nothing on a cancellation
} catch (Exception e) {
throw new RuntimeException(e);
}
finished.set(true);
}
COM: <s> call this method to load the workspaces in the given stream into the </s>
|
funcom_train/34069191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyReleased(KeyEvent e) {
//on enter key
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
updateStaticButtons();
diagram.setTitle(selectededitor.getGraphicsObject(), text.getText());
text.setVisible(false);
text.setText(null);
isInEditMode = false;
}
updateStaticButtons();
}
COM: <s> handle keyreleased event for title edit textfield </s>
|
funcom_train/50577645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toNormalizedString() {
boolean first = true;
String normalized;
normalized = "date-roll(";
if (children != null) {
for (int i = 0; i < children.length; ++i) {
if (!first) {
normalized = normalized + ",";
}
first = false;
SimpleNode n = (SimpleNode) children[i];
if (n != null) {
normalized = normalized + n.toNormalizedString();
}
}
}
normalized = normalized + ")";
return normalized;
}
COM: <s> provides a method to print a normalized version of the original </s>
|
funcom_train/3423621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValue(String qname) {
int index = getIndex(qname);
if(index == -1 )
return null;
if(fAttributes[index].value == null)
fAttributes[index].value = fAttributes[index].xmlValue.toString();
return fAttributes[index].value;
} // getValue(String):String
COM: <s> look up an attributes value by xml 1 </s>
|
funcom_train/22571669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doMoveActionDown(IActivity action) {
int index = fPlan.getActions().indexOf(action);
if (index < fPlan.getActions().size() - 1) {
fPlan.getActions().remove(action);
fPlan.getActions().add(index + 1, action);
fPlan.setActionsDirty();
updateActions(fActionTableViewer.getSelection());
fEditor.setDirty(true);
}
}
COM: <s> move an action down in the list </s>
|
funcom_train/3785703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getStateValue(String key, boolean def)
{ /* getStateValue */
String
sDef= (def) ? "TRUE" : "FALSE",
sVal= getStateValue(key, sDef);
boolean value= (sVal!=null && sVal.equalsIgnoreCase("TRUE"));
return(value);
} /* getStateValue */
COM: <s> get state value get boolean param and use default if not found </s>
|
funcom_train/44136741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void record() {
String filename = m_NotesSoundPanel.getFilename();
if(filename == null)
filename = m_NotesSoundPanel.createFilename();
m_SuppressButton.setEnabled(false);
super.setFileName(filename);
m_NotesSoundPanel.setRecordingMode(true);
super.record();
}
COM: <s> to record sound it adds some functionnalities not present in osmsound panel </s>
|
funcom_train/43144866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setControlSize(int width, int height) {
control.setSize(width, height);
axisX.setStart(getLeft() + (width /2));
axisX.setPath(getWidth() - width);
axisY.setStart(getTop() + (height /2));
axisY.setPath(getHeight() - height);
updateControl();
}
COM: <s> sets the size of the control </s>
|
funcom_train/6331657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void calcMemory() {
Runtime rt = Runtime.getRuntime();
try {
DxBag bag = new DxArrayBag();
for (;;) {
bag.add( new byte[100000] );
}
} catch (OutOfMemoryError e) {
totalMemory = rt.totalMemory();
rt.gc();
}
}
COM: <s> initialize the internal memory counter so that free memory returns </s>
|
funcom_train/9535748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireActionEvent() {
Desktop desktop = Desktop.getDesktop();
try {
desktop.browse(new URI(this.getText()));
} catch (URISyntaxException urise) {
System.err.append(urise.getLocalizedMessage());
} catch (IOException ioe) {
System.err.append(ioe.getLocalizedMessage());
}
}
COM: <s> this method handles the execution of the hyperlink </s>
|
funcom_train/7825713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fire() {
Iterator<Arc> incoming=impl.getIncomingArcsIterator();
Iterator<Arc> outgoing=impl.getOutgoingArcsIterator();
while (incoming.hasNext()) {
incoming.next().fire();
}
while (outgoing.hasNext()) {
outgoing.next().fire();
}
}
COM: <s> fires transition moves tokens </s>
|
funcom_train/36647617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addComment(String comment, Long id) {
String body = "{\"body\":\"" + comment + "\"}";
try {
doAuthenticatedPost(DailyMileUtil.buildCommentUrl(id), body);
} catch (Exception e) {
throw new RuntimeException("Unable to add comment", e);
}
}
COM: <s> adds to provided comment to the entry with the provided id </s>
|
funcom_train/13482071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vertex bfs(Graph g, Vertex v, SearchDetails d){
ArrayList<Vertex> queue = new ArrayList<Vertex>();
g.clearVisited();
g.clearScore();
d.bfsInitialize(queue, v);
while(! queue.isEmpty()){
Vertex w = queue.get(0);
queue.remove(0);
if(d.bfsProcess(w)) return w; // if we've found the right vertex, stop
for(Vertex u : w.getNeighborList()){
if(u.getVisited() == false){
d.bfsAddToQueue(u,w,g,queue);
}
}
}
return null;
}
COM: <s> performs a breadth first search on the graph g </s>
|
funcom_train/27761687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getDetails(int indent) {
StringBuffer details = new StringBuffer();
loadHeaderDetails(details, indent);
loadPropertyDetails(details, indent);
loadCompositeDetails(details, indent);
loadFooterDetails(details, indent);
return details.toString();
}
COM: <s> return a detail string with indent </s>
|
funcom_train/9186667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Name append(char c, Name n) {
int len = getByteLength();
byte[] bs = new byte[len + 1 + n.getByteLength()];
getBytes(bs, 0);
bs[len] = (byte) c;
n.getBytes(bs, len+1);
return table.fromUtf(bs, 0, bs.length);
}
COM: <s> return the concatenation of this name the given ascii </s>
|
funcom_train/17675955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReferenceGraphCycle(boolean referenceGraphCycle) {
this.referenceGraphCycle = referenceGraphCycle;
if (pcSubclasses != null) {
for (int i = pcSubclasses.length - 1; i >= 0; i--) {
pcSubclasses[i].setReferenceGraphCycle(referenceGraphCycle);
}
}
}
COM: <s> set our reference graph cycle and recursively all of our subclasses </s>
|
funcom_train/38536705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String boolOpDesc(int operation) {
switch(operation) {
case BoolOperation.EQ:
return "=";
case BoolOperation.AND:
return "&";
case BoolOperation.OR:
return "|";
case BoolOperation.XOR:
return "^";
case BoolOperation.NOT:
return "!";
case BoolOperation.IMPLIES:
return "->";
default:
return "?";
}
}
COM: <s> converts a boolean operation to a string </s>
|
funcom_train/39366391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeVolume() throws SeisException {
this.checkVolumeIndex();
_mapBuffer.clear();
_mapBufferView.clear();
_mapBufferView.put(_traceMapArray);
_mapBuffer.position(0);
_mapBuffer.limit(4 * _traceMapArray.length );
_mapIO.write(_mapBuffer);
}
COM: <s> write an entire volume of fold to disk </s>
|
funcom_train/38570752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPasswordWithHash(String v) {
byte[] hash = md.digest(v.getBytes());
try {
this.password = java.net.URLEncoder.encode
(new String(hash, "UTF-8"), "UTF-8");
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> set the value of password </s>
|
funcom_train/49044750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPredicateArgPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ModifyModelReaction_PredicateArg_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ModifyModelReaction_PredicateArg_feature", "_UI_ModifyModelReaction_type"),
EventPackage.Literals.MODIFY_MODEL_REACTION__PREDICATE_ARG,
!((ModelObject) object).isPredefined(),
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the predicate arg feature </s>
|
funcom_train/2985898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void internalFrameIconified(final InternalFrameEvent fe) {
final ScreenInstanceInfo sif = (ScreenInstanceInfo) m_screenInstancesByFrame.get(fe.getInternalFrame());
if (sif.getScreen() instanceof Activatable) {
getLogger().debug("deactivating");
((Activatable) sif.getScreen()).deactivate();
}
}
COM: <s> when screen gets iconified deactivate it </s>
|
funcom_train/785562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateDegrees(int e, int incr) {
if ( !getEdgeTable().isValidRow(e) ) return;
int s = getSourceNode(e);
int t = getTargetNode(e);
if ( s < 0 || t < 0 ) return;
updateDegrees(e, s, t, incr);
if ( incr < 0 ) {
m_edgeTuples.invalidate(e);
}
}
COM: <s> internal method for updating the linkage of this graph </s>
|
funcom_train/12165153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDoHorizontalRuleEmulationOff() throws Exception {
privateSetUp();
assertFalse("Emulation should be off", protocol.emulateHorizontalTag);
protocol.doHorizontalRule(buffer, null);
document.addNode(buffer.getRoot());
String output = DOMUtilities.toString(
document, protocol.getCharacterEncoder());
assertEquals("Wrong output in doHorizontalRule method", "", output);
}
COM: <s> test the horizontal rule </s>
|
funcom_train/48083004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Reference toReference(int type, Reference referent, int hash) {
switch (type) {
case SOFT:
return new SoftRef(hash, referent, parent.queue);
case WEAK:
return new WeakRef(hash, referent, parent.queue);
default:
throw new Error("Attempt to create hard reference in ReferenceMap!");
}
}
COM: <s> constructs a reference of the given type to the given referent </s>
|
funcom_train/37587347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void debuggerShutdown() {
assert EventQueue.isDispatchThread();
_lock.startRead();
try {
int size = _listeners.size();
for (int i = 0; i < size; i++) {
_listeners.get(i).debuggerShutdown();
}
}
finally { _lock.endRead(); }
}
COM: <s> called when debugger mode has been disabled </s>
|
funcom_train/21018546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModel(ActionModel actionModel) {
_actionModel.removeActionModelListener(_actionModelListener);
_actionModel = actionModel;
_actionModel.addActionModelListener(_actionModelListener);
_actionPanels.clear();
_actionComponents.clear();
for (CTabItem item : _actionFolder.getItems()) {
item.dispose();
}
for (String group : _actionModel.getGroups()) {
refreshGroup(group);
}
}
COM: <s> sets the action model </s>
|
funcom_train/40686238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMapRightClickHandler(final MapRightClickHandler handler) {
maybeInitMapRightClickHandlers();
mapRightClickHandlers.addHandler(handler,
new PointElementOverlayCallback() {
@Override
public void callback(Point point, Element elem, Overlay overlay) {
MapRightClickEvent e = new MapRightClickEvent(MapWidget.this,
point, elem, overlay);
handler.onRightClick(e);
}
});
}
COM: <s> add a click handler for mouse right click events </s>
|
funcom_train/7230645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectProject(ProjectTreeNode nd){
TreePath path = new TreePath(nd.getPath());
//mjFileExplorer.fireTreeExpanded(path);
JTree jProjectTree = mjRootAppFrame.getProjectTree();
jProjectTree.expandPath(path);
int iRow = jProjectTree.getRowForPath(path);
jProjectTree.setSelectionRow(iRow);
}
COM: <s> select the specified project in the project tree </s>
|
funcom_train/44494758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertTextContains(final String message, final String text, final String textContained, int assertLevel) {
assertMethodWithLevel(new Runnable() {
public void run() {
Assert.assertTrue(JameleonUtility.createErrMsg(message), text.indexOf(textContained) >= 0);
}
},assertLevel);
}
COM: <s> asserts text is contained into some given text </s>
|
funcom_train/9086783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Accounts entity) {
EntityManagerHelper.log("saving Accounts instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved accounts entity </s>
|
funcom_train/48934239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String create(Restriction_Structure_I res) {
String result = "restriction(";
SyntaxCreator_Class_I cls = new SyntaxCreator_Class_Prolog_SOL();
SyntaxCreator_Concept_I con = new SyntaxCreator_Concept_Prolog_SOL();
result += cls.create(res) + ", " + cls.create(res.getPredicate())
+ ", "
+ Serializer_Prolog_SOL.createSystemSaveSyntax(res.getRestrictionName())
+ ", "
+ con.create(res.getRestrictionValue())
+ ")";
cls = null;
return result;
}
COM: <s> returns a restriction class x y predicate name res name res value </s>
|
funcom_train/13227065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMLInfiniteInteger divide(JMLInfiniteInteger n) {
//@ assume n != null;
if (n instanceof JMLFiniteInteger) {
BigInteger s = val.divide(((JMLFiniteInteger)n).val);
//@ assume s != null;
return new JMLFiniteInteger(s);
} else {
return ZERO;
}
}
COM: <s> return the quotient of this integer divided by the argument </s>
|
funcom_train/45230015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONNumber getReturnCodeNumber() {
JSONNumber returnCodeNumber = null;
JSONObject functionObject = getFunctionObject();
if (functionObject != null) {
JSONValue returnCodeValue = functionObject.get("return_code");
if (returnCodeValue != null) {
returnCodeNumber = returnCodeValue.isNumber();
}
}
return returnCodeNumber;
}
COM: <s> gets the return code number attribute of the response parser object </s>
|
funcom_train/9758618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void hideMargin() {
if (fMarginPainter != null) {
if (fSourceViewer instanceof ITextViewerExtension2) {
JFaceResources.getFontRegistry().removeListener(fFontPropertyChangeListener);
fFontPropertyChangeListener= null;
ITextViewerExtension2 extension= (ITextViewerExtension2) fSourceViewer;
extension.removePainter(fMarginPainter);
fMarginPainter.deactivate(true);
fMarginPainter.dispose();
fMarginPainter= null;
}
}
}
COM: <s> hides the margin </s>
|
funcom_train/34300858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addOrderTerm(String termTypeId,Double termValue,Long termDays) {
GenericValue orderTerm = GenericValue.create(delegator.getModelEntity("OrderTerm"));
orderTerm.put("termTypeId", termTypeId);
orderTerm.put("termValue", termValue);
orderTerm.put("termDays", termDays);
return addOrderTerm(orderTerm);
}
COM: <s> add an order term to the order </s>
|
funcom_train/3107386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean freeDownloadSlot(IConnection conn) {
// if the Connection has reserved a slot
if (downloadConnections.contains(conn)) {
settings.releaseDownloadSlot();
downloadConnections.remove(conn);
logger.debug("Released download slot for " + conn);
displayInfo();
return true;
// if the Connection has not reserved a slot
} else {
logger.debug("Not used as DownloadConnection.");
return false;
}
}
COM: <s> free a download slot reserved for the given connection </s>
|
funcom_train/8079928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double calculateDisagreement(Instance instance) throws Exception{
double disagreement;
switch(m_SelectionScheme){
case JENSEN_SHANNON:
disagreement = calcJSDivergence(instance);
break;
case MAJORITY:
disagreement = calcMajorityDis(instance);
break;
case EUCLIDEAN:
disagreement = calcEuclideanDis(instance);
break;
case MARGIN:
//negate margins so that the sort ordering does not need to be changed
disagreement = -1.0 * calculateMargin(instance);
break;
case BAGGING:
disagreement = -1.0 * m_SelectionCommittee.calculateMargin(instance);
break;
case BOOSTING:
disagreement = -1.0 * m_SelectionCommittee.calculateMargin(instance);
break;
default:
disagreement = calcMajorityDis(instance);
}
return disagreement;
}
COM: <s> calculate the disagreement in the ensemble over the label of </s>
|
funcom_train/48404348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addDragStopHandler(com.smartgwt.client.widgets.events.DragStopHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.events.DragStopEvent.getType()) == 0) setupDragStopEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.events.DragStopEvent.getType());
}
COM: <s> add a drag stop handler </s>
|
funcom_train/32095438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getCandidatesToDeleteDigits(StringBuffer tmp) {
SortedSet<Integer> candSet = new TreeSet<Integer>();
for (int i = 0; i < candidatesToDelete.size(); i++) {
candSet.add(candidatesToDelete.get(i).getValue());
}
for (int value : candSet) {
tmp.append(value);
}
}
COM: <s> returns all candidates that are deleted in this </s>
|
funcom_train/40927333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getLlamarCommand() {
if (llamarCommand == null) {//GEN-END:|149-getter|0|149-preInit
// write pre-init user code here
llamarCommand = new Command("Llamar", Command.OK, 0);//GEN-LINE:|149-getter|1|149-postInit
// write post-init user code here
}//GEN-BEGIN:|149-getter|2|
return llamarCommand;
}
COM: <s> returns an initiliazed instance of llamar command component </s>
|
funcom_train/15608025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getParseTitle() {
byte validationSetting = getValidationSetting();
if (validationSetting == XML_SCHEMA_VALIDATION)
return SchemaValidatingParser.getPresentationTitle();
else if (validationSetting == DTD_VALIDATION)
return ValidatingParser.getPresentationTitle();
else
return "";
} // End method
COM: <s> presentation title for exceptions report to validation </s>
|
funcom_train/43106739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updatePassword(final boolean is_buyer) {
View.show(UpdatePasswordView.view(logged_user, new F0() {
// the password has been updated, go back to the main menu
public void call() {
logged_user.setUsingDefaultPass(false);
if(is_buyer)
buyerPanel();
else
sellerPanel();
}
}));
}
COM: <s> display the view for updating a users password and then updates the </s>
|
funcom_train/205219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pause (int i) {
// this will give perfomance problems all multiplications
// should be done last i suggest to reomve the * 1000, alos
// does thes need to be i suggest to keep stored time in
// miliseconds and only at print time changing it as with the
// other timers
storedTime[i] = get(i) * 1000;
running[i] = false;
}
COM: <s> the code pause code method pause the ith timer </s>
|
funcom_train/48151484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
super.update();
timeline.repaint();
arrivalTimeGraph.repaint();
arrivalTimeTable.update();
String recordText = "";
for (int i = 0; i < k; i++)
recordText = recordText + "\t" + format(timeline.timeAt(i));
getRecordTable().append(recordText);
}
COM: <s> this method updates the display including the timeline record table </s>
|
funcom_train/16952463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawPixel(int x, int y, float r, float g, float b) {
if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight()) {
rgbpixels[x + getWidth() * y] = 255 << 24 | (int) (255 * r) << 16
| (int) (255 * g) << 8 | (int) (255 * b);
}
}
COM: <s> draw a pixel at window location x y with color r g b </s>
|
funcom_train/277759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameters(Map parameters) throws IOException {
if (parameters == null) return;
for (Iterator i = parameters.entrySet().iterator(); i.hasNext();) {
Map.Entry entry = (Map.Entry)i.next();
setParameter(entry.getKey().toString(), entry.getValue());
}
}
COM: <s> adds parameters to the request </s>
|
funcom_train/37098590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showNodeHoverText(String s,int nodeIndex) {
isNodeHoverShow = true;
//if (nodeIndex == hoverNodeIndex) return;
//hoverShape=null;
if (hoverShape==null) initHoverShape();
hoverShape.setText(s);
hoverShape.setNodeIndex(nodeIndex);
hoverNodeIndex = nodeIndex;
new DrawHoverThread().start();
}
COM: <s> called by nbrowse jnet man to set node hovering text </s>
|
funcom_train/13596710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renamePhoneme(Phoneme phoneme, String newName) {
List renamed = new ArrayList();
for (Iterator iter = phonemes.iterator(); iter.hasNext();) {
Phoneme pho = (Phoneme) iter.next();
if (pho.equals(phoneme)) {
renamed.add(pho);
extractor.renamePhoneme(pho.getName(), newName);
pho.setName(newName);
}
}
if (renamed.size() > 0) {
notifyPhonemesRenamed((Phoneme[]) renamed.toArray(new Phoneme[] {}));
}
}
COM: <s> rename the given phoneme giving it a new name </s>
|
funcom_train/24216570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsSquare(AbstractSquare as, boolean reverse) {
Coords C1, C2;
if(reverse) {
C1 = c2.reverse(board);
C2 = c1.reverse(board);
} else {
C1 = c1;
C2 = c2;
}
int i = as.getColumn();
int j = as.getRow();
return i >= C1.getColumn() && i <= C2.getColumn()
&& j >= C1.getRow() && j <= C2.getRow();
}
COM: <s> tells whether this square area contains the given square </s>
|
funcom_train/9550622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JTextField getJTextFieldTitle() {
if (jTextFieldTitle == null) {
jTextFieldTitle = new JTextField();
jTextFieldTitle.setLocation(new java.awt.Point(107,21));
jTextFieldTitle.setFont(new java.awt.Font("SansSerif", java.awt.Font.PLAIN, 10));
jTextFieldTitle.setBackground(new Color(255, 255, 190));
jTextFieldTitle.setSize(new java.awt.Dimension(183,17));
}
return jTextFieldTitle;
}
COM: <s> this method initializes j text field title </s>
|
funcom_train/2272408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prependSAMLElementsToHeader(WSSecHeader secHeader) {
if (senderVouches) {
WSSecurityUtil.prependChildElement(document, secHeader
.getSecurityHeader(), secRefSaml.getElement(), true);
}
WSSecurityUtil.prependChildElement(document, secHeader
.getSecurityHeader(), samlToken, true);
}
COM: <s> prepend the saml elements to the elements already in the security header </s>
|
funcom_train/5618944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_add() {
List<Object> a = newInstance(null);
for (int i = 0; i < 4; i++) {
a.add(i);
}
TestSupport.assertEquals(a, defaultList(), "add(Object o) failed");
}
COM: <s> tests add object o </s>
|
funcom_train/20747836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean retainAll(Collection<?> c) {
boolean answer = false;
for (Iterator i = this.iterator(); i.hasNext(); ) {
Object m = i.next();
if (!c.contains(m)) {
i.remove();
answer=true;
}
}
modified = modified || answer;
return answer;
}
COM: <s> retain all the elements in this collection except those in the </s>
|
funcom_train/32094051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Chain getKrakenChain(int startIndex, int startCandidate, int endIndex, int endCandidate) {
globalStep.reset();
resetTmpChains();
addChain(onTable[startIndex * 10 + startCandidate], endIndex, endCandidate, false);
return globalStep.getChains().get(0);
}
COM: <s> retrieve the chain for a kraken fish </s>
|
funcom_train/47564271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onDeleteUser(User user) {
aaaService.removeUser(user.getLogin());
String message = MapVariableInterpolator.interpolate(getLocalizer()
.getString("user.deleted", this), new MicroMap("name", user
.getFullName()));
getSession().info(message);
backPage.get("feedback").setVisible(true);
setRedirect(true);
setResponsePage(backPage);
}
COM: <s> listener method for delete action </s>
|
funcom_train/1304070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean priorHasFeature(String feature, Boolean value) {
boolean result = false;
for (Segment priorSegment = segmentSequence.getPreviousSegment(curSegment);
priorSegment != null;
priorSegment = segmentSequence.getPreviousSegment(priorSegment)) {
if (SegmentUtils.isDelimOrWhitespace(priorSegment)) continue;
result = priorSegment.hasFeature(feature, value);
break;
}
return result;
}
COM: <s> check the prior non white segment for the given feature </s>
|
funcom_train/37775526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unSetUserPreference(String name) throws IOException {
String userPreferencesFileName = (String) getProperty(PROPERTY_USER_PREFERENCES_FILE);
if (userPreferencesFileName != null) {
Map m = getUserPreferences(userPreferencesFileName);
m.remove(name);
// Save the property to file
storePropertiesToFile((Properties) m, userPreferencesFileName);
}
}
COM: <s> unset a user preference already persisted which will be removed beyond a session </s>
|
funcom_train/25360887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadParameters() {
// load the values from the DocumentInfo class
tf_title.setText(DocumentInfo.getTitle());
tf_author.setText(DocumentInfo.getAuthor());
tf_subject.setText(DocumentInfo.getSubject());
tf_keywords.setText(DocumentInfo.getKeywords());
}
COM: <s> load previously saved parameters </s>
|
funcom_train/37078970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkFocusDrivenEdits() {
super.checkFocusDrivenEdits(); // synonyms
// If we were just editing transcript name then do edit, otherwise dont as gui name
// may be different from model due to gene name change or type change or id change
if (editingName)
updateModelNameFromGui();
}
COM: <s> focus driven edits occur in textboxes synonyms names and ids </s>
|
funcom_train/22782410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Image o1, Image o2) {
if (o1 == null || o1.getRating() == null) {
if (o2 == null || o2.getRating() == null)
return 0;
return 1;
}
if (o2 == null || o2.getRating() == null)
return -1;
return o1.getRating().compareTo(o2.getRating()) * -1;
}
COM: <s> this method uses the compare to method of the image rating class </s>
|
funcom_train/20322278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTfEmail() {
if (tfEmail == null) {//GEN-END:|83-getter|0|83-preInit
// write pre-init user code here
tfEmail = new TextField("E-mail", null, 32, TextField.ANY);//GEN-LINE:|83-getter|1|83-postInit
// write post-init user code here
}//GEN-BEGIN:|83-getter|2|
return tfEmail;
}
COM: <s> returns an initiliazed instance of tf email component </s>
|
funcom_train/19140771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataContentHandler createDataContentHandler(String mimeType){
DataContentHandler dch = null;
System.out.print("SimpleDCF: trying to create a DCH");
VectorEntry ve = (VectorEntry)entry_hash.get(mimeType);
if(ve != null) {
System.out.print("...found token");
try {
dch = (DataContentHandler)Class.forName(
ve.getClassName()).newInstance();
if(dch == null)
System.out.println("...FAILED!!!");
else
System.out.println("...SUCCESS!!!");
} catch(Exception e) {
System.out.println(e);
}
}
return dch;
}
COM: <s> implement the factor interface </s>
|
funcom_train/3305142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processLineCommandTrigger(Element linesElement) {
List l = linesElement.getChildren("command");
if (l != null) {
List cmdElements = linesElement.getChildren("command");
HashSet commands = new HashSet();
for (Iterator iCmds = l.iterator(); iCmds.hasNext();) {
Element cmdElement = (Element) iCmds.next();
Command buttonCmd = new Command (cmdElement);
commands.add (buttonCmd);
}
}
}
COM: <s> the lines element can carry a number of commands that are executed </s>
|
funcom_train/34449470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void refreshLinkedReference() {
EObject semanticElement = resolveSemanticElement();
if (false == semanticElement instanceof EReference) {
return;
}
if (((EReference) semanticElement).getEOpposite() != null) {
getPrimaryShape().displayTargetDecoration(false);
} else {
getPrimaryShape().setHideLine(false);
getPrimaryShape().displayTargetDecoration(true);
}
}
COM: <s> refresh reference decoration and visibility </s>
|
funcom_train/17591369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttributeInfo getAttribute(String name) {
ArrayList list = attributes;
int n = list.size();
for (int i = 0; i < n; ++i) {
AttributeInfo ai = (AttributeInfo)list.get(i);
if (ai.getName().equals(name))
return ai;
}
return null;
}
COM: <s> returns the attribute with the specified name </s>
|
funcom_train/21252347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Type_name_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Type_name_feature", "_UI_Type_type"),
EntityPackage.Literals.TYPE__NAME, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the name feature </s>
|
funcom_train/18304030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toXML() {
StringBuffer buf = new StringBuffer();
buf.append("<error code=\"").append(code).append("\">");
if (message != null) {
buf.append(message);
}
buf.append("</error>");
return buf.toString();
}
COM: <s> returns the error as xml </s>
|
funcom_train/38995737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setUpMenu() {
JMenuBar menuBar = new JMenuBar();
menuBar.setBorder(BorderFactory.createRaisedBevelBorder());
// TODO add more menus !
// JMen
// menuBar.add();
JMenu fileMenu = new JMenu("File");
JMenu optionsMenu = new JMenu("Options");
JMenu helpMenu = new JMenu("help");
menuBar.add(fileMenu);
menuBar.add(optionsMenu);
menuBar.add(helpMenu);
setJMenuBar(menuBar);
}
COM: <s> sets up the menubar for the main view </s>
|
funcom_train/3116656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextArea(JTextArea ta) {
textArea = ta;
textArea.setOpaque(true);
textArea.setWrapStyleWord(true);
setEditable(false);
textArea.requestFocus();
textWrapper.setComponent(ta); // set the wrapper's element
this.setBoundingPoints2D(COORD_ABS, textWrapper.getBounds2D(COORD_ABS));
}
COM: <s> set the text area of this typed text </s>
|
funcom_train/15954271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWithCharSetString() throws BMLException{
char lcValue[] = {'G','o','o','d'};
DataString ldString = new DataString(fBlank);
ldString.setString(lcValue,0,lcValue.length);
assertEquals("Good",ldString.toString());
}
COM: <s> test of set string using char method </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.