__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/12071333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeGraphvizTo(Writer w, boolean includeSpans, boolean beanPoleStyle,boolean showSpines) throws IOException {
this.writeGraphvizTo(new BufferedWriter(w), -1, -1, includeSpans, beanPoleStyle, showSpines);
}
COM: <s> writes a visual representation of this sentence in graphviz format </s>
|
funcom_train/8900297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assignActionListeners() {
newNet.addActionListener(alNewBN);
newMsbn.addActionListener(alNewMSBN);
newMebn.addActionListener(alNewMEBN);
openNet.addActionListener(alOpen);
saveNet.addActionListener(alSave);
metal.addActionListener(alMetal);
motif.addActionListener(alMotif);
windows.addActionListener(alWindows);
learn.addActionListener(alLearn);
tile.addActionListener(alTile);
cascade.addActionListener(alCascade);
help.addActionListener(alHelp);
}
COM: <s> method responsible for assigning action listeners to all buttons </s>
|
funcom_train/32961016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void streamContent(DocContentSecurity doc, OutputStream stream, AccountUser activeAccountUser, PrivateKey userPrivateKey) {
byte[] b = getDecryptedContent(doc, activeAccountUser, userPrivateKey);
try {
stream.write(b);
} catch (IOException ex) {
throw new RuntimeException("Could not write to stream", ex);
}
}
COM: <s> stream content to the specified output stream </s>
|
funcom_train/22798370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getArticlesCount(QueryBits query) throws DatabaseException {
Connection conn = getConnection();
QueryHelper queryHelper = new QueryHelper(KbQueries.selectArticlesCountQuery(query));
try {
ResultSet rs = queryHelper.executeQuery(conn);
rs.next();
return rs.getInt("row_count");
} catch (Exception e) {
// Database problem
throw new DatabaseException(e, queryHelper);
} finally {
queryHelper.close();
closeConnection(conn, queryHelper);
}
}
COM: <s> this returns articles count </s>
|
funcom_train/14070124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
if (! closed) {
try {
if (roomDAO != null) {
roomDAO.close();
}
if (eventDAO != null) {
eventDAO.close();
}
if (sceneDAO != null) {
sceneDAO.close();
}
env.close();
me = null;
}
catch (DatabaseException e) {
// TODO
}
finally {
closed = true;
}
}
}
COM: <s> close out the database </s>
|
funcom_train/22894068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int tokenize(StringBuilder sb, String path, int index){
String[] tokens = path.split("/");
for (String s: tokens) {
if (s.isEmpty())
continue;
sb.append("name").append(index++)
.append("=").append(s).append(",");
}
return index;
}
COM: <s> this takes a path such as a b c and converts it to </s>
|
funcom_train/49138084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFrame getJFrame() {
if (jFrame == null) {
jFrame = new JFrame();
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jFrame.setJMenuBar(getJJMenuBar());
jFrame.setSize(818, 277);
jFrame.setContentPane(getJContentPane());
jFrame.setTitle("DBWeb2010 projet");
}
return jFrame;
}
COM: <s> this method initializes j frame </s>
|
funcom_train/10352705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commitWorkStatus(SudokuCommiter wer, WorkSatus wie){
synchronized (workingStates) {
Collection<WorkSatus> allSates = workingStates.values();
boolean wasWorking = false;
for(WorkSatus state:allSates){
if (state.equals(WorkSatus.WORKING)) wasWorking = true;
}
workingStates.put(wer,wie);
allSates = workingStates.values();
boolean nowWorking = false;
for(WorkSatus state:allSates){
if (state.equals(WorkSatus.WORKING)) nowWorking = true;
}
if(nowWorking!=wasWorking){
fireWorkingStateChanged();
}
}
}
COM: <s> this methode should be called by every sudoku commiter every time </s>
|
funcom_train/35562373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTrace(String trace) {
traceList.clear();
if (trace == null || trace.trim().length() == 0) {
return;
}
String[] splits = trace.split("\n");
for (String row : splits) {
traceList.addItem(row);
}
}
COM: <s> sets the trace info </s>
|
funcom_train/51537375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void notifyRecordChangedListeners(int recordId) {
synchronized (recordListener) {
if (Logging.REPORT_LEVEL <= Logging.INFORMATION) {
Logging.report(Logging.INFORMATION, LogChannels.LC_RMS, "notify Change # listener = "
+ recordListener.size());
}
int numListeners = recordListener.size();
for (int i = 0; i < numListeners; i++) {
RecordListener rl = (RecordListener) recordListener.elementAt(i);
rl.recordChanged(this, recordId);
}
}
}
COM: <s> notifies all registered listeners that a record changed </s>
|
funcom_train/819150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void snapshot(boolean bCopyData) {
int[] tmp = backup;
backup = data;
if (tmp == null)
data = new int[w*h]; // creates a new array the first time around...
else
data = tmp; // ...then just swap the arrays
if (bCopyData)
System.arraycopy(backup, 0, data, 0, w*h);
}
COM: <s> takes a snapshot of the current data </s>
|
funcom_train/41676441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AssignProductCategories getProductAssignProductCategories(Product product) {
AssignProductCategories assignProductCategories = new AssignProductCategories(product);
assignProductCategories.setPersistent(false);
for (ProductCategory productCategory : this) {
AssignProductCategory assignProductCategory = productCategory.getAssignProductCategories()
.getAssignProductCategory(productCategory, product);
if (assignProductCategory != null) {
assignProductCategories.add(assignProductCategory);
}
}
return assignProductCategories;
}
COM: <s> gets product assign product categories </s>
|
funcom_train/51339373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object apply(final IIndex ndx) {
final int n = getKeyCount();
final boolean[] ret = new boolean[n];
int i = 0, onCount = 0;
while (i < n) {
if(ret[i] = ndx.contains(getKey(i))) {
onCount++;
}
i++;
}
return new ResultBitBuffer(n, ret, onCount);
}
COM: <s> applies the operation using </s>
|
funcom_train/45596885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteNodeDownwards(Hashtable layouts,LayerStateNode node,LayerStateNode root){
//go down to bottom, when return from all children clear all children edges
StateEdge edge;
for (int i = 0 ; i < node.childrenStates.size();i++){
edge = node.childrenStates.get(i);
deleteNodeDownwards(layouts,edge.childState,root);
}
//clear all children as comming back
node.childrenStates.clear();
if (!node.equals(root)){
//remove it for parent, AT THE MOMENT ONLY ONE PARENT POSSIBLE
node.parent.childrenStates.remove(node);
//remove the layout
layouts.remove(node.squares);
}
}
COM: <s> the function receives a node and then recursively deletes </s>
|
funcom_train/26575376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showAboutWindow() {
if (_about == null) {
_about = new AboutDialog(null, ResourceManager.getString(MainStrings.HelpMenu.about.tooltip), false);
_about.pack();
_about.setResizable(false);
PreferenceManager.globalCenterWindow(_about);
}
_about.show();
}
COM: <s> shows the about window to the user </s>
|
funcom_train/7638060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resourceChangeEventEnd() {
try {
mTree.getDisplay().asyncExec(new Runnable() {
public void run() {
if (mTree.isDisposed() == false) {
mTreeViewer.refresh();
}
}
});
} catch (SWTException e) {
// display is disposed. nothing to do.
}
}
COM: <s> processes the end of a resource change event </s>
|
funcom_train/34570388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String dump() {
StringBuilder buffer = new StringBuilder("update \"");
buffer.append(parentDb.getRrdBackend().getPath()).append("\" ").append(time);
for (double value : values) {
buffer.append(":");
buffer.append(Util.formatDouble(value, "U", false));
}
return buffer.toString();
}
COM: <s> dumps sample content using the syntax of rrdtools update command </s>
|
funcom_train/974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSelectedViewRow(int viewrowindex) {
if ( (viewrowindex >= 0)
&& (tableModelSolutionData != null)
&& (tableModelSolutionData.getRowCount() > 0)
&& (tableSolutionData != null)) {
ListSelectionModel lsm = tableSolutionData.getSelectionModel();
lsm.setSelectionInterval(viewrowindex, viewrowindex);
}
}
COM: <s> makes a single row selected </s>
|
funcom_train/16400154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void imitatePrepare(ClassDecl cd) {
// foundation classes are none of our business
if (cd.name().startsWith("java."))
return;
// imitate load for this class
imitateLoad(cd.name());
// find all New nodes
DJADNewFinder djadnf = new DJADNewFinder(
asts, job, ts, nf, visitedClasses, verifier);
NodeVisitor dnv = djadnf.begin();
cd.visit(dnv);
// imitate verifier for this node
if (verifier)
imitateVerify(cd);
// now prepare the superclass
if (cd.superClass() != null)
imitatePrepare(cd.superClass().type().toString());
}
COM: <s> prepares a class that is defined in our ast </s>
|
funcom_train/3624629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection getConnection() throws SQLException {
if (DEBUGCONNECTIONS) System.out.println("ConnectionHandler: getConnection()");
PooledConnection p = null;
synchronized (connections) {
if (connections.size() > 0) {
p = (PooledConnection) connections.get(0);
connections.remove(0);
if (p != null) if (p.isClosed()) p = null;
}
}
if (p == null) {
if (DEBUGCONNECTIONS) System.out.println("creating connection");
p = DBHelperFactory.getHelper().createConnection();
}
return p;
}
COM: <s> gibt eine connection zurueck </s>
|
funcom_train/37387590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void listModulesValueChanged(javax.swing.event.ListSelectionEvent evt)//GEN-FIRST:event_listModulesValueChanged
{//GEN-HEADEREND:event_listModulesValueChanged
// Add your handling code here:
onModuleSelected( m_listModules.getSelectedIndex());
}//GEN-LAST:event_listModulesValueChanged
COM: <s> called when a module is selected </s>
|
funcom_train/41020266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findCardName(String name, String set, int collectorId, CardBeanList list) {
for (int i = 0; i < list.size(); i++)
if (list.get(i).getName().equals(name) && list.get(i).getSetName().equals(set) && list.get(i).getCollectorID() == collectorId)
return i;
return -1;
}
COM: <s> find card with specific name set and collector id </s>
|
funcom_train/10274831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getParameterMap() {
Map oMap = super.getParameterMap();
if(oMap == null){
return null;
}
Map nMap = new Hashtable();
Set entries = oMap.entrySet();
Iterator itr = entries.iterator();
while( itr.hasNext() ){
Entry entry = (Entry) itr.next();
nMap.put(getTainted((String) entry.getKey()),
getTainted((String[]) entry.getValue()));
}
return Collections.unmodifiableMap(nMap);
}
COM: <s> effects returns a new immutable java </s>
|
funcom_train/1549633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addAll(int index, Collection<? extends E> collection) {
if (fast) {
synchronized (this) {
ArrayList<E> temp = (ArrayList<E>) list.clone();
boolean result = temp.addAll(index, collection);
list = temp;
return (result);
}
} else {
synchronized (list) {
return (list.addAll(index, collection));
}
}
}
COM: <s> insert all of the elements in the specified collection at the specified </s>
|
funcom_train/2022627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnString() {
switch (this.type) {
case TYPE_YMD:
return this.year+"_"+this.month+"_"+this.day;
case TYPE_YM:
return this.year+"_"+this.month;
case TYPE_Y:
return ""+this.year;
default:
return "unknown";
}
}
COM: <s> returns the part of the column name that represents the date </s>
|
funcom_train/10819736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String createCountInputFile() throws IOException {
String inputFileName = "CountTest.txt";
String[] inputData = new String[] {
"1 2 3 4\n",
"a b c d\n",
"r s t u"};
Util.createInputFile(cluster, inputFileName, inputData);
return inputFileName;
}
COM: <s> creates a input file that will be used to test count builtin function </s>
|
funcom_train/7623642 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerObserver(T observer) {
if (observer == null) {
throw new IllegalArgumentException("The observer is null.");
}
synchronized(mObservers) {
if (mObservers.contains(observer)) {
throw new IllegalStateException("Observer " + observer + " is already registered.");
}
mObservers.add(observer);
}
}
COM: <s> adds an observer to the list </s>
|
funcom_train/8085827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String listCapabilities(Capabilities c) {
String result;
Iterator iter;
result = "";
iter = c.capabilities();
while (iter.hasNext()) {
if (result.length() != 0)
result += ", ";
result += iter.next().toString();
}
return result;
}
COM: <s> returns a comma separated list of all the capabilities </s>
|
funcom_train/25187256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPos() {
System.out.println("getPos");
StructureErrorInfo instance = new StructureErrorInfo(1, 2, "1", "2");
int expResult = 2;
int result = instance.getPos();
assertEquals(expResult, result);
}
COM: <s> test of get pos method of class structure error info </s>
|
funcom_train/11590843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isShowPropertiesToolBox(){
if( isShowAllToolBoxes() )
return true;
if (_showPropertiesToolBox != null)
return _showPropertiesToolBox.booleanValue();
ValueBinding vb = getValueBinding("showPropertiesToolBox");
return vb != null ? ((Boolean)vb.getValue(getFacesContext())).booleanValue() : false;
}
COM: <s> show the properties tool box next to the text </s>
|
funcom_train/28750252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSeqnum(Long newVal) {
if ((newVal != null && this.seqnum != null && (newVal.compareTo(this.seqnum) == 0)) ||
(newVal == null && this.seqnum == null && seqnum_is_initialized)) {
return;
}
this.seqnum = newVal;
seqnum_is_modified = true;
seqnum_is_initialized = true;
}
COM: <s> setter method for seqnum </s>
|
funcom_train/3722892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayFromID(String stringID) {
ATLASElement element = corpus.getIdentifiableElementWith(stringID);
if (element != null)
panelATLASElementView.setViewportView(TITANEditFactory.createTITANEdit(element));
else
JOptionPane.showMessageDialog(this, "Can't find an ATLAS Element with the ID " + stringID,
"Corpus Viewer Info.", JOptionPane.INFORMATION_MESSAGE);
}
COM: <s> displays the atlaselement with the given id </s>
|
funcom_train/39131689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectByText(String selectName, String optionText) throws InvalidElementException {
lastSelectValue = optionText;
lastSelectType = "text";
lastSelectName = selectName;
if (optionText.equals(getInvalidElementName())) {
throw new InvalidElementException("Unable to find element with text '" + optionText + "'.");
}
}
COM: <s> records the parameters used to select an option by text </s>
|
funcom_train/35839091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setState(int state) throws SQLException, ModelSessionException {
if (state == nState)
return;
Date date = new Date();
setModificationDateLocal(date);
if (state == ICoreConstants.MODIFIEDSTATE && !(this instanceof View)) {
//Lakshmi (4/20/06) - The current user has modified the node which means the user has read.
state = ICoreConstants.READSTATE;
}
setStateLocal(state);
}
COM: <s> sets the node state variable both locally and in the database </s>
|
funcom_train/38828125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int canReadData(File inputFile) throws IOException {
int response = NO;
String name = inputFile.getName();
name = name.toLowerCase().trim();
if (name.endsWith(".geo")) {
response = YES;
_isUnitAware = false;
} else if (name.endsWith(".mk5")) {
response = YES;
_isUnitAware = true;
} else if (name.endsWith(".lib")) {
response = MAYBE;
_isUnitAware = false;
}
return response;
}
COM: <s> method that determines if this reader can read paneled geometry </s>
|
funcom_train/46764677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getAutofocusCheckBox() {
if (autofocusCheckBox == null) {
autofocusCheckBox = new JCheckBox();
autofocusCheckBox.setSelected(true);
autofocusCheckBox.setText(Resources.getString("lab_autofocus"));
autofocusCheckBox.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
if (autofocusCheckBox.isSelected()){
pane.setAutofocus(true);
}
else {
pane.setAutofocus(false);
}
pane.setFocusToTextInput();
}
});
}
return autofocusCheckBox;
}
COM: <s> this method initializes autofocus check box </s>
|
funcom_train/39953004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Document buildDom(Parse parse) {
DocumentBuilder documentBuilder = createDocumentBuilder(parse);
InputSource inputSource = getInputSource(parse);
try {
// create the dom tree
parse.document = documentBuilder.parse(inputSource);
} catch (Exception e) {
parse.addProblem("couldn't parse xml document", e);
}
return parse.document;
}
COM: <s> customizable dom building </s>
|
funcom_train/47805825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(T value){
if(isEmpty())return false;
ListNode<T> current, previous = new ListNode<T>();
current = _curr;
previous = _prev;
try {
reset();
while(true){
if(currentData() == value)return true;
increment();
}
} catch (Exception e) {
return false;
} finally{
_curr = current;
_prev = previous;
}
}
COM: <s> returns true if there is a node with value code value code </s>
|
funcom_train/50877721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProjection(Projection inProjection){
if (inProjection instanceof AlbersEqualAreaProjection){
super.setProjection(inProjection);
myLCCProjection = (AlbersEqualAreaProjection) inProjection;
myTextFieldLatitude1.setText(""+myLCCProjection.getLatitude1());
myTextFieldLatitude2.setText(""+myLCCProjection.getLatitude2());
}
}
COM: <s> set the projection to be edited </s>
|
funcom_train/34409656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setQuadAt(int i, int p0, int p1, int p2, int p3) {
quadIndices[4*i] = p0;
quadIndices[4*i+1] = p1;
quadIndices[4*i+2] = p2;
quadIndices[4*i+3] = p2;
boundingVolume = null;
}
COM: <s> given a triangle structure and an i position this method copies </s>
|
funcom_train/38528720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File getFile(final boolean dir) {
final JFileChooser chooser = new JFileChooser();
chooser.setFileSelectionMode(dir ? JFileChooser.DIRECTORIES_ONLY
: JFileChooser.FILES_ONLY);
final boolean approved = chooser.showOpenDialog(dialog) == JFileChooser.APPROVE_OPTION;
return approved ? chooser.getSelectedFile() : new File("");
}
COM: <s> browse for a file or directory </s>
|
funcom_train/14166324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void trainingUpdated(int time){
if (st != null) {
NumberFormat nf = NumberFormat.getInstance();
nf.setMaximumFractionDigits(3);
nf.setMinimumFractionDigits(3);
currNeigh.setText(nf.format(st.getCurrNeigh()));
currLearn.setText(nf.format(st.getCurrLearn()));
}
}
COM: <s> implemented from interface training observer </s>
|
funcom_train/35111836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isValidLocation(Mover mover, int sx, int sy, int x, int y) {
boolean invalid = (x < 0) || (y < 0) || (x >= map.getWidth()) || (y >= map.getHeight());
if ((!invalid) && ((sx != x) || (sy != y))) {
invalid = map.isBlocked(mover, x, y);
}
return !invalid;
}
COM: <s> check if a given location is valid for the supplied mover </s>
|
funcom_train/5863496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAnnotatedProperties() {
List list = null;
if (_annots != null) {
for (Iterator it = _annots.keySet().iterator(); it.hasNext();) {
final Object propName = it.next();
if (propName != null) {
if (list == null) list = new LinkedList();
list.add(propName);
}
}
}
return list != null ? list: Collections.EMPTY_LIST;
}
COM: <s> returns a read only list of the name string of properties that </s>
|
funcom_train/18895860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Token getToken() {
Token token = (tokenRef != null) ? (Token) tokenRef.get() : null;
if ( (token == null) && (refCount > 0)) {
if (logger.isInfoEnabled()) {
logger.info("Lost phase token.", stack);
}
refCount = 0;
}
return token;
}
COM: <s> gets the token which represents a reference to the current phase </s>
|
funcom_train/36957339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void okPressed() {
if (!isMaxCallDepthValid()) {
if (fMaxCallDepth.forceFocus()) {
fMaxCallDepth.setSelection(0, fMaxCallDepth.getCharCount());
fMaxCallDepth.showSelection();
}
}
updateFilterFromUI();
super.okPressed();
}
COM: <s> updates the filter from the ui state </s>
|
funcom_train/5475218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTable getTb_planos() {
if (tb_planos == null) {
tb_planos = new JTable(new DefaultTableModel(new Object[][]{}, new String[]{"#","Plano","Categoria"}));
tb_planos.getColumnModel().getColumn(0).setPreferredWidth(10);
tb_planos.getColumnModel().getColumn(1).setPreferredWidth(300);
tb_planos.getColumnModel().getColumn(2).setPreferredWidth(100);
}
return tb_planos;
}
COM: <s> this method initializes tb planos </s>
|
funcom_train/7683686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateSenderPresence(int presenceIconId) {
if (presenceIconId == 0) {
// This is a placeholder used for "unknown" presence, including signed off,
// no presence relationship.
presenceIconId = R.drawable.presence_inactive;
}
mSenderPresenceView.setImageResource(presenceIconId);
}
COM: <s> update the actual ui </s>
|
funcom_train/8244223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case MENU_CONNECT:
try {
// tries to establish a connection with the server
ManagerStaticBuilder.CreateConnection(this);
// creates an intent for a new Activity and starts it (MenuViewActivity)
Intent intent = new Intent(this,wfta.client.gui.MenuViewActivity.class);
startActivity(intent);
finish();
return true;
} catch (Exception e) {
// TODO Auto-generated catch block
showDialog(ERROR_DIALOG);
}
}
return false;
}
COM: <s> actions starting by menu item selection </s>
|
funcom_train/11735459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getURI(String prefix) throws NamespaceException {
NamespaceContext current = this;
while (current != null) {
String uri = (String) current.prefixToURI.get(prefix);
if (uri != null) {
return uri;
}
current = current.parent;
}
throw new NamespaceException("Unknown prefix: " + prefix);
}
COM: <s> returns the namespace uri mapped to the given prefix </s>
|
funcom_train/25963245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeEndElement(String elementStr) throws APIException {
final String METHOD = "writeEndElement";
try {
logger.start(METHOD);
logger.debug(METHOD, "Input elementStr : " + elementStr, null);
hd.endElement("", "", elementStr);
logger.end(METHOD);
} catch (SAXException e) {
throw new APIException(
null,
METHOD,
APIAdapterReturnCodeConstants.RETURNCODE_API_INTERNAL_ERROR,
e.getMessage());
}
}
COM: <s> write xml end tag information writter </s>
|
funcom_train/42824041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConnectionTo(Node n) {
if (this.connectedTo.contains(n)) {
System.out.println("AddConnection error: already connected");
return;
} else
connectedTo.add(n);
System.out.println(new StringBuffer("AddConnection: connected").append(
getName()).append(" to ").append(n.getName()).toString());
}
COM: <s> establish a directional link between this object and another </s>
|
funcom_train/42950176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configureTableColumn(TableModel model, TableColumnExt column) {
if ((column.getModelIndex() < 0)
|| (column.getModelIndex() >= model.getColumnCount()))
throw new IllegalStateException("column must have valid modelIndex");
column.setHeaderValue(model.getColumnName(column.getModelIndex()));
}
COM: <s> configure column properties from table model </s>
|
funcom_train/2421560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCallback(DeployCallback callback) {
checkNotNull(callback, "callback");
synchronized (lock) {
if (state == State.DEPLOYING) {
illegalOperation("addCallback");
}
if (optionalCallbacks == null) {
optionalCallbacks = Lists.newArrayList();
}
optionalCallbacks.add(callback);
}
}
COM: <s> adds a callback that will be notified when the next deploy call completes </s>
|
funcom_train/3596171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NResource getResource(String observation, NFile nfile) {
Hashtable myoloads = (Hashtable)oloads.get(observation);
if (myoloads==null) { return null; }
LoadFileSet fload = (LoadFileSet)myoloads.get(nfile);
if (fload==null) { return null; }
Enumeration keys = fload.resources.keys();
if (fload.resources.size()==1) {
return (NResource)fload.resources.keys().nextElement();
}
return null;
}
COM: <s> only returns a non null list if the load type resource if </s>
|
funcom_train/27822824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected OIModelInfo getOIModelInfo(Instance oimodelInstance) throws KAONException {
OIModelInfo oimodelInfo=(OIModelInfo)m_oimodelInfos.get(oimodelInstance.getURI());
if (oimodelInfo==null) {
oimodelInfo=new OIModelInfo(this,oimodelInstance);
m_oimodelInfos.put(oimodelInstance.getURI(),oimodelInfo);
}
return oimodelInfo;
}
COM: <s> returns the oimodel info object for given instance </s>
|
funcom_train/7630378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void play() {
if (mAudio == null) {
try {
openMediaPlayer();
} catch (Exception ex) {
Log.e(TAG, "play() caught ", ex);
mAudio = null;
}
}
if (mAudio != null) {
mAudio.start();
}
}
COM: <s> plays the ringtone </s>
|
funcom_train/32185764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUserObject(Object value) {
Object oldValue = this.userObject;
this.userObject = value;
H hier = getHierarchy();
if (hier != null) hier.firePropertyChange(this, PROPERTY_ITEM_USER_OBJECT, oldValue, this.userObject);
}
COM: <s> set the developer user defined object for this tree </s>
|
funcom_train/17771215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getRand(ClusteringResult expRes, List<Integer> docNrs){
int n = expRes.nrOfElements();
return (getNrOfPairsInSameCluster(expRes) + getNrOfPairsInDifferentCluster(expRes, docNrs)) / (1.0*((n * (n-1))/2));
}
COM: <s> evaluation measure based on matching pairs </s>
|
funcom_train/29617747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getJRadioFaoDesignatedUndefined() {
if (jRadioFaoDesignatedUndefined == null) {
jRadioFaoDesignatedUndefined = new MgisRadioButton();
jRadioFaoDesignatedUndefined.setText(AppTextsDAO.get("LABEL_UNDEFINED"));
jRadioFaoDesignatedUndefined.setSelected(true);
jRadioFaoDesignatedUndefined.setBounds(308, 60, 99, 16);
jRadioFaoDesignatedUndefined.setValue("3");
faoDesignated.add(jRadioFaoDesignatedUndefined, true);
}
return jRadioFaoDesignatedUndefined;
}
COM: <s> this method initializes j radio fao designated undefined </s>
|
funcom_train/21727907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loop() {
while (!model.isQuitted()) {
Socket tempsocket = null;
if(socket.isBound()) {
try {
tempsocket = socket.accept();
Connection tempconn = new Connection(tempsocket, clientID, model);
tempconn.start();
model.connect(clientID);
connections.add(tempconn);
clientID++;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
COM: <s> method that keeps track of all connections </s>
|
funcom_train/31627085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getFirstNodeTypeInDB() throws DBException {
NodeType atype = new NodeType(RequestRegistry.getUser());
List list = atype.searchAndRetrieveList();
String result = "";
if (!list.isEmpty()) {
atype = (NodeType) list.get(0);
result = atype.getEntityName();
}
return result;
}
COM: <s> return node type in string form of first node type in database </s>
|
funcom_train/40222100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MouseEvent createPressed (Solitaire game, Widget view, int dx, int dy) {
MouseEvent me = new MouseEvent(game.getContainer(), MouseEvent.MOUSE_PRESSED,
System.currentTimeMillis(), 0,
view.getX()+dx, view.getY()+dy, 0, false);
return me;
}
COM: <s> dx dy are offsets into the widget space </s>
|
funcom_train/4521112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(LogAuditoria entity) {
LogUtil.log("saving LogAuditoria instance", Level.INFO, null);
try {
entityManager.persist(entity);
LogUtil.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved log auditoria entity </s>
|
funcom_train/5307784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof GrayPaintScale)) {
return false;
}
GrayPaintScale that = (GrayPaintScale) obj;
if (this.lowerBound != that.lowerBound) {
return false;
}
if (this.upperBound != that.upperBound) {
return false;
}
return true;
}
COM: <s> tests this code gray paint scale code instance for equality with an </s>
|
funcom_train/6274425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mergeEntities(DiscourseEntity e1,DiscourseEntity e2,float confidence) {
for (Iterator<MentionContext> ei=e2.getMentions();ei.hasNext();) {
e1.addMention(ei.next());
}
//System.err.println("DiscourseModel.mergeEntities: removing "+e2);
entities.remove(e2);
}
COM: <s> merges the specified entities into a single entity with the specified confidence </s>
|
funcom_train/2881700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String res = this.id + "=";
for (Enumeration e = values.elements(); e.hasMoreElements();) {
Object o = e.nextElement();
res += o.toString();// + " of Type " + o.getClass()+ "; " ;
}
return res;
}
COM: <s> a string describing this service location attribute </s>
|
funcom_train/2661057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getWhereClauseValue(Object value, ISQLDatabaseMetaData md) {
if (value == null || ((DerbyClobDescriptor) value).getData() == null)
return _colDef.getLabel() + " IS NULL";
else
return ""; // CLOB cannot be used in WHERE clause
}
COM: <s> when updating the database generate a string form of this object value </s>
|
funcom_train/25084342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONWriter array() throws JSONException {
if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') {
this.push('a');
this.append("[");
this.comma = false;
return this;
}
throw new JSONException(ExceptionMessage.MISPLACED_ARRAY.toString());
}
COM: <s> begin appending a new array </s>
|
funcom_train/32631813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateLog() {
System.out.println("-> testCreateLog");
DLog log = getSession().createLog("Domingo_Log");
log.openNotesLog(getServerName(), "log.nsf");
log.logAction("log something");
}
COM: <s> tests create log string </s>
|
funcom_train/38252953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireLinkActivatedEvent(SVGAElement elt, String href) {
Object[] ll = linkActivationListeners.toArray();
if (ll.length > 0) {
LinkActivationEvent ev;
ev = new LinkActivationEvent(gvtCanvas, elt, href);
for (int i = 0; i < ll.length; i++) {
LinkActivationListener l = (LinkActivationListener) ll[i];
l.linkActivated(ev);
}
}
}
COM: <s> fires a link activated event </s>
|
funcom_train/47567531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void playSounds(SoundTypez t) throws UnsupportedAudioFileException, IOException{
try{
if( t == SoundTypez.BACKGROUND_MUSIC){
//playMidiLoop(backGroundMusic);
} else if( t == SoundTypez.CANNON_BALL) {
playWaveSound( new FileInputStream(cannonFireSound));
} else if ( t == SoundTypez.SHIP_SPLASH){
playWaveSound( new FileInputStream(shipSplashSound) );
}
} catch(Exception e){
System.err.println("Could not play sound");
e.printStackTrace();
}
}
COM: <s> plays the correct sound </s>
|
funcom_train/1060102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsIndividualRepresentationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Reference_isIndividualRepresentation_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Reference_isIndividualRepresentation_feature", "_UI_Reference_type"),
Di2Package.Literals.REFERENCE__IS_INDIVIDUAL_REPRESENTATION,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is individual representation feature </s>
|
funcom_train/21656125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtCerrarSesion() {
if (btCerrarSesion == null) {
btCerrarSesion = new JButton();
btCerrarSesion.setBounds(new Rectangle(616, 132, 140, 30));
btCerrarSesion.setMnemonic('s');
btCerrarSesion.setText("Cerrar Sesión");
btCerrarSesion.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ControladorPrincipal.cerrarSesion();
}
});
}
return btCerrarSesion;
}
COM: <s> this method initializes bt cerrar sesion </s>
|
funcom_train/36547561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean findUserByRequestUsername() throws SQLException {
boolean userFound = false;
UserExample userExample = new UserExample();
userExample.createCriteria().andEmailAddressEqualTo( request.getChallengeResponse().getIdentifier() );
ArrayList<User> users = (ArrayList<User>) getUserDao().selectUserByExample( userExample );
if ( users.size() == 1 ) {
user = users.get( 0 );
userFound = true;
}
return userFound;
}
COM: <s> find user by request username </s>
|
funcom_train/15812333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void raidenOutput(Object... args) {
// XXX
String queryCond = String.format("$location inside rect(%f,%f,%f,%f)",
Double.parseDouble("0.0"), Double.parseDouble("0.0"),
Double.parseDouble("180.0"), Double.parseDouble("180.0"));
this.discoveryCallAsync(queryCond, "raidenInput", args);
}
COM: <s> this method sends messages to piax layer </s>
|
funcom_train/44011318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsValid() {
System.out.println("isValid");
CouponBO instance = new CouponBO();
boolean expResult = true;
boolean result = instance.isValid();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of is valid method of class edu </s>
|
funcom_train/45896005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(ResourceLocator rl, String language, String gameLabel) {
map.clear();
process(rl.getXML(language, "labels"));
if (gameLabel != null && !gameLabel.isEmpty()) {
if (rl.get(language, gameLabel, ResourceType.DATA) != null) {
process(rl.getXML(language, gameLabel));
}
}
}
COM: <s> load the language file s </s>
|
funcom_train/39465357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel createControlPanel() {
final JPanel controlPanel = new JPanel();
controlPanel.setBorder(createTitledBorder(ACTION_FACTORY.getString("jdbcControl_text")));
controlPanel.setLayout(new GridLayout(2, 1));
controlPanel.add(createConnectionPanel());
controlPanel.add(createStatementPanel());
return controlPanel;
}
COM: <s> create the control panel for controlling the connection and executing sql statements </s>
|
funcom_train/28981740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
setLayout(new BoxLayout (this, BoxLayout.LINE_AXIS));
setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
add(Box.createHorizontalGlue());
this.okButton = new JButton("OK");
this.okButton.setPreferredSize(BUTTON_SIZE);
add(this.okButton);
add(Box.createHorizontalStrut(4));
this.cancelButton = new JButton("Abbrechen");
this.cancelButton.setPreferredSize(BUTTON_SIZE);
add(this.cancelButton);
}
COM: <s> to be called after construction </s>
|
funcom_train/45622779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addApplicationFilePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GenerateBootstrapperType_applicationFile_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GenerateBootstrapperType_applicationFile_feature", "_UI_GenerateBootstrapperType_type"),
MSBPackage.eINSTANCE.getGenerateBootstrapperType_ApplicationFile(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the application file feature </s>
|
funcom_train/29709328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeItems() {
// we try to remove anything other than the basic
// group that have the selectentry and marqeeentry
List children = new ArrayList(getChildren());
children.remove(0); // remove the first one
for (int i = 0, n = children.size(); i < n; i++) {
this.remove((PaletteEntry) children.get(i));
}
}
COM: <s> remove everything from the paletteroot </s>
|
funcom_train/5347657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIOUtilsReadWord() throws Exception {
String firstWord = "GET";
String test0 = firstWord+" /get/0/file.txt";
InputStream stream0 = new ByteArrayInputStream(test0.getBytes());
String result = IOUtils.readWord(stream0, 3);
assertEquals("result should equal first word", result, firstWord);
InputStream stream1 = new ByteArrayInputStream(test0.getBytes());
result = IOUtils.readWord(stream1, 4);
assertEquals("result should equal first word", result, firstWord);
}
COM: <s> tests the read word method </s>
|
funcom_train/24372522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static private String firstNLines(String str, int n) {
int startingAt = 0;
for (int i = 0; i < n; i++) {
if (startingAt != -1) {
startingAt = str.indexOf('\n', startingAt + 1) + 1;
}
}
if (startingAt == -1) {
return str;
}
return str.substring(0, startingAt);
}
COM: <s> returns the first n lines of the given string </s>
|
funcom_train/49676668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fill() {
// Increments the current period value
this.periodCounter++;
// If the period is reached
if (this.periodCounter == this.period) {
if (this.currentValue != this.maxValue) {
// Add the addition value to the current value
this.currentValue += this.addition % this.maxValue;
}
this.periodCounter = 0;
}
}
COM: <s> reload the resource depending on the period </s>
|
funcom_train/17029583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUserGroup(UserGroup userGroup) {
// If null was passed in, just return
if (userGroup == null)
return;
// Make sure we have a userGroup set
if (this.userGroups == null)
this.userGroups = new HashSet<UserGroup>();
// Now add the UserGroup to the collection
if (!this.userGroups.contains(userGroup)) {
this.userGroups.add(userGroup);
}
}
COM: <s> this method add the given code user group code to the collection </s>
|
funcom_train/18736311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static final IMessageRenderer MESSAGE_MOST = new IMessageRenderer() {
public String toString() { return "MESSAGE_MOST"; }
public String renderToString(IMessage message) {
if (null == message) {
return "((IMessage) null)";
}
return renderMessageLine(message, 1, 1, 10000);
}
};
COM: <s> render message without restriction except any throwable thrown </s>
|
funcom_train/46200803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHttpGets() throws Exception {
HttpRequestExecutionHandler requestExecutionHandler = new RequestExecutionHandler() {
@Override
protected HttpRequest generateRequest(Job testjob) {
String s = testjob.getPattern() + "x" + testjob.getCount();
return new BasicHttpRequest("GET", s);
}
};
executeStandardTest(new RequestHandler(), requestExecutionHandler);
}
COM: <s> this test case executes a series of simple non pipelined get requests </s>
|
funcom_train/7647206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object readNewLongString(boolean unshared) throws IOException {
long length = input.readLong();
Object result = input.decodeUTF((int) length);
if (enableResolve) {
result = resolveObject(result);
}
int newHandle = nextHandle();
registerObjectRead(result, Integer.valueOf(newHandle), unshared);
return result;
}
COM: <s> read a new string in utf format from the receiver </s>
|
funcom_train/37840444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MarboardZone getMarboardZone(RPObject.ID objectid) {
IRPZone zone = super.getRPZone(objectid);
if (zone == null) {
return null;
}
if (zone instanceof MarboardZone) {
return (MarboardZone) zone;
}
throw new IllegalArgumentException("Excepted a MarboardZone but got something of class " + zone.getClass().getName() + ": " + zone);
}
COM: <s> gets the marboard zone in which the specified object is at the moment </s>
|
funcom_train/37483126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFormattedTextField getTbMaintenanceInterval() {
if (tbMaintenanceInterval == null) {
try {
mileageFormat = NumberFormat.getNumberInstance();
tbMaintenanceInterval = new JFormattedTextField(mileageFormat);
tbMaintenanceInterval.setValue(new Integer("0"));
tbMaintenanceInterval.setColumns(10);
}
catch (Exception e) {
// Do Nothing
}
}
return tbMaintenanceInterval;
}
COM: <s> this method initializes tb service mileage </s>
|
funcom_train/45467769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void txrolledback() {
for (int i = 0; i < _synchronizeList.size(); i++) {
TxSynchronizable sync = (TxSynchronizable) _synchronizeList.get(i);
try {
sync.rolledback(this);
} catch (Exception ex) {
String cls = sync.getClass().getName();
LOG.warn("Exception at " + cls + ".rolledback()", ex);
}
}
}
COM: <s> inform all registered listeners that the transaction was rolled back </s>
|
funcom_train/44704810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasInstance(final String language) {
if (Assert.isEnabled()) {
Assert.exists(language, String.class);
Assert.truth(language.length() == 2,
language + " is not an ISO639 language code");
}
final DataAssociationCursor instances = instances();
instances.addEqualsFilter(LANGUAGE, language);
return !instances.isEmpty();
}
COM: <s> utility method to check if this bundle already contains an </s>
|
funcom_train/40338701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String provideLastName() {
// If there is anything left, us it.
if (!treeFile.getName().isEmpty()) {
return treeFile.getPath();
}
// For empty relative paths, inject a dot ('.') as base
if (!treeFile.isAbsolute()) {
return ".";
}
// For empty absolute paths, let the PARENT_PATH define the root
return "";
}
COM: <s> provide the name of the last tree element being careful to avoid an </s>
|
funcom_train/49411038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toCSV() throws IOException {
String tape = tapeName.substring(tapeName.lastIndexOf(File.separator) + 1, tapeName.length());
tape = tape.substring(0, tape.lastIndexOf('.'));
String csvFile = new File(indexDir, tape + ".csv").getAbsolutePath();
this.toCSV(csvFile);
}
COM: <s> writes index item values to a csv file in the following format br </s>
|
funcom_train/28662187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showErrorDialog(final String title, final String message, final String reason, final IStatus status) {
ErrorDialog errorDialog = new ErrorDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
title, message, status, IStatus.ERROR);
errorDialog.open();
}
COM: <s> shows an error dialog with a details button for detailed error </s>
|
funcom_train/13439725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enclosePanelByScrollbars() {
JScrollPane scroller = new JScrollPane();
scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
scroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
JViewport vp = scroller.getViewport();
vp.add(this.txtPanel);
add(scroller, BorderLayout.CENTER);
}
COM: <s> puts the panel into scroll bars </s>
|
funcom_train/16792141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlayInfo(PlaybackDescription play, Event event, FileInfoShort file) {
Playback old = this.playback;
this.playback = play == null ? null : new Playback(this, play, event, file);
this.firePropertyChange("playinfo", old, this.playback);
}
COM: <s> set the play info along with additional information </s>
|
funcom_train/14170903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendMessage(IMessage message) {
final IMessageEncoder encoder = getEncoder();
if (encoder != null) {
if (logger.isDebugEnabled()) {
logger.debug("Sending message: " + message.toString());
}
try {
send(encoder.encode(message));
} catch (ConnectionException e) {
logger.warn("Failed to send message " + message.toString()
+ " over " + toString(), e);
}
}
}
COM: <s> sends the message to the remote side </s>
|
funcom_train/36150075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCategory(String cat) {
if (!cat.equals("")) {
int index = getIndex(cat);
if (index == -1) {
categories.addElement(cat);
frequencies.addElement(new Integer(0));
}
else {
frequencies.setElementAt(
new Integer(frequencies.elementAt(index).intValue() + 1),
index);
}
}
}
COM: <s> adds the given category to the counter </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.