__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/32094665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initAll(boolean setDefault) {
if (setDefault) {
patterns = new ArrayList<GeneratorPattern>();
setPatternIndex(Options.GENERATOR_PATTERN_INDEX);
} else {
patterns = copyGeneratorPatterns(Options.getInstance().getGeneratorPatterns());
setPatternIndex(Options.getInstance().getGeneratorPatternIndex());
}
fillCombo(patternIndex);
}
COM: <s> initialize all fields of the panel the values from </s>
|
funcom_train/31146249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close(final SinkIF compQ) throws SinkClosedException {
if (closed) throw new SinkClosedException("ATcpConnection closed");
closed = true;
if (PROFILE) System.err.println("DENCHI: aTLSConnection received close request, going to enqueue close request to encryptstage");
encryptSink.enqueue_lossy(new aTLSCloseRequest(this, compQ));
}
COM: <s> this function will create an a tlsclose request and post it to the </s>
|
funcom_train/3740373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getTasks(Collection usersId) throws TaskManagerException{
//Set to zbior obiektow typu Integer
List list = new LinkedList();
list.clear();
try {
Session sess= HibernateUtil.currentSession();
Criteria crit = sess.createCriteria(Task.class);
crit.add(Expression.in ("id",usersId));
crit.addOrder(Order.asc("id"));
List match = crit.list();
} catch (Exception e) {
// TODO Zwracac cos sensownego
e.printStackTrace();
//logger
throw new TaskManagerException(e.getClass()+" getTasks(Set)");
}
return list;
}
COM: <s> return list of tasks of the given collection of users </s>
|
funcom_train/1440479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyMkdir(Connection connection, FileObject file) {
try {
dataListener.addFileData(
createFileData(connection, file, FileType.DIRCREATED));
} catch (RemoteException ex) {
logger.error("ServerSideConnectionObserver.notifyUpload()", ex);
}
}
COM: <s> information about newly created directory </s>
|
funcom_train/38866971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updInv(int y, int m) {
// Update the inventory for the last month
if (Verbose > 0)
System.out.println("Updating inventory for: " + stn + " " + y + "/"
+ m);
inv.reset();
inv.setStn(stn);
inv.setYear(y);
inv.setMonth(m);
if (Insert || Delete)
inv.updateInventory();
NIdeleted += inv.getNdeleted();
NIinserted += inv.getNinserted();
}
COM: <s> update the data inventory for 1 month of data </s>
|
funcom_train/34127097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getBlock() {
BlockList list = element.getBlock();
String result = null;
if ( list != null) {
if ( list.hasAll()) {
result = BLOCK_ALL;
} else if ( list.hasExtension()) {
result = BLOCK_EXTENSION;
} else if ( list.hasSubstitution()) {
result = BLOCK_SUBSTITUTION;
} else if ( list.hasRestriction()) {
result = BLOCK_RESTRICTION;
}
}
return result;
}
COM: <s> returns the block field for this element </s>
|
funcom_train/35845667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkOffs(ListSet offs) {
if (offs == null) {
throw new IllegalArgumentException(
"A ListSet of offenders must be supplied.");
}
Object offender = CollectionUtil.getFirstItemOrNull(offs);
if (offender != null) {
checkArgument(offender);
}
if (offs.size() >= 2) {
offender = offs.get(1);
checkArgument(offender);
}
}
COM: <s> check the offenders </s>
|
funcom_train/26224220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NotificationServer () {
Properties props = Configuration.getConfiguration("notification_server");
int port = DEFAULT_PORT;
String portString = props.getProperty ("port.insecure");
try {
port = Integer.parseInt (portString);
} catch (Exception anyExc) {
Logger.getLogger ("org.noses.tttn.ns").warn ("Could not parse port value "+portString+
". Using default of "+port);
}
init (port, null, false);
}
COM: <s> starts the notification server on the default port and listens on </s>
|
funcom_train/3643843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCCA (int ccaValue) throws OneWireIOException, OneWireException, IllegalArgumentException {
byte[] data = readPage(7);
data [4] = ( byte ) (ccaValue & 0x00ff);
data [5] = ( byte ) ((ccaValue & 0xff00) >>> 8);
writePage(7, data, 0);
}
COM: <s> set the value of the cca </s>
|
funcom_train/41719455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Edge other) {
if (other == null) {
return false;
}
if (!(other instanceof IdentityEdge)) {
return false;
}
Node otherSource = other.getSource();
Node otherDestination = other.getDestination();
if (this.source == otherSource && this.destination == otherDestination) {
return true;
}
if (this.source == otherDestination && this.destination == otherSource) {
return true;
}
return false;
}
COM: <s> returns true if this identity edge is the same as the parameter </s>
|
funcom_train/1708043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reserveUserItinerary(User user, Flight flight, SeatClass seat) {
Itinerary itinerary = new Itinerary();
itinerary.setStatus(ItineraryStatus.RESERVED);
itinerary.setUser(user);
itinerary.setFlight1(flight);
itinerary.setSeatClass1(seat);
itinerary.setReservationDate(Calendar.getInstance().getTime());
itineraryDao.saveOrUpdateItinerary(itinerary);
}
COM: <s> reserve an itinerary for a user </s>
|
funcom_train/10681182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String s = "";
for (int i = 0; i < sign.length; i++) {
s += sign[i] + ", ";
}
s = s.substring(0, s.length() - 2);
return getReturnType() + " " + getName() + "(" + s + ")";
}
COM: <s> used to show operation data in gui </s>
|
funcom_train/29418641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(int x, int y, int w, int h) {
if (w<=0 || h<=0) return; // no-op
Box b = new Box();
b.x=x; b.y=y; b.w=w; b.h=h;
list.add(b);
}
COM: <s> add the given rectangle to the list of rectangles in this space </s>
|
funcom_train/49052575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void formOpen(String name, String method, String... attributes) {
String tagBody = FormElems.FORM_OPEN.toString();
String attr = "";
for (String s : attributes) {
attr += s + ", ";
}
tagBody = String.format(tagBody, name, this.baseUrl, method, attr);
fields.put(name, tagBody);
}
COM: <s> adds a form open tag to the build </s>
|
funcom_train/49760634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getJRadioButtonByPackage() {
if (jRadioButtonByPackage == null) {
jRadioButtonByPackage = new JRadioButton();
jRadioButtonByPackage.setText("By Package");
jRadioButtonByPackage.setBounds(new Rectangle(15, 15, 111, 24));
jRadioButtonByPackage.setSelected(true);
jRadioButtonByPackage.addActionListener(this);
}
return jRadioButtonByPackage;
}
COM: <s> this method initializes j radio button by package </s>
|
funcom_train/34028469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHide() {
wbU.setSheetHidden(0, true);
assertTrue(wbU.isSheetHidden(0));
assertFalse(wbU.isSheetHidden(1));
XSSFWorkbook wb2 = XSSFTestDataSamples.writeOutAndReadBack(wbU);
assertTrue(wb2.isSheetHidden(0));
assertFalse(wb2.isSheetHidden(1));
}
COM: <s> turn the sheet with none hidden into the one with </s>
|
funcom_train/26344623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image blankScreen(){
if(pixels != null){
System.arraycopy(pixelsscratch, 0, pixels, 0, pixels.length);
}else{
pixels = new byte[xSize*ySize];
}
mis = new MemoryImageSource(xSize, ySize, colorModel, pixels, 0, xSize);
mis.setAnimated(true);
return img = Toolkit.getDefaultToolkit().createImage(mis);
}
COM: <s> gets a blank image using the current viewport dimensions </s>
|
funcom_train/11096269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Executor doCreateExecutor(String id, ExecutorConfig config) {
ExecutorImpl executor = new ExecutorImpl(this, createService(id, config), config);
try {
registerMBean(id, executor, config);
} catch (Exception ex) {
LOG.error("Unable to register MBean for the executor with id " + id, ex);
}
return executor;
}
COM: <s> create an executor with the given id and configuration </s>
|
funcom_train/3382275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAll(Collection<? extends E> c) {
Object[] a = c.toArray();
int numNew = a.length;
ensureCapacity(size + numNew); // Increments modCount
System.arraycopy(a, 0, elementData, size, numNew);
size += numNew;
return numNew != 0;
}
COM: <s> appends all of the elements in the specified collection to the end of </s>
|
funcom_train/44467110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Field getFieldRecursive(final Class c, final String name) throws SecurityException{
if(c == null){
return null;
}
Field f;
try{
f = c.getDeclaredField(name);
return f;
}catch(NoSuchFieldException e){
return getFieldRecursive(c.getSuperclass(), name);
}
}
COM: <s> searches the class hierarchy for a field with the specified name </s>
|
funcom_train/1834509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getExternalLinksString(Set<Link> links) {
Set<String> externalLinks = new TreeSet<String>();
for (Link link : links) {
if (link.isExternal() && !linkBlacklist.matches(link.getTarget())) {
externalLinks.add(link.getTarget());
}
}
return createTopicInfoList(externalLinks, null);
}
COM: <s> filters the links for external links removes blacklisted links and sorts </s>
|
funcom_train/48495439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadValue(SparkModel model) throws Exception {
Field field = model.getClass().getField(name);
switch (type) {
case PRIMITIVE_TYPE:
field.set(model, value);
break;
case DATA_LAYER:
DataLayer dataLayer = Observer.getInstance().getDataLayer((String) value);
field.set(model, dataLayer);
// System.out.println(dataLayer);
break;
}
}
COM: <s> loads the field value into the model </s>
|
funcom_train/25066190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSitesTabPanel() {
sitesTabPanel = new RoundedTabPanel();
getSiteMetaDataTitleBox().add(sitesTabPanel);
for (Iterator iterator = currentSites.iterator(); iterator.hasNext();) {
BioMaterial site = (BioMaterial) iterator.next();
sitesTabPanel.add(populateSiteTable(site), truncateSiteId(site.getMaterialAcc()));
}
}
COM: <s> this method gets called if current sites </s>
|
funcom_train/1658902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public N findRoute(K k, Contains<N> previous) {
double best = Double.MAX_VALUE;
N fn = null;
for (int i = 0 ; i < currSize ; i++) {
K key = keys.get(i);
N node = routes.get(i);
double d = key.dist(k);
if (d < best && (previous != null && !previous.contains(node))) {
fn = routes.get(i);
best = d;
}
}
return fn;
}
COM: <s> finds the element with the closest key to k </s>
|
funcom_train/14214874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Timestamp getReservStart(double addDays) {
if (addDays == 0)
return this.reservStart;
else {
if(this.reservStart != null)
return new Timestamp((long)(this.reservStart.getTime() + (addDays * 86400000.0)));
else
return null;
}
}
COM: <s> returns the reservation start date with a number of days added </s>
|
funcom_train/31871626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class FrameTOWN extends FrameT {
public String getLongName () { return "File owner frame"; }
public FrameTOWN (ID3V2Frame frm, DataSource ds)
throws SeekPastEndException {
super (frm, ds);
}
public String toString () {
return getLongName () + " Encoding: "+encoding+"\nOriginal release year : "
+ text;
}
}
COM: <s> file owner frame </s>
|
funcom_train/36426415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Value getValue(final Variable variable) {
BindingValue bval = this.bvalues.get(variable);
if (bval == null) { // not bound
return Value.UNDEFINED;
} else if (bval.getExternalVariable() == null) {
return bval.getValue();
} else {
return bval.getExternalBinding().getValue(bval.getExternalVariable());
}
}
COM: <s> get the variables value by looking up the internal id </s>
|
funcom_train/1383643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPnlRiga1() {
if (pnlRiga1 == null) {
FlowLayout flowLayout1 = new FlowLayout();
flowLayout1.setAlignment(FlowLayout.LEFT);
pnlRiga1 = new JPanel();
pnlRiga1.setLayout(flowLayout1);
pnlRiga1.add(lblDa, null);
pnlRiga1.add(getDateDal(), null);
pnlRiga1.add(lblAl, null);
pnlRiga1.add(getDateAl(), null);
}
return pnlRiga1;
}
COM: <s> this method initializes pnl riga1 </s>
|
funcom_train/47161120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRevision(int revision)
{ if ( revision < 0 )
throw new IllegalArgumentException("revision is to be greater or equal to 0");
int oldValue = this.getRevision();
this.revision = revision;
this.support.firePropertyChange(PROPERTY_REVISION, oldValue, this.getRevision());
}
COM: <s> set the revision number of the version </s>
|
funcom_train/40947830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field getField(Object propertyId) {
for (final Iterator i = forms.iterator(); i.hasNext();) {
final Form f = (Form) i.next();
final Field af = f.getField(propertyId);
if (af != null) {
return af;
}
}
return null;
}
COM: <s> find a field from all forms </s>
|
funcom_train/10212505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addCrawlEventListener(IFileWatchEventListener listener) {
boolean isAdded = true;
for (Entry<String, Set<IFileWatchEventListener>> entry : this.observerMap.entrySet()) {
if (!entry.getValue().add(listener)) {
isAdded = false;
}
}
return isAdded;
}
COM: <s> this method adds an </s>
|
funcom_train/12661606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isKeyBasedAuthentication(INodeEntry nodeEntry) {
logger.debug("DefaultNodeAuthResolutionStrategy checking if is password based authentication. " +
"Node '"+nodeEntry.getNodename()+"' has password set? " + nodeEntry.hasPasswordSet());
return !nodeEntry.hasPasswordSet();
}
COM: <s> predicate returning if this strategy is key based </s>
|
funcom_train/5858884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User getFirstOwner() {
for (Enumeration e = rights.elements(); e.hasMoreElements(); ) {
Right r = (Right) e.nextElement();
if (r.isOwner()) {
return r.getOwner();
}
}
throw new InternalError("This ACL object (" + this.toString()
+ ") has no Owner !");
}
COM: <s> returns the owner of the first right registered </s>
|
funcom_train/50360866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String explainScoreCombination(double[] multiScore) {
StringBuilder buf = new StringBuilder("");
PrintfFormat fmt = new PrintfFormat(" %.3f");
buf.append("field-level scores [");
for (int i=0; i<multiScore.length; i++) {
buf.append(fmt.sprintf(multiScore[i]));
}
buf.append("] Average score:");
buf.append(fmt.sprintf( scoreCombination(multiScore) ));
return buf.toString();
}
COM: <s> explain how to combine the scores for each primitive distance </s>
|
funcom_train/1448504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String updateRegistrationInformation() throws Exception {
if (logger.isDebugEnabled()) {
logger.debug("updateRegistrationInformation() - start"); //$NON-NLS-1$
}
adminaction = (String) request.getSession().getAttribute("adminaction");
UserServiceDelegator.updateUser(user);
addActionMessage("User updated successfully");
if (logger.isDebugEnabled()) {
logger.debug("updateRegistrationInformation() - end"); //$NON-NLS-1$
}
return SUCCESS;
}
COM: <s> edits the registration information </s>
|
funcom_train/51782675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void resizeSw(double diffx, double diffy) {
tmpPos.setLocation(node.getAbsoluteX1() + diffx,
node.getAbsoluteY1());
tmpSize.setSize(node.getSize().getWidth() - diffx,
node.getSize().getHeight() + diffy);
new CornerSnap(editor.getDiagram(), tmpPos, tmpSize).snapLeftLower();
}
COM: <s> resize using the sw handle </s>
|
funcom_train/4286130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDestCardinalityPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Association_destCardinality_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Association_destCardinality_feature", "_UI_Association_type"),
UmlMMPackage.Literals.ASSOCIATION__DEST_CARDINALITY,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the dest cardinality feature </s>
|
funcom_train/457727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Date parseLdapDate(final String inputDate) {
simpleDateFormat = new SimpleDateFormat(date_format);
Date date;
try {
date = simpleDateFormat.parse(inputDate);
} catch (final ParseException parseException) {
log.error("Date field '"+inputDate+"' in ldap does not have the right format: "+date_format);
date = null;
}
return date;
}
COM: <s> creates date from string used by project attributes mapper </s>
|
funcom_train/31936347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List values() {
int size = mapIdToRec.size();
ArrayList list = new ArrayList(size);
Iterator iter = mapIdToRec.values().iterator();
while (iter.hasNext()) {
RefRec rec = (RefRec)iter.next();
list.add(rec.getValue());
}
return list;
}
COM: <s> returns a complete list of the values in the counter </s>
|
funcom_train/547538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void adjustSize() {
if( theTable==null ) return;
Dimension ts= theTable.getPreferredSize();
// Unfortunaly the table does not include the column name height
// We also need to add a 2 pixel margin (ScrollPane bug ???)
ts.width += 4;
ts.height += theTable.getRowHeight() + 4;
tableView.setPreferredSize(ts);
}
COM: <s> adjust the scroll pane preferred size according to </s>
|
funcom_train/46322399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PVector getCenter() {
int centerX = (int)(getBounds().getX()+getBounds().getWidth()/2);
int centerY = (int)(getBounds().getY()+getBounds().getHeight()/2);
return new PVector(centerX, centerY, 0);
}
COM: <s> returns the center coordinates of the global bounding polygon </s>
|
funcom_train/37611547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttributeMap parse(String string) {
final Matcher matcher = m_nameValuePattern.matcher(string);
final Map<String, String> map = new HashMap<String, String>();
while (matcher.find()) {
map.put(matcher.group(1).toLowerCase(), matcher.group(2));
}
return new AttributeMapImplementation(map);
}
COM: <s> do the parse </s>
|
funcom_train/26018692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setServiceRoutePath(ListIterator<Header> routes) {
serviceRoutePath.clear();
// Always add the outbound proxy
serviceRoutePath.addElement(getDefaultRoute());
if (routes != null) {
// Add the received service route path
while(routes.hasNext()) {
ExtensionHeader route = (ExtensionHeader)routes.next();
serviceRoutePath.addElement(route.getValue());
}
}
}
COM: <s> set the service route path </s>
|
funcom_train/48795948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSizeExceptFailures() {
int ret = 0;
for (int i = 0; i < el.length; i++) {
String n = ((ClusterElement)el[i]).getName();
if (!(n.equals("TotalFailure")
|| n.equals("InternalFailure")
|| n.equals("ExternalFailure"))) {
ret++;
}
}
return ret;
}
COM: <s> special case function returns count of all elements except those </s>
|
funcom_train/8227273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cleanContentExtraWhiteSpaces() {
if (getContent().length() > 0) {
if (shouldRemoveWhiteSpaces()) {
Matcher matcher = HTML_WHITESPACE_DUPLICATES_PATTERN
.matcher(getContent());
String result = matcher.replaceAll(" ");
getContent().setLength(0);
getContent().append(result);
}
}
}
COM: <s> uc3 replace group of white spaces by a single space </s>
|
funcom_train/37750759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextDecorations cloneCurrentTextDecorations() {
PropertyValue textdec = getPropertyValue(Property.TEXT_DECORATION);
assert(textdec instanceof TextDecorations);
try {
return (TextDecorations)(textdec.clone());
} catch (CloneNotSupportedException e) {
throw new RuntimeException("Clone not supported.");
}
}
COM: <s> clone the current i text decorations i property </s>
|
funcom_train/3621084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double convertTwipsToPoints(int twips, int roundDigits) {
double result = (twips == 0 ? 0f : twips * 0.05f);
// shortcut
if (result == 0) return 0;
// round the result
double factor = Math.pow(10, roundDigits);
result = Math.round( result * factor ) / factor;
return result;
}
COM: <s> this method converts twips a twentieth of a point to points </s>
|
funcom_train/12127211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaintFrom(PBounds localBounds, PNode descendentOrThis) {
if (getParent() != null) {
if (descendentOrThis != this) {
localToParent(localBounds);
}
if (component != null) {
component.repaint(localBounds);
}
getParent().repaintFrom(localBounds, this);
}
}
COM: <s> repaint this camera and forward the repaint request to the cameras </s>
|
funcom_train/18229564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void visitDualGraph(Vertex vertex, Collection visited) {
if (vertex.visited) {
return;
}
visited.add(vertex.object);
vertex.visited = true;
Iterator it = vertex.edges();
while (it.hasNext()) {
Vertex v = (Vertex) it.next();
visitDualGraph(v, visited);
}
}
COM: <s> visit dual graph </s>
|
funcom_train/2588769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cycle() {
observe();
reason();
execute();
try {
Thread.sleep((long) (Math.random() * 500 + 100));
// System.out.println("Biotutor" + this.getAgentId() + ": I am alived and kicking");
} catch (Exception e) {};
cycle();
}
COM: <s> the main cycle locus of control of the agent </s>
|
funcom_train/42777994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object createNewObject(Class aClass, Class<?>[] paramClasses, Object[] params) {
try {
Constructor c = aClass.getConstructor(paramClasses);
Object obj = c.newInstance(params);
return obj;
} catch (Exception ex) {
throw new TiiraException(ex);
}
}
COM: <s> creates a new instance of given class using constructor matching parameter classes </s>
|
funcom_train/3371214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected TreeCellEditor createTreeCellEditor() {
Border aBorder = UIManager.getBorder("Tree.editorBorder");
DefaultCellEditor editor = new DefaultCellEditor
(new DefaultTextField(aBorder)) {
public boolean shouldSelectCell(EventObject event) {
boolean retValue = super.shouldSelectCell(event);
return retValue;
}
};
// One click to edit.
editor.setClickCountToStart(1);
return editor;
}
COM: <s> this is invoked if a code tree cell editor code </s>
|
funcom_train/40873699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GraphicalInformations getGraphicalInformations() {
GraphicalInformations ret = new GraphicalInformations();
for(Object o : root.getChildren()) {
if(o instanceof IHasFormatableModelElement && o instanceof IHasPointList) {
ret.put(((IHasFormatableModelElement)o).getModelElement(), ((IHasPointList)o).getPointList());
}
}
return ret;
}
COM: <s> return all graphical informations associated with all </s>
|
funcom_train/22216004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() {
File file = new File(this.getCategory() + "-utf8.lm");
try {
if (file.createNewFile()) {
FileOutputStream fos = new FileOutputStream(file);
fos.write(this.toString().getBytes("utf8"));
fos.close();
}
} catch (FileNotFoundException fnfe) {
fnfe.printStackTrace();
} catch (IOException ioe) {
ioe.printStackTrace();
}
}
COM: <s> saves the fingerprint to a file named categoryname </s>
|
funcom_train/15480014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startApp() {
//deleteRMS();
if (RecordStore.listRecordStores() != null) {
main2.setStatus(readRMS());
if (main2.getCompMode() != 0) {
menu.addContinue();
}
}
splash.startTimer();
display.setCurrent(splash);
}
COM: <s> start up the hello midlet by creating the text box and associating </s>
|
funcom_train/24378947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document getTypeAsDOM(InlineChoiceInteractionType type) {
Document dom = null;
if (type != null) {
QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "inlineChoiceInteraction");
JAXBElement<InlineChoiceInteractionType> jaxbe =
new JAXBElement<InlineChoiceInteractionType>(qname, InlineChoiceInteractionType.class, type);
dom = getDOM(jaxbe);
}
return dom;
}
COM: <s> gets a inline choice interaction type as a dom document </s>
|
funcom_train/40402912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void markOdd() {
RowFormatter formatter = dataGrid.getRowFormatter();
for (int i = 0; i < dataGrid.getRowCount(); i++) {
if (i % 2 == 1) {
formatter.addStyleName(i, "gwtaf-oddRow");
formatter.removeStyleName(i, "gwtaf-evenRow");
} else {
formatter.removeStyleName(i, "gwtaf-oddRow");
formatter.addStyleName(i, "gwtaf-evenRow");
}
}
}
COM: <s> marks all the odd rows with a specific css name </s>
|
funcom_train/49720267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel10() {
if (jPanel10 == null) {
GridBagConstraints gridBagConstraints26 = new GridBagConstraints();
gridBagConstraints26.fill = GridBagConstraints.BOTH;
gridBagConstraints26.weighty = 1.0;
gridBagConstraints26.insets = new Insets(10, 10, 10, 20);
gridBagConstraints26.weightx = 1.0;
jPanel10 = new JPanel();
jPanel10.setLayout(new GridBagLayout());
jPanel10.add(getJScrollPane1(), gridBagConstraints26);
}
return jPanel10;
}
COM: <s> this method initializes j panel10 </s>
|
funcom_train/28425614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Ftplet getFtplet(String name) {
if(name == null) {
return null;
}
Ftplet ftplet = null;
int sz = ftplets.size();
for(int i=0; i<sz; ++i) {
FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i);
if(ftpletEnt.name.equals(name)) {
ftplet = ftpletEnt.ftplet;
break;
}
}
return ftplet;
}
COM: <s> get ftplet for the given name </s>
|
funcom_train/43922186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean dataStoresUseNamespace(DataConfig dataConfig, String nsSelected) {
List stores = dataConfig.getDataStoreIds();
Iterator it = stores.iterator();
while (it.hasNext()) {
DataStoreConfig dsc = dataConfig.getDataStore((String) it.next());
if (dsc.getNameSpaceId().equals(nsSelected)) {
return true;
}
}
return false;
}
COM: <s> return true if the namespace is being used by a datastore </s>
|
funcom_train/2955223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paint(int color) {
int x, y;
for (int i = 0; i < shapeX.length; i++) {
x = xPos + getRelativeX(i, orientation);
y = yPos + getRelativeY(i, orientation);
board.setSquareColor(x, y, color);
}
}
COM: <s> paints the figure on the board with the specified color </s>
|
funcom_train/51538975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroyMidlet() {
if (midletState != MIDLET_DESTROYED) {
if (getTimer() != null) {
// A destroy MIDlet event has been sent.
return;
}
new MIDletDestroyTimer(this, parent);
midletEventProducer.sendMIDletDestroyEvent(isolateId, displayId);
}
}
COM: <s> asynchronously change the midlets state to destroyed </s>
|
funcom_train/50327468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void restartTimer(int delay) {
if (timer==null) {
timer = new javax.swing.Timer(delay, new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
sendNextItem();
}
});
}
timer.stop();
timer.setInitialDelay(delay);
timer.setRepeats(false);
timer.start();
}
COM: <s> internal routine to handle timer starts restarts </s>
|
funcom_train/41737504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
Dimension screenSize = this.getToolkit().getScreenSize();
this.setSize(screenSize.width, screenSize.height);
this.setExtendedState(Frame.MAXIMIZED_BOTH);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setTitle("Virtual-Reality Maze - SJTU SE F06");
this.setContentPane(getJContentPane());
this.setUndecorated(true);
this.setVisible(true);
}
COM: <s> this method initializes this </s>
|
funcom_train/7518274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Cargo entity) {
EntityManagerHelper.log("deleting Cargo instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(Cargo.class,
entity.getId());
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 cargo entity </s>
|
funcom_train/19609602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean hasTable(String tableName) {
String methodName = ".hasTable() ";
List<String> tables = getTables();
Boolean found = false;
for (String table : tables) {
if (table.contentEquals(tableName)) {
found = true;
}
}
Log.enter(className + methodName + tableName + " found = " + found.toString());
return found;
}
COM: <s> check if table is available in database </s>
|
funcom_train/51359880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
int totalBehaviors = behavior.length - 1;
while(true) {
for(int i = totalBehaviors;i>=0;--i)
{
if(behavior[i].takeControl())
{
behavior[i].action();
i = 0; // Breaks out of for() loop
}
}
}
}
COM: <s> this method starts the arbitration of behaviors </s>
|
funcom_train/51296520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delSupplier(int id) {
ResultSet res = null;
try {
res = DBAccessor.getInstance().makeSelect(
"SELECT dpl_id FROM ca_in_supplier_price_list WHERE ca_id = "
+ id + ";");
while (res.next()) {
DBAccessor.getInstance().executeQuery(
getDeleteSupplierPriceSql(res.getInt("dpl_id")));
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
DBAccessor.getInstance().releaseConnection(res);
}
}
COM: <s> removes contractor from pricelists </s>
|
funcom_train/23793808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TableSwitch (Operand value, Operand unknown1, Operand unknown2, IntConstantOperand low, IntConstantOperand high, BranchOperand defaultTarget, BranchProfileOperand defaultBranchProfile, int numVarOps) {
super (value, unknown1, unknown2, low, high, defaultTarget, defaultBranchProfile, numVarOps);
}
COM: <s> constructor for table switch </s>
|
funcom_train/40544597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaxdays(int d) {
this.maxdays = d;
nightsListBox.clear();
nightsListBox.addChangeHandler(new ChangeHandler() {
public void onChange(ChangeEvent event) {
updateInputsFromNights();
}
});
for (int i = 0; i <= maxdays; i++)
nightsListBox.addItem("" + i);
updateTextElements();
}
COM: <s> configure the maximal days allowed </s>
|
funcom_train/16786743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getResponsibleUserNameIfAvailable(String ifNotAvailable) throws RQLException {
Page page = getPage();
String templateElementName = getParameter("respNameTmpltElemName");
if (page.contains(templateElementName)) {
StandardFieldTextElement rdText = page.getStandardFieldTextElement(templateElementName);
if (rdText != null) {
return rdText.getText();
}
}
return ifNotAvailable;
}
COM: <s> gets the responsible user name if template element available </s>
|
funcom_train/18552014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void newButtonAction() {
// Call our Wizard
gProjectWizardDialog = new ProjectWizardDialog();
// Check if the project was sucessfully created
if (gProjectWizardDialog.getWizardStatus()
== ProjectWizardDialog.PROJECT_CREATE_SUCESSFUL) {
enableProjectFrames();
gSaveButton.setEnabled(true);
gSaveItem.setEnabled(true);
}
}
COM: <s> handles the action when a new button is pressed </s>
|
funcom_train/13558371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeObject(OutputStream outputStream) throws IOException {
ASN1Primitive derEncoded = getDERObject();
if (derEncoded == null) { throw new IOException("Could not decode from DER."); }
byte[] derEncodedBytes = derEncoded.getEncoded(ASN1Encoding.DER);
if (derEncodedBytes == null) { throw new IOException("Could not decode from DER."); }
outputStream.write(derEncodedBytes);
}
COM: <s> writes this security info to output stream </s>
|
funcom_train/16394336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createUserSet(UserSet userSet) {
// check for existing set and create a reasonable exception if necessary
if (getUserSet(userSet.getName(),userSet.getGroup()) != null){
throw new InputException(ResourceBundle.getBundle("UserManagement", locale).getString("userSetExists") + ": " + userSet.getName());
}
userSet.setCreationdate(new Date());
session.save(userSet);
}
COM: <s> creates a new user set the creation date is automatically set </s>
|
funcom_train/3842025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireProjectile() {
int x = ((Animation) animations.get(0)).getX()+12;
int y = ((Animation) animations.get(0)).getY()+12;
Point p = player.calculateDirection(24);
addAnimation(new CD(animTicker, x, y, p.x, p.y, this));
}
COM: <s> fires the currently selected projectile </s>
|
funcom_train/47578758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateBPELVariableNames_MinLength(List<?> bpelVariableNames, DiagnosticChain diagnostics, Map<Object, Object> context) {
int length = bpelVariableNames.size();
boolean result = length >= 1;
if (!result && diagnostics != null)
reportMinLengthViolation(BpelPackage.eINSTANCE.getBPELVariableNames(), bpelVariableNames, length, 1, diagnostics, context);
return result;
}
COM: <s> validates the min length constraint of em bpel variable names em </s>
|
funcom_train/5248568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUpPackageHierarchy() {
if(packages!=null) {
IPackageService p = null;
// In a first loop on the packages list,
for(int i=0 ; i<packages.size() ; i++) {
//Each package retrieves its parent
p = packages.get(i);
if(p!=null) {
p.retrieveContainerFromHierarchy();
}
}
// Recursively each package retrieve its children
List<IPackageService> root = fetchSubPackagesFromHierarchy();
packages = root;
packagesHierarchy = true;
}
}
COM: <s> set up the package hierarchy from the content of </s>
|
funcom_train/19392121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildFrame() {
JFrame frame = new JFrame();
frame.setContentPane(buildContent());
frame.setSize(350, 150);
frame.setTitle("JGoodies Animation :: Intro");
frame.setDefaultCloseOperation(3); // EXIT_ON_CLOSE
locateOnScreenCenter(frame);
frame.setVisible(true);
}
COM: <s> builds and opens the demo frame </s>
|
funcom_train/35497991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doLast() {
if (Long.toString(this.listQuestions.get(listQuestions.size() - 1).getId()).equals(this.questionID)) {
return;
}
this.questionID = Long.toString(this.listQuestions.get(listQuestions.size() - 1).getId());
}
COM: <s> process to go to the last question </s>
|
funcom_train/1549847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void swapColors(final Node<K, V> node, final int index) {
// Swap colors -- old hacker's trick
blackColor[index] ^= node.blackColor[index];
node.blackColor[index] ^= blackColor[index];
blackColor[index] ^= node.blackColor[index];
}
COM: <s> exchange colors with another node </s>
|
funcom_train/40793841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getStopCommand2() {
if (stopCommand2 == null) {//GEN-END:|176-getter|0|176-preInit
// write pre-init user code here
stopCommand2 = new Command("Stop", Command.STOP, 0);//GEN-LINE:|176-getter|1|176-postInit
// write post-init user code here
}//GEN-BEGIN:|176-getter|2|
return stopCommand2;
}
COM: <s> returns an initiliazed instance of stop command2 component </s>
|
funcom_train/20767505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(GL gl, int method) {
gl.glEnableClientState(GL.GL_VERTEX_ARRAY);
/* draw data series */
cache.position(0);
gl.glVertexPointer(dimension, GL.GL_FLOAT, 0, cache); // draw vertices of float from cache beginning at 0
gl.glDrawArrays(GL.GL_LINES, 0, elementsCount / dimension);
}
COM: <s> draw the vectors </s>
|
funcom_train/20175433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGWTProperty(String property, String value) {
if (!containsKey("gwtProperties")) {
put("gwtProperties", new HashMap<String, String>());
}
((Map<String, String>) get("gwtProperties")).put(property, value);
}
COM: <s> adds a property that can be accessed by gwt modules </s>
|
funcom_train/21244150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSubject ( String pstrSubject ) {
try {
// mstrSubject = InetAddress.getLocalHost().getHostName() + " " +
// pSubject;
//mstrSubject = pSubject
// + " @ "
// + InetAddress.getLocalHost().getHostName();
mstrSubject = pstrSubject;
}
catch ( Exception e ) {
mstrSubject = pstrSubject;
}
}
COM: <s> traditional setter method that sets the subject line of the </s>
|
funcom_train/34795833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int sum(QueensBoard board, int d) {
int sum = 0;
for (int i = 0; i < problem.size(); i++) {
for (int j = 0; j < problem.size(); j++) {
if (board.isQueen(i, j)) {
sum += problem.costs(d, i, j);
}
}
}
return sum;
}
COM: <s> sums the costs of a </s>
|
funcom_train/38380634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EchidnaProject (URL mdrFilename, String sourcecodeInputDir, String sourcecodeOutputDir) throws MalformedURLException, CreationFailedException, IOException, MalformedXMIException {
this.mdrFilename = mdrFilename;
this.sourcecodeInputDir = sourcecodeInputDir;
this.sourcecodeOutputDir = sourcecodeOutputDir;
this.checksum = -1;
setMdrApi(null);
}
COM: <s> create a new project without reading from file </s>
|
funcom_train/17144079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOneWhitePixelGrayPng() {
String filename = "oneWhitePixelGray";
SLBufferedImage image = new SLBufferedImage(dir,filename,".png");
assertNotNull(image);
assertTrue(image.isEmpty());
if (true) return;
assertEquals(1, image.getWidth());
assertEquals(1, image.getHeight());
assertEquals(1, image.getNChannels());
assertNotNull(image.getPixels());
assertEquals(3, image.getPixelsInBytes().length);
assertEquals(-1, image.getPixelsInBytes()[0]);
}
COM: <s> maybe ioimage cannot open gray png images </s>
|
funcom_train/43358328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMethod getXMethod(final XClass xClass, final String methodName, final String methodSig) {
if (xClass == null) {
return null;
}
XMethod xMethod = xClass.findMethod(methodName, methodSig, false);
if (xMethod == null) {
final XClass superClass = getXClass(xClass
.getSuperclassDescriptor());
xMethod = getXMethod(superClass, methodName, methodSig);
}
return xMethod;
}
COM: <s> looks for the method up the class hierarchy </s>
|
funcom_train/28500494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHttpOperation( boolean pSet, final int pValue ) {
switch( pValue ) {
case POST_AS_GET: mPOST_AS_GET = pSet; break;
case PUT_AS_GET: mPUT_AS_GET = pSet; break;
case DELETE_AS_GET: mDELETE_AS_GET = pSet; break;
}
return;
}
COM: <s> set http operation </s>
|
funcom_train/47947257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeNode find(int nodeid) {
TreeNode p = head;
while (p != null) {
// Compare element with the element in the current subtree
int result = cmp.compare(nodeid, p.id);
if (result == 0) {
break;
}
// Go left or right based on comparison result
p = result < 0 ? p.l : p.r;
}
return p;
}
COM: <s> finds the tree node a given element is stored at </s>
|
funcom_train/12777531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRawTable(int[] exceptions) {
if (exceptions == null) {
throw new IllegalArgumentException("exceptions is null");
}
for (int i = 0; i < exceptions.length; i++) {
if (exceptions[i] < 1 || exceptions[i] > 0xFFFF) {
throw new IllegalArgumentException("Invalid CP index: " + exceptions[i]);
}
}
this.table = exceptions;
}
COM: <s> set the list of exceptions that can be thrown </s>
|
funcom_train/23340220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getMessagesCheckBox() {
if (messagesCheckBox == null) {
messagesCheckBox = new JCheckBox();
messagesCheckBox.setText("Messages");
messagesCheckBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
toggleCheckBox(messagesCheckBox);
}
});
}
return messagesCheckBox;
}
COM: <s> this method initializes messages check box </s>
|
funcom_train/12165352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNotInList() throws Exception {
List list = new ArrayList();
for (int i = 0; i < valid.size(); i++) {
list.add(valid.get(i));
}
list.add("PC");
list.add("Unix");
doTest((SelectionValidator) createValidator(list), invalid, Status.ERROR);
}
COM: <s> test items that are not in a non null list </s>
|
funcom_train/42114918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSObject makeJSObject(JSObject prototype) {
synchronized (evaluator) {
ESObject op = evaluator.getObjectPrototype();
if (prototype != null) {
Evaluator otherEvaluator = ((JSWrapper) prototype).evaluator;
if (otherEvaluator != evaluator)
throw new ProgrammingError("Evaluator mismatch");
op = (ESObject) ((JSWrapper) prototype).getESObject();
}
ESObject object = new ObjectPrototype((ESObject) op, evaluator);
return new JSWrapper(object, evaluator);
}
}
COM: <s> make a new object based the object prototype object </s>
|
funcom_train/39185219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File fileobj) {
String extension = "";
if(fileobj.getPath().lastIndexOf('.') > 0)
extension = fileobj.getPath().substring(fileobj.getPath().lastIndexOf('.') + 1).toLowerCase();
if(extension != "")
return extension.equals("clust");
else
return fileobj.isDirectory();
}
COM: <s> returns whether or not file contains the cluster file extension </s>
|
funcom_train/42715235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendKeepalive() {
Packet keepalive = new Packet();
keepalive.byte_data[0] = PacketFactory.PACKET_KEEPALIVE;
keepalive.len = 1;
Interface[] if_list = new Interface[interfaces.size()];
interfaces.copyInto(if_list);
for(int i = 0; i < if_list.length; i++)
if_list[i].send(keepalive);
}
COM: <s> sends a keepalive packet to all interfaces </s>
|
funcom_train/544927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModel(INumberSpectrum v) {
clearModel();
if (v == null) {
repaint();
return;
}
model = v;
if(readPollingHistory) readHistory();
statusLabel.setText(model.getName());
model.addSpectrumListener(this);
synchronized (this) {
buildImage();
}
repaint();
}
COM: <s> sets the model of this viewer </s>
|
funcom_train/46575631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startLIST(NamedNodeMap nnm) throws AppToyException {
int style = SWT.BORDER|SWT.V_SCROLL;
if (getAttribute(nnm, "type", "single").equals("multi")) {
style |= SWT.MULTI;
}
List lst = new List((Composite) ctx.parent,style);
ctx.control = lst;
processEventAttributes(nnm, "http://apptoy.sf.net/events");
String id = getAttribute(nnm, "id", null);
if (id != null) {
presenter.addControl(id, new AList(lst));
}
processControlAttributes((Control)ctx.control,nnm);
}
COM: <s> creates a list control </s>
|
funcom_train/40410954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseOption(String argString) throws IllegalArgumentException {
int index = argString.indexOf('=');
if (index == -1) {
optionMap.put(argString, null);
} else {
optionMap.put(argString.substring(0, index), argString.substring(index + 1));
}
}
COM: <s> parses key and value pair from a string </s>
|
funcom_train/16414615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setZoomDevice(ZoomDevice newZoomDevice) {
if (newZoomDevice == ZoomDevice.NONE) {
removeWheelZoomDevice();
removeButtonZoomDevice();
} else if (newZoomDevice == ZoomDevice.MOUSE_BUTTON) {
removeWheelZoomDevice();
addButtonZoomDevice();
} else if (newZoomDevice == ZoomDevice.MOUSE_WHEEL) {
removeButtonZoomDevice();
addWheelZoomDevice();
}
}
COM: <s> p sets a new zoom device </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.