__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/27845639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeTarget(Object target) {
ListIterator iter = mTargets.listIterator();
while (iter.hasNext()) {
TargetStrategy strategy = (TargetStrategy) iter.next();
if (target.equals(strategy) || target.equals(strategy.getTarget())) {
iter.remove();
strategy.dispose();
}
}
}
COM: <s> remove a target </s>
|
funcom_train/34257060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeDiscussionTopic(DiscussionTopic aContextObject) {
for (Portfolio thePortfolio : this.getPortfolioList()) {
thePortfolio.removeDiscussionTopic(aContextObject);
}
// int size = getPortfolioList().size();
// for (int i = 0; i < size; ++i) {
// ((Portfolio) getPortfolioList().get(i)).removeDiscussionTopic(aContextObject);
// }
}
COM: <s> removes the discussion topic from all book shelves </s>
|
funcom_train/46759179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FormDefinitionModel getFormDefinition(final long formDefinitionId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return ClinicalData.getFormDefinition(formDefinitionId, chain, call);
}}; return (FormDefinitionModel) call(method, call);
}
COM: <s> same transaction return the single form definition model for the primary key </s>
|
funcom_train/9544913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processStore(StoreRequestMsg req, TransMsgEvent receivingEvent) {
OverlayKey key = req.getKey();
updateIndex(key, req.getValue());
// reply ok
Message replyMsg = new StoreResultMsg(req);
this.transLayer.sendReply(replyMsg, receivingEvent, this.getPort(), TransProtocol.UDP);
}
COM: <s> update index table </s>
|
funcom_train/3350505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isStartPluginsFinished() {
for (PluginDescriptor descr : registry) {
try {
final Plugin pi = descr.getPlugin();
if (pi.isActive()) {
if (!pi.isStartFinished()) {
return false;
}
}
} catch (PluginException ex) {
// Ignore
}
}
return true;
}
COM: <s> is the is start finished property of all started plugins true </s>
|
funcom_train/42667369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getJButtonReload() {
if (jButtonReload == null) {
jButtonReload = new JButton();
jButtonReload.setName("jButtonReload");
jButtonReload.setToolTipText("Reload the images");
jButtonReload.setRolloverEnabled(false);
jButtonReload.setText("Reload");
jButtonReload.setAction(new Actioneer(this, jButtonReload));
}
return jButtonReload;
}
COM: <s> this method initializes j button reload </s>
|
funcom_train/12767325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void postWaypointChange(IWaypointChangeEvent event) {
Thread currentThread;
TagSEADeltaInfo deltaInf;
synchronized (fThreadDeltaMap) {
currentThread = Thread.currentThread();
deltaInf = fThreadDeltaMap.get(currentThread);
if (deltaInf != null) {
deltaInf.addWaypointChange(event);
} else {
IStatus status = fireWaypointChange(event);
if (status.getCode() != IStatus.OK) {
TagSEAPlugin.getDefault().getLog().log(status);
}
}
}
}
COM: <s> posts a waypoint change </s>
|
funcom_train/20045028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _cancel() {
requiredMethod("load()") ;
final boolean[] result = new boolean[1] ;
(new Thread() {
public void run() {
result[0] = oObj.load(descr, frame);
}
}).start();
oObj.cancel() ;
try {
Thread.sleep(1000);
} catch (InterruptedException ex) {}
tRes.tested("cancel()", !result[0]) ;
}
COM: <s> tries to load component to a frame in separate thread to </s>
|
funcom_train/41648709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readType() throws IOException {
int code = parseTag();
if (code != TAG_TYPE) {
_peekTag = code;
return "";
}
_sbuf.setLength(0);
int ch;
while ((ch = readChar()) >= 0)
_sbuf.append((char) ch);
String type = _sbuf.toString();
expectTag(TAG_TYPE_END);
return type;
}
COM: <s> parses a type from the stream </s>
|
funcom_train/48720209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String next(int n) throws JsonException {
int i = this.position;
int j = i + n;
if (j >= this.source.length()) {
throw syntaxError("Substring bounds error");
}
this.position += n;
return this.source.substring(i, j);
}
COM: <s> get the next n characters </s>
|
funcom_train/19408913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(char cbuf[], int off, int len) throws IOException {
final String s = new String(cbuf, off, len);
// be safe here: we might be called from outside the
// event-dispatch thread
SwingUtilities.invokeLater(new Runnable() {
public void run() {
String oldText = fTextComp.getText();
fTextComp.setText(oldText + s);
// fTextComp.repaint();
}
});
}
COM: <s> writes a portion of an array of characters </s>
|
funcom_train/7614158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUserListener(T listener) {
if (listener == null) {
return;
}
// transactionally replace old list
synchronized (this) {
if (userList == null) {
userList = new ArrayList<T>();
userList.add(listener);
return;
}
ArrayList<T> newList = new ArrayList<T>(userList);
newList.add(listener);
userList = newList;
}
}
COM: <s> adds user public listener to this list </s>
|
funcom_train/13258198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void postProcessSelection(MouseEvent e, Object cell, boolean wasSelected) {
if (wasSelected && mediator.isCellSelected(cell)) {
Object parent = cell;
Object nextParent = null;
while (((nextParent = mediator.getParent(parent)) != null) && mediator.isCellVisible(nextParent)) {
parent = nextParent;
}
mediator.selectCellForEvent(parent, e);
focus = mediator.getViewOfCell(parent, false);
}
}
COM: <s> invoked after a cell has been selected in the mouse released method </s>
|
funcom_train/16529555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
Graphics2D g2d = (Graphics2D)g;
Composite oldComp = g2d.getComposite();
float alpha = getEffectiveAlpha();
Composite alphaComp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha);
g2d.setComposite(alphaComp);
super.paint(g2d);
g2d.setComposite(oldComp);
}
COM: <s> overriden paint method to take into account the alpha setting </s>
|
funcom_train/25506054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IntegerWidget getDay() {
if (day == null) {
day = new IntegerWidget(BigInteger.ONE, BigInteger.valueOf(31));
day.addFocusListener(AutoSelectFocusListener.INSTANCE);
day.addPropertyChangeListener(IntegerWidget.VALUE_PROPERTY, new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
updateDateStepper();
}
});
day.setToolTipText(LocalizationData.get("PeriodicalTransactionDialog.day.toolTip")); //$NON-NLS-1$
day.setColumns(2);
}
return day;
}
COM: <s> this method initializes day </s>
|
funcom_train/5553360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AST dupList(AST t) {
AST result = dupTree(t); // if t == null, then result==null
AST nt = result;
while (t != null) { // for each sibling of the root
t = t.getNextSibling();
nt.setNextSibling(dupTree(t)); // dup each subtree, building new tree
nt = nt.getNextSibling();
}
return result;
}
COM: <s> duplicate tree including siblings of root </s>
|
funcom_train/45740562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItemSubject () {
if (stringItemSubject == null) {//GEN-END:|11-getter|0|11-preInit
// write pre-init user code here
stringItemSubject = new StringItem ("Issued to:", null);//GEN-LINE:|11-getter|1|11-postInit
// write post-init user code here
}//GEN-BEGIN:|11-getter|2|
return stringItemSubject;
}
COM: <s> returns an initiliazed instance of string item subject component </s>
|
funcom_train/46451254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createBackupFilename() {
StringBuffer fileNameBuffer = new StringBuffer(File.separator);
fileNameBuffer.append(BACKUP_FILE_PREFIX);
Date currentDate = new Date(System.currentTimeMillis());
fileNameBuffer.append(BACKUP_DATEFORMAT.format(currentDate));
fileNameBuffer.append(BACKUP_FILE_EXTENSION);
return fileNameBuffer.toString();
}
COM: <s> creates a new name for the backup file which will be created </s>
|
funcom_train/36820597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean activateLocale(String queryName) {
for (Iterator iter = locales.iterator(); iter.hasNext();) {
Locale a = (Locale) iter.next();
if (a.getQueryValue().equalsIgnoreCase(queryName)) {
this.setActiveLocale(a);
return true;
}
}
return false;
}
COM: <s> call this method to activate locale using its query name </s>
|
funcom_train/4933071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add_project_owl_imports(Project project, String uri) {
if (uri != null && !uri.equals("")) {
tripleStore.store(new Triple(Triple.wrapAsURI(project.getUrl().toString()), Triple.wrapAsURI(
"owl", "imports"), //$NON-NLS-2$
Triple.wrapAsURI(uri)));
}
}
COM: <s> add for given project an owl imports of the given uri </s>
|
funcom_train/24607710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String _getRelativeName(int classType, int index) {
String name;
switch (classType) {
case CS_C_UNIV:
//should be unique too!
name = CLASS_TOKEN[classType] + index;
break;
case CS_C_DEPT:
name = CLASS_TOKEN[classType] + index;
break;
default:
name = CLASS_TOKEN[classType] + index;
break;
}
return name;
}
COM: <s> gets the name of the specified instance that is unique within a department </s>
|
funcom_train/16602130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Environment evaluate(Node head, Environment headEnv) throws InterruptedException {
Environment env = headEnv;
Deque<Call> stack = new ArrayDeque<Call>();
stack.push(new Call(head));
while (! stack.isEmpty() && alive) {
Call call = stack.pop();
env = call.eval(stack, objects, env);
timeout--;
if (timeout==0) {
throw new EvaluationException("Timed out");
}
if ((timeout%1000)==0) {
Thread.sleep(10);
}
}
return env;
}
COM: <s> evaluates a node with an environment specified </s>
|
funcom_train/2625324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createLeftOver() {
int lineLengthBytes = currentLastBytePos + 1;
if (lineLengthBytes > 0) {
// create left over for next block
leftOver = new byte[lineLengthBytes];
System.arraycopy(data, 0, leftOver, 0, lineLengthBytes);
} else {
leftOver = null;
}
currentLastBytePos = -1;
}
COM: <s> creates the buffer containing any left over bytes </s>
|
funcom_train/46151225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getBandwidth() {
double bandwidth = 0;
if (downloadStarted() && !downloadComplete()) {
Calendar now = Calendar.getInstance();
double a = (downloaded / 1024d); // KB
double b = (now.getTimeInMillis() - started.getTimeInMillis()) / 1000; //s
bandwidth = (b > 0) ? a / b : 0;
}
return bandwidth;
}
COM: <s> gets the bandwidth of the current file transfer </s>
|
funcom_train/26509391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object right() throws NoSuchElementException {
int index=rightIndex();
if (index==-1) throw new NoSuchElementException();
position.pop();
position.push(lastRight, index);
lastLeft=null;
lastRight=null;
lastNext=null;
return externalView(position.peek().getObject());
}
COM: <s> describe code right code method here </s>
|
funcom_train/2876892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object sfResolveHere(Object attribName, Object node) throws SmartFrogResolutionException, RemoteException {
Object value = null;
if (node instanceof Prim) {
value = ((Prim) node).sfResolveHere(attribName);
} else if (node instanceof ComponentDescription) {
value = ((ComponentDescription) node).sfResolveHere(attribName);
}
return value;
}
COM: <s> resolve an attribute </s>
|
funcom_train/17206162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InlineDecision shouldInline(Instruction call, boolean isExtant, int realBCI) {
if (Call.getMethod(call).getTarget() == null) {
return InlineDecision.NO("Target method is null");
}
CompilationState state = new CompilationState(call, isExtant, gc.options, gc.original_cm, realBCI);
InlineDecision d = gc.inlinePlan.shouldInline(state);
return d;
}
COM: <s> should we inline a call site </s>
|
funcom_train/50499432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void next(Container parent) {
synchronized (parent.getTreeLock()) {
checkLayout(parent);
int ncomponents = parent.getComponentCount();
for (int i = 0 ; i < ncomponents ; i++) {
Component comp = parent.getComponent(i);
if (comp.visible) {
comp.hide();
comp = parent.getComponent((i + 1 < ncomponents) ? i+1 : 0);
comp.show();
parent.validate();
return;
}
}
}
}
COM: <s> flips to the next card of the specified container </s>
|
funcom_train/22910599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int readUnsignedShort() {
int s = 0;
short l = readUnsignedByte();
short h = readUnsignedByte();
if (isIntel)
s = (((h & 0xff) << 8) + (l & 0xff));
else
s = (((l & 0xff) << 8) + (h & 0xff));
return s;
}
COM: <s> reads an unsigned 16 bit number from this byte array </s>
|
funcom_train/3411665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate() {
synchronized (getTreeLock()) {
ComponentPeer peer = this.peer;
if (!valid && peer != null) {
Font newfont = getFont();
Font oldfont = peerFont;
if (newfont != oldfont && (oldfont == null
|| !oldfont.equals(newfont))) {
peer.setFont(newfont);
peerFont = newfont;
}
peer.layout();
}
valid = true;
}
}
COM: <s> ensures that this component has a valid layout </s>
|
funcom_train/3095923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object dequeue() throws QueueException {
TimeStampedValue dequeue;
while(true){ // provoke a QueueException
dequeue = ((TimeStampedValue)super.dequeue());
if(dequeue.isPast()){
synchronized(expired){
expired.add(dequeue.getValue());
}
}
else return dequeue.getValue();
}
}
COM: <s> this method will never return an object whose timeout has expired </s>
|
funcom_train/5725014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object object) {
if (this == object) {
return true;
}
if (!(object instanceof OnlineUserInfo)) {
return false;
}
final OnlineUserInfo that = (OnlineUserInfo) object;
if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) {
return false;
}
return true;
}
COM: <s> returns code true code if the argument is an online user info instance </s>
|
funcom_train/41048311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPublicKey() {
if(this.type_key == TypeOfKey.Symmetric)
return Utilities.byteArrayToHexString(this.symmetric_key.getEncoded());
else
if(this.public_key != null)
return Utilities.byteArrayToHexString(this.public_key.getEncoded());
else
return "";
}
COM: <s> returns the public key in hexadecimal format </s>
|
funcom_train/15723737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*
* public void testDefiningEntinyByPath() { ContentModel model = new
* ContentModel(new contentmanagerLinuxStyle()); String path =
* "/first/second/second/file.file"; IEntity entity =
* model.getEntity(path,"/"); // was uncorrectly defined by path
* assertEquals("Entity", path, entity.getFile().getAbsolutePath()); }
COM: <s> tests if content model return null when trying to define entity by unknown </s>
|
funcom_train/22261106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int handle_mkd(String line, StringTokenizer st) {
if (checkLogin() && checkWrite()) {
String filename = null;
filename = line.substring(4);
File file = new File(createNativePath(filename) + "/");
if (file.exists() && file.isDirectory())
return sendReply(521, "\"" + filename + "\": directory already exists.");
file.mkdir();
return sendReply(257, "Directory created successfully");
} else
return sendReply(530, "Please login with USER and PASS.");
}
COM: <s> handler for the mkd command make a directory </s>
|
funcom_train/4557927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPaymentSettingSelectInvalidExpiresMonthYear() {
repEng.newStep("341", "Payment Setttings-Select invalid Expires month/year for credit card");
//1. Goto User Settings:Payment Settings page
//2. Select one credit card
//3. Input valid Card Number and Security Code
//4. Select invalid Expires Month/Year
// Expires Month/Year should be marked as red border.
}
COM: <s> 341 payment settings select invalid expires month year for credit card </s>
|
funcom_train/44342265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Identifier getMinComSuperType(Identifier typeIdentifier1, Identifier typeIdentifier2) {
Type type1CS = getTypeCS(typeIdentifier1);
Type minComSuperType = null;
if (type1CS != null)
minComSuperType = type1CS.getMinComSuperType(getTypeCS(typeIdentifier2));
if (minComSuperType != null)
return getIdentifier(minComSuperType);
else return null;
}
COM: <s> determine the minimal common super type identifier of the type with type identifier1 </s>
|
funcom_train/37648555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetRuleSets3() {
List l = new ArrayList();
l.add("a ruleset");
RuleSets rs = new RuleSets();
rs.setRuleSets(l);
assertSame("The rule set list has not been set", l, rs.getRuleSets());
}
COM: <s> setting any non empty list is ok </s>
|
funcom_train/26019048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSipIntentResolved(SipRequest request) {
// Get feature tags
List<String> tags = request.getFeatureTags();
if (tags.size() == 0) {
if (logger.isActivated()) {
logger.debug("No feature tag found in the request");
}
return false;
}
// Create the intent associated to the SIP request
String featureTag = tags.get(0);
Intent intent = generateSipIntent(request, featureTag);
return isSipIntentResolvedByBroadcastReceiver(intent);
}
COM: <s> is the sip intent may be resolved </s>
|
funcom_train/3740302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changePhone(User who, User user, String phone) throws UserManagerException {
if (!mayChangeInfo(who,user)) throw new UserManagerException();
try {
Session sess = HibernateUtil.currentSession();
Transaction trans = sess.beginTransaction();
user.setPhone(phone);
sess.saveOrUpdate(user);
trans.commit();
} catch (HibernateException e) {
throw new UserManagerException();
}
}
COM: <s> change phone attribute of the given user </s>
|
funcom_train/5078898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendSelection(EditPart editpart) {
if (editpart != getFocus())
viewer.setFocus(null);
if (!selection.isEmpty()) {
EditPart primary = (EditPart)selection.get(selection.size() - 1);
primary.setSelected(EditPart.SELECTED);
}
// if the editpart is already in the list, re-order it to be the last one
selection.remove(editpart);
selection.add(editpart);
editpart.setSelected(EditPart.SELECTED_PRIMARY);
fireSelectionChanged();
}
COM: <s> appends the code edit part code to the current selection </s>
|
funcom_train/18118325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setSize(300, 200);
this.setTitle(Messages.getString("NewProjectDialog.title")); //$NON-NLS-1$
this.setContentPane(getJContentPane());
this.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
control.discardDialog();
}
});
}
COM: <s> this method initializes this </s>
|
funcom_train/46620675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MenuItem getAboutMenuItem() {
if (iAboutMenuItem == null) {
try {
iAboutMenuItem = new MenuItem();
iAboutMenuItem.setLabel("About...");
} catch (Throwable iExc) {
handleException(iExc);
}
}
return iAboutMenuItem;
}
COM: <s> return the about menu item property value </s>
|
funcom_train/9086764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(EquipmentHistories entity) {
EntityManagerHelper.log("deleting EquipmentHistories instance",
Level.INFO, null);
try {
entity = getEntityManager().getReference(EquipmentHistories.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 equipment histories entity </s>
|
funcom_train/37236296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(String beanName) {
String conf = "/"+Env.getInstance().getRODSHome() + "/conf/spring/" + SPRING_CONTEXT_KEY;
context = new FileSystemXmlApplicationContext(conf);
//context = new ClassPathXmlApplicationContext(conf);
// load the bean
nrdm_counts = (NRDMCounts)context.getBean(beanName);
nrdm_counts.init();
}
COM: <s> init the nrdmcounts bean </s>
|
funcom_train/8076714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPlot(PlotData2D newPlot) throws Exception {
m_plot.addPlot(newPlot);
if (m_plot.m_plot2D.getMasterPlot() != null) {
setUpComboBoxes(newPlot.m_plotInstances);
}
m_saveBut.setEnabled(true);
repaint();
}
COM: <s> set a new plot to the visualize panel </s>
|
funcom_train/34565641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void pubidLit() throws IOException {
final int qu = qu();
int ch;
while((ch = nextChar()) != qu) {
if(!isLetterOrDigit(ch) && !contains(PUBIDTOK, ch))
error(PUBID, (char) ch);
}
}
COM: <s> scans an public id literal </s>
|
funcom_train/4193389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addHeaders(Vector headers, boolean top)
{ for (int i=0; i<headers.size(); i++)
if (top) this.headers.insertElementAt(headers.elementAt(i),i);
else this.headers.addElement(headers.elementAt(i));
}
COM: <s> adds a vector of headers at the top bottom </s>
|
funcom_train/24178213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EStructuralFeature getFeatureToUpdate() {
switch (this) {
case JOIN_AND:
case JOIN_OR:
case JOIN_XOR:
return ParallelJPackage.eINSTANCE.getProcedure_Join();
case SPLIT_AND:
case SPLIT_OR:
case SPLIT_XOR:
return ParallelJPackage.eINSTANCE.getProcedure_Split();
case SET_LINK_PREDICATE:
return ParallelJPackage.eINSTANCE.getLink_Predicate();
case SET_WHILELOOP_PREDICATE:
return ParallelJPackage.eINSTANCE.getWhileLoop_Predicate();
case FOREACHLOOP_ITERABLE:
return ParallelJPackage.eINSTANCE.getForEachLoop_Iterable();
case GENERATE_CODE:
return ParallelJPackage.eINSTANCE.getMetaInformationContainer_MetaInformation();
default:
return null;
}
}
COM: <s> returns the emf estructural feature associated to action id </s>
|
funcom_train/29597863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(final Spyglass spyglass) {
complexPacketReader.init(spyglass);
complexPacketReader.setDelayMillies(getDelayMillies());
addPropertyChangeListener(new PropertyChangeListener() {
// --------------------------------------------------------------------------------
@SuppressWarnings("synthetic-access")
@Override
public void propertyChange(final PropertyChangeEvent evt) {
if (evt.getPropertyName().equals("delayMillies")) {
complexPacketReader.setDelayMillies((Integer) evt.getNewValue());
}
}
});
}
COM: <s> initiates the module </s>
|
funcom_train/39544244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executionSuspended(RunnableQueue rq) {
synchronized (UpdateManager.this) {
// System.err.println("Suspended: " + suspendCalled);
if (suspendCalled) {
running = false;
UpdateManagerEvent ev = new UpdateManagerEvent
(this, null, null);
fireEvent(suspendedDispatcher, ev);
}
}
}
COM: <s> called when the execution of the queue has been suspended </s>
|
funcom_train/48764926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node visitChildren(NodeVisitor v) {
TypeNode returnType = (TypeNode) visitChild(this.returnType, v);
List formals = visitList(this.formals, v);
List throwTypes = visitList(this.throwTypes, v);
Block body = (Block) visitChild(this.body, v);
return reconstruct(returnType, formals, throwTypes, body);
}
COM: <s> visit the children of the method </s>
|
funcom_train/44592620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMagnitude() {
for (int i = 0; i < receivers.length; i++) {
approximatelyEquals(
StrictMath.sqrt(
receivers[i].realPart() * receivers[i].realPart()
+ receivers[i].imaginaryPart()
* receivers[i].imaginaryPart()),
receivers[i].magnitude());
}
}
COM: <s> test the method magnitude </s>
|
funcom_train/3379205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSubjectUniqueId(Object val) throws CertificateException {
if (version.compare(CertificateVersion.V2) < 0) {
throw new CertificateException("Invalid version");
}
if (!(val instanceof CertificateSubjectUniqueIdentity)) {
throw new CertificateException(
"SubjectUniqueId class type invalid.");
}
subjectUniqueId = (CertificateSubjectUniqueIdentity)val;
}
COM: <s> set the subject unique identity in the certificate </s>
|
funcom_train/35715864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectAndReveal(int offset, int length) {
if (fTextViewer instanceof ITextViewerExtension5) {
ITextViewerExtension5 extension= (ITextViewerExtension5) fTextViewer;
extension.exposeModelRange(new Region(offset, length));
} else if (!fTextViewer.overlapsWithVisibleRegion(offset, length))
fTextViewer.resetVisibleRegion();
fTextViewer.setSelectedRange(offset, length);
fTextViewer.revealRange(offset, length);
}
COM: <s> selects and reveals the specified range </s>
|
funcom_train/7622680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private View makeAndAddView(int position) {
View child;
if (!mDataChanged) {
child = mRecycler.get(position);
if (child != null) {
// Position the view
setUpChild(child);
return child;
}
}
// Nothing found in the recycler -- ask the adapter for a view
child = mAdapter.getView(position, null, this);
// Position the view
setUpChild(child);
return child;
}
COM: <s> obtain a view either by pulling an existing view from the recycler or </s>
|
funcom_train/43896558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExpression2(org.opengis.filter.expression.Expression expression) {
Expression rightValue = (Expression) expression;
//Check to see if this is a valid math expression before adding.
if (isGeometryExpression(rightValue.getType())) {
throw new IllegalFilterException(
"Attempted to add Geometry expression to math expression.");
}
this.rightValue = rightValue;
}
COM: <s> gets the second expression </s>
|
funcom_train/13375528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean calculateEnabled() {
List objs = getSelectedObjects();
if(objs == null || objs.size() == 0) {
return false;
} else if(objs.size() == 1) {
Command cmd = createRefreshCommand(getSelectedObjects());
if (cmd == null)
return false;
return cmd.canExecute();
} else {
for(Iterator i = objs.iterator(); i.hasNext();) {
Object o = i.next();
if(o instanceof LinkableNodeEditPart) {
return true;
}
}
}
return false;
}
COM: <s> returns code true code if the selected objects can </s>
|
funcom_train/31930996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendTrace(TestSuite testSuite, int indentLevel) {
String indent = indent(indentLevel);
appendAbstractTestDetails(testSuite, indent);
appendExecutionMode(testSuite, indent);
appendLoopInfo(testSuite);
if (testSuite instanceof TestScenario) {
appendLimits(indent);
}
appendTests(testSuite, indentLevel, indent);
}
COM: <s> append trace information about the given code test suite code indented </s>
|
funcom_train/16603714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawRect(float x1, float y1, float width, float height) {
float lineWidth = getLineWidth();
fillRect(x1,y1,width,lineWidth);
fillRect(x1,y1+height-lineWidth,width,lineWidth);
fillRect(x1,y1,lineWidth,height);
fillRect(x1+width-lineWidth,y1,lineWidth,height);
}
COM: <s> draw a rectangle to the canvas in the current colour </s>
|
funcom_train/2928119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ElementSet getAllChildren(GenericModelElement element) {
ElementSet children = element.Child();
ElementSet descendants = new ElementSet();
if ( children != null && !children.isEmpty() ) {
for ( int i = 0; i < children.size(); i ++ ) {
GenericModelElement e = (GenericModelElement)children.get(i);
descendants.add( e );
descendants.add( getAllChildren( e ) );
}
}
return descendants;
}
COM: <s> returns all child elements of an element recursive </s>
|
funcom_train/19745221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
if ( o instanceof ContentLocale ) {
ContentLocale locale = (ContentLocale) o;
return this.identifier.compareToIgnoreCase(locale.getIdentifier());
} else {
throw new ClassCastException("Cannot compare instance of " + getClass().getName() + " to the instance of " + o.getClass().getName());
}
}
COM: <s> compares this locale to another </s>
|
funcom_train/1864692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getAttributes() {
if (!this.isReady()) { return; }
currentAttributes.clear();
NamedNodeMap myAttributes = currentElement.getAttributes();
for (int j = 0; j < myAttributes.getLength(); j++) {
currentAttributes.put(myAttributes.item(j).getNodeName(), myAttributes.item(j).getNodeValue());
}
}
COM: <s> update the current attributes hashtable with the attributes of the current element </s>
|
funcom_train/4751917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public C rotateRight(C list, final int n) {
if (n <= size()) {
for (int i = fEnd - n; i < fEnd; i++) {
list.add(fList.get(i));
}
for (int i = fStart; i < fEnd - n; i++) {
list.add(fList.get(i));
}
}
return list;
}
COM: <s> rotate the ranges elements to the right by n places and append the </s>
|
funcom_train/38725583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point computeCentroid(Polygon p) {
int centroidX = 0;
int centroidY = 0;
for(int x : p.xpoints){
centroidX += x;
}
for(int y : p.ypoints){
centroidY += y;
}
Point res = new Point();
res.x = centroidX/p.npoints;
res.y = centroidY/p.npoints;
return res;
}
COM: <s> computes the centroid of a given contour </s>
|
funcom_train/48249276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test(String file, String dir, String cb){
Vector obs = new Vector();
rc = new Recognizer(order, frameLength, frameShift, min_T, weights);
// Record the observation sequences in Vector <code>obs</code>
rc.run(file, dir, obs, cb);
}
COM: <s> test using only vq </s>
|
funcom_train/3740172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean mayAddGroup(User who, Group parent) throws GroupManagerException, HibernateException {
HibernateUtil.currentSession();
if (who.isBussinessAdmin() || who.isSystemAdmin())
return true;
if (UserIsManager(who, parent))
return true;
return false;
}
COM: <s> check whether the user may add the group as the subgroup of the </s>
|
funcom_train/32815955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
//this.action = TargetActions.ACTION_UNKNOWN; > Never reset : the main action doesn't change
this.unfilteredDirectories = 0;
this.unfilteredFiles = 0;
this.filteredEntries = 0;
this.ignoredFiles = 0;
this.recoveryResult = null;
this.savedFiles = 0;
if (this.logMessagesContainer != null) {
this.logMessagesContainer.clear();
}
}
COM: <s> resets all counters </s>
|
funcom_train/23277453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Helper getFindObjectOperation(Class type) throws QvtRel2OpException {
Operation op;
for (Iterator<Operation> it = currentOpTransformation
.getOwnedOperation().iterator(); it.hasNext();) {
op = it.next();
if (op.getName().equals("find" + type.getName()))
return (Helper) op;
}
return createFindObjectOperation(type);
}
COM: <s> returns the find operation of a target model class for the </s>
|
funcom_train/28224593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void menuShown(final MenuEvent e) {
wasPaused = control.isPaused();
control.setPaused(true);
// Clean up the old menu
for (MenuItem mi : contextMenu.getItems()) {
mi.dispose();
}
boolean destinationSet = addDestinationSetter();
boolean agentsSet = addAgents();
if (destinationSet && agentsSet) {
new MenuItem(contextMenu, SWT.SEPARATOR, 1);
}
}
COM: <s> fill the menu contents when the user right clicks on the canvas </s>
|
funcom_train/26216072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(byte[] data, int size) {
try {
os.writeInt(size);
os.write(data, 0, size);
} catch (Exception exception) {
LOG.severe("*** Can't write to output stream ***");
LOG.log(Level.SEVERE, exception.getMessage(), exception);
// socket closed
doSocketClosed();
}
}
COM: <s> sends data through output stream of socket </s>
|
funcom_train/39949865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getJComboBoxMinorDeviceClass() {
if (jComboBoxMinorDeviceClass == null) {
jComboBoxMinorDeviceClass = new JComboBox();
jComboBoxMinorDeviceClass.setPreferredSize(new Dimension(150, 27));
jComboBoxMinorDeviceClass
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setDeviceClass();
}
});
}
return jComboBoxMinorDeviceClass;
}
COM: <s> this method initializes j combo box minor device class </s>
|
funcom_train/18728149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToString() {
Object[] array = null;
String expResult = "null";
String result = JaxoUtils.toString(array);
assertEquals(expResult, result);
array = new String[] {"1", "2"};
expResult = "[1,2]";
result = JaxoUtils.toString(array);
assertEquals(expResult, result);
}
COM: <s> test of to string method of class net </s>
|
funcom_train/11690012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CsvRecordFactory getCsvRecordFactory() {
if (csv == null) {
csv = new CsvRecordFactory(getTargetVariable(), getTypeMap())
.maxTargetValue(getMaxTargetCategories())
.includeBiasTerm(useBias());
if (targetCategories != null) {
csv.defineTargetCategories(targetCategories);
}
}
return csv;
}
COM: <s> returns a csv record factory compatible with this logistic model </s>
|
funcom_train/39971811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void select(Effect e){
guiCore.setSelectedEffect(e);
if(e.isTargetType(TargetType.tile))
guiCore.selectionStatus=SelectionStatus.EXPECT_INPUT_TILE;
if(e.isTargetType(TargetType.buildingCard))
guiCore.selectionStatus=SelectionStatus.EXPECT_INPUT_CARD;
if(e.isTargetType(TargetType.creatureCard))
guiCore.selectionStatus=SelectionStatus.EXPECT_INPUT_CARD;
if(e.isTargetType(TargetType.player)){} // TODO target player
}
COM: <s> use when selecting to use a targeted effect </s>
|
funcom_train/14077274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName(String n) throws DuplicateRecordException {
// Check for duplicate before changing
if (author.hasBookTitle(n)) {
throw new DuplicateRecordException(n + " " + Application.getLocalizedString("dialog.book.duplicate.message"));
}
name = n;
Application.getCiteBook().getBookList().bookRenamed(this);
}
COM: <s> change the name of the book </s>
|
funcom_train/3038407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDataSource(DataSource ds) {
if ( ds != null ) {
Map cpInjection = new HashMap();
cpInjection.put( "dataSource", ds );
( (InjectionSettingsFactory) settingsFactory ).setConnectionProviderInjectionData( cpInjection );
this.setProperty( Environment.CONNECTION_PROVIDER, InjectedDataSourceConnectionProvider.class.getName() );
}
}
COM: <s> used to inject a datasource object as the connection provider </s>
|
funcom_train/22002121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int size(int type) {
int count = 0;
assert (type == BOOLEAN_TYPE
|| type == FLOAT_TYPE
|| type == INTEGER_TYPE
|| type == FLOAT_QUOTE_TYPE
|| type == INTEGER_QUOTE_TYPE || type == STRING_TYPE);
if (getType() == type)
count = 1;
for (int i = 0; i < getChildCount(); i++) {
GondolaExpression child = getChild(i);
count += child.size(type);
}
return count;
}
COM: <s> count the number of nodes in the tree with the given type </s>
|
funcom_train/21306952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Canvas c) {
this.processType();
if (showBubble)
GUI.drawStringOnto(c, text, x, y, textColor, borderColor,bubbleBkgColor, bubbleBorderColor, showArrow);
else
GUI.drawStringOnto(c, text, x, y, textColor, borderColor);
}
COM: <s> draw the text onto the position </s>
|
funcom_train/11768044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void incrementDigit(StringBuffer value, int index) {
int code = value.charAt(index);
if(90==code) { // 90 = 'Z'
code = 65; // 65 = 'A'
if(0<index) {
incrementDigit(value, index - 1);
}
else {
value.insert(0, 'A');
}
}
value.setCharAt(index, (char)(code+1));
}
COM: <s> a method that supports incrementing characters a z </s>
|
funcom_train/286111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List getAppliedStereotypes() {
List choiceOfValues = new ArrayList();
for (Iterator appliedStereotypes = ((Element) eObject)
.getAppliedStereotypes().iterator(); appliedStereotypes
.hasNext();) {
Stereotype stereotype = (Stereotype) appliedStereotypes.next();
if (!((Element) eObject).isStereotypeRequired(stereotype)) {
choiceOfValues.add(stereotype);
}
}
// Collections.sort(choiceOfValues, new TextComparator());
return choiceOfValues;
}
COM: <s> get the list of stereotypes that are applied on the current selected </s>
|
funcom_train/36046882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void firePropertyChange(PropertyChangeEvent e) {
if (propertyChangeListeners != null) {
Vector listeners = propertyChangeListeners;
int count = listeners.size();
for (int i = 0; i < count; i++) {
((PropertyChangeListener) listeners.elementAt(i)).propertyChange(e);
}
}
}
COM: <s> fire a change event which indicates that user has changed a value </s>
|
funcom_train/46591308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void playSoundEvent() {
if (!arguments.hasNext()) {
System.out.println("No event name provided.");
}
String eventName = arguments.next();
System.out.println("Playing sound event \"" + eventName + "\"");
try {
SoundEvent event = Enum.valueOf(SoundEvent.class, eventName);
manager.playEvent(event);
} catch (Exception e) {
System.out.println("Error playing event");
}
}
COM: <s> plays an audio file associated to the given sound event </s>
|
funcom_train/17015918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void listAllJobs() throws IOException {
JobStatus[] jobs = getAllJobs();
if (jobs == null)
jobs = new JobStatus[0];
System.out.printf("%d jobs submitted\n", jobs.length);
System.out.printf("States are:\n\tRunning : 1\tSucceded : 2" +
"\tFailed : 3\tPrep : 4\n");
displayJobList(jobs);
}
COM: <s> dump a list of all jobs submitted </s>
|
funcom_train/3461537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serialize() throws JexxeException {
try {
FileOutputStream _fileOut = new FileOutputStream(mFile);
mWorkbook.write(_fileOut);
_fileOut.close();
} catch (FileNotFoundException e) {
mLog.error(e.getMessage());
throw (new JexxeException(e.getMessage()));
} catch (IOException e) {
mLog.error(e.getMessage());
throw (new JexxeException(e.getMessage()));
}
}
COM: <s> serialize the workbook to a fileoutputstream </s>
|
funcom_train/18743337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPopupMenu createDetachMenu(final Display component) {
assert indexOfComponent(component.getDisplayPanel()) >= 0;
JPopupMenu result = new JPopupMenu();
result.add(new AbstractAction(Options.DETACH_ACTION_NAME) {
@Override
public void actionPerformed(ActionEvent e) {
detach(component);
}
});
return result;
}
COM: <s> creates a popup menu with a detach action for a given component </s>
|
funcom_train/9891065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh() throws SQLException {
if(m_deleted) {
throw new NoSuchObjectException("object deleted");
}
DataBase db = DataBase.getInstance();
PreparedStatement stmt= db
.prepareStatement("SELECT start_ts, time, task_id FROM workingtime WHERE workingtime_id="
+ m_id);
stmt.execute();
ResultSet result=stmt.getResultSet();
result.next();
m_start = result.getTimestamp("start_ts");
m_time = new TimeDiff(result.getLong("time"));
m_task = Task.getById(new ID(result.getInt("task_id")));
result.close();
stmt.close();
}
COM: <s> refresh the data from the database </s>
|
funcom_train/25693993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSw1(int sw1) throws IllegalArgumentException{
sw1&=0xFF;
if(((sw1&0xF0)!=0x90) &&
((sw1&0xF0)!=0x60))
throw new IllegalArgumentException("SW1=0x"+AStringUtilities.byteToHex(sw1));
this.sw1 = (byte) sw1;
}
COM: <s> set the value of sw1 </s>
|
funcom_train/27674644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCount( final int n ) {
// Stack index 0, 1, 2, 3, 4, 5, 6
// newcountmax 0, 1, 2, 3, 4, 5, 6
if ( n <= valueStackIndex ) {
this.valueStackIndex = n;
} else {
throw new IllegalArgumentException( "new count must be not be larger than the current count" );
}
}
COM: <s> sets the number of values on the stack </s>
|
funcom_train/39874419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProgressDrawable(Drawable d) {
if (d != null) {
d.setCallback(this);
// Make sure the ProgressBar is always tall enough
int drawableHeight = d.getMinimumHeight();
if (mMaxHeight < drawableHeight) {
mMaxHeight = drawableHeight;
requestLayout();
}
}
mProgressDrawable = d;
if (!mIndeterminate) {
mCurrentDrawable = d;
postInvalidate();
}
}
COM: <s> p define the drawable used to draw the progress bar in </s>
|
funcom_train/2557450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean write(Type type, Object value, NodeMap<OutputNode> node, Map map) throws Exception {
boolean result = strategy.write(type, value, node, map);
if(visitor != null) {
visitor.write(type, node);
}
return result;
}
COM: <s> this method will write with an internal strategy before it has </s>
|
funcom_train/42844036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearRect(double x, double y, double w, double h) {
String gco = impl.getGlobalCompositeOperation();
String bgc = impl.getBackgroundColor();
if (!gco.equalsIgnoreCase(Canvas.SOURCE_OVER) || bgc.equals(Canvas.TRANSPARENT)) {
throw new IllegalStateException();
}
impl.clearRect(x, y, w, h);
}
COM: <s> clears the contents of the specified rectangle </s>
|
funcom_train/26172409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Entry ( byte[] buf, int off, int len, int tag, byte[] src, int pos ) {
this( buf, off, len, tag );
System.arraycopy( src, pos, _buf, _off, _len );
}
COM: <s> constructs a field and copies the value from a source buffer </s>
|
funcom_train/11051586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameterStep(final String parameter, final double hP) {
for (ParameterConfiguration param: selectedParameters) {
if (parameter.equals(param.getParameterName())) {
param.setHP(hP);
dirtyParameter = true;
return;
}
}
throw new MathIllegalArgumentException(LocalizedFormats.UNKNOWN_PARAMETER, parameter);
}
COM: <s> set the step associated to a parameter in order to compute by finite </s>
|
funcom_train/39792577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toRawCommand() {
if (user == null) {
return getCommand() + " " + getChannel().getTargetString() + " "
+ name + " :" + message;
} else {
return ":" + getUser().getFullRepresentation() + " " + getCommand()
+ " " + getChannel().getTargetString() + " " + name + " :"
+ message;
}
}
COM: <s> returns the irc data for this kick </s>
|
funcom_train/14004631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object processInteractionAnswer(String interactionObjectURI, String answerURI, boolean bRemember) throws AcuityException {
InteractionContent iaoContent = findInteractionContentOfIaO(interactionObjectURI);
if (iaoContent == null) {
throw new AcuityException("InteractionContent for IaO '" + interactionObjectURI + "' not found.");
}
return processInteractionAnswer(iaoContent, answerURI, bRemember);
}
COM: <s> call this method to answer a question posed by an interaction object </s>
|
funcom_train/34353653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getStatus(String urlStr) {
// Returns the status for any given URL;
try {
synchronized ( urlStatus ) {
return ((Integer) urlStatus.get(urlStr)).intValue();
}
} catch ( Exception e ) { // will also catch on a valid URL but bad cast,
return URLStatus.NOT_EXPLORED; // but that should never happen
}
}
COM: <s> returns the latest urlstatus code for the url </s>
|
funcom_train/45266589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disposePart(final IWorkbenchPart part) {
SafeRunner.run(new ISafeRunnable() {
public void run() {
if (part.getSite() instanceof MultiPageEditorSite) {
MultiPageEditorSite partSite = (MultiPageEditorSite) part
.getSite();
partSite.dispose();
}
part.dispose();
}
public void handleException(Throwable e) {
// Exception has already being logged by Core. Do nothing.
}
});
}
COM: <s> disposes the given part and its site </s>
|
funcom_train/9436920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addRemoteStoreDataTable() {
mDb.execSQL("DROP TABLE IF EXISTS remote_store_data");
mDb.execSQL("CREATE TABLE remote_store_data (" +
"id INTEGER PRIMARY KEY, folder_id INTEGER, data_key TEXT, data TEXT, " +
"UNIQUE (folder_id, data_key) ON CONFLICT REPLACE" +
")");
}
COM: <s> common code to add the remote store data table </s>
|
funcom_train/43852262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final int pre) {
if(size == nodes.length) nodes = Array.extend(nodes);
if(!sort && size != 0) {
final int d = pre - nodes[size - 1];
if(d == 0) return;
sort = d <= 0;
}
nodes[size++] = pre;
}
COM: <s> adds a pre value to the node set </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.