__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/8559542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPadding() {
int padding = 0;
try {
PortletConfig conf = getPortlets().getPortletConfig();
padding = Integer.parseInt( conf.getSkin( "padding" , String.valueOf( DEFAULT_PADDING ) ) );
} catch ( RuntimeException e ) {
logger.error("Exception getting padding value", e);
padding = DEFAULT_PADDING;
}
return padding;
}
COM: <s> returns the padding value between the displayed portlets </s>
|
funcom_train/40793438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCancelCommand3() {
if (cancelCommand3 == null) {//GEN-END:|124-getter|0|124-preInit
// write pre-init user code here
cancelCommand3 = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|124-getter|1|124-postInit
// write post-init user code here
}//GEN-BEGIN:|124-getter|2|
return cancelCommand3;
}
COM: <s> returns an initiliazed instance of cancel command3 component </s>
|
funcom_train/43326960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void trimEnds(char x) {
if (monomers == null) return;
Monomer tr = firstMon();
while ((tr != null) && (tr.type==x)) {
Monomer trnext = tr.next;
monomers.remove(tr);
tr = trnext;
}
tr = lastMon();
while ((tr != null) && (tr.type==x)) {
Monomer trprev = tr.prev;
monomers.remove(tr);
tr = trprev;
}
if (monomers.nodes() == 0) monomers = null;
}
COM: <s> strip out all monomers with a certain type from </s>
|
funcom_train/25314326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void newGame() {
boolean localhost=playLocal.isSelected();
boolean fullscreen=useFullscreen.isSelected();
String playerName=name.getText();
String host=serverAddress.getText();
int port=(Integer)serverPort.getValue();
String enteredPassword=new String(password.getPassword());
// Start the game
if(Engine.getActiveEngine() instanceof ClientLobbyEngine){
((ClientLobbyEngine)Engine.getActiveEngine()).passGameInformation(playerName,enteredPassword,host,port,localhost,fullscreen);
}
}
COM: <s> function should start a new server and let the player enter as host </s>
|
funcom_train/4135395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ICompilationUnit getActiveCompilationUnit() {
IWorkbenchWindow window = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow();
if (window != null) {
IWorkbenchPage page = window.getActivePage();
if (page != null) {
if (page.getActiveEditor() instanceof IEditorPart) {
IEditorPart part = page.getActiveEditor();
IJavaElement iunit = JavaUI.getEditorInputJavaElement(part
.getEditorInput());
if (iunit instanceof ICompilationUnit)
return (ICompilationUnit) iunit;
}
}
}
return null;
}
COM: <s> gets the active code icompilation unit code from the workbench </s>
|
funcom_train/8492057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JMenuItem getSaveMenuItem() {
if (saveMenuItem == null) {
saveMenuItem = new JMenuItem();
saveMenuItem.setText("Save");
saveMenuItem.setEnabled(false);
saveMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
saveWorld();
}
});
}
return saveMenuItem;
}
COM: <s> this method initializes save menu item </s>
|
funcom_train/22081252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String get(int sendTo, int replyTo, String actor, UUID actor_id, String attribute) throws SRCPException {
return message(sendTo, replyTo, actor, actor_id, "GET", attribute, "");
}
COM: <s> crcf syntax lt actor gt lt actor id gt get lt attribute gt </s>
|
funcom_train/44448419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putShip(Field startField, Field endField) {
Ship ship = new Ship();
for (int x = startField.getX(); x <= endField.getX(); x++) {
for (int y = startField.getY(); y <= endField.getY(); y++) {
ship.addPart(new Field(x, y));
setShip(x, y, ship);
}
}
drawer.drawShip(startField, endField);
ships.add(ship);
}
COM: <s> puts a ship on the specified fields </s>
|
funcom_train/7266176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
synchronized (publishTask) {
if (future == null) {
long delay = DatabaseSettings.STORABLE_PUBLISHER_PERIOD.getValue();
long initialDelay = delay;
future = context.getDHTExecutorService()
.scheduleWithFixedDelay(this, initialDelay, delay, TimeUnit.MILLISECONDS);
}
}
}
COM: <s> starts the code dhtvalue publisher code </s>
|
funcom_train/8633536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UnconditionalFlowInfo discardInitializationInfo() {
if (this == DEAD_END) {
return this;
}
this.definiteInits =
this.potentialInits = 0;
if (this.extra != null) {
for (int i = 0, length = this.extra[0].length; i < length; i++) {
this.extra[0][i] = this.extra[1][i] = 0;
}
}
return this;
}
COM: <s> discard definite inits and potential inits from this then return this </s>
|
funcom_train/40359990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFilterMatchingValuesInSingleValueProperty() throws Exception {
Map<String, List<Value>> expectedProps = createProperties();
expectedProps.put(PROP1, valueList(TEST_STRING, CLEAN_STRING));
Document filter = createFilter(PROP1, PATTERN);
checkDocument(filter, expectedProps);
}
COM: <s> tests that the filter changes the value in the target property </s>
|
funcom_train/22636500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Ball getBallAtPosition(int x, int y) {
for (int i = 0; i < balls.size(); i++) {
Ball b = (Ball) balls.get(i);
if (b.getX() == x && b.getY() == y) {
return b;
}
}
return null;
}
COM: <s> returns the ball at the requested position </s>
|
funcom_train/7296248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void skipWhitespace(final CharArrayBuffer buffer, final ParserCursor cursor) {
int pos = cursor.getPos();
int indexTo = cursor.getUpperBound();
while ((pos < indexTo) &&
HTTP.isWhitespace(buffer.charAt(pos))) {
pos++;
}
cursor.updatePos(pos);
}
COM: <s> helper to skip whitespace </s>
|
funcom_train/3086946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void set(Class clazz, String propertyName, Object arg) {
try {
Field property = clazz.getDeclaredField(propertyName);
Object oldValue = property.get(this);
property.set(this, arg);
this.firePropertyChange(propertyName, oldValue, arg);
} catch (Exception e) {
/*
* Since this method is only called internally, we can
* get away with throwing runtime exceptions. Any thrown from here will
* get caught during development time.
*/
throw ThrowableKit.makeRuntimeException(e);
}
}
COM: <s> sets a property and fires the corresponding property change event </s>
|
funcom_train/45411738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateType(String newType, String newSubType){
if (_type.equals("") && _subType.equals("")){
_type=newType;
_subType=newSubType;
} else {
// alert/alarm cluster
if (_type.equals(TIP_LOCAZ)) {
if (newSubType.equals(LOCAZ_SECUR)) {
_subType=newSubType;
}
}
}
}
COM: <s> updates cluster type depending on new point type </s>
|
funcom_train/23867185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readNobelPrizeCategoryByCriteria() {
final NobelPrizeCategorySearchCriteria searchCriteria = new NobelPrizeCategorySearchCriteria();
searchCriteria.setName(NAME);
final List<NobelPrizeCategory> nobelPrizeCategories =
EntityDataAccess.findByCriteria(NobelPrizeCategory.class, searchCriteria);
assertEquals("A single NobelPrizeCategory must match the criteria", 1, nobelPrizeCategories.size());
}
COM: <s> read the previously created nobel prize category by criteria </s>
|
funcom_train/15685865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getAnzPosImSystem(byte positionId) {
int anzahl = 0;
for (ISpielerPosition pos : m_vPositionen) {
SpielerPosition position = (SpielerPosition) pos;
if ((positionId == position.getPosition())
&& (position.getId() < ISpielerPosition.startReserves)
&& (position.getSpielerId() > 0)) {
++anzahl;
}
}
return anzahl;
}
COM: <s> generic counter for the given position in the current lineup </s>
|
funcom_train/3562907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getShortDescriptionField() {
if (shortDescriptionField == null) {
shortDescriptionField = new JTextField();
shortDescriptionField.setEditable(editable);
shortDescriptionField.getDocument().addDocumentListener(docListener);
// shortDescriptionField.setBackground(CorasClient.DISABLED_COLOR);
}
return shortDescriptionField;
}
COM: <s> this method initializes short description field </s>
|
funcom_train/50804845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map toMap(String child, Element h) {
List l = h.getChild(child).getAttributes();
Map m = new Hashtable();
for (Iterator it = l.iterator(); it.hasNext();) {
Attribute a = (Attribute)it.next();
m.put(a.getName(), TransportCodec.unescape(a.getValue()));
}
return m;
}
COM: <s> reads all attributes from the child child as a map attributename valuestring </s>
|
funcom_train/46937733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeVideoSegment(int index) {
/* Tourist Version => WITH STRING ID
Vector<VideoSegmentClass> segments = getVideoSegments();
for (Iterator<VideoSegmentClass> iterator = segments.iterator(); iterator.hasNext();) {
VideoSegmentClass vsc = (VideoSegmentClass) iterator.next();
if (vsc.getID().equals(id)) {
iterator.remove();
return;
}
}*/
getVideoSegments().remove(index);
}
COM: <s> added for virtuamea by david godel </s>
|
funcom_train/34246034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPeers() {
List lReturnList = new ArrayList();
List theList = this.getParentContextLink().getChildContextLinkList();
for(int i = 0; theList.size() > i; i++) {
ContextLink lLink = (ContextLink)theList.get(i);
lReturnList.add(lLink.getFmmObject());
}
return theList;
}
COM: <s> finds all objects at the same level </s>
|
funcom_train/25701767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initWrapper () {
// Initialize the fields of the wrapper
double [] toolSize = new double [3];
toolSize[0] = tool.getXSize();
toolSize[1] = tool.getYSize();
toolSize[2] = tool.getZSize();
setField ("size", new float [] {(float)toolSize[0], (float)toolSize[1], (float)toolSize[2] });
}
COM: <s> initialize the wrapper fields with the properties from the entity </s>
|
funcom_train/12192851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getType(String uri, String localName) {
int max = length * SLOTS_PER_ATTRIBUTE;
for (int i = 0; i < max; i += SLOTS_PER_ATTRIBUTE) {
if (data[i + OFFSET_URI].equals(uri) &&
data[i + OFFSET_LOCAL].equals(localName)) {
return (String) data[i + OFFSET_TYPE];
}
}
return null;
}
COM: <s> look up an attributes type by namespace qualified name </s>
|
funcom_train/1549133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean evaluate(T object) {
Boolean result = iTransformer.transform(object);
if (result == null) {
throw new FunctorException("Transformer must return an instanceof Boolean, it was a " + (result == null ? "null object" : result.getClass().getName()));
}
return result.booleanValue();
}
COM: <s> evaluates the predicate returning the result of the decorated transformer </s>
|
funcom_train/47844920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File createTemporaryDirectory(IProgressMonitor monitor) {
log.debug("createTemporaryDirectory");
monitor.setTaskName(local
.getString(ServiceMessages.CREATING_TEMP_DIRECTORY.getKey()));
File tempDir = data.getTempDir();
File baseDir = new File(tempDir.getAbsolutePath() + File.separator
+ VAULTCLIPSE_TEMP_DIR + File.separator
+ System.currentTimeMillis());
baseDir.mkdirs();
log.debug("Directory created: " + baseDir.getAbsolutePath());
monitor.worked(5);
return baseDir;
}
COM: <s> creates the temporary directory for vault to use </s>
|
funcom_train/11103630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String edit() {
State state = getState();
state.setHost(((Subscription) getBean("current")).getHost());
state.setMode("EDIT");
if (log.isTraceEnabled()) {
log.trace("subscription(" + state.getMode() + "," + state.getHost() + ")");
}
return "subscription";
}
COM: <s> p edit an existing subscription </s>
|
funcom_train/41165559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoEditorReviewerPairT2 entity) {
EntityManagerHelper.log("saving CoEditorReviewerPairT2 instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co editor reviewer pair t2 </s>
|
funcom_train/40730314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIncludedObjectInfo(final String objectInfoKeysParam) {
if (LOGGER.isLoggable(Level.CONFIG))
LOGGER.config("INCLUDED OBJECTINFO: " + objectInfoKeysParam);
if (objectInfoKeysParam != null) {
propertyValidators.add(new PropertyValidator() {
void validate() {
validateIncludedObjectInfo(objectInfoKeysParam);
}
});
}
}
COM: <s> sets the fields from object info to index </s>
|
funcom_train/39333147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addClassNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_HInterceptor_className_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_HInterceptor_className_feature", "_UI_HInterceptor_type"),
MetaPackage.Literals.HINTERCEPTOR__CLASS_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the class name feature </s>
|
funcom_train/3711458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHeader (SpectrumHeader header) {
this.header = header;
if (notify) {
setChanged();
notifyObservers (this.header);
}
// if (header != null) {
// try {
// this.header = (SpectrumHeader)header.clone();
// if (notify) {
// setChanged();
// notifyObservers (this.header);
// }
// } catch (CloneNotSupportedException e) {
// }
// }
}
COM: <s> stores a reference to the code spectrum header code object </s>
|
funcom_train/19306914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PsPathMove getStartCurrentSubPath() {
for (int i = this.elements.size() - 1; i > -1; i--) {
final PsPathElement element = this.elements.get(i);
if (element instanceof PsPathMove) {
return (PsPathMove) element;
}
}
return null;
}
COM: <s> returns the element that starts the current sub path </s>
|
funcom_train/44870084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WCMTangentLineBean getWCMTangentLineBean1() {
if (WCMTangentLineBean1 == null) {
WCMTangentLineBean1 = new WCMTangentLineBean();
WCMTangentLineBean1.setColor(new Color(128, 128, 255));
WCMTangentLineBean1.setXValue(getXInput());
WCMTangentLineBean1.setFunction(getTransExpr());
if (presentation) {
WCMTangentLineBean1.setLineWidth(3);
}
}
return WCMTangentLineBean1;
}
COM: <s> this method initializes wcmtangent line bean1 </s>
|
funcom_train/12768247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshRoutesViewer(Object element) {
// get expanded id's so we can maintain the view state
String[] expandedIdList = getExpandedRoutesList();
if (element == null) {
routesTreeViewer.refresh();
} else {
routesTreeViewer.refresh(element);
}
// reselect the tags that were selected prior to the refresh
routesTreeViewer.setExpandedElements(TagSEAPlugin.getDefault().getRouteCollection().getRoutes(expandedIdList));
}
COM: <s> refreshes just the given element </s>
|
funcom_train/5607249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFromUnmerged(PyJavaType winner) {
if (isMerged()) {
return;
}
List<PyObject> newMro = Generic.list();
for (PyObject mroEntry : mro) {
if (mroEntry != winner) {
newMro.add(mroEntry);
}
}
mro = newMro.toArray(new PyObject[newMro.size()]);
}
COM: <s> removes the given item from this states mro if it isnt already finished </s>
|
funcom_train/10950849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setServlet(ActionServlet servlet) {
super.setServlet(servlet);
if (servlet==null) {
setRegistry(null);
this.activity = null;
}
else {
setRegistry((Registry)
servlet.getServletContext().getAttribute(
RegistryServlet.REGISTRY));
this.activity = (Activity)
servlet.getServletContext().getAttribute(
RegistryServlet.ACTIVITY);
}
}
COM: <s> set the controller servlet instance to which we are attached </s>
|
funcom_train/17528008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(FilterConfig filterConfig) throws ServletException {
log.debug("init() started");
// Do pathSpec and pathList init work.
pathSpec = FilterHelpers.initPathSpec(getClass().getName(), filterConfig);
pathList = FilterHelpers.initPathList(getClass().getName(), filterConfig);
log.debug("init() completed");
} // End init().
COM: <s> initialize this filter </s>
|
funcom_train/19767262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonSendFile() {
if (jButtonSendFile == null) {
jButtonSendFile = new JButton();
jButtonSendFile.setBounds(new java.awt.Rectangle(360, 385, 94, 28));
jButtonSendFile.setText("发送文件");
jButtonSendFile
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
sendFile();
}
});
}
return jButtonSendFile;
}
COM: <s> this method initializes j button send file </s>
|
funcom_train/3772598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buf = new StringBuffer();
buf.append(number[MAJOR]);
for (int i=1; i<number.length; i++) {
buf.append(".").append(number[i]);
}
return buf.toString();
}
COM: <s> get a string representation of the revision number </s>
|
funcom_train/32094174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void adjustType(SolutionStep step) {
if (step.isNet()) {
if (step.getType() == SolutionType.FORCING_CHAIN_CONTRADICTION) {
step.setType(SolutionType.FORCING_NET_CONTRADICTION);
}
if (step.getType() == SolutionType.FORCING_CHAIN_VERITY) {
step.setType(SolutionType.FORCING_NET_VERITY);
}
}
}
COM: <s> steps are created as forcing chain always </s>
|
funcom_train/9162941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton2() {
if (jButton2 == null) {
jButton2 = new JButton();
jButton2.setText("delete doubles");
jButton2.setEnabled(false);
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
doDeleteDoubles doDel = new doDeleteDoubles(myDoFindDoubles.getDoubles(),jLabel,jProgressBar);
doDel.start();
}
});
}
return jButton2;
}
COM: <s> this method initializes j button2 </s>
|
funcom_train/25450221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RosterItem getItem(JID jid) {
List<Element> items = this.getQueryElement().elements("item");
for (Iterator it = items.iterator(); it.hasNext();) {
Element item = (Element) it.next();
if(item.attribute("jid")!=null &&
jid.toBareJID().equals(item.attribute("jid").getValue())) {
return new RosterItem(item);
}
}
return null;
}
COM: <s> get roster item by bare jid return null if not found </s>
|
funcom_train/15911693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
Toolkit.getDefaultToolkit().removeAWTEventListener(this);
ReactiveMachine[] machines = getMachines();
for (int i = 0; i < machines.length; i++)
machines[i].stop();
started = false;
// System.out.println("Configuration stopped.");
fireConfigurationStopped();
}
COM: <s> stops running the configuration </s>
|
funcom_train/2496576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUser(AccountEntity user, GroupEntity entity) throws DataAccessException {
ModificationItem[] mods = new ModificationItem[1];
mods[0] = new ModificationItem(DirContext.ADD_ATTRIBUTE, new BasicAttribute("uniqueMember", user.getId()));
super.merge(entity, mods);
}
COM: <s> adds the specified user to the specified group </s>
|
funcom_train/28477716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void suspend() throws VixException {
VixHandle jobHandle = VixWrapper.VixVM_Suspend(vmHandle, 0, null, null);
try {
/*List result =*/ VixWrapper.VixJob_Wait(jobHandle, Collections.EMPTY_LIST);
} finally {
VixWrapper.Vix_ReleaseHandle(jobHandle);
}
}
COM: <s> this function suspends a virtual machine </s>
|
funcom_train/43866531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double findDistance(int id1, int id2) {
Point p1 = GUIOptionManager.getNodes().get(id1 - 1).getPoint();
Point p2 = GUIOptionManager.getNodes().get(id2 - 1).getPoint();
return findDistance(p1.x, p1.y, p2.x, p2.y);
}
COM: <s> finds the distance of two nodes in meters </s>
|
funcom_train/29723268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextId() {
if (jTextId == null) {
jTextId = new JTextField();
jTextId.setForeground(Color.BLACK);
jTextId.setPreferredSize(new Dimension(50, 23));
jTextId.setMaximumSize(new Dimension(50, 23));
jTextId.setMinimumSize(new Dimension(50, 23));
}
return jTextId;
}
COM: <s> this method initializes j text id </s>
|
funcom_train/50220931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateElementSelectionRectangle(TaggedGraphModelEvent e) {
GraphObject ele = (GraphObject)e.getSource();
Rectangle rect = new Rectangle(e.rectangle);
model.rebuildSelectionTagsOf(getGraphics(), ele, e.state);
model.getBoundsOf(ele, rect);
rect = modelToView(rect);
rect.grow(2,2); // needed because a one pixel edge is sometimes left
revalidate(); // ensure that the scroll bars are updated
paintImmediately(rect);
}
COM: <s> update the rectangle in my view </s>
|
funcom_train/18215419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateXML(Element localRoot, CombinationEventFilterWidget filter) throws XMLGenerationException {
this.localRoot = localRoot;
this.filter = filter;
generateSingleFilterXML(filter.getEventFilter1());
if (filter.isCombinedEvent()) {
generateSingleFilterXML(filter.getEventFilter2());
Element t = xmldoc.createElement(filter.getCombinationFilter());
t.appendChild(localRoot.getFirstChild());
t.appendChild(localRoot.getLastChild());
localRoot.appendChild(t);
}
}
COM: <s> generate xml for an event filter selection </s>
|
funcom_train/46383304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ContentImporterSPI getContentImporter(String extension, boolean useDefault) {
if (extension == null) {
return null;
}
ContentImporterSPI importer = contentImportMap.get(extension.toLowerCase());
if (importer == null && useDefault == true) {
return defaultContentImporter;
}
return importer;
}
COM: <s> returns the content importer given the extension name possibly returning </s>
|
funcom_train/1124352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void killAllAgents(Simulation simulation) {
List agents = new ArrayList(simulation.getLiveAgents(_agentFilter));
for (Iterator itr = agents.iterator(); itr.hasNext();) {
IMotileAgent agent = (IMotileAgent)itr.next();
agent.kill(simulation);
}
}
COM: <s> called when we want to halt the simulation i </s>
|
funcom_train/51605042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonFinishedClear() {
if (jButtonFinishedClear == null) {
jButtonFinishedClear = new JButton();
jButtonFinishedClear.setIcon(new ImageIcon(getClass().getResource("/net/sf/cannagrower/images/clear_left_16.png")));
jButtonFinishedClear.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
plantation.setFinished(null);
dateChooserFinished.setDate(plantation.getFinished(),false);
}
});
}
return jButtonFinishedClear;
}
COM: <s> this method initializes j button finished clear </s>
|
funcom_train/44186442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String createFile() throws IOException {
generateNewBasename();
String name = currentBasename + '.' + this.extension +
((settings.getCompress())? DOT_COMPRESSED_FILE_EXTENSION: "") +
OCCUPIED_SUFFIX;
File dir = getNextDirectory(settings.calcOutputDirs());
return createFile(new File(dir, name));
}
COM: <s> create a new file </s>
|
funcom_train/31069654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getBooleanProperty(String name) throws PropertyNotFoundException {
boolean b = false;
try {
String value = this.getStringProperty(name).toUpperCase();
if("YT1".indexOf(value.charAt(0)) >= 0) {
b = true;
}
} catch (Exception ex) {
throw new PropertyNotFoundException(ex, name);
}
return b;
}
COM: <s> retrieve the boolean property keyed by name throw an exception if not found </s>
|
funcom_train/18328097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
ignoredElements = new Vector<String>();
ignoredElements.add("html");
ignoredElements.add("head");
purifiedElements = new Vector<String>();
for (QuestionBodyElement tag : QuestionBodyElement.values() ) {
purifiedElements.add(tag.getHtmlTag().toString());
}
ignoredAttributes = new Vector<String>();
ignoredAttributes.add("style");
}
COM: <s> initializes the elements to be ignored and to be purified </s>
|
funcom_train/48211408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(InetAddress checkMe) {
for (int i = 0; i < 4; i++) {
if ( (addr.getAddress()[i] & mask.getAddress()[i]) !=
(checkMe.getAddress()[i] & mask.getAddress()[i]) ) {
return false;
}
}
return true;
}
COM: <s> checks if the given inet address is a part of this ipnetwork </s>
|
funcom_train/31824775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeEventListener(OleAutomation automation, int eventID, OleListener listener) {
checkWidget();
if (automation == null || listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
int address = automation.getAddress();
IUnknown unknown = new IUnknown(address);
GUID riid = getDefaultEventSinkGUID(unknown);
if (riid != null) {
removeEventListener(address, riid, eventID, listener);
}
}
COM: <s> removes the listener </s>
|
funcom_train/41451620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DeployPackagesResponse failApplicationDeployment(String errorMessage, ResourcePackageDetails packageDetails) {
DeployPackagesResponse response = new DeployPackagesResponse(ContentResponseResult.FAILURE);
DeployIndividualPackageResponse packageResponse =
new DeployIndividualPackageResponse(packageDetails.getKey(), ContentResponseResult.FAILURE);
packageResponse.setErrorMessage(errorMessage);
response.addPackageResponse(packageResponse);
return response;
}
COM: <s> creates the necessary transfer objects to report a failed application deployment update </s>
|
funcom_train/31937091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void contributeSeparator(IMenuManager menu, IConfigurationElement element) {
String id = element.getAttribute(ATT_NAME);
IContributionItem sep = menu.find(id);
if (sep != null)
return;
sep= (id == null || id.length() <= 0) ?
new Separator(HORIZONTAL) : new Separator(HORIZONTAL, id);
menu.addContribution(sep);
}
COM: <s> creates a named menu separator from the information in the configuration element </s>
|
funcom_train/38827636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SubrangePoint getFarthest(GeomPoint point, double tol) {
// Guess a location near enough to the farthest point for the root solver
// to get us the rest of the way there.
GeomPoint parNear = guessClosestFarthest(point, false);
SubrangePoint p = getClosestFarthest(point, parNear.getValue(0), parNear.getValue(1), tol, false);
return p;
}
COM: <s> returns the farthest point on this surface from the specified point </s>
|
funcom_train/41856873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() throws ServletException {
log.info(OntVersion.getFullTitle()+ ": initializing");
try {
ServletConfig servletConfig = getServletConfig();
ontConfig.init(servletConfig);
db.init();
tripleStore.init();
adminDispatcher.init();
analytics.init();
log.info(OntVersion.getFullTitle()+ ": init complete.");
}
catch (Exception ex) {
log.error("Cannot initialize: " +ex.getMessage(), ex);
throw new ServletException("Cannot initialize", ex);
}
}
COM: <s> initializes this service </s>
|
funcom_train/3414934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doAcquireShared(int arg) {
final Node node = addWaiter(Node.SHARED);
boolean failed = true;
try {
boolean interrupted = false;
for (;;) {
final Node p = node.predecessor();
if (p == head) {
int r = tryAcquireShared(arg);
if (r >= 0) {
setHeadAndPropagate(node, r);
p.next = null; // help GC
if (interrupted)
selfInterrupt();
failed = false;
return;
}
}
if (shouldParkAfterFailedAcquire(p, node) &&
parkAndCheckInterrupt())
interrupted = true;
}
} finally {
if (failed)
cancelAcquire(node);
}
}
COM: <s> acquires in shared uninterruptible mode </s>
|
funcom_train/18601289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStatus(ServiceContext context, Dbms dbms, int id, int status, String changeDate, String changeMessage) throws Exception {
setStatusExt(context, dbms, id, status, changeDate, changeMessage);
boolean indexGroup = false;
indexMetadata(dbms, Integer.toString(id), indexGroup);
}
COM: <s> set status of metadata id and reindex metadata id afterwards </s>
|
funcom_train/37444485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public QueryString add(final String name, final String value) {
CDebug.checkParameterNotEmpty(name, "name");
query.append(query.toString().indexOf("?") == -1 ? "?" : "&");
query.append(name.trim());
query.append('=');
if (value != null) {
query.append(value);
}
return this;
}
COM: <s> adds the supplied name and value to this query string </s>
|
funcom_train/10596055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setup(Parameters params) {
this.parameters = params;
final String expiresValue = params.getParameter("expires", null);
if (expiresValue != null) {
this.expires = parseExpires(expiresValue);
} else {
this.expires = this.configuredExpires;
}
this.outputBufferSize =
params.getParameterAsInteger("outputBufferSize", this.configuredOutputBufferSize);
}
COM: <s> setup this component </s>
|
funcom_train/4125307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FreeColGameObject removeFreeColGameObject(String id) {
if (id == null || id.equals("")) {
throw new IllegalArgumentException("Parameter 'id' must not be null or empty string.");
}
if (freeColGameObjectListener != null) {
freeColGameObjectListener.removeFreeColGameObject(id);
}
return freeColGameObjects.remove(id);
}
COM: <s> removes the code free col game object code with the specified id </s>
|
funcom_train/16796757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteSlice(int n) {
if (frameInfos==null || frameInfos.size()==0) return;
if (n<1 || n>frameInfos.size())
throw new IllegalArgumentException("Argument out of range: "+n);
frameInfos.removeElementAt(n-1);
}
COM: <s> deletes the specified image from this virtual stack if it is one </s>
|
funcom_train/25417446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set_getRecordByIDGetURL(String recordByIDGetURL) {
// Check if recordByIDGetURL has a trailing '?' mark
// If not, put '?' mark
if (!recordByIDGetURL.endsWith("?")) {
recordByIDGetURL += "?";
}
_getRecordByIDGetURL = recordByIDGetURL;
}
COM: <s> sets the get record by id get url </s>
|
funcom_train/9531003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CharField getCharField(int i) throws OntologyException {
if (i<0) throw new OntologyException("error, asking for negative char field");
if (i >= charFieldList.size())
throw new OntologyException("number "+i+" char field does not exist"); // ex
return charFieldList.get(i);
}
COM: <s> get char field for int </s>
|
funcom_train/32057432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetEditingCell() {
System.out.println("testGetEditingCell");
JGraph jg=new JGraph();
BasicGraphUI x = new BasicGraphUI();
GraphLayoutCache g = new GraphLayoutCache( new DefaultGraphModel(),jg );
x.installUI(jg);
assertNull(x.getEditingCell(jg));
}
COM: <s> test of get editing cell method of class basic graph ui </s>
|
funcom_train/46433541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private OpResourcePool getSelectedPool(Map parameters, OpBroker broker) {
if (parameters != null) {
String poolId = (String) parameters.get(POOL_ID);
if (poolId != null) {
return (OpResourcePool) broker.getObject(poolId);
}
}
return OpResourceService.findRootPool(broker);
}
COM: <s> gets the pool which was selected on the ui </s>
|
funcom_train/26170043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSession(String type, Object store, String session) throws StoreException {
if (type.equals("FileSystem") && (store instanceof File)) {
_model.setStore(new FileSystemStore((File) store, session));
} else {
throw new StoreException("Store type '" + type + "' is not supported in " + getClass().getName());
}
}
COM: <s> sets the store that this plugin uses </s>
|
funcom_train/50313104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copy () {
checkWidget();
//TODO
// int xDisplay = OS.XtDisplay (handle);
// if (xDisplay == 0) return;
// int [] argList = {OS.XmNtextField, 0};
// OS.XtGetValues (handle, argList, argList.length / 2);
// OS.XmTextCopy (argList [1], OS.XtLastTimestampProcessed (xDisplay));
}
COM: <s> copies the selected text </s>
|
funcom_train/22830052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetInstance() {
System.out.println("getInstance");
Tunnel expResult = null;
Tunnel result = Tunnel.getInstance();
System.out.println(result);
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 instance method of class tunnel </s>
|
funcom_train/870807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteCollection(String collectionName, Collection containerCollection) throws XBRLException {
try {
CollectionManagementService service = (CollectionManagementService) containerCollection.getService("CollectionManagementService", "1.0");
service.removeCollection(collectionName);
} catch (Exception e) {
throw new XBRLException("Collection " + collectionName + " could not be deleted.",e);
}
}
COM: <s> delete a collection </s>
|
funcom_train/47846484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Proxy promoteReference() {
if ( bound || force_strong_ref || strong_ref != null ) return strong_ref;
strong_ref = weak_ref.get();
if ( LeaseManager.LEASE_DEBUGGING && strong_ref == null ) {
System.out.println( ">>> Referent for weak reference was null " +
"for object " + object_id + " (" + delegate_to_string + ")" );
}
notifyPerformanceListeners( false, false );
return strong_ref;
}
COM: <s> attempt to promote the reference to a strong reference and return whether or </s>
|
funcom_train/27834955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component addElement(int type, int x, int y) {
ElementData tmp = new ElementData(type,
getUniqueName(Element.toString(type)),
x, y);
if (tmp != null) {
_elements.add(tmp);
}
return tmp.getComponent();
}
COM: <s> data for a new code element data code object </s>
|
funcom_train/17536577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getBarPostep(), BorderLayout.SOUTH);
jContentPane.add(getPanelSterowanie(), BorderLayout.WEST);
jContentPane.add(getScrollLog(), BorderLayout.CENTER);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/25827536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMouseEvent(String sender, String eventType, String action) {
if(!this.mouseEvents.containsKey(sender)) {
this.mouseEvents.put(sender, new HashSet<Pair<String, String>>());
}
this.mouseEvents.get(sender).add(new Pair<String, String>(eventType, action));
}
COM: <s> adds a mouse event </s>
|
funcom_train/44709536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isSelected(PageState s, Object key, int column) {
Object sel = getTable()
.getColumnSelectionModel().getSelectedKey(s);
if(sel == null) {
return false;
}
return (column == ((Integer)sel).intValue());
}
COM: <s> determine whether the given column is selected </s>
|
funcom_train/35844818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void modelChanged(PropertyChangeEvent evt) {
if (evt instanceof AttributeChangeEvent) {
if (evt.getPropertyName().equals("type")) {
if (evt.getSource() == getTarget()
&& (getChangedElement(evt) != null)) {
Object elem = getChangedElement(evt);
setSelectedItem(elem);
}
}
}
}
COM: <s> the function in the parent removes items from the list </s>
|
funcom_train/3362028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDouble(int parameterIndex, double x) throws SQLException {
checkParamIndex(parameterIndex);
if(params == null){
throw new SQLException("Set initParams() before setDouble");
}
params.put(new Integer(parameterIndex - 1), new Double(x));
}
COM: <s> sets the designated parameter to the given code double code in the </s>
|
funcom_train/12649441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contentEquals(StringBuffer sb) {
synchronized(sb) {
if (count != sb.length())
return false;
char v1[] = value;
char v2[] = sb.getValue();
int i = offset;
int j = 0;
int n = count;
while (n-- != 0) {
if (v1[i++] != v2[j++])
return false;
}
}
return true;
}
COM: <s> returns tt true tt if and only if this tt string tt represents </s>
|
funcom_train/9286107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void teardownNetwork() {
if (logShipper != null) {
logShipper.stopLogShipment();
}
if (transmitter != null) {
try {
ReplicationMessage mesg =
new ReplicationMessage(ReplicationMessage.TYPE_STOP, null);
transmitter.sendMessage(mesg);
} catch (IOException ioe) {}
try {
transmitter.tearDown();
} catch (IOException ioe) {}
}
}
COM: <s> stop log shipping notify slave that replication is stopped and </s>
|
funcom_train/41593124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCoverPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Book_cover_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Book_cover_feature", "_UI_Book_type"),
LibraryPackage.Literals.BOOK__COVER, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the cover feature </s>
|
funcom_train/25704366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int GetLowestCandidate(int candidates) throws Exception {
if (candidates < 0 || candidates >= 512)
throw new Exception("Bad candidate set");
if (candidates == 0)
return -1;
int result = 0;
for (int cand = candidates; (cand & 1) == 0; cand >>= 1)
++result;
return result;
}
COM: <s> find the lowest candidate </s>
|
funcom_train/26024655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateScale() {
double scale = 0;
if (getAutoScalePolicy() == AUTOSCALE_POLICY_WINDOW)
scale = computeWindowScale(10);
else if (getAutoScalePolicy() == AUTOSCALE_POLICY_PAGE)
scale = computePageScale();
else if (getAutoScalePolicy() == AUTOSCALE_POLICY_PAGEWIDTH)
scale = computePageWidthScale(20);
if (scale > 0) {
graph.removePropertyChangeListener(autoScaleResetListener);
graph.setScale(Math.max(Math.min(scale, 128), .01));
graph.addPropertyChangeListener(autoScaleResetListener);
}
}
COM: <s> updates the scale based on the autoscale policy </s>
|
funcom_train/51226892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startup() {
StartupScreen ss = new StartupScreen();
while(ss.isStartingUp()) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
// check for errors from ss first
ss.setVisible(false);
if(ss.isError()) {
JOptionPane error = new JOptionPane("An error occured while starting up, the application will be closed!"
,JOptionPane.ERROR_MESSAGE);
error.createDialog(this, "ERROR!").setVisible(true);
System.exit(-1);
}
}
COM: <s> loads the splash screen and waits until initialization is finished </s>
|
funcom_train/42718512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawSampleAndPhdFileName(Graphics2D g2D) {
int xPosition = column1StartX;
int yPosition1 = originY + secondLineY;
int yPosition2 = originY + thirdLineY;
g2D.setColor(Color.black);
g2D.setFont(contentFont);
g2D.drawString(sampleFileName, xPosition, yPosition1);
g2D.drawString(phdFileName, xPosition, yPosition2);
}
COM: <s> draws the sample filename and phd filename below the product name </s>
|
funcom_train/14227666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void terminalConnectionTalking(final CallId id, final String address, final String terminal, final int cause) {
// define action block
EventHandler eh = new EventHandler() {
public void process(Object o) {
((GenericProvider)o).getCallMgr().getLazyTermConn(id, address, terminal).toTalking(cause);
}
};
// dispatch for processing
this.getEventPool().put(eh);
}
COM: <s> receive and queue up a terminal connection talking notification event </s>
|
funcom_train/14273871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParams(Hashtable params) {
java.util.Iterator iter = getParams().entrySet().iterator();
while (iter.hasNext()) {
java.util.Map.Entry entry = (java.util.Map.Entry)iter.next();
getParams().put(entry.getKey(), entry.getValue());
}
} //end-method
COM: <s> setter for property params </s>
|
funcom_train/16529905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean save(ICurnit curnit) throws IOException {
// showSaveConfirm(file);
try {
//save the file
if(CommonUI.isSavedBefore()) {
curnit.saveCurnit(currentFile);
//TODO: should show some kind of save confirmation
//JOptionPane.showMessageDialog(curnit, message)
CommonUI.setSavedBefore(true);
return true;
} else {
saveAs(curnit);
}
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
COM: <s> save to the last place that was saved to </s>
|
funcom_train/7677619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSourcePaths(Javadoc jd, ProjectInfo proj) {
Vector dirSets = proj.getDirsets();
int numDirSets = dirSets.size();
for (int i = 0; i < numDirSets; i++) {
DirSet dirSet = (DirSet)dirSets.elementAt(i);
jd.setSourcepath(new Path(project, dirSet.getDir(project).toString()));
}
}
COM: <s> add the root directories for the given project to the javadoc </s>
|
funcom_train/9086718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EquipmentDetails update(EquipmentDetails entity) {
EntityManagerHelper.log("updating EquipmentDetails instance",
Level.INFO, null);
try {
EquipmentDetails result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved equipment details entity and return it or a </s>
|
funcom_train/37797208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showList(final List stmtList, final String fileName) {
if (!DEBUG) { return; }
System.out.println("-- " + fileName);
for (int i = 0; i < stmtList.size(); i++) {
System.out.println((String) stmtList.get(i));
}
System.out.println("--");
}
COM: <s> convenience debug method to show the values that were parsed out </s>
|
funcom_train/17706035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createContents(Shell shell) {
shell.setLayout(new FillLayout());
StyledText styledText = new StyledText(shell, SWT.BORDER);
// Add the line background listener
styledText.addLineBackgroundListener(new LineBackgroundListener() {
public void lineGetBackground(LineBackgroundEvent event) {
if (event.lineText.indexOf("SWT") > -1) {
event.lineBackground = red;
}
}
});
}
COM: <s> creates the main windows contents </s>
|
funcom_train/26530149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeDefault(String settingName, boolean isBool) {
String val = null;
if (isBool)
val = (parameters.containsKey(settingName) ? "true" : "false");
else if (parameters.get(settingName) instanceof String)
val = getParameter(settingName);
InternalSettings.set("ev." + settingName, val);
}
COM: <s> save the default value of a setting to the user settings </s>
|
funcom_train/39163750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void okAction() throws GateException{
//Out.println("Visible coords" + this.getVisibleRect().toString());
//Out.println("Size" + this.getBounds().toString());
STreeNode.transferAnnotations(document, currentSet);
} //okAction()
COM: <s> called by the gui when the user has pressed the ok button </s>
|
funcom_train/20308639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document translatePattern( TriplePattern pattern, DIGAdapter da ) {
DIGConnection dc = da.getConnection();
Document query = dc.createDigVerb( DIGProfile.ASKS, da.getProfile() );
Element types = da.createQueryElement( query, DIGProfile.TYPES );
da.addNamedElement( types, DIGProfile.INDIVIDUAL, da.getNodeID( pattern.getSubject() ) );
return query;
}
COM: <s> p answer a query that will list the instances of a concept p </s>
|
funcom_train/19388029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AdapterNode getSelectedNode() {
TreePath selPath = getLeadSelectionPath();
AdapterNode selectedNode = null;
if (selPath != null) {
selectedNode = (AdapterNode)selPath.getLastPathComponent();
}
return selectedNode;
}//}}}
//{{{ cut()
COM: <s> gets the current node that is selected for editing </s>
|
funcom_train/8727747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeRFileHeader(EvolutionState state) {
// Factors: problem, run, gene, fitness, operators, ngenerations,
// popsize, toursize
// Measures: accuracy, size (tree), depth (tree)
state.output
.println(
"Problem\tRun\tGene\tFitness\tOperators\tNGenerations\tPopSize\tTournSize\tGeneration\tAccuracy\tSize\tDepth",
Output.V_NO_GENERAL, rlog);
}
COM: <s> writes the header for the r file which is a constant fixed value </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.