__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/27866903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkField(JComponent field, String val, String mesg) {
if (val.equals("")) {
MessageBox mbox = new MessageBox(app, "Cannot proceed", mesg);
mbox.setVisible(true);
field.grabFocus();
return false;
}
else {
return true;
}
}
COM: <s> checks that the field is filled in </s>
|
funcom_train/14450553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void acceptRuntime(PackageInfoVisitor visitor) {
for (Iterator<String> iter = new TreeSet<String>(packageInfoMap.keySet()).iterator(); iter.hasNext();) {
String title = (String) iter.next();
PackageInfo packageInfo = (PackageInfo)packageInfoMap.get(title);
packageInfo.accept(visitor);
}
}
COM: <s> entry point for the visitor of this class </s>
|
funcom_train/1097137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected URL unpackDeployment(URL aFileUrl) {
try {
return getUnpackedDeploymentStager().deploy(aFileUrl);
} catch (IOException ae) {
sLog.error(
MessageFormat.format(
AeMessages.getString("AeDeploymentFileHandler.ERROR_3"), new Object[] { aFileUrl.getFile() }), ae); //$NON-NLS-1$
return null;
}
}
COM: <s> unpacks the file deployment in the staging directory </s>
|
funcom_train/43590380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel11() {
if (jPanel11 == null) {
summaryTextLabel2 = new JLabel();
summaryTextLabel2.setHorizontalAlignment(SwingConstants.CENTER);
summaryTextLabel2.setText("Logged in as Nobody");
summaryTextLabel2.setHorizontalTextPosition(SwingConstants.CENTER);
jPanel11 = new JPanel();
jPanel11.setLayout(new GridBagLayout());
jPanel11.setPreferredSize(new Dimension(300, 16));
jPanel11.add(summaryTextLabel2, new GridBagConstraints());
}
return jPanel11;
}
COM: <s> this method initializes j panel11 </s>
|
funcom_train/5507151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(Writer writer) {
if (writer == null) { throw new NullPointerException("writer was null"); }
PrintWriter output = new PrintWriter(writer);
for (int i=0, count=_data.count(); i<count; i++) {
output.println(_data.get(i).toString());
}
}
COM: <s> writes this data writers data to the specified writer </s>
|
funcom_train/23932257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createButtonsForButtonBar(Composite parent) {
//Messages
buttonProceed=createButton(parent
, IDialogConstants.PROCEED_ID
, Messages.JdbcAreaDialog_proceed, false);
//Cancel
Button b=createButton(parent,
IDialogConstants.CANCEL_ID
, Messages.JdbcAreaDialog_cancel, true);
Image img=PlatformUI.getWorkbench().getSharedImages()
.getImage(ISharedImages.IMG_TOOL_DELETE);
b.setImage(img);
}
COM: <s> creates the buttons for the button bar </s>
|
funcom_train/41728221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SmsPopupDbAdapter open(boolean readOnly) throws SQLException {
if (mDbHelper == null) {
Log.v("Opened database");
mDbHelper = new DatabaseHelper(context);
if (readOnly) {
mDb = mDbHelper.getReadableDatabase();
} else {
mDb = mDbHelper.getWritableDatabase();
}
}
return this;
}
COM: <s> open the contacts database </s>
|
funcom_train/45916394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readFrame(int index, int[] pixels) throws IOException {
raf.seek(8 + index * width * height * 4);
raf.readFully(data);
for (int i = 0; i < data.length / 4; i++) {
for (int j = 0; j < 4; j++) {
pixels[i] = (pixels[i] << 8) | (data[i * 4 + j] & 0xFF);
}
}
}
COM: <s> read the indexth frame </s>
|
funcom_train/20241346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdCancelGastosReceitas() {
if (cmdCancelGastosReceitas == null) {//GEN-END:|224-getter|0|224-preInit
// write pre-init user code here
cmdCancelGastosReceitas = new Command("Cancel", Command.CANCEL, 0);//GEN-LINE:|224-getter|1|224-postInit
// write post-init user code here
}//GEN-BEGIN:|224-getter|2|
return cmdCancelGastosReceitas;
}
COM: <s> returns an initiliazed instance of cmd cancel gastos receitas component </s>
|
funcom_train/20789582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CShape contains(double x, double y, double w, double h) {
CShape res = null;
reset();
while(hasNext()) {
CShape s = nextShape();
if(s.contains(x, y, w, h) != null) {
if(res == null) res = s;
else if(s.isAbove(res)) res = s;
}
}
return res;
}
COM: <s> returns the topmost cshape containing a given rectangle </s>
|
funcom_train/24259832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String asGML() {
StringBuffer returnStrBuf = new StringBuffer(GeoFeature.getGmlHeader());
String gmlString;
Set<String> keys = placeObjects.keySet();
Iterator<String> keyIter = keys.iterator();
while (keyIter.hasNext()) {
String key = keyIter.next();
gmlString = placeObjects.get(key).asGML();
if (gmlString != null)
returnStrBuf.append(gmlString);
}
returnStrBuf.append(GeoFeature.getGmlFooter());
return returnStrBuf.toString();
}
COM: <s> returns a gml document with gml for all the places who has it </s>
|
funcom_train/12157056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPseudoSelectors(PseudoStylePath pseudoPath) {
pseudoPath.accept(new PseudoStyleEntityVisitor() {
public void visit(StatefulPseudoClassSet pseudoClassSet) {
addPseudoClassSelector(pseudoClassSet);
}
public void visit(PseudoElement pseudoElement) {
addPseudoElementSelector(pseudoElement);
}
});
}
COM: <s> add a sequence of pseudo selectors which match the sequence of pseudo </s>
|
funcom_train/7642661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(byte[] buf, int off, int nbytes) {
// avoid int overflow, check null buf
if (off <= buf.length && nbytes >= 0 && off >= 0
&& buf.length - off >= nbytes) {
tbytes += nbytes;
crc = updateImpl(buf, off, nbytes, crc);
} else {
throw new ArrayIndexOutOfBoundsException();
}
}
COM: <s> updates this checksum with n bytes of data obtained from buffer </s>
|
funcom_train/22285052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PopupMenuItemWidget getItem(int index) {
if (index >= firstItem && index <= lastItem) {
return (PopupMenuItemWidget)container.content.widgets[index-firstItem];
} else {
String data[] = ((SparseDropDownListBoxWidget)user).getData(index, index);
return new PopupMenuItemWidget(data[0]);
}
}
COM: <s> get the item with the given index </s>
|
funcom_train/44217833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
byte[] b = new byte[256];
int n = 0;
while(reader != null && n >= 0) try {
n = read(b);
/* drop the bytes into the sink :) */
} catch(IOException e) {
reader = null;
break;
}
}
COM: <s> continuously read from our back end and drop the data </s>
|
funcom_train/47677449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isRepeatingXmlInstance(StringBuffer p_rawMessage, int[] p_previousTagPosition, int[] p_currentTagPosition) {
if ((p_previousTagPosition == null) || (this.isEmptyValue(p_previousTagPosition))) {
return false;
}
return compareTagNames(p_rawMessage, p_previousTagPosition, p_currentTagPosition);
}
COM: <s> indicates if the current tag name corresponds to the last one and </s>
|
funcom_train/38538540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnionWithIntersectScenario2() {
try {
initVarsScenario2();
gac.addConstraint(new EqIntersection<Integer>(x, y, intersect));
gac.addConstraint(new EqUnion<Integer>(x, y, z, intersect));
// propagation should fail
gac.propagate();
fail("propagation should fail");
}
catch(PropagationFailureException propx) {}
}
COM: <s> tests union with intersection to further reduce x and y </s>
|
funcom_train/32794102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void mapClassToTable(ModelClass mc) {
ArrayList tabList = new ArrayList();
String className = getClassName(mc);
tables.add(new Table(getTableName(className)));
tabList.add(getTableName(className));
classesToTables.put(className, tabList);
}
COM: <s> maps one class to one table </s>
|
funcom_train/10505437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ChannelSftp getChannelSftp(Session session) throws IOException {
ChannelSftp channel = null;
Entry entry = getCacheEntry(session);
if (entry != null) {
channel = entry.getChannelSftp();
if (channel != null && !channel.isConnected()) {
entry.releaseChannelSftp();
channel = null;
}
}
return channel;
}
COM: <s> retrieves an sftp channel from the cache </s>
|
funcom_train/27843018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startProgress() {
if (task != null) {
task.cancel();
}
task =
new TimerTask() {
public void run() {
getDefaultParentWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
}
};
progressStartTimer.schedule(task, PROGRESS_START_DELAY);
}
COM: <s> start a progress indicator to notify the user that a long operation is </s>
|
funcom_train/8097819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean redundant (int[][] conjunctions, int j, int[] iterIndices) {
for (int i=1; i < iterIndices.length; i++) {
if (conjunctions[j][i-1] == conjunctions[j][i] && iterIndices[i] <= iterIndices[i-1])
return true;
}
return false;
}
COM: <s> is the current feature redundant the current feature is </s>
|
funcom_train/44717140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document getDocumentAsResource(String resource) throws JDOMException {
s_log.warn("Loading " + resource);
InputStream is = getClass().getClassLoader().getResourceAsStream(resource);
if( null == is ) {
throw new JDOMException("Couldn't find test definition file: " + resource);
}
Document doc = importDocument(is, resource);
return doc;
}
COM: <s> imports a document </s>
|
funcom_train/15731943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
if (output.getText().length() == 0) {
StringWriter wr = new StringWriter();
throwable.printStackTrace(new PrintWriter(wr, true));
output.setText(wr.toString());
}
output.getCaret().setDot(0);
output.requestFocus();
}
COM: <s> shows the exception stacktrace in the output text area moving the focus </s>
|
funcom_train/27786359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TradingDate previous(int days) {
Calendar date = toCalendar();
for(int i = 0; i < days; i++) {
// Take 1 day or more to skip weekends as necessary
do {
date.add(Calendar.DAY_OF_WEEK, -1);
} while(date.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY ||
date.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY);
}
// Create new date
return new TradingDate(date);
}
COM: <s> create a new date which is the specified number of trading days </s>
|
funcom_train/20044932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _queryContentProviders() {
executeMethod("registerContentProvider()");
ContentProviderInfo[] providersInfo = oObj.queryContentProviders();
// verifying that the number of providers increased by 1
tRes.tested("queryContentProviders()",
providersInfo.length == initialProvidersInfo.length + 1);
}
COM: <s> it calls the method after registering providers and compares </s>
|
funcom_train/15408994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSql(SpiExpressionRequest request) {
if (!list.isEmpty()) {
request.append("(");
for (int i = 0; i < list.size(); i++) {
SpiExpression item = list.get(i);
if (i > 0) {
request.append(" and ");
}
item.addSql(request);
}
request.append(") ");
}
}
COM: <s> generates and adds the sql to the request </s>
|
funcom_train/8528348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeSpine() {
Element spine = (Element) XPathUtils.selectSingleNode(opf.getDocumentElement(), "/opf:package/opf:spine", mNsc);
for (Iterator<String> it = ids.iterator(); it.hasNext(); ) {
Element itemref = opf.createElementNS(opfNamespaceURI, "itemref");
itemref.setAttribute("idref", it.next());
spine.appendChild(itemref);
}
}
COM: <s> constructs the spine </s>
|
funcom_train/40360346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLoadFromFile() throws Exception {
File propFile = new File(baseDirectory, NAME);
assertFalse(propFile.exists());
FileOutputStream fos = new FileOutputStream(propFile);
fos.write(PROPERTIES.getBytes(PropertiesUtils.PROPERTIES_ENCODING));
fos.close();
assertTrue(propFile.exists());
Properties props = PropertiesUtils.loadFromFile(propFile);
compareProperties(expected, props);
}
COM: <s> test load from file </s>
|
funcom_train/13683056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CmdButton getCreateDB() {
if (createDB == null) {
createDB = new CmdButton("Create", "Create New Diagram/DataBase", med);
createDB.setCommand(new CreateDiagramCmd(this, med));
createDB.addActionListener(this);
//createDB.setText("Create");
createDB.setLocation(new java.awt.Point(47,187));
createDB.setSize(new java.awt.Dimension(80,20));
createDB.setActionCommand("createDiagram");
}
return createDB;
}
COM: <s> this method initializes create db </s>
|
funcom_train/50335311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean load(Element element) {
// put it together
String sys = getSystemName(element);
String uname = getUserName(element);
DccSignalHead h;
if (uname == null)
h = new DccSignalHead(sys);
else
h = new DccSignalHead(sys, uname);
loadCommon(h, element);
InstanceManager.signalHeadManagerInstance().register(h);
return true;
}
COM: <s> create a ls dec signal head </s>
|
funcom_train/40226270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFieldContainerStyle(final Widget w, final String style) {
final Widget p = w.getParent();
if(p.getStyleName() == null || p.getStyleName().indexOf(Styles.FIELD_CONTAINER) < 0) {
throw new IllegalArgumentException("Not a field contained widget");
}
p.addStyleName(style);
}
COM: <s> adds the given style name to the associated field container widget that </s>
|
funcom_train/3411954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printAll(Graphics g) {
if (isShowing()) {
GraphicsCallback.PeerPrintCallback.getInstance().
runOneComponent(this, new Rectangle(0, 0, width, height),
g, g.getClip(),
GraphicsCallback.LIGHTWEIGHTS |
GraphicsCallback.HEAVYWEIGHTS);
}
}
COM: <s> prints this component and all of its subcomponents </s>
|
funcom_train/572996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFrom(ArrayList list) {
String from2 = new String( from );
for (Iterator iter = list.iterator(); iter.hasNext();) {
String table1 = (String) iter.next();
if( from2.toLowerCase().indexOf(table1.toLowerCase() ) == -1){
from2 += _COMA_ + table1; //$NON-NLS-1$
}
}
return from2;
}
COM: <s> basic from plus any table if not already used </s>
|
funcom_train/27834964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMode(int mode) {
if (mode == FormEditor.DESIGNMODE) {
_parentWindow.getFormData().setDataChanged(true);
setButtonsEnabled(_elements);
_btnModeChange.setText("view mode");
}
if (mode == FormEditor.VIEWMODE) {
setButtonsDisabled(_elements);
_btnModeChange.setText("design mode");
}
}
COM: <s> sets the mode for the code tool window code in conjunction with mode </s>
|
funcom_train/13479592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public V put(K key, V referent) {
free();
SignedReference<V, K> newref = new SignedReference<V, K>(referent,
queue);
newref.setSign(key);
SignedReference<V, K> oldref = map.put(key, newref);
return oldref != null ? oldref.get() : null;
}
COM: <s> associates the specified referent with the specified key in this map </s>
|
funcom_train/36525312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CurrentDomain makeNewDomain(CurrentDomain dm){
boolean hasVals = false;
CurrentDomain dm2 = new ArrayCurrentDomain(domain);
boolean newDm = true;
for (byte i=0; i<domain; i++){
if (dm.isInDomain(i)){
if(newDm){
hasVals = true;
dm.remove(i);
dm2.insert(i);
newDm = !newDm;
} else {
dm2.remove(i);
newDm = !newDm;
}
} else {
dm2.remove(i);
}
}
if (hasVals) return dm2; else return null;
}
COM: <s> creates a new domain for splitting takes a given domain and </s>
|
funcom_train/44505671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDelAnswer() throws Exception {
int size1000 = getAnswerDAO().getAnswers(question1000).size();
int size1001 = getAnswerDAO().getAnswers(question1001).size();
// de la pregunta 1000
getAnswerDAO().delAnswer(answer1000);
getAnswerDAO().delAnswer(answer1001);
// de la pregunta 1001
getAnswerDAO().delAnswer(answer1004);
Assert.assertEquals(size1000 - 2, getAnswerDAO().getAnswers(question1000).size());
Assert.assertEquals(size1001 - 1, getAnswerDAO().getAnswers(question1001).size());
}
COM: <s> prueba de borrado </s>
|
funcom_train/39185742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void convertToGray32() {
if (!(type==ImagePlus.GRAY8 || type==ImagePlus.GRAY16))
throw new IllegalArgumentException("Unsupported conversion");
ImageProcessor ip = imp.getProcessor();
imp.trimProcessor();
Calibration cal = imp.getCalibration();
ip.setCalibrationTable(cal.getCTable());
imp.setProcessor(null, ip.convertToFloat());
cal.disableDensityCalibration();
}
COM: <s> converts this image plus to 32 bit grayscale </s>
|
funcom_train/5341265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object other) {
ResultSpeed o = (ResultSpeed)other;
int diff = this.speed - (o).speed;
if(diff == 0)
return 0;
else {
int strDiff = description.compareTo(o.description);
if(strDiff == 0)
return 0;
else
return diff;
}
}
COM: <s> determines if these are the same visible speeds </s>
|
funcom_train/5343011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getInitializedConnectionsMatchLocale(String loc) {
List matches = new LinkedList();
for(Iterator itr= _initializedConnections.iterator();
itr.hasNext();) {
Connection conn = (Connection)itr.next();
if(loc.equals(conn.getLocalePref()))
matches.add(conn);
}
return matches;
}
COM: <s> return a list of initialized connection that matches the parameter </s>
|
funcom_train/28741217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FungenSampleInfo getSampleInfoById(Integer id) throws SimsException {
//String errMsg = clsName + ".getSampleInfoById(): ";
FungenSampleLocal local;
FungenSampleInfo info;
try {
local = this.getSampleLocalById(id);
info = (FungenSampleInfo) local.getSampleInfo();
}
catch (RuntimeException e) {
//Propagate.
throw e;
}
return info;
}
COM: <s> get fungen sample info object by id </s>
|
funcom_train/26277747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LgTransferQueueItem getQueueItemAt(int i_index) throws QueueIndexBoundsExc {
LgTransferQueueItem item=null;
//get item
try { item=(LgTransferQueueItem)this._itemList.get(i_index); }
//there seems to be no item
catch(IndexOutOfBoundsException e) {
Integer[] index={ new Integer(i_index) };
throw new QueueIndexBoundsExc("There is no item at index {0}",index);
}
return item;
}
COM: <s> returns an queue item at a given index </s>
|
funcom_train/26380914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertMenuActionPerformed(java.awt.event.ActionEvent evt) {
ExtraDescriptionDialog extraDescriptionDialog = new ExtraDescriptionDialog(null, _parentPanel);
extraDescriptionDialog.setVisible(true);
if (extraDescriptionDialog.okPressed()) {
ExtraDescription newExtraDescription = extraDescriptionDialog.getExtraDescription();
_extraDescriptions.addExtraDescription(newExtraDescription);
refreshList();
}
extraDescriptionDialog.kill();
}
COM: <s> handles the insert menu item action </s>
|
funcom_train/43999216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected NameManager getNameManager() {
if(getParent() != null) {
if(_nameManager != null)
_nameManager = null;
return _parent.getNameManager();
} else {
if(_nameManager == null)
_nameManager = new NameManager();
return _nameManager;
}
}
COM: <s> get the name manager used to keep this objects name unique </s>
|
funcom_train/24493138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillDatabaseCompletely() throws NoReviewSourceFolderException {
PluginLogger.log(this.getClass().toString(), "fillDatabaseCompletely",
"Clear all models and reload everything from file (including closed reviews)");
// Clear old values
this.clearAllModels();
// Fill in new values
loadAllReviews();
loadAllComment();
}
COM: <s> fills the comment model with all found files </s>
|
funcom_train/3878668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Action removeAction(String name) {
// TODO: create registry of always run after relations to automatically
// resolve action references?
Action a = getAction(name);
if ( a != null ) {
a.cancel();
m_actions.remove(name);
a.setVisualization(null);
}
return a;
}
COM: <s> remove a data processing action registered with this visualization </s>
|
funcom_train/1101922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load() throws IOException{
if(GraphicUtil.IMAGE_TYPE.getTypeFromName(handle.getName()) == null){
throw new IOException("image type is not supported : " + handle.getAbsolutePath());
}
FWLogger.info("loading : " + handle.getAbsolutePath());
texture = GraphicUtil.loadTexture(handle.getAbsolutePath());
}
COM: <s> loads the image resource from disk </s>
|
funcom_train/20440081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDeToPetPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ESMFDELayout_deToPet_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ESMFDELayout_deToPet_feature", "_UI_ESMFDELayout_type"),
ESMFPackage.Literals.ESMF_DE_LAYOUT__DE_TO_PET,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the de to pet feature </s>
|
funcom_train/38542728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTableHeader(JTableHeader header) {
if (getTableHeader() != null) {
getTableHeader().removeMouseListener(this.headerColumnListener);
}
super.setTableHeader(header);
if (getTableHeader() != null) {
getTableHeader().addMouseListener(this.headerColumnListener);
}
}
COM: <s> this method enables to set the jtable header </s>
|
funcom_train/10798477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String trimDoubleQuotes(String str) {
if (str == null || str.length() <= 1)
return str;
if (str.startsWith("\"") && str.endsWith("\""))
str = str.substring(1, str.length() - 1);
return str;
}
COM: <s> trim off leading and trailing double quotes </s>
|
funcom_train/49409101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetGetId() {
System.out.println("getId");
DIDL instance = new DIDL();
String expResult = "uoas-sa-sa-sa0012912-1234";
instance.setId(expResult);
String result = instance.getId();
assertEquals(expResult, result);
}
COM: <s> test of get id method of class info </s>
|
funcom_train/964883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addGriddedGrowingButtons(JButton[] buttons) {
int length = buttons.length;
for (int i = 0; i < length; i++) {
int index = leftToRight ? i : length -1 - i;
addGriddedGrowing(buttons[index]);
if (i < buttons.length - 1)
addRelatedGap();
}
}
COM: <s> adds a sequence of gridded buttons that grow </s>
|
funcom_train/3399983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getBaseDir(String baseDir) throws SAXException {
File dir = new File(baseDir);
if (dir.exists()) {
return dir;
} else {
SAXParseException e = new SAXParseException(
Messages.BASEDIR_DOESNT_EXIST.format(dir.getAbsolutePath()),
getLocator());
errorHandler.error(e);
throw e; // we can't recover from this error
}
}
COM: <s> this will check if the base dir provided by the user </s>
|
funcom_train/20043791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _setStorage() {
if (!oObj.hasStorage())
oObj.setStorage(xStore);
else
log.println("For initializing this object, the setStorage() method was already called at the object.");
tRes.tested("setStorage()", true);
}
COM: <s> set the object relation code xuiconfiguration storage </s>
|
funcom_train/19095449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getNode(Document doc, String XPathQuery){
Node n;
try{
NodeIterator nl = XPathAPI.selectNodeIterator(doc, XPathQuery);
n = XPathAPI.selectSingleNode(doc, XPathQuery);
return n;
}catch(Exception e){
System.out.println( " Node Iterator: " + e.getMessage());
return null;
}
}
COM: <s> returns an xml node object from the xpath query </s>
|
funcom_train/978021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEntrarZero() {
System.out.println("entrarZero");
Calculadora instance = new Calculadora();
String expResult = "0.0";
String result = instance.entrarZero();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
}
COM: <s> test of entrar zero method of class calculadora </s>
|
funcom_train/17175144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String consultEffectiveRent() {
Iterator<Rent> it = rents.iterator();
String s = new String();
Collections.sort(rents);
while (it.hasNext()) {
Rent r = it.next();
Calendar c = Calendar.getInstance();
if (r.getFinalDate().compareTo(c.getTime()) > 0) {
s += r.getClient().getName() + " " + r.getVehicle().getPlate()
+ System.getProperty("line");
}
}
return s;
}
COM: <s> consultation for the effective rents of the system </s>
|
funcom_train/12561521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int processKey(int keyCode, boolean longPress) {
try {
return currentMode.processKey(keyCode, longPress);
} catch (Throwable t) {
// Since InputModes are pluggable, we'll catch any possible
// Throwable when calling into one
// IMPL_NOTE : log the throwable
}
return InputMode.KEYCODE_NONE;
}
COM: <s> this method abstracts key processing to a single call from </s>
|
funcom_train/22178816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColorData(ColorData colorData, Shell shell) {
setObject(new Color(shell.getDisplay(), colorData.getIntRed(), colorData.getIntGreen(), colorData.getIntBlue()));
setFilter(colorData.getFilter());
setTransmit(colorData.getTransmit());
setType(colorData.getType());
}
COM: <s> initializes this code color flow entry code using the given </s>
|
funcom_train/25138805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ARINCLayer resetWidgetsList(int layerId) {
ARINCLayer _layer = channel.getLayer(layerId);
if (_layer == null) {
return null;
} else {
appliID = _layer.getAppliID();
widgetsbyID = applis.getLayer(null, appliID, layerId).getARINCWidgetsByID();
if (widgetsbyID.isEmpty()) {
return null;
} else {
return _layer;
}
}
}
COM: <s> check if the layer that is defined in the command really exist </s>
|
funcom_train/14274915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Calendar getVFSFileDate(FileReference file, char dateType) throws ConduitHandlerException, NotConnectedException {
try {
return DLP_Date.seconds2Calendar(jHotSync.getVFSFileDate(file, dateType));
} catch (DLPFunctionCallException e) {
throw new ConduitHandlerException(e.toString(), e);
}
} // end-method
COM: <s> retrieves a file date for the specified file </s>
|
funcom_train/13185621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void attemptEditChartProperties() {
ChartEditor editor = ChartEditorManager.getChartEditor(this.chart);
int result = JOptionPane.showConfirmDialog(this, editor,
localizationResources.getString("Chart_Properties"),
JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
if (result == JOptionPane.OK_OPTION) {
editor.updateChart(this.chart);
}
}
COM: <s> displays a dialog that allows the user to edit the properties for the </s>
|
funcom_train/41508748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFullMessage() {
SVNErrorMessage err = this;
StringBuffer buffer = new StringBuffer();
while (err != null) {
buffer.append(err.getMessage());
if (err.hasChildErrorMessage()) {
buffer.append('\n');
}
err = err.getChildErrorMessage();
}
return buffer.toString();
}
COM: <s> gets a string representation of the entire stack trace of </s>
|
funcom_train/40860238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRangeQuery() throws Exception {
TermRangeQuery rq = new TermRangeQuery(
"sorter", "b", "d", true, true);
Query filteredquery = new FilteredQuery(rq, filter);
ScoreDoc[] hits = searcher.search(filteredquery, null, 1000).scoreDocs;
assertEquals(2, hits.length);
QueryUtils.check(filteredquery,searcher);
}
COM: <s> this tests filtered querys rewrite correctness </s>
|
funcom_train/12539958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() throws ExpectJException {
System.out.println("Process Started at:" + new Date());
processThread = new Thread(this);
try {
process = Runtime.getRuntime().exec(commandLine);
}
catch (Exception exp) {
throw new ExpectJException("Error in ProcessThread.start", exp);
}
processThread.start();
}
COM: <s> this method spawns the thread and runs the process within the </s>
|
funcom_train/33416169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pulse() {
if (isDying) return;
counter.addCounter(resource.sustain.value);
for (final BlipImage im : images) {
im.pulse(resource.sustain.value
* Sequencer.getSequencer().getTickLength());
}
if (Conf.SOUND_ENABLED) {
try {
audioTrack.play();
} catch (Exception e) {
// TODO: handle exception
}
}
if (resource.life.value > 0) {
pulseCount++;
if (pulseCount > resource.life.value) {
die();
}
}
}
COM: <s> queues this blip for a pulse on the next tick update </s>
|
funcom_train/22897607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIdx(int uid) {
int idx = -1;
for (int i = 0; i < this.shownUsers.size(); i++) {
if (uid == this.shownUsers.get(i).first().intValue()) {
idx = i;
break;
}
}
return idx;
}
COM: <s> returns the index of a given user </s>
|
funcom_train/34620678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getOperationIndexForGuiIndex(int guiIndex) {
int count = operationChain.getOperationCount();
int currentGuiCount = 0;
for (int i = 0; i < count; ++i) {
Operation op = operationChain.getOperation(i);
OperationGui operationGui = extensionService.getOperationGui(op);
if (operationGui != null) {//found a gui
currentGuiCount++;
}
//is this the gui for which we search the operation?
if (currentGuiCount - 1 == guiIndex) {
return i;
}
}
return -1;
}
COM: <s> returns for a certain gui tab i </s>
|
funcom_train/22833754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPacketAsString(){
DatagramPacket packet = getPacket();
if( packet == null ){
return null;
} else {
String s = new String(
packet.getData(),
packet.getOffset(),
packet.getLength() );
return s;
} // end else
}
COM: <s> returns the data in the most recently received </s>
|
funcom_train/45761411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XUserInputInterception getUII(XModel xModel){
XController xController = xModel.getCurrentController();
XUserInputInterception xUII = (XUserInputInterception) UnoRuntime.queryInterface(
XUserInputInterception.class, xController);
if (xUII == null) {
failed("could not get XUserInputInterception from XContoller", true);
}
return xUII;
}
COM: <s> returns the code xuser input interception code from the code xmdoel code </s>
|
funcom_train/7758336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void longIntoBytes(int offset, long value) {
if((offset < 0) || ((offset + 8) > IDFormat.IdByteArraySize))
throw new IndexOutOfBoundsException("Bad offset");
for(int eachByte = 0; eachByte < 8; eachByte ++)
bytes[eachByte + offset] = (byte) (value >> ((7 - eachByte) * 8L));
hashIsCached = false;
}
COM: <s> insert a long value into the byte array </s>
|
funcom_train/27944777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AllocThreadMethodRef getAllocThreadMethod(MethodRef peer) {
ListIterator itr = getAllocThreadMethods().listIterator();
AllocThreadMethodRef obj;
while (itr.hasNext()) {
obj = (AllocThreadMethodRef) itr.next();
if ( obj.getMethod().equals( peer ) )
return obj;
}
return null;
}
COM: <s> returns statistic data for given method that was invoked in this thread </s>
|
funcom_train/17004951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SubscriptionEntry deleteEntry(String identifier) {
if (identifier == null) {
return null;
}
Object entry = subscriptions.remove(identifier);
if (entry != null) {
System.out.println(moduleName + "Deleted entry corresponding to [" +
identifier + "]");
return (SubscriptionEntry) entry;
}
return null;
}
COM: <s> deletes the entry corresponding to the specified identifier </s>
|
funcom_train/41765780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) {
g.fillArc(xTranslate + x, yTranslate + y, width, height, startAngle, arcAngle);
}
COM: <s> fills a circular or eliptical arc based on the given angles and bounding </s>
|
funcom_train/38741311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteQuery(Long queryId){
try{
return port.deleteQuery(queryId, session.getSessionId());
}catch(Exception ex){
this.error = (ex instanceof SOAPFaultException)? ex.getMessage() : ex.getClass().getSimpleName()+": "+ ex.getMessage();
return false;
}
}
COM: <s> call to remote delete query method </s>
|
funcom_train/4026095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void command_loadclasspath(String[] args) throws IOException {
if( args.length == 0 || args.length % 2 != 0 ) {
throw new IllegalArgumentException("couples <library_name> <library_location> must be specified.");
}
loadLibraries(args, System.out);
}
COM: <s> command to load a classpath on the active model </s>
|
funcom_train/39170022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String tokenize(String in){
String toReturn="";
String[] toks = tokenizer.tokenize(in);
for(int x=0;x<toks.length;x++){
toReturn+=toks[x]+' ';
}
return toReturn.substring(0,toReturn.length()-1);
}
COM: <s> returns a tokenized version of the passed string </s>
|
funcom_train/39984631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ITagPlugin getTagPlugin(String tagNamespace) throws Exception {
ITagPlugin plugin = null;
try {
plugin = plugins.get(tagNamespace);
} catch (Exception e) {
e.printStackTrace();
plugin = null;
} finally {
if (plugin == null) {
throw new Exception("Cannot find a plugin associated to the namespace " + tagNamespace);
}
}
return plugin;
}
COM: <s> this method is used to retrieve the tag plugin that is sassociated to </s>
|
funcom_train/49009396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton9() {
if (jButton9 == null) {
jButton9 = new JButton();
jButton9.setText("规格化");
jButton9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
Filter filter = new NormalizeFilter();
doFilter(filter, true);
}
});
}
return jButton9;
}
COM: <s> this method initializes j button9 </s>
|
funcom_train/11102696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void push(Position position) {
if (position == null) {
throw new IllegalArgumentException();
}
Object data = position.getData();
if ((data != null) && (data instanceof DialogContextListener)) {
addDialogContextListener((DialogContextListener) data);
}
synchronized (positions) {
positions.add(position);
}
}
COM: <s> p push the specified code position code making it the currently </s>
|
funcom_train/17395756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void waitFor(Map<? extends Job, Integer> jobsToWaitFor) {
while ((running) && (jobsToWaitFor.size() > 0)) {
runNextJob();
synchronized (jobsToWaitFor) {
Job j = jobsToWaitFor.keySet().iterator().next();
if (j.runId() != jobsToWaitFor.get(j))
jobsToWaitFor.remove(j);
}
}
}
COM: <s> runs other jobs while waiting for the requested jobs to finish </s>
|
funcom_train/13964417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void batchSizeUpdated() {
String batchSizeString = (String) context().request().formValueForKey("batchSize");
int batchSizeIndex = Integer.parseInt(batchSizeString);
configurationData().setObjectForKey(batchSizes().objectAtIndex(batchSizeIndex), AjaxGrid.BATCH_SIZE);
// Keep display group in synch to avoid display update issues
displayGroup().setNumberOfObjectsPerBatch(ERXValueUtilities.intValue(currentBatchSize()));
}
COM: <s> ajax action method for updates to batch size </s>
|
funcom_train/34289156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExtendedIterator listAllOntModel() {
// Get all Model in DB
ExtendedIterator iter = maker.listModels();
// Filter models to return only OntModels
iter = iter.filterKeep(new Filter() {
@Override
public boolean accept(Object obj) {
boolean ret = false;
String ontModelName = (String) obj;
if (ontModelName.startsWith(ONTMODEL_PREFIX)) {
ret = true;
} else {
ret = false;
}
return ret;
}
});
return iter;
}
COM: <s> list all ont models </s>
|
funcom_train/51254255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startPunching(IoSession session, URI localURI, URI remoteURI) {
this.acceptor=(DatagramAcceptor)session.getService();
this.outgoingSession=session;
this.localSocketAddress=(InetSocketAddress)session.getLocalAddress();
this.remoteSocketAddress=(InetSocketAddress)session.getRemoteAddress();
this.localURI=localURI;
this.remoteURI=remoteURI;
scheduler.schedule(new ChatTask(),0, JOB_INTERVAL);
}
COM: <s> starts the timer to punch holes and to keep alive connections </s>
|
funcom_train/14226803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCauseCode(int causeCode) throws FrameException {
try {
ByteBuffer byteBuffer = new ByteBuffer(ByteBuffer.SIZE_16BITS);
byteBuffer.put16bits(causeCode);
infoElements.put(InfoElement.CAUSECODE, byteBuffer.getBuffer());
} catch (Exception e) {
throw new FrameException(e);
}
}
COM: <s> sets the cause code </s>
|
funcom_train/44865618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initMenu() {
// Add listener to repopulate the menu each time
// it is shown because of dynamic history list
menu.addMenuListener(new MenuAdapter() {
public void menuShown(MenuEvent e) {
Menu m = (Menu)e.widget;
MenuItem[] items = m.getItems();
for (int i=0; i < items.length; i++) {
items[i].dispose();
}
fillMenu(m);
}
});
}
COM: <s> creates the menu for the action </s>
|
funcom_train/17029936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDataContainerGroup(DataContainerGroup dataContainerGroup) {
// If null was passed in, just return
if (dataContainerGroup == null)
return;
// Make sure collection exists
if (this.dataContainerGroups == null)
this.dataContainerGroups = new HashSet<DataContainerGroup>();
// Now add the DataContainerGroup to the collection
if (!this.dataContainerGroups.contains(dataContainerGroup)) {
this.dataContainerGroups.add(dataContainerGroup);
}
}
COM: <s> this method adds the given code data container group code to the </s>
|
funcom_train/36012513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateFilterValue(String filterName, String key) {
String phaseName = this.phaseCombo.getText();
FilterPhase filterPhase = this.phaseNameFilterPhaseMap.get(phaseName);
FilterEntry entry = filterPhase.getFilterEntry(filterName);
entry.setKey(key);
}
COM: <s> updates the filter value </s>
|
funcom_train/40728948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AnnotationNode annotation(String annotation) {
this.attr(ANNOTATION, annotation);
String[] kc = AnnotationParser.extractKeyAndContent(annotation);
this.attr(ANNOTATION_KEY, kc[0]);
this.attr(ANNOTATION_CONTENT, kc[1]);
return this;
}
COM: <s> set the annotation of this node </s>
|
funcom_train/13880457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map createMapMarker(int line, int severity, String message, int charStart, int charEnd){
Map map = new HashMap();
map.put(ATTRIBUTE_OWNER, QvtparserPlugin.ID);
map.put(IMarker.LINE_NUMBER, new Integer(line));
map.put(IMarker.SEVERITY, new Integer(severity));
map.put(IMarker.MESSAGE, message);
map.put(IMarker.CHAR_START, new Integer(charStart));
map.put(IMarker.CHAR_END, new Integer(charEnd));
return map;
}
COM: <s> create a map which contains all attribute values for a marker </s>
|
funcom_train/38288267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateSizeForPage(Composite tile) {
// ensure the page container is large enough
Point delta = calculatePageSizeDelta(tile);
if (delta.x > 0 || delta.y > 0) {
// increase the size of the shell
Shell shell = getShell();
Point shellSize = shell.getSize();
setShellSize(shellSize.x + delta.x, shellSize.y + delta.y);
constrainShellSize();
}
}
COM: <s> computes the correct dialog size for the given page and resizes its shell </s>
|
funcom_train/21734419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Spatial buildModelSky() {
// Set up basic.
this.skyModel.setLocalScale(new Vector3f());
this.skyModel.setModelBound(new BoundingBox());
this.skyModel.updateModelBound();
this.skyModel.setIsCollidable(false);
// Build base sky motion.
this.setupRotation(this.cycle/2, this.cycle, this.skyModel);
// Set up the day and night textures.
this.setupTexture(this.daySky, this.nightSky, this.skyModel);
return this.skyModel;
}
COM: <s> build the base sky using pre generated model </s>
|
funcom_train/10532345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isSerializable() {
for (InterfaceType superIntf: _implDecl.getSuperinterfaces()) {
if (superIntf.toString().equals("java.io.Serializable")) {
return true;
}
}
// check to see if the superclass is serializable
return _superClass != null && _superClass.isSerializable();
}
COM: <s> does this control impl on one of it superclasses implement java </s>
|
funcom_train/10803720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File prepareWrite(File file) throws IOException {
File backup = Files.backup(file, false);
if (backup == null) {
File parent = file.getParentFile();
if (parent != null && !(AccessController.doPrivileged(
J2DoPrivHelper.existsAction(parent))).booleanValue())
AccessController.doPrivileged(
J2DoPrivHelper.mkdirsAction(parent));
}
return backup;
}
COM: <s> prepare to write to the given file </s>
|
funcom_train/43226102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void performBrickSubStyleTransform(BrickSubStyle brickSubStyle) {
gl.glPushMatrix();
gl.glTranslatef(brickSubStyle.getOffsetX(), brickSubStyle.getOffsetY(), brickSubStyle.getOffsetZ());
gl.glRotatef(brickSubStyle.getAngle(), brickSubStyle.getAngleX(), brickSubStyle.getAngleY(), brickSubStyle.getAngleZ());
}
COM: <s> perform jgl transform of brick sub style </s>
|
funcom_train/5546038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isOrderExists() {
// Get the shopping cart from the session
Object o = getSessionManager().getValue(SESSION_VALUE_SHOPPING_CART);
if(o==null)
return false;
_dsCart = null;
try{
_dsCart = (DataStore)o;
}catch(Exception ex){
MessageLog.writeErrorMessage("Exception in saveOrder()", ex, this);
displayErrorMessage("Error in the process. Please again try later.");
return false;
}
if( _dsCart==null || _dsCart.getRowCount()<1){
displayErrorMessage("Your shopping cart is empty");
return false;
}
return true;
}
COM: <s> this method checks if there is a orders datastore in the session </s>
|
funcom_train/43143632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCreateScript(DbType dbType) {
NodeList rootNode = (NodeList) read("/unikey/create/db", XPathConstants.NODESET);
String nodeValue = getNodeValue(rootNode, dbType.getName());
if (nodeValue == null) {
throw new UnsupportedDbException(dbType.getName() + " is not supported.");
}
return nodeValue;
}
COM: <s> to retrive the sql script for creating table </s>
|
funcom_train/28116798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void failed(String id, Throwable throwable) {
ExecutionListener[] listeners = getListeners(id);
if (listeners != null) {
for (int i = 0; i < listeners.length; ++i) {
listeners[i].failed(throwable);
}
} else {
log.debug("Application=" + id + " failed to start but no "
+ "listeners are registered", throwable);
}
}
COM: <s> notifies all registered listeners for an application that the </s>
|
funcom_train/17567945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void destroyDB() {
try {
//Closes all the statements.
enrollStmt.close();
clearDbStmt.close();
identifyStmt.close();
verifyStmt.close();
insertedIdStmt.close();
//Closes the connection.
dbConnection.close();
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> closes the connection to the database and frees any resources used </s>
|
funcom_train/37142313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void focusGained(FocusEvent e) {
if (e.isTemporary()) return;
if (e.getSource() == datePicker) {
// LOG.info("focusGained in ui " + e.getSource().getClass().getSimpleName() );
datePicker.getEditor().requestFocusInWindow();
}
}
COM: <s> issue 573 swingx f2 in table doesnt focus the editor </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.