__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/39911168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPage1() {
System.out.println("getPage1");
Page1 instance = new Page1();
Page expResult = null;
Page result = instance.getPage1();
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 page1 method of class timesheetmanagement </s>
|
funcom_train/31907639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireDOMNodeInsertedIntoDocumentEvent() {
AbstractDocument doc = getCurrentDocument();
if (doc.getEventsEnabled()) {
super.fireDOMNodeInsertedIntoDocumentEvent();
for (Node n = getFirstChild(); n != null; n = n.getNextSibling()) {
((AbstractNode)n).fireDOMNodeInsertedIntoDocumentEvent();
}
}
}
COM: <s> recursively fires a domnode inserted into document event </s>
|
funcom_train/26365353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processedMessage(MessageProcessedEvent mpe) {
Message aMsg = (Message)mpe.getSource();
strMessageLog = strMessageLog + "Message To: " + aMsg.getRecipient() +
"\n\tMessage Type: " + aMsg.getType() +
"\n\tMessage Body: " + aMsg.getBody();
}
COM: <s> fired whenever an agent we are listening to processes a message </s>
|
funcom_train/49044685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addActorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ForAllGoalDomain_Actor_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ForAllGoalDomain_Actor_feature", "_UI_ForAllGoalDomain_type"),
EventPackage.Literals.FOR_ALL_GOAL_DOMAIN__ACTOR,
!((ModelObject) object).isPredefined(),
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the actor feature </s>
|
funcom_train/16647876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double normalizationConst(double W)
{
if (this.getP() > 0)
Debug.BUG.print("Normalisation for p > 0 not yet supported!");
// Correct for p = 0
return Math.sqrt(2.0/(Math.PI * Polynomial.factorial(Math.abs(this.getL())))) * (1.0/waist(W));
}
COM: <s> gets the normalization constant </s>
|
funcom_train/18037130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAttributeNamespaceUri(Object contextNode) {
if (debugging) {
log.info("[DocumentNavigator] attribute NS uri");
}
if (!(contextNode instanceof Attribute)) {
throw new IllegalStateException("Cannot retreive attribute name on non-attribute event.");
}
return ((Attribute) contextNode).getName().getNamespaceURI();
}
COM: <s> get the namespace uri of an attribute </s>
|
funcom_train/12781363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean visitVarAssignOp(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) {
return delegate.visitVarAssignOp(n, v, a, pre, c, visitor);
}
COM: <s> visit a var op assignment node after visiting the rhs </s>
|
funcom_train/4917053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGovernance_Enforce() throws Throwable {
// Record enforcing the governance
GovernanceContainer<?, ?> governanceContainer = this
.recordGovernance(new Duty<I, F, Governances>() {
@Override
public void doDuty(DutyContext<I, F, Governances> context)
throws Throwable {
GovernanceManager manager = context
.getGovernance(Governances.GOVERNANCE);
manager.enforceGovernance();
}
});
governanceContainer.enforceGovernance(this.containerContext);
// Test
this.doTest();
}
COM: <s> ensure able to enforce </s>
|
funcom_train/44832767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(java.lang.String value) {
String result = (String) ComponentUtils.invokeMethod(getPage().getHandler(),
getMethod("onSetValue"), new Object[] {value});
this.value = (result != null) ? result : value;
}
COM: <s> setter for property value </s>
|
funcom_train/22027224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRange(double lo, double hi) throws IllegalArgumentException {
if (hi < lo) {
System.out.println("Convert:setRange(" + lo + "," + hi +
") -- swapping lo and hi limits");
range[LO] = hi;
range[HI] = lo;
}
range[LO] = lo;
range[HI] = hi;
}
COM: <s> sets the valid range for the b convert b object </s>
|
funcom_train/45249346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buffer = new StringBuffer();
IConfigurationElement[] children = config.getChildren();
for (int i = 0; i < children.length; i++) {
IConfigurationElement element = children[i];
String label = element.getAttribute(IWorkbenchRegistryConstants.ATT_LABEL);
if(label != null) {
buffer.append(label);
buffer.append('\n');
}
}
return buffer.toString();
}
COM: <s> debugging helper that will print out the contribution names for this </s>
|
funcom_train/4971694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createAndShowGUI() {
// Create and set up the window.
JFrame frame = new JFrame("Progress'ik");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setUndecorated(true);
frame.setLocationRelativeTo(null);
// Create and set up the content pane.
JComponent newContentPane = new ProgressBar();
newContentPane.setOpaque(true); // content panes must be opaque
frame.setContentPane(newContentPane);
// Display the window.
frame.pack();
frame.setVisible(true);
}
COM: <s> create the gui and show it </s>
|
funcom_train/43883364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
Iterator iter = files.values().iterator();
VPFFile file = null;
while (iter.hasNext()) {
try {
file = (VPFFile) iter.next();
file.close();
} catch (Exception exc) {
// No idea why this might happen
exc.printStackTrace();
}
}
files.clear();
}
COM: <s> closes all of the opoen files and removes them from the collection of </s>
|
funcom_train/12768151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void widgetSelected(SelectionEvent e) {
StackLayout layout = (StackLayout)getLayout();
Event event = new Event();
if (layout.topControl == left) {
event.detail = (horizontal ? SWT.UP : SWT.LEFT);
layout.topControl = right;
} else {
event.detail = (horizontal ? SWT.DOWN : SWT.RIGHT);
layout.topControl = left;
}
this.layout();
event.item = layout.topControl;
event.widget = this;
fireWidgetSelectedEvent(new SelectionEvent(event));
}
COM: <s> fires a selection event indicating which button was clicked </s>
|
funcom_train/49605631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element searchElement(Event event) {
Element element = null;
NodeList list = doc.getElementsByTagName("event");
loopEvent: for (int i = 0; i < list.getLength(); i++) {
if (((Element) list.item(i)).hasAttribute("code")
&& Integer.parseInt(((Element) list.item(i))
.getAttribute("code")) == event.getCode()) {
element = (Element) list.item(i);
break loopEvent;
}
}
return element;
}
COM: <s> method responsible for searching </s>
|
funcom_train/39534715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeCurrentGradientItem(){
if(currentItem!=null){
SVGVisualResourceObjectChild resChild=currentItem.getResourceObjectChild();
if(resChild!=null){
synchronized(this){isModified=true;}
resourceObject.removeChildResource(resChild);
}
gradientItems.remove(currentItem);
setCurrentItem(null);
}
}
COM: <s> removes a gradient item from the list </s>
|
funcom_train/33294794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String print(Collection objects) throws FormatException {
StringWriter writer = new StringWriter();
// the IOException should never be thrown because
// we are using StringWriter
try {
print(writer, objects);
} catch (IOException e) {
throw new FormatException("UNEXPECTED_INTERNAL_ERROR", e);
}
return writer.toString();
}
COM: <s> returns formatted string using given objects </s>
|
funcom_train/31679361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object that) {
if (that instanceof String) {
return equals((String) that);
} else if (that instanceof CharArray) {
return equals((CharArray) that);
} else if (that instanceof CharSequence) {
return equals((CharSequence) that);
} else {
return false;
}
}
COM: <s> compares this character sequence against the specified object </s>
|
funcom_train/2635587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double integrate(double from, double to) {
if (this.spread==0) return 0;
// set the boundaries for interior use
if (from<0) from=0;
if (to>this.getSpread()) to=this.getSpread();
return to-from+(Math.pow(from, 3) - Math.pow(to, 3))/(3*Math.pow(spread, 2));
}
COM: <s> calculates the integral of the membership function </s>
|
funcom_train/41165336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoParagraph entity) {
EntityManagerHelper.log("deleting CoParagraph instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoParagraph.class, entity.getParagraphId());
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 paragraph entity </s>
|
funcom_train/46403973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawBattlefield() {
BufferStrategy bf = this.getBufferStrategy();
if (bf != null) {
Graphics g = bf.getDrawGraphics();
g.translate(0, this.getInsets().top);
g.clearRect(0, 0, WIDTH, HEIGHT);
surface.draw(g);
drawWeapons(g);
drawBonusPoint(g);
drawBots(g);
bf.show();
// Tell the System to do the Drawing now, otherwise it can take a
// few extra ms until drawing is done
Toolkit.getDefaultToolkit().sync();
g.dispose();
}
}
COM: <s> battlefield drawing method uses </s>
|
funcom_train/11321025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isFormValid() {
// If credit payment option is specified, ensure credit criteria is provided
if (paymentGroup.getValue().equals("credit")) {
cardHolder.setRequired(true);
cardHolder.validate();
cardNumber.setRequired(true);
cardNumber.validate();
cardExpiry.setRequired(true);
cardExpiry.validate();
}
return form.isValid();
}
COM: <s> perform additional form cross field validation returning true if valid </s>
|
funcom_train/13874783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOverriddenPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ImperativeOperation_overridden_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ImperativeOperation_overridden_feature", "_UI_ImperativeOperation_type"),
QvtoperationalPackage.Literals.IMPERATIVE_OPERATION__OVERRIDDEN,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the overridden feature </s>
|
funcom_train/5576509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getContent(URLConnection urlc) throws IOException {
List<String> list = new LinkedList<String>();
LineNumberReader reader = new LineNumberReader(new InputStreamReader(urlc.getInputStream()));
for (String line = reader.readLine(); line != null; line = reader.readLine()) {
line.trim();
if ("".equals(line) || line.startsWith("#")) {
continue;
}
list.add(line);
}
return list;
}
COM: <s> given a connection reads a m3 u playlist and retrieves its contents </s>
|
funcom_train/27903530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(GXLElement child, int index) {
// Validate this insertion (throws on error)
GXLValidator.validateInsertion(gxlDocument, this, child);
// All checks finished, make the insert
GXLTreeModification mod = new GXLTreeModification(child, null, this, -1, index);
mod.execute();
}
COM: <s> inserts the specified child into this elements child array at the specified index </s>
|
funcom_train/7253599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept( File dir, String name )
{
File fileOrDir = null ;
fileOrDir = new File( dir, name ) ;
if ( fileOrDir.isDirectory() )
{
if ( this.mustIncludeDirectories() )
return true ;
if ( this.mustExcludeDirectories() )
return false ;
}
return ( this.checkAgainstPatterns( name ) ) ;
} // accept()
COM: <s> tests if a specified file should be included in a file list </s>
|
funcom_train/16678949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initDatapool() {
if (datapool == null || messageHandler == null) {
try {
datapool = DatapoolManager.getDatapool(this.getRobotName( ));
messageHandler = datapool.getHandler( );
}
catch (DatapoolException e) {
// logClass.error(this.robotName,"Error " +
// e.getMessage() + Constants.LINE_SEPARATOR, e);
}
}
}
COM: <s> initializes the datapool and message handler for the robot of </s>
|
funcom_train/18480637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelected(int sel) {
if (sel >= 0 && sel >= buttons.size()) {
return ;
}
if (curr_selected != sel) {
curr_selected = sel ;
if (curr_selected >= 0) {
AbstractButton button = buttons.get(curr_selected) ;
setToolTipText(button.getToolTipText()) ;
}
fireChangeListeners(new ChangeEvent(this)) ;
}
}
COM: <s> sets the currently selected button </s>
|
funcom_train/8311757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration namedAccessIterator(Object contextNode, ContextSupport support, String localName, String namespacePrefix, String namespaceURI) throws UnsupportedAxisException {
NamedAccessNavigator nav = ((NamedAccessNavigator) (support.getNavigator()));
return nav.getChildAxisIterator(contextNode, localName, namespacePrefix, namespaceURI);
}
COM: <s> gets an iterator for the child xpath axis that supports named access </s>
|
funcom_train/22050227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GenericBaseData InitIterationIncludeDeleted(BRIterator it) {
it.SetPos(0);
GenericBaseData data = GetElement(it.GetPos()); // get element return 0 if element does not exist
if (data == null) {
return null;
}
if (data.isDeleted()) {
return GetNextIterationIncludeDeleted(it);
}
return data;
}
COM: <s> this function just returns the first in the array </s>
|
funcom_train/49427820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMinSize(int width, int height) {
if(width < 0 || height < 0) {
throw new IllegalArgumentException("negative size");
}
minWidth = (short)Math.min(width, Short.MAX_VALUE);
minHeight = (short)Math.min(height, Short.MAX_VALUE);
}
COM: <s> sets the minimum size of the widget </s>
|
funcom_train/41506713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long doStatus(File path, boolean recursive, boolean remote, boolean reportAll, boolean includeIgnored, boolean collectParentExternals, final ISVNStatusHandler handler, boolean showMissing) throws SVNException {
return doStatus(path, SVNRevision.HEAD, recursive, remote, reportAll, includeIgnored, collectParentExternals, handler, showMissing);
}
COM: <s> collects status information on working copy items and passes </s>
|
funcom_train/31455212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Resource getResource() {
RDFModel model = getLoadModel();
if (resource == null) {
if (model != null)
try {
resource = model.getResource(getURI());
return resource;
} catch (Exception re) {
re.printStackTrace();
}
resource = new ResourceImpl(getURI());
}
return resource;
}
COM: <s> returns the jena component corresponding to this rdfcomponent </s>
|
funcom_train/43664042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addXModelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BModel_xModel_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BModel_xModel_feature", "_UI_BModel_type"),
XmdlboPackage.Literals.BMODEL__XMODEL,
false,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
getString("_UI_BaseModelPropertyCategory"),
null));
}
COM: <s> this adds a property descriptor for the xmodel feature </s>
|
funcom_train/42822027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand() {
if (exitCommand == null) {//GEN-END:|18-getter|0|18-preInit
// write pre-init user code here
exitCommand = new Command("Exit", Command.SCREEN, 0);//GEN-LINE:|18-getter|1|18-postInit
// write post-init user code here
}//GEN-BEGIN:|18-getter|2|
return exitCommand;
}
COM: <s> returns an initiliazed instance of exit command component </s>
|
funcom_train/5446810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleBusEvent(BusEvent event) {
if(event.getType().equals("ServletManager")) {
BusMemberInterface bmi = (BusMemberInterface) event.getSource();
System.out.println("Name = " + bmi.getName());
System.out.println("Desc = " + bmi.getDescription());
jsm = (ServletManager) bmi.getHandle();
}
}
COM: <s> handles incoming events from the bus member </s>
|
funcom_train/12115165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(){
cellStack.push(currentCellList);
slotStack.push(currentSlotList);
charStack.push(currentCharList);
filledStack.push(currentFilledList);
currentCellList = new Vector<Cell>();
currentSlotList = new Vector<Slot>();
currentFilledList = new Vector<Boolean>();
currentCharList = new Vector<Character>();
}
COM: <s> saves modified slots to stack to restore values </s>
|
funcom_train/36493932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String read() {
try {
this.data = this.templatesManager.readCustomTemplate(this.space);
if (this.data == null) {
this.data = this.templatesManager.readDefaultTemplate();
}
} catch (LocalizedException exception) {
this.log.warn(exception.getMessage(), exception);
this.addActionError(exception.getMessage());
}
return SUCCESS;
}
COM: <s> p read and display the current template </s>
|
funcom_train/17705709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recordBackward(char leftMotor, char rightMotor, int speed){
this.nxcCode.append(" // Move Backward\n");
this.nxcCode.append(" OnRev(OUT_" + leftMotor + ", " + Math.abs(speed) + ");\n");
this.nxcCode.append(" OnRev(OUT_" + rightMotor + ", " + Math.abs(speed) + ");\n");
}
COM: <s> records the backward movement for nxt </s>
|
funcom_train/33991605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printDomNEW( Node n, String prefix ) {
//if ( log.isDebugEnabled() ) {
StringBuilder sb = new StringBuilder( "\n" );
//ExtensibleClient.printDom( n, prefix, sb );
printDom2( n, prefix, sb );
log.debug( sb.toString() );
//}
}
COM: <s> prints out the dom tree </s>
|
funcom_train/3379814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int readFully(byte[] inBuf, int total) throws IOException {
int count, pos = 0;
while (total > 0) {
count = in.read(inBuf, pos, total);
if (count == -1) {
return (pos == 0? -1 : pos);
}
pos += count;
total -= count;
}
return pos;
}
COM: <s> read requested number of bytes before returning </s>
|
funcom_train/15407474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDiscriminatorValue(String value) {
if (value != null){
value = value.trim();
if (value.length() == 0){
value = null;
} else {
discriminatorStringValue = value;
// convert the value if desired
if (discriminatorType == Types.INTEGER){
this.discriminatorObjectValue = Integer.valueOf(value.toString());
} else {
this.discriminatorObjectValue = value;
}
}
}
}
COM: <s> set the discriminator value for this node </s>
|
funcom_train/8529739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IResult iterateAlgorithm() {
if(!initialized){
currentIteration = 0;
initialized = true;
currentIteration++;
return getBestResultFromIteration(algorithm.initialize());
}
currentIteration++;
List<IResult> results = algorithm.iterate();
checkBestResult(results);
return getBestResultFromIteration(results);
}
COM: <s> in single iteration mode calculates next iteration result </s>
|
funcom_train/14327091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String readParameter(HttpServletRequest request, String parameterPrefix) {
StringBuffer buff = new StringBuffer();
String chunk;
int counter = 0;
while ((chunk = request.getParameter(parameterPrefix + counter)) != null) {
buff.append(chunk);
counter++;
}
return buff.length() > 0 ? buff.toString() : null;
}
COM: <s> reads those paramters from requests whcih might have values longer than 255 chars </s>
|
funcom_train/29771270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDefaultNameStorage() throws Exception {
System.out.println("getDefaultNameStorage");
StartupFileSetup instance = new StartupFileSetup();
NameStorage expResult = null;
NameStorage result = instance.getDefaultNameStorage();
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 default name storage method of class io </s>
|
funcom_train/7732616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int connect() {
// if (ld == null) {
// discover();
// }
try {
con = (StreamConnection) Connector.open(btConnectionURL);
in = con.openInputStream();
openedStream = true;
} catch (IOException ex) {
openedStream = false;
}
return openedStream ? 1 : -1;
}
COM: <s> connect the bt device </s>
|
funcom_train/31680097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public L rotateRight(L list, final int n) {
if (n <= size()) {
for (int i = fEnd - n; i < fEnd; i++) {
list.add(fList.get(i));
}
for (int i = fStart; i < fEnd - n; i++) {
list.add(fList.get(i));
}
}
return list;
}
COM: <s> rotate the ranges elements to the right by n places and append the </s>
|
funcom_train/8905837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setMemberToActivePos(Player p, int position) throws AdvworldException {
if (member(p)) {
int pos = posInActiveParty(p);
if ((position == 0 || pos == 0) && leaderStatic) {
println("Cannot change leader");
return false;
}
if (pos == noPos) {
actives[position] = p;
} else if (position != pos) {
Player temp = actives[position];
actives[position] = p;
actives[pos] = temp;
}
return true;
} else throw new AdvworldException();
}
COM: <s> changes the player p to the a new position </s>
|
funcom_train/10509781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassLoader getClassLoader() {
if (myClassLoader == null) {
myClassLoader = (classpath == null)
// the usual classloader
? getClass().getClassLoader()
// additional use the provided classpath
// Memory leak in line below
: getProject().createClassLoader(classpath);
}
return myClassLoader;
}
COM: <s> returns and initializes the classloader for this class </s>
|
funcom_train/18570209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(BundleContext context) throws Exception {
super.start(context);
ISaveParticipant saveParticipant = new SaveParticipant();
ISavedState lastState = ResourcesPlugin.getWorkspace()
.addSaveParticipant(this, saveParticipant);
if (lastState == null)
return;
IPath location = lastState.lookup(new Path("save"));
if (location == null)
return;
// the plugin instance should read any important state from the file.
File f = getStateLocation().append(location).toFile();
readStateFrom(f);
}
COM: <s> this method is called upon plug in activation </s>
|
funcom_train/34642056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getOffsetAfter(AbstractAtgAstNode last, ATGSymbol sym) {
//rel Start in ProductionText
int start = last.getRegion().getOffset() +
last.getRegion().getLength() -
productionNode.getRegion().getOffset();
//rel Offset
int offset = productionText.indexOf(sym.getSymbol(), start);
if (offset > 0) {
//abs offset
return offset + productionNode.getRegion().getOffset();
}
return -1;
}
COM: <s> computes offset of sym that follows after last </s>
|
funcom_train/12564314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImage(final RasterImage image, final String uri) {
// This is done to handle situations where the href/parent
// or other change occur while the image is loading.
if (absoluteURI != null && absoluteURI.equals(uri)) {
if (this.image != image) {
modifyingNode();
this.image = image;
modifiedNode();
}
}
}
COM: <s> sets the nodes image if the computed absolute uri </s>
|
funcom_train/21016999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean pollLine(TextArea textArea, Caret lineToMove) {
boolean result = false;
if (isRemoveLineAllowed(lineToMove)) {
IElement line = lineToMove.removeElement();
if (line != null) {
textArea.add(line);
result = true;
}
// make sure that always a line exists in a text-area
IComposite composite = lineToMove.getComposite();
if (composite.isEmpty()) {
Line newLine = new Line(0);
composite.add(newLine);
}
}
return result;
}
COM: <s> polls the specified line to the given text area </s>
|
funcom_train/27844828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPutAll() throws Exception {
Map testMap2 = new HashMap();
testMap2.put("key3", "value3");
testMap2.put("key4", "value4");
_mapmodel.putAll(testMap2);
assertEquals(ModelChangeTypes.VALUE_CHANGED, _modelWrapper.getValueChange(_mapmodel.getPointerToRoot()));
}
COM: <s> method test put all is testing put all </s>
|
funcom_train/10912354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setForeignAttributes(Map<QName, String> atts) {
if (atts == null || atts.size() == 0) {
return;
}
for (Map.Entry<QName, String> e : atts.entrySet()) {
setForeignAttribute(e.getKey(), e.getValue());
}
}
COM: <s> add foreign attributes from a map </s>
|
funcom_train/44869471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WCMDrawGeometricBean getVelocityVector() {
if (velocityVector == null) {
velocityVector = new WCMDrawGeometricBean();
velocityVector.setColor(Color.blue);
velocityVector.setX1(getXOfT());
velocityVector.setY1(getYofT());
velocityVector.setX2(getXPrimeOfT());
velocityVector.setY2(getYPrimeOfT());
velocityVector.setShape(WCMDrawGeometricBean.LINE_RELATIVE);
velocityVector.setArrowDirection(WCMDrawGeometricBean.ARROW_HEAD);
if (presentation) {
velocityVector.setLineWidth(3);
}
}
return velocityVector;
}
COM: <s> this method initializes velocity vector </s>
|
funcom_train/39810812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAllForProduct(int id) throws SQLException {
List retList = new ArrayList();
try {
this.conn = this.openConnection();
PreparedStatement ps =
conn.prepareStatement(IncidentSQL.GET_ALL_FOR_PRODUCT);
ps.setInt(1, id);
ResultSet rs = ps.executeQuery();
while (rs.next()) {
IncidentVO newIncident = new IncidentVO(rs);
retList.add(newIncident);
}
} finally {
this.closeConnection();
}
return retList;
}
COM: <s> returns all incidents for a given product </s>
|
funcom_train/11343623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof AdminPermission)) {
return false;
}
AdminPermission ap = (AdminPermission) obj;
return (action_mask == ap.action_mask)
&& ((bundle == ap.bundle) || ((bundle != null) && bundle
.equals(ap.bundle)))
&& (filter == null ? ap.filter == null : filter
.equals(ap.filter));
}
COM: <s> determines the equality of two code admin permission code objects </s>
|
funcom_train/18049876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addXquery(Xquery xquery){
Hashtable<String, Xquery> colTable = xqueries.get(xquery.getColumnId());
if (colTable == null){
colTable = new Hashtable<String, Xquery>();
xqueries.put(xquery.getColumnId(), colTable);
}
colTable.put(xquery.getXsdType(), xquery);
}
COM: <s> adds the xquery </s>
|
funcom_train/33513399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void abortRegionServer(int serverNumber) {
HRegionServer server = getRegionServer(serverNumber);
try {
LOG.info("Aborting " + server.getHServerInfo().toString());
} catch (IOException e) {
e.printStackTrace();
}
server.abort();
}
COM: <s> cause a region server to exit without cleaning up </s>
|
funcom_train/30229454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void On_b_uno() {
if (!game.gameOver()) {
game.setCalledUNO();
if (game.getCurPlayer()==UNOController.HUMAN)
l_info.setText("UNO! Ok, now choose your card!");
else
l_info.setText("Player " + game.getCurPlayer() + " has declared UNO!");
}
else {
b_sort.setEnabled(true);
game.startNewHand();
}
updateControls();
}
COM: <s> mutator protects a player about to have one card </s>
|
funcom_train/44136591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifySndMediaSet(OSMElement elt) {
for(int i = 0;i < m_ClientList.size();i++) {
OSMElementEventListener lster = (OSMElementEventListener)m_ClientList.get(i);
lster.onSndMediaSet(new OSMElementEvent(elt));
}
}
COM: <s> to notify the set of a sound media </s>
|
funcom_train/5372196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ensureSize(int numLines) {
int size = visualLines.length;
if (size >= numLines) {
return;
}
int[][] newLines = new int[Math.max(size * 2, numLines)][2];
System.arraycopy(visualLines, 0, newLines, 0, size);
visualLines = newLines;
resetVisualLines(size, visualLines.length - size);
}
COM: <s> grow the lines array to at least the specified size </s>
|
funcom_train/49626699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String postConvert(final String suffix) {
StringBuilder converted = new StringBuilder();
for (int i = 0; i < suffix.length(); i++) {
String c = suffix.substring(i, i + 1);
if (URL_SAFE_CHARACTERS.indexOf(c) > -1) {
converted.append(c);
} else if (c.equals(" ")) {
converted.append("-");
} else if (OMIT_CHARACTERS.indexOf(c) > -1) {
continue;
} else {
converted.append(SUBSTITUTION_CHARCTER);
}
}
return converted.toString();
}
COM: <s> conversion method which is run after the locale based </s>
|
funcom_train/15715989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent event) {
if (IPreferenceConstants.SHOW_SEARCH_BOX.equals(event.getProperty())) {
if (Boolean.FALSE.equals(event.getNewValue()) || "false".equals(event.getNewValue())) {
searchBox.setVisible(false);
} else {
searchBox.setVisible(true);
}
searchManager.markDirty();
coolBarManager.update(true);
}
}
COM: <s> listen to the ipreference constants </s>
|
funcom_train/34451239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addObjectsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_MIncarnation_objects_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_MIncarnation_objects_feature",
"_UI_MIncarnation_type"),
RuntimePackage.Literals.MINCARNATION__OBJECTS, true, false,
false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the objects feature </s>
|
funcom_train/25098528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOrderPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AXLOperation_order_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AXLOperation_order_feature", "_UI_AXLOperation_type"),
TransactioneditorPackage.Literals.AXL_OPERATION__ORDER,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the order feature </s>
|
funcom_train/33831187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
if (socket == null) return;
try {
logger.info("Closing connection to host");
socket.close();
logger.info("Connection to host closed");
} catch (IOException e) {
throw logAndThrow("Cannot close connection", e);
}
}
COM: <s> closes this connection </s>
|
funcom_train/35164713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void restoreContent() {
try {
File saveFile = new File(Settings.get("savedContent"));
BufferedReader input = new BufferedReader(new FileReader(saveFile));
StringBuffer restore = new StringBuffer();
while( true ) {
String line = input.readLine();
if( line == null ) { break; }
restore.append(line);
restore.append("\n");
}
_note.setText(restore.toString());
input.close();
} catch (FileNotFoundException fnfx) {
//TODO: add a popup to taskbar for unable to open file
} catch (IOException iox) {
}
}
COM: <s> restores the previous content of the note from the last time it was </s>
|
funcom_train/45622811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBootstrapperKeyFilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GenerateBootstrapperType_bootstrapperKeyFile_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GenerateBootstrapperType_bootstrapperKeyFile_feature", "_UI_GenerateBootstrapperType_type"),
MSBPackage.eINSTANCE.getGenerateBootstrapperType_BootstrapperKeyFile(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the bootstrapper key file feature </s>
|
funcom_train/35838743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setFontStyle(PCSession session, String sViewID, Vector vtPositions, int nFontStyle) throws SQLException {
//
// DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ;
//
// boolean successful = DBViewNode.setFontStyle(dbcon, sViewID, vtPositions, nFontStyle);
//
// getDatabaseManager().releaseConnection(session.getModelName(),dbcon);
return true;
}
COM: <s> set the font style for the given node position objects </s>
|
funcom_train/45643379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeAction(String name) {
if (MessageDialog.openQuestion(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Remove an Alphabet", "Are you sure you want to remove the '" + name + "' alphabet?")) {
tempAlphas.remove(getAlphabet(name));
fillTable();
editButton.setEnabled(false);
removeButton.setEnabled(false);
defaultButton.setEnabled(false);
updateCharset(null);
}
}
COM: <s> will be performed after the remove button has been clicked </s>
|
funcom_train/25494241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CRect envelope(CRect cr) {
if (cr == null) return this;
CRect cout = new CRect(x1, y1, x2, y2);
if (cr.x1 < x1) cout.x1 = cr.x1;
if (cr.y1 < y1) cout.y1 = cr.y1;
if (cr.x2 > x2) cout.x2 = cr.x2;
if (cr.y2 > y2) cout.y2 = cr.y2;
cout.width = cout.x2 - cout.x1;
cout.height = cout.y2 - cout.y1;
return cout;
}
COM: <s> creates a new rectangle containing itself and the second rectangle </s>
|
funcom_train/31147038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enqueue(QueueElementIF buf) throws SinkException {
if (isClosed()) throw new SinkClosedException("ATcpConnection closed");
if (buf == null) throw new BadQueueElementException("ATcpConnection.enqueue got null element", buf);
aSocketMgr.enqueueRequest(new ATcpWriteRequest(this, (BufferElement) buf));
}
COM: <s> enqueue an outgoing packet to be written to this socket </s>
|
funcom_train/22782290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateView(Filter newFilter, Comparator<Image> newSorting) {
// update filter
boolean filterRequired = (filter != newFilter);
filter = newFilter;
// update comparator
boolean sortingRequired = (comparator.comparator != newSorting);
comparator = new SaveComparator(newSorting);
// update content
if (filterRequired) {
// will also sort
filter();
} else if (sortingRequired) {
// just sort
sort();
}
}
COM: <s> update filter and sorting at once so common operations has only been </s>
|
funcom_train/43667152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setBounds(new Rectangle(118, 252, 81, 22));
jButton.setText("Salvar");
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
facade.setSubscetionComments(jEditorPane.getText());
dispose();
}
});
}
return jButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/17162996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getDescargarbut() {
if (descargarbut == null) {
descargarbut = new JButton();
descargarbut.setLocation(new Point(56, 71));
descargarbut.setText("Descargar");
descargarbut.setBackground(new Color(0, 0, 153));
descargarbut.setForeground(Color.white);
descargarbut.setSize(new Dimension(124, 25));
descargarbut.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
principal.descargar(rutadltxt.getText());
}
});
}
return descargarbut;
}
COM: <s> this method initializes descargarbut </s>
|
funcom_train/4150846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() throws InterruptedException {
if(ReaxionSettingsPanel.prompt(game.getSettings()))
game.start();
GameTaskQueueManager.getManager().update(new GameInit());
screenWidth = DisplaySystem.getDisplaySystem().getWidth();
screenHeight = DisplaySystem.getDisplaySystem().getHeight();
music = game.getSettings().isMusic();
sfx = game.getSettings().isSFX();
}
COM: <s> start up the system </s>
|
funcom_train/14070762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendModuleLevel(String moduleId,int level) {
HouseCommand msg = new HouseCommand();
msg.setType(HouseCommand.Type.MODULE);
msg.setCommand(DeviceCommand.On);
msg.setIdentifier(moduleId);
msg.setDeviceLevel(level);
sender.send(msg);
}
COM: <s> sends a command to change the status of the physical module </s>
|
funcom_train/44679643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int bin(double angle, int binCount) {
Assert.isTrue(angle >= -Math.PI);
Assert.isTrue(angle <= Math.PI);
double binSize = 2 * Math.PI / binCount;
int bin = (int) Math.floor((angle + Math.PI) / binSize);
return Math.min(bin, binCount - 1); //360 case
}
COM: <s> returns the histogram bin that the angle should go into </s>
|
funcom_train/44706161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cellSelected(TableActionEvent e) {
PageState s = e.getPageState();
if ( e.getSource() == this ) {
m_editKit.setSelected(s, false);
m_addStep.setSelected(s, false);
m_viewContentType.setSelected(s, false);
}
}
COM: <s> listener for the step table </s>
|
funcom_train/16773360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetOwner() {
System.out.println("Expenditure - getOwner");
Expenditure exp = new Expenditure();
Person owner = new Person();
owner.setSurname("surname");
owner.setGivenname("givenname");
owner.setAlias("alias");
owner.setMail("mail");
exp.setOwner(owner);
Person result = exp.getOwner();
assertEquals(owner, result);
}
COM: <s> test of get owner method of class expenditure </s>
|
funcom_train/9546281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exportToXml(File file) {
log.debug("Export Hosts to an XML File");
try {
OutputFormat format = OutputFormat.createPrettyPrint();
OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(file), "UTF-8");
XMLWriter writer = new XMLWriter(out, format);
writer.write(getDocument());
writer.close();
} catch (IOException e) {
System.out.println(e);
}
}
COM: <s> saves host postion location gnp position groups gnp space ping er </s>
|
funcom_train/29706568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void move( double nanoSeconds, double aX, double aY ){
double seconds = nanoSeconds * 1e-9;
vx += ( environment.getGravityX( position ) + aX ) * seconds;
vy += ( environment.getGravityY( position ) + aY ) * seconds;
double newX = position.getX() + vx * seconds;
double newY = position.getY() + vy * seconds;
position.setLocation( newX, newY );
}
COM: <s> calculate new position based on the speed and given time interval </s>
|
funcom_train/22718464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeDataType(DataType dataType) throws IOException {
writeStartElement(FileOpener.XML_ELEMENT_DATATYPE, true);
writeType(String.valueOf(dataType.getTypeId()));
if (dataType.hasPrecision()) writePrecision(dataType.getPrecision());
writeEndElement(FileOpener.XML_ELEMENT_DATATYPE, true);
}
COM: <s> write the datatype element part of the field element </s>
|
funcom_train/23938681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransport(String transport) throws ContainerException {
if ((transport.compareTo(SOCKET) == 0) || (transport.compareTo(DATAGRAM) == 0)) {
this.transport = transport;
} else {
throw new ContainerException("Container 'transport' must be 'socket' or 'datagram'.");
}
}
COM: <s> sets the type of container either socket or datagram </s>
|
funcom_train/17458662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setSize(300, 200);
this.setContentPane(getJContentPane());
this.setTitle("Title");
this.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
System.out.println("windowClosing()"); // TODO Auto-generated Event stub windowClosing()
}
});
}
COM: <s> this method initializes this </s>
|
funcom_train/48528328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void leafSetChange(NodeHandle nh, boolean wasAdded) {
if (logger.level <= Logger.FINEST) {
String s = "In " + getNodeId() + "'s leaf set, " + "node " + nh.getNodeId()
+ " was ";
if (wasAdded)
s += "added";
else
s += "removed";
System.out.println(s);
}
}
COM: <s> invoked upon change to leafset </s>
|
funcom_train/32056657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsForceMarqueeEvent() {
System.out.println("testIsForceMarqueeEvent");
Button b = new Button();
MouseEvent e = new MouseEvent(b, 1, 1, 1, 1, 1, 1,false);
BasicMarqueeHandler bm = new BasicMarqueeHandler();
bm.isForceMarqueeEvent(e);
}
COM: <s> this function tests is force marquee event function of vertex view class </s>
|
funcom_train/25422205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SearchCriteria readSessionCriteria() {
FacesContextBroker broker = new FacesContextBroker();
@SuppressWarnings("unused")
FacesContext fc = broker.getFacesContext();
fc.getApplication().getViewHandler().createView(fc, SEARCH_PAGE);
// intentionally not used
SearchCriteria criteria =
(SearchCriteria) broker.resolveManagedBean(JSFBEAN_SEARCH_CRITERIA);
return criteria;
}
COM: <s> read search criteria from the session </s>
|
funcom_train/47826237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkAccess(SLATemplate slaTemplate) {
boolean allowed = false;
try {
allowed = this.context.getAuthorization().checkAccess(slaTemplate);
}
catch (SLAManagerContextException e) {
e.printStackTrace();
}
LOGGER.info("*** INFO *** MessageHandler - checkAccess - returning ***" + allowed);
return allowed;
}
COM: <s> checks if the invokee has access to initiate negotiation with this sla manager </s>
|
funcom_train/48145730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JFreeChart getPieChart(String title, JTable table, int[][] pairs, String other){
dataTable = table;
columnModel = dataTable.getColumnModel();
no_series = 1;
setOtherCondition(other);
setArrayFromTable(1, pairs);
DefaultPieDataset dataset = createPieDataset();
JFreeChart chart = createPieChart(title, dataset);
return chart;
}
COM: <s> this will generate a pie chart </s>
|
funcom_train/3814320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toDetailedString() {
StringBuilder result = new StringBuilder().append(word).append(' ');
for (Unit unit : units) {
result.append(unit).append(' ');
}
result.append("\n class: ").append(wordClassification)
.append(" tag: ").append(tag).append(" prob: ").append(probability);
return result.toString();
}
COM: <s> returns a detailed string representation of this pronunication </s>
|
funcom_train/38533025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(ListSelectionEvent e) {
if ( e != null && e.getValueIsAdjusting() ) {
return;
}
int count = tableRunConfigurations.getSelectedRowCount();
if ( count > 0 ) {
actionDelete.setEnabled(true);
buttonDelete.setEnabled(true);
}
else {
actionDelete.setEnabled(false);
buttonDelete.setEnabled(false);
}
}
COM: <s> when a user clicks a item in the table of run configurations </s>
|
funcom_train/34260340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setup() {
pack();
this.setResizable(true);
this.setLocationRelativeTo(this.getParent());
new GuiHelper.AutoSizeHelper(this);
GuiHelper.makeTabbedPaneNavigable(tabbedPane);
getRootPane().setDefaultButton(this.okButton);
this.validateDialog();
}
COM: <s> sets up the dialog </s>
|
funcom_train/27947230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectAtom(int x, int y) {
int smallest = getNearestAtom(x, y);
if (pickedAtoms[smallest]) {
pickedAtoms[smallest] = false;
} else {
pickedAtoms[smallest] = true;
}
for (int i = 0; i < nvert; i++) {
if (i != smallest) pickedAtoms[i] = false;
}
napicked = 1;
}
COM: <s> clear out the list of picked atoms find the nearest atom to a </s>
|
funcom_train/26019050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GenericSipSession initiateSession(String contact, String featureTag, String offer) {
if (logger.isActivated()) {
logger.info("Initiate a session with contact " + contact);
}
// Create a new session
OriginatingSipSession session = new OriginatingSipSession(
this,
PhoneUtils.formatNumberToSipUri(contact),
featureTag,
offer);
// Start the session
session.startSession();
return session;
}
COM: <s> initiate a session </s>
|
funcom_train/35722287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateViewportListeners(int origin) {
if (redraws()) {
int topPixel= fTextWidget.getTopPixel();
if (topPixel >= 0 && topPixel != fLastTopPixel) {
if (fViewportListeners != null) {
for (int i= 0; i < fViewportListeners.size(); i++) {
IViewportListener l= (IViewportListener) fViewportListeners.get(i);
l.viewportChanged(topPixel);
}
}
fLastTopPixel= topPixel;
}
}
}
COM: <s> checks whether the view port changed and if so informs all registered </s>
|
funcom_train/4557898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSignUpSelectMonthFromDropDownList() {
repEng.newStep("326", "Sign up-Select Month from the dropdown list");
//1. Launch http://hobbes.ontometrics.com/magnetportal/
//2. Click the Manage You Assets link.
//3. Click the Publish Magnet link in the Albums/Tracks page.
//4. Click the cart icon.
//5. Click Sign up button.
//6. Select Month from the dropdown list.
// The dropdown list is enabled, and the options is from 1 to 12.
}
COM: <s> 326 sign up select month from the dropdown list </s>
|
funcom_train/17362354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnChangeA() {
if (btnChangeA == null) {
btnChangeA = new JButton();
btnChangeA.setBounds(new Rectangle(148, 28, 106, 23));
btnChangeA.setText("Change");
btnChangeA.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
showChangeDirDialog(arhiveFolderV);
}
});
}
return btnChangeA;
}
COM: <s> this method initializes btn change a </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.