__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/3832866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Properties _getParameters( HttpServletRequest request ) {
Properties p = new Properties();
for ( Enumeration e = request.getParameterNames(); e.hasMoreElements(); ) {
String key = (String)e.nextElement();
p.setProperty( key, request.getParameter( key ) );
}
return p;
}
COM: <s> returns a list of properties with key value pairs created out of </s>
|
funcom_train/23269100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeHTMLHead(final NSTransformerHandler htmlHandler) throws SAXException {
htmlHandler.startElement("head");
try {
writeHTMLHeadContent(htmlHandler);
} catch (SAXException saxe) {
if (!(saxe.getCause() instanceof IOException)) htmlHandler.endElement("head");
throw saxe;
}
htmlHandler.endElement("head");
return;
}
COM: <s> write the html quot head quot element </s>
|
funcom_train/15603233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private void annotateSnpRegions(String residues) {
// annotateSubseq(residues, "A", startFill);
// annotateSubseq(residues, "T", stopFill);
// annotateSnpInSubseq(residues, "G", snpColor);
// annotateSnpInSubseq(residues, "C", snpColor);
// }
COM: <s> annotate the snps </s>
|
funcom_train/45807076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OSLSchema createSchema(TopicMapIF tm) {
OSLSchema schema = new OSLSchema(null);
ClassInstanceIndexIF index = (ClassInstanceIndexIF) tm
.getIndex("net.ontopia.topicmaps.core.index.ClassInstanceIndexIF");
generateTopics(schema, index.getTopicTypes(), index);
generateAssociations(schema, index.getAssociationTypes(), index);
return schema;
}
COM: <s> creates a schema from the given topic map </s>
|
funcom_train/14027640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReference(int constantPoolId) {
assert(constantPoolId <= 0xFFFF);
if (_refSize==1) {
_code[1] = (byte)(0x00FF & constantPoolId);
}
else {
Types.bytesFromShort((short)(0xFFFF & constantPoolId), _code, 1);
}
}
COM: <s> set the constant pool id </s>
|
funcom_train/25365829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAddSkillPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Potion_addSkill_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Potion_addSkill_feature", "_UI_Potion_type"),
LeveleditorPackage.Literals.POTION__ADD_SKILL,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the add skill feature </s>
|
funcom_train/13999453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModel(SDModel model) throws IllegalArgumentException{
log.debug("settings model: " + model);
if (model == null) {
throw new IllegalArgumentException("model == null"); //$NON-NLS-1$
}
SDModel oldModel = this.model;
if (oldModel != null) {
removePropertyChangeListener(this);
}
if (oldModel != model) {
this.model = model;
model.addPropertyChangeListener(this);
firePropertyChange(MODEL_PROP, oldModel, model);
}
}
COM: <s> sets new model to project </s>
|
funcom_train/22383901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean updateMasterDimList(String newdim) {
if(!validDim(newdim))
return false;
ZZCell p = getHomeCell().s(d.masterdim, 1);
while(p!=null) {
if(p.getText().equals(newdim))
return false;
p = p.s(d.masterdim, 1);
}
ZZCell c = getHomeCell().N(d.masterdim, 1);
c.setText(newdim);
return true;
}
COM: <s> called when a new dimension is instantiated </s>
|
funcom_train/21014550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllGhosts() {
ArrayList<KnotworkEdge> ghostEdges = new ArrayList<KnotworkEdge>();
// first collect all ghost edges
for (KnotworkEdge edge : getEdges()) {
if (edge.getType() == Type.GHOST)
ghostEdges.add(edge);
}
// remove all edges
for (KnotworkEdge edge : ghostEdges) {
KnotworkNode node1 = this.getSource(edge);
KnotworkNode node2 = this.getTarget(edge);
this.removeEdge(edge);
if (getDegree(node1) == 0)
removeVertex(node1);
if (getDegree(node2) == 0)
removeVertex(node2);
}
}
COM: <s> remove all ghost edges </s>
|
funcom_train/50298291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRestorePageSize(int pageSize) {
if (pageSize != 1024 && pageSize != 2048
&& pageSize != 4096 && pageSize != 8192){
throw new IllegalArgumentException(
"Page size must be one of 1024, 2048, 4096 or 8192");
}
this.restorePageSize = pageSize;
}
COM: <s> set the page size that will be used for a restored database </s>
|
funcom_train/4013166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void transitTo (String state) {
Log.i(TAG, "State transition from " + mCurrentState + " to " + state);
mCurrentState = state;
for(State s : Raphaello.mStates.values()){
if(s.getId().equals(state)){
for(Primitive p : s.getChildren()){
Job j = (Job)p;
j.work();
}
}
}
/* Flip the screen when the target state is *.painting */
if(mCurrentState.endsWith(".painting")){
flip();
}
}
COM: <s> state transition function </s>
|
funcom_train/42950549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFilterEnabled(boolean enabled) {
boolean old = isFilterEnabled();
if (old == enabled)
return;
filterEnabled = enabled;
if (!old) {
wrappingModel = new WrappingListModel(getModel());
super.setModel(wrappingModel);
} else {
ListModel model = wrappingModel.getModel();
wrappingModel = null;
super.setModel(model);
}
}
COM: <s> enables disables filtering support </s>
|
funcom_train/5865454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getInnerAttrs() {
final StringBuffer sb =
new StringBuffer(64).append(super.getInnerAttrs());
HTMLs.appendAttribute(sb, "name", getName());
if (isDisabled())
HTMLs.appendAttribute(sb, "disabled", "disabled");
if (isChecked())
HTMLs.appendAttribute(sb, "checked", "checked");
if (_tabindex >= 0)
HTMLs.appendAttribute(sb, "tabindex", _tabindex);
return sb.toString();
}
COM: <s> appends interior attributes for generating the html checkbox tag </s>
|
funcom_train/15719885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void legend(int x, int y, String text) {
if(text == null) { legend_text = null; return; }
if(legend_text == null) legend_text = new TextLine(text);
else legend_text.setText(text);
legend_text.setJustification(TextLine.LEFT);
legend_ix = x;
legend_iy = y;
legend_dx = 0.0;
legend_dy = 0.0;
}
COM: <s> define a data legend in the graph window </s>
|
funcom_train/2369512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidMove(final Player player, final Card card) {
assert player != null && card != null;
boolean result = this.game.getCurrentPlayer().equals(player);
if (player.equals(this.game.getCurrentPlayer())) {
result = getMoveRating(player, card) >= 0;
}
return result;
}
COM: <s> this method determines whether the given code player code can place </s>
|
funcom_train/41435629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serviceInactive(ServiceID serviceID) {
try {
ReceivableService receivableService = resourceAdaptorContext
.getServiceLookupFacility().getReceivableService(serviceID);
if (receivableService.getReceivableEvents().length > 0) {
object.serviceInactive(receivableService);
}
} catch (Throwable e) {
logger.warn("invocation resulted in unchecked exception", e);
}
}
COM: <s> indicates a service was deactivated the entity will forward this </s>
|
funcom_train/22719083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void vertexdata_init(float starttemp) {
temperature = 0;
centerX = centerY = 0;
for (int v = 0; v < nodeCount; v++) {
GemP p = gemProp[v];
p.heat = starttemp * ELEN;
temperature += p.heat * p.heat;
p.iX = p.iY = 0;
p.dir = 0;
p.mass = 1 + gemProp[v].mass / 3;
centerX += p.x;
centerY += p.y;
}
}
COM: <s> initialize properties of nodes </s>
|
funcom_train/46458666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void play() {
if (clip.getStepCount() == 1) return;
playing = true;
readyToStep = true;
if (stepNumber == clip.getStepCount() - 1)
setStepNumber(0);
else step();
support.firePropertyChange("playing", null, new Boolean(true)); //$NON-NLS-1$
}
COM: <s> plays the clip </s>
|
funcom_train/29895538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flushPreferencesFile() {
try {
pref.flush();
} catch (BackingStoreException e) {
ErrorDialog.openError(null, "Error",
"The preferences for ArchChecker could not be saved: "
+ e.getMessage(), new Status(Status.ERROR,
Activator.PLUGIN_ID, Status.OK, e.getMessage(), e));
}
}
COM: <s> writes the preferences to disk </s>
|
funcom_train/32055875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processWindowEvent(WindowEvent e) {
//
if (e != null) {
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
// only close the window when we are not in embedded mode
// release resources and exit if we are not running embedded,
// buttonImage.buttonEdge., as
// part of another application
//super.processWindowEvent(buttonEdge);
this.dispose();
}
}
}
COM: <s> overridden in order to be able to deal with window events </s>
|
funcom_train/22277939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void describeClassInfo(ClassInfo info) {
info.addClass("netscape.application.Menu", 1);
info.addField(ITEMS_KEY, OBJECT_TYPE);
info.addField(SUPERITEM_KEY, OBJECT_TYPE);
info.addField(PROTOTYPEITEM_KEY, OBJECT_TYPE);
info.addField(BORDER_KEY, OBJECT_TYPE);
info.addField(BACKGROUNDCOLOR_KEY, OBJECT_TYPE);
info.addField(TRANSPARENT_KEY, BOOLEAN_TYPE);
}
COM: <s> describes the menu class information </s>
|
funcom_train/49608715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Role getRole(String username,EntityManager em,String id) throws Throwable {
try {
Role vo = JPAMethods.find(username, em, Role.class, id);
if (vo==null)
throw new Exception("No role found having id: '"+id+"'");
return vo;
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
}
COM: <s> retrieve a specific role </s>
|
funcom_train/1193840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem() {
if (stringItem == null) {//GEN-END:|402-getter|0|402-preInit
// write pre-init user code here
stringItem = new StringItem("", LocalizationSupport.getMessage("HLPTZSRC"));//GEN-LINE:|402-getter|1|402-postInit
// write post-init user code here
}//GEN-BEGIN:|402-getter|2|
return stringItem;
}
COM: <s> returns an initiliazed instance of string item component </s>
|
funcom_train/549919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void showPropertiesDialog() {
EntityAdapter adapter = model.getAdapterAt(getSelectedRow());
if (propertyDialog == null) {
propertyDialog = new explorer.ui.Dialog();
propertyPanel = new PropertyDialog();
propertyDialog.setComponent(propertyPanel);
}
propertyPanel.setModel(adapter);
propertyDialog.pack();
propertyDialog.show();
}
COM: <s> code show properties dialog code shows the dialog displaying the </s>
|
funcom_train/34961997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
renderer = new JlftTableRenderer();
setContentPane(getJContentPane(false));
setTitle("Jimm Lang File Tool");
setSize(new java.awt.Dimension(850,500));
setLocation(new java.awt.Point(20,20));
fillInValues();
pack();
setVisible(true);
}
COM: <s> this method initializes this </s>
|
funcom_train/35184754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(final Object object) {
if (object == null)
return;
JPAZUtilities.invokeAndWait(new Runnable() {
public void run() {
for (int i = 0; i < objectComboBox.getItemCount(); i++)
if (((ObjectItem) objectComboBox.getItemAt(i)).object == object) {
objectComboBox.removeItemAt(i);
break;
}
}
});
}
COM: <s> removes the object from inspection of the object inspector </s>
|
funcom_train/17495767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageDescriptor getImageDescriptor(String id) {
ImageDescriptor imageDescriptor = (ImageDescriptor) imageDescriptors
.get(id);
if (imageDescriptor == null) {
imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(
getDefault().getBundle().getSymbolicName(), ICON_PATH + id);
imageDescriptors.put(id, imageDescriptor);
}
return imageDescriptor;
}
COM: <s> call this method to retrieve the cache image descriptor for the given id </s>
|
funcom_train/25693256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getFistTabIndex(String title, int offset) {
int out = -1;
for (int i = offset; i < this.getTabCount(); i++) {
if (title.equals(this.getTitleAt(i))) {
out = i;
break;
}
}
return out;
}
COM: <s> get the index of the first tab with the specified title </s>
|
funcom_train/24357278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fixViewportSize() {
if (mapModeIsotropic && (windowSize != null && viewportSize != null)) {
viewportSize.setSize(
viewportSize.getWidth(),
viewportSize.getWidth() *
(windowSize.getHeight() / windowSize.getWidth())
);
}
}
COM: <s> logical units are mapped to arbitrary units with equally scaled axes </s>
|
funcom_train/42400921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PlaceHolderResolver loadPlaceholderFiles(final Document document) {
final PlaceHolderResolver placeHolderResolver = new PlaceHolderResolver();
final NodeList tags = document.getElementsByTagName(Constants.PLACE_HOLDERS_TAG);
final int count = tags.getLength();
for (int i = 0; i < count; i++) {
final Element element = (Element) tags.item(i);
final String fileName = element.getAttribute(Constants.PLACE_HOLDERS_FILE_ATTRIBUTE);
if (Tester.isNullOrEmpty(fileName)) {
continue;
}
placeHolderResolver.load(fileName);
}
return placeHolderResolver;
}
COM: <s> loads all placeholders for the given document </s>
|
funcom_train/18051063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public KeydbGroup getGroupByIndex(int parent, int index) throws KeydbLockedException {
passLock();
for(int i = 0; i < header.numGroups; ++i) {
if (this.groupsGids[i] == parent) {
if (index > 0) --index;
else {
KeydbGroup group = new KeydbGroup(this);
group.read(this.groupsOffsets[i], i);
return group;
}
};
}
return null;
}
COM: <s> get group by index in group </s>
|
funcom_train/5377887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEdge(Object fromId, Object toId) throws IllegalArgumentException {
if (initialized) {
throw new IllegalArgumentException();
}
Vertex fromVertex = (Vertex) vertexMap.get(fromId);
Vertex toVertex = (Vertex) vertexMap.get(toId);
// ignore edges when one of the vertices is unknown
if (fromVertex == null || toVertex == null)
return;
fromVertex.adjacent.add(toVertex);
}
COM: <s> adds a new directed edge between the vertexes with the given ids </s>
|
funcom_train/40421422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResultSet getProjectRecord(Connection conn, String projectName) throws SQLException {
String query = "SELECT * FROM Project where ProjectName='" + projectName + "'";
PreparedStatement statement = conn.prepareStatement(query,
ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
return statement.executeQuery();
}
COM: <s> the helper method used to return a project result set with the specified </s>
|
funcom_train/17286788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getSaveMenuItem() {
if (saveMenuItem == null) {
saveMenuItem = new JMenuItem();
saveMenuItem.setText("Save");
saveMenuItem.setAccelerator(KeyStroke.getKeyStroke('s'));
saveMenuItem.setMnemonic(KeyEvent.VK_S);
saveMenuItem.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
save();
}});
}
return saveMenuItem;
}
COM: <s> this method initializes save menu item </s>
|
funcom_train/18442338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveToFileAsOPML(final OutputStream output) throws Exception {
String title = getEditor().getMetaInfo().toString();
OPMLWriter writer = new OPMLWriter();
writer.beginOPML();
writer.emptyHead(title);
writer.beginBody();
writer.beginOutline(title);
for (Task i : getTaskList())
writer.addOutline(i.getSummary());
writer.endOutline();
writer.endBody();
writer.endOPML();
writer.write(output, true);
}
COM: <s> model saves all items as opml file </s>
|
funcom_train/4929477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sort() {
if (length < 2)
return;
for (int i = 1; i < length; ++i) {
Value iv = elements[i];
String in = names[i];
for (int j = i - 1; j >= 0; --j) {
Value jv = elements[j];
if (iv.compareTo(jv) >= 0) {
elements[j] = iv;
names[j] = in;
break;
}
elements[j + 1] = jv;
names[j + 1] = names[j];
}
}
}
COM: <s> sort elements in this list using jdice standard value ordering </s>
|
funcom_train/35528181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createColors(){
myColors = new Color[25];
for (int i=1; i < 25; i++){
int rd = (int) (255*Math.random());
int gr = (int) (200*Math.random());
int bl = (int) (200*Math.random());
myColors[i] = new Color(rd, gr, bl);
}
}
COM: <s> create colors for graphing </s>
|
funcom_train/48406771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDurationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PlanningData_duration_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PlanningData_duration_feature", "_UI_PlanningData_type"),
SpemxtcompletePackage.eINSTANCE.getPlanningData_Duration(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the duration feature </s>
|
funcom_train/25501623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int eponymous(Individual i) {
if (i == null || id == null) {
return 0; // skip if no ID attribute is defined or argument is bad
}
int count = 0;
String idstring = i.get(id);
for (Individual x : individualMap.values()) {
if (x != i && idstring.equalsIgnoreCase(x.get(id))) {
count++;
}
}
return count;
}
COM: <s> counts individuals whose id attribute match a given individuals id </s>
|
funcom_train/32057082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetBarKey() {
System.out.println("testSetBarKey");
GPBarEntry be = new GPBarEntry( "barkey", 10, "barvalue" );
be.setBarKey( "newbarkey" );
String str = be.getBarKey();
assertEquals( str, "newbarkey" );
}
COM: <s> test of set bar key method of class gpbar entry </s>
|
funcom_train/16521935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String validate(StreamSource xml, StreamSource schema, StreamSource validator) throws TransformerConfigurationException, TransformerException {
// Set the correct systemId on the validationStylesheet
if (baseIsXML) {
validator.setSystemId(xml.getSystemId());
} else {
validator.setSystemId(schema.getSystemId());
}
// Do the tranformation that performs the validation
return transform(xml, validator, null);
}
COM: <s> p validate an xml instance document against a cached xslt stylesheet </s>
|
funcom_train/46608934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setTextDecoration(List<TextDecoration> newTextDecoration) {
if (textDecoration == null || !textDecoration.equals(newTextDecoration)) {
//TextDecoration val[] = TextDecoration.values();
// for (int i=0; i<val.length; i++) {
// if (val[i].toString().equals(newTextDecoration)) {
textDecoration = newTextDecoration;
reflectTextDecoration(textDecoration);
invalidateCache();
// return;
// }
// }
}
}
COM: <s> sets the text decoration </s>
|
funcom_train/32792972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void inALitColPrimaryExpression(ALitColPrimaryExpression lcpe) {
String javaType=getJavaType( tree.getNodeType(lcpe) );
appendCode(createDecl(javaType,getVariable(lcpe))+oclLibPackage+javaType+".getEmpty"+javaType+"();\n");
}
COM: <s> this method breaks the usual pattern of generating java code postfix </s>
|
funcom_train/7278635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddWrongLocation() {
AlternateLocationCollection collection =
AlternateLocationCollection.create
(UrnHelper.UNIQUE_SHA1);
for(int i=0; i<alternateLocationHelper.UNEQUAL_SHA1_LOCATIONS.length; i++) {
try {
collection.add(alternateLocationHelper.UNEQUAL_SHA1_LOCATIONS[i]);
fail("should not have accepted unequal location: "+
alternateLocationHelper.UNEQUAL_SHA1_LOCATIONS[i]);
} catch(IllegalArgumentException e) {
// this is the expected behavior
}
}
}
COM: <s> tests to make sure that unequal sha1s cannot be added to an </s>
|
funcom_train/50862695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSalvagedStage() {
if (undergoingSalvage) {
if (buildingStage != null) buildingStage = null;
else if (frameStage != null) frameStage = null;
else if (foundationStage != null) foundationStage = null;
else throw new IllegalStateException("Construction site has no stage to remove");
}
else throw new IllegalStateException("Construction site is not undergoing salvage");
}
COM: <s> removes the current salvaged construction stage </s>
|
funcom_train/34568224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NagiosLineInfo parseLine(NagiosLineInfo aLine) throws BaseException{
if (aLine != null) {
StringTokenizer tokenizer = new StringTokenizer(aLine.getOriginalInfo(),separatorChar);
int counter = 0;
while (tokenizer.hasMoreTokens()) {
counter++;
setValueFromMacros(aLine,counter,tokenizer.nextToken());
}
aLine.isValid();
return aLine;
} else {
throw new NagiosException(ErrorCodes.CODE_805);
}
}
COM: <s> parsing a nagios information from a line </s>
|
funcom_train/40296781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String processApproveRequestForProjectComment(String entityKey, String requestType) {
Comment projectComment = projectCommentService.getCommentById(entityKey);
projectComment.setStatus(requestType);
projectCommentService.updateComment(projectComment);
/* Remove index of the entity */
SearchUtility.deleteEntityIndex(projectComment);
return projectComment.getCreatorKey();
}
COM: <s> processes the approval requests for </s>
|
funcom_train/17492084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(ImportDeclaration node) {
// Declare the package or class importation
if (node.isPackage()) {
context.declarePackageImport(node.getName());
} else {
try {
context.declareClassImport(node.getName());
} catch (ClassNotFoundException e) {
throw new CatchedExceptionError(e, node);
} catch (PseudoError e) {
}
}
return null;
}
COM: <s> visits an import declaration </s>
|
funcom_train/22345278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ready(CancelParm forCancel) throws RemoteException {
System.out.println("ready() waking up thread");
try {
// wake up thread and pass it the parm from server
myThread.wakeUp(forCancel);
} catch (Exception e) {
System.out.println("ready()= " + e.toString());
}
} // end-method
COM: <s> callback method from server </s>
|
funcom_train/27825820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Object object) {
if (m_set!=null)
m_set.add(object);
else {
if (m_removeBackLog!=null)
m_removeBackLog.remove(object);
if (m_addBackLog==null)
m_addBackLog=new HashSet();
m_addBackLog.add(object);
}
}
COM: <s> adds an element to this set </s>
|
funcom_train/15521493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllSubmissions(String[] ids) throws BusinessException {
org.hibernate.Transaction transaction = super.begin(SubmissionFactory
.getInstance());
try {
for (int i = 0; i < ids.length; i++) {
Submission submission = (Submission) SubmissionFactory
.getInstance().findByKey(ids[i]);
SubmissionFactory.getInstance().remove(submission);
}
super.commit(transaction);
} catch (DAOException daoe) {
super.rollback(transaction);
throw new BusinessException(daoe);
}
}
COM: <s> removes a bunch of code submission code instances in a single </s>
|
funcom_train/51339384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final protected long getReadTime() {
if( getTimestamp() == ITx.READ_COMMITTED && getReadConsistent() ) {
if (commitTime == 0L) {
/*
* The commitTime is not yet available (nothing has been read).
*/
throw new IllegalStateException();
}
return TimestampUtility.asHistoricalRead(commitTime);
}
return getTimestamp();
}
COM: <s> return the timestamp used for </s>
|
funcom_train/13874750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addReferredObjectPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ObjectExp_referredObject_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ObjectExp_referredObject_feature", "_UI_ObjectExp_type"),
QvtoperationalPackage.Literals.OBJECT_EXP__REFERRED_OBJECT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the referred object feature </s>
|
funcom_train/169571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIconHeight() {
if ((fPosition == TOP) || (fPosition == BOTTOM)) {
return fIcon1.getIconHeight() + fIcon2.getIconHeight();
}
return Math.max(fIcon1.getIconHeight(), fIcon2.getIconHeight());
}
COM: <s> returns the icons height </s>
|
funcom_train/651546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IProblem createProblem(SAXParseException e, boolean error) {
int line = e.getLineNumber();
int column = e.getColumnNumber();
if (line < 0) {
line = 0;
}
if (column < 1) {
column = 1;
}
int offset = 0, length = 1;
try {
offset = getOffset(line, column);
length = getLastCharColumn(line) - column;
} catch (BadLocationException ble) {
ble.printStackTrace();
}
return new DefaultProblem(e.getLocalizedMessage(),
offset, offset + length, line, error);
}
COM: <s> creates a tt iproblem tt instance based on the information </s>
|
funcom_train/22285054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOf(PopupMenuItemWidget item) {
if (item == null) {
return -1;
}
// check visible items first
for (int i = firstItem; i <= lastItem; i++) {
if (getItem(i) == item) {
return i;
}
}
// item not found, let's ask the class that uses this menu
return ((SparseDropDownListBoxWidget)user).getValueIndex(item.getText());
}
COM: <s> return index of given item </s>
|
funcom_train/45018355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFaxNumberPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NXuser_faxNumber_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NXuser_faxNumber_feature", "_UI_NXuser_type"),
NexusPackageImpl.Literals.NXUSER__FAX_NUMBER,
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the fax number feature </s>
|
funcom_train/38551883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteCompressedFile(CompressedFile cFile) {
Cube42NullParameterException.checkNull(cFile,
"cFile",
"deleteCompressedFile",
this);
if(!this.contains(cFile)) {
return false;
} else {
this.compressedFiles.remove(cFile);
}
return true;
}
COM: <s> deletes the specified compressed file from the handler </s>
|
funcom_train/39166082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MappingHint createHint() {
MappingHint hint = new MappingHint();
hint.setProject(this.getProject());
hint.setTaskName(this.getTaskName());
hint.setLocation(this.getLocation());
hint.init();
hintTasks.add(hint);
return hint;
}
COM: <s> create and add the representation for a nested lt hint from x </s>
|
funcom_train/38310011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeOpenTag(PrintWriter writer, String name, boolean leaveOpen, boolean newLine) {
writer.print("<");
writer.print(name);
if (leaveOpen) {
return;
}
if (newLine) {
writer.println(">");
} else {
writer.print(">");
}
}
COM: <s> writes an open tag to the given writer </s>
|
funcom_train/24537484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedComponent(IJavaObjectInstance componentOnTab) {
if (componentOnTab != null && isBeanProxyInstantiated()) {
JTabAdapter a = getJTabAdapter(getJTab(componentOnTab));
BeanAwtUtilities.invoke_tab_setSelectedComponent(getBeanProxy(), a.getComponentProxy());
revalidateBeanProxy();
}
}
COM: <s> sets the selected component for this tabbedpane </s>
|
funcom_train/18186445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getSharp() {
if (sharp == null) {
sharp = new JMenuItem("Sharp");
sharp.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
optionsPanel.removeAll();
ImageTransformation t = new SharpTransformation();
optionsPanel.add(new TransformationEditor(t,img));
optionsPanel.updateUI();
jSplitPane.updateUI();
}
});
}
return sharp;
}
COM: <s> this method initializes sharp </s>
|
funcom_train/12567803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
Role clone = new Role();
clone.setDescription(this._description);
clone.setName(this._roleName);
Iterator iter = this._permissions.iterator();
while (iter.hasNext()) {
String perm = (String) iter.next();
clone.addPermission(perm);
}
return clone;
}
COM: <s> clone a role </s>
|
funcom_train/1320857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sort() {
Comparator comparator = new Comparator() {
public int compare(Object o1, Object o2) {
ITableRowSortable object1 = (ITableRowSortable) o1;
ITableRowSortable object2 = (ITableRowSortable) o2;
return sortAscending ? object1.compareByAttribute(object2, sortColumn) :
object2.compareByAttribute(object1, sortColumn);
}
};
Collections.sort(rows, comparator);
}
COM: <s> process sorting after the user has clicked on a column header </s>
|
funcom_train/22432837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRATIO() {
long ratio_a,ratio_b;
long osize;
osize = lh.getOriginalSize();
if (osize!=0) {
ratio_a = lh.getCompressedSize()*1000/osize;
} else {
return (new String("******"));
}
ratio_b = ratio_a%10;
ratio_a = ratio_a/10;
return toField(Long.toString(ratio_a)+"."+Long.toString(ratio_b)+"%",6,false);
}
COM: <s> get ratio field </s>
|
funcom_train/12169680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ImageAttributes createErrorImage(VolantisProtocol protocol) {
ImageAttributes imageAttributes = new ImageAttributes();
imageAttributes.setSrc(calculatedImagePath + GEN_IMAGE_NAME);
imageAttributes.setWidth(StringConvertor.valueOf(this.imageSizePx));
imageAttributes.setHeight(StringConvertor.valueOf(this.imageSizePx));
return imageAttributes;
}
COM: <s> prepare image attributes for error image displayed when no </s>
|
funcom_train/37487170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getTopPanel() {
if (topPanel == null) {
topPanel = new JPanel();
topPanel.setLayout(new BorderLayout());
topPanel.add(getServicesToolbar(), java.awt.BorderLayout.NORTH);
topPanel.add(getVehiclesPanel(), java.awt.BorderLayout.CENTER);
}
return topPanel;
}
COM: <s> this method initializes top panel </s>
|
funcom_train/38310607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateDate() throws Exception {
Date d = DateUtils.createDate(2008, 02, 29);
assertEquals("2008-02-29", df.format(d));
Date d2 = DateUtils.createDate(2008, 02, 29, 8, 30, 1);
assertEquals("2008-02-29 08:30:01", preciseDf.format(d2));
}
COM: <s> tests the create date method </s>
|
funcom_train/33775982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdStop () {
if (cmdStop == null) {//GEN-END:|30-getter|0|30-preInit
// write pre-init user code here
cmdStop = new Command ("Stop", Command.SCREEN, 5);//GEN-LINE:|30-getter|1|30-postInit
// write post-init user code here
}//GEN-BEGIN:|30-getter|2|
return cmdStop;
}
COM: <s> returns an initiliazed instance of cmd stop component </s>
|
funcom_train/1690505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fitCanvas() {
if (sourceImage == null)
return;
Rectangle imageBound = sourceImage.getBounds();
Rectangle destRect = getClientArea();
double sx = (double) destRect.width / (double) imageBound.width;
double sy = (double) destRect.height / (double) imageBound.height;
double s = Math.min(sx, sy);
double dx = 0.5 * destRect.width;
double dy = 0.5 * destRect.height;
centerZoom(dx, dy, s, new AffineTransform());
}
COM: <s> fit the image onto the canvas </s>
|
funcom_train/41165661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoQuestionWeighted entity) {
EntityManagerHelper.log("deleting CoQuestionWeighted instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoQuestionWeighted.class, entity.getQuestionWeightedId());
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 question weighted entity </s>
|
funcom_train/186673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeObject(BaseObject object) {
boolean ret = objects.remove(object);
if(ret == false) {
System.err.println("Error removing object from the Environment.object vector.");
return;
}
/* If the object is a collidable object, we must also remove
* the reference to the object in the environment cell
*/
if (object instanceof CollidableObject) {
this.getCell(object.getX(), object.getY(), object.getZ())
.setCollidableObject(null);
}
}
COM: <s> removes an object from the environment </s>
|
funcom_train/36253172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDeleteNonExistentFile() throws Exception {
boolean exception = false;
try {
sftpFs.delete(new Path("/home/user/testfile-"
+ UUID.randomUUID().toString() + ".dat"), false);
} catch (IOException e) {
exception = true;
}
assertTrue("Deleting a non existing file.", exception);
}
COM: <s> test deleting a file that does not exist </s>
|
funcom_train/25792323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBreakPoint(boolean breakPoint) {
if (m_breakPoint != breakPoint) {
if (breakPoint) {
m_dataComm.getBreakPointSync().addBreakpoint(m_processInstance);
} else {
m_dataComm.getBreakPointSync().removeBreakpoint(m_processInstance);
}
}
//m_breakPoint = breakPoint;
}
COM: <s> sets the breakpoint on this item </s>
|
funcom_train/27771036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doAfterChildren(Node node) throws ParseException {
try {
String doc = getBodyAsString(node);
Annotatable parent = (Annotatable)findAncestorOfType(Annotatable.class);
parent.setDocumentation(doc);
}
catch (TransformerException e) {
throw new ParseException("Error extracting documentation.", e);
}
}
COM: <s> extract the documentation body of this element and </s>
|
funcom_train/9279487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connectionClosed(ConnectionEvent event) {
PooledConnection pce = (PooledConnection) event.getSource();
assertSame(pc, pce);
try {
pce.close();
} catch (SQLException e) {
// Need to catch the exception here because
// we cannot throw a checked exception through
// the api method. Wrap it in a RuntimeException.
throw new RuntimeException(e);
}
}
COM: <s> mimic a pool handler that closes the pooled connection </s>
|
funcom_train/21954132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFlags(MessageInfo[] msgs, Flags flag, boolean value) throws MessagingException {
Message[] m = new Message[msgs.length];
for (int i = 0; i < msgs.length; i++) {
m[i] = msgs[i].getRealMessage();
}
getFolder().setFlags(m, flag, value);
}
COM: <s> this sets the given flag for all the message infos given </s>
|
funcom_train/8228913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSet getBillingPlanItem(String billingPlanName) {
try {
String q = "SELECT e.baseRate, f.timeOfDayStart, f.timeOfDayEnd, f.discount FROM billingPlans e, billingPlanItems f WHERE e.billPlanID = f.billPlanID AND e.name = '"
+ billingPlanName + "';";
PreparedStatement stat = conn.prepareStatement(q);
return stat.executeQuery();
} catch (SQLException e) {
e.printStackTrace();
}
return null;
}
COM: <s> get the list of billing plan segments for a given billing plan </s>
|
funcom_train/35454523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel createRightPanel(){
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
TitledBorder titledBorder2 = new TitledBorder(BorderFactory
.createEtchedBorder(Color.white, new Color(178, 178, 178)),
"Friends");
panel.setBorder(titledBorder2);
panel.setPreferredSize(new Dimension(thisDim.width*2/5,thisDim.height));
jltFriends.setPreferredSize(panel.getPreferredSize());
panel.add(new JScrollPane(jltFriends));
return panel;
}
COM: <s> create right panel </s>
|
funcom_train/34907961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_BazeZnalosti_cile_feature"),
getString("_UI_BazeZnalosti_cile_description"),
GebzPackage.Literals.BAZE_ZNALOSTI__CILE, false, false, false,
null, getString("_UI_PopisPropertyCategory"), null));
}
COM: <s> this adds a property descriptor for the cile feature </s>
|
funcom_train/50749030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component add (Component aComponent) {
this.m_isLeft = !this.m_isLeft;
if (this.m_isLeft) {
super.add(aComponent, JSplitPane.LEFT);
} else {
super.add(aComponent, JSplitPane.RIGHT);
}
return aComponent;
}
COM: <s> performs the necessary checking to make sure that a swing ml component is </s>
|
funcom_train/43327261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public DMatrix getHistogram(char type, int which) {
// figure out what set of matrices to use
int t = 0;
if (separate) {
if (type=='G') t=1;
else if (type=='P') t=2;
else if (type=='N') t=3;
}
if (which < 0) which = 0;
if (which > 3) which = 3;
return histograms[t][which];
}
COM: <s> get a raw histogram for a given residue type </s>
|
funcom_train/45720452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resumeSelected () {
CartridgeListItem ci = (CartridgeListItem)model.getElementAt(getSelectedIndex());
OutputStream log = getLogFile(ci.getFile());
try {
Engine.newInstance(ci.getCartridge(), log, Main.gui, GPSManager.getGPS()).restore();
} catch (IOException e) {
// TODO
}
}
COM: <s> resumes from savegame of currently selected cartridge </s>
|
funcom_train/17921695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPhone(Phone phone) {
if (phone == null) {
return;
}
if (phones == null) {
phones = new ArrayList();
}
int pos = phones.indexOf(phone);
if (pos < 0) {
phones.add(phone);
} else {
phones.set(pos, phone);
}
}
COM: <s> adds a new phone number </s>
|
funcom_train/18284814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPerformance() {
if (endTime > startTime) {
elapsed = endTime - startTime;
double seconds = elapsed / 1000.0;
int perf = (int) ((recvCount * 1000.0) / elapsed);
return (recvCount + " times took " + seconds
+ " seconds, performance is " + perf + " messages/second");
} else {
return "interval too short to calculate a message rate";
}
}
COM: <s> get the performance results </s>
|
funcom_train/7368299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(final int bitIndex) {
if ((bitIndex < 0) || (bitIndex > bitNum)) { throw new IndexOutOfBoundsException("" + bitIndex); }
final int blockIndex = BitSet.blockIndex(bitIndex);
bits[blockIndex] |= BitSet.bit(bitIndex);
}
COM: <s> sets the bit specified by the index to code true code </s>
|
funcom_train/8858500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean get(int row, int col) throws IndexOutOfBoundsException {
if (row < 0 || row >= rows)
throw new IndexOutOfBoundsException("Row index out of bounds:" + row);
else if (col < 0 || col >= columns)
throw new IndexOutOfBoundsException("Column index out of bounds:" + col);
int i = row * columns + col;
return ((data[i >> 5] >> (i % 32)) & 1) != 0;
}
COM: <s> is the entry in given row an column on or off </s>
|
funcom_train/3132764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean exists(Location location) throws Exception{
DirectoryList list = new DirectoryList();
SVNLogClient client = manager.getLogClient();
SVNURL address = SVNURL.parseURIEncoded(location.root);
client.doList(address, HEAD, HEAD, false, false, list);
return list.contains(location.prefix);
}
COM: <s> in order to determine if a resource actually exists in the repository </s>
|
funcom_train/31649362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int showDialog(Component parent, String title) {
returnValue = ERROR_OPTION;
Frame frame = parent instanceof Frame ? (Frame) parent : (Frame)SwingUtilities.getAncestorOfClass(Frame.class, parent);
dialog = new JDialog(frame, title, true);
dialog.getContentPane().add("Center", this);
dialog.pack();
dialog.setLocationRelativeTo(parent);
dialog.show();
return returnValue;
}
COM: <s> pops up a font chooser dialog with the supplied i title i centered </s>
|
funcom_train/14236969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentPresentationState(PresentationState ps) {
_currentPS = ps;
_bsHelper.notifyDestinations(this, "currentPresentationState");
// If the current presentation state changed, there is also a big chance
// that the presentation state list has also changed, so we tell our
// bound destinations that this has happened.
_bsHelper.notifyDestinations(this, "presentationStateList");
}
COM: <s> sets the current presentation state </s>
|
funcom_train/927900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Vector getEndTaskIds(Hashtable hash) {
Vector v = new Vector();
//Loop through all ganttTasks
Iterator iter = hash.values().iterator();
while (iter.hasNext()) {
GanttTask gt = (GanttTask)iter.next();
//If GanttTask is EndTask add it's id to vector
if (gt.isEndTask()) {
v.add(new Integer(gt.getID()));
}
}
return v;
}
COM: <s> returns vector containing id integer for all end tasks </s>
|
funcom_train/2422083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean updateImpl() {
EntityCollectionFilter old = impl;
impl = new EntityCollectionFilter();
impl.add(process);
DependencyStore deps = project.getCurrentDependencies();
try {
RequiredObjectsCollector c = new RequiredObjectsCollector(deps);
impl.addAll(c.collect(process));
} finally {
deps.dispose();
}
return !Objects.equal(old, impl);
}
COM: <s> updates the set of included items </s>
|
funcom_train/3512934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(String newValue) throws IllegalArgumentException {
if (frame != null) {
if (! frame.getSpec().supports(definition.getID(), newValue))
throw new IllegalArgumentException(value);
}
String oldValue = value;
this.value = newValue;
if (frame != null) {
frame.notifyFramePropertyChanged(this, oldValue, newValue);
}
}
COM: <s> sets the string value for this property to the value </s>
|
funcom_train/24039549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readXML() throws IOException{
int xmlSize = super.fDis.readInt();
byte[] buf = new byte[xmlSize];
int read = 0;
int total = 0;
while(total < xmlSize){
if(xmlSize-read > buf.length){
read = super.fDis.read(buf, total, buf.length);
}else{
read = super.fDis.read(buf, total, (int)(xmlSize-total));
}
total += read;
}
this.fPartnerXML = stringToDoc(new String(buf,"UTF-8"));
}
COM: <s> read the xml character data from the syncer client </s>
|
funcom_train/19453806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toRFC2822String() {
String result;
if (realname.length() >0 || email.length() == 0) {
result = encode2822RealName()+" <"+encode2822Email()+">"+ encode2822Comment();
} else {
result = encode2822Email()+encode2822Comment();
}
if (tail != null) {
result = result+",\r\n " + tail.toRFC2822String();
}
return result;
}
COM: <s> encodes this mailbox list to a rfc2822 conforming string if possible </s>
|
funcom_train/41386440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recordPreferredName(String name, String uri) {
if (isNameFree(name)) {
nameToURI.put(name, uri);
uriToName.put(uri, name);
Prop prop = uriToProp.get(uri);
if (prop != null && !prop.getName().equals(name)) {
prop.setName(name);
}
}
}
COM: <s> record the preferred name to use to shorten a uri </s>
|
funcom_train/34908045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHorniHranicePravdivostiPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_VahovaFunkce_horniHranicePravdivosti_feature"),
getString("_UI_VahovaFunkce_horniHranicePravdivosti_description"),
GebzPackage.Literals.VAHOVA_FUNKCE__HORNI_HRANICE_PRAVDIVOSTI,
true, false, false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
getString("_UI_FunkcePropertyCategory"), null));
}
COM: <s> this adds a property descriptor for the horni hranice pravdivosti feature </s>
|
funcom_train/8486609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mettrePionBlanc(JLabel LGrille,JBlanc Blanc,Point position) {
JLabel blanc = (JLabel) Blanc.clone();
LGrille.add(blanc);
blanc.setLocation(ghmp.get(position).x-13,ghmp.get(position).y-15);
blanc.setVisible(true);
}
COM: <s> method which is a white pawn in a position </s>
|
funcom_train/12640980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canConvert(char c) {
try {
// (output buffer size should use getMaxBytesPerChar value.)
char[] input = new char[1];
byte[] output = new byte[3];
input[0] = c;
convert(input, 0, 1, output, 0, 3);
return true;
} catch(CharConversionException e){
return false;
}
}
COM: <s> returns true if the given character can be converted to the </s>
|
funcom_train/48338630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServerEntry getServer(RemoteReference ref) {
ServerEntry dummy = new ServerEntry(ref,false);
synchronized(this.lock) {
int index;
index = allServers.indexOf(dummy);
if (index==-1) {
return null;
} else {
return (ServerEntry)allServers.get(index);
}
}
}
COM: <s> retrieve the server entry for the designated server </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.