__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/3516365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteRemoteParticipants(Object[] rps) {
File rpsDir = Resources.getRemoteParticipantsDir(projectName);
for (int i = 0; i < rps.length; i++) {
String remoteParticipant = rps[i].toString();
File rpFile = new File(rpsDir, projectName + "_"
+ remoteParticipant + Constants.RP_EXT);
rpFile.delete();
}
}
COM: <s> deletes every remote participant file specified by the parameter array in </s>
|
funcom_train/3710972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSpectra (int index[]) {
if (index != null) {
for (int i = index.length-1; i >= 0; i--) {
segments.remove(index[i]);
segment_ids.remove(index[i]);
}
}
addMetaParameter(UType.SED_NSEGMENTS, String.valueOf(segments.size()));
}
COM: <s> this method was added to support specific uses by factory classes </s>
|
funcom_train/8959663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(DLCM dlcm) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException{
mDLCM = dlcm;
for (Member member : MemberList){
member.setParent(this);
member.initialize();
}
LCM_FINGERPRINT = ((LCM_FINGERPRINT_BASE << 1) + ((LCM_FINGERPRINT_BASE >> 63) & 1));
}
COM: <s> initializes structure and initializes all members that this structure host </s>
|
funcom_train/45761239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(int startIndex, int endIndex) {
try {
((XAccessibleEditableText) unoObject).deleteText(startIndex, endIndex);
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
} catch (com.sun.star.uno.RuntimeException e) {
}
}
COM: <s> deletes the text between two indices </s>
|
funcom_train/329310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mergeRegion(ConnectedRegion region) {
SliceData otherSlice;
ListIterator<SliceData> otherSliceIterator = region.sliceData.listIterator();
while (otherSliceIterator.hasNext()) {
otherSlice = otherSliceIterator.next();
for (int i = 0; i < sliceHeight; i++) {
if (otherSlice.slicePixs[i]) {
addPixel(otherSlice.sliceNumber, i, otherSlice.fftDataUnit);
}
}
}
}
COM: <s> merge another region into this region and then tell the array </s>
|
funcom_train/14100169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String nl = System.getProperty("line.separator");
return "["+nl+" ["+m00+"\t"+m01+"\t"+m02+"]" + nl +
" ["+m10+"\t"+m11+"\t"+m12+"]" + nl +
" ["+m20+"\t"+m21+"\t"+m22+"] ]";
}
COM: <s> returns a string that contains the values of this matrix3d </s>
|
funcom_train/50463414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDocumentURL(java.net.URL documentURL) {
this.documentURL = documentURL;
String url = documentURL.toString();
try {
this.documentBaseURL = new URL(url.substring(0,url.lastIndexOf('/')+1));
}
catch(MalformedURLException badURL) {
//Can ignore this
badURL.printStackTrace();
}
}
COM: <s> setter for property document url </s>
|
funcom_train/16464655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectItem(Object component, Object row, boolean recursive) {
boolean changed = false;
for (Object item = get(component, ":comp");
item != null; item = getNextItem(component, item, recursive)) {
if (setBoolean(item, SELECTED, (item == row), false)) {
repaint(component, null, item); changed = true;
}
}
set(component, ":anchor", null);
if (changed) { invoke(component, row, ATTRIBUTE_ACTION); }
}
COM: <s> select a single given item deselect others </s>
|
funcom_train/37209485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void deregisterNode(String[] owningProcess) {
// logger.debug("Remove node @" +
// printProcess(owningProcess));
final DefaultMutableTreeNode nodeToRemove = nodeAtProcessPath(
owningProcess, -1);
((MonitorNodeImpl) nodeToRemove.getUserObject()).expire();
nodeRemovalTimer.schedule(new java.util.TimerTask() {
@Override
public void run() {
synchronized (monitorTree) {
monitorTree.removeNodeFromParent(nodeToRemove);
}
}
}, getNodeRemovalDelay());
}
COM: <s> request the removal of the specified node from the monitor tree </s>
|
funcom_train/20205861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLastItem() {
int numbItems = getTotalItems();
int lastItem = numbItems;
if (getItemsPerPage() > 0) {
lastItem = getFirstItem() + getItemsPerPage();
lastItem = Math.min(lastItem, numbItems);
}
return lastItem;
}
COM: <s> return the index of the last item to display </s>
|
funcom_train/21021168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void executeQuickSearch() {
if (quickSearch.getText().length()>=3) {
Main.get().mainPanel.topPanel.tabWorkspace.changeSelectedTab(UIDockPanelConstants.SEARCH);
Main.get().mainPanel.search.searchBrowser.searchIn.setQuickSearch(quickSearch.getText());
quickSearch.setText("");
searchImage.setResource(OKMBundleResources.INSTANCE.searchDisabled());
}
}
COM: <s> execute quick search </s>
|
funcom_train/49943743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void postActivation(final MouseEvent event) {
if (!fIsActivating)
return;
new Thread() {
@Override
public void run() {
if (fIsActivating) {
getDisplay().asyncExec(new Runnable() {
public void run() {
activateCellEditor(event);
fIsActivating = false;
}
});
}
}
}.start();
}
COM: <s> handle the mouse down event </s>
|
funcom_train/48103636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String findSendLeaveWordList(){
String userId=((SwdUser) ServletActionContext.getRequest().getSession().getAttribute(Contents.SESSION_USER_KEY)).getUserId();
leaveWordlist=this.swdLeaveWordService.findSendLeaveWordListByUserId(userId);
log.debug("into findSendLeaveWordList...... leaveWordlist is :"+leaveWordlist);
return "userSendLeaveWordList";
}
COM: <s> find out had send swd leave word list by user id </s>
|
funcom_train/39108670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public void fatalError (SAXParseException exception) {
fatal.append(" Error: "+exception.getMessage() + '\n'+
" URL: "+exception.getSystemId() + '\n'+
" Line: "+exception.getLineNumber() + '\n'+
" Col: "+ exception.getColumnNumber() + '\n' + '\n');
}
COM: <s> save all fatal errors and try to continue parsing </s>
|
funcom_train/10345736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIssuerDN(Principal nissuer, int encType) {
if (nissuer instanceof codec.x501.Name) {
issuer_ = (codec.x501.Name) nissuer;
} else {
try {
issuer_ = new codec.x501.Name(nissuer.getName(), encType);
} catch (Exception e) {
System.out.println("Internal Error:");
e.printStackTrace();
return;
}
}
// update the structure!
set(3, issuer_);
}
COM: <s> needed to explicitly name an encoding method in order to change between </s>
|
funcom_train/50188998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireSourceMapping(SAXEvent saxevent) {
if (hasTraceListeners()) {
// count of registered tracelisteners
int countListener = traceListeners.size();
for (int i = 0; i < countListener; i++) {
TraceListener currentListener =
(TraceListener) traceListeners.elementAt(i);
// call the according method on tracelistener
currentListener.sourceMapping(saxevent);
}
}
}
COM: <s> called when a namespace mapping event of the source was received </s>
|
funcom_train/42297387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected long retrieveLastModifiedTime() {
try {
return getResource().getFile().lastModified();
}
catch (IOException ex) {
if (logger.isDebugEnabled()) {
logger.debug(getResource() + " could not be resolved in the file system - " +
"current timestamp not available for script modification check", ex);
}
return 0;
}
}
COM: <s> retrieve the current last modified timestamp of the underlying resource </s>
|
funcom_train/25011347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AnnotatedElement annotatedElement() {
if (field != null) {
return field;
}
if (method != null) {
return method;
}
if (constructor != null) {
return constructor;
}
if (type != null) {
return type;
}
// programming error if reach here
throw new IllegalStateException("ooh, didn't find the element");
}
COM: <s> gets the field method constructor or type etc </s>
|
funcom_train/22032992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void colorChanged(ColorChangeEvent e) {
synchronized(this) {
if (e.getStart() < updateLeft) {
updateLeft = e.getStart();
}
if (e.getEnd() > updateRight) {
updateRight = e.getEnd();
}
}
// redraw
validate();
repaint();
}
COM: <s> implementation of the color change listener interface </s>
|
funcom_train/12278830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AuthenticationScheme getSchemeForAuthenticationModuleInUse(String module) {
try {
List schemes = SystemDatabaseFactory.getInstance().getAuthenticationSchemeSequences();
for(Iterator i = schemes.iterator(); i.hasNext(); ) {
AuthenticationScheme seq = (DefaultAuthenticationScheme)i.next();
if(seq.hasModule(module)) {
return seq;
}
}
} catch (Exception e) {
}
return null;
}
COM: <s> get the first </s>
|
funcom_train/38566583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCaptchaStoreSizeBeforeGarbageCollection(int captchaStoreSizeBeforeGarbageCollection) {
if (this.captchaStoreMaxSize <
captchaStoreSizeBeforeGarbageCollection)
throw new IllegalArgumentException("the max store size can't be less than garbage collection "
+ "size. if you want to disable garbage" +
" collection (this is not recommended) you may "
+ "set them equals (max=garbage)");
this.captchaStoreSizeBeforeGarbageCollection =
captchaStoreSizeBeforeGarbageCollection;
}
COM: <s> max captcha store size before garbage collection of the store </s>
|
funcom_train/18374966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int convertBoolean(String value){
int retVal = -1;
if (value.trim().equalsIgnoreCase("true") ||
value.trim().equalsIgnoreCase("yes") ||
value.trim().equals("1")){
retVal =1;
}else if (value.trim().equalsIgnoreCase("false") ||
value.trim().equalsIgnoreCase("no") ||
value.trim().equals("0")){
retVal = 0;
}
return retVal;
}
COM: <s> convert boolean converts a string to an int </s>
|
funcom_train/2904470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XMLTag generateParentTag(){
XMLTag parent = new XMLTag(null);
parent.tag = "LinuxTask";
parent.level = 0;
Vector v = new Vector();
parent.value = (Object)v;
parent.attribute = new Hashtable(1);
int id = getTaskID();
parent.attribute.put("id", ""+id);
Object td = getTaskDescription();
if(td != null){
XMLTag child0 = new XMLTag(parent);
child0.tag = "description";
child0.level = 1;
child0.value = td.toString();
v.add(child0);
}
return parent;
}
COM: <s> generate the parent tag </s>
|
funcom_train/18149985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSelectionExpression(SelectionExpression selectionExpression) {
// create the association set if it doesn't exist already
if(_selectionExpression == null) _selectionExpression = new AssociationSetImpl<SelectionExpression>();
// add the association to the association set
getSelectionExpression().add(selectionExpression);
// make the inverse link
selectionExpression.setQueryBySelection(this);
}
COM: <s> adds an association selection expression </s>
|
funcom_train/32780169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSpeedEmpty(double s) {
if (s <= 0.0) {
sendWarning(
"The empty speed of a internal transporter should be changed to zero or "
+ "a negative value. The empty speed will remain unchanged!",
"InternalTransporter : " + getName()
+ " Method: void setSpeedEmpty(double s)",
"A speed which is zero or negative does not make sense.",
"Make sure to provide a valid positive empty speed"
+ "when changing this attribute.");
return; // forget that rubbish
}
this.speedEmpty = s;
}
COM: <s> sets the empty speed of this internal transporter to a new value </s>
|
funcom_train/40296620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isUserAdmin(HttpServletRequest req) {
boolean isAdmin = false;
if (req.getSession(true).getAttribute(WebConstants.USER) != null) {
User user = (User) req.getSession(true).getAttribute(WebConstants.USER);
if (User.ROLE_ADMIN.equalsIgnoreCase(user.getRoleName())) {
isAdmin = true;
}
}
return isAdmin;
}
COM: <s> check for user logging or not and also check for admin role </s>
|
funcom_train/12767768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doStartTag() throws JspException {
List<?> posts = new ArrayList<Object>();
try {
posts = DeliciousCache.getInstance().getRecentPosts(username, password, count, tag, timeout);
} catch (DeliciousException de) {
// do nothing, the error has already been logged by the Delicious class
}
pageContext.setAttribute(var, posts, PageContext.PAGE_SCOPE);
return Tag.EVAL_BODY_INCLUDE;
}
COM: <s> called when the opening tag is encountered on the page </s>
|
funcom_train/45622878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWorkingDirectoryPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ExecType_workingDirectory_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ExecType_workingDirectory_feature", "_UI_ExecType_type"),
MSBPackage.eINSTANCE.getExecType_WorkingDirectory(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the working directory feature </s>
|
funcom_train/2714892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearResultArea() {
try {
getResultArea().getDocument().
remove(0,
getResultArea().getDocument().
getLength());
} catch (BadLocationException ex) {
Logger.logError(
"Failed to clear the console", ex);
}
}
COM: <s> clears the result area </s>
|
funcom_train/34188713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send_AckID(int id) throws IOException {
if (ackPacket.getAddress() != null) {
event.core_message("UDP:S>Sendind ACK=" + id);
ackPacket.setData(UDP_Core.udp_intToBytes(id));
socket.send(ackPacket);
}
}
COM: <s> sends acknoledge id </s>
|
funcom_train/48882710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextPane getDomainPddlTextPane() {
if (domainPddlTextPane == null) {
ItHilightedDocument domainDocument = new ItHilightedDocument();
domainDocument.setHighlightStyle(ItHilightedDocument.PDDL_STYLE);
domainPddlTextPane = new JTextPane(domainDocument);
domainPddlTextPane.setFont(new Font("Courier", 0, 12));
domainPddlTextPane.setBackground(Color.WHITE);
}
return domainPddlTextPane;
}
COM: <s> this method initializes domain pddl text pane </s>
|
funcom_train/5716259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean showDialog() {
int returnValue = FLGOptionPane.showConfirmDialog(this,
tabbedPane, internationalization.getString("dialog.createAutomaticLinks.title"),
FLGOptionPane.OK_CANCEL_OPTION, FLGOptionPane.PLAIN_MESSAGE);
return returnValue == FLGOptionPane.OK_OPTION;
}
COM: <s> display dialog to select link target view and link source views </s>
|
funcom_train/1559123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildGui() {
mode = -1;
ModeToggleButtonGroup bg = new ModeToggleButtonGroup();
modeToggleMenus = new ArrayList<ModeToggleMenu>();
// create toolbar
removeAll();
setAlignmentX(LEFT_ALIGNMENT);
// add menus with modes to toolbar
addCustomModesToToolbar(bg);
// add invisible temporary menu
temporaryModes = new ModeToggleMenu(app, this, bg);
temporaryModes.setVisible(false);
modeToggleMenus.add(temporaryModes);
add(temporaryModes);
setMode(app.getMode(), false);
}
COM: <s> creates a toolbar using the current str tool bar definition </s>
|
funcom_train/7494310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updatePdfFile( int hash, int page_count){
long date = System.currentTimeMillis();
ContentValues vals = new ContentValues();
vals.put(HASH_ID, hash);
vals.put(CACHE_DATE, date);
vals.put(PAGE_COUNT, page_count);
db.replace(PDF_FILE_TABLE, null, vals);
}
COM: <s> updates the date </s>
|
funcom_train/38384954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTextSharing(){
REDEditor editor = getSharedTestEditor();
REDEditor editor2 = new REDEditor(TMP_FILE2, false);
// test2EditorTextSharing(editor2, LONG_TEXT);
// change text of shared editor to prepare testTextSharing2()
editor2.close(); editor2 = null;
editor.replace(INS_TEXT, 0, 0, null);
}
COM: <s> tests the sharing and unloading of unused shared texts </s>
|
funcom_train/3372518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getColumnsOccupied(View v) {
AttributeSet a = v.getElement().getAttributes();
if (a.isDefined(HTML.Attribute.COLSPAN)) {
String s = (String) a.getAttribute(HTML.Attribute.COLSPAN);
if (s != null) {
try {
return Integer.parseInt(s);
} catch (NumberFormatException nfe) {
// fall through to one column
}
}
}
return 1;
}
COM: <s> determines the number of columns occupied by </s>
|
funcom_train/25146728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void appendSqlColumnDefinition(DbColumn column, StringBuilder sb) {
sb.append(column.getName()).append(' ');
appendSqlColumnType(column, sb);
if (!column.isNullable()) {
sb.append(" NOT NULL");
} else {
sb.append(" DEFAULT ").append(getSqlValue(column, column.getDefaultValue()));
}
}
COM: <s> append the columns name type and if the case its null ability constraint </s>
|
funcom_train/3786949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lookupIdxByRspot(CSDRspot dbR)
{ /* lookupIdxByRspot */
if(rspotsList==null)
return(-1);
for(int i=0;i<totRspots;i++)
if(rspotsList[i]==dbR)
return(i);
return(-1);
} /* lookupIdxByRspot */
COM: <s> lookup idx by rspot lookup index of rspot object in rsl </s>
|
funcom_train/47864369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeViewfinderOrigin() {
int[] absPos = new int[2];
scanArea.getLocationOnScreen(absPos);
viewfinderOriginX = absPos[0];
viewfinderOriginY = absPos[1];
// subtract origin of preview view
surfaceView.getLocationOnScreen(absPos);
viewfinderOriginX -= absPos[0];
viewfinderOriginX -= absPos[1];
}
COM: <s> encapsulate logic to compute viewfinder origin </s>
|
funcom_train/34707629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getJComboBoxNoOfPatients() {
if (jComboBoxNoOfPatients == null) {
jComboBoxNoOfPatients = new JComboBox();
jComboBoxNoOfPatients.setBounds(new Rectangle(116, 157, 62, 23));
for (int i = 1; i < 10; i++) {
jComboBoxNoOfPatients.addItem(i);
}
}
return jComboBoxNoOfPatients;
}
COM: <s> this method initializes j combo box no of patients </s>
|
funcom_train/42239650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createPropertyDescriptors(List<IPropertyDescriptor> descriptors) {
descriptors.add(new PropertyDescriptor("foreground", "Foreground Color"));
descriptors.add(new PropertyDescriptor("background", "Background Color"));
descriptors.add(new PropertyDescriptor("font", "Font"));
descriptors.add(new PropertyDescriptor("layoutData", "Layout Data"));
}
COM: <s> add any property descriptors your control wants to expose to the list </s>
|
funcom_train/2402473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Interval getCurrentInterval() {
Interval result = new Interval();
if (!isEmpty()) {
result.setTop(fStep * fPageSize);
int bottom = result.getTop() + fPageSize - 1;
if (bottom > getBottom()) {
bottom = getBottom();
}
result.setBottom(bottom);
}
return result;
}
COM: <s> get current interval of records </s>
|
funcom_train/32965425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object unmarshal(DocXML doc, AccountUser activeAccountUser, PrivateKey userPrivateKey) throws JAXBException {
// TolvenLogger.info( "XMLProtected.unmarshal doc id=" + doc.getId(), XMLProtectedBean.class);
byte[] c = docProtectionBean.getDecryptedContent(doc, activeAccountUser, userPrivateKey);
if (c==null) return null;
return unmarshal( doc.getXmlNS(), new ByteArrayInputStream( c ));
}
COM: <s> p this method will unmarshal the xml content of the specified document </s>
|
funcom_train/7625992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLineBounds(int line, Rect bounds) {
if (bounds != null) {
bounds.left = 0; // ???
bounds.top = getLineTop(line);
bounds.right = mWidth; // ???
bounds.bottom = getLineBottom(line);
}
return getLineBaseline(line);
}
COM: <s> return the baseline for the specified line 0 hellip get line count 1 </s>
|
funcom_train/43269933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FormsLayoutSettings getLayoutSettings() {
final EditorSettings settings = editor.getEditorContext()
.getEditorSettings();
if (settings != null
&& settings.getLayoutSettings() instanceof FormsLayoutSettings) {
return (FormsLayoutSettings) settings.getLayoutSettings();
}
if (settings != null && settings.getLayoutSettings() == null) {
final FormsLayoutSettings layoutSettings = PackageFactory
.newFormsLayoutSettings(settings);
layoutSettings
.set_PropertyName(EditorSettings.PROPERTY_LAYOUTSETTINGS);
settings.setLayoutSettings(layoutSettings);
return layoutSettings;
}
return null;
}
COM: <s> get the layout settings </s>
|
funcom_train/31084623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print (String indent, PrintStream output) {
output.println (indent + "System");
output.println (indent + " " + _systemHeader);
for (int i = 0; i < getStaffCount(); ++i)
getStaff(i).print (indent + " ", output);
}
COM: <s> this prints the staff system including all staves </s>
|
funcom_train/33862482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getClassName(){
String _class = this.getClass().getName();
if (_class.contains(".")) {
int lastIndex = _class.lastIndexOf(".");
return _class.substring(lastIndex + 1);
} else {
return _class;
}
}
COM: <s> gets the class name </s>
|
funcom_train/18338078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWebService(WebService service) throws DiscoveryException {
if (!servicePostconDescriptions.containsKey(service)) {
log.debug("Adding to " + getClass().getSimpleName() +
" - " + service.getIdentifier());
servicePostconDescriptions.put(service, getServicePostconDescr(service));
servicePreconDescriptions.put(service, getServicePreconDescr(service));
}
}
COM: <s> adds a web service to the discovery engine </s>
|
funcom_train/28168885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setClone(Map<AttributeKey,Object> a, T value) {
try {
set(a, value == null ? null : (T) Methods.invoke(value,"clone"));
} catch (NoSuchMethodException ex) {
InternalError e = new InternalError();
e.initCause(ex);
throw e;
}
}
COM: <s> sets a clone of the value to the figure without firing events </s>
|
funcom_train/46261289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeToFile() {
try {
int max = ServerUtils.getMax(sequenceNumberList);
fileWriter = new PrintWriter(new FileWriter(hiddenFile));
for (int i = 0; i <= max; i++) {
String data = messageMap.get(i);
if (data != null) {
fileWriter.append(data);
fileWriter.append(System.getProperty("line.separator"));
}
}
fileWriter.flush();
fileWriter.close();
} catch (IOException e) {
errorCode = 204;
sendError(errorCode);
e.printStackTrace();
}
}
COM: <s> write map contents to file </s>
|
funcom_train/777307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void inject() {
// inject test message
try {
injectMessage();
}
catch ( Throwable t ) {
failMsg =
ThrowableUtil.errMsg( "problem injecting test message", t );
}
// set testcase start and timeout
testcaseStartMsAbs = System.currentTimeMillis();
testcaseTimeoutMsAbs =
testcaseStartMsAbs + testcaseTimeout.toMilliseconds();
}
COM: <s> inject test message and set absolute testcase timeout </s>
|
funcom_train/3602111 | /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 GenericFile) {
int cmpRes = this.getDisplayName().toLowerCase().compareTo(((GenericFile)o).getDisplayName().toLowerCase());
if(cmpRes == 0) {
return this.getDisplayName().compareTo(((GenericFile)o).getDisplayName());
} else {
return cmpRes;
}
} else {
return -1;
}
}
COM: <s> a special type of comparison is performed </s>
|
funcom_train/26021253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData(){
Cursor cursor=null;
try{
Uri curi = Uri.parse("content://transit/route");
String routeTypeId = TransitConf.currentRouteTypeId;
ArrayList <Route> list = Route.getData(this, routeTypeId);
arrayAdapter =new ArrayAdapter <Route> (this,android.R.layout.simple_list_item_1,list);
//mRouteView.setAdapter(mRouteAdapter);
}catch(Exception e){
Log.e(TAG,"setRoute()",e);
}finally{
if (cursor!=null)
cursor.close();
}
}
COM: <s> set route view this needs to be moved to a worker thread </s>
|
funcom_train/826933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long exportTimeSlots(Task parentTask, String prefix) {
Collection timeslotsCollection = parentTask.getTimeslots();
if (timeslotsCollection == null) {
return 0;
}
long milliseconds = 0;
Iterator timeslots = timeslotsCollection.iterator();
while (timeslots.hasNext()) {
TimeSlot timeslot = (TimeSlot) timeslots.next();
milliseconds += exportTimeSlot(timeslot, prefix);
}
return milliseconds;
}
COM: <s> exports tag with timeslot </s>
|
funcom_train/39541466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Action createHorizontalScrollAction() {
String actionName = getUIString(HORIZONTALSCROLL_ACTION_COMMAND);
BoundAction action = new BoundAction(actionName,
HORIZONTALSCROLL_ACTION_COMMAND);
action.setStateAction();
action.registerCallback(this, "setHorizontalScrollEnabled");
action.setSelected(isHorizontalScrollEnabled());
return action;
}
COM: <s> creates an action for horizontal scrolling </s>
|
funcom_train/22369430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean needsShortPathName(IAudioObject audioObject, boolean isRemoteAudio) {
// First check state and OS
if (!statePlayer.isUseShortPathNames() || !osManager.usesShortPathNames()) {
return false;
}
// local audio objects and downloaded podcasts
return audioObject instanceof ILocalAudioObject || (audioObject instanceof IPodcastFeedEntry && !isRemoteAudio);
}
COM: <s> returns true if audio object needs short path names </s>
|
funcom_train/35273199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object receive() throws Exception {
Object obj = null;
try {
if (ois == null &&
is != null)
ois = new ObjectInputStream(is);
obj = ois.readObject();
}//try
catch (Exception e){
throw new Exception("NwClient.receive():\n", e);
}
return obj;
}//receive()
COM: <s> receive an object from the server </s>
|
funcom_train/48494572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFile(File file) throws Exception {
// Verify that there are no duplicates
for (File f : projectFiles) {
if (!f.isAbsolute() && projectDirectory != null)
f = new File(projectDirectory, f.getPath());
if (file.equals(f))
throw new Exception("File " + file
+ " is already in the project");
}
file = ProjectFile.getRelativePath(projectDirectory, file);
projectFiles.add(file);
listModel.fireChangeEvent();
}
COM: <s> adds a file to the project </s>
|
funcom_train/39911216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Instance makeInstance(String text, Instances data) {
// Create instance of length two.
Instance instance = new Instance(2);
// Set value for message attribute
Attribute messageAtt = data.attribute(Util.attrNameText);
instance.setValue(messageAtt, messageAtt.addStringValue(text));
// Give instance access to attribute information from the dataset.
instance.setDataset(data);
return instance;
}
COM: <s> method that converts a text message into an instance </s>
|
funcom_train/34749418 | /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 == null) {
return false;
}
if (obj == this) {
return true;
}
Connection delegate = getInnermostDelegateInternal();
if (delegate == null) {
return false;
}
if (obj instanceof DelegatingConnection) {
DelegatingConnection c = (DelegatingConnection) obj;
return c.innermostDelegateEquals(delegate);
}
else {
return delegate.equals(obj);
}
}
COM: <s> this method considers two objects to be equal </s>
|
funcom_train/12738608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isStepNode(Step step) throws NormalizeException {
if ((step != null) && (step.getPredicates() == null)) {
XQueryExpression test = step.getExpression();
if ((test != null) && (test instanceof NodeTest) && (((NodeTest) test).getKind() == NodeKind.NODE)) {
return true;
}
}
return false;
}
COM: <s> to know if a step is a node test with any axis </s>
|
funcom_train/38551484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SeverityMask getSeverityMask() {
SeverityMask mask = new SeverityMask(this.debugCheckBox.isSelected(),
this.infoCheckBox.isSelected(),
this.warningCheckBox.isSelected(),
this.errorCheckBox.isSelected(),
this.fatalCheckBox.isSelected(),
this.netTraceCheckBox.isSelected());
return mask;
}
COM: <s> returns a severity mask set with the values depicted in this gui </s>
|
funcom_train/10526341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPage() {
assert getPageSize() > 0;
assert getRow() % getPageSize() == 0 : "Invalid current row \"" + getRow() + "\" for page size \"" + getPageSize() + "\"";
return getRow() / getPageSize();
}
COM: <s> get the current page number given a current row and page size </s>
|
funcom_train/16528634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void modifyMatchChoice(ChoiceCardUI choiceCardUI) {
if(choiceCardUI instanceof MatchChoiceCardUI) {
MatchChoiceCardUI matchChoiceCardUI = (MatchChoiceCardUI) choiceCardUI;
JLabel feedbackLabel = matchChoiceToFeedbackLabel.get(matchChoiceCardUI);
if(feedbackLabel != null) {
feedbackLabel.setText(matchChoiceCardUI.getValue());
}
}
}
COM: <s> modifies a feedback label if the user has already created a feedback </s>
|
funcom_train/37522615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_final_12() {
try {
saveAs( "Final12.java",
"public class Final12 {" + NEWLINE +
" public final int x;" + NEWLINE +
" public Final12(Final12 other) {" + NEWLINE +
" this.x = other.x;" + NEWLINE +
" }" + NEWLINE +
"}"
);
CompilationResults results =
compile( "Final12.java" );
expectSuccess( results );
} finally {
remove( "Final12.java" );
}
}
COM: <s> we were seeing some strange bugs with references to final </s>
|
funcom_train/9432856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateLockIconImage(int lockIconType) {
Drawable d = null;
if (lockIconType == LOCK_ICON_SECURE) {
d = mSecLockIcon;
} else if (lockIconType == LOCK_ICON_MIXED) {
d = mMixLockIcon;
}
mTitleBar.setLock(d);
if (mFakeTitleBar != null) {
mFakeTitleBar.setLock(d);
}
}
COM: <s> updates the lock icon image in the title bar </s>
|
funcom_train/38310801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLowerCase() throws ExpressionException {
assertEquals("this is a test", exi.evalString("${string lowerCase}", properties, formatHelper));
assertEquals("this is a test abc", exi.evalString("${string + ' ABC' lowerCase}", properties, formatHelper));
}
COM: <s> tests the lower case operation </s>
|
funcom_train/22929441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRequiredParameter_IndexNotValid() {
Command command = new Command("abc", array("123", "456"));
try {
command.getRequiredParameter(2);
fail("Expected CommandSyntaxException");
}
catch (CommandSyntaxException expected) {
LOG.info("Expected: " + expected);
}
}
COM: <s> test the get required parameter method when the index is not valid </s>
|
funcom_train/7607346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getConnected(BodyList list, ArrayList path, boolean stopAtStatic) {
path.add(this);
for (int i=0;i<touching.size();i++) {
Body body = touching.get(i);
if (path.contains(body)) {
continue;
}
if (body.isStatic() && stopAtStatic) {
continue;
}
list.add(body);
body.getConnected(list, path, stopAtStatic);
}
}
COM: <s> get the bodies connected to this one </s>
|
funcom_train/49078611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ForRentBO create() throws DataException {
try {
GUID guid = new GUID();
String id = guid.generate();
ForRentBO object = new ForRentBO();
object.setForRentGUID(id);
Cache.getInstance().put(object.getForRentGUID(), object);
return object;
} catch (Exception e) {
throw new DataException("Could not create GUID", e);
}
}
COM: <s> empty constructor of for rent bo </s>
|
funcom_train/20228903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Page p) {
if (p.getId() == id)
return 0 ;
if (p.weight >= 0 && weight >= 0 && p.weight != weight)
return -1 * (new Double(weight)).compareTo(p.weight) ;
return (new Integer(id)).compareTo(p.getId()) ;
}
COM: <s> compares this page to another </s>
|
funcom_train/2584872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReplaceDatasetOnPieChart() {
LocalListener l = new LocalListener();
this.pieChart.addChangeListener(l);
PiePlot plot = (PiePlot) this.pieChart.getPlot();
plot.setDataset(null);
assertEquals(true, l.flag);
assertNull(plot.getDataset());
}
COM: <s> using a regular pie chart we replace the dataset with null </s>
|
funcom_train/31478181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void login(String host, int port, String user, String passwd) throws Exception {
logMessage("Connecting to "+host+":"+port+".", MESSAGE);
Socket socket = new Socket(host, port);
protocol = new GameProtocol(socket);
protocol.login(user, passwd);
protocol.start();
}
COM: <s> creates a connection to the server </s>
|
funcom_train/8077054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SoftClassifiedInstances (Instances dataset, Random randomizer) {
super(dataset, dataset.numInstances());
Enumeration enumInsts = dataset.enumerateInstances();
while (enumInsts.hasMoreElements()) {
Instance instance = (Instance) enumInsts.nextElement();
Instance softInstance;
if (instance instanceof SparseInstance)
softInstance = new SoftClassifiedSparseInstance((SparseInstance)instance, randomizer);
else
softInstance = new SoftClassifiedFullInstance(instance, randomizer);
m_Instances.addElement(softInstance);
}
}
COM: <s> create a set of soft classified instances from a given set of </s>
|
funcom_train/32829572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canCompare(Object left, Object right) {
if (left == null || right == null) {
return false;
}
if ((left.getClass().isArray() || left instanceof Collection) && (right.getClass().isArray() || right instanceof Collection)) {
return true;
}
return false;
}
COM: <s> returns true when both objects are arrays or collections </s>
|
funcom_train/13402447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancelLease( MarshalledEntry entry) {
try {
EntryRemovalTask task = entry.getRemovalTask();
if ( ( task == null) || task.cancel()) struct.remove( entry);
}
catch ( NoSuchEntryException e) {
cat.error( "", e);
throw new InternalSpaceException( "Unexpected error happened. See log for details.", e);
}
}
COM: <s> cancels the lease </s>
|
funcom_train/46280013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void push() {
top ++;
if (top >= stack.length) {
Mapping newstack[] = new Mapping[stack.length*2];
System.arraycopy (stack, 0, newstack, 0, stack.length);
stack = newstack;
}
if (log.isTraceEnabled())
log.trace("NSPush (" + stack.length + ")");
stack[top] = null;
}
COM: <s> create a new frame at the top of the stack </s>
|
funcom_train/18748985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateList() {
// temporarily remove this component as selection listener
removeListSelectionListener(this);
// clear the selection first
clearSelection();
// clear the list
listModel.clear();
for (String label: getLabels()) {
listModel.addElement(label);
}
// reinstate this component as selection listener
addListSelectionListener(this);
}
COM: <s> updates the list from the internally kept label collection </s>
|
funcom_train/41704255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getInt(String attribute) {
try {
if (rs != null) {
return rs.getInt(attribute);
} else {
throw new NullPointerException();
}
} catch (Exception ex) {
System.out.println("DB.getInt() ran into an error " + ex.getMessage());
ex.printStackTrace();
}
throw new NullPointerException();
}
COM: <s> returns the int data under the stated column name </s>
|
funcom_train/22579426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getActiveInterfaces(long devID) {
Vector devIfs = null;
String sqlString = null;
// Create the SQL statement string to retrieve all active DeviceInterface records.
sqlString = new String ("SELECT * FROM "+I_TBL_NAME
+ " WHERE deviceID="+devID+" AND active='true'");
System.out.println("\nDbDeviceInterface.getRemovedInterfaces:\n sqlString = "+sqlString);
return getRecords(sqlString);
}
COM: <s> retrieve all the active device interfaces for a specific device </s>
|
funcom_train/36552917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addPlayerValuePanel(JPanel myPanel) {
JPanel valuePanel = new JPanel();
valuePanel.setMaximumSize(new Dimension(190,0));
valuePanel.setOpaque(false);
valuePanel.setVisible(true);
playersValuePanels.add(valuePanel);
// valuePanel.add(new JLabel("TEMP"));
myPanel.add(valuePanel);
}
COM: <s> creates players value area </s>
|
funcom_train/7916948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read(Context ctx) {
Log.d(TAG, "Reading message with id = " + id);
ContentValues updateValues = new ContentValues();
updateValues.put(KEY_MESSAGE_READ, 1);
ctx.getContentResolver().update(ContentUris.withAppendedId(UserapiProvider.MESSAGES_URI, id), updateValues, null, null);
}
COM: <s> sets read flag of this message and saves it to db </s>
|
funcom_train/30199092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GCPastContentHandle getHandle(final GCPast local, final long expiration) {
final NodeHandle handle=local.getLocalNodeHandle();
return new GCPastContentHandle() {
public Id getId() {
return DataPastContent.this.getId();
}
public NodeHandle getNodeHandle() {
return handle;
}
public long getExpiration() {
return expiration;
}
public long getVersion() {
return DataPastContent.this.getVersion();
}
};
}
COM: <s> method get handle </s>
|
funcom_train/4506765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void agentDeparted(AgentSession agentSession) {
// Trigger the event that an agent has left the workgroup
WorkgroupEventDispatcher.agentDeparted(this, agentSession);
// Update the status in the manager so that the thread that is polling for changes in
// the status does not send the queues status details again to this session
WorkgroupManager.getInstance().updateWorkgroupStatus(this);
}
COM: <s> notification message that an agent session has ended </s>
|
funcom_train/19267829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer query = new StringBuffer();
for (Iterator iterator = textLines.iterator(); iterator.hasNext();) {
String textLine = (String) iterator.next();
query.append(textLine);
}
return project.replaceProperties(query.toString());
}
COM: <s> retrieve the query as a string and replace properties </s>
|
funcom_train/3294674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
synchronized(this) {
try {
wait(timeOut*1000);
} catch (InterruptedException e) {
}
uti.knownTransactionContexts.remove(id);
if (!finished) {
if (consultant != null) {
consultant.setImportStatus(Consultant.IMPORT_TIMED_OUT);
}
log.warn("Transaction with id=" + id + " is timed out after "
+ timeOut + " seconds.");
}
}
}
COM: <s> wait assynchronously for the transaction to time out </s>
|
funcom_train/19062006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void layoutEditorContainer() {
// update panel
editorScrollPane.getContentPane().removeAll();
editorScrollPane.getContentPane().add(
getCurrentEditor().getViewUIComponent(), BorderLayout.CENTER);
AccountItem item = (AccountItem) getAccountController().getView()
.getSelectedItem();
if (item.getIdentity().getSignature() != null)
editorScrollPane.getContentPane().add(signatureView,
BorderLayout.SOUTH);
editorScrollPane.getContentPane().validate();
}
COM: <s> used to update the panel that holds the editor viewer </s>
|
funcom_train/20077584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findLineToChange(int line, double[][] matrix) {
int numMaxZeros = -1;
int lineToChange = -1;
for (int i = 0; i < matrix.length; i++) {
if (i != line) {
if (matrix[i][line] != 0) {
int zeros = countZerosLine(i, matrix);
if (zeros > numMaxZeros) {
numMaxZeros = zeros;
lineToChange = i;
}
}
}
}
return lineToChange;
}
COM: <s> search for a line that can be swapped </s>
|
funcom_train/14035365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMetadataBasedTitle() {
String metadata;
for (MetadataElement elem : MetadataManager.getMetadataList(
getProjectId(), getType())) {
if (elem.isKeyField()) {
metadata = metadataRegistry.get(elem.getMetadataId());
if ((metadata != null) && (metadata.trim().length() > 0)) {
return metadata;
}
}
}
if (getId() == -1) {
return "New";
}
return String.valueOf(getId());
}
COM: <s> get the title as its defined in the metadata for an element </s>
|
funcom_train/34642961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRootViewId(int id) {
mRootView = (ViewGroup) inflater.inflate(id, null);
mTrack = (ViewGroup) mRootView.findViewById(R.id.tracks);
mArrowDown = (ImageView) mRootView.findViewById(R.id.arrow_down);
mArrowUp = (ImageView) mRootView.findViewById(R.id.arrow_up);
mScroller = (ScrollView) mRootView.findViewById(R.id.scroller);
setContentView(mRootView);
}
COM: <s> set root view </s>
|
funcom_train/48114153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean podcastDownloadCompleteUpdate(long rowId, String FilePath) {
ContentValues args = new ContentValues();
args.put(KEY_TYPE, EPISODE_OFFLINE);
args.put(KEY_LINK, FilePath);
return mDb.update(DATABASE_TABLE, args, KEY_ROWID + "=" + rowId, null) > 0;
}
COM: <s> move favorite to offline avsnitt </s>
|
funcom_train/31356658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String encodeByteArray(byte[] values) {
// Variables
StringBuffer encoding;
int index;
// Process each byte
encoding = new StringBuffer();
for (index = 0; index < values.length; index++) {
encoding.append(new Byte(values[index]).intValue());
if (index != values.length - 1) {
encoding.append(":");
} // if
} // for
return encoding.toString();
} // encodeByteArray()
COM: <s> encode a password byte array into a textual representation </s>
|
funcom_train/14094159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean convertDrag(final AWTEvent ae) {
if (!(m_pendingEvent instanceof AbstractMouseEventData)
|| !(ae instanceof MouseEvent)) {
return false;
}
MouseEvent me = (MouseEvent) ae;
if (me.getID() != MouseEvent.MOUSE_DRAGGED) {
return false;
}
m_pendingEvent = new DragEventData((JFCTestCase) null,
(AbstractMouseEventData) m_pendingEvent);
return true;
}
COM: <s> converts the event to a drag event if necessary </s>
|
funcom_train/3747036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SecuritySession login(UserDO user, String password) throws CausedByException {
checkPassword(user.getName(), password);
PicoContainer globalContainer = PicoContainerFactory.getGlobalContainer();
MutablePicoContainer sessionContainer = new DefaultPicoContainer(globalContainer);
SecuritySession session = new PlainTextSecuritySession(sessionContainer, user);
sessionContainer.registerComponentInstance(SecuritySession.class, session);
return session;
}
COM: <s> p login to an authentication server using the user name and password </s>
|
funcom_train/18515511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(final Composite parent) {
te = new MultiSessionPanel();
//te.setPanelType(MultiSessionPanel.TABLE_CONV_PANEL);
te.create(parent, SWT.NONE);
te.addConvSessionListener(this);
initConnection();
registerGlobalAction();
registerAccountChangeListener();
ac_save_file = new SaveToFileAction();
makeViewActions();
//hookContextMenu();
//hookDoubleClickAction();
contributeToActionBars();
if (memento != null)
restoreState(this.memento);
te.setPanelType(panelType);
updateUI();
}
COM: <s> this is a callback that will allow us to create the viewer and </s>
|
funcom_train/40443679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean epsilonEquals(AxisAngle4d a1, double epsilon) {
double diff;
diff = x - a1.x;
if ((diff < 0 ? -diff : diff) > epsilon)
return false;
diff = y - a1.y;
if ((diff < 0 ? -diff : diff) > epsilon)
return false;
diff = z - a1.z;
if ((diff < 0 ? -diff : diff) > epsilon)
return false;
diff = angle - a1.angle;
if ((diff < 0 ? -diff : diff) > epsilon)
return false;
return true;
}
COM: <s> returns true if the l infinite distance between this axis angle and </s>
|
funcom_train/13999295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPTables() {
if (pTables == null) {
GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.gridy = 0;
pTables = new JPanel();
pTables.setLayout(new GridBagLayout());
pTables.add(getPTableTop(), gridBagConstraints);
}
return pTables;
}
COM: <s> this method initializes p tables </s>
|
funcom_train/23332785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(String resourceName) throws Exception{
java.util.Properties props = new java.util.Properties();
java.net.URL url = ClassLoader.getSystemResource(resourceName); //"myprops.props"
props.load(url.openStream());
System.out.println(props);
}
COM: <s> loads properties from the classpath </s>
|
funcom_train/47864826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveConfig(final OutputStream out) throws IOException {
final OutputStreamWriter writer = new OutputStreamWriter(out);
try {
final Enumeration keys = params.keys();
final Enumeration values = params.elements();
while (keys.hasMoreElements()) {
final String key = (String) keys.nextElement();
final String value = (String) values.nextElement();
writer.write(key);
writer.write(' ');
writer.write(quoteValue(value));
writer.write('\n');
}
} finally {
writer.close();
out.close();
}
}
COM: <s> save the content of this config file back to a output stream </s>
|
funcom_train/41458920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getCreationTime() {
calendar.set(Calendar.YEAR, 1904);
calendar.set(Calendar.MONTH, Calendar.JANUARY);
calendar.set(Calendar.DATE, 1);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.roll(Calendar.SECOND, (int) creationTime);
return calendar.getTime();
}
COM: <s> gets the creation time of this presentation </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.