__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/28263274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TabPanel getTabPanel(String groupName) {
int groupCount = chatTabPane.getTabCount();
int i = 0;
for(i=0; i<groupCount; i++) {
if(chatTabPane.getTitleAt(i).equals(groupName)) {
return (TabPanel)(chatTabPane.getComponentAt(i));
}
}
return null;
}
COM: <s> get the tab panel of a group </s>
|
funcom_train/7971840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCardPane(JPanel panel) {
currentCardView = null;
cardPanel.removeAll();
GridBagConstraints c = new GridBagConstraints();
c.weightx = 1;
c.weighty = 1;
c.fill = GridBagConstraints.BOTH;
cardPanel.add( panel, c );
if (previewPanel != null)
previewPanel.clear();
validate();
repaint();
}
COM: <s> sets the card pane to a generic panel </s>
|
funcom_train/35212776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cleanup(Element e, int level) throws ParseException {
NodeList c = e.getChildNodes();
for (int i = 0; i < c.getLength(); i++) {
if (c.item(i).getNodeType() == Node.ELEMENT_NODE) {
Element t = (Element) c.item(i);
if (Utility.isInvalidElement(t)) {
e.removeChild(c.item(i));
} else {
cleanup(t, level + 1);
}
}
}
}
COM: <s> remove some tags that will obviously not contains the main body </s>
|
funcom_train/22019611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getDirectGroupsOfUser(CmsDbContext dbc, String username) throws CmsException {
CmsUser user = readUser(dbc, username);
return m_userDriver.readGroupsOfUser(dbc, user.getId(), dbc.getRequestContext().getRemoteAddress());
}
COM: <s> returns the list of groups to which the user directly belongs to </s>
|
funcom_train/47824839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleBrowse() {
FileDialog dialog = new FileDialog(shell, SWT.OPEN);
File currentFile = new File(customerSlatFileText.getText());
if (currentFile.isFile()) {
dialog.setFilterPath(currentFile.getParent());
} else {
dialog.setFilterPath(getDefaultDir());
}
String dialogResult = dialog.open();
if (dialogResult != null)
customerSlatFileText.setText(dialogResult);
}
COM: <s> lets the user select the input file </s>
|
funcom_train/4122128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: interface NetworkRequestHandler {
/**
* Handle a request represented by an {@link Element} and return another
* {@link Element} or null as the answer.
*
* @param connection The message's <code>Connection</code>.
* @param element The root element of the message.
* @return reply element, may be null.
*/
Element handle(Connection connection, Element element);
}
COM: <s> a network request handler knows how to handle in a given request type </s>
|
funcom_train/12269297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tree run(List<FastaOrigin> sortedList, Integer maxVal){
String fillString = "aaaaa";
byte[] matrix = PrintFactory.instance().printTreeMatrix(sortedList,maxVal,fillString);
List<String> idList = new ArrayList<String>();
for(FastaOrigin o : sortedList){
idList.add(o.getId());
}
return this.run(idList,matrix,fillString);
}
COM: <s> creates a tree out of a list of fasta origins </s>
|
funcom_train/2558580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insert(String segment) {
int index = segment.indexOf(':');
String prefix = null;
if(index > 0) {
prefix = segment.substring(0, index);
segment = segment.substring(index+1);
}
prefixes.add(prefix);
names.add(segment);
}
COM: <s> this will insert the path segment provided </s>
|
funcom_train/7272174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasDataChanged() {
final int count = getTabCount();
for(int i = 0; i < count; i++) {
Component tab = getComponentAt(i);
if (tab instanceof AbstractMetaEditorPanel) {
AbstractMetaEditorPanel editor = (AbstractMetaEditorPanel) tab;
if(editor.checkInput())
return true;
}
//any other tab should check input here
}
return false;
}
COM: <s> checks input values to see if theyve been edited </s>
|
funcom_train/50465104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void uninstallGlassPane() {
//hide the glass pane
if (glassPane != null) {
glassPane.setVisible(false);
getOwnerRootPane().getLayeredPane().remove(glassPane);
}
//show the original glass pane
if (showOriginalGlassPane) {
if(getOwnerGlassPane() != null) {
getOwnerGlassPane().setVisible(showOriginalGlassPane);
}
}
}
COM: <s> uninstall the glass pane the sheet is placed on </s>
|
funcom_train/2291680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPropertyDefaults(String enabled, String showNavigation) {
setPropertiesEnabled(Boolean.valueOf(enabled).booleanValue());
setShowNavigation(Boolean.valueOf(showNavigation).booleanValue());
if (LOG.isDebugEnabled()) {
LOG.debug(Messages.get().getBundle().key(Messages.LOG_SET_PROP_DEFAULTS_2, enabled, showNavigation));
}
}
COM: <s> sets the default settings for the property display dialog </s>
|
funcom_train/14227814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AudioFormat getAudioFormat() throws IOException {
if (audioFormat == null) {
final URL url = getURL();
try {
audioFormat = JavaSoundParser.parse(url);
} catch (URISyntaxException e) {
throw new IOException(e.getMessage());
}
}
return audioFormat;
}
COM: <s> given uri parameters constructs an audio format </s>
|
funcom_train/18216564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initCaseList() {
for (final Iterator<Case> it = cases.iterator(); it.hasNext();) {
caseList.add(it.next());
}
Collections.sort(caseList, new Comparator<CaseState>() {
public int compare(final CaseState c1, final CaseState c2) {
final Date ts1 = getCreationTimestamp(c1);
final Date ts2 = getCreationTimestamp(c2);
return ts1.compareTo(ts2);
}
});
}
COM: <s> initialized the sorted list of cases </s>
|
funcom_train/37017339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedIndex(final int index) {
selectedIndex = index;
if (cellRenderer != null) {
cellRenderer.setSelectedIndex(index);
final JList list = contentList;
if(list == null) {
return;
}
list.ensureIndexIsVisible(index);
list.setFixedCellWidth(0);
list.setFixedCellWidth(-1);
}
}
COM: <s> setter for selected list item </s>
|
funcom_train/4122431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerSellGoods(Goods goods) {
String goldKey = "tradeGold#" + goods.getType().getIndex() + "#" + goods.getAmount()
+ "#" + goods.getLocation().getId();
sessionRegister.put(goldKey, null);
}
COM: <s> called after another code player code sends a code trade code message </s>
|
funcom_train/21846286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g, Shape allocation) {
Rectangle clip = g.getClipBounds();
if (clip.height < 0 || clip.width < 0) {
return;
}
int paintAreas = getPaintAreas(g, clip.y, clip.height);
if (paintAreas != 0) {
paintAreas(g, clip.y, clip.height, paintAreas);
}
}
COM: <s> it divides painting into three areas insets top main area insets bottom </s>
|
funcom_train/47108062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemArmor20() {
JMenuItem menuItem = new JMenuItem();
menuItem.setText(Armor.A_20.getItemName());
menuItem.setEnabled(false);
menuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
controller.setPlrReadiedArmor(Armor.A_20);
}
});
return menuItem;
}
COM: <s> creates the twenty first choice for the armor menu </s>
|
funcom_train/31646165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean match(Message message) {
// Variables
Address[] recipients;
int index;
try {
// Get From List
recipients = message.getRecipients(type);
// Check From List
for (index = 0; index < recipients.length; index++) {
if (match(recipients[index]) == true) {
return true;
} // if
} // for
} catch (Exception e) {
} // try
// Return Result
return false;
} // match()
COM: <s> recipient address comparison match </s>
|
funcom_train/36949522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IRubyProject getRubyProject(IResource resource) {
switch (resource.getType()) {
case IResource.FOLDER:
return new RubyProject(((IFolder) resource).getProject(), this);
case IResource.FILE:
return new RubyProject(((IFile) resource).getProject(), this);
case IResource.PROJECT:
return new RubyProject((IProject) resource, this);
default:
throw new IllegalArgumentException(Messages.bind(Messages.element_invalidResourceForProject));
}
}
COM: <s> returns the active ruby project associated with the specified resource </s>
|
funcom_train/32191652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidName(String name) {
if (name == null)
return false;
int i = 0;
while (i < name.length()) {
if (!Character.isLetter(name.charAt(i)) && !(name.charAt(i) == ' ')
&& !(name.charAt(i) == '.'))
return false;
else
i++;
}
return true;
}
COM: <s> validates the inserted name </s>
|
funcom_train/27761271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddLocalProperty() {
try {
JavaBean jb = new JavaBean(Bean1.class);
jb.addProperty("property1");
BeanProperty bp = jb.getBeanProperty("property1");
assertTrue("Should never be null", bp != null);
} catch (BeanException e) {
fail(e.toString());
}
}
COM: <s> tests the adding of a local property to the java bean </s>
|
funcom_train/7852318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean needsEscape( char ch) {
if (
(ch == ',') ||
(ch == '+') ||
(ch == '\"') ||
(ch == ';') ||
(ch == '<') ||
(ch == '>') ||
(ch == '\\'))
return true;
else
return false;
}
COM: <s> checks a character to see if it must always be escaped in the </s>
|
funcom_train/39378836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeToGZip(byte b[], int off, int len) throws IOException {
if (gzipstream == null) {
response.addHeader("Content-Encoding", "gzip");
gzipstream = new GZIPOutputStream(output);
}
gzipstream.write(b, off, len);
}
COM: <s> writes array of bytes to the compressed output stream </s>
|
funcom_train/236019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AGIProcessor getAGIProcessor(Class processorClass) {
if (example != null && example instanceof AGIReusableProcessor) {
return (AGIProcessor) ObjectPool.getInstance(processorClass);
}
AGIProcessor instance = null;
try {
log.fine("Creating New AGIProcessor Object");
instance = (AGIProcessor) processorClass.newInstance();
if (example == null)
example = instance;
} catch (Exception e) {
log.log(Level.SEVERE, "Error while instantiating processor: ", e);
}
return instance;
}
COM: <s> gets an agiprocessor instance </s>
|
funcom_train/21502395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNamespacePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NamedElement_namespace_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_namespace_feature", "_UI_NamedElement_type"),
TypeSystemPackage.Literals.NAMED_ELEMENT__NAMESPACE,
false,
false,
false,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the namespace feature </s>
|
funcom_train/28750816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReportgroupid(Long newVal) {
if ((newVal != null && this.reportgroupid != null && (newVal.compareTo(this.reportgroupid) == 0)) ||
(newVal == null && this.reportgroupid == null && reportgroupid_is_initialized)) {
return;
}
this.reportgroupid = newVal;
reportgroupid_is_modified = true;
reportgroupid_is_initialized = true;
}
COM: <s> setter method for reportgroupid </s>
|
funcom_train/4545039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void extract(String filename, String destination) {
try {
InputStream in = jar.getInputStream(jar.getEntry(filename));
OutputStream out = new FileOutputStream(destination + filename);
int c;
while ((c = in.read()) != -1) {
out.write(c);
}
in.close();
out.close();
} catch (Exception ex) {
}
}
COM: <s> extracts a file from a jar file and copies to a specified location </s>
|
funcom_train/29706622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getDateValue() throws IllegalArgumentException {
try {
return dateFormat.parse(this.keyValue);
} catch (ParseException ex) {
throw new IllegalArgumentException(String.format("Keyword %s[%s] could not be used to form a Date", this.keyName, this.keyValue));
}
}
COM: <s> get the keyword as a code date code object </s>
|
funcom_train/44221558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getTargetCaptureViewFromDB() {
ViewStateMachine vsm = this.get_plugin().get_vsm();
vsm.set_callbackObject(this);
ViewInstance vi = new ViewInstance(this.lightKcVi.get_definition());
vsm.set_lookupView(vi);
vsm.set_lookupIndex(this.lightKcVi.get_UIDString());
try {
vsm.runEvent(ViewStateMachine.GET_ISOLATED_VIEW_FROM_UID);
} catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> p run a query to get the target captured view instance from </s>
|
funcom_train/14311263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getSelectedItemIndex() {
int result = 0;
for (int i = 0; i < items.size(); i++) {
ConnectorCanvasItem item = (ConnectorCanvasItem) items.elementAt(i);
if (item.isSelectable()) {
System.out.println(result+" "+ item.getString());
if (i == itemSelected)
return result;
result++;
}
}
return -1;
}
COM: <s> returns the sequence number of currently selected item ignoring all </s>
|
funcom_train/23267853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetApellidoM() {
System.out.println("getApellidoM");
Cliente instance = new Cliente();
String expResult = "";
String result = instance.getApellidoM();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get apellido m method of class capa negocios </s>
|
funcom_train/20617701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteAvatar(String macAddress){
Connection con = db.iDisplayClientConnenction();
try {
PreparedStatement ps = con
.prepareStatement("UPDATE idisplayclientprofiles SET avatar = ? "
+ "WHERE macaddress = '" + macAddress + "'");
ps.setBinaryStream(1, null, 0);
ps.executeUpdate();
ps.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
COM: <s> deletes an user avatar from the database </s>
|
funcom_train/26256863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doActionUponNode(RwiNode node) {
logstart("doActionUponNode");
log("Node : ", node.getProperty(FULL_NAME));
log("Type : ", node.getProperty(SHAPE_TYPE));
if (RwiShapeType.CLASS.
equals(node.getProperty(SHAPE_TYPE))) {
// look only after persistent classes
if (node.hasProperty(Constants.PERSISTENT)) {
log("is persistent");
doActionUponClass(node);
} else {
log("is not persistent");
}
}
logend("doActionUponNode");
}
COM: <s> this method perfoms certain actions upon the rwi node representing </s>
|
funcom_train/42180520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File createApplicationFile() throws IOException {
File applicationFolder = getApplicationFolder();
// Create application folder if it doesn't exist
if (!applicationFolder.exists()
&& !applicationFolder.mkdirs()) {
throw new IOException("Couldn't create " + applicationFolder);
}
// Return a new file in application folder
return File.createTempFile(CONTENT_PREFIX, ".pref", applicationFolder);
}
COM: <s> returns a new file in user application folder </s>
|
funcom_train/35282673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPathSplineType(SplineType pathSplineType) {
spline.setType(pathSplineType);
if (debugNode != null) {
Node parent = debugNode.getParent();
debugNode.removeFromParent();
debugNode.detachAllChildren();
debugNode = null;
attachDebugNode(parent);
}
}
COM: <s> sets the type of spline used for the path interpolation for this path </s>
|
funcom_train/21801310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDocumentMetadata(Document doc, String firstName, String lastName) {
doc.addTitle(firstName + " " + lastName);
doc.addSubject("Data from the eID card");
doc.addCreator("Belgian eID applet");
doc.addProducer();
doc.addCreationDate();
}
COM: <s> set the metadata on the pdf document </s>
|
funcom_train/9998238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws ReportInputException {
super.close();
try {
if(resultSet != null ){
resultSet.close();
}
if(dbConnection != null && !dbConnection.isClosed()){
dbConnection.close();
}
} catch (SQLException e) {
throw new ReportInputException("SQL Error when closing Input ! See the cause !", e);
}
}
COM: <s> closes the input meaning the reading session its done </s>
|
funcom_train/16411771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showAccessibilityMenu(){
JPopupMenu popup = createAccessibilityMenu();
Point p = getPopupLocation(btnAccessibility,popup);
popup.setInvoker(btnAccessibility);
popup.setLocation(p);
popup.setVisible(true);
btnAccessibility.setState(ToolbarButton.STATE_ON);
popup.addPopupMenuListener(new PopupMenuListener(){
public void popupMenuCanceled(PopupMenuEvent e) {}
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
btnAccessibility.setState(ToolbarButton.STATE_OFF);
}
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {}
});
}
COM: <s> to show accessibility menu </s>
|
funcom_train/5954921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTrackBasePath() {
final StringBuffer sb = new StringBuffer();
for(PathNode prop : path.subList(0, path.size()-1)) { //remove the last one
sb.append(prop.origin);
}
return sb.charAt(0) == '.' ? sb.substring(1) : sb.toString();
}
COM: <s> returns the base path of this dot series path for tracking purpose </s>
|
funcom_train/7263623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTorrent(TOTorrent torrent) {
this.torrent = torrent;
try {
assetHash = torrent.getHashWrapper().toBase32String();
} catch (Exception e) {
}
setContentNetworkID(PlatformTorrentUtils.getContentNetworkID(torrent));
setDRM(torrent == null ? false : PlatformTorrentUtils.isContentDRM(torrent));
setIsPlatformContent(torrent == null ? false
: PlatformTorrentUtils.isContent(torrent, true));
}
COM: <s> not needed if you </s>
|
funcom_train/43369007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Folder getFolder(String id, Session session) throws FinderException {
if (id == null) {
throw new FinderException("Folder not found: null");
}
try {
Folder folder = (Folder) session.load(Folder.class, id);
logger.debug("found folder with id= " + id + " and name= "
+ folder.getName());
permissionsChecker.checkReadPermission(folder);
return folder;
} catch (HibernateException e) {
throw new FinderException("Folder not found: " + e.toString());
}
}
COM: <s> retrieves a folder by id </s>
|
funcom_train/22599099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkNodeInput() {
boolean nodeExists = getDBNetwork().checkNodeId(nodeField.getText());
if(nodeExists == false) {
nodeInputValid = false;
nodeField.setBorder(BorderFactory.createLineBorder(Color.red));
nodeInfo.setText("Invalid ID");
nodeInfo.setForeground(Color.red);
} else {
nodeInputValid = true;
nodeField.setBorder(BorderFactory.createLineBorder(Color.green));
nodeInfo.setText("");
}
checkOkEnabled();
}
COM: <s> this method checks if the node id selected exists </s>
|
funcom_train/26618937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isZipOrJarArchive(File file) {
boolean isArchive = true;
ZipFile zipFile = null;
try {
zipFile = new ZipFile(file);
} catch (ZipException zipCurrupted) {
isArchive = false;
} catch (IOException anyIOError) {
isArchive = false;
} finally {
if (zipFile != null) {
try {
zipFile.close();
} catch (IOException ignored) {}
}
}
return isArchive;
}
COM: <s> test if a file is a zip or jar archive </s>
|
funcom_train/40166264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void logout(Player player) {
StringBuilder sb = new StringBuilder(player.getUsername()).append('_').append(DestinationName.CHALLENGE);
try {
controller.removeDestination(session.createQueue(sb.toString()));
} catch (Exception ex) {
Logger.getLogger(LogoutHandler.class.getName()).log(Level.SEVERE, null, ex);
}
}
COM: <s> handles a player logging out by removing no longer needed destinations </s>
|
funcom_train/17805146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSourceRuntimeComponentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RuntimeConnection_sourceRuntimeComponent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RuntimeConnection_sourceRuntimeComponent_feature", "_UI_RuntimeConnection_type"),
CtbPackage.Literals.RUNTIME_CONNECTION__SOURCE_RUNTIME_COMPONENT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the source runtime component feature </s>
|
funcom_train/23549800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveTransientContents(EObject o) {
List<EObject> l = new ArrayList<EObject>(o.eContents());
for (int i = 0; i < l.size(); i++) {
EObject eo = l.get(i);
l.addAll(eo.eContents());
}
for (int i = l.size() - 1; i > 0; i--) {
EObject eo = l.get(i);
if (RepositoryUtils.getId(eo) <= 0) {
session.save(eo);
}
}
}
COM: <s> saves transient contents of the object </s>
|
funcom_train/40793423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand3() {
if (okCommand3 == null) {//GEN-END:|122-getter|0|122-preInit
// write pre-init user code here
okCommand3 = new Command("Ok", Command.OK, 0);//GEN-LINE:|122-getter|1|122-postInit
// write post-init user code here
}//GEN-BEGIN:|122-getter|2|
return okCommand3;
}
COM: <s> returns an initiliazed instance of ok command3 component </s>
|
funcom_train/21999047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getAdd_button() {
if (add_button == null) {
add_button = new JButton();
add_button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
selected_row = -1;
if (editor != null) {
return;
}
editMacro(new StoredMacro());
}
});
add_button.setText(Localization.getString("ADD"));
}
return add_button;
}
COM: <s> this method initializes the add button </s>
|
funcom_train/43395086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String generateZipEntry(String file){
//System.out.println("sourcefolderlength:"+SOURCE_FOLDER+" file.length():"
// +file.length());
//System.out.println("full filepath is : " + file);
return file.substring(SOURCE_FOLDER.length()+1, file.length());
}
COM: <s> format the file path for zip </s>
|
funcom_train/12596017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseClicked(MouseEvent e) {
// If button pressed is to create Server
if (e.getSource () == serverB){
ServerGui.main(new String[] {});
frame.dispose();
}
// If button pressed is to create a Client
if (e.getSource () == clientB){
ClientInputGui.main(new String[] {});
frame.dispose();
}
}
COM: <s> mouse clicked event occurs when the mouse if clicked on a listening object </s>
|
funcom_train/7867218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void okTriggered() {
for (int i = 0; i < iAgents.length; i++) {
Agent lAgent = iAgents[i];
// If the boolean was set to true, include in the list.
if (iValues[i]) {
iResult.add(lAgent);
}
}
cancelTriggered();
}
COM: <s> this method is called when the user attempts to connect </s>
|
funcom_train/31406647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteUnusedProtosegments() throws DatabaseException {
getDatabase().retrieveObjects(new RetrieveAllParameters() {
public String getRetrieveAllSQLKey() {
return "DELETE_UNUSED_PROTOSEGMENTS";
}
public void setRetrieveAllParameters(PreparedStatement stmt)
throws SQLException {
stmt.setLong(1, getID());
}
public Object createObject(Database db, ResultSet rs) throws SQLException {
return null;
}
});
}
COM: <s> delete this views unused protosegments except pro and res </s>
|
funcom_train/9531564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean equalsWithSpaceUnderscore(String abbrev,String s) {
if (abbrev==null || s==null) return false;
if (abbrev.equalsIgnoreCase(s)) return true;
String underForSpace = s.replace(' ','_');
return abbrev.equalsIgnoreCase(underForSpace);
}
COM: <s> returns true if strings equal or if strings equal after replacing space with </s>
|
funcom_train/1644553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void executeWait(final List<Callable<Void>> tasks, final ExecutorService executor) {
try {
for (Future<Void> f : executor.invokeAll(tasks)) {
f.get();
}
} catch (ExecutionException e) {
String msg = "Execution exception - while awaiting completion of matrix multiplication.";
throw new RuntimeException(msg, e);
} catch (final InterruptedException e) {
String msg = "Interrupted - while awaiting completion of matrix multiplication.";
throw new RuntimeException(msg, e);
}
}
COM: <s> submit a number of tasks and wait for completion </s>
|
funcom_train/28687152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidTag(String ipx_string) {
//add test here for "aa" header
if (ipx_string.length() > 35) {
if (ipx_string.charAt(0) == 'a') {
if (ipx_string.charAt(1) == 'a') {
return isValidIrspString(ipx_string);
}
}
}
return false;
}
COM: <s> check is string is min lenght of an ipx tag i </s>
|
funcom_train/22024255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector3 convertGlobalFrameToFrame2(Vector3 relative, Vector3 passback) {
passback.setZero();
if (getBody(1) != null) {
tmpVa.setZero();
getBody(1).getRotation().transposeMul(relative, tmpVa);
t2.transposeMul(tmpVa, passback);
} else {
t2.transposeMul(relative, passback);
}
return passback;
}
COM: <s> takes global frame vectors and converts them to frame2 vectors </s>
|
funcom_train/31890321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Vector getStringsByKeys(String keys[], Hashtable dataByKey, Hashtable dataByString) {
Vector data = new Vector();
for (int i=0; i<keys.length; i++){
String string = getString(keys[i]);
if (string != null) {
data.add(string);
dataByKey.put(keys[i], string);
dataByString.put(string, keys[i]);
}
}
return data;
}
COM: <s> get localized strings according to keys </s>
|
funcom_train/32061444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkGameVictory(Player p) {
// no victory with opponent taskforce in the game
for (Taskforce tf : taskforces) {
if (tf.getOwner() != p)
return false;
}
// no victory with opponent colony in the game
for (Colony colony : colonies) {
if (colony.getOwner() != p)
return false;
}
return true;
}
COM: <s> tests to see if a player has won the game </s>
|
funcom_train/37648461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void jbInit() throws Exception {
this.setLayout(verticalFlowLayout1);
jLabel1.setText("Minimum Token Count");
jTextField1.setPreferredSize(new Dimension(40, 21));
this.add(jPanel1, null);
jPanel1.add(jLabel1, null);
jPanel1.add(jTextField1, null);
}
COM: <s> jbuilder constructed initialization </s>
|
funcom_train/42930444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object transformPackageToObject(final DatagramPacket pkg) throws IOException, ClassNotFoundException {
byte[] buffer = new byte[pkg.getLength()];
System.arraycopy(pkg.getData(), pkg.getOffset(), buffer, 0, pkg.getLength());
// Transforms into the correct type of Object
return transformToObject(buffer);
}
COM: <s> transforms the received datagram package into an object </s>
|
funcom_train/20109719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testASiteService_RetainsNullWSDL() {
userContext1.setOption(SakaiServiceDelegateFactorySpringImpl.SITE_SERVICE_WSDL_LOCATION, null);
ConfiguredSakaiSiteService service =
(ConfiguredSakaiSiteService) factory.aSiteService(userContext1);
assertNull(service.getDelegateWsdlLocation());
}
COM: <s> verifies that the configured sakai site service returned from a site service </s>
|
funcom_train/26600528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void allowParallelSavePoint() throws DException {
if ( sessionIdList.size() <= 1 )
throw new DException("DSE5532",null);
int index = sessionIdList.size()-1;
parallelSessionIdList.add(sessionIdList.get(index));
sessionIdList.remove(index);
}
COM: <s> will remove and maintain the last session id to parallel session id list </s>
|
funcom_train/17117894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String determineHeader(final short i) {
Iterator iterator = this.sheet.rowIterator();
while (iterator.hasNext()) {
HSSFCell cell = ((HSSFRow) iterator.next()).getCell(i);
String value = Util.getCellValue(cell);
if (value.length() > 0) {
return value;
}
}
return "-" + i + "-";
}
COM: <s> find the header of a column </s>
|
funcom_train/34564497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sort() {
if(sorted != null) return;
int i = Integer.MIN_VALUE;
for(final int n : nodes) {
if(i > n) {
sorted = Arrays.copyOf(nodes, size);
Arrays.sort(sorted);
return;
}
i = n;
}
sorted = nodes;
}
COM: <s> creates a sorted node array </s>
|
funcom_train/46747001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInsertUserRef(DisplayModel insertUserRef) {
if (Converter.isDifferent(this.insertUserRef, insertUserRef)) {
DisplayModel oldinsertUserRef= new DisplayModel(this);
oldinsertUserRef.copyAllFrom(this.insertUserRef);
this.insertUserRef.copyAllFrom(insertUserRef);
setModified("insertUserRef");
firePropertyChange(String.valueOf(REMINDERS_INSERTUSERREFID), oldinsertUserRef, insertUserRef);
}
}
COM: <s> user that created this reminder </s>
|
funcom_train/25384449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clean(Connection conn, Statement ps, ResultSet rs) {
if(closed || implicitConnection) {
log.debug("Closing connection, closed: " + closed + ", implicit: " + implicitConnection + ".");
super.clean(conn, ps, rs);
openConnections--;
conn = null;
} else {
super.clean(null, ps, rs);
}
}
COM: <s> cleans a connection if necessary </s>
|
funcom_train/3833660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validateRequest(RPCWebEvent event) {
RPCMethodCall mc = event.getRPCMethodCall();
if ( mc.getParameters().length == 0 ) {
return false;
}
String sessionId = (String)mc.getParameters()[0].getValue();
if ( sessionId == null ) {
return false;
}
return true;
}
COM: <s> validates the passed event to be valid agaist the requirements of the </s>
|
funcom_train/46332434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void blankSetup() {
itsSetup = null;
removeAllPanels();
setSize(new Dimension(600, 400));
setTitle("MoniCA: Display " + itsNumber);
rebuildSubPanelMenu();
// Rebuild the windows menu since our title may have changed
theirWindowManager.rebuildMenus();
validate();
repaint();
}
COM: <s> clear any current setup </s>
|
funcom_train/11103920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UIViewRoot createView(FacesContext context, String viewId) {
String id = viewId;
int index = indexOfClayTemplateSuffix(context, id);
if (index != -1) {
id = normalizeViewId(id, index);
}
return original.createView(context, id);
}
COM: <s> p this method is overridden to check to see if the target view </s>
|
funcom_train/27942819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRegistry(Registry registry) {
this.registry = registry;
boolean contactSupported = true;
if (registry != null) {
contactSupported = registry.isContactOperationSupported();
setRegistryTitle(registry.getRegistryIdentifier());
} else {
setRegistryTitle(APPLICATION_TITLE);
}
menuBar.setContactOperationSupported(contactSupported);
}
COM: <s> set the registry </s>
|
funcom_train/12559376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Permission permission) {
if (! (permission instanceof FileProtocolPermission))
throw new IllegalArgumentException("invalid permission: "+
permission);
if (isReadOnly()) {
throw new SecurityException(
"Cannot add a Permission to a readonly PermissionCollection");
}
FileProtocolPermission bp = (FileProtocolPermission) permission;
permissions.addElement(permission);
}
COM: <s> adds a permission to the gcfpermissions </s>
|
funcom_train/46070696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateEvent() {
TopologyEventType type = randomAction();
long currentTime = dispatcher.getCurrentVirtualTime();
if (null == type) {
return;
}
try{
switch (type){
case NODE_CREATE:
TopologyEvent event = createStation();
dispatcher.pushEvent(event);
IStation station = event.getStation();
setNextDataEvent(station, currentTime);
break;
case NODE_MOVE:
dispatcher.pushEvents(moveStation(currentTime));
break;
case NODE_DESTROY:
dispatcher.pushEvent(removeStation());
/*
* SendData events for station that don't exist will be discarded at the
* Dispatcher.
*/
break;
}
} catch (Exception e){
logEvGenError(type, e);
}
}
COM: <s> generating random event when station behavior mixed </s>
|
funcom_train/25603316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ErrorRepresentation updateStatus(Status newStatus){
if (
(this.internalStatus.getCode()<300) ||
((newStatus.getCode()>=400)&&(newStatus.getCode()<500)&&internalStatus.getCode()>=400)||
(newStatus.getCode()==502)
)
{
this.internalStatus = newStatus;
}
return this;
}
COM: <s> updates the internal status </s>
|
funcom_train/48268490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String formatSelfTime(JavaScriptProfileNode profileNode) {
int relativeSelfTime = (int) (profile.getTotalTime() > 0
? (profileNode.getSelfTime() / profile.getTotalTime()) * 100 : 0);
return TimeStampFormatter.formatToFixedDecimalPoint(relativeSelfTime, 1);
}
COM: <s> return a string with the self time formatted as a decimal percentage </s>
|
funcom_train/41513847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(ArrayAssignmentStatement n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
n.f3.accept(this, argu);
n.f4.accept(this, argu);
n.f5.accept(this, argu);
n.f6.accept(this, argu);
}
COM: <s> f0 identifier f1 f2 expression f3 f4 f5 </s>
|
funcom_train/15719837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStringCache(boolean down){
try{
if(down){
stringCacheIDX++;
stringCacheIDX=stringCacheIDX%stringCacheFill;
return stringCache[stringCacheIDX];
}
else {
stringCacheIDX--;
if (stringCacheIDX<0) stringCacheIDX=stringCacheFill-1;
return stringCache[stringCacheIDX];
}
}catch (IndexOutOfBoundsException ex){
if (MainClass.DEBUG) {
System.out.println("Console input buffer failed.");
ex.printStackTrace();
}
return("ERROR! Console input buffer failed.");
}
}
COM: <s> gets the recently typed commands </s>
|
funcom_train/35842467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getBeautifiedName(Object o) {
String name = Model.getFacade().getName(o);
if (name == null || name.equals("")) {
name = "(anon " + Model.getFacade().getUMLClassName(o) + ")";
}
return name;
}
COM: <s> returns a beautified name to show in the name text box </s>
|
funcom_train/45538303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPackage(IProgressMonitor monitor) throws CoreException, InterruptedException {
if (monitor == null) {
monitor= new NullProgressMonitor();
}
ISourceFolderRoot root= getSourceFolderRoot();
String packName= getPackageText();
fCreatedSourceFolder= root.createSourceFolder(packName, true, monitor);
if (monitor.isCanceled()) {
throw new InterruptedException();
}
}
COM: <s> creates the new package using the entered field values </s>
|
funcom_train/13391285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAttribute(Entry entry) {
Entry[] attrs = getAttributeCollectionEntries();
for(int i=0; i<attrs.length; i++) {
if(LookupAttributes.equal(entry, attrs[i])) {
removeAttribute(attrs[i]);
break;
}
}
attrList.add(entry);
}
COM: <s> add an attribute to the collection of attributes managed by this </s>
|
funcom_train/28750434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDatemodified(java.util.Date newVal) {
if ((newVal != null && this.datemodified != null && (newVal.compareTo(this.datemodified) == 0)) ||
(newVal == null && this.datemodified == null && datemodified_is_initialized)) {
return;
}
this.datemodified = newVal;
datemodified_is_modified = true;
datemodified_is_initialized = true;
}
COM: <s> setter method for datemodified </s>
|
funcom_train/43619733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void installKeyboardActions() {
InputMap inputMap = getInputMap(JComponent.WHEN_FOCUSED);
SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED,
inputMap);
LazyActionMap.installLazyActionMap(list, BasicXListUI.class,
"XList.actionMap");
}
COM: <s> registers the keyboard bindings on the code jlist code that the </s>
|
funcom_train/40107171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void key(String key) throws IOException {
if (_wantComma) {
_out.write(',');
_indent();
}
_out.write('"');
_out.write(key);
_out.write('"');
_out.write(':');
_wantComma = false;
}
COM: <s> writes the key of a tt key value tt pair </s>
|
funcom_train/14138179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Party getCustomer(String customerId) throws Exception {
// Party customer = (Party) getCache().get("customer");
Party customer = null;
if (customer == null || !customer.getCustomerId().equalsIgnoreCase(customerId)) {
customer = Party.loadUsingCustomerId(customerId);
if (customer != null) {
// getCache().put("customer", customer);
} else {
throw new Exception("Couldn't find specified customer - ref number: " + customerId);
}
}
return customer;
}
COM: <s> first looks in cache for the specified customer </s>
|
funcom_train/16604404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean includes(float x, float y) {
if (points.length == 0) {
return false;
}
checkPoints();
for (int i=0;i<points.length;i+=2) {
if ((points[i] == x) && (points[i+1] == y)) {
return true;
}
}
return false;
}
COM: <s> check if the given point is part of the path that </s>
|
funcom_train/20176606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String timestamp() {
String timestamp = null;
Calendar cal = Calendar.getInstance();
DateFormat dfm = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
dfm.setTimeZone(TimeZone.getTimeZone("GMT"));
timestamp = dfm.format(cal.getTime());
return timestamp;
}
COM: <s> generate a iso 8601 format timestamp as required by amazon </s>
|
funcom_train/24478031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private String actualDate() {
//
// String sReturn = null;
// try {
//
// Date date = new Date();
// SimpleDateFormat sdFormat = new SimpleDateFormat("yyyyMMddHHmm");
// sdFormat.setTimeZone(TimeZone.getDefault());
//
// sReturn = sdFormat.format(date);
//
// } catch (Exception e) {
// // TODO: handle exception
// e.printStackTrace();
// }
// return sReturn;
// }
COM: <s> method returns the actual date as formatted string </s>
|
funcom_train/47886525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dummyPanel() {
win.panDummyCtl = new JPanel();
win.panCtl.add(win.panDummyCtl,
new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
GridBagConstraints.NORTH,
GridBagConstraints.BOTH,
new Insets(0, 0, 0, 0), 0, 0));
win.panDummyCtl.setLayout(null);
dummySeparators();
}
COM: <s> create a dummy panel only used for the alignment </s>
|
funcom_train/41163500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoMomentum entity) {
EntityManagerHelper.log("deleting CoMomentum instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoMomentum.class, entity.getMomentumId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co momentum entity </s>
|
funcom_train/45792577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List getHomeLinkList(final int current_page) {
String queryStr = "from org.spirit.bean.impl.BotListEntityLinks as links order by links.id desc";
return this.getEntityLinksDao().pageEntityLinksUsers(queryStr, current_page, MAX_HOME_LINKS);
}
COM: <s> get the home link list </s>
|
funcom_train/28298531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawPoint(TransBaseNode node, Graphics g) {
if (imgPoint!=null) {
drawImageIcon(imgPoint,node.getX()-TransBaseSettings.sizePoint/2,
node.getY()-TransBaseSettings.sizePoint/2,g);
}
}
COM: <s> draws a single point </s>
|
funcom_train/11945576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double length(double t0, double t1, double epsilon) {
//trivial case
if(t0 == t1)
return 0;
double tm = (t0 + t1)*0.5;
BSPoint p0 = pointAtTvalue(t0);
BSPoint p1 = pointAtTvalue(t1);
BSPoint pm = pointAtTvalue(tm);
double d01 = p0.dist(p1);
double d0m = p0.dist(pm);
double dm1 = pm.dist(p1);
if(Math.abs(d01 - (d0m+dm1)) < epsilon)
return d0m+dm1;
return (length(t0,tm,epsilon) + length(tm,t1,epsilon));
}
COM: <s> returns the approximation of arc length between t0 and t1 using recursive dichotomie </s>
|
funcom_train/44297850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String xmlEncodeComment(String s) throws FatalException {
if (s.indexOf("--") != -1) {
System.err.println("Warning ! The string '--' is replaced by '**' in a comment. " + s);
s = replaceAll(s, "--", "**");
}
return s;
}
COM: <s> encode an xml comment string </s>
|
funcom_train/15407916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readEntityBeanTable() {
Iterator<DeployBeanInfo<?>> it = deplyInfoMap.values().iterator();
while (it.hasNext()) {
DeployBeanInfo<?> info = it.next();
BeanTable beanTable = createBeanTable(info);
beanTableMap.put(beanTable.getBeanType(), beanTable);
}
}
COM: <s> create the bean table information which has the base table and id </s>
|
funcom_train/27811107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPlayerIdFromCookie(HttpServletRequest request, String username) {
Cookie[] cookies = request.getCookies();
if (cookies == null) {
return null;
}
String cookieName = COOKIE_NAME + "-" + StringUtil.utf8HexEncode(username);
for (Cookie cookie : cookies) {
if (cookieName.equals(cookie.getName())) {
return cookie.getValue();
}
}
return null;
}
COM: <s> reads the player id from the cookie in the http request </s>
|
funcom_train/16750929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MultiLineString toGeometry() {
List<LineString> lines = new ArrayList<LineString>();
for (OsmWay road : roads) {
LineString lineString;
try {
lineString = PolylineBuilder.build(road);
lines.add(lineString);
} catch (EntityNotFoundException e) {
//
}
}
LineString[] lineArray = lines.toArray(new LineString[0]);
return new GeometryFactory().createMultiLineString(lineArray);
}
COM: <s> create a multi line string containing all lines of this groups roads </s>
|
funcom_train/18644086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unhandledException(Session session, String excType) {
String xml="<sd:"+TrackerEvent.UNHANDLED_EXCEPTION+
" "+SERVICE_INSTANCE_ID_ATTR+"=\""+
getServiceInstanceId(session)+"\" "+
SESSION_ID_ATTR+"=\""+
getSessionId(session)+"\" "+TIMESTAMP_ATTR+"=\""+
System.currentTimeMillis()+"\" ><sd:"+DETAILS_NODE+">"+
excType+"</sd:"+DETAILS_NODE+"></sd:"+
TrackerEvent.UNHANDLED_EXCEPTION+">";
record(getServiceName(session), session, xml, ERROR, null);
}
COM: <s> this method registers that an exception was not handled </s>
|
funcom_train/13674908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initPool() {
m_Pool = new ArrayList(m_Size);
for (int i = 0; i < m_Size; i++) {
try {
m_Pool.add(m_Database.createCastorDatabase());
log.debug("Added new database");
} catch (Exception ex) {
//log probably
ex.printStackTrace();
}
}
m_Serving = true;
}//initPool
COM: <s> initializes a pool of tt castor databases tt instances </s>
|
funcom_train/10510877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isHardError(Throwable t) {
if (t instanceof BuildException) {
return isHardError(t.getCause());
} else if (t instanceof OutOfMemoryError) {
return true;
} else if (t instanceof ThreadDeath) {
return true;
} else { // incl. t == null
return false;
}
}
COM: <s> whether we should even try to continue after this error </s>
|
funcom_train/43702062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDefaultConferenceService() {
if (conferenceService == null) {
try {
Collection col = MultiUserChat.getServiceNames(YmtManager.getConnection());
if (col.size() > 0) {
conferenceService = (String)col.iterator().next();
}
}
catch (XMPPException e) {
Log.error(e);
}
}
return conferenceService;
}
COM: <s> returns the default conference service </s>
|
funcom_train/12079363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String nextTo(char d) throws IOException {
StringBuffer sb = new StringBuffer();
for (;;) {
char c = next();
if (c == d || c == 0 || c == '\n' || c == '\r') {
if (c != 0) {
back();
}
return sb.toString().trim();
}
sb.append(c);
}
}
COM: <s> get the text up but not including the specified character or the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.