__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/47274636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean visit(LeafNode node) throws Exception {
// Return first that rejects this node
for (Filter f : filters_) {
if ( !f.canVisit(node)) {
return false;
}
}
LogWriter.out().println( ">" + ((CodeBlock)node.getUserObject()).getText() );
for (Operation op : operators_) {
op.visit( node );
}
return true;
}
COM: <s> execute this node </s>
|
funcom_train/1600876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean release( Object o ) {
if( super.release( o ) == true ) {
progressBar.setStringPainted(false);
setPercent(0.0, null);
setMessage(notWorkingMessage,null);
progressBar.setVisible(false);
cancel.setVisible(false);
this.thread = null;
return true;
}
else {
return false;
}
}
COM: <s> method to check whether an object instance was released by the progress bar </s>
|
funcom_train/8148622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processResponseLinks(WebResponse response) {
try {
for (WebLink link : response.getLinks()) {
processLink(link);
if (this.isStopCondition()) {
break;
}
}
}
catch (SAXException e) {
e.printStackTrace();
}
catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> add links to the web responses hash from a response object </s>
|
funcom_train/18030079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DatumRange getValidRange( Map attrs, Units units ) {
Double max = doubleValue(attrs.get("VALIDMAX"), units);
Double min = doubleValue(attrs.get("VALIDMIN"), units);
if ( max==null || min==null ) return null;
return DatumRange.newDatumRange(min, max, units);
}
COM: <s> return the valid range found in the metadata or null </s>
|
funcom_train/45483568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createLabel() {
GridData labelGridData = new GridData();
labelGridData.horizontalAlignment = GridData.FILL;
labelGridData.grabExcessHorizontalSpace = true;
labelGridData.verticalSpan = 10;
labelGridData.verticalAlignment = GridData.CENTER;
CLabel label = new CLabel(shell, SWT.NONE);
label.setText("Can't buy selected good, I'm sorry");
label.setLayoutData(labelGridData);
}
COM: <s> this method initializes the label </s>
|
funcom_train/12804543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getChildValue(String aName) {
if (children == null) {
return null;
}
else {
for (int i = 0; i < children.size(); i++) {
if (aName.equals(((Property)children.get(i)).getName())) {
return ((Property)children.get(i)).getValue();
}
}
return null;
}
}
COM: <s> retrieve the value of the first child property found with a given name </s>
|
funcom_train/25914170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoomInFixing(){
if(selcluster_!=null){
GeoPoint gpt = selcluster_.getSelectedItemLocation();
if(getCurBounds().isInBounds(gpt)){
Projection pro = mapView_.getProjection();
Point ppt = pro.toPixels(gpt, null);
mapView_.getController().zoomInFixing(ppt.x, ppt.y);
}
else{
mapView_.getController().zoomIn();
}
}
else{
mapView_.getController().zoomIn();
}
}
COM: <s> zoom in with selected cluster to be fit within current viewport </s>
|
funcom_train/6487361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMode(int newMode){
System.out.println("setMode(" + newMode + ")");
if ( (newMode != READ) && (newMode != WRITE) ) return;
mode = newMode;
if (mode == READ) {
setTitle("Comment Reader");
cardLayout.show(card, "READ");
}
else {
setTitle("Comment Writer");
cardLayout.show(card, "WRITE");
}
}
COM: <s> will change the mode of the frame to desired mode </s>
|
funcom_train/14245170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MAssociation getAssociation(MClassifier from, MClassifier to) {
if (from == null || to == null) return null;
Iterator it = from.getAssociationEnds().iterator();
while (it.hasNext()) {
MAssociationEnd end = (MAssociationEnd)it.next();
MAssociation assoc = end.getAssociation();
Iterator it2 = assoc.getConnections().iterator();
while (it2.hasNext()) {
MAssociationEnd end2 = (MAssociationEnd)it2.next();
if (end2.getType() == to) {
return assoc;
}
}
}
return null;
}
COM: <s> gets the association between the classifiers from and to </s>
|
funcom_train/44315158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class getClass( String name ) throws NamedValueParseException, NamedValueRequiredException {
String value = _accessor.getValue( name );
if ( isEmpty( value ) ) {
throw new NamedValueRequiredException( name );
}
try {
return Class.forName( value );
}
catch ( ClassNotFoundException e ) {
throw new NamedValueParseException( name );
}
}
COM: <s> returns the named parameter as a class </s>
|
funcom_train/2628522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetComponent() {
System.out.println("setComponent");
ComponentTypeWrapper component = null;
EventWrapper instance = new EventWrapper();
instance.setComponent(component);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set component method of class event wrapper </s>
|
funcom_train/37388913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitInnerClassDeclaration(JClassDeclaration self) {
print(" {");
pos += TAB_SIZE;
for (int i = 0; i < self.inners.length; i++) {
self.inners[i].accept(this);
}
for (int i = 0; i < self.methods.length; i++) {
self.methods[i].accept(this);
}
for (int i = 0; i < self.body.length; i++) {
self.body[i].accept(this);
}
pos -= TAB_SIZE;
newLine();
print("}");
}
COM: <s> prints a class declaration </s>
|
funcom_train/22019554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToolBar getJToolBar() {
if (jToolBar == null) {
jLabel = new JLabel();
jLabel.setText(" ");
jToolBar = new JToolBar();
jToolBar.setBounds(new java.awt.Rectangle(0,0,1036,41));
jToolBar.setMaximumSize(new java.awt.Dimension(2600,40));
jToolBar.add(getJButton());
jToolBar.add(jLabel);
jToolBar.add(getJButton1());
}
return jToolBar;
}
COM: <s> this method initializes j tool bar </s>
|
funcom_train/14001158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ScanDiagonalFrame getScanDiagonalFrame() {
return new ScanDiagonalFrame() {
public void setFrame(double[] xy, double[] wh, double angle, double power, double durationmicros, int nlines) { }
public void execute() { }
public void setSloppyFrame(double[] xy, double[] wh, double angle, double power, double durationmicros, double intervalmicros, int nlines) { }
};
}
COM: <s> returns a diagonal full frame line based rectangle scan </s>
|
funcom_train/44314957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TimePeriod add( int field, int delta ) {
Calendar c = Calendar.getInstance();
c.setTime( getBegin() );
c.add( field, delta );
Date begin = c.getTime();
c.setTime( getEnd() );
c.add( field, delta );
Date end = c.getTime();
return new TimePeriod( begin, end );
}
COM: <s> returns a new period altered according to roll specification </s>
|
funcom_train/29617774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MgisTextField getJOtherInstituteField() {
if (jOtherInstituteField == null) {
jOtherInstituteField = new MgisTextField();
jOtherInstituteField.setBounds(new java.awt.Rectangle(153,70,340,19));
}
return jOtherInstituteField;
}
COM: <s> this method initializes j other institute field </s>
|
funcom_train/23217285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected EObject createInitialModel() {
EClass eClass = ExtendedMetaData.INSTANCE.getDocumentRoot(contractPackage);
EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(initialObjectCreationPage.getInitialObjectName());
EObject rootObject = contractFactory.create(eClass);
rootObject.eSet(eStructuralFeature, EcoreUtil.create((EClass)eStructuralFeature.getEType()));
return rootObject;
}
COM: <s> create a new model </s>
|
funcom_train/7355694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDragEnabled(boolean b) {
if (b && GraphicsEnvironment.isHeadless()) {
throw new HeadlessException();
}
dragEnabled = b;
for (int i = 0, n = getColumnCount(); i < n; i++) {
getColumnList(i).setDragEnabled(b);
}
}
COM: <s> sets the code drag enabled code property </s>
|
funcom_train/10195597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractPersistentObject resolveThroughQueryContext(AbstractPersistentObject po, QueryContext queryContext) {
AbstractPersistentObject retPo = po;
if (!disableQueryContext && !(po instanceof CompoundPersistentObject)) {
if (queryContext != null) {
retPo = queryContext.addEntry(po);
}
}
return retPo;
}
COM: <s> returns the object passed as a parameter if use query context false or </s>
|
funcom_train/1131712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void quotedString(StringBuffer sb, char c) {
char quote = c;
while (m_index < m_string.length()) {
c = m_string.charAt(m_index++);
if (c == quote) {
break;
}
if (c == '\\' && m_index < m_string.length()
&& m_string.charAt(m_index + 1) == quote) {
c = m_string.charAt(m_index++);
}
sb.append(c);
}
}
COM: <s> append the next quote to the given string buffer </s>
|
funcom_train/236404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ManagerResponse status(String channel, String actionId) {
log.fine("status(" + channel + "," + actionId + ")");
ManagerAction action = new ManagerAction("Status");
action.addPair("Channel", channel);
if (actionId != null)
action.addPair("ActionID", actionId);
ManagerResponse response = send(action);
log.fine("status() response:\n" + response);
return response;
}
COM: <s> fires channel status events </s>
|
funcom_train/33598570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getPw() {
if (pw == null) {//GEN-END:|24-getter|0|24-preInit
// write pre-init user code here
pw = new TextField("password", "enter your password", 32, TextField.ANY);//GEN-LINE:|24-getter|1|24-postInit
// write post-init user code here
}//GEN-BEGIN:|24-getter|2|
return pw;
}
COM: <s> returns an initiliazed instance of pw component </s>
|
funcom_train/26439397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void compute() {
System.out.println("-->World.compute()");
/**
* Compute the new price as the aggregation of the values of each
* agent.
* <p>
* You access each agent, one by one, thanks to the Iterator
*/
int excessDemand = 0;
for (Iterator i = iterator(); i.hasNext();) {
excessDemand += ((Agent) i.next()).getValue();
}
price += excessDemand;
}
COM: <s> once the agents have computed and committed the world computes </s>
|
funcom_train/25211474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int readInt24() throws IOException {
int ch1 = this.read();
int ch2 = this.read();
int ch3 = this.read();
if ((ch1 | ch2 | ch3) < 0) {
throw new EOFException();
}
return ((ch1 << SHIFT16) + (ch2 << SHIFT8) + (ch3 << 0));
}
COM: <s> reads a signed 24 bit integer from the input </s>
|
funcom_train/18654019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFinder() throws Exception {
// Create aspect that returns mock data for the finder
aspectSystem.add( new PersonFinderAspect() );
// call the finder
Person person = personHome.findByName("John", "Doe" );
assertNotNull(person);
assertEquals("Doe",person.getLastName());
}
COM: <s> demonstrates the usage of a finder other than find by primary key </s>
|
funcom_train/34720207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMailLink(String linkId) throws SQLException {
MailLink mailLink = new MailLink();
mailLink.setLinkId(Long.parseLong(linkId));
mailLink.setLinkUdate(new Date());
mailLink.setIsConfirmed(1);
Dao.mailLinkDao.updateIsConfirmedAndLinkUdateById(mailLink);
}
COM: <s> lind id mail link is confirmed 1 </s>
|
funcom_train/18433508 | /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 instanceof NormalDistributionFunction2D)) {
return false;
}
NormalDistributionFunction2D that = (NormalDistributionFunction2D) obj;
if (this.mean != that.mean) {
return false;
}
if (this.std != that.std) {
return false;
}
return true;
}
COM: <s> tests this function for equality with an arbitrary object </s>
|
funcom_train/47624303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Shell createShell() {
// Create the shell
Shell shell = new Shell(mainWindow.getShell(), SWT.CLOSE | SWT.TITLE | SWT.APPLICATION_MODAL);
GridLayout shellGrid = new GridLayout();
shellGrid.marginWidth = 10;
shellGrid.marginHeight = 5;
shellGrid.numColumns = 2;
shellGrid.makeColumnsEqualWidth = true;
shell.setLayout(shellGrid);
shell.setText (rb.getString("title_renamecategory"));
shell.setImage(ImageUtil.getImage("icons/logo.gif"));
// Return the shell
return shell;
}
COM: <s> create the shell that holds all the window widgest </s>
|
funcom_train/40886526 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove () {
if (curr == null) return;
size--;
pool.free(curr);
Item<T> c = curr;
Item<T> n = curr.next;
Item<T> p = curr.prev;
curr = null;
if (size == 0) {
head = null;
tail = null;
return;
}
if (c == head) {
n.prev = null;
head = n;
return;
}
if (c == tail) {
p.next = null;
tail = p;
return;
}
p.next = n;
n.prev = p;
}
COM: <s> removs the current list item based on the iterator position </s>
|
funcom_train/10801544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDeclaredInterface(Class<?> iface) {
if (iface == null || !iface.isInterface())
throw new MetaDataException(_loc.get("declare-non-interface",
this, iface));
if (_interfaces == null)
_interfaces = new ArrayList<Class<?>>();
_interfaces.add(iface);
}
COM: <s> explicitly declare the given interface among the ones this </s>
|
funcom_train/7384476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undoableEditHappened(mxUndoableEdit undoableEdit) {
trim();
if (size > 0 && size == history.size()) {
history.remove(0);
}
history.add(undoableEdit);
indexOfNextAdd = history.size();
fireEvent(new mxEventObject(mxEvent.ADD, "edit", undoableEdit));
}
COM: <s> method to be called to add new undoable edits to the history </s>
|
funcom_train/13629998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SDLSurface renderTextSolid(String text, SDLColor fg) throws SDLException {
SDL_Surface surface = SWIG_SDLTTF.TTF_RenderText_Solid_FAST(swigTTFFont, text, (short)fg.getRed(), (short)fg.getGreen(), (short)fg.getBlue());
return new SDLSurface(surface);
}
COM: <s> create an 8 bit palettized surface and render the given text </s>
|
funcom_train/25074868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JTextField getAcceptanceTestField() {
if (acceptanceTestField == null) {
acceptanceTestField = new JTextField();
acceptanceTestField.setText((session.getCurrentProject().getUserStory(spaceHolder).getAcceptanceTest()));
acceptanceTestField.setBounds(new Rectangle(138, 81, 150, 20));
}
return acceptanceTestField;
}
COM: <s> this method initializes acceptance test field </s>
|
funcom_train/42659439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean fireBeforeRemoveEvent(E element) {
// generate before remove event
if (this.beforeRemoveEvent != null
&& 0 < this.beforeRemoveEvent.getListenerCount()) {
// create event
ActionEventBefore_1x0<E> e = new ActionEventBefore_1x0<E>(this,
eventID++, STR_BEFORE_REMOVE);
e.setData(element);
this.beforeRemoveEvent.fire(e);
// check the canceled attribute of the ActionEvent
// if the canceled attribute is true, then canceled the operation
return e.isCanceled();
}
return false;
}
COM: <s> fires the before remove event </s>
|
funcom_train/19234329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public Vector get(Object match) {
Vector arr = new Vector();
Integer idx;
for(int i=0; i<=recId; i++) {
idx = new Integer(i);
if(match.getClass().isInstance(db.get(idx))) {
arr.add(db.get(idx));
}
}
return arr;
}
COM: <s> get all points from db that matches object </s>
|
funcom_train/23271202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOrientation(PlotOrientation orientation) {
if (orientation == null) {
throw new IllegalArgumentException("Null 'orientation' argument.");
}
CategoryPlot plot = (CategoryPlot) this.chart.getPlot();
if (plot != null) {
PlotOrientation old = plot.getOrientation();
plot.setOrientation(orientation);
firePropertyChange("orientation", old, orientation);
}
}
COM: <s> sets the orientation for the plot and fires a </s>
|
funcom_train/24653715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void copyArchivedUsersTable(ArchivedUserStore source, ArchivedUserStore target) {
for (ArchivedUser a : source.values()) {
URI auid = a.getArchivedID();
if (a.getArchivedID() == null) {
auid = getTargetEnvironment().getIdFactory().createArchivedUserID();
a.setArchivedID(auid);
}
target.put(auid, a);
}
}
COM: <s> older versions of the database might not have the user id column </s>
|
funcom_train/7581646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getImportationResultsPane() {
if (importationResultsPane == null) {
importationResultsPane = new JTabbedPane();
importationResultsPane.addTab(MessageManager
.getMessage("Importation.Categories"), null,
getCategoriesPanel(), null);
importationResultsPane.addTab(MessageManager
.getMessage("Importation.Operations"), null,
getOperationsPanel(), null);
}
return importationResultsPane;
}
COM: <s> this method initializes importation results pane </s>
|
funcom_train/9921111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeBuddy(String buddyname) {
if((buddyname == null) || buddyname.trim().equals("")) {
return;
}
String toBeSent="toc_remove_buddy";
try {
frameSend(toBeSent+" "+buddyname+"\0");
} catch(IOException e) {
logger.severe(e.toString());
signoff("7.5");
}
}
COM: <s> tell aim to remove a single buddy </s>
|
funcom_train/9920725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Term t){
if(t.indices.length!=this.indices.length) return false;
for(int i= 0; i<indices.length; i++)
if(t.indices[i]!=indices[i]||t.functions[i]!=functions[i]) return false;
return true;
}
COM: <s> returns whether this term is identical to another term </s>
|
funcom_train/32116868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void localizeClass(TypeElement typeElem) {
logger.formatInfo("LocalizeProcessor.LOCALIZE_CLASS", typeElem.getQualifiedName());//$NON-NLS-1$
LocalizableClass localizeInfo = typeElem.getAnnotation(LocalizableClass.class);
for (Locale locale : conf.getLocales()) {
if (localizeInfo.localize()) {
generateLocalizedClass(typeElem, locale);
}
}
}
COM: <s> localize a class </s>
|
funcom_train/3155729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCompletionMessage() {
String strRet = null;
// just needed for the processor types that do not create an output product.
if ((_uiType == UI_TYPE_INIT) || (_uiType == UI_TYPE_UPDATE)) {
if (_processingFailure) {
strRet = L3Constants.MSG_COMPLETED_WITH_WARNINGS;
} else {
strRet = L3Constants.MSG_COMPLETED_SUCCESSFUL;
}
}
return strRet;
}
COM: <s> retrieve a message to be displayed on completion </s>
|
funcom_train/3431715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void explain(String systemId) {
if (!suppressExplanation) {
System.out.println("XMLReader probably encountered bad URI in " + systemId);
System.out.println("For example, replace '/some/uri' with 'file:/some/uri'.");
}
suppressExplanation = true;
}
COM: <s> provide one possible explanation for an internal error </s>
|
funcom_train/28753315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCdnadttstandardvolume(Long newVal) {
if ((newVal != null && this.cdnadttstandardvolume != null && (newVal.compareTo(this.cdnadttstandardvolume) == 0)) ||
(newVal == null && this.cdnadttstandardvolume == null && cdnadttstandardvolume_is_initialized)) {
return;
}
this.cdnadttstandardvolume = newVal;
cdnadttstandardvolume_is_modified = true;
cdnadttstandardvolume_is_initialized = true;
}
COM: <s> setter method for cdnadttstandardvolume </s>
|
funcom_train/31528956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void launchExternal(JNLPFile file) throws LaunchException {
if (file.getSourceLocation() != null)
launchExternal(file.getSourceLocation());
else if (file.getFileLocation() != null)
launchExternal(file.getFileLocation());
else
launchError(new LaunchException("could not determine file's source"));
}
COM: <s> launches the jnlp file in a new jvm instance </s>
|
funcom_train/1778803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitAttribute(final Attribute attr) {
buf.setLength(0);
buf.append(tab).append("ATTRIBUTE ");
appendDescriptor(-1, attr.type);
if (attr instanceof Traceable) {
((Traceable) attr).trace(buf, null);
} else {
buf.append(" : unknown\n");
}
text.add(buf.toString());
}
COM: <s> prints a disassembled view of the given attribute </s>
|
funcom_train/29986853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Parameter getParameter(final Parameter originalParameter) {
if (originalParameter == null) {
return null;
}
Object found = get(originalParameter);
if (found == null) {
found = this.factory.createParameter(originalParameter);
put(originalParameter, found);
}
return (Parameter) found;
}
COM: <s> returns a wrapped instance of the supplied parameter object </s>
|
funcom_train/50894618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object other) {
if (this == other)
return true;
ModuleDescriptor md = (ModuleDescriptor) other;
return (other instanceof ModuleDescriptor)
&& (name.equals(md.getName()))
&& (displayName.equals(md.getDisplayName()))
&& (moduleType == md.getManagementType())
&& (commandLine.equals(md.getCommandLine()))
&& (helpString.equals(md.getHelp()));
}
COM: <s> indicates whether some other object is equal to this one </s>
|
funcom_train/22655820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void recursiveDelete(File fileToDel) {
if (fileToDel.exists()) {
if (fileToDel.isFile()) {
fileToDel.delete();
} else if (fileToDel.isDirectory()) {
File[] children = fileToDel.listFiles();
if (children != null && children.length > 0) {
for (int i = 0; i < children.length; i++) {
recursiveDelete(children[i]);
}
}
fileToDel.delete();
}
}
}
COM: <s> recursively empty the directory or file passed </s>
|
funcom_train/24153010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCalDialogWidth() {
System.out.println("calDialogWidth");
AbstractDatePicker date_picker = getDatePicker();
date_picker.setCalDialogWidth(300);
assertEquals("Wrong calDialogWidth:", 300, date_picker.getCalDialogWidth());
}
COM: <s> test of cal dialog width property of class com </s>
|
funcom_train/21759824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void remove(String key) {
try {
String name = getEntryNameForKey(key);
service.delete(new URL(baseUrl, name));
} catch (MalformedURLException e) {
/*
* This should not happen, getEntryNameForKey should ensure that
* the URL is valid.
*/
e.printStackTrace();
throw new UnexpectedException(e);
} catch (IOException e) {
/* Could not delete the entry. */
e.printStackTrace();
}
}
COM: <s> removes an entry from this map </s>
|
funcom_train/36203837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Double getUpperBound(Section<NumBounds> s) {
String originalText = s.getText();
String content = originalText.substring(1, originalText.length() - 1).trim();
String[] numbers = content.split(" ");
if (numbers.length == 2) {
Double d = null;
try {
d = Double.parseDouble(numbers[1]);
return d;
}
catch (Exception e) {
}
}
return null;
}
COM: <s> returns the upper bound of the interval as double if correctly </s>
|
funcom_train/46926915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
if (o1 == null || o2 == null || !(o1 instanceof WebTableLine)
|| !(o2 instanceof WebTableLine)) {
return 0;
}
WebTableLine w1 = (WebTableLine) o1;
WebTableLine w2 = (WebTableLine) o2;
return w1.compareTo(w2, iColumn, iAsc);
}
COM: <s> compares two lines </s>
|
funcom_train/378139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nextPacket(PcapPacket packet, Object user) {
setProcessingTime(packet); // Set processing time
timeout(); // Process timeout queue
/*
* We're only interested in Ip4 packets
*/
if (packet.hasHeader(ip)) {
/*
* Keep track of IP fragments. Assign FragmentSequence analysis object to
* each packet part of a fragment group.
*/
fragmentation.process(packet, ip);
}
}
COM: <s> main entry point for the analyzer </s>
|
funcom_train/49631342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getSelectItemLabel(EntityClass obj) {
String lbl;
if (null == obj) {
lbl = "(null)";
} else {
DisplayNamesResolver dnr =
ResolverFactories.getDisplayNamesResolver(obj.getClass());
if (null == dnr) {
lbl = obj.toString();
} else {
lbl = dnr.getDisplayNames(
getEntityClass(),
obj, HibernateUtil.getCurrentSession())
.getDisplayId();
}
}
return lbl;
}
COM: <s> label for code select item code </s>
|
funcom_train/46575554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processDecorationsAttributes(NamedNodeMap nnm) {
processCompositeAttributes(nnm);
Decorations d = (Decorations) ctx.control;
d.setText(getAttribute(nnm, "title", "- no name -"));
int maximized = getAttributeTristate(nnm, "maximized");
if (maximized != -1) d.setMaximized(maximized == 1);
int minimized = getAttributeTristate(nnm, "minimized");
if (minimized != -1) d.setMinimized(minimized == 1);
}
COM: <s> processes attributes specific to decorations objects </s>
|
funcom_train/46825542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLElement flatten () {
XMLElement message = new XMLElement (Comm.PLAYER_LIST);
message.setAttribute(XML_ATT_OWNER, this.owner);
message.setAttribute(XML_ATT_CUR_PLAYER, this.currentPlayer);
// Add player children
Vector vPlayers = getPlayers ();
for (int i = 0; i < this.players.size(); i++) {
Player player = (Player)vPlayers.get(i);
message.addChild (player.flatten());
}
return message; // turn XML element into a String
}
COM: <s> flatten the string so that it can be transmitted </s>
|
funcom_train/43244926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMaximumAllowedConnections() {
System.out.println("getMaximumAllowedConnections");
ServerStatusObject instance = new ServerStatusObject();
int expResult = 0;
int result = instance.getMaximumAllowedConnections();
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 maximum allowed connections method of class org </s>
|
funcom_train/46321804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionResult behave(TextObject[] to) {
if ( to.length == 1 ) return behave( to[0] );
if ( to.length == 2 ) return behave( to[0], to[1] );
throw new UnsupportedActionException("This action doesn't support arrays of objects");
}
COM: <s> default behave method for object arrays </s>
|
funcom_train/37444629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean isReadonly() {
boolean result = Boolean.TRUE.equals(getFormTag().isReadonly());
if (!result) {
// Form is not readonly, check readonly attribute at property level
result = readonly == null ? false : readonly;
if (!result && getRole() != null) {
result = !getRequest().isUserInRole(getRole());
}
}
return result;
}
COM: <s> determines whether this property is readonly or not </s>
|
funcom_train/40531150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSimulationFile(File file) {
String ext = null;
String s = file.getName();
int i = s.lastIndexOf('.');
int prefix = s.indexOf("simulation_");
if(prefix != -1){
if(i > 0 && i < s.length() - 1) {
ext = s.substring(i+1).toLowerCase();
}
if(ext.equals("txt")){
return true;
}
}
return false;
}
COM: <s> custom function that tests if the file given is a simulation file </s>
|
funcom_train/4881901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExcluir () {
if (excluir == null) {//GEN-END:|157-getter|0|157-preInit
// write pre-init user code here
excluir = new Command ("EXCLUIR", "Excluir Materia", Command.ITEM, 0);//GEN-LINE:|157-getter|1|157-postInit
// write post-init user code here
}//GEN-BEGIN:|157-getter|2|
return excluir;
}
COM: <s> returns an initiliazed instance of excluir component </s>
|
funcom_train/17773873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reallocateIndices() {
int rowCount = model.getRowCount();
// Set up a new array of indexes with the right number of elements
// for the new data model.
indexes = new int[rowCount];
// Initialise with the identity mapping.
for (int row = 0; row < rowCount; row++) {
indexes[row] = row;
}
}
COM: <s> re initializes this sorter with the identity mapping </s>
|
funcom_train/22441516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeImport(String qualifiedTypeName) {
String typeContainerName = Signature.getQualifier(qualifiedTypeName);
int nPackages = _packageEntries.size();
for (int i = 0; i < nPackages; i++) {
PackageEntry entry = (PackageEntry) _packageEntries.get(i);
if (entry.getName().equals(typeContainerName)) {
if (entry.remove(qualifiedTypeName)) {
_hasChanges = true;
return;
}
}
}
}
COM: <s> removes an import from the structure </s>
|
funcom_train/10926250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateParagraphsHtml(int quantity, boolean startWithLorem) {
return generateMarkupParagraphs("<p>" + LINE_SEPARATOR + "\t", LINE_SEPARATOR + "</p>", LINE_SEPARATOR + "</p>"
+ LINE_SEPARATOR + "<p>" + LINE_SEPARATOR + "\t", quantity, startWithLorem);
}
COM: <s> generates a number of paragraphs with each paragraph surrounded by html </s>
|
funcom_train/46828838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
Iterator i = messages.iterator();
StringBuffer sb = new StringBuffer();
while(i.hasNext()){
sb.append( ( (String) i.next() )); //TODO: bedre linieskift?
if(i.hasNext()) sb.append("\n");
}
return sb.toString();
}
COM: <s> returns all messages separated by linebreaks </s>
|
funcom_train/24097845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OvalVariableComponentVariable createVariableComponent() {
Element e = new Element("variable_component", getElement().getNamespace());
OvalVariableComponentVariable ret = getParentDocument().getVariableComponentWrapper();
ret.setElement(e);
ret.setRoot(getRoot());
return ret;
}
COM: <s> create a variable component suitable for adding to this variable as a child </s>
|
funcom_train/16711083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String validateDbName(final String inputDbName) throws VREBusinessException {
if (inputDbName == null)
throw new VREBusinessException("No dbName defined", new Object[] {});
final String trimmedDbName = inputDbName.trim();
if (trimmedDbName.length() == 0)
throw new VREBusinessException(MessageKeys.DATA_INVALID,
new Object[] { "Empty database name value" } );
return trimmedDbName;
}
COM: <s> validate the supplied database name </s>
|
funcom_train/13907612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateColumnWidths(final Column[] row) {
for (int i = 0; i < meta.length; ++i) {
row[i].setAutoWrap(meta[i].getAutoWrap());
meta[i].updateWidth(row[i].getWidth());
}
}
COM: <s> overwrite this method if you need to handle customized columns </s>
|
funcom_train/48876790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFreePointLeft(final LectureEvent cEvents[][]){
Room.log.debug("Testing if a free point is left in room " + this.description);
for(int day = 0; day < 5; day++)
for(int slot = 0; slot < 6; slot++)
if(cEvents[day][slot] == null && this.events[day][slot] == null)
return true;
return false;
}
COM: <s> is a free point left </s>
|
funcom_train/36255233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ValueExpression resolveVariable(String variable) {
ValueExpression ve = null;
try {
if (this.vars != null) {
ve = (ValueExpression) this.vars.get(variable);
}
if (ve == null) {
return this.target.resolveVariable(variable);
}
return ve;
} catch (StackOverflowError e) {
throw new ELException("Could not Resolve Variable [Overflow]: " + variable, e);
}
}
COM: <s> first tries to resolve agains the inner map then the wrapped </s>
|
funcom_train/49318478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JMenu createViewScaleZoomOutMenu() {
_zoomOutMenu = new JMenu(_I18N.getString("zoomOut"));
for (int i = 1; i <= MAX_SCALE; i++) {
addScaleMenuItem(_zoomOutMenu, _zoomInOutGroup, "1/" + i + "x", 1.0F / (float) i);
}
return _zoomOutMenu;
}
COM: <s> create the view scale zoom out menu item </s>
|
funcom_train/48667178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleDataBuffersAsRemoteEvent(AgentDataBuffer[] buffs) {
try {
// fix timestamp differences
AgentDataBuffer db;
long delta;
for(int i = 0; i < buffs.length; i++) {
db = buffs[i];
delta = fTimeDeltaCache.getDelta(db.getHost().toString());
if(delta != 0) {
// apply to data buffer
db.setTimeDelta(delta);
}
}
handleDataBuffers(buffs);
} catch(Exception ex) {
logger.error(ex);
}
}
COM: <s> handles the new data buffer events coming from agents running </s>
|
funcom_train/17157413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFinishDate(Calendar finishDate) {
Consistency.notNull(finishDate,
new IllegalArgumentException("finishDate shouldn't be null"));
if (this.getStartDate() != null
&& finishDate.before(this.getStartDate())) {
throw new IllegalStateException(
"finishDate should be after its start date");
}
this.finishDate = (Calendar) finishDate.clone();
}
COM: <s> set a new code finish date code to this activity </s>
|
funcom_train/2467016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNextFinishButtonIcon(Icon newIcon) {
Object oldIcon = getNextFinishButtonIcon();
if (!newIcon.equals(oldIcon)) {
buttonIconHashmap.put(NEXT_FINISH_BUTTON_ICON_PROPERTY, newIcon);
firePropertyChange(NEXT_FINISH_BUTTON_ICON_PROPERTY,
oldIcon, newIcon);
}
}
COM: <s> sets the icon for the next finish button </s>
|
funcom_train/20896119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetUID() {
System.out.println("getUID");
User instance = new User();
int expResult = 0;
int result = instance.getUID();
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 uid method of class it </s>
|
funcom_train/39296064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Workspace get(String smid) throws ConnectionException {
Workspace ws = null;
if(cacheEnabled){
if (isCached(smid)) {
ProxyObject proxyObject = retreive(smid);
if( (proxyObject.getTimestamp() + OBJ_TTL) > new Date().getTime() )
ws = proxyObject.getProxy();
else
return null;
} else {
return null;
}
} else{
return null;
}
return ws;
}
COM: <s> gets a proxy of the corresponding smid </s>
|
funcom_train/34133314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void shiftEnd(int newSize) {
int oldSize = getArrayLength();
int oldGapEnd = g1;
int upperSize = oldSize - oldGapEnd;
int arrayLength = (newSize + 1) * 2;
int newGapEnd = arrayLength - upperSize;
resize(arrayLength);
g1 = newGapEnd;
if (upperSize != 0) {
// Copy array items to new end of array.
System.arraycopy(array, oldGapEnd, array, newGapEnd, upperSize);
}
}
COM: <s> make the gap bigger moving any necessary data and updating </s>
|
funcom_train/14233343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getBanID (int idiotID, String host, int type) throws SQLException{
ResultSet rs = c.prepareStatement("SELECT ban_id FROM bans WHERE idiot_id = '"+idiotID+"' AND host_id = '"+getPID(cleanUp(host))+"' AND type = '"+type+"'").executeQuery();
if (rs.next()){
return rs.getInt(1);
}else{
return -1;
}
}
COM: <s> gets the ban id associated to a banned player </s>
|
funcom_train/36533657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSQL(String query) {
if (query.toUpperCase().startsWith("SELECT ")) {
throw new IllegalArgumentException("Query already contain SELECT: " + query);
}
StringBuilder sql = new StringBuilder("SELECT ");
propertyNames(sql, "");
return sql.append(" FROM ").append(query).toString();
}
COM: <s> accepts a string which should consist of a partial sql select statement </s>
|
funcom_train/50446679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element appendElement(String xpath, String name, Map map) throws InvalidXPathException, UnexpectedTypeException {
Element eParent = getElement(xpath);
if (eParent == null) {
throw new InvalidXPathException();
}
Element newElement = document.createElement(name);
setAttributes(newElement, map);
eParent.appendChild(newElement);
return newElement;
}
COM: <s> appends element to element specified by xpath </s>
|
funcom_train/50940200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MessageFolder getFolder(MailMessage message) {
MessageFolder resultFolder = getFolder(message, getNormalFolder());
if (resultFolder == null) {
resultFolder = getFolder(message, getTrashFolder());
if (resultFolder == null) {
resultFolder = getNormalFolder();
}
}
return resultFolder;
}
COM: <s> choose the suitable folder for a particular message base on conversation id </s>
|
funcom_train/24376368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getIdsFromRegistryObjects(Collection objs) {
List ids = new ArrayList();
if (objs.size() > 0) {
Iterator iter = objs.iterator();
while (iter.hasNext()) {
IdentifiableType ro = (IdentifiableType) iter.next();
ids.add(ro.getId());
}
}
return ids;
}
COM: <s> get list of id of registry objects </s>
|
funcom_train/13540331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PayerIDEntityData getValueObject() {
PayerIDEntityData data = new PayerIDEntityData();
data.setRecordID( getRecordID() );
data.setPayerID( getPayerID() );
data.setInsuranceCompanyID( getInsuranceCompanyID() );
data.setTypeID( getTypeID() );
return data;
}
COM: <s> create and return a payer identity data object populated with the data from </s>
|
funcom_train/2291367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setType(String type) {
CmsSearchFieldMappingType mappingType = CmsSearchFieldMappingType.valueOf(type);
if (mappingType == null) {
// invalid mapping type has been used, throw an exception
throw new CmsRuntimeException(new CmsMessageContainer(
Messages.get(),
Messages.ERR_FIELD_TYPE_UNKNOWN_1,
new Object[] {type}));
}
setType(mappingType);
}
COM: <s> sets the mapping type as a string </s>
|
funcom_train/32056630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRepaintR() {
System.out.println("testRepaintR");
VertexRenderer vertRend = new VertexRenderer();
Rectangle rect = new Rectangle();
vertRend.repaint(rect);
int var1 = 0, var2 = 0, var3 = 0, var4 = 0, var5 = 0;
vertRend.repaint(var1, var2, var3, var4, var5);
}
COM: <s> this function tests repaint function of default graph cell class </s>
|
funcom_train/44011350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetIsDirty() {
System.out.println("setIsDirty");
boolean isDirty = true;
CouponBO instance = new CouponBO();
instance.setIsDirty(isDirty);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set is dirty method of class edu </s>
|
funcom_train/9918587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVecParameter(String param, float x, float y) {
CGparameter p = CgGL.cgGetNamedEffectParameter(effect, param);
if (p != null)
CgGL.cgSetParameter2f(p, x, y);
else
System.err.println("GLCgFXEffect: param2f is null");
}
COM: <s> sets the vec2 parameter with name to the given values </s>
|
funcom_train/43663987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BParameter_type_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BParameter_type_feature", "_UI_BParameter_type"),
XmdlboPackage.Literals.BPARAMETER__TYPE,
true,
false,
false,
null,
getString("_UI_BusinessModelPropertyCategory"),
null));
}
COM: <s> this adds a property descriptor for the type feature </s>
|
funcom_train/51588968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDefaultDOMProperties(DocumentBuilderFactory factory, Hashtable props, int index) {
props.put(Constants.SERVICE_DESCRIPTION, DOMFACTORYDESCRIPTION);
props.put(Constants.SERVICE_PID, DOMFACTORYNAME+"."+context.getBundle().getBundleId()+"."+index);
setDOMProperties(factory,props);
}
COM: <s> set the dom parser service properties </s>
|
funcom_train/1444167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vektor getFinalPosition(double decay) {
if (decay >= 1 || decay < 0)
throw new ArithmeticException(
"Don't call 'DynamicObject.getFinalPosition(decay)' with decay >=1 or decay < 0!!");
return new Vektor(Vektor.XY, this.position.x + this.speed.x * 1
/ (1 - decay), this.position.y + this.speed.y * 1 / (1 - decay));
}
COM: <s> the final objects position if no acceleration occurs </s>
|
funcom_train/46787043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addExcludesTasksPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Task_excludesTasks_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Task_excludesTasks_feature", "_UI_Task_type"),
EZRealtimePackage.Literals.TASK__EXCLUDES_TASKS, true, false,
true, null, null, null));
}
COM: <s> this adds a property descriptor for the excludes tasks feature </s>
|
funcom_train/18804491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double estimateMaximumTickLabelHeight(Graphics2D g2) {
Insets tickLabelInsets = getTickLabelInsets();
double result = tickLabelInsets.top + tickLabelInsets.bottom;
Font tickLabelFont = getTickLabelFont();
FontRenderContext frc = g2.getFontRenderContext();
result += tickLabelFont.getLineMetrics("123", frc).getHeight();
return result;
}
COM: <s> estimates the maximum tick label height </s>
|
funcom_train/44287560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void waitFrameInit() {
try {
Thread.sleep(5 * 1000);
} catch (InterruptedException ex) {
return;
}
if (mainFrames.size() > 0) {
try {
while (!mainFrames.get(0).isInitialized())
Thread.sleep(1000);
} catch (InterruptedException ex) {
return;
}
}
}
COM: <s> wait the initialization phase is finished for the main frame </s>
|
funcom_train/50873215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReplace() {
OMError error = new OMError();
error.setSymbol(new OMSymbol("error1", "error"));
error.addElement(new OMInteger(1));
error = (OMError) error.replace(new OMInteger(1), new OMString("test"));
assertTrue(error.getElementAt(0) instanceof OMString);
}
COM: <s> test replace method </s>
|
funcom_train/3926621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceCoordIndex( TokenPrinter tp, SpaceStructure ss, int startTokenOffset, int endTokenOffset ) {
for ( int i = 0; i < callCount; i++ ) {
replaceCoordIndex( i*numberVertices, tp, startTokenOffset, endTokenOffset, (i==0), (i==(callCount-1)) );
}
}
COM: <s> replace the coord index values </s>
|
funcom_train/49044820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSharedInstancePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GoalRequest_sharedInstance_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GoalRequest_sharedInstance_feature", "_UI_GoalRequest_type"),
ModelPackage.Literals.GOAL_REQUEST__SHARED_INSTANCE,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the shared instance feature </s>
|
funcom_train/46824985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
model.setSeatNum(this.getSeatNum());
model.start();
if (this.chatGameComponent != null) {
GameLabels labels = GameLabels.getInstance();
chatGameComponent.receiveMessage(labels.get("game"), labels.get("place.ships"));;
}
}
COM: <s> start game by reseting model and assigning current clients </s>
|
funcom_train/43539679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getProperty(String name) {
String property = System.getProperty(name);
if ((property == null) || (property.length() == 0)) {
CoreActivator.logDebug("SYSTEM PROPERTY [" + name + "] WAS NOT FOUND", //$NON-NLS-1$ //$NON-NLS-2$
ITestSuiteBuilderConstants.LOGGING_TESTSUITEMODEL);
property = null;
}
return property;
}
COM: <s> get a system property that is expected to exist </s>
|
funcom_train/11721961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerNamespaces(Map<String,String> namespaces) throws RepositoryException {
for (Map.Entry<String, String> stringStringEntry : namespaces.entrySet()) {
Map.Entry<String, String> entry = stringStringEntry;
registerNamespace(entry.getKey(), entry.getValue());
}
}
COM: <s> safely registers all namespaces in the given map from </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.