__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/47519002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fixSpectraTableIndices() {
for (int row = 0; row < ((DefaultTableModel) selectedSpectraFilesJTable.getModel()).getRowCount(); row++) {
((DefaultTableModel) selectedSpectraFilesJTable.getModel()).setValueAt(new Integer(row + 1), row, 0);
}
}
COM: <s> fixes the indices in the spectra file table so that they are in </s>
|
funcom_train/5474940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextField1() {
if (jTextField1 == null) {
jTextField1 = new JTextField();
jTextField1.setBounds(new java.awt.Rectangle(261,385,85,21));
jTextField1.setEditable(false);
jTextField1.addFocusListener(new FocusAdapter(){
public void focusGained(FocusEvent e){
jTextField1.setBackground(color_getfocus);
}
public void focusLost(FocusEvent ev){
jTextField1.setBackground(color_lostfocus);
}
});
}
return jTextField1;
}
COM: <s> this method initializes j text field1 </s>
|
funcom_train/39949403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addLongValue(int field, int index, long value) {
synchronized (i2) {
int ind = (int)longvalues[0]*4+1;
// check that the array fits
int longvlen = longvalues.length;
if (ind+3 >= longvlen)
longvalues = adjustLongArray(longvalues, longvlen+4);
longvalues[ind] = field;
longvalues[ind+1] = index;
longvalues[ind+2] = 0;
longvalues[ind+3] = value;
// increment the number of fields
longvalues[0]++;
// mark item as modified
modified = true;
}
}
COM: <s> adds a value to the cached data </s>
|
funcom_train/29792388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateFlatListWithGroups2() {
List<String> l = new Vector<String>();
l.add("groupname2");
l.add("[email protected]");
List<String> result = ListBuilder.createFlatList(l);
// first group contains first contact item
assertEquals("[email protected]", result.get(0));
assertEquals("[email protected]", result.get(1));
assertEquals("[email protected]", result.get(2));
}
COM: <s> again but with a group containing two contact items </s>
|
funcom_train/15825653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidLabel(String label) {
if (label.indexOf(separator) < 0) {
return false;
}
try {
String suffix =
label.substring(
label.lastIndexOf(separator) + 1,
label.length());
Integer.parseInt(suffix);
return true;
} catch (NumberFormatException e) {
return false;
}
}
COM: <s> verify that the label specified is a valid label </s>
|
funcom_train/20306993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkRule(TriplePattern altHead, BaseFRule rule, Finder caches) {
Iterator it = caches.findWithContinuation(altHead, fdata);
while (it.hasNext()) {
Triple t = (Triple)it.next();
rule.bindAndFire(t, this);
}
}
COM: <s> run a single rule with the rewritten head against the data </s>
|
funcom_train/4531449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void merge(Path[] inFiles, Path outFile) throws IOException {
if (fs.exists(outFile)) {
throw new IOException("already exists: " + outFile);
}
RawKeyValueIterator r = merge(inFiles, false, outFile.getParent());
Writer writer = cloneFileAttributes(inFiles[0], outFile, null);
writeFile(r, writer);
writer.close();
}
COM: <s> merge the provided files </s>
|
funcom_train/330796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRangeMillis(long minimumMillis, long maximumMillis, boolean notify) {
scrollerData.minimumMillis = minimumMillis;
scrollerData.maximumMillis = maximumMillis;
// if (getValueMillis() < minimumMillis) {
// setValueMillis(scrollerData.minimumMillis);
// }
if (notify) {
rangesChangedF(getValueMillis());
}
else {
needsNotify = true;
}
}
COM: <s> set the range of the currently loaded data and optionally noitify other </s>
|
funcom_train/38865230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(int num) {
System.out.println("*** Group 55, Descriptive Letters");
for(int d=0; d<Nparms || d<num; d++) {
System.out.print(" "+dcodes[d]);
}
System.out.println();
}
COM: <s> display group 55 </s>
|
funcom_train/18349012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getConceptPropertyIndexMap() throws CapServiceException {
int index = 0;
HashMap hashMap = new HashMap();
List conceptProperties = ConceptProperty.getConceptProperties(this);
Iterator conceptPropertiesIterator = conceptProperties.iterator();
while (conceptPropertiesIterator.hasNext()) {
ConceptProperty conceptProperty =
(ConceptProperty) conceptPropertiesIterator.next();
hashMap.put(conceptProperty, FlyWeightManager.get(index++));
}
return hashMap;
}
COM: <s> return a java </s>
|
funcom_train/9043011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IndexRanking headMap(int count) {
IndexRanking head = new IndexRanking(comparator());
for (Map.Entry<Double, Set<Integer>> e : entrySet()) {
head.put(e.getKey(), e.getValue());
if (--count == 0)
break;
}
return head;
}
COM: <s> creates a new map with count values referenced but not </s>
|
funcom_train/40794279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Spacer getSpacer1() {
if (spacer1 == null) {//GEN-END:|219-getter|0|219-preInit
// write pre-init user code here
spacer1 = new Spacer(16, 20);//GEN-LINE:|219-getter|1|219-postInit
// write post-init user code here
}//GEN-BEGIN:|219-getter|2|
return spacer1;
}
COM: <s> returns an initiliazed instance of spacer1 component </s>
|
funcom_train/51590517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStartLevel(final int targetLevel) {
if (SECURITY_ENABLED) {
checkAdminPermission();
}
if (targetLevel <= 0) {
throw new IllegalArgumentException("Start level " + targetLevel
+ " is not a valid level");
}
new Thread() {
public void run() {
setLevel((Bundle[]) bundles.toArray(new Bundle[bundles
.size()]), targetLevel, false);
notifyFrameworkListeners(FrameworkEvent.STARTLEVEL_CHANGED,
systemBundle, null);
storeMetadata();
}
}.start();
}
COM: <s> set the current startlevel </s>
|
funcom_train/31012482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getAllPolls() {
PollManager pollMan = null;
try {
pollMan = ((PollManagerHome)EJBHomeFactory.getInstance().lookup(POLL_MANAGER_JNDI,PollManagerHome.class)).create();
return pollMan.getAllPoll();
} catch (Exception e) {
e.printStackTrace();
return null;
}
finally {
EJBUtils.remove(pollMan);
}
}
COM: <s> get all polls from the database </s>
|
funcom_train/16711624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isResultsReady() {
log.debug("~hasResultsReady() : Determining if simulation has any results ready");
boolean resultsReady = false;
for (final SimulationJob simulationJob : getSimulationJobs()) {
if (simulationJob.hasResultsReady()) {
resultsReady = true;
break;
}
}
return resultsReady;
}
COM: <s> determine if the simulation has any results ready </s>
|
funcom_train/19107233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getModifiedDate() {
try {
String date = mElement.getAttributeValue("modifieddate");
if (date == null) {
return new Date();
}
else {
return XMLModel.DATE_FORMAT.parse(date);
}
}
catch (Exception e) {
e.printStackTrace();
return new Date();
}
}
COM: <s> gets the last modified date </s>
|
funcom_train/4179063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String makeClasspath(final String uri) {
String resource = uri;
if (resource.startsWith("lib:")) {
resource = StringUtils.substringAfter(resource, "lib:");
}
if (resource.startsWith("/")) {
resource = StringUtils.substringAfter(resource, "/");
}
return "classpath:" + baseClassPath + resource;
}
COM: <s> constructs the classpath from the library declaration </s>
|
funcom_train/43813524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double min(double a, double b) {
if (a != a)
return a; // a is NaN
if ((a == 0.0d) && (b == 0.0d)
&& (Double.doubleToLongBits(b) == negativeZeroDoubleBits)) {
return b;
}
return (a <= b) ? a : b;
}
COM: <s> returns the smaller of two code double code values </s>
|
funcom_train/7223751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test0103(){
Symbol name = SET.HREF;
String value = null;
char quote = '"';
boolean having = true;
MutableStartTagToken token = new MutableStartTagToken(SET.A);
AttributeCondition condition =
new AttributeCondition(name, value, quote, having);
try{
condition.check(SUBJECT, token);
fail("unexpected success of AttributeCondition#check");
}
catch(Throwable e){
}
}
COM: <s> token having no attribute </s>
|
funcom_train/25905983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateCandidates() {
if (!mCompletionOn) {
if (mComposing.length() > 0) {
ArrayList<String> list = new ArrayList<String>();
list.add(mComposing.toString());
Migemo.lookups(mComposing.toString(), list);
setSuggestions(list, true, true);
} else {
setSuggestions(null, false, false);
}
}
}
COM: <s> update the list of available candidates from the current composing </s>
|
funcom_train/3329015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
if (_hashCode == -1) {
int compBindingHash = 0;
if (_compBinding != null) {
compBindingHash = _compBinding.getName().hashCode();
}
//WARNING: THE CASTOR SOM doesn't override hashCode or equals
_hashCode = 37*(_annotated.hashCode()) + compBindingHash;
}
return _hashCode;
}
COM: <s> returns the hash code value for this object </s>
|
funcom_train/50142051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createItem(String name, Object attachment) {
IItem item = (IItem) items.get(name);
if (item != null) {
throw new SecurityException("Can not create item '" + name + "': is existing yet.");
}
items.put(name, new Item(name, attachment));
}
COM: <s> create a new item with the settings given </s>
|
funcom_train/22791727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openWindow() {
frame.setVisibleLock(true);
// It is a fix solution for the Ubuntu 8.04:
new Thread(new Runnable() {
public void run() {
ApplTools.sleep(80);
frame.setExtendedState(Frame.NORMAL);
frame.setVisibleLock(false);
}
}).start();
}
COM: <s> open the main application window </s>
|
funcom_train/7998028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTypeOfElementAt(double xPos, double yPos){
double x, y;
int size = this.real_memory.size();
for(int i = 0; i < size; i++){
x = Tuple.get1(this.real_memory.elementAt(i));
y = Tuple.get2(this.real_memory.elementAt(i));
if(x == xPos && y == yPos){
return Tuple.get4(this.real_memory.elementAt(i));
}
}
return EnvironmentElement.NotSet;
}
COM: <s> return the type of the element remebered at the specified co ordinates </s>
|
funcom_train/4659722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean getBooleanValue(String paramName, Map<String, Object> parameters) {
String settingValue = getChartSettings().getConfigProperty(paramName);
boolean value = Boolean.valueOf(settingValue);
if (parameters.get(paramName) != null) {
value = Boolean.valueOf(parameters.get(paramName).toString());
}
return value;
}
COM: <s> retreive the boolean value of the given parameter name from the request parameters </s>
|
funcom_train/49249852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Edge getEdge(int n1, int n2) {
/*Edge e;
if (this.edgeExists(n1,n2)) {
for (int i=0 ; i<edges.size() ; i++) {
e = (Edge) edges.elementAt(i);
if ((n1==e.getV1() && n2==e.getV2()) ||
(n1==e.getV2() && n2==e.getV1()))
return e;
}
}
return null;*/
return edgesMatrix[n1][n2];
}
COM: <s> retrieves the edge between n1 and n2 </s>
|
funcom_train/42637225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected VectorFunction initDerivative(Function[] elements){
FunctionVector d = createDerivative(elements.length);
for (int i = 0; i < elements.length; i++) {
if(elements[i] instanceof DifferentiableFunction){
d.set(i, ((DifferentiableFunction)elements[i]).getDerivative());
}else throw new IllegalStateException("In order to get VectorFunction derivative, its elements should implement DifferentiableFunction");
}
return d;
}
COM: <s> returns vector function filled with derivatives of the given elements </s>
|
funcom_train/49040769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void scrollToXY(int scrollh, int scrollv, boolean animate) {
ScrollingModel sm = editor.getScrollingModel();
boolean cut = shouldCut(animate);
try {
if (cut) sm.disableAnimation();
sm.scrollHorizontally(scrollh);
sm.scrollVertically(scrollv);
} finally {
if (cut) sm.enableAnimation();
}
}
COM: <s> scrolls to the given coordinates </s>
|
funcom_train/43292361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reconcile() {
// get the shell
Shell shell = m_PlainTextEditor.getSite().getShell();
// shell valid?
if (shell != null) {
// get the display
Display display = shell.getDisplay();
// display valid?
if (display != null && !display.isDisposed()) {
// execute async reconciling
display.asyncExec(new Runnable() {
public void run() {
// doSave generates the model
m_PlainTextEditor.doSave(new NullProgressMonitor());
}
});
}
}
}
COM: <s> starts the reconciling process </s>
|
funcom_train/9409806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWriteTryLockWhenReadLockedFair() {
final ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true);
lock.readLock().lock();
Thread t = new Thread(new Runnable() {
public void run() {
threadAssertFalse(lock.writeLock().tryLock());
}
});
try {
t.start();
t.join();
lock.readLock().unlock();
} catch(Exception e){
unexpectedException();
}
}
COM: <s> fair write try lock fails when readlocked </s>
|
funcom_train/24933949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getPreferredSize() {
Rectangle compDim = getViewportBorderBounds();
Dimension vertSBDim = fVertSB.getPreferredSize();
Dimension horizSBDim = fHorizSB.getPreferredSize();
Dimension dim = new Dimension(compDim.width + vertSBDim.width,
compDim.height + horizSBDim.height);
return dim;
}
COM: <s> calculates the preferred size of the component </s>
|
funcom_train/33783959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectDO saveObject(final ObjectDO objectDO) throws StorageException {
final Session session = getSession();
final Transaction transaction = session.beginTransaction();
try {
session.saveOrUpdate(objectDO);
transaction.commit();
} catch (final HibernateException e) {
transaction.rollback();
throw new StorageException(e, MapErrorCodes.STORAGE_ERROR);
}
return objectDO;
}
COM: <s> stores the supplied object do in the database </s>
|
funcom_train/13187413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RegularTimePeriod previous() {
Quarter result;
if (this.quarter > FIRST_QUARTER) {
result = new Quarter(this.quarter - 1, this.year);
}
else {
Year prevYear = (Year) this.year.previous();
if (prevYear != null) {
result = new Quarter(LAST_QUARTER, prevYear);
}
else {
result = null;
}
}
return result;
}
COM: <s> returns the quarter preceding this one </s>
|
funcom_train/17863760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createDB(File dbToCreate) throws ClassNotFoundException, SQLException {
Class.forName("org.hsqldb.jdbcDriver");
conn = DriverManager.getConnection("jdbc:hsqldb:file:" + dbToCreate.getAbsolutePath(), "sa", "");
}
COM: <s> creates a database file by connecting to a non existent one </s>
|
funcom_train/42452401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void caretUpdate(final CaretEvent e) {
final int loc = e.getDot();
final Document sd = pane.getDocument();
final int line = sd.getDefaultRootElement().getElementIndex(loc);
if (line >= 0 && line < table.getRowCount()) {
table.setRowSelectionInterval(line, line);
}
}
COM: <s> changes the selection when the caret in the editor is changed </s>
|
funcom_train/26324851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetChildCountStackBackground() throws Exception {
loadStack(SIMPLE_PROJECT);
FCObject stack = _store.getFCObject();
FCValue count = _store.getChildCount(FCRuntime.BACKGROUND_TYPE, stack);
assertEquals(count.getAsInt(), 2);
}
COM: <s> tests retrieving the number of backgrounds in a stack </s>
|
funcom_train/11012597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFooterHas16bitCharacter() {
HSSFWorkbook b = new HSSFWorkbook();
HSSFSheet s = b.createSheet("Test");
HSSFFooter f = s.getFooter();
f.setLeft("\u0391");
f.setCenter("\u0392");
f.setRight("\u0393");
HSSFWorkbook b2 = HSSFTestDataSamples.writeOutAndReadBack(b);
HSSFFooter f2 = b2.getSheet("Test").getFooter();
assertEquals(f2.getLeft(),"\u0391");
assertEquals(f2.getCenter(),"\u0392");
assertEquals(f2.getRight(),"\u0393");
}
COM: <s> testcase for bug 17039 hssffooter does not support dbcs </s>
|
funcom_train/49959760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getPreviousLineCount() {
int lineCount = 0;
View parent = this.getParent();
int count = parent.getViewCount();
for (int i = 0; i < count; i++) {
if (parent.getView(i) == this) {
break;
} else {
lineCount += parent.getView(i).getViewCount();
}
}
return lineCount;
}
COM: <s> returns the previous line count </s>
|
funcom_train/3613318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMultiplePatterns1() {
final FilePatternMatcher fpm = new FilePatternMatcher("a:b:c");
assertTrue(!fpm.matches("a:b:c"));
assertTrue(fpm.matches("a"));
assertTrue(fpm.matches("b"));
assertTrue(fpm.matches("c"));
assertTrue(!fpm.matches("d"));
}
COM: <s> test a pattern list with as delimiter </s>
|
funcom_train/28343858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void synchronize(IElement anElem, AcceleratorNode aNode) {
if ((hasSynchronizerFor(anElem)) && (propertyAccessor.hasAccessorFor(aNode)))
addSynchronizedElementMappedTo(anElem, aNode);
addElementMappedTo(anElem, aNode);
}
COM: <s> creates a synchronization between the specified element and accelerator </s>
|
funcom_train/27761385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialize() throws BeanException {
read = JavaBeanTools.findIndexedReadMethod(propertyName, beanClass);
propertyType = read.getReturnType();
try {
write = JavaBeanTools.findIndexedWriteMethod(propertyName, beanClass, propertyType);
} catch (BeanException be) {
// smother the exception so that this property is read only
}
}
COM: <s> initializes the bean property by finding the read and write methods and setting </s>
|
funcom_train/40356287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateDiceLabel() {
if (lastRoll != -1) {
statusLabel.setText("The last roll was: " + lastRoll);
diceLabel.setIcon (new ImageIcon (this.getClass().getResource
("/images/dice" + lastRoll + ".png")));
}
}
COM: <s> displays a picture of the last rolled die </s>
|
funcom_train/44709349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void register(Page p) {
ParameterModel m = getRowSelectionModel().getStateParameter();
if ( m != null ) {
p.addComponentStateParam(this, m);
}
m = getColumnSelectionModel().getStateParameter();
if ( m != null ) {
p.addComponentStateParam(this, m);
}
return;
}
COM: <s> registers the table with the containing page </s>
|
funcom_train/1571444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object find(String _fname) {
EOEntity entity = this.entity();
if (entity == null)
return null;
EOFetchSpecification fs = entity.fetchSpecificationNamed(_fname);
if (fs == null) {
log.warn("did not find fetch specification: '" + _fname + "'");
// TODO: set lastException
return null;
}
return this.find(fs);
}
COM: <s> this method locates a named eofetch specification from an eomodel associated </s>
|
funcom_train/47738956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CellView createVertexView(Object cell) {
if (cell instanceof GraphSwimlaneInterface) {
return new DefaultGraphSwimlaneView(cell);
} else if (cell instanceof GraphActivityInterface) {
return new DefaultGraphActivityView(cell);
} else if (cell instanceof GraphArtifactInterface){
return new DefaultGraphArtifactView(cell);
} else {
return null;
}
}
COM: <s> create different vertex view depending of cell type </s>
|
funcom_train/33958430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setProperties(Map<Object, Object> properties) {
// here we create an unmodifiable map because these properties should never be modified. We are also creating a
// defensive copy first so that the properties cannot be modified out from underneath us by the calling class.
this.properties = Collections.unmodifiableMap(new HashMap<Object, Object>(properties));
}
COM: <s> sets the properties map </s>
|
funcom_train/28357000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt( final int row, final int column ) {
final NodeRecord record = _records.get( row );
if ( record != null ) {
switch ( column ) {
case NAME_COLUMN:
return record.getNodeID();
case SEQUENCE_COLUMN:
return record.getSequenceID();
case STATUS_COLUMN:
return toStatusString( record );
case EXCLUDE_COLUMN:
return toExcludeString( record );
case MODIFY_COLUMN:
return toModifyString( record );
default:
return null;
}
}
else {
return null;
}
}
COM: <s> get the value to display in the specified cell </s>
|
funcom_train/20888402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() throws ConfigurationException {
for (ServiceDescription description : descriptionArray) {
ServiceType type = description.getType();
for (ServiceDescription serviceDescription : descriptionList) {
if (type == null) {
continue; // no type that collision possible
}
// check for double type
ServiceType currentType = serviceDescription.getType();
if (currentType != null && currentType == type) {
throw new ConfigurationException(
"double defined service type");
}
}
// valid service => add to list
descriptionList.add(description);
}
}
COM: <s> called by the configurable factory after setting the configured parameter </s>
|
funcom_train/25765674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public Repository get(String path) {
Repository repo = REPOSITORY_INSTANCES.get(path);
if (repo != null) {
return repo;
}
Environment env = createEnvironment(path, false);
// We get a repository that already exists, then locale == null
repo = new Repository(env, null, false);
repo.path = env.getHome();
REPOSITORY_INSTANCES.put(env.getHome().getAbsolutePath(), repo);
return repo;
}
COM: <s> get a previous created repository </s>
|
funcom_train/34282993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSyntaxEditingStyle(String styleKey) {
if (styleKey==null) {
styleKey = SYNTAX_STYLE_ASSEMBLER_X86;
}
if (!styleKey.equals(syntaxStyleKey)) {
String oldStyle = syntaxStyleKey;
syntaxStyleKey = styleKey;
((RSyntaxDocument)getDocument()).setSyntaxStyle(styleKey);
firePropertyChange(SYNTAX_STYLE_PROPERTY, oldStyle, styleKey);
}
}
COM: <s> sets what type of syntax highlighting this editor is doing </s>
|
funcom_train/644432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void switchToOptionInput(DialogOptions dialogOptions) {
this.dialogOptions = dialogOptions;
CardLayout cl = (CardLayout) (dialogOptions.getPanelOptions().getLayout());
cl.show(dialogOptions.getPanelOptions(), PersistenceManager.Values.CARD_INPUT.name());
dialogOptions.setSelectedOption(PersistenceManager.Values.CARD_INPUT.name());
}
COM: <s> switches to the input category in the option dialog </s>
|
funcom_train/48054216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String getOPCQualityShortDescription(short quality) {
int QQ = quality >>> 6;
switch (QQ) {
case 0:
return bundle.getString("Bad");
case 1:
return bundle.getString("Uncertain");
case 3:
return bundle.getString("Good");
default://case 2
return bundle.getString("N/A");
}
}
COM: <s> returns the short quality description </s>
|
funcom_train/6329306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Object o) {
checkMod();
modCount++;
knownMod++;
size++;
position++;
Entry e = new Entry(o);
e.previous = previous;
e.next = next;
if (previous != null)
previous.next = e;
else
first = e;
if (next != null)
next.previous = e;
else
last = e;
previous = e;
lastReturned = null;
}
COM: <s> adds an element between the previous and next and advance to the next </s>
|
funcom_train/50923640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColumnNumber(String name) {
int col = -1;
String names = getAttributeValue(CIFAttribute.NAMES.value);
if (names != null) {
int i = 0;
List <String> strList = new ArrayList<String>() ;
StringTokenizer st = new StringTokenizer(names);
while (st.hasMoreTokens()) {
strList.add(st.nextToken()) ;
}
for (String name0 : strList) {
if (name0.equalsIgnoreCase(name)) {
col = i;
break;
}
i++;
}
}
return col;
}
COM: <s> get number of column with name name case insensitive </s>
|
funcom_train/43421712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getWorkingHours() {
double returnValue = 8;
try {
// Convert the String to a double.
returnValue = Double.parseDouble(getSetting(DAY_WORKING_HOURS).toString());
} catch (NumberFormatException ex) {
logger.log(Level.WARNING, "Unable to read setting: " + "\"dayWorkHours\"" + ".", ex);
}
return returnValue;
}
COM: <s> returns the daily working hours </s>
|
funcom_train/13814519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() {
ODMGXAWrapper txw = new ODMGXAWrapper();
Database db = ODMG.getODMGDatabase();
db.deletePersistent( this );
// Delete the file unless it is stored in external volume
if ( !(volume instanceof ExternalVolume) ) {
if ( imageFile != null && !imageFile.delete() ) {
log.error( "File " + imageFile.getAbsolutePath() + " could not be deleted" );
}
}
txw.commit();
}
COM: <s> deletes the image instance object from database </s>
|
funcom_train/49824199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Project makeProject2() {
Project project = new Project();
project.setOwner(testUser1);
project.setName(testProject2Name);
project.setDescription(testProject2Desc);
project.setStartTime(testProject2Start);
project.setEndTime(testProject2End);
project.setUriPatterns(testProject2Uris);
return project;
}
COM: <s> create a test project2 </s>
|
funcom_train/2581652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRow(Comparable rowKey) {
if (rowKey == null) {
throw new IllegalArgumentException("Null 'rowKey' argument.");
}
int index = getRowIndex(rowKey);
if (index >= 0) {
removeRow(index);
}
else {
throw new UnknownKeyException("Unknown key: " + rowKey);
}
}
COM: <s> removes a row from the table </s>
|
funcom_train/37034613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(String id) throws IOException {
File file = file(id);
if (file == null) {
return;
}
if (debug >= 1) {
log(sm.getString(getStoreName()+".removing",
id, file.getAbsolutePath()));
}
file.delete();
}
COM: <s> remove the session with the specified session identifier from </s>
|
funcom_train/3004433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canOpenUniqueModule( BSFModuleDefinition moduleDefinition ) {
if ( moduleDefinition == null ) {
throw new IllegalArgumentException( "Unable to decide on a null ModuleDefinition... Check that..." );
}
Vector modules = (Vector) openedModules.get( moduleDefinition );
if ( moduleDefinition.isUnique() && modules != null && modules.size() == 1 ) {
return false;
}
return true;
}
COM: <s> returns wether its allowed or not to open a module controller with the </s>
|
funcom_train/1530428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final private String relation(GeoVector a, GeoVector b) {
String str;
kernel.setMinPrecision();
if (a.isEqual(b)) {
str = equalityString(a, b, true);
} else {
str = linDependencyString(a, b, a.linDep(b));
}
kernel.resetPrecision();
return str;
}
COM: <s> description of the relation between two vectors a b </s>
|
funcom_train/22783731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
String command = e.getActionCommand();
if (COMMAND_DETAIL.equals(command)) {
toggleDetail();
} else if (COMMAND_SEND.equals(command)) {
sendReport();
} else if (COMMAND_CLOSE.equals(command)) {
setVisible(false);
} else if (COMMAND_EXIT_PROGRAM.equals(command)) {
System.exit(1);
}
}
COM: <s> react on input </s>
|
funcom_train/3099571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStateValue(StateVariable stateVariable, Object value) {
if (stateVariable.getType().isInstance(value))
stateVariableDictionary.put(stateVariable, value);
else
throw new IllegalArgumentException(value + " is not an instance of " + stateVariable.getType());
}
COM: <s> sets the given state state variable to the given value </s>
|
funcom_train/20043900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _moveToInsertRow() {
boolean result = true ;
try {
oObj.moveToInsertRow() ;
result = tester.currentRow() < 1 ;
} catch (SQLException e) {
e.printStackTrace(log) ;
result = false ;
}
tRes.tested("moveToInsertRow()", result) ;
}
COM: <s> tries to move cursor to insert row </s>
|
funcom_train/12128012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countOfLocalElements(int types) {
int count = 0;
if((types&NODE) != 0 && nodedict != null) count += nodedict.size();
if((types&EDGE) != 0 && edgedict != null) count += edgedict.size();
if((types&SUBGRAPH) != 0 && graphdict != null) count += graphdict.size();
return count;
}
COM: <s> get a count of elements in this subgraph </s>
|
funcom_train/48869734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RevenueSource create() {
String id = GUID.generate();
RevenueSource rs = new Late(id);
Cache.getInstance().put(id, rs);
System.out.println("The RevenueSource id in the Late create method is: " + rs.getId());
return rs;
}
COM: <s> creates a late fee object based on the transaction it is associated with </s>
|
funcom_train/3990052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAdres_szpitalaPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SkierowanieSzpital_adres_szpitala_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SkierowanieSzpital_adres_szpitala_feature", "_UI_SkierowanieSzpital_type"),
PrzychodniaPackage.Literals.SKIEROWANIE_SZPITAL__ADRES_SZPITALA,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the adres szpitala feature </s>
|
funcom_train/18565640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void editEnvironment() {
EnvironmentEditor dlg = new EnvironmentEditor(populationFrame, true);
dlg.setEnvironment(environment);
dlg.setLocationRelativeTo(populationFrame);
dlg.show();
environment = dlg.getEnvironment();
Console.append("mutation rate " + environment.getMutationRate() + ", crossing over rate " + environment.getMergeRate());
}
COM: <s> method edit environment </s>
|
funcom_train/34268750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setForeGroundColor(JCheckBox p_aCheckBox, boolean p_Selected) {
if (p_Selected) {
p_aCheckBox.setForeground(FMSWidgetController.getEditableColor());}
else {
p_aCheckBox.setForeground(FMSWidgetController.getNonEditableColor());
}
}
COM: <s> sets the fore ground color </s>
|
funcom_train/40686068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMapMoveEndHandler(final MapMoveEndHandler handler) {
maybeInitMapMoveEndHandlers();
mapMoveEndHandlers.addHandler(handler, new VoidCallback() {
@Override
public void callback() {
MapMoveEndEvent e = new MapMoveEndEvent(MapWidget.this);
handler.onMoveEnd(e);
}
});
}
COM: <s> this event is fired when the change of the map view ends </s>
|
funcom_train/37070815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dropTemporaryTable(String temp_table_name) {
try {
java.sql.Statement stmt = this.createStatement();
try {
stmt.execute("drop table " + temp_table_name);
} finally {
stmt.close();
}
} catch (java.sql.SQLException e) {
Log.warn(this, "exception while dropping temporary table:" + e);
throw new RuntimeException(e);
}
}
COM: <s> frees a temporary table </s>
|
funcom_train/31022322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getListControl(Composite parent) {
if (list == null) {
list = new List(parent, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL);
list.addSelectionListener(getSelectionListener());
list.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent event) {
list = null;
}
});
LayoutUtil.setWidthHint(list, 400);
} else {
checkParent(list, parent);
}
return list;
}
COM: <s> returns this field editors list control </s>
|
funcom_train/31149324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getObjectLabels () {
Enumeration e = enumerateObjectLabels ();
StringBuffer buf = new StringBuffer ();
while (e.hasMoreElements ()) {
if (buf.length() > 0)
buf.append (' ');
buf.append ((String)e.nextElement());
}
return buf.toString();
}
COM: <s> get a string containing the labels of the region </s>
|
funcom_train/35539883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertAnalyzesTo(Analyzer a, String input, String[] output) throws Exception {
TokenStream ts = a.tokenStream("dummy", new StringReader(input));
final Token reusableToken = new Token();
for (int i=0; i<output.length; i++) {
Token nextToken = ts.next(reusableToken);
assertNotNull(nextToken);
assertEquals(nextToken.term(), output[i]);
}
assertNull(ts.next(reusableToken));
ts.close();
}
COM: <s> a helper method copied from org </s>
|
funcom_train/4257534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String encode(CharacterSet characterSet) throws IOException {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < size(); i++) {
if (i > 0)
sb.append('&');
get(i).encode(sb, characterSet);
}
return sb.toString();
}
COM: <s> url encodes the form </s>
|
funcom_train/18254862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void viewDeserialized() {
if (getFrameImp() == null) {
setViews(views);
UserEnvironment.getDefaultEnvironment().registerViewFrame(this);
try {
((JInternalFrame) this.getFrameImp()).setIcon(iconified);
} catch (PropertyVetoException e) {
//ignore...
}
this.getFrameImp().setBounds(bounds);
}
}
COM: <s> this view has just been deserailized </s>
|
funcom_train/4866633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processMouseEvents(Vector2f position, int button, boolean down, TimeStep timeStep) {
if ( ! this.mouseListeners.isEmpty() ) {
if ( this.mouseEventCache.isEmpty() ) {
this.mouseEventCache.add(new MouseEvent(this, button, position ));
}
MouseEvent event = this.mouseEventCache.pop();
event.unconsume();
event.setButton(button);
event.setPosition(position);
processMouseEvent(event, down);
}
}
COM: <s> process mouse events </s>
|
funcom_train/26282654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isFinished() {
for (ListIterator i = players.listIterator(); i.hasNext(); ) {
Player currentPlayer = (Player)i.next();
// if any player is without cards, game over man
if (currentPlayer.getHand().isEmpty()) {
return true;
}
}
// we made it this far with no empty hands, game is not finished
return false;
}
COM: <s> tests if this game is finished yet </s>
|
funcom_train/37607394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearScreen(int qnbr) {
CatchKeys ckey = JavaDriver.getGKeys().getKEPP();
GMain gmain = JavaDriver.getGMain();
JavaDriver.setRunning(false);
// hide map
ckey.hideDisplay();
// bring up offending query
ckey.postProcessKeyEvent(new KeyEvent(
gmain, KeyEvent.KEY_PRESSED,
System.currentTimeMillis(),
KeyEvent.CTRL_DOWN_MASK,
qnbr+48, Character.forDigit(qnbr, 10)));
} // end ClearScreen()
COM: <s> return user to the query screen when an error occurs </s>
|
funcom_train/50689185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintTreeForPrinting(Graphics g, Dimension size, Tree t) {
saveParametersForPainting();
setParametersForPainting(size.width, size.height, t);
calculateLongestExtNodeInfo(t);
paintTree(g, t);
restoreParametersForPainting();
calculateLongestExtNodeInfo(tree);
}
COM: <s> renders a given tree with a given grahpics context </s>
|
funcom_train/50158939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getFormatOfRecords() throws Exception {
List nodes = xmlDoc.selectNodes("//*[local-name()='access']/*[local-name()='key']/@libraryFormat");
if (nodes.size() != 1)
throw new Exception("Unable to get format of records. Wrong number of elements: " + nodes.size());
Attribute attrib = (Attribute) nodes.get(0);
return attrib.getValue();
}
COM: <s> gets the format of the records in this collection </s>
|
funcom_train/20440041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHoursPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ESMFTimeInterval_hours_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ESMFTimeInterval_hours_feature", "_UI_ESMFTimeInterval_type"),
ESMFPackage.Literals.ESMF_TIME_INTERVAL__HOURS,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the hours feature </s>
|
funcom_train/43371637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupWindowOpenListener() {
addWindowListener(new WindowAdapter() {
public void windowOpened(WindowEvent e) {
getTimerPanel().getSignalPanel().setTimeDisplayed(0L);
getTimerPanel().getControlPanel()
.getStartStopButton().requestFocus();
}
});
}
COM: <s> sets up a window listener so that when the window opens the time </s>
|
funcom_train/50462948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean edit(Frame parentFrame) {
JavaAppDesc appDesc = (JavaAppDesc)getLaunchDesc();
JavaRemoteConfigDialog dialog = new JavaRemoteConfigDialog(parentFrame, appDesc);
dialog.setVisible(true);
if(dialog.getResult() == DialogManager.OK) {
dirty_flag = true;
return true;
}
else {
return false;
}
}
COM: <s> edit this action </s>
|
funcom_train/7497002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
// accumulate the descriptions of all the rule sets in a
// StringBuffer, then cast it to a String and return it
StringBuilder result = new StringBuilder();
for (int i = 0; i < ruleSets.length; i++) {
result.append(ruleSets[i].toString());
}
return result.toString();
}
COM: <s> generates a textual description of this formatter </s>
|
funcom_train/47920246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isPhylogeny(){
for (int i = 0; i < mPrime.length; i++) {
for (int j = 0; j < mPrime[0].length; j++) {
if ( mPrime[i][j] == 1 && LArray[i][j] != L[j] ) {
return false;
}
}
}
return true;
}
COM: <s> checks phylogeny of its data </s>
|
funcom_train/40312018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFirst() {
try
{
metaData = new DefaultResultSetMetaData(new IOMetaDataEntryMockImpl());
values = new Object[][]{{"hello"}};
ResultSet resultSet = new DefaultResultSet(statement, metaData, values);
assertTrue("first failed", resultSet.first());
assertEquals("The current row number should be 1", 1, resultSet.getRow());
}
catch(SQLException e)
{
fail("first failed");
}
}
COM: <s> tests first successfully </s>
|
funcom_train/47106940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemArmor01() {
JMenuItem menuItem = new JMenuItem();
menuItem.setText(Armor.A_01.getItemName());
menuItem.setEnabled(false);
menuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
controller.setPlrReadiedArmor(Armor.A_01);
}
});
return menuItem;
}
COM: <s> creates the second choice for the armor menu </s>
|
funcom_train/2286790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setRelatedLock(CmsLock relatedLock) {
if (this == NULL_LOCK) {
throw new RuntimeException("null lock");
}
if ((relatedLock == null) || relatedLock.isUnlocked()) {
m_relatedLock = null;
} else {
m_relatedLock = relatedLock;
m_relatedLock.m_relatedLock = this;
}
}
COM: <s> sets the related lock </s>
|
funcom_train/9925711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setHLRLocation() {
if (hlrLocationField.getText().trim().equals("")) {
jdl.removeAttributeByName("HLRLocation");
}
else {
jdl.setAttribute("HLRLocation",
new AtomicExpression(hlrLocationField.getText()));
}
}
COM: <s> sets the hlrlocation jdl attribute </s>
|
funcom_train/42295889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
// create the string
String string = "[";
for (int i=0; i<4; i++) {
if (i != 0)
string += ", ";
// row
string += "[";
for (int j=0; j<4; j++) {
if (j != 0)
string += ", ";
string += this.data[i][j];
}
string += "]";
}
string += "]";
// return the created string
return string;
}
COM: <s> creates a string to describe this matrix </s>
|
funcom_train/34758639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean register(String name, int min, boolean ex){
if(exists(name)){
return false;
}
if(fits(min)){
if(!ex){
nonexpanding.add(new Process(name, min, id++));
} else{
expanding.add(new Process(name, min, id++));
}
setDivision();
return true;
}
return false;
}
COM: <s> register a new process with the system </s>
|
funcom_train/18865147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigDecimal getMarketPrice() {
if (lastMarketPrice != null) {
return lastMarketPrice;
}
CommodityHistoryNode node = getLastHistoryNode();
if (node != null) {
lastMarketPrice = new BigDecimal(node.price);
} else {
lastMarketPrice = new BigDecimal("0");
}
return lastMarketPrice;
}
COM: <s> returns the last history node in the list which should be the latest </s>
|
funcom_train/12560887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lSetConstraints() {
// Only update native resource if it exists.
if (nativeId != DisplayableLFImpl.INVALID_NATIVE_ID) {
setConstraints0(nativeId, tf.constraints);
}
// note: int some implementation this method call may affect
// the layout, and int this case such a call will be needed:
// lRequestInvalidate(true, true);
}
COM: <s> notifies l amp f that constraints have to be changed </s>
|
funcom_train/3799402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw (Pnt endA, Pnt endB) {
g.drawLine((int)endA.coord(0), (int)endA.coord(1),
(int)endB.coord(0), (int)endB.coord(1));
}
COM: <s> draw a line segment </s>
|
funcom_train/15628678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addPlugin(@NotNull final Plugin<G, A, R> plugin) {
if (plugins.containsKey(plugin.getName())) {
return false;
}
plugins.put(plugin.getName(), plugin);
firePluginCreatedEvent(plugin);
firePluginRegisteredEvent(plugin);
return true;
}
COM: <s> add a new plugin </s>
|
funcom_train/25824537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializateNeuralNetworkDirect() {
//Layers
this.inputLayer = new LinearLayerDirect(NeuralNetwork.INPUT_NEURON_NUMBER);
this.hiddenLayer = new SigmoidLayerDirect(NeuralNetwork.HIDDEN_NEURON_NUMBER);
this.outputLayer = new SigmoidLayerDirect(NeuralNetwork.NUMBER_OF_OUTPUTS);
//Synapses
this.inputHidden = new FullSynapseDirect();
this.hiddenOutput = new FullSynapseDirect();
//Connecting
this.inputLayer.setOutput(inputHidden);
this.hiddenLayer.setInput(inputHidden);
this.hiddenLayer.setOutput(hiddenOutput);
this.outputLayer.setInput(hiddenOutput);
}
COM: <s> this method allows to initialize the neural network to run </s>
|
funcom_train/11722953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DavPropertySet getProperties(int status) {
if (statusMap.containsKey(status)) {
PropContainer mapEntry = statusMap.get(status);
if (mapEntry != null && mapEntry instanceof DavPropertySet) {
return (DavPropertySet) mapEntry;
}
}
return new DavPropertySet();
}
COM: <s> get properties present in this response for the given status code </s>
|
funcom_train/20534845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getText_num_K() {
if (Text_num_K == null) {
Text_num_K = new JTextField();
Text_num_K.setEditable(false);
Text_num_K.setSize(new Dimension(79, 26));
Text_num_K.setLocation(new Point(119, 225));
}
return Text_num_K;
}
COM: <s> this method initializes text num k </s>
|
funcom_train/32118040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void categorizeObjects() {
InterdependentObjectCategorizer<String> categorizer = new InterdependentObjectCategorizer<String>();
categorizer.setContainer(repository);
managedObjects.addAll(categorizer.getManagedObjectList());
incompleteObjects.addAll(categorizer.getIncompleteObjectList());
errorObjects.addAll(categorizer.getCycledObjectList());
}
COM: <s> build the list of objects managed by the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.