__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/38289598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point transform(int width, int height) {
Rectangle2D rect = new Rectangle(0, 0, width, height);
rect = this.matrixStack.peek().transform(rect);
// TODO conversion check
Point p = new Point(0, 0);
p.x = (int) Math.round(rect.getWidth());
p.y = (int) Math.round(rect.getHeight());
return p;
}
COM: <s> transforms dimensions into coordinate system of actual viewport </s>
|
funcom_train/10595290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean getInitParameterAsBoolean(String name, boolean defaultValue) {
String value = getInitParameter(name);
if (value == null) {
if (getLogger() != null && getLogger().isDebugEnabled()) {
getLogger().debug(name + " was not set - defaulting to '" + defaultValue + "'");
}
return defaultValue;
}
return BooleanUtils.toBoolean(value);
}
COM: <s> convenience method to access boolean portlet parameters </s>
|
funcom_train/14230136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mediaSignalDetectorDetected(java.lang.String terminal, Symbol[] sigs) {
// Try to send the event to the client side
try {
this.getDelegate().mediaSignalDetectorDetected(terminal, SymbolHolder.create(sigs));
} catch (RemoteException re) {
// eat
System.err.println("Error pushing events back to client: ");
re.printStackTrace(System.err);
}
}
COM: <s> media signal detector detected method comment </s>
|
funcom_train/31678446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public F determinant() {
F product = _LU.get(0, 0);
for (int i = 1; i < _n; i++) {
checkCanceled();
product = product.times(_LU.get(i, i));
}
return ((_permutationCount & 1) == 0) ? product : product.opposite();
}
COM: <s> returns the determinant of the </s>
|
funcom_train/1530858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public String getAlgebraDescriptionTextOrHTML() {
if (strAlgebraDescTextOrHTMLneedsUpdate) {
String algDesc = getAlgebraDescription();
// convertion to html is only needed if indices are found
if (hasIndexLabel()) {
strAlgebraDescTextOrHTML =
indicesToHTML(algDesc, true);
} else {
strAlgebraDescTextOrHTML = algDesc;
}
strAlgebraDescTextOrHTMLneedsUpdate = false;
}
return strAlgebraDescTextOrHTML;
}
COM: <s> returns algebraic representation of this geo element as text </s>
|
funcom_train/3415258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int randomLevel() {
int x = randomSeed;
x ^= x << 13;
x ^= x >>> 17;
randomSeed = x ^= x << 5;
if ((x & 0x8001) != 0) // test highest and lowest bits
return 0;
int level = 1;
while (((x >>>= 1) & 1) != 0) ++level;
return level;
}
COM: <s> returns a random level for inserting a new node </s>
|
funcom_train/22347426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initHead() {
Document tempdoc = DocumentHelper.createDocument();
tempdoc.add(this.getProxy().getTileConfig().element(CONFIG_TAG_NAME)
.element("head").createCopy());
tableHeadEl = tempdoc.getRootElement();
String defstate = getDefaultSortStateId();
if(defstate != null)
handleSort(defstate);
// tableHeadEl.addAttribute("screenName", this.getScreen().getName());
tableHeadEl.addAttribute("tileName", this.getName());
}
COM: <s> inits table header and sort switches </s>
|
funcom_train/36769639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void nameChanged() {
if (Controller.getInstance().isFVExisted(nameField.getText().trim())) {
nameField.setText(fileViewer.getName().toString());
Message.displayMessage("New name is the same as \nanother file viewer name",
"Test Tracker", JOptionPane.WARNING_MESSAGE);
} else {
Controller.getInstance().editFileViewerName(nameField.getText().trim());
}
}
COM: <s> this method is called when the user modifies the viewer name field </s>
|
funcom_train/42358561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void applySearchPattern() {
Parser parser = new Parser();
String input = tfSearch.getText();
AstNode expression;
try {
expression = parser.parse(input);
} catch (ParserException err) {
return;
}
INavigatorTreeNode rootNode = (INavigatorTreeNode) regionTreePanel.getJtRegion().getModel().getRoot();
rootNode.applySpotSearch(expression);
regionTreePanel.clearSelection();
regionTreePanel.getJtRegion().treeDidChange();
regionTreePanel.getJtRegion().updateUI();
}
COM: <s> used to filter some elements from the navigator tree </s>
|
funcom_train/50297202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) return true;
if (!(obj instanceof AbstractSavepoint)) return false;
AbstractSavepoint that = (AbstractSavepoint)obj;
return this.name == null ?
this.savepointId == that.savepointId :
this.name.equals(that.name);
}
COM: <s> check if objects are equal </s>
|
funcom_train/38308831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAttributeSupported(String name, String styleName) {
AttributeDefinition attrDef = null;
if (name != null) {
attrDef = (AttributeDefinition) supportedAttributeMap.get(name);
}
if (attrDef != null) {
return true;
}
if (styleName != null) {
attrDef = (AttributeDefinition) supportedStyleAttributeMap.get(styleName);
}
return (attrDef != null);
}
COM: <s> checks if the given attribute or style attribute is supported </s>
|
funcom_train/16383125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasLeaf() {
//if this is a leaf it doesn't have leafs
if(this.isLeaf())
return false;
//if any leaf is found return true
for(ResultNode child : this.getChildren()) {
if(child.isLeaf())
return true;
}
//else return false
return false;
}
COM: <s> retrieve a boolean that indicates whether this node </s>
|
funcom_train/31679158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsAll(Collection <?> c) {
if (c instanceof FastCollection)
return containsAll((FastCollection) c);
Iterator <?> itr = c.iterator();
int pos = c.size();
while (--pos >= 0) {
checkCanceled();
if (!contains(itr.next())) {
return false;
}
}
return true;
}
COM: <s> indicates if this collection contains all of the values of the </s>
|
funcom_train/38529138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
synchronized (this) {
if (source instanceof Scaler) {
valueNew = ((Scaler) source).getValue();
value = (valueNew - valueOld) / interval;
valueOld = valueNew;
} else if (source instanceof Gate) {
valueNew = ((Gate) source).getArea();
value = (valueNew - valueOld) / interval;
valueOld = valueNew;
} else if (source instanceof Sorter) {
value = ((Sorter) source).monitor(name);
}
}
}
COM: <s> updates this monitor calculating the latest monitor values </s>
|
funcom_train/51628373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addBound(String boundSignature) {
if (SignatureUtil.isJavaLangObject(boundSignature))
return;
boolean found= false;
for (ListIterator it= fBounds.listIterator(); it.hasNext();) {
String old= (String) it.next();
if (isTrueSubtypeOf(boundSignature, old)) {
if (!found) {
it.set(boundSignature);
found= true;
} else {
it.remove();
}
}
}
if (!found)
fBounds.add(boundSignature);
}
COM: <s> filters the current list of type bounds through the additional type </s>
|
funcom_train/33660774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteUser(User user) throws BlmsException {
for (League l : store.leagues)
if (l.getOperator() == user)
throw new BlmsException("Cannot remove league operator");
LinkedList<Join> auxJoins = new LinkedList<Join>();
for (Join j : store.joins) {
if ((j.user).equals(user)) {
auxJoins.add(j);
}
}
store.joins.removeAll(auxJoins);
store.users.remove(user);
updateDb();
}
COM: <s> deletes the given user </s>
|
funcom_train/1547471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OpenMapRealVector append(OpenMapRealVector v) {
OpenMapRealVector res = new OpenMapRealVector(this, v.getDimension());
Iterator iter = v.entries.iterator();
while (iter.hasNext()) {
iter.advance();
res.setEntry(iter.key() + virtualSize, iter.value());
}
return res;
}
COM: <s> optimized method to append a open map real vector </s>
|
funcom_train/8629226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultExpression(Session session, Expression defaultExpression) throws SQLException {
// also to test that no column names are used
if (defaultExpression != null) {
defaultExpression = defaultExpression.optimize(session);
if (defaultExpression.isConstant()) {
defaultExpression = ValueExpression.get(defaultExpression.getValue(session));
}
}
this.defaultExpression = defaultExpression;
}
COM: <s> set the default expression </s>
|
funcom_train/7426852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(final PropertyChangeEvent evt) {
final Component source = (Component) evt.getSource();
if (source.getFont() != null && component.isAncestorOf(source)) {
minFontSize = Math.min(minFontSize, source.getFont().getSize());
}
}
COM: <s> listens for changes in font on components rooted at this pswing </s>
|
funcom_train/546643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double distance(NetObject n1,NetObject n2) {
double x = ( n2.getXOrigin() - n1.getXOrigin() );
double y = ( n2.getYOrigin() - n1.getYOrigin() );
return Math.sqrt(x*x+y*y);
}
COM: <s> returns the distance in pixel between 2 net objects </s>
|
funcom_train/12304372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeVariable(String varName) {
if (values == null) return false;
Iterator iter = values.iterator();
Binding binding;
int i=0;
int found = -1;
while( iter.hasNext() ) {
binding = (Binding)iter.next();
if (binding.getName().equals(varName)) {
found = i;
break;
}
i++;
}
if (found != -1) {
values.remove(found);
return true;
} else {
return false;
}
}
COM: <s> removes a specific variable definition from </s>
|
funcom_train/801177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean performFinish() {
try{
return pagetwo.finish();
}catch(Exception ex){
ex.printStackTrace();
MessageBox mb = new MessageBox(new Shell(), SWT.OK);
mb.setText("Error");
mb.setMessage("There was an error saving the InChI. It was not saved!");
mb.open();
return false;
}
}
COM: <s> this method is called when finish button is pressed in </s>
|
funcom_train/4521113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PadronElectoralSolicitante update(PadronElectoralSolicitante entity) {
LogUtil.log("updating PadronElectoralSolicitante instance", Level.INFO,
null);
try {
PadronElectoralSolicitante result = entityManager.merge(entity);
LogUtil.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
LogUtil.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved padron electoral solicitante entity and return </s>
|
funcom_train/16397884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillBox(Graphics g, int x, int y, int width, int height, Color c) {
g.setColor(c);
g.fillRect(translate(x), translate(y), width * size, height * size);
}
COM: <s> draws a filled rectangle covering the specified cells </s>
|
funcom_train/4154420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hitsMapNonExtensive( final MovingObject movingObject ) {
final byte wall = getWall( (int) movingObject.position.x >> GeneralConsts.WALL_WIDTH_SHIFT, (int) movingObject.position.y >> GeneralConsts.WALL_HEIGHT_SHIFT );
return wall == WALL_STONE || wall == WALL_BRICK;
}
COM: <s> tests whether the moving object hits the map </s>
|
funcom_train/21950123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Transaction createTransaction(Connection connection, Statement statement) {
Transaction t = new Transaction(connection, statement);
t.setDelimiter(delimiter);
t.setOnError(onError);
t.setEncoding(encoding);
t.setKeepformat(keepformat);
transactions.addElement(t);
return t;
}
COM: <s> add a sql transaction to execute </s>
|
funcom_train/44977965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public short getFormat(String format, boolean createIfNotFound) {
Iterator iterator;
for (iterator = formats.iterator(); iterator.hasNext();) {
FormatRecord r = (FormatRecord)iterator.next();
if (r.getFormatString().equals(format)) {
return r.getIndexCode();
}
}
if (createIfNotFound) {
return createFormat(format);
}
return -1;
}
COM: <s> returns a format index that matches the passed in format </s>
|
funcom_train/44161779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSorting(String fieldname) {
SelectItem si = null;
for (int i = 0; i < this.sortFields.size(); i++) {
si = (SelectItem)this.sortFields.get(i);
if (fieldname.equals(si.getLabel())
&& (si.getDescription().equals("desc"))) {
return "desc";
}
}
return "asc";
}
COM: <s> get sorting sets sorting value </s>
|
funcom_train/21100753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveAs() {
int result = fileChooser.showSaveDialog(this);
//Handle return value
switch (result) {
case JFileChooser.APPROVE_OPTION:
File toWrite= (fileChooser.getSelectedFile());
//Add fileextension if needed
if(toWrite != null){
if(!toWrite.getPath().endsWith(".oab")){
toWrite = new File(toWrite.getPath() + ".oab");
}
save(toWrite.getPath());
}
break;
case JFileChooser.CANCEL_OPTION:
break;
case JFileChooser.ERROR_OPTION:
//Show error dialogue XXX
break;
}
}
COM: <s> generates the filechooserdialog for save and calles save </s>
|
funcom_train/5429542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModelAndView ownerHandler(HttpServletRequest request, HttpServletResponse response) throws ServletException {
/*Owner owner = clinic.loadOwner(RequestUtils.getIntParameter(request, "ownerId", 0));
if (owner == null) {
return new ModelAndView("findOwnersRedirect");
}
Map model = new HashMap();
model.put("owner", owner);
return new ModelAndView("ownerView", "model", model);*/
return null;
}
COM: <s> custom handler for owner display </s>
|
funcom_train/20138815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setText(String theText) {
_myValueLabel.set(theText, true);
_myScrollValue = (float) (_myHeight) / (float) (_myValueLabel.getTextHeight());
_myScrollbar.setHeight(_myHeight + _myValueLabel.getStyle().paddingTop + _myValueLabel.getStyle().paddingBottom);
}
COM: <s> set the text of the textarea </s>
|
funcom_train/44289591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHighlightAt(boolean value, int row, int col) {
if (row < 0 || row > (data.size() - 1))
return;
if (col < 0 || col > nbcols - 1)
return;
data.get(row).highlight.set(col, Boolean.valueOf(value));
fireTableCellUpdated(row, col);
}
COM: <s> assigns a highlight indicator at given row and column </s>
|
funcom_train/18513572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScale(Rectangle2D.Double rsc) {
if (orientation == AXIS_HORIZONTAL) {
view.setScale(rsc.x, view.getScale().getY(), rsc.width, view
.getScale().getHeight());
} else {
view.setScale(view.getScale().getX(), rsc.y, view.getScale()
.getWidth(),
rsc.height);
}
}
COM: <s> changes the scale for the axis </s>
|
funcom_train/2503098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Date futureTimestamp(int days, int hours, int minutes, int seconds) {
Date now = Calendar.getInstance().getTime();
long offset = (long) (seconds * 1E3 + minutes * 6E4 + hours * 36E5 + days * 864E5);
Date newDate = new Date(now.getTime() + offset);
return newDate;
}
COM: <s> creates a new date time based on the specified parameters </s>
|
funcom_train/48552974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendWorkLoad(int id, PrintWriter out){
int start = segments[id][0];
int end = segments[id][1];
int[] pieces = lb.getPieces();
int i;
for(i = start; i < end - 1; ++i){
out.print(pieces[i] + ",");
}
out.println(pieces[i]);
}
COM: <s> sends the workload to the specified thread through the </s>
|
funcom_train/23334954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object entity1, Object entity2) {
EntityInterface entityInterface1 = (EntityInterface)entity1;
EntityInterface entityInterface2 = (EntityInterface)entity2;
boolean isEntity1Directory = entityInterface1 instanceof DirectoryFile;
boolean isEntity2Directory = entityInterface2 instanceof DirectoryFile;
if (isEntity1Directory && !isEntity2Directory) {
return -1;
}
else if (!isEntity1Directory && isEntity2Directory) {
return 1;
}
else {
return entityByNameComparator.compare(entity1, entity2);
}
}
COM: <s> compares its two arguments for order </s>
|
funcom_train/37034075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int peekLongInt() {
int b1 = buff[pos] & 0xFF; // No swap, Java order
b1 <<= 8;
b1 |= (buff[pos + 1] & 0xFF);
b1 <<= 8;
b1 |= (buff[pos + 2] & 0xFF);
b1 <<=8;
b1 |= (buff[pos + 3] & 0xFF);
return b1;
}
COM: <s> read a 32 bits integer from the packet but dont advance the read </s>
|
funcom_train/5373128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaximum (int value) {
checkWidget ();
//int minimum = OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0);
if (0 <= minimum && minimum < value) {
//OS.SendMessage (handle, OS.TBM_SETRANGEMAX, 1, value);
if (maximum == value) return;
maximum = value;
// clearScaleDecoration();
decorateScale();
setSelection(selection);
}
}
COM: <s> sets the maximum value that the receiver will allow </s>
|
funcom_train/2577117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle2D expand(Rectangle2D area, Rectangle2D result) {
if (result == null) {
result = new Rectangle2D.Double();
}
result.setRect(
area.getX() - this.left,
area.getY() - this.top,
area.getWidth() + this.left + this.right,
area.getHeight() + this.top + this.bottom
);
return result;
}
COM: <s> expands an area by the amount of space represented by this object </s>
|
funcom_train/18366053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startDownload(String r, File f, boolean e) {
final String fr = r;
final File ff = f;
final boolean fe = e;
downloadComplete = false;
dialogType = DOWNLOAD;
final SwingWorker worker = new SwingWorker() {
public Object construct() {
return new DownloadTask(fr, ff, fe);
}
};
worker.start();
}
COM: <s> starts a download from the server </s>
|
funcom_train/31294478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CvsRevision getTaggedRevision(CvsFile file, SymbolicName tag) {
Iterator revisions = file.getRevisions().iterator();
while (revisions.hasNext()) {
CvsRevision revision = (CvsRevision)revisions.next();
if (tag.getRevisions().contains(revision))
return revision;
}
return null;
}
COM: <s> obtain the revision of the file which carries the specified tag </s>
|
funcom_train/28981568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeWrapper( int methodIdx, String completeSig ) {
Logger.info( "deinstalling method wrapper for %s", completeSig );
ExecutionWrapperMethodPatcher mp =
new ExecutionWrapperMethodPatcher(
targetClass.getMethods()[methodIdx],
targetClass.getClassName(),
constPoolGen );
targetClass.getMethods()[methodIdx] = mp.deinstall();
targetClass.setConstantPool(
constPoolGen.getFinalConstantPool() );
}
COM: <s> removes the wrapper from a method </s>
|
funcom_train/554377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void build(Vector<Hashtable<String, String>> options) {
Enumeration<Hashtable<String, String>> e = options.elements();
while (e.hasMoreElements()) {
Hashtable<String, String> nextOption = e.nextElement();
String nextName = nextOption.get(ReadWriteOptionBook.NAME_TAG);
String nextValue = nextOption.get(ReadWriteOptionBook.VALUE_TAG);
this.putOption(nextName, nextValue);
}
}
COM: <s> builds its content hashtable using the given options list </s>
|
funcom_train/7473197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected RemoteAccessException convertHessianAccessException(Throwable ex) {
if (ex instanceof HessianConnectionException || ex instanceof ConnectException) {
return new RemoteConnectFailureException(
"Cannot connect to Hessian remote service at [" + getServiceUrl() + "]", ex);
}
else {
return new RemoteAccessException(
"Cannot access Hessian remote service at [" + getServiceUrl() + "]", ex);
}
}
COM: <s> convert the given hessian access exception to an appropriate </s>
|
funcom_train/19288444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String render(String type, String variableName, Calendar calendar) {
String out = "";
out+=render(type+"_year_"+variableName, calendar.get(Calendar.YEAR)+"");
out+=render(type+"_month_"+variableName, (calendar.get(Calendar.MONTH)+1)+"");
out+=render(type+"_day_"+variableName, (calendar.get(Calendar.DAY_OF_MONTH)+1)+"");
out+=render(type+"_hour_"+variableName, calendar.get(Calendar.HOUR_OF_DAY)+"");
out+=render(type+"_minute_"+variableName, calendar.get(Calendar.MINUTE)+"");
return out;
}
COM: <s> render a set of hidden parameters that are a single date </s>
|
funcom_train/25705535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkFilename() {
if( filename == null || filename.length() == 0 ) {
return false;
}
// rather than marking a file invalid if invalid chars are in the name we replace this chars
ensureValidity();
// for( int i = 0; i < invalidChars.length; i++ ) {
// if( filename.indexOf(invalidChars[i]) != -1 ) {
// return false;
// }
// }
return true;
}
COM: <s> tests if the filename is valid </s>
|
funcom_train/3409902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InetAddress getInetAddress() {
if (!isBound())
return null;
try {
return getImpl().getInetAddress();
} catch (SocketException e) {
// nothing
// If we're bound, the impl has been created
// so we shouldn't get here
}
return null;
}
COM: <s> returns the local address of this server socket </s>
|
funcom_train/46012399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void minJitterBufferSliderChanged(int value) {
// avoid duplicate calls
if (value == minJitterBufferValue) {
return;
}
minJitterBufferValue = value;
// change the buffer size
//System.out.println("Minimum jitter buffer size: " + value);
Utils.setPreference(
"com.sun.mc.softphone.media.MIN_JITTER_BUFFER_SIZE",
String.valueOf(value));
}
COM: <s> called when the minimum jitter buffer slider changes </s>
|
funcom_train/26467756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void push (String prefix, String uri, boolean pending) {
List ns = (List)nsMap.get (prefix);
if (ns == null) {
ns = new ArrayList (1);
nsMap.put (prefix, ns);
} else if (ns.size() > 0) {
uriMap.remove ((String)ns.get(0));
}
ns.add (0, uri);
uriMap.put (uri, prefix);
if (pending) {
pendings.add (new String[] { prefix, uri });
}
}
COM: <s> register a new namespace </s>
|
funcom_train/50612410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setParent(Model parent) {
if (this.parent != null)
if (parent != null)
throw new ModelException("Child '" + this +"' still has a parent");
if (parentSelector.select(parent) || (beingDestroyed && parent == null)) {
this.parent = parent;
if (parent != null)
addObserver(parent);
notifyEvent(new ModelEvent(this, SET_PARENT, parent));
} else
throw new ModelException("Parent '" + parent + "' not allowed");
}
COM: <s> sets the parent of this model </s>
|
funcom_train/39117590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProtocol(String protocol) throws IllegalArgumentException {
if (protocol == null) {
throw new IllegalArgumentException("The protocol must not be null.");
}
if ((protocol.compareTo(SOCKET_PROTOCOL_STRING) == 0)
|| (protocol.compareTo(SECURE_SOCKET_PROTOCOL_STRING) == 0)) {
throw new IllegalArgumentException(
"The protocol must be http:// or https://");
}
if (!logOpen) {
this.protocol = protocol;
}
}
COM: <s> get the protocol to be used for connection </s>
|
funcom_train/43214397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireFinishedUploadingBytes(long callbackId, long bytesToUpload, long bytesUploaded) {
ServerMessageUpEvent smue = new ServerMessageUpEvent(IOUtil.createURL(this), callbackId, ServerMessageUpEvent.TYPE_COMPLETED, bytesToUpload, bytesUploaded);
for (RemoteTrancheServerListener l : getListeners()) {
try {
l.upMessageSent(smue);
} catch (Exception e) {
}
}
}
COM: <s> p notify the listeners that bytes have been uploaded to the server </s>
|
funcom_train/32069282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addBankAgencys(Collection<BankAgency> bankAgencys) {
boolean addOk = getBankAgencys().addAll(bankAgencys);
if (addOk) {
for(BankAgency bankAgency : bankAgencys) {
bankAgency.setBank((Bank)this);
}
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed bank agencys collection to the bank collection </s>
|
funcom_train/23269151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endElement(final URI nsURI, final String localName, final String qName) throws SAXException {
endElement(nsURI != null ? nsURI.toString() : "", localName, (qName != null) ? qName : localName);
return;
}
COM: <s> notification of the end of an element </s>
|
funcom_train/5341034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(SearchResult line) {
Assert.that(line!=null,"Attempting to add null line");
Integer key=new Integer(line.getSize());
List lines=(List)map.get(key);
if (lines==null) {
lines=new LinkedList();
map.put(key, lines);
}
lines.add(line);
}
COM: <s> adds line to this </s>
|
funcom_train/1152437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void advance(float t) {
if (t0 < t && 1.0f - t0 > Settings.EPSILON) {
float alpha = (t - t0) / (1.0f - t0);
c0.x = (1.0f - alpha) * c0.x + alpha * c.x;
c0.y = (1.0f - alpha) * c0.y + alpha * c.y;
a0 = (1.0f - alpha) * a0 + alpha * a;
t0 = t;
}
}
COM: <s> advance the sweep forward yielding a new initial state </s>
|
funcom_train/29614901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init() {
try {
if (this.id != null) {
this.element = (IElement) serviceLocator.getBeanService().getPersistable(this.id);
serviceLocator.getBeanBuilder().populateBean(this, element);
}
} catch (BeanException ce) {
String msg = "Could not retrieve GmapHandler with id of " + this.id;
this.logger.debug(msg, ce);
// throw new FacesException(msg, ce);
}
}
COM: <s> initializes product bean </s>
|
funcom_train/33368609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addKeyword(int keyID) throws SQLException {
if (!dbm.canFind("select keyID from DocumentKeywords where docID = '" +
getID() + "' and keyID = '" + keyID + "'")) {
dbm.exec("insert into DocumentKeywords (docID, keyID) " +
"values ('" + getID() + "', '" + keyID + "')");
}
}
COM: <s> adds a keyword to this document </s>
|
funcom_train/42114474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command get_exitCommand1() {
if (exitCommand1 == null) {// GEN-END:MVDGetBegin6
// Insert pre-init code here
exitCommand1 = new Command("Exit", Command.EXIT, 1);// GEN-LINE:MVDGetInit6
// Insert post-init code here
}// GEN-BEGIN:MVDGetEnd6
return exitCommand1;
}// GEN-END:MVDGetEnd6
COM: <s> this method returns instance for exit command1 component and should be </s>
|
funcom_train/50334400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public void runScript(String filename) {
// get a Python interpreter context, make sure it's ok
getPythonInterpreter();
if (interp == null) {
log.error("Can't contine to execute script, could not create interpreter");
return;
}
// execute the file
execFile(filename);
}
COM: <s> run a script file from its filename </s>
|
funcom_train/17774365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paint(Color 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/21056488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getSearchFieldPanel(), BorderLayout.NORTH);
jContentPane.add(getResultPanel(), BorderLayout.CENTER);
jContentPane.add(getMoreResultsButton(), BorderLayout.SOUTH);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/21225507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInteger(final String key) {
try {
return Integer.parseInt(getString(key));
} catch (NumberFormatException e) {
handleException(new MissingResourceException(e.toString(),
this.getClass().getName(),
key));
return 0;
}
}
COM: <s> method for retrieving integers system </s>
|
funcom_train/13865816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWidth(String width) {
// This exists to deal with an inconsistency in IE's implementation where
// it won't accept negative numbers in length measurements
assert extractLengthValue(width.trim().toLowerCase()) >= 0 : "CSS widths should not be negative";
DOM.setStyleAttribute(getElement(), "width", width);
}
COM: <s> sets the objects width </s>
|
funcom_train/3749027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getDatabaseDrivers() {
if (logger.isDebugEnabled()) {
logger.debug("getDatabaseDrivers() - start");
}
if (logger.isDebugEnabled()) {
logger.debug("getDatabaseDrivers() - end - return value = "
+ databaseDrivers);
}
return databaseDrivers;
}
COM: <s> a list of all available strong jdbc strong database driver classes </s>
|
funcom_train/46762422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PluginModel getPlugin(final long pluginId, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
if (call.isStoreAudit()) {
BaseData.getSecurity().storeAudit(call.getUserRefId(), pluginId, "Viewed Plugin", call);
}
return SecurityData.getPlugin(pluginId, call);
}}; return (PluginModel) call(method, call);
}
COM: <s> return the single plugin model for the primary key </s>
|
funcom_train/45192146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WGroup getGroup(String groupName) {
if (groupMap == null) {
groupMap = new HashMap<String, WGroup>();
}
WGroup g = groupMap.get(groupName);
if (g == null) {
g = new WGroup();
g.setForm(this);
g.setAlias(groupName);
groupMap.put(groupName, g);
}
return g;
}
COM: <s> get a wgroup with the requested group name create one if it </s>
|
funcom_train/16413205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int move(int direction) {
if (direction == Drt.UP) {
this.y -= 1;
return 0;
}
if (direction == Drt.DOWN) {
this.y += 1;
return 0;
}
if (direction == Drt.LEFT) {
this.x -= 1;
return 0;
}
if (direction == Drt.RIGHT) {
this.x += 1;
return 0;
}
return -1;
}
COM: <s> change the coordinate by one </s>
|
funcom_train/51418436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addValuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_XmlAttribute_value_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_XmlAttribute_value_feature", "_UI_XmlAttribute_type"),
JetsetPackage.Literals.XML_ATTRIBUTE__VALUE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the value feature </s>
|
funcom_train/21498668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
super.paint(g);
long diff = (System.currentTimeMillis()-this.startTime)/1000;
String text="";
if (diff/60>1) {
text = (diff%60)+" Minutes "+ (diff - (diff%60)*60)+" Seconds";
} else {
text = diff+" Seconds";
}
this.timeElapsed[0].setText(text);
this.timeElapsed[1].setText(text);
this.timeElapsed[2].setText(text);
}
COM: <s> paints the components and updates the elapsed time </s>
|
funcom_train/38496025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkIfTokenizedType(String token) {
/*
[56] TokenizedType ::= 'ID' | 'IDREF' | 'IDREFS' | 'ENTITY' | 'ENTITIES' | 'NMTOKEN' | 'NMTOKENS'
*/
for(int i = 0; i < tokenizedTypes.length; i++) {
if(token.equals(tokenizedTypes[i])) {
return true;
}
}
return false;
}
COM: <s> check if the attribute is a tokenized type </s>
|
funcom_train/40451182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdTerminarVisita() {
if (cmdTerminarVisita == null) {//GEN-END:|121-getter|0|121-preInit
// write pre-init user code here
cmdTerminarVisita = new Command("Terminar visita", Command.OK, 0);//GEN-LINE:|121-getter|1|121-postInit
// write post-init user code here
}//GEN-BEGIN:|121-getter|2|
return cmdTerminarVisita;
}
COM: <s> returns an initiliazed instance of cmd terminar visita component </s>
|
funcom_train/17491993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addExceptionTableEntry(short spc, short epc, short tpc, String ex) {
String n = JVMUtilities.getName(ex);
short s = constantPool.put(new ClassIdentifier(n));
ExceptionTableEntry ee = new ExceptionTableEntry(spc, epc, tpc, s);
exceptionTable.add(ee);
length += ee.getLength();
}
COM: <s> adds an exception entry in the exception table </s>
|
funcom_train/22477560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkType(Object eventType) {
if (eventType == Undefined.instance) {
throw new CrosscheckError("Not enough arguments");
} else if (eventType instanceof String && isValidType((String) eventType)) {
return;
} else {
throw new CrosscheckError("Object cannot be created in this context");
}
}
COM: <s> checks that the event type parameter is valid </s>
|
funcom_train/42380157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadVersion() {
try {
String parent = System.getProperty("user.dir");
File file = new File(parent + "/version.dat");
if (!file.exists()) {
return;
}
FileInputStream fis = new FileInputStream(file);
BufferedReader br = new BufferedReader(new InputStreamReader(fis));
version = br.readLine();
if (version == null || version.length() == 0) {
version = "0.0";
}
}
catch (IOException ioe) {
// ioe.printStackTrace();
version = "0.0";
}
}
COM: <s> load rlm version from version </s>
|
funcom_train/19457460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateAndDeleteOzDos() throws IOException {
ByteArrayImageLayout imageLayout = new ByteArrayImageLayout(Disk.APPLE_800KB_DISK);
ImageOrder imageOrder = new ProdosOrder(imageLayout);
FormattedDisk[] disks = OzDosFormatDisk.create(
"createanddelete-test-ozdos.po", imageOrder); //$NON-NLS-1$
createAndDeleteFiles(disks, "B"); //$NON-NLS-1$
saveDisks(disks);
}
COM: <s> test creating and deleting many files on an oz dos 800 k disk </s>
|
funcom_train/36817197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRow(int targetRow){
ArrayList<SpreadsheetCell> thisColumn;
//when you add a row you need to add an entry into each
//of the outer ArrayLists
for( int i = 0; i < data.size(); i++)
{
thisColumn = data.get(i);
thisColumn.add( targetRow, new SpreadsheetCell() );
rowCount = thisColumn.size();
}
thisSheetObject.processAddRow(targetRow);
}
COM: <s> adds a row into our table model after target row </s>
|
funcom_train/29617736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getJRadioFaoDesignatedYes() {
if (jRadioFaoDesignatedYes == null) {
jRadioFaoDesignatedYes = new MgisRadioButton();
jRadioFaoDesignatedYes.setText(AppTextsDAO.get("LABEL_YES"));
jRadioFaoDesignatedYes.setBounds(172, 60, 54, 16);
jRadioFaoDesignatedYes.setValue("1");
faoDesignated.add(jRadioFaoDesignatedYes);
}
return jRadioFaoDesignatedYes;
}
COM: <s> this method initializes j radio fao designated yes </s>
|
funcom_train/8811355 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ToolBar buildToolbar() {
// Save button.
saveButton = new Button(I18N.CONSTANTS.save(), IconImageBundle.ICONS.save());
saveButton.setEnabled(false);
// Actions toolbar.
final ToolBar toolBar = new ToolBar();
toolBar.setAlignment(HorizontalAlignment.LEFT);
toolBar.setBorders(false);
toolBar.add(saveButton);
return toolBar;
}
COM: <s> builds the actions toolbar </s>
|
funcom_train/5395752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testViewX3D() {
System.out.println("viewX3D");
String filename = "";
FastInfosetCompressProcess instance = new FastInfosetCompressProcess();
instance.viewX3D(filename);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of view x3 d method of class org </s>
|
funcom_train/46125633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setOrgaTitleToRepoEntryTitle(OLATResourceable ores, CPOrganization orga) {
// Set the title of the organization to the title of the resource.
RepositoryManager resMgr = RepositoryManager.getInstance();
RepositoryEntry cpEntry = resMgr.lookupRepositoryEntry(ores, false);
if (cpEntry != null) {
String title = cpEntry.getDisplayname();
orga.setTitle(title);
}
}
COM: <s> sets the organization title to the title of the repository entry </s>
|
funcom_train/3135677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deploy() throws Exception {
List<Deployment> list = engine.getDeployments();
for(Deployment deployment : list) {
Definition definition = application.getDefinition(deployment);
DefinitionResource server = new DefinitionResource(definition);
String name = deployment.getName();
webList.put(name, server);
}
}
COM: <s> here we extract all war files and load the web </s>
|
funcom_train/28752863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDatestarted(java.util.Date newVal) {
if ((newVal != null && this.datestarted != null && (newVal.compareTo(this.datestarted) == 0)) ||
(newVal == null && this.datestarted == null && datestarted_is_initialized)) {
return;
}
this.datestarted = newVal;
datestarted_is_modified = true;
datestarted_is_initialized = true;
}
COM: <s> setter method for datestarted </s>
|
funcom_train/29832826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object copy() {
float[] oldDA = dash.getDashArray();
if (oldDA == null) {
return new LineModeAttribute(idd, new Dash(null, dash.getDashPhase()));
} else {
float[] newDA = new float[oldDA.length];
for (int i = oldDA.length - 1; i >= 0; i--) {
newDA[i] = oldDA[i];
}
return new LineModeAttribute(idd,
new Dash(newDA, dash.getDashPhase()));
}
}
COM: <s> returns a deep copy of this code attribute code </s>
|
funcom_train/12560442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getChars(char[] data) {
synchronized (Display.LCDUILock) {
textFieldLF.lUpdateContents();
try {
buffer.getChars(0, buffer.length(), data, 0);
} catch (IndexOutOfBoundsException e) {
throw new ArrayIndexOutOfBoundsException(e.getMessage());
}
return buffer.length();
}
}
COM: <s> copies the contents of the code text field code into a </s>
|
funcom_train/39911104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFindbyusername() {
System.out.println("findbyusername");
String username = "";
Employee_clientdao instance = new Employee_clientdao();
Employee expResult = null;
Employee result = instance.findbyusername(username);
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 findbyusername method of class dao </s>
|
funcom_train/45027443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidEmail() {
if (emailAddress == null) {
return false;
}
if (isAtAndDotNotPresentAndValid()) {
return false;
}
if (isValidUserNotPresent()) {
return false;
}
if (isValidHostNotPresent()) {
return false;
}
return true;
}
COM: <s> validates the given email object </s>
|
funcom_train/10213391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
initialised = false;
valid = false;
invokeDestroy(runClassInstance);
// be paranoid and clean up all hooks to users classStr
destroyMethod = null;
runMethod = null;
initMethod = null;
filterInitMethod = null;
runServletConfig = null;
runConstructor = null;
runClassInstance = null;
methodStr = null;
classStr = null;
error = null;
}
COM: <s> run the underlying destroy method str on the run class str </s>
|
funcom_train/36470377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void rebuildCursor() {
Cursor c = buildCursor();
startManagingCursor(c);
if(mCursor == null) {
// Set up the ListAdapter
setListAdapter(buildCursorAdapter(c));
} else {
// Swap out the ListView's cursor with the new one
((CursorAdapter)getListView().getAdapter()).changeCursor(c);
stopManagingCursor(mCursor);
mCursor.close();
}
mCursor = c;
}
COM: <s> rebuilds the cursor and applies it to the list view swapping out an </s>
|
funcom_train/22206274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open() throws IndexException {
Iterator it = m_indexesByMap.values().iterator();
while (it.hasNext()) {
Index ix = (Index) it.next();
if (!ix.isOpen()) {
ix.open();
}
if (!ix.isOpen()) {
throw new IndexException(
"Could not open all underlying index implementations.");
}
}
m_isOpen = true;
}
COM: <s> opens the index </s>
|
funcom_train/6216271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getFullyQualifiedClassNameFromFile(File classFile, File packageRoot) throws IOException {
StringBuffer buffer = new StringBuffer();
buffer.append(getPackageName(classFile, packageRoot));
buffer.append('.');
buffer.append(classFile.getName().substring(0, classFile.getName().lastIndexOf(".")));
return buffer.toString();
}
COM: <s> gets the fully qualified class name from the name of the file </s>
|
funcom_train/9532230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commitAndSelectNext() {
this.updateModel();
if (this.selectionModel == null) return;
final int currentMax = this.selectionModel.getMaxSelectionIndex();
if (currentMax > -1) {
try {
this.selectionModel.setSelectionInterval(currentMax + 1, currentMax + 1);
} catch (IndexOutOfBoundsException e) {
// no big deal, nothing more to select
}
}
}
COM: <s> this method is called by a responder chain action </s>
|
funcom_train/16770218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void killGhostConnections() {
Collection<Set<IConnection>> conns = getConnections();
for (Set<IConnection> set : conns) {
for (IConnection conn : set) {
// Ping client
conn.ping();
// FIXME: getLastPingTime doesn't get updated right after
// conn.ping()
// Time to live exceeded, disconnect
if (conn.getLastPingTime() > clientTTL * 1000) {
log.info("TTL exceeded, disconnecting {}", conn);
disconnect(conn, scope);
}
}
}
}
COM: <s> cleans up ghost connections </s>
|
funcom_train/42970288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testeChaveNaoInformada() throws Exception{
System.out.println();
System.out.println("########## testeChaveNaoInformada ##########");
try{
FirstMessage m1 = authentication.runFirstStep("0004", "");
} catch (KeyNotInformedException e){
Logger.getLogger(TestAuthentication.class.getName()).log(Level.INFO, e.toString(), e);
}
}
COM: <s> tests authentication error when the key is not informed </s>
|
funcom_train/5249694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeGlueCard(Card card) throws Exception {
glueCards.remove(card);
// special rule for STOCK cursor if add a "organisation du rationnement) card
if (this.getCode().equals(CODE_STOCK) && card.getCode().equals(Card.CARD_DE_STOCK_RATION.toString())) {
this.setDecMode(1);
}
}
COM: <s> remove the given card </s>
|
funcom_train/8078797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double maxAbs ( int i0, int i1, int j ) {
double m = Math.abs(A[i0][j]);
for (int i = i0+1; i <= i1; i++) {
m = Math.max(m, Math.abs(A[i][j]));
}
return m;
}
COM: <s> returns the maximum absolute value of some elements of a column </s>
|
funcom_train/21174520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) {
if (obj instanceof Reference) {
Reference ref = (Reference) obj;
if (ref.getClassName().equals(getClass().getName())) {
RefAddr addr = ref.get("XAPool");
return sources.get(addr.getContent());
}
}
return null;
}
COM: <s> decodes a reference to a specific pool data source </s>
|
funcom_train/9827810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void rowUpdated( int rowIndex ) {
TableModelEvent tme = new TableModelEvent( this, rowIndex,
rowIndex,
(_colNames.length - 1) );
for ( Iterator itr = _listeners.iterator();
itr.hasNext(); ) {
TableModelListener tml = (TableModelListener)itr.next();
tml.tableChanged( tme );
}
} // end method rowUpdated
COM: <s> used by this model to dispatch a change to the given row </s>
|
funcom_train/43098548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAction(Object handle, Object action) {
if (handle instanceof MMessage
&& (action == null || action instanceof MAction)) {
((MMessage) handle).setAction((MAction) action);
return;
}
throw new IllegalArgumentException(
"handle: " + handle
+ " or action: " + action);
}
COM: <s> sets the action to a message </s>
|
funcom_train/11009723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, int activePane) {
createFreezePane(xSplitPos, ySplitPos, leftmostColumn, topRow);
getPane().setState(STPaneState.SPLIT);
getPane().setActivePane(STPane.Enum.forInt(activePane));
}
COM: <s> creates a split pane </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.