__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/42320394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean compilerBootstrap(Symbol c) {
return
this == JSR14 &&
(c.flags() & Flags.ENUM) != 0 &&
c.flatName().toString().startsWith("pl.wcislo.sbql4j.tools.")
// && !Target.class.getSuperclass().getName().equals("java.lang.Enum")
;
}
COM: <s> for bootstrapping javac only we do without java </s>
|
funcom_train/29413900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void load() {
SAXReader reader = new SAXReader();
try
{
Document xmlDocument = reader.read(Key.KEY_CONFIG_FILE);
Element root = xmlDocument.getRootElement();
for(Iterator<?> it = root.elementIterator("key"); it.hasNext(); )
{
Element key = (Element)it.next();
String id = key.attributeValue("id");
String value = key.attributeValue("value");
config.put(id, value);
}
}
catch(DocumentException ex)
{
//ex.printStackTrace();
}
}
COM: <s> loads the configuration out of its xml file </s>
|
funcom_train/22285632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getProperties(PropertyList list) {
super.getProperties(list);
list.setBoolean("collapsed", collapsed, false);
list.setString("label", label, null);
list.setURL("image", src, null);
list.setURL("expandImage", expandSrc, null);
}
COM: <s> retreives the properties of the tree node </s>
|
funcom_train/14093967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (!isValid()) {
return super.toString();
}
StringBuffer buf = new StringBuffer(1000);
buf.append(super.toString());
buf.append(" clicks: " + getNumberOfClicks());
buf.append(" popup: " + getPopupTrigger());
return buf.toString();
}
COM: <s> return a string representing the eventdata </s>
|
funcom_train/43245225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetName() {
System.out.println("getName");
FamilyDemographicDependentObject instance = new FamilyDemographicDependentObject();
String expResult = "";
String result = instance.getName();
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 name method of class org </s>
|
funcom_train/39180580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SubView getSubView(String name){
SubView sv=RVN_engine.getSubView(name,RVN_host);
if(sv!=null){
sv.RVN_setFileEnvironment(RVN_source_file,RVN_source_folder);
sv.RVN_transferEnvironment(this);
sv.RVN_prepare();
}
return sv;
}
COM: <s> this method will attempt to instantiate the sub view given by the name </s>
|
funcom_train/7673598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processWorkSet(int[] workSet, Visitor visitor) {
if (visitor == null) {
throw new NullPointerException("visitor == null");
}
for (;;) {
int offset = Bits.findFirst(workSet, 0);
if (offset < 0) {
break;
}
Bits.clear(workSet, offset);
parseInstruction(offset, visitor);
visitor.setPreviousOffset(offset);
}
}
COM: <s> processes the given work set by repeatedly finding the lowest bit </s>
|
funcom_train/19810613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean referenceCheck(Collaboration collaboration) {
// Check organization reference.
List<String> organizationList = collaboration.getCollaboratingOrganizations()
.getCollaboratingOrganization();
for (String organization : organizationList) {
String id = toUniqueId(organization);
if (!this.uniqueId.contains(id) || !this.uniqueIdOrganization.containsKey(id)) {
return false;
}
}
return true;
}
COM: <s> check reference within the given collaboration </s>
|
funcom_train/33381152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connect() throws ProtocolException, IOException, DatabaseException {
if (!isConnected)
try {
pop.initSession();
isConnected = true;
} catch (ProtocolException e) {
disconnect();
throw e;
} catch (IOException e) {
isConnected = false;
throw e;
}
database.open();
}
COM: <s> connects to pop3 server </s>
|
funcom_train/3362942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWindowDecorationStyle(int windowDecorationStyle) {
if (windowDecorationStyle < 0 ||
windowDecorationStyle > WARNING_DIALOG) {
throw new IllegalArgumentException("Invalid decoration style");
}
int oldWindowDecorationStyle = getWindowDecorationStyle();
this.windowDecorationStyle = windowDecorationStyle;
firePropertyChange("windowDecorationStyle",
oldWindowDecorationStyle,
windowDecorationStyle);
}
COM: <s> sets the type of window decorations such as borders widgets for </s>
|
funcom_train/9636228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String printAllAttributes(boolean includeIDAttribute) {
Comparator<Attribute> attComp = new Comparator<Attribute>() {
@Override
public int compare(Attribute o1, Attribute o2) {
return o1.getId().compareToIgnoreCase(o2.getId());
}
};
List<Attribute> attList = new ArrayList<Attribute>(getAttributes());
if (!includeIDAttribute) {
attList.remove(getIDAttribute());
}
Collections.sort(attList, attComp);
return printAttributes(attList);
}
COM: <s> returns a string representation of the ontology in the arff format </s>
|
funcom_train/18896820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean newSubject(Triple triple) {
//validate
if (triple == null) {
throw new IllegalArgumentException("Triple cannot be null.");
}
if (triple.getSubject() == null) {
throw new IllegalArgumentException("Triple returned a null SubjectNode.");
}
//compare subjects
return !triple.getSubject().equals(this.currentSubject);
}
COM: <s> compares the triples subject node to the current subject node </s>
|
funcom_train/48343503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCommand(Command cmd) {
if (null == cmd) {
throw new NullPointerException("Null command");
}
String name = cmd.getName();
if (commands.containsKey(name)) {
throw new IllegalArgumentException("Command already exists ("+name+")");
}
commands.put(name, cmd);
}
COM: <s> add the specified command to this shell </s>
|
funcom_train/17724083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean expose(Service service) {
Set<Class<?>> interfaces = service.getInterfaces();
if (interfaces == null || interfaces.size() == 0) {
logger.warn("Service [" + service.getName()
+ "] is not exposed because of having no interface");
return false;
} else {
exposures.add(service);
logger.debug("Service [" + service.getName() + "] is exposed");
return true;
}
}
COM: <s> indicates whether the specified service should be expose or not </s>
|
funcom_train/11770498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonDelete() {
if (jButtonDelete == null) {
jButtonDelete = new JButton();
jButtonDelete.setFont(GuiFont.FONT_PLAIN);
jButtonDelete.setText(rb.getString("jButtonDelete"));
jButtonDelete.setEnabled(false);
}
return jButtonDelete;
}
COM: <s> this method initializes j button delete </s>
|
funcom_train/26338826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCapabilityAmount(Capability capability) {
if (capability == null) {
return 0;
}
int cap = capability.getIndex();
if (cap > Protocol.ModelFeature.nFeature || cap < 0) {
throw new IndexOutOfBoundsException("" + cap);
}
return _buf.get(Protocol.TModel.Cap + cap);
}
COM: <s> gets the capability amount attribute of the model object </s>
|
funcom_train/3747591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HtmlFormat findFormat(Class findClass) {
HtmlFormat formatReturn = null;
for (Iterator i = formats.iterator(); i.hasNext();) {
HtmlFormat format = (HtmlFormat) i.next();
// see if this instance matches the class we're looking for
if (findClass.isInstance(format)) {
formatReturn = format;
break;
}
}
return formatReturn;
}
COM: <s> p locates a format in the object identified by class </s>
|
funcom_train/7971992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSelectedElementEvilNon() {
// If nothing is selected, return the second element if it exists, and the first otherwise.
if (getSelectedElementNormal().equals(_uniqueID))
if(_elements.size() > 1)
return _elements.get(1).getUniqueID();
else
return _elements.get(0).getUniqueID();
// Otherwise, return that nothing is selected.
return _uniqueID;
}
COM: <s> this method implements get selected element in a the nontruthful method </s>
|
funcom_train/8995298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStorageLocation() throws ApplicationException {
String attachmentRootFolder = SystemParameterFactory.getSystemParameter(SystemParameterConstant.FORM_ATTACHMENT_PHYSICAL_PATH);
File rootFolder = new File(attachmentRootFolder);
if (!rootFolder.exists()) {
rootFolder.mkdirs();
}
return attachmentRootFolder;
}
COM: <s> get storage location get the storage location for form files </s>
|
funcom_train/18068974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getRandomMenuItem() {
if (randomMenuItem == null) {
randomMenuItem = new JMenuItem();
randomMenuItem.setText("Random");
randomMenuItem
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
doStaticLayout("randomLayout");
}
});
}
return randomMenuItem;
}
COM: <s> this method initializes random menu item </s>
|
funcom_train/46787814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private HintTextField getHintTextField() {
if (hintTextField == null) {
hintTextField = new HintTextField();
hintTextField.setLocation(89, 62);
hintTextField.setSize(120, 20);
hintTextField.setTextChecker( new FloatChecker());
// hintTextField.setTextChecker( new TextChecker() {
// public boolean checkInput(String check) {
// if (check.equals("Hallo")) return true;
// return false;
// };
// });
}
return hintTextField;
}
COM: <s> this method initializes hint text field </s>
|
funcom_train/50327523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void messageTransmited(byte[] msg) {
if (debug) log.debug("message transmitted");
if (!echo) return;
// message is queued for transmit, echo it when needed
// return a notification via the queue to ensure end
javax.swing.SwingUtilities.invokeLater(new Echo(this, new LocoNetMessage(msg)));
}
COM: <s> when a message is finally transmitted forward it </s>
|
funcom_train/26275360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMediaDescription(final MediaDescription md) throws IllegalArgumentException, SDPException {
if (md == null) {
throw new IllegalArgumentException("A media description cannot be null");
}
if (!hasConnection() && !md.hasConnection()) {
throw new SDPException("This media description must have a connection field");
}
/* Add the media description */
mediaDescriptions.add(md);
}
COM: <s> adds a media description </s>
|
funcom_train/46751064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUserId(Long userId) {
if (!(this.userId.longValue() == userId.longValue())) {
Long olduserId= 0L;
olduserId = this.userId.longValue();
this.userId = userId.longValue();
setModified("userId");
firePropertyChange(String.valueOf(APPOINTMENTS_USERID), olduserId, userId);
}
}
COM: <s> user for staff scheduling </s>
|
funcom_train/1600724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
String s = "";
for(int i=0;i<objectsSize;i++){
if(objects[i] != null) s += "["+i+" is not null]\n";
else s += "["+i+" is null]\n";
}
return s;
}
COM: <s> method for converting object references into a string representation </s>
|
funcom_train/51418492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSortDescendingPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IterationNode_sortDescending_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IterationNode_sortDescending_feature", "_UI_IterationNode_type"),
JetsetPackage.Literals.ITERATION_NODE__SORT_DESCENDING,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the sort descending feature </s>
|
funcom_train/23236317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TileSetDefinition getTilesetFor(int value) {
if(value==0) {
return null;
}
List<TileSetDefinition> tilesets=map.getTilesets();
int pos=0;
for(pos=0;pos<tilesets.size();pos++) {
if(value<tilesets.get(pos).getFirstGid()) {
break;
}
}
return tilesets.get(pos-1);
}
COM: <s> returns the name of the tileset a tile belongs to </s>
|
funcom_train/45867539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawRect(Posn nw, int width, int height, Color color){
if (width < 0 || height < 0)
return;
if (color == null)
color = new Color(0, 0, 0);
this.drawShape(new Rectangle2D.Double(nw.x, nw.y, width, height),
color, true);
}
COM: <s> p draws a rectangle in this panel p </s>
|
funcom_train/37650472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Button buildStoreRuleSetInProjectButton(final Composite parent) {
Button button = newCheckButton(parent, StringKeys.PROPERTY_BUTTON_STORE_RULESET_PROJECT);
button.setSelection(model.isRuleSetStoredInProject());
button.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
refreshRuleSetInProject();
}
});
return button;
}
COM: <s> create the checkbox for storing configuration in a project file </s>
|
funcom_train/22665094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnEnterRoom() {
if (btnEnterRoom == null) {
btnEnterRoom = new JButton();
btnEnterRoom.setBounds(new Rectangle(225, 345, 122, 29));
btnEnterRoom.setText("Enter Room");
btnEnterRoom.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
enterRoom();
}
});
}
return btnEnterRoom;
}
COM: <s> this method initializes btn enter room </s>
|
funcom_train/42534881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File f) {
if (f.isDirectory()) {
return true;
}
String extension = getExtension(f);
if (extension != null) {
if (extension.equals(XMLFilter.xml) ||
extension.equals(XMLFilter.XML) ||
extension.equals(XMLFilter.htm) ||
extension.equals(XMLFilter.html)) {
return true;
} else {
return false;
}
}
return false;
}
COM: <s> verify if a file extension is in the list </s>
|
funcom_train/16514122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshCurrentlyDisplayedObject() {
ISelection oldSel = tree.getSelection();
tree.setInput(new Object[] { rootObject });
tree.refresh();
tree.expandToLevel(3);
tree.setSelection(new StructuredSelection(rootObject), true);
// If the old selection still exists after the update,
// select that object.
tree.setSelection(oldSel, true);
}
COM: <s> refreshes the viewer with the currently selected root object </s>
|
funcom_train/4605927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CSGrenadeEvent getGrenadeEventAt(double time) {
for (int i=grenadeEvents.size()-1;i>=0;i--) {
if (grenadeEvents.get(i).getStartTime()+CSConstants.GRENADE_TAKE_DELAY >= time
&& grenadeEvents.get(i).getStartTime()<= time)
return grenadeEvents.get(i);
}
return null;
}
COM: <s> this method returns the grenade event at the </s>
|
funcom_train/13997797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSaveOption(JMenu file) {
JMenuItem mi;
mi = (JMenuItem) file.add(new JMenuItem("Save", createImageIcon(
"images/save.gif", "Save")));
mi.setMnemonic('s');
mi.getAccessibleContext().setAccessibleName("Save this JFlash file");
mi.addActionListener(saveAsFileAction);
}
COM: <s> creates the save option </s>
|
funcom_train/46722664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSelection(Run r) {
// get index of run and set as current index
currentIndex = GuiObjectManager.getRunsModel().getIdxForRun(r);
// set selection
ListSelectionModel lsm = rtable.getSelectionModel();
lsm.setSelectionInterval(currentIndex, currentIndex);
// make selected line visible
rtable.scrollRectToVisible(rtable.getCellRect(currentIndex, 0, true));
}
COM: <s> set selection in table to specific run </s>
|
funcom_train/44839944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getItemsAsList() throws QueryEvaluationException {
//Get the first sequence associated to this channel
Set seqs = getItems();
if (seqs.size() > 0) {
Seq firstSeq = (Seq) seqs.iterator().next();
return firstSeq.asListOf(Item.class);
}
return new ArrayList();
}
COM: <s> get the list of all items associated to this channel </s>
|
funcom_train/3060112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String generateUpdateRowString() {
Update update = new Update()
.setTableName(qualifiedTableName)
.addColumns(elementColumnNames);
if (hasIdentifier) {
update.setPrimaryKeyColumnNames(rowSelectColumnNames);
}
else {
update.setPrimaryKeyColumnNames( ArrayHelper.join(keyColumnNames, rowSelectColumnNames) );
}
return update.toStatementString();
}
COM: <s> generate the sql update that updates a row </s>
|
funcom_train/4757038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getNotSmaller(final T reference) {
Node candidate = null;
for (Node node = top; node != null;) {
if (node.element.compareTo(reference) < 0) {
if (node.right == null) {
return candidate;
}
node = node.right;
} else {
candidate = node;
if (node.left == null) {
return candidate;
}
node = node.left;
}
}
return null;
}
COM: <s> get the node whose element is not smaller than the reference object </s>
|
funcom_train/9436077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IEmailService getServiceForMessage(long messageId) {
// TODO make this more efficient, caching the account, smaller lookup here, etc.
Message message = Message.restoreMessageWithId(mProviderContext, messageId);
return getServiceForAccount(message.mAccountKey);
}
COM: <s> for a given message id return a service proxy if applicable or null </s>
|
funcom_train/50346858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean routeIsOccupied() {
for (int i=1; i<_savedOrders.size(); i++) {
OBlock block = _savedOrders.get(i).getBlock();
if ((block.getState() & OBlock.OCCUPIED) !=0) {
return true;
}
}
return false;
}
COM: <s> test if the permanent saved blocks of this warrant are occupied </s>
|
funcom_train/37775723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reflectAndSetParms(HttpServletRequest request) {
Class clazz = this.getClass();
for (Enumeration enumeration = request.getParameterNames(); enumeration.hasMoreElements();) {
String parameterName = (String) enumeration.nextElement();
try {
BeanHelper.setField(this, parameterName, request.getParameter(parameterName));
} catch (Exception e) {
// do nothing
}
}
}
COM: <s> invoke the setters on the component passing the parameters in the request stream </s>
|
funcom_train/20893878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(){
for (int i=0;i<4;i++){
origin[i].setText(Double.toString(mCoords.getOrigin(i)));
scale[i].setText(Double.toString(mCoords.getScale(i)));
grid[i].setText(Double.toString(mCoords.getGrid(i)));
coord[i].setText(Double.toString(mCoords.getCoord(i)));
}
}
COM: <s> notify the coords parameters from the model coords object </s>
|
funcom_train/5420704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAjcOption(final String name) {
for (Iterator<?> iterator = this.ajcOptions.iterator(); iterator.hasNext();) {
Object option = iterator.next();
if (name.equals(option)) {
return (String) iterator.next();
}
}
return NullConstants.NULL_STRING;
}
COM: <s> looks in the ajc options for the given name </s>
|
funcom_train/12796211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isServiceUp(String serviceName) throws NSClient4JException {
String result = submittRequest(password + "&5&ShowAll&" + serviceName);
String[] results = split(result, ":");
if(results[1].trim().equalsIgnoreCase("Started")) {
return true;
} else {
return false;
}
}
COM: <s> tests a service by service name </s>
|
funcom_train/21801430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element createAddress(String street, String municipality, String zip) {
/* Use google-style address, with empty "region" */
String address = street + ", " + municipality + ", " + zip +
", " + ", Belgium";
Element elAddress = docKml.createElement("address");
Text txtAddress = docKml.createTextNode(address);
elAddress.appendChild(txtAddress);
return elAddress;
}
COM: <s> create a address </s>
|
funcom_train/38439109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BufferedWriter GetWriter ( String aFileName ) {
BufferedWriter writer = null;
try {
writer = new BufferedWriter(new FileWriter(aFileName));
} catch ( Exception e ) {
e.printStackTrace();
aLogger.severe("Can't get a buffered writer to "+aFileName+".");
return writer;
}
aLogger.config("Got buffered writer to "+aFileName+".");
return writer;
}
COM: <s> method get writer </s>
|
funcom_train/18243568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSequence(ICollectionSequenceFacade sequence) throws DataStoreException {
if (!this.isEditable()) {
throw new DataStoreException();
}
this.addSequenceWithoutDirtinessChange(sequence, TDBCollection.IS_ADDED_COLLECTION_SEQUENCE);
this.setIsDirty(true);
this.notifyChangeListeners(sequence.getSequence(), IEditableCollection.CHANGE_ADDED_SEQUENCE);
}
COM: <s> add a sequence to the collection taking dirtiness changes into </s>
|
funcom_train/50485324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedName(String name) {
if (name != null)
for (int i=0; i<itemList.getModel().getSize(); i++)
if (itemList.getModel().getElementAt(i).toString().equals(name)) {
itemList.setSelectedIndex(i);
return;
}
itemList.setSelectedIndex(-1);
}
COM: <s> set selected item by name </s>
|
funcom_train/35027104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void broadcastExcept(Client except, Message message) throws IOException {
if (!isBound) throw new IOException("Not bound yet. Use bind() first.");
// We don't have to check for reliable or not here, since client.send does that.
for (Client con : clientManager.getConnectors()) {
if (con == except) continue;
con.send(message);
}
}
COM: <s> broadcast a message except to the given client </s>
|
funcom_train/1042446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void multLocal(float scalar) {
m00 *= scalar;
m01 *= scalar;
m02 *= scalar;
m03 *= scalar;
m10 *= scalar;
m11 *= scalar;
m12 *= scalar;
m13 *= scalar;
m20 *= scalar;
m21 *= scalar;
m22 *= scalar;
m23 *= scalar;
m30 *= scalar;
m31 *= scalar;
m32 *= scalar;
m33 *= scalar;
}
COM: <s> code mult code multiplies this matrix by a scalar </s>
|
funcom_train/9203968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize(float alpha) {
// create a random (pastel) fill color
this.color[0] = (float)Math.random() * 0.5f + 0.5f;
this.color[1] = (float)Math.random() * 0.5f + 0.5f;
this.color[2] = (float)Math.random() * 0.5f + 0.5f;
this.color[3] = alpha;
}
COM: <s> initializes the entity </s>
|
funcom_train/20044413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _setSourcePosition() {
requiredMethod("getSourcePosition()");
oObj.setSourcePosition(
(CellAddress)ValueChanger.changePValue(SourcePosition));
tRes.tested(
"setSourcePosition()",
!SourcePosition.equals( oObj.getSourcePosition() ) );
}
COM: <s> test change value that was stored by method </s>
|
funcom_train/20363954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getRandonGeneralSkillName() {
LinkedList<String> list = new LinkedList<String>();
for ( String s : person.getSkillSheet().getSkillDataMap().keySet().toArray( new String[0]) ) {
if ( person.getSkillSheet().getNamed( s ).getPoints()>0 ) {
list.add( s ) ;
}
}
return list.get( random.nextInt(list.size()) ) ;
}
COM: <s> return a random general skill in which the character has 0 points </s>
|
funcom_train/31911430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getEndOffset() {
switch (type) {
case LexicalUnits.STRING:
case LexicalUnits.ENTITY_REFERENCE:
case LexicalUnits.CHARACTER_REFERENCE:
case LexicalUnits.PARAMETER_ENTITY_REFERENCE:
case LexicalUnits.LAST_ATTRIBUTE_FRAGMENT:
return -1;
case LexicalUnits.PI_DATA:
return -2;
case LexicalUnits.COMMENT:
return -3;
case LexicalUnits.CHARACTER_DATA:
if (cdataEndRead) {
return -3;
}
return 0;
default:
return 0;
}
}
COM: <s> returns the end offset of the current lexical unit </s>
|
funcom_train/2023961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createIndex(String name, String table) {
String sql;
boolean result;
sql = "CREATE INDEX " + table + name + " ON " + table + "(" + name + ")";
result = exec.update(sql);
if (getVerbose())
println(sql + " = " + result);
if (!result)
println(exec.getLastException());
}
COM: <s> creates for the given table an index with the given name </s>
|
funcom_train/50229491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class ReceiverThread extends Thread {
Client client;
public ReceiverThread(Client client) {
this.client = client;
}
// run forever (or until the thread is stopped)
public void run() {
DatagramPacket packet =
new DatagramPacket(client.snapshot, client.snapshot.length);
while (true) {
try {
client.socket.receive(packet);
}
catch (Exception e) {
System.err.println("CLIENT ERROR: " + e);
e.printStackTrace(System.err);
System.exit(1);
}
// update the client and the UI
client.updateState();
if (client.ui != null)
ui.updateUI();
}
}
}
COM: <s> an inner thread class that receives snapshots from the server </s>
|
funcom_train/49626316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stopLocalCache() {
LOGGER.trace("Stopping the local cache...");
if (PoorMansCache.getInstance() != null) {
((PoorMansCache) PoorMansCache.getInstance()).shutdown();
} else {
LOGGER.info("PoorMansCache was null.");
}
this.locales = null; // NOPMD by thomas on 29.02.08 21:31
LOGGER.info("Local cache stopped.");
}
COM: <s> stops the local cache </s>
|
funcom_train/23722286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String createToken() {
// FIXME ... make this a random number.
synchronized (tokens) {
String token = Long.toString(nextToken++);
tokens.put(token, new RendezvousPoint(token));
// FIXME ... implement a reaper for orphaned Rendezvous objects
return token;
}
}
COM: <s> create a new token </s>
|
funcom_train/26168742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public ImageIcon getIcon(String name,String type) {
String imagePath = JLF_IMAGE_DIR+type+"/" + name;
URL url = ButterflyAction.class.getResource(imagePath);
if (url != null) {
ImageIcon i=new ImageIcon(url);
return i;
}
return null;
}
COM: <s> returns the icon associated with the name from the resources </s>
|
funcom_train/32117171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSaveWanted() {
int returnValue = JOptionPane.showConfirmDialog(null, RESOURCE_BUNDLE
.getString("CloseCodeEditorTabPanelAction.question"), //$NON-NLS-1$
RESOURCE_BUNDLE.getString("TangaraAction.tangaraName"), //$NON-NLS-1$
JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (returnValue == JOptionPane.OK_OPTION)
saveWanted = true;
else
saveWanted = false;
}
COM: <s> set the code save wanted code field </s>
|
funcom_train/20294471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAttributes() {
StringBuffer tmpList = new StringBuffer();
if (attributeList != null) {
tmpList.append(" ");
for (String name : attributeList.keySet()) {
tmpList.append(name).append("='").append(attributeList.get(name)).append("' ");
}
}
return tmpList.toString();
}
COM: <s> gets the attribute list attribute of the option object </s>
|
funcom_train/19378034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setJdbcTypeMappings(String jdbcTypeMappingsUri) {
if (jdbcTypeMappingsUri != null) {
try {
this.jdbcTypeMappings = Mappings.getInstance(jdbcTypeMappingsUri);
} catch (Exception ex) {
logger.error("ERROR! ("
+ ex.getMessage() + ") Could not set URI --> '"
+ jdbcTypeMappingsUri
+ "' for property 'jdbcTypeMappings' please check your configuration");
}
}
}
COM: <s> sets the configuration file for mappings of the jdbc type mappings </s>
|
funcom_train/2739868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String ge(List<Term> argsTerm) {
String left = env.tp.visit(argsTerm.get(0));
String right = env.tp.visit(argsTerm.get(1));
if(Util.simplify) {
try {
int leftNumber = Integer.parseInt(left);
int rightNumber = Integer.parseInt(right);
if(leftNumber >= rightNumber) {
return Util.trueString;
}
else {
return Util.falseString;
}
}
catch(NumberFormatException e) {}
}
return Util.setPars(left + " >= " + right);
}
COM: <s> executes the greater than or equal function </s>
|
funcom_train/30407333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private QuserVO loginAndUpdateMcQuser (String login, String password, String orgNickName, User user, boolean hasAdminRights) throws SLAdminException {
McAuthentication.login(Constants.DEFAULT_ROLE, orgNickName);
QuserVO quserVO = updateMcQuser (user, hasAdminRights);
McOrganizationManager.update();
McAuthentication.logout();
return quserVO;
}
COM: <s> login and update mc user </s>
|
funcom_train/927840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File createImageFromChart(JFreeChart jf, String name) {
String format = "PNG";
File file=null;
try {
file = new File(System.getProperty("java.io.tmpdir") + name);
file.deleteOnExit();
FileOutputStream fos = new FileOutputStream(file);
BufferedImage img = jf.createBufferedImage(450,360);
ImageIO.write(img,format,fos);
fos.flush();
fos.close();
}
catch (Exception e) {
System.err.println("GraphIO: "+e.toString());
}
return file;
}
COM: <s> creates a temporary png file into tmpdir with specific name from jfree chart </s>
|
funcom_train/18731712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(WildTypePattern node, Object data) {
if (node.getUpperBound() != null) ohYesItHas = true;
if (node.getLowerBound() != null) ohYesItHas = true;
if (node.getTypeParameters().size() != 0) ohYesItHas = true;
return data;
}
COM: <s> any type bounds are bad </s>
|
funcom_train/878298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showPlayerList() {
hr(locale.translate("players"));
this.lastListing = this.players;
for(int i=0; i<this.players.size(); i++){
stdout.println(i+")\t" + ((PlayerImpl)this.players.elementAt(i)).getLabel());
}
hr();
}
COM: <s> displays a list of players </s>
|
funcom_train/14059938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Label endBeginSection(final String title, final Label label) {
String t;
Label l;
this.endParameter();
t = TextUtils.preprocessString(title);
if ((label == null) || (label.m_put)) {
l = this.createLabel(ELabelType.SECTION, t, true);
} else {
l = label;
this.writeLabel(l);
}
this.ensureNewLine();
return l;
}
COM: <s> end the begin of a new section </s>
|
funcom_train/5395862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReadInt() throws Exception {
System.out.println("readInt");
BlockDataInputStream instance = null;
int expResult = 0;
int result = instance.readInt();
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 read int method of class org </s>
|
funcom_train/35242515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStatusBarText(String s, boolean lock, boolean force) {
if (statusBar == null || (lockStatusText && !force)) return;
// if locking set the lock
if (lock)
lockStatusText = true;
// else not locking and forcing unset the lock
else if (force)
lockStatusText = false;
lastStatusText = currentStatusText;
currentStatusText = s;
statusBar.setText(s);
}
COM: <s> set the status bars text and possibly lock it </s>
|
funcom_train/39892883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String rejectContact(String jabberId, String remoteJabberId) {
String method = "POST";
String url = "/contacts/reject";
Map <String, String> paramList = new HashMap<String, String>();
paramList.put("jabberId", jabberId);
paramList.put("remoteJabberId", remoteJabberId);
return TB_Request(method, url, paramList);
}
COM: <s> rejects a pending request from this jabberid </s>
|
funcom_train/40611275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String errorString(final String text, final URL url, final ErrorResponse err) {
if(err != null) {
return String.format("%s - %s [%s]", text, url, err);
} else {
return String.format("%s - %s [No Detail]", text, url);
}
}
COM: <s> format exception text </s>
|
funcom_train/28756737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumofitems(Long newVal) {
if ((newVal != null && this.numofitems != null && (newVal.compareTo(this.numofitems) == 0)) ||
(newVal == null && this.numofitems == null && numofitems_is_initialized)) {
return;
}
this.numofitems = newVal;
numofitems_is_modified = true;
numofitems_is_initialized = true;
}
COM: <s> setter method for numofitems </s>
|
funcom_train/22552779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List createListFromIPPortString(String ipPorts) {
StringTokenizer st = new StringTokenizer(ipPorts, ",");
List list = new LinkedList();
while(st.hasMoreTokens()) {
String ipPort = st.nextToken();
StringTokenizer ipPortST = new StringTokenizer(ipPort, ":");
Connection conn = new Connection(ipPortST.nextToken(), Integer.parseInt(ipPortST.nextToken()));
list.add(conn);
}
return list;
}
COM: <s> helper method for creating a list from a string of ip port pairs </s>
|
funcom_train/13598782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object createObject(int index) {
if ( (index<0) || (index>=objectInfos.size())) {
throw new ConfigurationException("index '"+index+"' is not defined in the configuration. range [0.."+(objectInfos.size()-1)+"]");
}
return createObject((ObjectInfo)objectInfos.get(index));
}
COM: <s> create a new object for the given index </s>
|
funcom_train/29990805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(GraphSelectionEvent event) {
vertices.clear();
edges.clear();
for (Object objectCell : ((GraphSelectionModel) event.getSource())
.getSelectionCells()) {
if (objectCell instanceof DefaultGraphCell) {
DefaultGraphCell cell = (DefaultGraphCell) objectCell;
Object userObject = cell.getUserObject();
if (userObject instanceof DefaultEdge)
edges.add((E) userObject);
else
vertices.add((V) userObject);
}
}
fireSelectionChangedEvent(vertices, edges, event);
}
COM: <s> this function should only be called by jgraph when the selection has </s>
|
funcom_train/26020250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PresenceInfo getMyPresenceInfo() {
if (logger.isActivated()) {
logger.info("Get my presence info");
}
if (!RcsSettings.getInstance().isPresenceServiceActivated()){
return new PresenceInfo();
}
long rawContactId = getRawContactIdForMe();
Cursor cursor = getRawContactDataCursor(rawContactId);
return getContactInfoFromCursor(cursor).getPresenceInfo();
}
COM: <s> returns my presence info from the eab </s>
|
funcom_train/14307992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPath() {
if (artifact instanceof ProjectFile)
return getProject().getNewDirectory().getPathToFile(getProjectFile());
if (artifact instanceof ProjectDirectory)
return getProject().getNewDirectory().getPathToDirectory(getProjectDirectory());
return null;
}
COM: <s> returns the path to the child involved </s>
|
funcom_train/43479233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String key, String element) {
/** sanity checks */
if (key == null) {
return;
}
if (key.equals("")) {
return;
}
if (element == null) {
return;
}
if (element.equals("")) {
return;
}
/** put the key/element pair into the command */
try {
command.put(key, element);
} catch (Exception e) {
constants.info("null in command?", this);
e.printStackTrace();
}
}
COM: <s> adds the specified key element pair to the command </s>
|
funcom_train/49052430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAltToVisualAudioDescLang(String inPrimaryURI) {
AlternativesToVisualElementType altToVisual = getAlternativesToVisual(inPrimaryURI);
if (altToVisual == null)
return null;
AudioDescriptionElementType ad = (AudioDescriptionElementType)
altToVisual.getAudioDescription();
if (ad != null)
return (ad.getLang());
return null;
}
COM: <s> get the language used for the audio description </s>
|
funcom_train/40434020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void linkText(final String linkText, final long timeout) {
SeleniumUtil.waitForElementPresent(seleniumRC, "link=" + linkText, 3000);
seleniumRC.click("link=" + linkText);
try {
Thread.sleep(timeout);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
COM: <s> click the anchor that has the text received as parameter </s>
|
funcom_train/7520829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public short popShort() {
mbuf.len = SHORTSIZE;
popReadOnly(mbuf);
int ch1 = mbuf.data[mbuf.off + 0] & 0xFF;
int ch2 = mbuf.data[mbuf.off + 1] & 0xFF;
if ((ch1 | ch2) < 0)
throw new MessageException("Error reading short value.",new EOFException());
return (short) ((ch1 << 8) + (ch2 << 0));
}
COM: <s> pops a i short i from the message </s>
|
funcom_train/2891849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void formMouseDragged(MouseEvent evt) {
if (!eraseMode) {
if (currentStroke != null) {
Point pnt = new Point(evt.getX(), evt.getY());
pointVector.addElement(pnt);
currentStroke.setPoints(pointVector);
draw(currentStroke);
} else {
if (Debug.mode) {
Debug.stream.println("Stroke atual invalido");
}
}
} else {
eraseAt(evt.getX(), evt.getY());
}
}
COM: <s> handles a mouse dragged event </s>
|
funcom_train/13319184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
this.setLayout(new BorderLayout());//ProvenancePanel extends Parameter panel so we can call method setLayout
//there is possibility that the panel is instantiated before we have any input - so
//we should instantiate it with an empty string
provView.setProvenance((String)(getParameter("provenanceAsString")));
this.add(provView, BorderLayout.CENTER);
}
COM: <s> this method is called before the panel is displayed </s>
|
funcom_train/19831559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkExistance(Solution s){
boolean exists = false;
int i = 0;
while(i < this.size() && !exists){
Solution s2 = this.get(i);
int sameCounter = 0;
for(int e = 0; e < s2.nObjectives; e++){
if(s.objectives[e] == s2.objectives[e])sameCounter++;
}
if(sameCounter==s2.nObjectives)exists=true;
i++;
}
return exists;
}
COM: <s> checks for the merging of solutionsets whether there is already </s>
|
funcom_train/33897944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkSettingsTimestamp(IResource settingsFile) {
long oldStamp = modificationStamp;
long localTimeStamp = settingsFile.getLocation().toFile().lastModified();
boolean changed = oldStamp != 0 && oldStamp != localTimeStamp;
if (oldStamp == 0 || changed) {
modificationStamp = localTimeStamp;
}
return changed;
}
COM: <s> remember the timestamp for the project settings file </s>
|
funcom_train/35566897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeNode(Updatable u) {
if (this.m_pairs.containsKey(u)) {
//System.out.println("removeNode in _UpdateInterface called...");
Node n = (Node)this.m_pairs.get(u);
this.m_updatableGraph.removeNode(n);
this.m_pairs.remove(u);
return true;
}
return false;
}
COM: <s> removes a node for a specified updatable object from the updatable link </s>
|
funcom_train/12300920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMinCookedPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PortScalingType_minCooked_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PortScalingType_minCooked_feature", "_UI_PortScalingType_type"),
SchemaPackage.Literals.PORT_SCALING_TYPE__MIN_COOKED,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the min cooked feature </s>
|
funcom_train/15491722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runMacro(Program pgm, int macroLoc, String macroName) {
this.pgm = pgm;
this.macroName = macroName;
pc = macroLoc-1;
instance = this;
batchMode = false;
imageTable = null;
//IJ.showStatus("interpreting");
pushGlobals();
if (func==null)
func = new Functions(this, pgm);
func.plot = null;
if (macroLoc==0)
doStatements();
else
doBlock();
finishUp();
}
COM: <s> interprets the specified tokenized macro starting at the specified location </s>
|
funcom_train/2966407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateButtonStates() {
int i = slider.getValue();
//int count = comboBox.getItemCount();
boolean minusEnabled = true, plusEnabled = true;
if (i == minValue)
minusEnabled = false;
if (i == maxValue)
plusEnabled = false;
minusButton.setEnabled(minusEnabled);
plusButton.setEnabled(plusEnabled);
}
COM: <s> enables disables plus and minus buttons depending on current selection </s>
|
funcom_train/11345493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setPOJOMetadata(Attributes att) {
StringBuilder meta = new StringBuilder();
for (Element metadata : m_metadata) {
meta.append(m_renderer.render(metadata));
}
if (meta.length() != 0) {
att.putValue("iPOJO-Components", meta.toString());
}
}
COM: <s> add i pojo components to the given manifest attribute list </s>
|
funcom_train/1990345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToolbars(View view, BarContainer container) {
List<Toolbar> toolbars = view.getToolbars();
if (toolbars != null) {
for (Toolbar toolbar : toolbars) {
// Creates the toolbar component
JToolBar jtoolbar = createToolbar(view, toolbar);
// Adds the toolbar component to the bar container
container.addBar(jtoolbar, toolbar.getPosition());
}
}
}
COM: <s> installs the toolbars </s>
|
funcom_train/47191753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void link(Value value, ValuePanel panel) {
controlToData.put(panel, value);
if( value instanceof SimpleValue )
panel.setValue((int) ((SimpleValue)value).getValue( 0 ));
else if( value instanceof RandomValue )
panel.setValue((int) ((RandomValue)value).getValue());
}
COM: <s> link a emitter configurable value to a value panel </s>
|
funcom_train/44223064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onDisplayNavigatePanel(boolean visible){
if(visible){
this.basePanel.get_navigatePanel().setVisible(true);
}else{
this.basePanel.get_navigatePanel().setVisible(false);
}
JSplitPane split = (JSplitPane)this.basePanel.getComponent(0);
split.updateUI();
split.setDividerSize(3);
}
COM: <s> event handler for turning on off the group navigation panel </s>
|
funcom_train/5340486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt(int idx) {
switch(idx) {
case NAME_IDX:
Color color = getColor(MediaPlayerComponent.isPlaying(FILE));
return new ColoredCellImpl(name, color);
case LENGTH_IDX:
return new TimeRemainingHolder(length);
case BITRATE_IDX:
return new Integer(bitrate);
}
return null;
}
COM: <s> returns the value for the specified index </s>
|
funcom_train/16269717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void answer() {
Log.debug("Pressed answer");
if (_call != null && _call.getIsInbound()) {
Runnable ans = new Runnable() {
public void run() {
_call.answer();
}
};
javax.swing.SwingUtilities.invokeLater(ans);
show("Answering");
}
}
COM: <s> answers a call </s>
|
funcom_train/27721313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean verifyDate(JTextField input) {
// Calendar dExpires = Calendar.getInstance();
Date datExpires;
try {
datExpires = df.parse(input.getText());
} catch (ParseException ex) {
return (false);
}
if (datExpires != null) {
return (true);
}
return (false);
}
COM: <s> verify if the input text field contains a correct date </s>
|
funcom_train/32138058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createFieldEditors() {
LogManager.logDebug("Start createFieldEditors:", this);
addField(new PathEditor(IDEPreferenceConstants.P_TAPSETS,
Localization.getString("TapsetsPreferencePage.AdditionalTapsets"), Localization.getString("TapsetsPreferencePage.TapsetDirectory"), getFieldEditorParent()));
LogManager.logDebug("End createFieldEditors:", this);
}
COM: <s> creates the field editors </s>
|
funcom_train/18002386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setByMonth(String b) {
int[] bm = parseIntSet(b, "month", 1, 12, false);
if (bm != null) {
for (int i = 0; i < bm.length; i++) {
bm[i] += Calendar.JANUARY - 1;
}
}
setByMonth(bm);
}
COM: <s> set the list of month constraints for this recurrence </s>
|
funcom_train/16754767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(SerializableStatus status) {
Assert.isLegal(status != null);
IStatus[] result = new IStatus[children.length + 1];
System.arraycopy(children, 0, result, 0, children.length);
result[result.length - 1] = status;
children = result;
int newSev = status.getSeverity();
if (newSev > getSeverity()) {
setSeverity(newSev);
}
}
COM: <s> adds the given status to this multi status </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.