__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/10671317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result testSimpleSizeVary() throws Exception {
child = (BeanContextChildSupport) context
.instantiateChild("java.beans.beancontext.BeanContextChildSupport");
assertEquals("number of children in the bean context is varied",
context.size(), 102);
return result();
}
COM: <s> its verified number of children is changes </s>
|
funcom_train/4380661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
if (connector == null || !Raptor.getInstance().isDisposed()) {
execute();
} else {
if (LOG.isInfoEnabled()) {
LOG
.info("Execution of runnable vetoed beause raptor is disposed "
+ this);
}
}
} catch (Throwable t) {
if (connector != null) {
connector.onError("Error in exceute", t);
} else {
Raptor.getInstance().onError("Error in execute", t);
}
}
}
COM: <s> do not override this </s>
|
funcom_train/38290322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NodeIterator getMarkIterator(Node node) {
final NodeFilter geneRefFilter = new NodeFilter() {
/*
* (non-Javadoc)
* @see org.w3c.dom.traversal.NodeFilter#acceptNode(org.w3c.dom.Node)
*/
public short acceptNode(Node n) {
return (getRef(n) != null) ? NodeFilter.FILTER_ACCEPT
: NodeFilter.FILTER_REJECT;
}
};
final NodeIterator iterator = DOMUtils.getDocumentTraversal(
DOMUtils.getOwnerDoc(node)).createNodeIterator(node,
NodeFilter.SHOW_ELEMENT, geneRefFilter, false);
return iterator;
}
COM: <s> walks through the descendants of the node and returns all </s>
|
funcom_train/8088191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initialize(Instances data, int type, int[] indices) {
m_Data = new Instances(data, 0);
m_Type = type;
m_AllowedIndices = new int[indices.length];
System.arraycopy(indices, 0, m_AllowedIndices, 0, indices.length);
locate();
m_Indices = find(true);
m_LocatorIndices = find(false);
}
COM: <s> initializes the attribute locator </s>
|
funcom_train/12647024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getImage(java.awt.image.ImageProducer producer) {
// NOTE: If the system has to support multiple screens,
// and the screens can have different underlying ColorModels,
// we might have to carry around a "meta" ImageRepresentation
// and program the system accordingly. Some aspects of the
// image implementation in sun.awt.image may have to change
// to accomodate this.
return gfxSys.getImage(producer);
}
COM: <s> get an implementation of an image that corresponds to the </s>
|
funcom_train/29626413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChannel(String URL, String alias) {
//Add a new channel
try{
Channel ch = new Channel(URL, alias);
channels.add(ch);
}catch(MalformedURLException e){
JOptionPane.showMessageDialog(null, "The URL provided is not valid", "TVTray Error", JOptionPane.ERROR_MESSAGE);
}
}
COM: <s> adds a channel based on the xml tv feed at the specified url </s>
|
funcom_train/32759702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endLogging() {
// Log that we are closing the application
this.logInfo(this.getClass(), "Logging service stopped: " + Calendar.getInstance().getTime().toString() );
// Flush the stream to the logging file and close
this.hndCons.close();
}
COM: <s> shut down the logging service </s>
|
funcom_train/48749019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSubnode(ReusableChar key, FilterTreeNode newSubnode) throws Exception {
if (subnodes == null) {
subnodes = new HashMap();
}
// if (subnodes.containsKey(key)) {
// throw new Exception(key + " already exists as a subnode");
// }
subnodes.put(key,newSubnode);
}
COM: <s> set a subnode based upon the character key </s>
|
funcom_train/37483073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuBar getJJMenuBar() {
if (jJMenuBar == null) {
jJMenuBar = new JMenuBar();
jJMenuBar.add(getJFile());
jJMenuBar.add(getJEdit());
jJMenuBar.add(getJView());
jJMenuBar.add(getJHelp());
}
return jJMenuBar;
}
COM: <s> this method initializes j jmenu bar </s>
|
funcom_train/7790739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseEntered(MouseEvent e) {
if (enabled) {
String hex =
Integer.toHexString(model.primaryTextColor.getRGB())
.substring(2, 8);
label.setText("<html><Font Color=#" + hex + "><b>" + label.text
+ "</b></Font></html>");
}
}
COM: <s> when the user hover on label the text will be bolded </s>
|
funcom_train/48181402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double areaUnderCurve() {
double s=0;
for(int i=0; i<length(); i++) {
s += getDetectionRate(i) * (getPolicyCostPi(i+1)-getPolicyCostPi(i-1));
}
s += (getPolicyCostPi( length()) - getPolicyCostPi( length()-1));
return s/2;
}
COM: <s> ranging between 0 </s>
|
funcom_train/14421953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _setSelection(final String text) {
assertEnabled();
final int indexOf = syncExec(new IntResult() {
public int run() {
String[] items = getCCombo().getItems();
return Arrays.asList(items).indexOf(text);
}
});
if (indexOf == -1)
throw new RuntimeException("Item `" + text + "' not found in combo box.");
asyncExec(new VoidResult() {
public void run() {
getCCombo().select(indexOf);
}
});
}
COM: <s> sets the selection to the given text </s>
|
funcom_train/39964982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matches(String name) {
if (name != null && name.equalsIgnoreCase(shortName)) {
return true;
} else {
if (aliasses != null) {
for (String alias : aliasses) {
if (alias.equalsIgnoreCase(name)) {
return true;
}
}
}
}
return false;
}
COM: <s> returns true if this object matches the specified name </s>
|
funcom_train/4509961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addPresenceSubscriptions() {
for (NodeAffiliate affiliate : affiliates) {
if (affiliate.getAffiliation() != NodeAffiliate.Affiliation.outcast &&
(isPresenceBasedDelivery() || (!affiliate.getSubscriptions().isEmpty()))) {
service.presenceSubscriptionRequired(this, affiliate.getJID());
}
}
}
COM: <s> unsubscribe from affiliates presences if node is only sending notifications to </s>
|
funcom_train/669569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void closeRestOfTrail(int ordinal) {
if (ordinal < 0) {
return;
}
for (int i = ordinal + 1; i < trail.size(); i++) {
BreadcrumbBean b = (BreadcrumbBean) trail.get(i);
b.setStatus(Status.UNAVAILABLE);
trail.set(i, b);
}
return;
}
COM: <s> make everything in the trail after the specified ordinal unavailable </s>
|
funcom_train/43409987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProcessBrowsePanel getJAddProcessInnerPanel() {
if (jAddProcessInnerPanel == null) {
CommonTableModel tableModel = new CommonTableModel(
TableModels.PROCESS_COLUMNS, TableModels.PROCESS_METHODS);
ProcessFilterManager mgr = new ProcessFilterManager();
tableModel.setList(mgr.getList());
jAddProcessInnerPanel = new ProcessBrowsePanel(mgr, tableModel);
}
return jAddProcessInnerPanel;
}
COM: <s> this method initializes j add process panel </s>
|
funcom_train/2800551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(String pProperty) throws RaccoonException {
try {
return mProperties.getString(pProperty).trim();
} catch (java.util.MissingResourceException e) {
throw new RaccoonException(ErrorCodes.RESOURCE_NOT_FOUND, getMissingPropertyMsg(pProperty), e);
}
}
COM: <s> reads the value of the propery and converts it to a string </s>
|
funcom_train/799982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Font getFont( FontData fontData ) {
if ( fontData == null )
return null;
notDisposed( device );
Font font = (Font) fonts.get( fontData );
if ( font == null ) {
font = new Font( device, fontData );
fonts.put( SWTUtil.copy( fontData ), font );
}
return font;
}
COM: <s> returns a font for the passed in font data </s>
|
funcom_train/3272096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNotificationEnabled(javax.management.Notification notification) {
if (interestedTypes == null)
return false;
for (int i=0; i < interestedTypes.length; i++) {
if (notification.getType().indexOf(interestedTypes[i]) == 0)
return true;
}
return false;
}
COM: <s> returns true if a notifications type is one of these types </s>
|
funcom_train/41510567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onFlush(FlushEvent event) throws HibernateException {
final EventSource source = event.getSession();
try{
if ( source.getPersistenceContext().hasNonReadOnlyEntities() ) {
flushEverythingToExecutions(event);
performExecutions(source);
postFlush(source);
if ( source.getFactory().getStatistics().isStatisticsEnabled() ) {
source.getFactory().getStatisticsImplementor().flush();
}
}
}finally{
cleanDirties(source);
}
}
COM: <s> handle the given flush event </s>
|
funcom_train/5511386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getEndOffset() {
int endOffset = this.getStartOffset();
if (this.isTextElement()) {
endOffset += this.getXValue().length();
}
if (this.getChildCount() > 0) {
endOffset = ((XElementImpl) this.children.getLast()).getEndOffset();
}
return endOffset;
}
COM: <s> gets the ending offset in the model for the element </s>
|
funcom_train/23944084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void importPrivateKey(String alias, char[] password, String keyData, String certData) throws IOException {
KeystoreManager mgr = new KeystoreManager();
mgr.load(locationPrefix + location, password());
mgr.importPrivateKey(alias, password,
new ByteArrayInputStream(keyData.getBytes("UTF-8")),
new ByteArrayInputStream(certData.getBytes("UTF-8"))
);
mgr.save(locationPrefix + location, password());
}
COM: <s> imports a private key with certificate into this keystore </s>
|
funcom_train/37190238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisible(boolean value) {
if(value) {
final Object[] list = serverAccess.getDatabaseList();
databaseName = serverAccess.getDatabaseName();
schemaName = serverAccess.getSchemaName();
cbDatabases.removeAllItems();
if(list != null) {
for(int i = 0; i < list.length; i++) {
cbDatabases.addItem(list[i]);
}
}
cbDatabases.setSelectedItem(serverAccess.getDatabaseName());
}
super.setVisible(value);
}
COM: <s> show the dialog </s>
|
funcom_train/34781607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveData(final OutputStream saveStream) throws IOException {
final DataOutputStream out = new DataOutputStream(saveStream);
// write RAM data
for (int i = 0, to = getRAMBanks().length; i < to; ++i) {
out.write(getRAMBanks()[i]);
}
// write additional data if necessary
serialize(out);
out.flush();
}
COM: <s> get output stream with data that needs to be saved </s>
|
funcom_train/37034044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString() throws java.io.UnsupportedEncodingException {
int length = getInt();
if( (length == 0xFFFF) || (length == -1) ) {
// System.out.println("null string " + length);
return null;
}
String s = new String(buff, pos, length, encoding);
pos += length;
pos++; // Skip the terminating \0
return s;
}
COM: <s> read a string from the packet and advance the read position </s>
|
funcom_train/34061880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
tabPanel = new DecoratedTabPanel();
tabPanel.setWidth("400px");
tabPanel.setAnimationEnabled(true);
tabPanel.add(createPersonelGirisTabContent(), "Yeni Personel");
tabPanel.add(createPersonelListesiTabContent(), "Personel Listesi");
tabPanel.selectTab(1);
// Add the nameField and sendButton to the RootPanel
// Use RootPanel.get() to get the entire body element
RootPanel.get("myFieldContainer").add(tabPanel);
}
COM: <s> this is the entry point method </s>
|
funcom_train/9882945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enableClusterSelection() {
JPanel tempPanel = popNClusterPanel;
tempPanel.setLayout(new GridBagLayout());
tempPanel.setBorder(BorderFactory.createEmptyBorder());
tempPanel.removeAll();
tempPanel.validate();
tempPanel.setOpaque(false);
tempPanel.add(browser, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0,
GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(
0, 0, 0, 0), 0, 0));
}
COM: <s> cluster selection panel is returned to its non grayed out state </s>
|
funcom_train/44872220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JEditorPane getAboutEditor() {
if (aboutEditor == null) {
aboutEditor = new JEditorPane();
aboutEditor.setEditable(false);
aboutEditor.setContentType("text/plain");
StringBuffer about = new StringBuffer();
about.append("WCMGrapher\n");
about.append("(c) 2007 Thomas S. Downey\n");
about.append("version " + version + "\n");
about.append("\nFreeHep vector graphics library\n(c) 2000-2005 FreeHep\n");
aboutEditor.setText(about.toString());
}
return aboutEditor;
}
COM: <s> this method initializes about editor </s>
|
funcom_train/45257239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectAllAction(IAction action) {
if (selectAllAction == action) {
return;
}
if (selectAllAction != null) {
selectAllAction
.removePropertyChangeListener(selectAllActionListener);
}
selectAllAction = action;
if (selectAllAction != null) {
selectAllAction.addPropertyChangeListener(selectAllActionListener);
}
cellSelectAllAction.updateEnabledState();
}
COM: <s> sets the default code iaction code handler for the select all </s>
|
funcom_train/41503848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void threadTerminated() {
System.out.println("jkl 123 ");
// TODO: Implement MiniScheduler::threadTerminated()
MiniThread temp = readyQueue.getHead();
temp.setThreadState(MiniThread.THREAD_RUNNING);
//runningThread.getProcess().getThreads().remove(runningThread.getTid());
runningThread.stop();// et2aked ezay tunlock ellmonitors bta3to
runningThread.destroy();//
runningThread = temp;
temp.resumeExecution();
}
COM: <s> b un implemented b invoked to indicate that the b running thread b </s>
|
funcom_train/49608711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteWaitingPerson(String username,EntityManager em,WaitingPersonPK pk) throws Throwable {
try {
Query q = em.createQuery("delete from WaitingPerson wp where wp.pk=?1");
List<Object> params = new ArrayList<Object>();
params.add(pk);
JPAMethods.executeUpdate(username, q, params);
em.flush();
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
}
COM: <s> phisically delete the specified waiting person object </s>
|
funcom_train/45715516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getElementAt(int index) {
if (index >= 0 && index < OJ.getData().getResults().getColumns().getAllColumnsCount())
return OJ.getData().getResults().getColumns().getColumnByIndex(index);
return null;
}
COM: <s> returns n th column oj </s>
|
funcom_train/42012750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JList getJlSecciones() {
if (jlSecciones == null)
{
creaModeloSecciones();
jlSecciones = new JList();
jlSecciones.setModel(this.modeloSecciones);
jlSecciones.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
jlSecciones.addListSelectionListener(this);
// incialización de la lista
if(this.seccionSeleccionada!=null)
{
for (int i=0;i<this.arraySecciones.length;i++)
if(arraySecciones[i].getNombreSeccion().equals(seccionSeleccionada.getNombreSeccion()))
{
jlSecciones.setSelectedIndex(i);
break;
}
}
}
return jlSecciones;
}
COM: <s> this method initializes jl secciones </s>
|
funcom_train/37790674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showPermission(Permission perm, Component component) {
//SwingUtilities.convertPointToScreen(component.getLocation(), component);
Point location = SwingUtilities.convertPoint(component, new Point(component.getWidth(),0), getInfoPane().getLayer());
showPermission(perm, location);
}
COM: <s> show the reason why a permission was or wasnt given </s>
|
funcom_train/8374174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize(){
for(int i=0;i<x.length;i++){
x[i] = 0;
}
for(int i=0;i<p+1;i++){
e[i] = k[i] = 0;
for(int j=0;j<p+1;j++){
alpha[i][j] = 0;
}
}
}
COM: <s> initializing the arrays x e k alpha </s>
|
funcom_train/46471449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeOutput() {
try {
ResultSet r;
synchronized (this.selectAll) {
r = this.selectAll.executeQuery();
}
while(r.next()) {
long time = r.getLong("toa");
int uid = r.getInt("uid");
String output = r.getString(DatabaseConnection.dataColumn);
this.storeOutput(time, uid, output);
}
} catch (SQLException sqle) {
System.out.println("DatabaseConnection: " + sqle);
}
}
COM: <s> queries the output table and notifies all output handlers of the output </s>
|
funcom_train/4883068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String _getWelcomeData(ModelMap model, Sport sport, Player player) {
model.addAttribute("sports", daoUtility.getAll(Sport.class));
new ViewUpcomingGamesAndTipsController(daoUtility, fbPortal, businessRules, userTransientDataAccessor).getUpcomingGamesAndTips(model, sport, player);
return "welcome";
}
COM: <s> this method populates the specified model with </s>
|
funcom_train/17991661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetDueDateTask(TaskInfo selectedTask) {
// Store the new task information...
m_selectedTask = selectedTask;
m_selectedTaskEvent = m_selectedTask.getEvent();
// ...and put it into affect.
setBanner();
setAllDay();
setDueDate(true ); // true --> Start date.
setDueDate(false); // false -> End date.
setDurationDays();
}
COM: <s> resets the dialog based on a new task </s>
|
funcom_train/22470464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getUrl(String pagename, Object... params) {
ExternalService es = new ExternalService();
es.setLinkFactory(_linkFactory);
ExternalServiceParameter param = new ExternalServiceParameter(pagename, params);
ILink link = es.getLink(false, param);
String url = link.getURL();
return url.replaceAll("&", "&"); // quirky method to escape ampersands
}
COM: <s> returns a tapestry url </s>
|
funcom_train/21999563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveSettingsAndExit() {
menuMain.endTimeUpdateSchedJob();
endTimeUpdateSchedJob();
// Save window dimensions in prefs file
displayPreferences.x = getX();
displayPreferences.y = getY();
displayPreferences.width = getWidth();
displayPreferences.height = getHeight();
PreferencesManager.putDisplayPreferences(displayPreferences);
// Call save() on each module so they can save their
// preferences data
desktopManager.save(true);
// Shutdown the database if necessary
DatabaseStart.shutdown();
dispose();
System.exit(0);
}
COM: <s> save settings and exit </s>
|
funcom_train/14328609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tdsReturnStatusToken() throws IOException, SQLException {
returnStatus = new Integer(in.readInt());
if (this.returnParam != null) {
returnParam.setOutValue(Support.convert(this.connection,
returnStatus,
returnParam.jdbcType,
connection.getCharset()));
}
}
COM: <s> process stored procedure return status token </s>
|
funcom_train/14093040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCalculateSouth() {
MyTestClass myClass = new MyTestClass();
myClass.setPosition(SOUTH);
Point l = myClass.calculatePoint(new Rectangle(0, 0, 7, 7));
Point v = new Point(3, 7);
assertEquals("South:", v, l);
}
COM: <s> test calculation of south position </s>
|
funcom_train/8380680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sourceValidate(Text source) {
if (source.getText() == null || source.getText().equals(""))
glueweb.pages.LogPanel.printLine("source location is null");
else if (!(new File(source.getText())).exists()) {
glueweb.pages.LogPanel.printLine("source location not exists");
}
}
COM: <s> checks that source location is null </s>
|
funcom_train/40945273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object lastItemId() {
try {
if (filteredItemIds != null) {
final Iterator i = filteredItemIds.iterator();
Object last = null;
while (i.hasNext()) {
last = i.next();
}
return last;
}
return itemIds.get(itemIds.size() - 1);
} catch (final IndexOutOfBoundsException e) {
}
return null;
}
COM: <s> gets the id of the last item in the list </s>
|
funcom_train/10943229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(PreparedStatement ps, int parameterIndex, T obj) throws SQLException {
if (obj == null) {
ps.setNull(parameterIndex, this.getSqlType());
return;
}
this.castAndSetValue(ps, parameterIndex, obj);
}
COM: <s> sets a value in a code prepared statement code </s>
|
funcom_train/37189804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRecords(Object[][] data, boolean[][] editable) {
final boolean fromCode = this.fromCode;
this.fromCode = true;
removeAllRows();
this.editable = editable;
if(data != null) {
for(int i = 0; i < data.length; i++) {
addRow(data[i]);
}
}
pastRow = 0;
setDataChanged(false);
this.fromCode = fromCode;
}
COM: <s> replaces the previous data with new data </s>
|
funcom_train/41162884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(MaConstants entity) {
EntityManagerHelper.log("saving MaConstants instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved ma constants entity </s>
|
funcom_train/13448307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateInsertionLocation(JComponent comp, Point p) {
JTree tree = (JTree) comp;
OriginalBasicTreeUI ui = (OriginalBasicTreeUI) tree.getUI();
TreePath path = ui.getClosestPathForLocation(tree, p.x, p.y);
if (path != null) {
tree.setSelectionPath(path);
}
}
COM: <s> called to set the insertion location to match the current </s>
|
funcom_train/5243307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAttribute(Att att) {
if (this.getAttribute(att.getName()) == null) {
return;
}
else {
if (att instanceof AttVariable) {
AttVariable tempAtt = (AttVariable)this.getAttribute(att.getName());
tempAtt.setAvailable(calculateFormula(att, att.getRemoveFormula()));
}
else {
deleteAttribute(att);
}
}
}
COM: <s> this removes attributes on a unit </s>
|
funcom_train/3312830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getFontSizes(ArrayList fontList){
javax.swing.text.Element root = doc.getDefaultRootElement();
int anfang = 0;
int ende = root.getEndOffset();
while(anfang < ende){
cha = doc.getCharacterElement(anfang);//the paragraph element
attributeSet = new SimpleAttributeSet(cha.getAttributes());
fontList.add(new Integer(StyleConstants.getFontSize(attributeSet)));
anfang= cha.getEndOffset();
}
return fontList;
}
COM: <s> this method sets the fontsizes used in this text int the array list </s>
|
funcom_train/31904791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(float c) {
if (count == colors.length) {
float[] t = new float[count * 2];
for (int i = 0; i < count; i++) {
t[i] = colors[i];
}
colors = t;
}
colors[count++] = c;
}
COM: <s> appends a color to the list </s>
|
funcom_train/48909225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getRbEmpleado() {
if (rbEmpleado == null) {
rbEmpleado = new JRadioButton();
rbEmpleado.setBounds(new Rectangle(462, 15, 83, 25));
rbEmpleado.setText("Empleado");
rbEmpleado.setOpaque(false);
rbEmpleado.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
verificarSeleccion();
}
});
}
return rbEmpleado;
}
COM: <s> this method initializes rb empleado </s>
|
funcom_train/10153858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean okPressed() {
boolean retVal = true;
if (isEditDlg) {
retVal = setChangedData();
}
else {
if (registeredNSSelected) {
// get the checked registered namespaces.
setRegisteredData();
}
else {
retVal = setNewNSData();
}
}
canceled = false;
return retVal;
}
COM: <s> invoked when the user clicks the ok button </s>
|
funcom_train/44876064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testVerifyFileAsRoot() {
ClassStore store = new DirectoryClassStore(new File(getBaseDir() + "my.properties"), sessionCache);
try {
store.verifyClassStore();
fail("Store verified a file as the base directory.");
}
catch (Exception e) {
// expected
}
}
COM: <s> test that verifies that a non directory given as the root </s>
|
funcom_train/47678745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkPermission(String functionsList, String reqFunctions, boolean checkAll) {
Iterator<String> reqFunc = extractFunctions(reqFunctions);
while (reqFunc.hasNext()) {
if (checkFunction(functionsList, (String)reqFunc.next())) {
if (!checkAll) return true;
} else {
if (checkAll) return false;
}
}
return checkAll;
}
COM: <s> searches for the required functions in function list </s>
|
funcom_train/48213082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParentType(JDBCDataSourceType type) {
if (parentType != null) {
parentType.removePropertyChangeListener(parentTypeUpdater);
}
parentType = type;
if (parentType != null) {
parentType.addPropertyChangeListener(parentTypeUpdater);
}
parentSet = true;
putImpl(DBCS_CONNECTION_TYPE, type.getName(), "parentType");
}
COM: <s> sets the parent type configured for this data source and fires a </s>
|
funcom_train/18644039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void subSessionFinished(Session parent, Session session) {
String xml="<sd:"+TrackerEvent.SUB_SESSION_FINISHED+
" "+SERVICE_INSTANCE_ID_ATTR+"=\""+
getServiceInstanceId(session)+"\" "+
PARENT_SESSION_ID_ATTR+"=\""+getSessionId(parent)+
"\" "+SESSION_ID_ATTR+"=\""+
getSessionId(session)+"\" "+TIMESTAMP_ATTR+"=\""+
System.currentTimeMillis()+"\" />";
record(getServiceName(session), session, xml, INFO, null);
}
COM: <s> this method indicates that an existing </s>
|
funcom_train/9020523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Size2D calculateDimensions(final Canvas g2) {
double width = 0.0;
double height = 0.0;
final Iterator iterator = this.fragments.iterator();
while (iterator.hasNext()) {
final TextFragment fragment = (TextFragment) iterator.next();
final Size2D dimension = fragment.calculateDimensions(g2);
width = width + dimension.getWidth();
height = Math.max(height, dimension.getHeight());
}
return new Size2D(width, height);
}
COM: <s> calculates the width and height of the text line </s>
|
funcom_train/6488689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void localInit(File propDir, String propFilename) {
intFrame = SoupUtil.getReferenceFrame();
LogTools.trace(logger, 25, "UserPropertiesManagerImpl.<init>");
// Initialise properties.
maxCharsPerLine = resources.getIntProperty("dss.dialog.lines.max.width", 20);
this.propDir = propDir;
this.propFilename = propFilename;
// Initialise with some empty properties.
_prop = new Properties();
}
COM: <s> local constructor initialisation </s>
|
funcom_train/19849552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadOrganizations() throws JAXBException, IOException {
this.organizations.clear();
for (Organization o : ((Organizations) JAXBContext.newInstance(Organizations.class)
.createUnmarshaller().unmarshal(
new File(
this.path + File.separatorChar + this.organizationsFile))).getOrganization()) {
addOrganization(o);
}
}
COM: <s> load organization data from its xml file </s>
|
funcom_train/39294092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addContractTemplatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ContractType_contractTemplate_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ContractType_contractTemplate_feature", "_UI_ContractType_type"),
CntPackage.Literals.CONTRACT_TYPE__CONTRACT_TEMPLATE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the contract template feature </s>
|
funcom_train/12848088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void drawOval(float rw,float rh,Stroke stroke,Color color){
Shape s = new java.awt.geom.Ellipse2D.Float(cx-rw,cy-rh,rw*2,rh*2);
draw(s,stroke,color);
}
COM: <s> draw a circle or an ellipse </s>
|
funcom_train/4497340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReadWriteFPBits() throws IOException {
//double value = -71532367676.9798;
double value = 0.1;
int nBits = OutputBitStream.getFPBitsLength(value);
outStream.writeFPBits(value, nBits);
initInStream();
// max delta is 1/65536
assertEquals(value, inStream.readFPBits(nBits), 1.0 / 65536);
}
COM: <s> tests read fpbits and write fpbits </s>
|
funcom_train/1448681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String updateOptionalFees() throws Exception{
if (logger.isDebugEnabled()) {
logger.debug("updateOptionalFees() - start"); //$NON-NLS-1$
}
for (AdditionalOptionsFees additionalOptionsFees : this.additionalOptionsFeesMap.values()) {
AdditionalOptionsFeesServiceDelegator.updateAdditionalOptionsFees(additionalOptionsFees);
}
if (logger.isDebugEnabled()) {
logger.debug("updateOptionalFees() - end"); //$NON-NLS-1$
}
return SUCCESS;
}
COM: <s> update optional fees </s>
|
funcom_train/32209610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Dimension layoutSize(Dimension buttonSize) {
if (buttonSize.width == 0) return new Dimension(0, 0);
else return new Dimension(leftMargin() + buttons.size() * (buttonSize.width + 5) - 5 + rightMargin(),
topMargin() + buttonSize.height + bottomMargin());
}
COM: <s> calculate the size of a layout using a uniform button size </s>
|
funcom_train/46744206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSettingsFormId(Long settingsFormId) {
if (!(this.settingsFormId.longValue() == settingsFormId.longValue())) {
Long oldsettingsFormId= 0L;
oldsettingsFormId = this.settingsFormId.longValue();
this.settingsFormId = settingsFormId.longValue();
setModified("settingsFormId");
firePropertyChange(String.valueOf(ORDERS_SETTINGSFORMID), oldsettingsFormId, settingsFormId);
}
}
COM: <s> foreign key to forms </s>
|
funcom_train/3071877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Resource getResourceFromCollection(String url){
if(url==null){
return null;
}else{
int i=-1;linearSearch(resources,url,exactMatchingComparator);
if(i<0){
i=linearSearch(resources,url,regExprMatchingComparator);
}
if(i<0){
//nothning found
return new PublicResource("_X_",url);
}else{
Object obj= resources.elementAt(i);
if(obj instanceof PublicResource){
return ((PublicResource)obj).getCopy(url);
}else{
return ((ProtectedResource)obj).getCopy(url);
}
}
}
}
COM: <s> gets the resource template from the resource template vector </s>
|
funcom_train/11783273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String buildListIdentifiersQuery(String metadataPrefix, String from, String until, String set) {
StringBuffer buffer = new StringBuffer(extendedBasesurl);
buffer.append(Verb.ListIdentifiers);
buffer.append(AMPERSAND).append(METADATA_PREFIX).append(EQUAL_SIGN).append(metadataPrefix);
if (from != null)
buffer.append(AMPERSAND).append(FROM).append(EQUAL_SIGN).append(from);
if (until != null)
buffer.append(AMPERSAND).append(UNTIL).append(EQUAL_SIGN).append(until);
if (set != null)
buffer.append(AMPERSAND).append(SET).append(EQUAL_SIGN).append(set);
return buffer.toString();
}
COM: <s> build the query for a code list identifiers code request </s>
|
funcom_train/12896164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long doCheckout(SVNRevision revision) throws SVNException {
if (revision == null) {
revision = SVNRevision.HEAD;
}
long wcRevision = getUpdateClient().doCheckout(
SVNURL.parseURIEncoded(_repositoryURL),
_localDir,
revision,
revision,
_isRecursive );
return wcRevision;
}
COM: <s> checkout the artifacts from the repository by revision </s>
|
funcom_train/41516719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeNodes(MibNode root) {
Iterator iter = nodes.entrySet().iterator();
Map.Entry entry;
MibNode node;
while (iter.hasNext()) {
entry = (Map.Entry) iter.next();
node = (MibNode) entry.getValue();
if (node.isNodeDescendant(root)) {
iter.remove();
}
}
}
COM: <s> removes descendant nodes from the node hash </s>
|
funcom_train/21016120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void putLocation(Rectangle2D rect) {
Geometry.translateRect(rect, _paddingLeft, _paddingTop);
_locations[_currentLocation++] = rect;
_width = Math.max(_width, rect.getX() + rect.getWidth()
+ _paddingRight);
_height = Math.max(_height, rect.getY() + rect.getHeight()
+ _paddingBottom);
}
COM: <s> sets a rectangle as current location </s>
|
funcom_train/18524595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void findBtn_ActionPerformed(ActionEvent actionEvent) {
try {
// try to load the class using the JPTCClassLoader
JPTCClassLoader.getClass(getNameTextField().getText().trim());
MessageDialogs.showMessage(MessageConstants.CLASSFOUND_INFORMATION, this, getNameTextField().getText());
} catch (Exception ex) {
MessageDialogs.showMessage(MessageConstants.CLASSNOTFOUND_ERROR, this, ex.toString());
}
return;
}
COM: <s> find btn action </s>
|
funcom_train/40425408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color parseColorNoOpenBrace() throws IOException {
int r = lexer.getInt();
checkColorValue("r", r);
int g = lexer.getInt();
checkColorValue("g", g);
int b = lexer.getInt();
checkColorValue("b", b);
int a = lexer.getInt();
checkColorValue("a", a);
parseExpected("}");
COM: <s> parse a color representation when the opening brace has already been </s>
|
funcom_train/546554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getExtendedParamIndex(String name) {
if( extParamName==null )
return -1;
boolean found = false;
int i=0;
while(i<extParamName.length && !found) {
found = name.equalsIgnoreCase(extParamName[i]);
if(!found) i++;
}
if( found )
return i;
else
return -1;
}
COM: <s> returns the index of the specified extended param 1 when not found </s>
|
funcom_train/50865900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMapType(String mapType) {
this.mapType = mapType;
if (SurfMarsMap.TYPE.equals(mapType)) map = surfMap;
else if (TopoMarsMap.TYPE.equals(mapType)) map = topoMap;
else if (USGSMarsMap.TYPE.equals(mapType)) map = usgsMap;
showMap(centerCoords);
}
COM: <s> sets the map type </s>
|
funcom_train/18053295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getSvSecretTableEditMenuItem() {
if (svSecretTableEditMenuItem == null) {
svSecretTableEditMenuItem = new JMenuItem();
svSecretTableEditMenuItem.setText("Edit...");
svSecretTableEditMenuItem
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
openEditor(getSelectedSecret());
}
});
}
return svSecretTableEditMenuItem;
}
COM: <s> this method initializes sv secret table edit menu item </s>
|
funcom_train/25664521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removePlayer(final int playerNumber) throws IndexOutOfBoundsException {
final Player player = this.players.set(playerNumber, null);
if (player != null && this.playersPerColour != null) {
for (final int colour : player.getArmies()) {
final int numPlayers = this.playersPerColour.get(colour);
this.playersPerColour.put(colour, numPlayers - 1);
}
}
}
COM: <s> removes a player from the game </s>
|
funcom_train/17567851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object convert(Class type, Object value) {
if (value == null) {
if (useDefault) {
return (defaultValue);
} else {
return (BigDecimal) null;
}
}
if (value instanceof BigDecimal) {
return (value);
}
try {
return (new BigDecimal(value.toString()));
} catch (Exception e) {
if (useDefault) {
return (defaultValue);
} else {
throw new ConversionException(e);
}
}
}
COM: <s> convert the specified input object into an output object of the specified </s>
|
funcom_train/39281592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean addIfUnderPoolSize() {
Thread t = null;
final ReentrantLock mainLock = this.mainLock;
mainLock.lock();
try {
if (currentPoolSize < poolSize)
t = addThread();
} finally {
mainLock.unlock();
}
if (t == null)
return false;
t.start();
return true;
}
COM: <s> create and start a new thread running task only if </s>
|
funcom_train/10361443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateProperties(final BeanDefinition beanDefinition, final ElementBuilder builder) {
MutablePropertyValues properties = beanDefinition.getPropertyValues();
@SuppressWarnings({"unchecked"})
List<PropertyValue> list = properties.getPropertyValueList();
for (PropertyValue property : list) {
generatePropertyElement(beanDefinition, builder, property);
}
}
COM: <s> generates declarations for properties of given bean definition </s>
|
funcom_train/34562765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Item cp2str(final Iter iter) throws QueryException {
final TokenBuilder tb = new TokenBuilder();
Item i;
while((i = iter.next()) != null) {
final long n = checkItr(i);
if(!XMLToken.valid(n)) Err.or(INVCODE, i);
tb.addUTF((int) n);
}
return Str.get(tb.finish());
}
COM: <s> converts codepoints to a string </s>
|
funcom_train/41766552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSoftkeyCodes(int left, int right, int clear, int back) {
if(left != 0) {
Form.leftSK = left;
}
if(right != 0) {
Form.rightSK = right;
}
if(clear != 0) {
Form.clearSK = clear;
}
if(back != 0) {
Form.backSK = back;
}
}
COM: <s> allows overriding the softkeys initialized by the software to a different value </s>
|
funcom_train/4717646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSynthParamPureData() {
SynMessage msg = new SYN(SYN.PUREDATA).synth(1).param(1, 100);
assertEquals("Fi", msg.getTypetag());
assertEquals((SynMessage.MAX_24BIT), msg.getArguments()[1]);
assertEquals("/SYN/ID1/P1", msg.getAddress());
}
COM: <s> set synth parameter for pure data </s>
|
funcom_train/17832945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void retrieveNotes() {
// Retrieve private notes from server.
final SwingWorker notesWorker = new SwingWorker() {
public Object construct() {
return PrivateNotes.getPrivateNotes();
}
public void finished() {
final PrivateNotes privateNotes = (PrivateNotes)get();
showPrivateNotes(privateNotes);
}
};
notesWorker.start();
}
COM: <s> retrieve private notes from server </s>
|
funcom_train/3747553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String format(String htmlText) {
htmlText = convertOneUrlType( htmlText, "http://" );
htmlText = convertOneUrlType( htmlText, "https://" );
htmlText = convertOneUrlType( htmlText, "ftp://" );
return htmlText;
}
COM: <s> p convert all urls in the text provided into html anchor links </s>
|
funcom_train/26071431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCanvas() {
GridLayout gridLayout2 = new GridLayout();
gridLayout2.marginHeight = 5;
GridData gridData9 = new GridData();
gridData9.horizontalAlignment = GridData.FILL;
gridData9.grabExcessHorizontalSpace = true;
gridData9.grabExcessVerticalSpace = true;
gridData9.widthHint = 200;
gridData9.horizontalIndent = 0;
gridData9.verticalAlignment = GridData.FILL;
canvas = new SWTImageCanvas(top, SWT.NONE);
canvas.setLayoutData(gridData9);
canvas.setLayout(gridLayout2);
}
COM: <s> this method initializes canvas </s>
|
funcom_train/13369010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static final public Token getToken(int index) {
Token t = jj_lookingAhead ? jj_scanpos : token;
for (int i = 0; i < index; i++) {
if (t.next != null) t = t.next;
else t = t.next = token_source.getNextToken();
}
return t;
}
COM: <s> get the specific token </s>
|
funcom_train/13631041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void xformVec(Vec4f src, Vec4f dest) {
for (int rc = 0; rc < 4; rc++) {
float tmp = 0.0f;
for (int cc = 0; cc < 4; cc++) {
tmp += get(rc, cc) * src.get(cc);
}
dest.set(rc, tmp);
}
}
COM: <s> multiply a 4 d vector by this matrix </s>
|
funcom_train/21633996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calculateDisplacement() {
this.displacement = new int[this.size.length];
for (int i = 0; i < this.size.length; i++) {
int value;
if (i == 0) {
value = 0;
} else if (i == 1) {
value = this.size[0];
} else {
value = this.displacement[i - 1] * this.size[i - 1];
}
this.displacement[i] = value;
}
}
COM: <s> calculate all of the displacement values </s>
|
funcom_train/37765041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(IPersistent domainObject) throws ApplicationExceptions, FrameworkException {
if (m_session != null) {
//@TODO - add a fact that represents object deletion
} else {
if (log.isDebugEnabled())
log.debug("Session Not Initialized, FACT NOT ADDED... " + domainObject.getClass().getSimpleName());
}
}
COM: <s> insert a special object deleted fact to rules engine </s>
|
funcom_train/103716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() {
String tag = ixFunction.getI18nTag();
String trailer = ixFunction.getI18nTagTrailer();
if(trailer == null)
return I18n.getText(tag);
return MessageFormat.format(I18n.getText(tag),
new Object[] { trailer });
/*
String fqdn = getClass().getName();
int dotIndex = fqdn.lastIndexOf(".");
return fqdn.substring(dotIndex + 1);
*/
}
COM: <s> return the name of this index in a user readable format </s>
|
funcom_train/40166202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getId() {
StringBuilder sb = new StringBuilder(getName()).append('_').append(getPlayer1().getUsername()).append('_').append(getPlayer2().getUsername()).append('_');
return sb.toString();
}
COM: <s> returns a unique string id representation of the game </s>
|
funcom_train/19435854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rollbackVariable(String name) {
if (!_variables.contains(name)) {
return;
}
log.debug("Reseting " + name);
try {
_interpreter.eval(name + " = " + name + "_bck");
}
catch (EvalError e) {
log.error("Can't rollback variable " + name, e);
}
}
COM: <s> reset the variable to its previous value </s>
|
funcom_train/5377067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String readLocation(File file) throws IOException {
DataInputStream in = new DataInputStream(new ReliableFileInputStream(file));
try {
int version = in.readInt();
switch (version) {
case PERMISSIONDATA_VERSION_1 : {
boolean locationPresent = in.readBoolean();
if (locationPresent) {
String location = in.readUTF();
return location;
}
break;
}
default : {
throw new IOException(AdaptorMsg.ADAPTOR_STORAGE_EXCEPTION);
}
}
} finally {
in.close();
}
return null;
}
COM: <s> read the location from the specified file </s>
|
funcom_train/31873107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getInfo(int row, int column) {
StringBuffer s = new StringBuffer();
s.append("Row "+row+" column "+column+": ");
for (int k=0;k<this.instructions;k++) {
s.append(this.grid[row][column][k]+" ");
}
return s.toString();
}
COM: <s> the current state of one instruction </s>
|
funcom_train/37221330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void teleport(final Thing thing) {
teleported.add(thing); // can't teleport for 4 teleport cycles
tasks().add(new TimeTask(this, 1, 10, 1) {
public void perform() {
teleported.remove(thing);
}
});
thing.position(position());
}
COM: <s> teleports thing here </s>
|
funcom_train/27825487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ExtensionalDatabase getExtensionalDatabase(int literalIndex,Predicate predicate) throws DatalogException {
ExtensionalDatabase extensionalDatabase=m_extensionalManager.getExtensionalDatabase(predicate);
if (extensionalDatabase==null)
throw new DatalogException("Cannot locate extensional database for predicate '"+predicate.getFullName()+"'.");
else
return extensionalDatabase;
}
COM: <s> locates some extensional database that can evaluate supplied predicate </s>
|
funcom_train/35833028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void lineRemoved(int lines_removed_counter, boolean b) {
int score_level = (lines_removed_counter > TetrisConstants.SCORE_LEVEL.length -1) ? TetrisConstants.SCORE_LEVEL.length : lines_removed_counter;
if (preview_enabled){
score += TetrisConstants.SCORE_LEVEL_PREVIEW[score_level];
} else {
score += TetrisConstants.SCORE_LEVEL[score_level];
}
if (b || !penalize_enabled) {
events.notifyUpdateScore(score, false);
} else {
events.notifyUpdateScore(score, true);
}
}
COM: <s> handles the scoring and penalization after a user line has been removed </s>
|
funcom_train/45623134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRuleAssembliesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CodeAnalysisType_ruleAssemblies_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CodeAnalysisType_ruleAssemblies_feature", "_UI_CodeAnalysisType_type"),
MSBPackage.eINSTANCE.getCodeAnalysisType_RuleAssemblies(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the rule assemblies feature </s>
|
funcom_train/51412884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPrimaryKey() {
try {
return getPrimaryKeyAsInt().intValue();
} catch (CMExceptionTableRowValueNotExists e) {
e.addContextInfo("Fatal Error: A PKey for a row within the table <"+ getFullTableName()+"> wasnt found.");
GUITools.showException(e);
return -1;
}
}//getPrimaryKey
COM: <s> getter for the primary key </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.