__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/3415065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(V newReference, boolean newMark) {
ReferenceBooleanPair<V> current = atomicRef.get();
if (newReference != current.reference || newMark != current.bit)
atomicRef.set(new ReferenceBooleanPair<V>(newReference, newMark));
}
COM: <s> unconditionally sets the value of both the reference and mark </s>
|
funcom_train/11007670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReadBodyContents() throws Exception {
String html = mapiMessage.getHmtlBody();
String rtf = mapiMessage.getRtfBody();
assertNotNull(html);
assertNotNull(rtf);
assertTrue("Wrong text:\n" + html, html.startsWith("<!DOCTYPE"));
assertTrue("Wrong text:\n" + rtf, rtf.startsWith("{\\rtf1"));
}
}
COM: <s> ensure we can get the html and rtf versions </s>
|
funcom_train/2854292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Step (int along, NodeTest nt, boolean single) {
super("step");
if (!AxisName.indexInRange(along))
throw new IllegalStateException("axis name index out of range");
axis = along;
if (nt == null)
throw new NullPointerException("null NodeTest");
nodeTest = nt;
predicates = new ArrayList();
}
COM: <s> create a location path step </s>
|
funcom_train/27822876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Project getProject(String uri) throws KAONException {
Project project=(Project)m_projects.get(uri);
if (project==null) {
Instance projectInstance=m_registryOIModelInstance.getInstance(uri);
project=new Project(this,projectInstance);
m_projects.put(uri,project);
}
return project;
}
COM: <s> returns the project object for given uri </s>
|
funcom_train/43924672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteDirectedMessage(long id) throws BlipConnectorException {
URI uri;
try {
StringBuilder sb = new StringBuilder().append(baseUrl)
.append(PATH_DIRECTED_MESSAGES).append("/").append(id);
uri = new URI(sb.toString());
} catch (URISyntaxException e1) {
throw new BlipConnectorException("Error creating URI");
}
HttpResponse<?> res = execute(METHOD_DELETE, uri, null, true);
handleResult(res);
}
COM: <s> deletes directed message with given id </s>
|
funcom_train/8690783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BufferInfo getBufferInfo() {
Thread current = Thread.currentThread();
BufferInfo bufferInfo = (BufferInfo) buffers.get(current);
if (bufferInfo == null) {
bufferInfo = new BufferInfo();
bufferInfo.buffer = new ByteArrayOutputStream(INTIAL_SIZE);
bufferInfo.crSeen = false;
buffers.put(current, bufferInfo);
}
return bufferInfo;
}
COM: <s> returns the buffer associated with the current thread </s>
|
funcom_train/29773657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private short getDayofWeekMaskFromFoundation(int foundationWeekDay){
switch (foundationWeekDay) {
case 1 :
return 0;//sunday
case 2 :
return 1;
case 4 :
return 2;
case 8:
return 3;
case 16 :
return 4;
case 32 :
return 5;
case 64 :
return 6;//saturday
}
return 0;
}
COM: <s> converts a weekday to yahoo weekday format </s>
|
funcom_train/3839891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void playerLeavesServer(String playername, String reason) {
_inGameUsers.remove(playername);
_hallUsers.remove(playername);
_usersList.remove(playername);
_playername_clientchannel.remove(playername);
int i;
String player;
for (i = 0; i < _hallUsers.size(); i++) {
player = _hallUsers.elementAt(i);
_playername_clientchannel.get(player)
.sendPlayerDisconnects(playername, reason);
}
_nlogger.debug(playername + " (" + reason + ")");
}
COM: <s> removes a player who disconnect from server and send a notification to </s>
|
funcom_train/17206470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean handleReferenceFromImmortalSpace(Address addr) {
if(subspace.addressInRange(addr)) {
// increment tile
int index = subspace.getIndex(addr);
refFromImmortalStream.increment(index, (short)1);
// increment summary
this.totalRefFromImmortal++;
return true;
} else {
return false;
}
}
COM: <s> handle a direct reference from the immortal space </s>
|
funcom_train/4403435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public CameraSensor addCameraSensor(Agent agent) {
double agentHeight = agent.getHeight();
float cameraBodyRadius = 0.1f;
CameraSensor camera = new CameraSensor(cameraBodyRadius, 100, 100);
camera.setUpdatePerSecond(3);
camera.setName("Camera");
Vector3d pos = new Vector3d(0.0, (agentHeight / 2) + (cameraBodyRadius * 3) / 4, 0);
agent.addSensorDevice(camera, pos, 0);
return camera;
}
COM: <s> adds a prebuild camera sensor to the agent </s>
|
funcom_train/48976331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getRefreshTargetsButton() {
if (refreshTargetsButton == null) {
refreshTargetsButton = new JButton();
refreshTargetsButton.setBounds(new Rectangle(555, 13, 90, 42));
refreshTargetsButton.setText("Refresh Target List");
refreshTargetsButton
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
updateTargetList();
}
});
}
return refreshTargetsButton;
}
COM: <s> this method initializes refresh targets button </s>
|
funcom_train/32757598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void yRunningAverageValueChanged( final BpmAgent source, final double value ) {
final int row = BPM_AGENTS.indexOf( source );
if ( row >= 0 ) {
fireTableCellUpdated( row, Y_BEAM_POSITION_COLUMN );
fireTableCellUpdated( row, Y_BEAM_POSITION_ERROR_COLUMN );
}
}
COM: <s> event indicating that the y running average value changed </s>
|
funcom_train/28763446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTheState(uk.org.axioma.shark.ActivityStates value) throws com.intersys.objects.CacheException {
com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value);
mInternal.setProperty(ii_TheState, jj_TheState,kk_TheState, com.intersys.objects.Database.RET_OBJECT, "TheState", dh);
return;
}
COM: <s> sets new value for code the state code </s>
|
funcom_train/12547926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JToolBar initInputToolbar() {
JToolBar toolbar = new JToolBar();
toolbar.add(startAction);
stepAction.setEnabled(false);
toolbar.add(stepAction);
// Set up the view customizer controls.
toolbar.addSeparator();
final JComboBox box = new JComboBox(getViewChoices());
box.setSelectedIndex(0);
ActionListener listener = new ActionListener() {
public void actionPerformed(ActionEvent e) {
changeView((String) box.getSelectedItem());
}
};
box.addActionListener(listener);
toolbar.add(box);
return toolbar;
}
COM: <s> returns the tool bar for the main user input panel </s>
|
funcom_train/26576330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStatus(String serverString) {
if (serverString != null) {
_statusLight.setIcon(_connectedIcon);
_statusLight.setToolTip(serverString);
}
else {
_statusLight.setIcon(_disconnectedIcon);
_statusLight.setToolTip(ResourceManager.getString(MainStrings.App.disconnect));
}
}
COM: <s> sets the status field to connected or disconnected </s>
|
funcom_train/39895258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRoleToUser(User user, Role role, Project project) {
UserRoleInProject userRoleInProject = new UserRoleInProject();
userRoleInProject.setUser(user);
userRoleInProject.setRole(role);
userRoleInProject.setProject(project);
em.persist(userRoleInProject);
}
COM: <s> adds user in a specified role to project </s>
|
funcom_train/32055195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printCurrentPTs(){
//System.out.println();
//System.out.println(" ********Results*******");
for (int i=0; i<this.numNodes; i++){
System.out.print("Node: "+ bif.get(i).getChild()+": \t");
for (int j=0; j<bif.get(i).getBins(); j++){
System.out.print(probTableAL.get(undoIndex)[i][j]+"\t");
}
}
}
COM: <s> prints a table listing the current probabilities of each state for each node </s>
|
funcom_train/21021662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSelectedId() {
String id = "";
if (getSelectedRow() >= 0) {
if (isFolderSelected()) {
id = getFolder().getPath();
} else if (isMailSelected()) {
id = getMail().getPath();
} else if (isDocumentSelected()) {
id = getDocument().getPath();
}
}
return id;
}
COM: <s> gets the path of the selected document or folder </s>
|
funcom_train/17922700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testByteArrayToLong() throws Exception {
System.out.println("byteArrayToLong");
byte[] b = AnyToByteArray.longToByteArray(23L);
long expResult = 23L;
long result = ByteArrayToAny.byteArrayToLong(b);
assertEquals(expResult, result);
}
COM: <s> test of byte array to long method of class eu </s>
|
funcom_train/18726921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getOpenFileName() {
final JaxoChooseFile c = new JaxoChooseFile(parent);
c.setApproveText(JaxoLanguage.translate("JaxoIO.openApproveText"));
c.setDialogTitle(JaxoLanguage.translate("JaxoIO.openDialogTitle"));
return c.chooseFile(new String[]{JaxoInfo.EXTENSION},
JaxoLanguage.translate("JaxoIO.JaxoDrawFileDescription"), "");
}
COM: <s> brings up a file chooser dialog to choose a file for opening </s>
|
funcom_train/18350822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyObservers() {
synchronized (observers) {
Iterator iterator = observers.iterator();
while (iterator.hasNext()) {
((SwingCapComponentObserver)iterator.next()).notify(
new SwingCapComponentEvent() {
public CapComponent getSwingCapComponent() {
return SwingAbstractPopupEditor.this;
}
});
}
}
}
COM: <s> notify all registered observers </s>
|
funcom_train/1560423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean showSliderCreationDialog(int x, int y) {
app.setWaitCursor();
SliderDialog dialog = new SliderDialog(app, x, y);
dialog.setVisible(true);
/*
GeoNumeric num = (GeoNumeric) dialog.getResult();
Application.debug("finish");
if (num != null) {
// make sure that we show name and value of slider
num.setLabelMode(GeoElement.LABEL_NAME_VALUE);
num.setLabelVisible(true);
num.update();
}*/
app.setDefaultCursor();
return true;//num != null;
}
COM: <s> creates a new slider at given location screen coords </s>
|
funcom_train/37253276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File searchInclude(String include) throws FileNotFoundException {
for (int i = 0; i < pathElements.length; i++) {
File probe = new File(pathElements[i] + include + ".dbs");
if (probe.exists()) {
return probe;
}
}
throw new FileNotFoundException(
"include " + include + " not found in path");
}
COM: <s> search in path elements according to their order for the given include name </s>
|
funcom_train/7532006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void setReplicas(Collection hosts) {
if (hosts == null)
throw new NullPointerException();
for (Iterator it = hosts.iterator(); it.hasNext();) {
PGridHost host = (PGridHost)it.next();
mHosts.put(host.getGUID().toString(), host);
removeLevel(host);
}
mReplicas = Collections.synchronizedCollection(new TreeSet(hosts));
}
COM: <s> sets the replicas with the given hosts </s>
|
funcom_train/3274856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean shouldRun() {
if (f==null) {
Job dep = getDependency();
if (dep instanceof FileProducing) {
f = ((FileProducing)dep).produceFile();
}
}
if (hash == null) {
Job dep = getDependency();
if (dep instanceof HashProducing) {
hash = ((HashProducing)dep).produceHash();
}
}
setData(this, f.length());
if (hash != null) {
setProgressName("File."+hash);
}
return super.shouldRun();
}
COM: <s> checks whether this file must be inserted </s>
|
funcom_train/34479795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final protected boolean test_instance(Object value) throws SdaiException {
// synchronized (syncObject) {
if (owning_model == null) {
throw new SdaiException(SdaiException.EI_NEXS);
}
if (value instanceof SdaiModel.Connector) {
value = ((SdaiModel.Connector)value).resolveConnector(false, true, false);
}
return (value == null) ? false : true;
// } // syncObject
}
COM: <s> returns code true code if the submitted value representing entity instance </s>
|
funcom_train/16469499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void receiveConsole_refresh() {
receiveConsole_updateConnectedPhones();
Object receiveConsole_messageList = find(COMPONENT_RECEIVE_CONSOLE_MESSAGE_LIST);
List<? extends Message> messages = messageFactory.getMessages(Message.TYPE_RECEIVED, Message.Field.DATE, Order.DESCENDING);
setListContents(receiveConsole_messageList, messages);
setListPageNumber(1, receiveConsole_messageList);
setListElementCount(messages.size(), receiveConsole_messageList);
updatePages_receiveConsole();
}
COM: <s> updates the received message list inside b receive console b tab </s>
|
funcom_train/9711849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createXMLPart(SOAPEnvelope root) throws WebServiceException, XMLStreamException {
XMLPartFactory factory = (XMLPartFactory) FactoryRegistry.getFactory(XMLPartFactory.class);
xmlPart = factory.createFrom(root);
this.protocol = xmlPart.getProtocol();
xmlPart.setParent(this);
}
COM: <s> create a new xmlpart and protocol from the root </s>
|
funcom_train/2272331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
crypto = null;
assertion = null;
if (bst != null && bst.size() > 0) {
bst.removeAllElements();
}
if (processors != null && processors.size() > 0) {
processors.removeAllElements();
}
bst = null;
processors = null;
}
COM: <s> clears the info data except the hash code </s>
|
funcom_train/40409611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCsvDataByColumn_twoColumnsWithHeaderThird() throws IOException {
try {
CsvUtils.getCsvDataByColumn("test_data/two_columns.csv", 2, true);
fail("IllegalArgument exception expected.");
} catch (IllegalArgumentException e) {
// Ignore Exception.
}
}
COM: <s> tests getting csv data by column of two columns retrieving the third </s>
|
funcom_train/51557734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void deleteModule(final CmsObject cms, final String moduleName) throws Exception {
if (StringUtils.isEmpty(moduleName)) {
return;
}
if (OpenCms.getModuleManager().hasModule(moduleName)) {
// now delete the module
OpenCms.getModuleManager().deleteModule(cms, moduleName, false,
new CmsShellReport(cms.getRequestContext().getLocale()));
}
}
COM: <s> delete module from virtual open cms test instance </s>
|
funcom_train/29617867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MgisRadioButton getJRadioYes() {
if (jRadioYes == null) {
jRadioYes = new MgisRadioButton();
jRadioYes.setText(AppTextsDAO.get("LABEL_YES"));
jRadioYes.setValue(new Boolean(true));
jRadioYes.setBounds(20,30,60,19);
jRadioYes.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
updateResultBoxAccordingToSelection();
}
});
}
return jRadioYes;
}
COM: <s> this method initializes j radio yes </s>
|
funcom_train/13812427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testAppSessionCreatedAndDestroyed() throws Throwable {
// Assume.assumeTrue(isEnabled());
if (isEnabled()) {
int created = count("AppSessionLifecycleEvent", "CREATED");
int destroyed = count("AppSessionLifecycleEvent", "DESTROYED");
logger.info(
"AppSessionLifecycleEvent CREATED=" + created + " DESTROYED=" +
destroyed);
Assert.assertTrue(
"AppSessionLifecycleEvent: " + created + " CREATED, " +
destroyed + " DESTROYED", (created == destroyed));
}
}
COM: <s> make sure the number of app session lifecycle event created events matches </s>
|
funcom_train/49743492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init(){
setSize(_width,_height+30);
setMinimumSize(new Dimension(270,270+30));
setLocation(_x,_y);
_p = new JPanel(){
public void paint(Graphics g){
_image = _simulator.toImage();
g.drawImage(_image, 0, 0, _p.getWidth(), _p.getHeight(), 0, 0, _image.getWidth(), _image.getHeight(), Color.white, _p);
}
};
getContentPane().add(_p);
// JPanel p = new Geosphere();
}
COM: <s> init the console window </s>
|
funcom_train/18504150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void installLovAction() {
this.getInputMap().put(
KeyStroke.getKeyStroke("F9"), "displayLOV");
this.getActionMap().put("displayLOV",
new AbstractAction() {
public void actionPerformed(ActionEvent e) {
// Displays the lov and loads the selected value
lovCall();
}
});
}
COM: <s> installs the lov action key f9 by default </s>
|
funcom_train/36114201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkMultiplicationCompatible(final RealMatrix m) {
if (getColumnDimension() != m.getRowDimension()) {
throw MathRuntimeException.createIllegalArgumentException(
"{0}x{1} and {2}x{3} matrices are not multiplication compatible",
getRowDimension(), getColumnDimension(),
m.getRowDimension(), m.getColumnDimension());
}
}
COM: <s> check if a matrix is multiplication compatible with the instance </s>
|
funcom_train/32649291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSpacingRightThemeTextField() {
RowData rowData3 = new org.eclipse.swt.layout.RowData();
rowData3.width = 30;
spacingRightThemeTextField = new ThemeTextField(globalComposite, SWT.NONE);
spacingRightThemeTextField.setHelpPage("");
spacingRightThemeTextField.setIntValued(true);
spacingRightThemeTextField.setEmbeddedInBindableGroup(false);
spacingRightThemeTextField.setBindingSubPath("spacingRight");
spacingRightThemeTextField.setLayoutData(rowData3);
}
COM: <s> this method initializes spacing right theme text field </s>
|
funcom_train/2998941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
buildPanel();
buildLens();
tgPanel.setLensSet(tgLensSet);
addUIs();
//tgPanel.addNode(); //Add a starting node.
try {
randomGraph();
} catch ( TGException tge ) {
System.err.println(tge.getMessage());
tge.printStackTrace(System.err);
}
setVisible(true);
}
COM: <s> initialize panel lens and establish a random graph as a demonstration </s>
|
funcom_train/14011753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Component getContent(int column, int row) {
if (horizontalOrientation) {
Cell cell = getCellArray(row, false)[column];
return cell == null ? null : cell.component;
} else {
Cell cell = getCellArray(column, false)[row];
return cell == null ? null : cell.component;
}
}
COM: <s> returns the code component code that should be rendered at the </s>
|
funcom_train/9751206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateRange() {
rangeLabel.setText(minValue + " to " + maxValue);
positionRequest.setMinimum(minValue);
positionRequest.setMaximum(maxValue);
positionActual.setMinimum(minValue);
positionActual.setMaximum(maxValue);
int range = maxValue - minValue;
positionRequest.setMajorTickSpacing(range/8); // Ten circles
positionRequest.setMinorTickSpacing(range/80); // A full circle
positionRequest.setPaintTicks(true);
}
COM: <s> utility function to update the range display and </s>
|
funcom_train/12690166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointReference(EndpointReferenceType thisEPR) {
EndpointReferenceDocument doc = EndpointReferenceDocument.Factory.newInstance();
doc.setEndpointReference(thisEPR);
WorkflowInstanceManager.getInstance().getGlobalScope(workflowInstanceId).setVariablePart("endpointreference.this", "",
((Document)doc.getDomNode()).getDocumentElement());
}
COM: <s> set the epr of the resource </s>
|
funcom_train/2001540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Templates getXSLFromCache (String fileName) {
if (!xslCache.containsKey(fileName)) {
// we do not have this in the cache, return null
return null;
}
TimeStampedXSLEntry xslEntry = (TimeStampedXSLEntry) xslCache.get(fileName);
if (hasFileBeenModified (fileName, xslEntry)) {
// the xsl file on the filesystem is more current, we need to load a new one
return null;
}
return xslEntry.template;
}
COM: <s> tries to load the xsl from the cache </s>
|
funcom_train/42110758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumSpecialisations(String action) {
Collection<RelationalPredicate> specConditions = getSpecialisationConditions(action);
int num = 0;
if (specConditions != null)
num = specConditions.size();
// Also, if the action has numerical arguments, add them to the count
// too
for (String type : StateSpec.getInstance().getStringFact(action)
.getArgTypes()) {
if (StateSpec.isNumberType(type))
num += PolicyGenerator.NUM_NUMERICAL_SPLITS;
}
return num;
}
COM: <s> gets the number of specialisations an action can have </s>
|
funcom_train/366516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeNeighbor(Node n) {
for ( int i=0; i < m_edges.size(); i++ ) {
if ( n == ((Edge)m_edges.get(i)).getAdjacentNode(this) )
return m_edges.remove(i) != null;
}
return false;
} //
COM: <s> remove the given node as a neighbor of this node </s>
|
funcom_train/34527870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public boolean projectExists(String projectName) {
// ProjectDesc[] projectDescs = serviceConfigMgr
// .getAvailableProjectNames();
// boolean found = false;
// for (int i = 0; (i < projectDescs.length) && !found; i++)
// found = projectDescs[i].getProjectName().equals(projectName);
// return found;
// }
COM: <s> indicates whether the specified project exists </s>
|
funcom_train/4471986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isSolutionDiscardable(DataHyperGraph G, Set<Integer> Vx, DataHyperGraph Gx){
if (debug){
log(String.format("edges %d, vertices %d, solutions %d. todo %s ",
Gx.getEdges().size(),
Gx.getVertices().size(),
this.m_runtime_solution_found_count,
Vx.toString()));
}
return false;
}
COM: <s> check if we can discard a search branch </s>
|
funcom_train/8686443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFiles(String[] s) {
int start = (files == null) ? 0 : files.length;
String[] newfiles = new String[start + s.length];
if (start > 0) {
System.arraycopy(files, 0, newfiles, 0, start);
}
files = newfiles;
System.arraycopy(s, 0, files, start, s.length);
}
COM: <s> add an array of filenames to this file resource iterator </s>
|
funcom_train/33898336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMikaelyanLens(double n0, double z0, double L) {
int k0 = fl(z0);
int dk = fl(L);
for (int k = k0; k < k0 + dk; k++) {
for (int j = tf_y0; j < tf_y; j++) {
double n_mik = nmik(n0, (ysize_ / 2 - j * ds), L);
ep[j][k] *= (n_mik * n_mik);
}
}
}
COM: <s> sets mikaelyan lens with height of tfsf height </s>
|
funcom_train/36859338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValid() {
// everything is thread hot so make sure you copy pointers to it
if (getChildrenInternal() == null)
return false;
final int idx = getIndex();
final boolean[] validArray = Bot.getClient().getValidRSInterfaceArray();
return (validArray != null) && (idx < validArray.length) && validArray[idx];
}
COM: <s> checks whether or not the interface is valid or not </s>
|
funcom_train/1033281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCaseSensitive(int column) throws java.sql.SQLException {
Field field = getField(column);
int sqlType = field.getSQLType();
switch (sqlType) {
case Types.BIT:
case Types.TINYINT:
case Types.SMALLINT:
case Types.INTEGER:
case Types.BIGINT:
case Types.FLOAT:
case Types.REAL:
case Types.DOUBLE:
case Types.DATE:
case Types.TIME:
case Types.TIMESTAMP:
return false;
case Types.CHAR:
case Types.VARCHAR:
case Types.LONGVARCHAR:
if (field.isBinary()) {
return true;
}
String collationName = field.getCollation();
return ((collationName != null) && !collationName.endsWith("_ci"));
default:
return true;
}
}
COM: <s> does a columns case matter </s>
|
funcom_train/40827993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PeptideHitAnnotation getPeptideHitAnnotation(Masses aMasses, Parameters aParameters, double aPrecursorMZ, String aPrecursorCharge) {
if (iPha == null) {
iPha = new PeptideHitAnnotation(iSequence, iModifications, aMasses, aParameters, iIonSeriesFound, aPrecursorMZ, aPrecursorCharge);
}
return iPha;
}
COM: <s> returns an instance of peptide hit annotation </s>
|
funcom_train/28763350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProcess(uk.org.axioma.shark.Process value) throws com.intersys.objects.CacheException {
com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value);
mInternal.setProperty(ii_Process, jj_Process,kk_Process, com.intersys.objects.Database.RET_OBJECT, "Process", dh);
return;
}
COM: <s> sets new value for code process code </s>
|
funcom_train/18900003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getRows() {
if (rows == -1) {
rows = 1;
for (Iterator it = getElements().iterator(); it.hasNext(); ) {
ConstraintExpression e = (ConstraintExpression) it.next();
rows *= e.getRows();
if (rows == 0) {
break;
}
}
}
return rows;
}
COM: <s> gets the rows attribute of the constraint conjunction object </s>
|
funcom_train/49623650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(VariableAssign node, St4ticScope scope, Object... objects) throws Exception {
String name = this.visit(node.f0, scope, objects).toString() ;
if( scope.existsChild( name ) )
{
St4ticVariable var = (St4ticVariable) scope.child( name ) ;
var.setVariableValue( (St4ticValue) this.visit(node.f2, scope, objects) );
}
return null;
}
COM: <s> assigning a new value to variable </s>
|
funcom_train/12557608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setFullClassName(String name) {
fullClassName = name;
int pos = fullClassName.lastIndexOf('.');
if (pos >= 0) {
packageName = fullClassName.substring(0, pos);
className = fullClassName.substring(pos+1, fullClassName.length());
} else {
packageName = null;
className = fullClassName;
}
}
COM: <s> sets the internal state of full class name class name package name </s>
|
funcom_train/8900040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getPreferredSize(JComponent c) {
long width = 0;
Enumeration columns = header.getColumnModel().getColumns();
while (columns.hasMoreElements()) {
TableColumn aColumn = (TableColumn)columns.nextElement();
width = width + aColumn.getPreferredWidth();
}
return createHeaderSize(width);
}
COM: <s> invokes the get preferred size method on each ui handled by this object </s>
|
funcom_train/4406643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void drawCenteredString(Graphics2D g, FontMetrics metrics, String message) {
float fontHeight = metrics.getAscent();
float x = (getWidth() - metrics.stringWidth(message)) / 2.0f;
float y = (getHeight() - fontHeight) / 2.0f;
g.drawString(message, x, y);
}
COM: <s> draws a centered string on this jpanel </s>
|
funcom_train/2581668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getKeys() {
List result = new java.util.ArrayList();
Iterator iterator = this.data.iterator();
while (iterator.hasNext()) {
KeyedObject ko = (KeyedObject) iterator.next();
result.add(ko.getKey());
}
return result;
}
COM: <s> returns a list containing all the keys in the list </s>
|
funcom_train/43873740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reloadCacheWithNewValue(final Long newValue) {
final long newValueAsPrimitive = newValue == null ? getModelUpdatePeriod() : newValue;
LOG.debug("invoking " + cacheUpdatePeriodListeners.size() + " listeners");
for (final PropertyChangeListener listener : cacheUpdatePeriodListeners) {
final PropertyChangeEvent event = new PropertyChangeEvent(this, "cache", getCacheUpdatePeriod(), newValueAsPrimitive);
listener.propertyChange(event);
}
}
COM: <s> notify all listeners about cache period property changed </s>
|
funcom_train/11783178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFrame getMainFrame() {
if (mainFrame == null) {
mainFrame = new JFrame("VELMA");
glassPane = new JPanel(new GridBagLayout());
glassPane.setBackground(new Color(0, 0, 0, 0));
mainFrame.setGlassPane(glassPane);
}
return mainFrame;
}
COM: <s> accesses the main jframe code main frame code </s>
|
funcom_train/31106423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConfiguredDTD( DTDLocation dtdLocation ) {
try {
log( "adding DTD: id='" + dtdLocation.getPublicId() +
"'; location='" + dtdLocation.getLocation() + "'",
Project.MSG_VERBOSE );
dtdCatalog.put( dtdLocation.getPublicId(),
dtdLocation.getLocation() );
} catch (MalformedURLException e) {
// ignore
}
}
COM: <s> add a dtd location </s>
|
funcom_train/18374333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean verifyConnection(boolean throwErr) throws SQLException{
boolean retVal = false;
try {
PocOlapConnection conn = getConnObject(crosstab.getCrossTabDef().getRept().getSource());
retVal = conn.verifyConnection(throwErr);
} catch (SQLException e) {
if (throwErr){
throw e;
}
}
return retVal;
}
COM: <s> verify connection determines whether a connection to the database can be made </s>
|
funcom_train/44107949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printCalculation(String projectUri, String projectId, HttpServletRequest request, HttpServletResponse response) {
PropertyInfo[] prop = SchemaModelHolder.getProjectPropertyInfoArray(organization);
StringBuffer ret = new StringBuffer();
printHeader(request, prop, projectId, ret);
String calcUri = request.getParameter("taskuri");
Resource resource = ResourceModelHolder.createResource(calcUri, organization);
printCalculation(resource, prop, projectId, false, ret, 0);
ret.append("\t</calculation>\r\n");
ret.append("</calculations>\r\n");
replyXMLString(ret.toString(), response);
}
COM: <s> prints xml of calculation result of the specified project </s>
|
funcom_train/17787647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getTarget(int[] components, long maxTargetLength) throws IllegalAccessException, ErrorException {
if (defaultSession == null) {
throw new IllegalArgumentException("None session has been set as default yet.");
}
getTarget(defaultSession, components, maxTargetLength);
}
COM: <s> this method fetches a logical target defined by the method input </s>
|
funcom_train/3104972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDataStoreToUpdate() {
if (this.datastoreCFU != null) {
for (Iterator<DataStore> iter = this.datastoreCFU.iterator(); iter.hasNext();) {
DataStore datastore = iter.next();
if (datastore != null) {
if (datastore.isModified()) {
if (log.isDebugEnabled()) {
log.debug("The datastore '" + datastore.getName() + "' need to be updated.");
}
return true;
}
}
}
}
return false;
}
COM: <s> test if a datastore need to be updated </s>
|
funcom_train/39281996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class define(JavaClass jcl) {
String name = jcl.getClassName();
log.finer("** converting class structure back into bytecode for " + name);
byte[] b = jcl.getBytes();
// if(Main.REWRITE_CACHE && cacheDir!=null) putDiskRewrittenClass(name, b);
Class cl = defineClass(name, b, 0, b.length);
rewritten.put(name, cl);
return cl;
}
COM: <s> load a given bcel class into the jvm </s>
|
funcom_train/25649165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddTestSet() {
String name = "Test Set to be added";
assertFalse(instance.isDuplicateName(name));
TestSet myTestSet = new TestSetImpl(name);
assertTrue(instance.addTestSet(myTestSet));
assertTrue(instance.getTestSets().contains(myTestSet));
assertFalse(instance.addTestSet(null));
}
COM: <s> test of add test set method of class com </s>
|
funcom_train/50072654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getZipName(String file, String folder) {
int charsInFolder = folder.length();
int charsInStartFolder = archiveFromDir.length();
int charsInFile = file.length();
if (charsInFolder >= charsInStartFolder) {
// return the differend
return file.substring(charsInStartFolder + 1, charsInFile);
} else {
return file;
}
}
COM: <s> gets zip name </s>
|
funcom_train/48358146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getIncomingAttributes() throws SchemaMetadataException {
attributes = new ArrayList<Attribute>(getInput(0).getAttributes());
ArrayList <Attribute> right =
new ArrayList<Attribute>(getInput(1).getAttributes());
// right.remove(new EvalTimeAttribute());
attributes.addAll(right);
expressions = new ArrayList <Expression>(attributes.size());
for (int i = 0; i < attributes.size(); i++) {
expressions.add(attributes.get(i));
}
}
COM: <s> combines the attribute lists from the left and from the right </s>
|
funcom_train/51412519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshDetailPanel() {
Row teamClassRow = getSelectedRow();
cmpTeamName.refresh();
cmpTeamExtends.refresh();
cmpIsAbstract.refresh();
cmeGuardDef.refresh(teamClassRow);
if(teamClassRow == null) {
cmeTeamSchedule.clear();
cmeTeamMethod.clear();
cmeTeamAttr.clear();
}else {
cmeTeamSchedule.refresh(teamClassRow.getPrimaryKey());
cmeTeamMethod.refresh(teamClassRow.getPrimaryKey());
cmeTeamAttr.refresh(teamClassRow.getPrimaryKey());
}
}
COM: <s> refreshes the elements within the detailpanel </s>
|
funcom_train/32727523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTableName(String s) {
checkSetupState("setTableName()");
String result[] = parseEntityArgument(s, "main table name");
i_tableName = result[0];
i_tableAlias = result[1];
if (i_sequenceName == null) {
i_sequenceName = "seq_" + i_tableName;
}
}
COM: <s> sets the table and optionally sets the table alias </s>
|
funcom_train/50325708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean storeUser(File file) {
boolean result = true;
Element root = initStore();
if(!addConfigStore(root)){
result=false;
}
if(!addUserStore(root)){
result=false;
}
includeHistory(root);
if(!finalStore(root, file)){
result=false;
}
return result;
}
COM: <s> writes user and config info to a file </s>
|
funcom_train/49997778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long findNextPosition(long pos) {
int block = Arrays.binarySearch(blockPositions, pos);
if (block >= 0) {
// direct hit on a block start position
return blockPositions[block];
} else {
block = Math.abs(block) - 1;
if (block > blockPositions.length - 1) {
return -1;
}
return blockPositions[block];
}
}
COM: <s> find the next lzo block start from the given position </s>
|
funcom_train/637901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int nextInt(int begin, int end) {
if (begin > end) {
throw new IllegalArgumentException(
"Begin must be equal or greater than end. Begin: " + begin
+ " End: " + end + ".");
}
int difference = end - begin; // difference between begin and end
int ret = super.nextInt(difference); // returned value
ret += begin;
return (ret);
}
COM: <s> returns a random int between code begin code and code end code </s>
|
funcom_train/10182371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName(String name) {
if (name == null || name.length() == 0)
throw new IllegalArgumentException(
"Cannot set pool name to null or empty!");
if (poolName != null && !poolName.equals(name))
throw new IllegalStateException("Cannot change pool name once set!");
poolName = name;
log = LogFactory.getLog(ObjectPool.class.getName() + "." + name);
}
COM: <s> sets the name of the pool </s>
|
funcom_train/9553481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setAllotmentForUser(long allotment, String username, String groupname, boolean checkAvailability) throws NoSuchUserException, NoSuchGroupException {
try {
return rmi.setAllotmentForUser(allotment, username, groupname, checkAvailability);
} catch (RemoteException e) {
System.err.println(e.getMessage()); reinitialize();
return setAllotmentForUser(allotment, username, groupname, checkAvailability);
}
}
COM: <s> sets the allotment for the specified user in the specified group </s>
|
funcom_train/25065136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Widget getListItemWidget(String item) {
HorizontalPanel panel = new HorizontalPanel();
if (_selectedItems != null && _selectedItems.contains(item))
panel.add(createImage(SELECTED_IMAGE));
else
panel.add(createImage(UNSELECTED_IMAGE));
panel.add(HtmlUtils.getHtml(item, "text"));
return panel;
}
COM: <s> 1 based rows </s>
|
funcom_train/20079377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void release() {
onDetach();
resize.removeListener(Events.Attach, listener);
resize.removeListener(Events.Detach, listener);
for (int i = 0; i < handles.size(); i++) {
ResizeHandle handle = (ResizeHandle) handles.remove(0);
DOM.removeChild(resize.getElement(), handle.getElement());
}
}
COM: <s> removes the drag handles </s>
|
funcom_train/31191225 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JDialog getUncaughtExceptionDialog() {
// PENDING: this needs to be localized.
JOptionPane optionPane = new JOptionPane(
"An unrecoverable error has occured. " + getName() +
" will now exit", JOptionPane.ERROR_MESSAGE);
return optionPane.createDialog(null, "Error");
}
COM: <s> returns the dialog that is shown when an uncaught exception is </s>
|
funcom_train/20645440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh() {
// get a WorkSheet Explorer and add it to the DocPanel
getWorkSheetPanel(workSheetATW).refreshRecursive();
changeDocContent(getWorkSheetPanel(workSheetATW).getPanel());
if (workSheetATW != null) {
if (wsTree.getSTree() != null) {
wsTree.getSTree().repaint();
}
}
wsTree.refresh();
tarifInfo.refresh();
updateButtonsStatus();
}
COM: <s> refresh the display all components </s>
|
funcom_train/18028832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToString() {
System.out.println("toString");
QDataSet ds = null;
String expResult = "";
String result = DataSetUtil.toString(ds);
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 to string method of class data set util </s>
|
funcom_train/37833600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Item getWeapon() {
final String[] weaponsClasses = {"club", "sword", "axe", "ranged", "missile"};
for (final String weaponClass : weaponsClasses) {
final String[] slots = { "lhand", "rhand" };
for (final String slot : slots) {
final Item item = getEquippedItemClass(slot, weaponClass);
if (item != null) {
return item;
}
}
}
return null;
}
COM: <s> gets the weapon that this entity is holding in its hands </s>
|
funcom_train/22205919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getNames(boolean includeMergedTopics) {
if (m_provider.isTransactionOpen()) {
return getNames(m_provider.getOpenTransaction(), includeMergedTopics);
} else {
ProviderTransaction txn = m_provider.openTransaction();
Collection ret = getNames(txn, includeMergedTopics);
txn.rollback();
return ret;
}
}
COM: <s> retrieves the collection of the base names of this topic </s>
|
funcom_train/51269724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int reset(int level){
if(isLowerDependency(level, currentEvalLevel)){
currentEvalLevel = level;
this.result = RESULT_FALSE;
for(int i = 0; i < size();i++){
int tmpResult = get(i).reset(level);
if (tmpResult == RESULT_TRUE) {
this.result = RESULT_TRUE;
} else if (tmpResult == RESULT_UNKNOWN && tmpResult != RESULT_TRUE) {
this.result = RESULT_UNKNOWN;
}
}
return result;
}
return result;
}
COM: <s> resets the evaluation of the conjunction term up to a certain level </s>
|
funcom_train/51483115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Graphics g, int x1, int y1, int x2, int y2) {
// TBD: reuse the Polygon object
Polygon p = outline(x1, y1, x2, y2);
g.fillPolygon(p.xpoints, p.ypoints, p.npoints);
}
COM: <s> draws the arrow tip in the direction specified by the given two </s>
|
funcom_train/19778549 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Classification classify(List<DataPoint> data, DataPoint test) {
// Find the k-nearest data points to the test point.
List<DataPoint> kNearest = findKNearest(this.A, data, test, k);
// Finds the most often occurence of the state in the nearest points.
return new Classification(NNutil.modeState(kNearest), k);
}
COM: <s> classifies using the cam classification algorithm </s>
|
funcom_train/13258276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setWhatIfValues(double[] values) {
if (whatIfValues == null && values == null) {
return false;
}
if (whatIfValues == null || !Arrays.equals(whatIfValues, values)) {
whatIfValues = values;
if (values != null) {
iterations = values.length;
} else {
iterations = 1;
}
changed = true;
resultsOK = false;
return true;
}
return true;
}
COM: <s> sets the array of values used for what if analysis </s>
|
funcom_train/48362853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setLowLeftCorner(int newX, int newY){
if (newX > this.topRightCorner.getX() || newY < this.topRightCorner.getY()){
return false;
}
else {
this.lowLeftCorner.setX(newX);
this.lowLeftCorner.setY(newY);
return true;
}
}
COM: <s> set the position of the low left corner </s>
|
funcom_train/7616038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setArcType(int type) {
if (type != OPEN && type != CHORD && type != PIE) {
// awt.205=Invalid type of Arc: {0}
throw new IllegalArgumentException(Messages.getString("awt.205", type)); //$NON-NLS-1$
}
this.type = type;
}
COM: <s> sets the arc type either </s>
|
funcom_train/13584076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double probability(SampledVertex vertex, int iteration) {
if (iteration == 0)
/*
* In the 0th iteration we have random sampling.
*/
return numVertices[0] / (double) N;
else {
int n = numVertices[iteration - 1];
/*
* inclusion probability
*/
double p_k = 1 - Math.pow(1 - n / (double) N, vertex.getNeighbours().size());
return responseRate[iteration] * p_k;
}
}
COM: <s> estimates the inclusion probability of a vertex based on its degree and </s>
|
funcom_train/9766749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void editorSaved() {
INavigationLocation[] locations= getSite().getPage().getNavigationHistory().getLocations();
IEditorInput input= getEditorInput();
for (int i= 0; i < locations.length; i++) {
if (locations[i] instanceof TextSelectionNavigationLocation) {
if(input.equals(locations[i].getInput())) {
TextSelectionNavigationLocation location= (TextSelectionNavigationLocation) locations[i];
location.partSaved(this);
}
}
}
}
COM: <s> hook which gets called when the editor has been saved </s>
|
funcom_train/40097750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void orderBy(ActionEvent e) {
String c = (String)e.getComponent().getAttributes().get("c");
if (!c.equals(orderBy)) {
orderBy = c;
order = Order.ASC;
first = 0;
} else {
order = order==Order.ASC ? Order.DESC : Order.ASC;
}
value = null;
}
COM: <s> the action event handler for specifying which column to sort by </s>
|
funcom_train/20291816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getAmount() {
double amount = 0;
if (type == Option.TYPE_INTEGER) {
double quantity = Double.parseDouble(defaultValue);
amount = priceList.findAmountBasedOnQuantity(quantity);
}
if (type == Option.TYPE_LOOKUPLIST) {
amount = priceList.findAmountBasedOnSelection(Integer.parseInt(defaultValue));
}
return amount;
}
COM: <s> gets the amount attribute of the option object </s>
|
funcom_train/15826381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertEqualsEither(String expected1, String expected2, String actual) {
if (!expected1.equals(actual) && !expected2.equals(actual)) {
fail("Expected either [" + expected1 + "] or [" + expected2
+ "], but was [" + actual + "].");
}
}
COM: <s> asserts that the actual equals either expected1 or expected2 </s>
|
funcom_train/8104392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRatedSynonym(String delimiter) {
String s = "";
if (null != rows) {
for(int i=0; i<rows.size(); i++) {
SynonymRow r = rows.get(i);
if(r.rate) {
if(0 < s.length()) { // adds delimiter after first word
s += delimiter;
}
s += r.word;
}
}
}
return s;
}
COM: <s> gets only rated synonyms by user as string </s>
|
funcom_train/13257996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object addStation(String type) {
Long num;
if (!objectNumber.containsKey(type)) {
// This if first station of that type
num = new Long(0L);
} else {
// Uses next number
num = objectNumber.get(type);
num = new Long(num.longValue() + 1);
}
objectNumber.put(type, num);
return super.addStation(getUniqueStationName(STATION_NAMES.get(type) + " " + num), type);
}
COM: <s> adds a new station to the model </s>
|
funcom_train/33581705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getCachedSignature(String word, int sentencePosition) {
if (word == null)
return lastWordToSignaturize;
if (word.equals(lastWordToSignaturize)
&& sentencePosition == lastSentencePosition) {
// System.err.println("Signature: cache mapped " + wordIndex +
// " to " + lastSignatureIndex);
return lastSignature;
} else {
String uwSig = getSignature(word, sentencePosition);
lastSignature = uwSig;
lastSentencePosition = sentencePosition;
lastWordToSignaturize = word;
return uwSig;
}
}
COM: <s> returns the index of the signature of the word numbered word index where </s>
|
funcom_train/20668168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancel( ExportRequest requestToCancel ) {
final boolean callCancel ;
synchronized( stateLock ) {
if( currentExportRequest == requestToCancel ) {
stateAutomaton.setState( State.CANCELLING ) ;
callCancel = true ;
} else {
callCancel = false ;
}
}
if( callCancel ) {
callableSlave.cancel() ;
}
}
COM: <s> cancels processing of given </s>
|
funcom_train/51502661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel4() {
if (jPanel4 == null) {
lbStatTable = new JLabel();
jPanel4 = new JPanel();
jPanel4.setLayout(new BorderLayout());
lbStatTable.setText("JLabel");
jPanel4.add(getJScrollPane2(), java.awt.BorderLayout.CENTER);
jPanel4.add(lbStatTable, java.awt.BorderLayout.NORTH);
}
return jPanel4;
}
COM: <s> this method initializes j panel4 </s>
|
funcom_train/36614916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(String wordLine) {
boolean wordRemoved = false;
wordLine = wordLine.toLowerCase();
Scanner strScan = new Scanner(wordLine);
while (strScan.hasNext())
{
if (super.remove(strScan.next()))
{
wordRemoved = true;
}
}
return wordRemoved;
}
COM: <s> removes a word from the word list </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.