__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/3523769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initForm() throws java.lang.Exception {
super.initForm();
// Display the original time this form was created
// by manipulating the DOM directly, without using a component
getDocumentAdapter().setElementText("createTime", new Date().toString());
}
COM: <s> one time initialization of the servlet form </s>
|
funcom_train/44852611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QueryResult selectOfGroup(Long 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 all published questions belonging to the specified group </s>
|
funcom_train/45872750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SemanticClass getSemanticClass() {
if (mainSemanticClass != null) {
return mainSemanticClass;
}
//if we haven't assigned the main semantic class explicitly
//pick the first one from the list of semantic classes
//if the semantic classes list is empty, return null
for (SemanticThing thing : getSemanticClasses()) {
if (thing instanceof SemanticClass) {
this.mainSemanticClass = (SemanticClass)thing;
break;
}
}
return this.mainSemanticClass;
}
COM: <s> returns the semantic class corresponding to this tangible </s>
|
funcom_train/18455910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshActionItems() {
int loop;
String item;
action.removeAllItems();
action.addItem(stringFactory.getString(
LabelStringFactory.XML_ACTION_TAKE_ACTION));
for (loop = 0; loop < ACTIONS.length; loop++) {
item = ACTIONS[loop];
if (loop == ON_OFF_INDEX) {
item += onOffButtonValue ? stringFactory.getString(
LabelStringFactory.XML_ACTION_TURNONOFF_OFF) :
stringFactory.getString(
LabelStringFactory.XML_ACTION_TURNONOFF_ON);
}
action.addItem(item);
}
action.setSelectedIndex(0);
}
COM: <s> refreshes the action items combo box </s>
|
funcom_train/24347666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws IOException {
int argsSize = args.size();
String[] cmd = new String[argsSize + 1];
cmd[0] = ffmpegExecutablePath;
for (int i = 0; i < argsSize; i++) {
cmd[i + 1] = (String) args.get(i);
}
Runtime runtime = Runtime.getRuntime();
ffmpeg = runtime.exec(cmd);
ffmpegKiller = new ProcessKiller(ffmpeg);
runtime.addShutdownHook(ffmpegKiller);
inputStream = ffmpeg.getInputStream();
outputStream = ffmpeg.getOutputStream();
errorStream = ffmpeg.getErrorStream();
}
COM: <s> executes the ffmpeg process with the previous given arguments </s>
|
funcom_train/18525530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse() throws IOException, SAXException {
if (panel != null) {
InputSource is = LanguageFileLoader.getReference().getLanguageInputStream(LanguageFileLoader.HELPPANEL_XML_FILE);
if (is != null) {
getParser().setContentHandler(this);
getParser().setErrorHandler(this);
getParser().parse(is);
}
}
}
COM: <s> parse the helppanel </s>
|
funcom_train/1540945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rotate(double theta) {
currentTransform.rotate(theta);
try {
writeTransform(new AffineTransform(Math.cos(theta),
Math.sin(theta), -Math.sin(theta), Math.cos(theta), 0, 0));
} catch (IOException e) {
handleException(e);
}
}
COM: <s> rotate the current transform over the z axis </s>
|
funcom_train/4954865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
logger.info("Nouveau serveur lance sur le port " + getPort() + ".");
try {
serverSocket = new ServerSocket(port);
} catch (IOException e) {
logger.error("Could not listen on port:" + port);
return;
}
while(listening)
try {
new ServeurThread(serverSocket.accept(), this).start();
} catch (IOException e) {
logger.error("Erreur IO");
}
try {
serverSocket.close();
} catch (IOException e) {
logger.fatal("Erreur IO");
return;
}
}
COM: <s> gestion execution dans ce thread </s>
|
funcom_train/37564830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLogLevel(Level level) {
LOG.setLevel(level);
Http.LOG.setLevel(level);
RequestRecord.LOG.setLevel(level);
HostQueue.LOG.setLevel(level);
FetcherThread.LOG.setLevel(level);
OutputThread.LOG.setLevel(level);
}
COM: <s> sets the log level to code level code </s>
|
funcom_train/4025594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void orderRelations() {
List<PropertyObjectBase> relationsList = new ArrayList<PropertyObjectBase>();
for(List<PropertyObjectBase> propertyList : predicateIndex.values() ) {
relationsList.addAll( propertyList );
}
Collections.sort( relationsList );
properties = relationsList.toArray( new PropertyObjectBase[ relationsList.size() ] );
propertiesSession = session;
}
COM: <s> populates the properties array </s>
|
funcom_train/23284519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeTrackFromQueue(Entry entry) throws IOException, UPNPResponseException {
ActionMessage message = messageFactory.getMessage("RemoveTrackFromQueue");
message.setInputParameter("InstanceID", 0);
message.setInputParameter("ObjectID", entry.getId());
message.service();
}
COM: <s> removes the given entry from the queue </s>
|
funcom_train/3946169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTimelimitactionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DocumentRoot_timelimitaction_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_timelimitaction_feature", "_UI_DocumentRoot_type"),
AdlcpRootv1p2Package.eINSTANCE.getDocumentRoot_Timelimitaction(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the timelimitaction feature </s>
|
funcom_train/803545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUserNameByAccountType(String accountTypeName) {
for ( Account a : loggedInSuperUser.getAccounts().values() ) {
if( accountTypeName.equals( a.getAccountType().getName() ) ) {
return getUserName( a.getAccountId() );
}
}
throw new IllegalArgumentException("There is no such account type");
}
COM: <s> returns the decrypted username for an account of a given account type </s>
|
funcom_train/43894000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object oth) {
if (this == oth) {
return true;
}
if (oth instanceof FillImpl) {
FillImpl other = (FillImpl) oth;
return Utilities.equals(this.color, other.color)
&& Utilities.equals(this.backgroundColor, other.backgroundColor)
&& Utilities.equals(this.opacity, other.opacity)
&& Utilities.equals(this.graphicFill, other.graphicFill);
}
return false;
}
COM: <s> compares a fill impl with another for equality </s>
|
funcom_train/11023498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddPropertyNullName3() {
try {
dynaClass.add(null, String.class, true, true);
fail("add(name, type, readable, writable) did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException expected) {
// expected result
}
}
COM: <s> test add name type readable writable method with null name </s>
|
funcom_train/29538866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(String user) {
try {
Collection<String> news = db.getNews(user);
if (news.isEmpty())
return;
server.tell(user, news, new TellDoneListener(user, news.size()));
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> sends a user news if they did not receive it already </s>
|
funcom_train/5434150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean mayShowContextMenu(MouseEvent evt) {
if (evt.isPopupTrigger()) {
if (_contextMenu != null)
_contextMenu.show(evt.getComponent(),
evt.getX(), evt.getY());
return true;
}
return false;
}
COM: <s> method may show context menu </s>
|
funcom_train/93788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Page addPage(int flag) throws StandardException {
if ((flag & ContainerHandle.ADD_PAGE_BULK) != 0 && active && forUpdate)
{
// start preallocating immediatelly, don't wait for the
// preallocation threshold to be crossed. Don't go wild and
// preallocate a bunch of pages either, use preAllocate for that.
container.clearPreallocThreshold();
}
return addPage();
}
COM: <s> add a page to the container if flag container handle </s>
|
funcom_train/35192755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
for (int i = 0; i < clientsToNotice; i++) {
Socket thisClient = (Socket) clientsList.get(i);
try {
PrintWriter msgWriter = new PrintWriter(thisClient.getOutputStream(), true);
msgWriter.println(notice);
//msgWriter.println("Client# "+theLastConnected+" is On-Line...");
} catch (IOException e) {
e.printStackTrace();
}
}
}
COM: <s> notifies the connected clients from the list </s>
|
funcom_train/1731488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeScene(Geometry geo,OutputStream bin) throws IOException {
totalShared=0;
myOut=new DataOutputStream(bin);
sharedObjects.clear();
entireScene.clear();
writeHeader();
findDuplicates(geo);
entireScene.clear();
writeSpatial(geo);
writeClosing();
myOut.close();
}
COM: <s> converts a given geometry to j mes binary format </s>
|
funcom_train/45076739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DateTime getDateRecorded() {
String dstr = null;
try {
dstr = getQualifierValueByName(XML.DateTimeRecorded);
} catch (Exception e) {
cat.error(e);
}
if (dstr == null) {
return null;
} else {
Date theDate = ISODate.HL72Date(dstr);
Calendar calen = Calendar.getInstance();
calen.setTime(theDate);
return new DateTime(calen);
}
}
COM: <s> get the date the record was stored </s>
|
funcom_train/29918944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node prepareNewNode() {
/* Create a new child node with a TEXT attribute. Collapse the node first
* to get around an unexplored redraw bug. */
AttributeList newAtts = new AttributeList();
newAtts.addAttribute("TEXT", "", (byte) 0);
Node newNode =
new Node(new FreeMindNode(null, newAtts, FmParser.nodeTag));
/* Text nodes may have children. */
newNode.setAllowsChildren(true);
return newNode;
}
COM: <s> create a new node with text attribute </s>
|
funcom_train/18787582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void store() {
MetaClass clazz = (MetaClass) node.getDataObject();
try {
type.setHierarchical(hierarchical.isSelected());
type.setStorageKind((StorageKind) storageKind.getSelectedCode());
getCodeTypeMgr().save(clazz);
} catch (IOException e) {
log.error(e);
}
}
COM: <s> stores the code values in the persistent store </s>
|
funcom_train/36470475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchTemplates(String sort, long category) {
String where = category != -1? KEY_TEMPLATE_CATEGORY + "=?": null;
String args[] = category != -1? new String[] { (new Long(category)).toString() }: null;
return mDb.query(TABLE_TEMPLATE, TEMPLATE_COLUMNS, where, args,
null, null, sort);
}
COM: <s> return a cursor over the list of all templates in the database </s>
|
funcom_train/19060870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*
* public String getTreePath() { TreeNode[] treeNode = getPathToRoot(this,
* 0);
*
* StringBuffer path = new StringBuffer();
*
* for (int i = 1; i < treeNode.length; i++) { AddressbookTreeNode folder =
* (AddressbookTreeNode) treeNode[i]; path.append("/" + folder.getName()); }
*
* return path.toString(); }
COM: <s> method get tree path </s>
|
funcom_train/32752255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void makeContent() {
Container container = getContentPane();
errorText = new JTextField();
mainPane = new JTabbedPane();
mainPane.setVisible(true);
selectPanel = myDoc.cavSelector.makeSelectPanel();
mainPane.add("Controller", selectPanel);
container.add(mainPane,BorderLayout.CENTER);
container.add(errorText,BorderLayout.SOUTH);
}
COM: <s> create the main window subviews </s>
|
funcom_train/34139225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initView() {
if (contactsPickerMode) {
currentView = CONTACTS_VIEW;
switchToContactsView();
} else {
prefs = getPreferences(MODE_PRIVATE);
currentView = prefs.getInt(getString(R.string.view_mode_preference), DIALING_VIEW);
if (currentView == DIALING_VIEW) {
switchToDialingView();
} else {
switchToContactsView();
}
}
}
COM: <s> load a main view depending on preferences and whether this activity has </s>
|
funcom_train/21087772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addImplementedPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_SNI_Port_implemented_feature"),
getString("_UI_SNI_Port_implemented_description"),
SNI_Package.Literals.SNI_PORT__IMPLEMENTED, true, false, false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
getString("_UI_PortPropertyCategory"), null));
}
COM: <s> this adds a property descriptor for the implemented feature </s>
|
funcom_train/18566585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColor(double redValue, double greenValue, double blueValue) {
int channel = (int)(256 * (0.30 * redValue + 0.59 * greenValue + 0.11 * blueValue));
if (channel >= 256) {
channel = 255;
}
else if (channel < 0) {
channel = 0;
}
return (channel << 16) + (channel << 8) + channel;
}
COM: <s> convert red green blue to gray scale </s>
|
funcom_train/32056535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWrite1() {
TPGraphModelFileFormatXML tpxml = new TPGraphModelFileFormatXML();
//empty function
try {
tpxml.write( "jpjunit.tpb", new Hashtable(), new GPGraph(),
new DefaultGraphModel() );
} catch( Exception e ) {
fail();
}
}
COM: <s> this function tests write function of tpgraph model file format xml class </s>
|
funcom_train/48869053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToggleButton getDependencyButton() {
if (dependencyButton == null) {
dependencyButton = new JToggleButton("Dependency",new ImageIcon("resources/images/dependency.png"));
dependencyButton.setToolTipText("Dependency");
group.add(dependencyButton);
dependencyButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setSelectedButton(DEPENDENCY);
}
});
}
return dependencyButton;
}
COM: <s> this method initializes dependency button </s>
|
funcom_train/19028749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTemplate(File templateFile) {
try {
this.m_logfileTemplate = new LogfileTemplate(templateFile);
FastVector fields = new FastVector();
for (String fieldName : m_logfileTemplate.getFields()) {
fields.addElement(new Attribute(fieldName, (FastVector) null));
}
this.m_fields = fields;
} catch (IllegalArgumentException e) {
System.err.println(e);
}
}
COM: <s> loaads a web log template file in wumprep template format </s>
|
funcom_train/44867781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getButtonPanel() {
if (buttonPanel == null) {
buttonPanel = new JPanel();
buttonPanel.add(getOkButton(), null);
buttonPanel.add(getSaveButton(), null);
buttonPanel.add(getYesButton(), null);
buttonPanel.add(getNoButton(), null);
buttonPanel.setVisible(true);
buttonPanel.add(getCancelButton(), null);
}
return buttonPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/51056032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TextBox getNodeName() {
if (nodeName == null) {
nodeName = new TextBox();
nodeName.setBounds(10, 42, 582, 22);
nodeName.setWidthLabel(100);
nodeName.setLabel("Node Name"); //$NON-NLS-1$
nodeName.setEditable(false);
nodeName.setName("NodeName");
nodeName.setText("");
}
return nodeName;
}
COM: <s> this method initializes casella testo </s>
|
funcom_train/40866438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SyndFeed createSyndFeed(SyndicationFeed feed) {
SyndFeed syndFeed = new SyndFeedImpl();
List entries = feed.getEntries();
syndFeed.setLink(feed.getLink());
syndFeed.setTitle(feed.getTitle());
syndFeed.setUri(createUri(feed, null));
for(int i = 0; i < entries.size(); i++) {
syndFeed.getEntries().add(createSyndFeedEntry(feed, (SyndicationFeedEntry) entries.get(i)));
}
return syndFeed;
}
COM: <s> creates a rome syndication feed from the given syndication feed bean </s>
|
funcom_train/25231736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSettings( GlobalPreferences l_globalSettings, SyncSettings l_syncSettings ) {
this.syncSettings = l_syncSettings;
this.globalSettings = l_globalSettings;
for ( SyncSettingsPanel prefsPanel: prefsPanels ) {
prefsPanel.loadPrefs( this.globalSettings, l_syncSettings );
}
}
COM: <s> set the settings shown in the form </s>
|
funcom_train/8074362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int clusterProcessedInstance(Instance instance) {
double minDist = Double.MAX_VALUE;
int bestCluster = 0;
for (int i = 0; i < m_NumClusters; i++) {
double dist = distance(instance, m_ClusterCentroids.instance(i));
if (dist < minDist) {
minDist = dist;
bestCluster = i;
}
}
return bestCluster;
}
COM: <s> clusters an instance that has been through the filters </s>
|
funcom_train/1650285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void finishOpennetNoRelay() throws NotConnectedException {
OpennetManager om = node.getOpennet();
if(om != null && (source.isOpennet() || node.passOpennetRefsThroughDarknet()) &&
finishOpennetNoRelayInner(om)) {
applyByteCounts();
unregisterRequestHandlerWithNode();
return;
}
// Otherwise just ack it.
Message msg = DMT.createFNPOpennetCompletedAck(uid);
sendTerminal(msg);
}
COM: <s> there is no noderef to pass downstream </s>
|
funcom_train/1589347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Period plusSeconds(int seconds) {
if (seconds == 0) {
return this;
}
int[] values = getValues(); // cloned
getPeriodType().addIndexedField(this, PeriodType.SECOND_INDEX, values, seconds);
return new Period(values, getPeriodType());
}
COM: <s> returns a new period plus the specified number of seconds added </s>
|
funcom_train/18436953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDataItem2() {
TimeSeries series = new TimeSeries("S");
assertNull(series.getDataItem(new Year(2006)));
// try a null argument
boolean pass = false;
try {
/* TimeSeriesDataItem item = */ series.getDataItem(null);
}
catch (IllegalArgumentException e) {
pass = true;
}
assertTrue(pass);
}
COM: <s> some checks for the get data item regular time period method </s>
|
funcom_train/9860945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public T getNextToken() throws UnexpectedTokenException {
if (aBuffer.size() > 0) {
if (aPeekPos > 0) {
aPeekPos--; /*
* Remove one from the peeking position, but not from start
*/
}
return aBuffer.removeFirst().getElem3();
}
return readNextToken();
}
COM: <s> get the next token of this type from the stream </s>
|
funcom_train/5551276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long binomialCoefficient(int n, int k) {
if ((n == k) || (k == 0)) {
return 1;
}
if ((k == 1) || (k == n - 1)) {
return n;
}
return binomialCoefficient(n - 1, k - 1) +
binomialCoefficient(n - 1, k);
}
COM: <s> exact recursive implementation to test against </s>
|
funcom_train/3116781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Style getStyle(final DeviceType deviceType) {
deviceType.verifyTypeIsNotAll();
DamaskUtils.checkValidArgument(
isVisibleToDeviceType(deviceType),
this + " supports " + getDeviceType() + ", not " + deviceType);
final Style style = (Style)styles.get(deviceType);
return style;
}
COM: <s> returns the style of this control for the specified device type </s>
|
funcom_train/50813120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLayoutComponent( Component comp ) {
super.removeLayoutComponent( comp ) ;
if( comp.getParent() == container ) {
ListIterator it = componentsByName.listIterator() ;
while( it.hasNext() ) {
ComponentEntry entry = ( ComponentEntry ) it.next() ;
if( entry.getComponent() == comp ) {
it.remove() ;
}
}
}
}
COM: <s> does not implement update of tt shown tt component </s>
|
funcom_train/48441418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean inFreeSpace(final Vector2D pos, final ImmutableSpacewarState state) {
for (final ImmutableObstacle obstacle : state.getObstacles()) {
final Vector2D shortdist = state.findShortestDistance(pos, obstacle
.getPosition());
final double magnitude = shortdist.getMagnitude();
if (magnitude < (obstacle.getRadius() + fudge_factor)) {
return false;
}
}
return true;
}
COM: <s> ensures that the specified point is not inside an obstacle </s>
|
funcom_train/25569118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private void readSiteData(Scanner sc) {
// System.out.println("In readConfigHeader");
// System.out.println("**********************Reading Configuration Headers");
// for(int i = 0; i<7; i++){
// siteDataList.add(sc.next());
// }
// System.out.println(siteDataList);
// }
COM: <s> reads the site data contained in the first seven values of the csv </s>
|
funcom_train/48889765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startLogging(Task task, String comment, long alertInterval) {
if (logTimeTask != null)
throw new IllegalStateException("Already logging time");
this.currentTask = task;
this.comment = comment;
this.logTimeTask = createLogTimeTask();
this.schedule(logTimeTask, ABOUT_MINUTE, ABOUT_MINUTE);
this.statusAlertTask = createStatusAlertTask();
this.schedule(statusAlertTask, alertInterval);
}
COM: <s> set current state to be logging time true or not logging time false </s>
|
funcom_train/4231018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doLayout() {
super.doLayout();
// substract 2 pixels that were added to the preferred size of
// the container for the border.
Dimension cSize = getSize();
Dimension dim = editingComponent.getSize();
editingComponent.setSize(dim.width - 2, dim.height);
// reset container's size based on a potentially new preferred
// size of a real editor.
setSize(cSize.width, getPreferredSize().height);
}
COM: <s> performs the layout of the components in the container </s>
|
funcom_train/35863721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setTimeToLiveWithCheckForNeverExpires(long timeToLiveSeconds) {
//0 means eternal
if (timeToLiveSeconds == 0 || timeToLiveSeconds > ONE_YEAR_IN_SECONDS) {
this.timeToLiveSeconds = ONE_YEAR_IN_SECONDS;
} else {
this.timeToLiveSeconds = timeToLiveSeconds;
}
}
COM: <s> see http www </s>
|
funcom_train/48051649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LocalDate toLocalDate() {
if (get(YEAR) > gregorianCutoverYear && getClass() == GregorianCalendar.class) {
return LocalDate.of(get(YEAR), get(MONTH) + 1, get(DATE));
}
return toOffsetDateTime().toLocalDate();
}
COM: <s> converts this object to a code local date code </s>
|
funcom_train/45018420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNXvelocitySelectorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NXinstrument_nXvelocitySelector_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NXinstrument_nXvelocitySelector_feature", "_UI_NXinstrument_type"),
NexusPackageImpl.Literals.NXINSTRUMENT__NXVELOCITY_SELECTOR,
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the nxvelocity selector feature </s>
|
funcom_train/34117147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copy(PersonIdentity pi) {
firstName = pi.getFirstName();
middleName = pi.getMiddleName();
lastName = pi.getLastName();
beginDate = pi.getBeginDate();
endDate = pi.getEndDate();
birthDate = pi.getBirthDate();
isDefault = pi.isDefault();
organization = pi.getOrganization();
serialNumber = pi.getSerialNumber();
documentNumber = pi.getDocumentNumber();
}
COM: <s> copy person identity attributes </s>
|
funcom_train/18037207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void element(String name, String text) throws SAXException {
target.startElement("", name, name, new AttributesImpl());
target.characters(text.toCharArray(), 0, text.length());
target.endElement("", name, name);
}
COM: <s> create three events a start element a characters an end </s>
|
funcom_train/11688400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRecursiveImports2() throws Exception {
ProxyService testService = new ProxyService("mytest");
SynapseConfiguration synCfg = new SynapseConfiguration();
AxisConfiguration axisCfg = new AxisConfiguration();
testService.setWsdlURI(getClass().getResource("SimpleStockService.wsdl").toURI());
testService.buildAxisService(synCfg, axisCfg);
}
COM: <s> test a proxy service with recursive imports and without a </s>
|
funcom_train/40729261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSelectionIndex() {
checkWidget();
if (!cellSelectionEnabled) {
if (selectedItems.size() == 0) {
return -1;
}
return items.indexOf(selectedItems.get(0));
} else {
if (selectedCells.size() == 0)
return -1;
return ((Point) selectedCells.get(0)).y;
}
}
COM: <s> returns the zero relative index of the item which is currently selected </s>
|
funcom_train/31929240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void memoryWriteString(int address, String data) {
Memory m = src.getProcessSpace().memory;
if (data != null) {
for (int i = 0; i < data.length(); i++) {
m.store8(address + i, (byte) data.charAt(i));
}
m.store8(address + data.length(), (byte) 0);
}
}
COM: <s> store an asciiz string to the memory of the system call generator </s>
|
funcom_train/28756974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setResiduescalled(Long newVal) {
if ((newVal != null && this.residuescalled != null && (newVal.compareTo(this.residuescalled) == 0)) ||
(newVal == null && this.residuescalled == null && residuescalled_is_initialized)) {
return;
}
this.residuescalled = newVal;
residuescalled_is_modified = true;
residuescalled_is_initialized = true;
}
COM: <s> setter method for residuescalled </s>
|
funcom_train/39964987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(String message) {
if (connection != null &&
connection.isOpen() &&
state == PlayerState.ONLINE) {
try {
connection.send(message);
} catch (IOException e) {
System.err.println(
"*** ERROR: I/O error while sending message: "
+ e.getMessage());
}
}
}
COM: <s> sends a message to the client </s>
|
funcom_train/44288397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetCategories() {
if (selectionCategory != null) {
for (int i = 0; i < actionBar.getComponentCount(); i++) {
Object component = actionBar.getComponentAtIndex(i);
if (component.getClass().toString().indexOf("ToggleButtonCategory") >=
0)
((ToggleButtonCategory)component).reset();
}
}
}
COM: <s> selects or de select the buttons in the tools bar </s>
|
funcom_train/3272891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Stance readStance() throws IOException, MultiplayerException {
// Populate a Ship StanceChange
Stance stance = null;
String stanceTag = peek().value;
// Read runtime type-specific data
if(stanceTag.equals(HoldFast.ELEMENT_NAME)){
stance = new HoldFast(this);
}
else if(stanceTag.equals(Timid.ELEMENT_NAME)){
stance = new Timid(this);
}
else if(stanceTag.equals(ShootOnSight.ELEMENT_NAME)){
stance = new ShootOnSight(this);
}
else if(stanceTag.equals(ReturnFire.ELEMENT_NAME)){
stance = new ReturnFire(this);
}
return stance;
}
COM: <s> read a ship stance change from the stream </s>
|
funcom_train/29829683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireMessageError(Message msg) {
for (Enumeration e = msgListeners.elements(); e.hasMoreElements(); ) {
BSMessageListener listener = (BSMessageListener) e.nextElement();
/*listener.messageError(msg.getFromAddress(),
msg.getErrorCode(), msg.getErrorText());*/
listener.messageError(msg);
}
}
COM: <s> notifies message listeners that a message to </s>
|
funcom_train/26393235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SuperString append(String str) {
String tmp = str;
if (str == null) {
tmp = String.valueOf(str);
}
int len = tmp.length();
ensureCapacity(count + len);
copyWhenShared();
tmp.getChars(0, len, value, count);
count += len;
return this;
}
COM: <s> appends the string to this string buffer </s>
|
funcom_train/2812634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawSuppLeftGuard(ClassicBarcodeLogicHandler logic) {
//draw guard bars 1011
logic.startBarGroup(BarGroup.UPC_EAN_GUARD, null);
logic.addBar(true, 1);
logic.addBar(false, 1);
logic.addBar(true, 2);
logic.endBarGroup();
}
COM: <s> generates a left guard for a supplemental </s>
|
funcom_train/27844924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBlankConstructor() {
_label = new SLabel();
_label.setTextPointer(PointerFactory.getPointer("stringProperty"));
_controller.setView(_label);
_controller.startup();
assertEquals(_model.getStringProperty(), _label.getText());
assertNull(_label.getIcon());
assertEquals(SwingConstants.LEADING, _label.getHorizontalAlignment());
}
COM: <s> test blank constructor </s>
|
funcom_train/23782318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void eatWhite() {
while(currChar >= 0) {
if (Character.isWhitespace((char)currChar)) {
readChar() ;
}
else if (currChar == '/') {
int nxt = peek() ;
if (nxt == '*') {
readChar() ;
readChar() ;
readBlockComment();
}
else if (nxt == '/') {
readChar() ;
readChar() ;
readLineComment();
}
else {
return ;
}
}
else {
return ;
}
}
}
COM: <s> eats characters until non white space is found </s>
|
funcom_train/41301653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInside(int x, int y) {
if (selectable) {
if ((x > this.x && x < (this.x + this.w)) &&
(y > this.y && y < (this.y + this.h))) {
return true;
}
}
return false;
}
COM: <s> test for pointer click if is inside object </s>
|
funcom_train/17117892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkExtension(File file) {
String extension = org.setupx.repository.core.util.File.getExtension(file);
// compare them
if (extension.compareTo(this.validExtension) == 0) {
CoreObject.debug(this, "found modified file: " + file.getName());
return true;
} else {
return false;
}
}
COM: <s> checks a file if its extension is valid </s>
|
funcom_train/6266667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessage(SIPMessage sipMessage) throws IOException {
byte[] msg = sipMessage.encodeAsBytes();
long time = System.currentTimeMillis();
this.sendMessage(msg, sipMessage instanceof SIPRequest);
if (this.sipStack.serverLog.needsLogging(ServerLog.TRACE_MESSAGES))
logMessage(sipMessage, peerAddress, peerPort, time);
}
COM: <s> return a formatted message to the client </s>
|
funcom_train/49200573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addModulePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_OverviewModuleLink_module_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_OverviewModuleLink_module_feature", "_UI_OverviewModuleLink_type"),
TransformedPackage.Literals.OVERVIEW_MODULE_LINK__MODULE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the module feature </s>
|
funcom_train/549978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNumberImage(String name) {
INumberImage image;
try {
image = (INumberImage) entities.add(name);
addAttribute(image);
} catch (ConnectionException e) {
status.status("AttributeTableModel.addNumberImage: Cannot load attribute " + name, e);
}
}
COM: <s> adds a number image attribute in the table </s>
|
funcom_train/22031029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isThisType(String name) {
return name.startsWith("AREA") ||
name.endsWith("area") ||
( name.startsWith("adde://") &&
( name.indexOf("/image?") > 0 ||
name.indexOf("/imageda") > 0) );
}
COM: <s> determine the file type by name </s>
|
funcom_train/19721592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void init(String file, java.util.Properties properties) {
_init(file);
if (properties != null) {
for (Enumeration enu = properties.propertyNames(); enu.hasMoreElements();) {
String key = (String)enu.nextElement();
if (mProperties.containsKey(key)) {
mProperties.put(key, properties.getProperty(key));
}
}
}
store();
}
COM: <s> initializes the properties with the given property file and properties </s>
|
funcom_train/19094759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setState(E newState) {
stateLock.writeLock().lock();
try {
// if the new state matches the existing state, don't update
// Note: also do not check waiting threads, no change happened
if (compareStates(state, newState)) {
return false;
}
state = newState;
} finally {
stateLock.writeLock().unlock();
}
// Note: this code executes only if a state change has occurred
updateWaitingThreads(newState);
return true;
}
COM: <s> sets a new state value if it is different from the current value </s>
|
funcom_train/13689913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getFaqButton() {
if (faqButton == null) {
faqButton = new JButton();
faqButton.setText( Helper.getMessage("general.btnFAQ") );
faqButton.setPreferredSize(new java.awt.Dimension(120,26));
faqButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
// FAQDialog faqd = new FAQDialog(mf);
// faqd.setVisible(true);
Helper.notImplementedBox();
}
});
}
return faqButton;
}
COM: <s> this method initializes faq button </s>
|
funcom_train/28269000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTentacle(GraphElement tentacle, RoleList roles) {
StringBuffer sb = new StringBuffer();
boolean firstSkipped = false;
tentacles.put(tentacle, roles);
for (Iterator<Role> it = roles.getRoleList().iterator(); it.hasNext(); ) {
if (firstSkipped) sb.append(", ");
firstSkipped = true;
sb.append(it.next().getName());
}
}
COM: <s> add a tentacle with according roles </s>
|
funcom_train/16467115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int lineNumberWidth() {
//
// note: should this be changed to use all nines for the lineCount?
// for example, if the number of rows is 111...999 could be wider
// (in pixels) in a proportionally spaced font...
//
int lineCount = Math.max(getRows(), getLineCount() + 1);
return getFontMetrics(getFont()).stringWidth(lineCount + " ");
}
COM: <s> returns the width in pixels of the maximum line number plus a trailing </s>
|
funcom_train/50113737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void close() {
this.setVisible(false); // Hide the window
this.dispose(); // Destroy the window
synchronized (WebBrowser.class) { // Synchronize for thread-safety
WebBrowser.numBrowserWindows--; // There is one window fewer now
}
MainMenuFrame.releaseFocus();
}
COM: <s> close this browser window </s>
|
funcom_train/23824966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle rectangleFromZoomedRectangle(Rectangle rect) {
Rectangle convertedRect = new Rectangle(rect);
convertedRect.x = (int) (convertedRect.x * (100.0 / zoomLevel));
convertedRect.y = (int) (convertedRect.y * (100.0 / zoomLevel));
convertedRect.width = (int) (convertedRect.width * (100.0 / zoomLevel));
convertedRect.height = (int) (convertedRect.height * (100.0 / zoomLevel));
return convertedRect;
}
COM: <s> converts a code rectangle code from a zoomed code rectangle code </s>
|
funcom_train/35195316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DoubleArray without(final int i) {
final double[] newArr = new double[doubles.length - 1];
System.arraycopy(doubles, 0, newArr, 0, i);
System.arraycopy(doubles, i + 1, newArr, i, newArr.length - i);
return new DoubleArray(newArr);
}
COM: <s> return a new code double array code that contains the same elements </s>
|
funcom_train/36202623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getClassName() {
String className = "";
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
for (int i = 2; i < stackTrace.length; i++) {
if (!stackTrace[i].getClassName().equals(
"de.d3web.we.logging.Logging")) {
className = stackTrace[i].getClassName();
break;
}
}
return className;
}
COM: <s> returns the name of the current class via stack trace </s>
|
funcom_train/1443282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(AuralInfo info) {
if (info != null) {
// Remove the last element if the CoachVisualInfo history is full
if (DAInamiteConstants.FB_HIST_SIZE_C <= this.auralHistory.size())
this.auralHistory.remove(this.auralHistory.lastElement());
// Backup old CoachVisualInfo
this.auralHistory.add(0, this.currentAinfo);
// Update current CoachVisualInfo
this.currentAinfo = info;
}
}
COM: <s> code update code updates the factbase after the arrival of an </s>
|
funcom_train/37021945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setKey(final String key) throws ESyspropsException {
if (key == null) {
throw new NullPointerException("key"); //$NON-NLS-1$
}
if (!validateString(key, PrefConstants.CUSTOM_KEY_ILLEGAL_CHARS)) {
throw new ESyspropsException(ESyspropsExceptionType.ILLEGAL_CHARS_IN_KEY);
}
if (key.length() == 0) {
throw new ESyspropsException(ESyspropsExceptionType.ILLEGAL_CHARS_IN_KEY);
}
this.key = key;
}
COM: <s> setter for key </s>
|
funcom_train/11728160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testChildAxisTestRoot() throws RepositoryException, NotExecutableException {
String sql = getStatement(testRoot + "/%");
sql += " AND NOT " + jcrPath + " LIKE '" + testRoot + "/%/%'";
Node[] nodes = toArray(testRootNode.getNodes());
executeSqlQuery(session, sql, nodes);
}
COM: <s> tests if lt somepath and not lt somepath returns the child </s>
|
funcom_train/28965003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLBuffer terminatingElement(String name) {
if (insideElement || (completeXMLDocument && nestingLevel == 0)) {
error("</" + name + ">");
}
buffer.append("</").append(name).append(">");
nestingLevel--;
return this;
}
COM: <s> emit a terminating xml element that is name </s>
|
funcom_train/7619419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseHeader(String header) {
if (HttpLog.LOGV) {
HttpLog.v("HttpAuthHeader.parseHeader(): header: " + header);
}
if (header != null) {
String parameters = parseScheme(header);
if (parameters != null) {
// if we have a supported scheme
if (mScheme != UNKNOWN) {
parseParameters(parameters);
}
}
}
}
COM: <s> parses the header scheme name and then scheme parameters if </s>
|
funcom_train/14463897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void autoFit() {
CellHandle[] cxt = this.getCells();
for(int t=0;t<cxt.length;t++) {
String cstr = cxt[t].getStringVal();
int strlen = cstr.length();
int csz = strlen *= cxt[t].getFontSize();
int factor= 28; // KSC: was 50 + added factor to guard below
if((csz*factor)>lastsz)
this.setWidth(csz*factor);
}
}
COM: <s> resize this column to fit the width of all displayed non wrapped text </s>
|
funcom_train/10926244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static private WordInfo getWordInfo(String word) {
WordInfo ret = new WordInfo();
for (String delim : DELIMITERS_WORDS) {
if (word.endsWith(delim)) {
ret.len = word.length() - delim.length();
ret.delim = delim;
return ret;
}
}
ret.len = word.length();
ret.delim = "";
return ret;
}
COM: <s> gets info about a word used as part of the lorem ipsum algorithm </s>
|
funcom_train/4557763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPublicMagnetCheckSearchIcon() {
repEng.newStep("272", "Publish Magnet main page-Check the search icon");
//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 Serch icon.
// There will popup search window.
}
COM: <s> 272 publish magnet main page check the search icon </s>
|
funcom_train/12649676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassLoader getContextClassLoader() {
if (contextClassLoader == null)
return null;
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
ClassLoader ccl = ClassLoader.getCallerClassLoader();
if (ccl != null && ccl != contextClassLoader &&
!contextClassLoader.isAncestor(ccl)) {
sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
}
}
return contextClassLoader;
}
COM: <s> returns the context class loader for this thread </s>
|
funcom_train/45773752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPropertyValues(com.sun.star.beans.PropertyValue[] propertyValue) throws com.sun.star.beans.UnknownPropertyException, com.sun.star.beans.PropertyVetoException, com.sun.star.lang.IllegalArgumentException, com.sun.star.lang.WrappedTargetException {
m_executePropertiesMethod.setPropertyValues(propertyValue);
}
COM: <s> set properties for the tutorial executor </s>
|
funcom_train/10655157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkPositionOffsets(final int[] offsets) {
Position p;
List<?> list = GapContentTest.getPositionList(content);
for (int i = 0; i < offsets.length; i++) {
p = (Position) list.get(i);
assertEquals(offsets[i], p.getOffset());
}
}
COM: <s> checks that position offsets are the same as expected </s>
|
funcom_train/11696562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createVerticalSpacer(Composite comp, int colSpan) {
Label label = new Label(comp, SWT.NONE);
GridData gd = new GridData();
gd.horizontalSpan = colSpan;
label.setLayoutData(gd);
label.setFont(comp.getFont());
}
COM: <s> create some empty space </s>
|
funcom_train/10517494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testJasperNameManglerSelection() {
JspCompilerAdapter adapter=
JspCompilerAdapterFactory.getCompiler("jasper", null,null);
JspMangler mangler=adapter.createMangler();
assertTrue(mangler instanceof JspNameMangler);
adapter= JspCompilerAdapterFactory.getCompiler("jasper41", null, null);
mangler = adapter.createMangler();
assertTrue(mangler instanceof Jasper41Mangler);
}
COM: <s> verify that we select the appropriate mangler </s>
|
funcom_train/15627360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean doCreateImage(final boolean performAction) {
final MapView<G, A, R> mapView = currentMapView;
if (mapView == null) {
return false;
}
if (performAction) {
final MapModel<G, A, R> mapModel = mapView.getMapControl().getMapModel();
imageCreator2.createImage(mapModel, mainView);
}
return true;
}
COM: <s> executes the create image action </s>
|
funcom_train/4231358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void randomize(Collection vertices, int maxx, int maxy) {
Random random = new Random();
Iterator it = vertices.iterator();
while (it.hasNext()) {
if (maxx > 0 && maxy > 0) {
int x = random.nextInt(maxx);
int y = random.nextInt(maxy);
setLocation(it.next(), x, y);
}
}
}
COM: <s> moves the specified vertices to random locations in the x and y axes </s>
|
funcom_train/37863929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object other) {
if (!(other instanceof NodeProxy))
//Always different...
return false;
NodeProxy otherNode = (NodeProxy) other;
if (otherNode.doc.getDocId() != doc.getDocId())
return false;
return otherNode.nodeId.equals(nodeId);
}
COM: <s> the method code equals code </s>
|
funcom_train/9439019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayClassZeroMessage(Context context, SmsMessage sms) {
// Using NEW_TASK here is necessary because we're calling
// startActivity from outside an activity.
Intent smsDialogIntent = new Intent(context, ClassZeroActivity.class)
.putExtra("pdu", sms.getPdu())
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
context.startActivity(smsDialogIntent);
}
COM: <s> displays a class zero message immediately in a pop up window </s>
|
funcom_train/7673962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isDefinitionMoveParam(int reg) {
SsaInsn defInsn = ssaMeth.getDefinitionForRegister(reg);
if (defInsn instanceof NormalSsaInsn) {
NormalSsaInsn ndefInsn = (NormalSsaInsn) defInsn;
return ndefInsn.getOpcode().getOpcode() == RegOps.MOVE_PARAM;
}
return false;
}
COM: <s> returns true if the definition site of this register is a </s>
|
funcom_train/34061220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyCollision(Body body1, Body body2, Vector point, Vector normal, float depth) {
if (listeners.size() == 0) {
return;
}
CollisionEvent event = new CollisionEvent(totalTime,body1,body2,point,normal,depth);
for (int i=0;i<listeners.size();i++) {
listeners.get(i).collisionOccured(event);
}
}
COM: <s> notify listeners of a collision </s>
|
funcom_train/20363798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(int value) {
if ( value<MINIMUM_VALUE ) {
throw new IllegalArgumentException("New value is less than minimum weighting value.");
}
if ( value>MAXIMUM_VALUE ) {
throw new IllegalArgumentException("New value is greater than maximum weighting value.");
}
int oldValue = this.value;
this.value = value;
propertyChangeSupport.firePropertyChange(Properties.VALUE, oldValue, this.value);
}
COM: <s> set the value </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.