__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/48151428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
super.update();
coinBox.showCoins(trials);
getRecordTable().append(
"\t" + heads + "\t" + (trials - heads) + "\t"
+ format(winRV.getValue()));
winGraph.repaint();
winTable.update();
}
COM: <s> this method updates the display including the coins the record table </s>
|
funcom_train/8250325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCapabilitySwitchNonAccessible() {
//Create the testpage with our panel
wicketTester.startPage(new ITestPageSource() {
private static final long serialVersionUID = 1L;
public Page getTestPage() {
webicalSession.setAccessible(false);
return new PanelTestPage(new TestPanel(PanelTestPage.PANEL_MARKUP_ID));
}
});
assertTrue(setupCommonComponentsCalled);
assertTrue(setupNonAccessibleComponentsCalled);
assertFalse(setupAccessibleComponentsCalled);
}
COM: <s> tests the accesibility switch for non accesibility </s>
|
funcom_train/13690331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh() {
log.debug( Helper.getMessage("console.refresh", this.getClass().getName()) );
removeAllElements();
try {
readData();
this.fireContentsChanged(this,0,this.getSize());
}
catch (MuchoDatabaseException e) {
log.error(e.getLocalizedMessage());
}
}
COM: <s> refreshes the list and the gui </s>
|
funcom_train/36186260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void installService(DeviceProfile serviceProfile, String deviceId) {
Service service;
service = new Service(createServiceId("OperatorId"), null,
deviceId, null, serviceProfile, true);
this.devices.get(deviceId).addService(service);
}
COM: <s> virtually install a service to device </s>
|
funcom_train/10516199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeBlock() throws IOException {
if (debug) {
System.err.println("WriteBlock: blkIdx = " + currBlkIdx);
}
if (outStream == null) {
throw new IOException("writing to an input buffer");
}
outStream.write(blockBuffer, 0, blockSize);
outStream.flush();
currRecIdx = 0;
currBlkIdx++;
Arrays.fill(blockBuffer, (byte) 0);
}
COM: <s> write a tar buffer block to the archive </s>
|
funcom_train/15531900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCacheSizeForTopic(String topicName, int cacheSize) {
synchronized (cacheLock) {
if (rawCacheSizesForTopic == null) {
rawCacheSizesForTopic = new HashMap();
}
rawCacheSizesForTopic.put(topicName, Integer.valueOf(cacheSize));
rawCacheSizesForTopicChanged = true;
}
}
COM: <s> set the number of published data objects cached for a particular event topic </s>
|
funcom_train/45483352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(Composite parent) {
logger.debug("entering createPartControl");
viewer = new TableViewer(parent, SWT.SINGLE | SWT.H_SCROLL
| SWT.V_SCROLL);
contentProvider = new PWListContentProvider(viewer);
viewer.setContentProvider(contentProvider);
viewer.setLabelProvider(new PWListLabelProvider());
viewer.setInput(getViewSite());
hookSelectionListener();
getSite().setSelectionProvider(viewer);
SingletonHolder.registerView(this);
logger.debug("exiting createPartControl");
}
COM: <s> create a table viewer and associate it with our content provider </s>
|
funcom_train/8043298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Field getField(int columnIndex) throws SQLException {
if ((columnIndex < 1) || (columnIndex > this.fields.length)) {
throw SQLError.createSQLException(Messages.getString("ResultSetMetaData.46"), //$NON-NLS-1$
SQLError.SQL_STATE_INVALID_COLUMN_NUMBER, this.exceptionInterceptor);
}
return this.fields[columnIndex - 1];
}
COM: <s> returns the field instance for the given column index </s>
|
funcom_train/9702397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createButton(Composite parent,Button btn,String btnText,String tooltip,boolean visible,boolean editable) {
btn = new Button(parent,SWT.PUSH);
btn.setText(btnText);
btn.setToolTipText(tooltip);
btn.setEnabled(editable);
btn.setVisible(visible);
btn.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
// TODO: implement the SelectionEvent
}
});
}
COM: <s> create a button </s>
|
funcom_train/12558557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSortColumn(int visCol) {
int column = toRealCol(visCol);
if (sortColumn != column) {
sortColumn = column;
if (column == CallRecord.NAME || column == CallRecord.PARENT) {
sortAscending = true;
} else {
sortAscending = false;
}
} else {
sortAscending = !sortAscending;
}
}
COM: <s> set the sorting column </s>
|
funcom_train/4367352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File resolveFile(final String s) {
if(getProject() == null) {
// Note FileUtils.getFileUtils replaces FileUtils.newFileUtils in Ant 1.6.3
return FileUtils.newFileUtils().resolveFile(null, s);
} else {
return FileUtils.newFileUtils().resolveFile(getProject().getBaseDir(), s);
}
}
COM: <s> resolves the relative or absolute pathname correctly </s>
|
funcom_train/32988020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMultiplicity(String atoms) {
int atom = Integer.parseInt(atoms);
if (multis.get(getMolWithH().getAtom(atom)) == null) {
return ("");
} else {
return ((String) multis.get(getMolWithH().getAtom(atom)));
}
}
COM: <s> gets the multiplicity of a certain atom </s>
|
funcom_train/12800733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillSeasonList (int s) {
if (seasonList.size() > s) {
if (seasonList.get(s) == null) {
seasonList.set(s, new Vector<Integer>());
}
} else {
for (int i = seasonList.size(); i < s; i++) {
seasonList.add(null);
}
seasonList.add(new Vector<Integer>());
}
}
COM: <s> fills the season list until s is reached </s>
|
funcom_train/3361989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setByte(int parameterIndex, byte x) throws SQLException {
checkParamIndex(parameterIndex);
if(params == null){
throw new SQLException("Set initParams() before setByte");
}
params.put(new Integer(parameterIndex - 1), new Byte(x));
}
COM: <s> sets the designated parameter to the given code byte code in the java </s>
|
funcom_train/9442570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void wordEdit(View focusView, View focusPairView) {
if (mSelectedViewID > MAX_WORD_COUNT) {
createUserDictionaryToolsEdit(focusPairView, focusView);
} else {
createUserDictionaryToolsEdit(focusView, focusPairView);
}
screenTransition(Intent.ACTION_EDIT, mEditViewName);
}
COM: <s> edit the specified word </s>
|
funcom_train/8084754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawString(String str, int x, int y){
setStateToLocal();
m_printstream.println(xTransform(xScale(x)) + " " + yTransform(yScale(y)) + " moveto" + " (" + escape(str) + ") show stroke");
}
COM: <s> draw text in current pen color </s>
|
funcom_train/25468119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point toPixels(final GeoPoint in, final Point reuse) {
final Point out = (reuse != null) ? reuse : new Point();
final int[] coords = Util.getMapTileFromCoordinates(in.getLatitudeE6(), in.getLongitudeE6(), getPixelZoomLevel(), null);
out.set(coords[MAPTILE_LONGITUDE_INDEX], coords[MAPTILE_LATITUDE_INDEX]);
out.offset(offsetX, offsetY);
return out;
}
COM: <s> converts a geo point to its screen coordinates </s>
|
funcom_train/50392058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(AbstractUIProcessHandler handler, String[] args){
try{
File f=new File(args[0]);
if(!f.exists())return;
FileWriter fw=new FileWriter(args[0],true);
fw.write("\n"+args[1]+"\n");
fw.close();
}
catch(Exception ex){
ex.printStackTrace();
}
}
COM: <s> append a line to gateway connections file </s>
|
funcom_train/23162423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createVerboseCombo() {
GridData gridData1 = new GridData();
gridData1.grabExcessHorizontalSpace = true;
gridData1.verticalAlignment = GridData.CENTER;
gridData1.horizontalAlignment = GridData.FILL;
verboseCombo = new Combo(this, SWT.NONE);
String[] possibleItems = UsbHostFsVerboseMode.valueStrings();
verboseCombo.setItems(possibleItems);
verboseCombo.setLayoutData(gridData1);
}
COM: <s> this method initializes verbose combo </s>
|
funcom_train/3703029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateUniqueID() {
String str;
while (true) {
//// 1. Fill a String with four ints
str = IDFactory.createRandomUID();
//// 2. Make sure we're not already using it.
str = strUIDPrefix + str + strUIDSuffix;
if (this.hasUniqueID(str) == false) {
return (str);
}
}
} // of method
COM: <s> generate a hard to guess mostly unique id </s>
|
funcom_train/43343358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getDHOffset0() {
int offset = (handshakeBytes[1532] & 0x0ff) + (handshakeBytes[1533] & 0x0ff) + (handshakeBytes[1534] & 0x0ff) + (handshakeBytes[1535] & 0x0ff);
offset = offset % 632;
offset = offset + 772;
if (offset + 128 >= 1536) {
log.error("Invalid DH offset");
}
return offset;
}
COM: <s> returns the dh byte offset </s>
|
funcom_train/32144862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processKeyEvent(KeyEvent event) {
int keyCode = event.getKeyCode();
log.debug("Processing key event for custom comboBox");
if ("SPACE".equals(Toolkit.key2ASCII(keyCode))) {
event = new KeyEvent(KeyEvent.VK_ENTER, AWTEvent.KEY_PRESSED, this);
}
super.processKeyEvent(event);
}
COM: <s> user can also select combo box with space key </s>
|
funcom_train/32759234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initButton() {
ActionListener lsnToggle = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
notifyListeners();
}
};
this.butSigInv = new JRadioButton(this.strLabel);
this.butSigInv.addActionListener(lsnToggle);
this.add(this.butSigInv);
}
COM: <s> initializes the signal inversion selection </s>
|
funcom_train/11729679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkInfoEntry(Map info, String key, String expected) {
assertTrue("Missing event info key: " + key, info.containsKey(key));
assertEquals("Wrong event info value for: " + key,
expected, (String) info.get(key));
}
COM: <s> checks if the info map contains the given code key code with the </s>
|
funcom_train/50612551 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public CityMap loadCityMap(String uri) throws IOException {
//[PENDING: this code is broken!]
//InputStream iStream = TSP.class.getResourceAsStream(uri);
//BufferedReader reader = new BufferedReader(new InputStreamReader(iStream));
//CityMap cityMap = null;//new CityMap(Matrix.read(reader).getArray());
return null;
//return cityMap;
}
COM: <s> loads a city map </s>
|
funcom_train/3102755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int describe(final InputSource source) throws IOException {
final XaceRootHandler handler= new XaceRootHandler();
try {
if (!handler.parseSource(source)) {
return INDETERMINATE;
}
} catch (final SAXException exception) {
return INDETERMINATE;
} catch (final ParserConfigurationException exception) {
EiffelCorePlugin.getInstance().logThrowable(exception);
throw new RuntimeException(ResourceMessages.XaceRootHandler_parserConfigurationError);
}
if (handler.hasLibraryElement()) {
if (handler.hasClusterElement()) {
return VALID;
}
return INDETERMINATE;
}
return INDETERMINATE;
}
COM: <s> tries to describe the specified input source </s>
|
funcom_train/46020085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setBounds(new Rectangle(155, 130, 100, 30));
jButton1.setText("Cancel");
jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
close(); // TODO Auto-generated Event stub mouseClicked()
}
});
}
return jButton1;
}
COM: <s> this method initializes j button1 </s>
|
funcom_train/13814694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPhoto( PhotoInfo photo ) {
if ( photos == null ) {
photos = new Vector();
}
ODMGXAWrapper txw = new ODMGXAWrapper();
txw.lock( this, Transaction.WRITE );
if ( !photos.contains( photo ) ) {
txw.lock( photo, Transaction.WRITE );
photo.addedToFolder( this );
photos.add( photo );
modified();
}
txw.commit();
}
COM: <s> add a new photo to the folder </s>
|
funcom_train/33389708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void registerAggregateRoot(AbstractEventSourcedAggregateRoot aggregateRootToRegister) {
if (this.aggregateRoot != null && this.aggregateRoot != aggregateRootToRegister) {
throw new IllegalStateException("Cannot register new aggregate. "
+ "This entity is already part of another aggregate");
}
this.aggregateRoot = aggregateRootToRegister;
}
COM: <s> register the aggregate root with this entity </s>
|
funcom_train/28993684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void register(CreditCard card) throws ECommerceException {
CustomerMediator customerMediator = new CustomerMediator(this.registrant.getCustomer());
Purchase purchase = customerMediator.purchase(this.registrant.getEvent()
.getProduct(),
card);
if (purchase != null) {
registrant.getCustomer().save();
registrant.save();
} else {
throw new ECommerceException("Purchase failed.");
}
}
COM: <s> registers an event given a credit card object </s>
|
funcom_train/30041015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllDigibots() {
for(int i = 0; i < digibots.size(); i++) {
app.getUI().getStats().notifyDeathByAge();
}
digibots.clear();
digibotsGroup.removeAllChildren();
collisionSpace.removeAllCollideables();
}
COM: <s> remove all digibots </s>
|
funcom_train/13850590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadPlugins() {
Package pkg = getClass().getPackage();
String pkgName = "";
if (pkg != null) {
pkgName = pkg.getName();
}
pkgName = pkgName.replace('.', '/');
if (pkgName.length() > 0) {
pkgName += "/";
}
Iterator plugins =
Service.providers(com.sun.jini.tool.envcheck.Plugin.class,
pluginLoader);
while (plugins.hasNext()) {
pluginList.add(plugins.next());
}
}
COM: <s> load the plugin classes </s>
|
funcom_train/34998945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isTopicRead(Topic topic) {
if (!this.isLogged()) {
return true;
}
long lastVisit = this.getLastVisit();
long postTime = topic.getLastPost().getDate().getTime();
if (postTime <= lastVisit) {
return true;
}
Long readTime = this.topicReadTime.get(topic.getId());
return readTime != null && postTime <= readTime;
}
COM: <s> check if the user has read a specific topic </s>
|
funcom_train/16303689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void runServer(ShutdownHook hook) {
CleanupTask cleanUp = new CleanupTask();
hook.register(cleanUp);
this.threads.execute(cleanUp);
try {
ServerSocket socket = new ServerSocket(Constants.getInstance().getListeningPort());
while (true) {
Socket clientSocket = socket.accept();
this.threads.execute(new ClientTask(clientSocket));
}
} catch (IOException e) {
Constants.getInstance().logError(e);
}
this.threads.shutdown();
}
COM: <s> starts the server prepares database access and listens for incoming </s>
|
funcom_train/26200860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearRect(int x,int y,int w,int h) {
closeBlock();
pw.print("q 1 1 1 RG ");// save state, set colour to White
drawRect(x,y,w,h);
closeBlock("B Q"); // close fill & stroke, then restore state
}
COM: <s> this simply draws a white rectangle to clear the area </s>
|
funcom_train/44468479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Post doPostViewExtensions(BlogRunData data, Post post) {
for(Iterator i = extensions.iterator(); i.hasNext();) {
IPostViewExtension ipv = (IPostViewExtension)i.next();
post = ipv.prepareForView(data, post);
}
return post;
}
COM: <s> invoke the extensions to prepare this post for viewing </s>
|
funcom_train/32074827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finishTraining() throws Exception {
modelsByType = new HashMap<String,GISModel>();
for(String type : eventsByType.keySet()) {
DataIndexer di = null;
List<Event> evs = eventsByType.get(type);
if(evs.size() == 1) evs.add(evs.get(0));
di = new TwoPassDataIndexer(new EventCollectorAsStream(new SimpleEventCollector(evs)), 1);
modelsByType.put(type, GIS.trainModel(trainingCycles, di));
}
}
COM: <s> generate a new rescoring model </s>
|
funcom_train/20497625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GeoResoluteRectangle getSurroundingRectangle() {
GeoPoint center = mRectangle.getRectangle().getCenter();
return calculateRectangle(center.getLongitude(), center.getLatitude(),
mRectangle.getImageWidth().intValue() * 2, mRectangle
.getImageHeight().intValue() * 2, mRectangle.getResolution()
.doubleValue(), true);
}
COM: <s> accessor for viewing area </s>
|
funcom_train/3412337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DisplayMode getDisplayMode() {
GraphicsConfiguration gc = getDefaultConfiguration();
Rectangle r = gc.getBounds();
ColorModel cm = gc.getColorModel();
return new DisplayMode(r.width, r.height, cm.getPixelSize(), 0);
}
COM: <s> returns the current display mode of this </s>
|
funcom_train/36110754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void newHand() {
String fname;
int returnVal;
final ImageFileChooser fc = new ImageFileChooser(FileUtils.getDefaultImgDir());
returnVal = fc.showOpenDialog(null);
if (returnVal != ImageFileChooser.APPROVE_OPTION) {
return;
}
fname = fc.getSelectedFile().getPath();
fname = FileUtils.getDefaultPrefix() + fname;
final Hand h = new Hand(fname);
h.add(processors);
//handModel.addHand(h);
addNewHand(h);
}
COM: <s> loads in one or more files </s>
|
funcom_train/40057731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node getFloor(){
//Create a box & set the size
Box floor = new Box("Box", new Vector3f(0, 0, 0), 30, 2, 30);
floor.setDefaultColor(ColorRGBA.brown);
floor.setModelBound(new BoundingBox());
floor.updateModelBound();
Node floorNode = new Node();
floorNode.attachChild(floor);
return floorNode;
}
COM: <s> returns a box which is the floor </s>
|
funcom_train/3291610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean createObjectStorage() {
boolean result=false;
DatabaseTransaction trans=null;
try {
trans=createDatabaseTransaction();
result=createObjectStorage(trans);
trans.commit();
} catch (StorageException e) {
if (trans!=null) trans.rollback();
log.error(e.getMessage());
}
return result;
}
COM: <s> create the object table the basic table for all objects </s>
|
funcom_train/3377447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancel() {
synchronized (lock) {
if (this.latency == NO_TARGET) {
throw new IllegalStateException("Request already"
+ " cancelled");
}
if (!requests.remove(this)) {
throw new InternalError("Latency request "
+ this + " not found");
}
if (requests.isEmpty()) requests = null;
this.latency = NO_TARGET;
adjustLatencyIfNeeded();
}
}
COM: <s> cancels this latency request </s>
|
funcom_train/35837726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setButtonIcon() {
if (!isClosed) {
if (nAlignment == UIToolBarController.HORIZONTAL_ALIGNMENT)
button.setIcon(UIToolBarImages.get(UIToolBarImages.TOOLBAR_VERTICAL_ICON));
else
button.setIcon(UIToolBarImages.get(UIToolBarImages.TOOLBAR_HORIZONTAL_ICON));
}
else {
if (nAlignment == UIToolBarController.HORIZONTAL_ALIGNMENT)
button.setIcon(UIToolBarImages.get(UIToolBarImages.TOOLBAR_HORIZONTAL_ICON));
else
button.setIcon(UIToolBarImages.get(UIToolBarImages.TOOLBAR_VERTICAL_ICON));
}
}
COM: <s> set the icon used for the toolbat panel controller button </s>
|
funcom_train/29723810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToggleButton getJtbShowStdError() {
if (jtbShowStdError == null) {
jtbShowStdError = new JToggleButton();
jtbShowStdError.setMaximumSize(new Dimension(24, 24));
jtbShowStdError.setPreferredSize(new Dimension(24, 24));
jtbShowStdError.setMinimumSize(new Dimension(24, 24));
}
return jtbShowStdError;
}
COM: <s> this method initializes jtb show std error </s>
|
funcom_train/31226166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rename(String on, String nn) {
if (admins.contains(on)) {
admins.remove(admins.indexOf(on));
admins.add(nn);
}
if (afks.contains(on)) {
afks.remove(afks.indexOf(on));
afks.add(nn);
}
if (ignores.contains(on)) {
ignores.remove(ignores.indexOf(on));
ignores.add(nn);
}
users.remove(on);
users.add(nn);
updateList();
serverMessage(on + " renamed to " + nn);
}
COM: <s> changes the name of a user updating list of admins </s>
|
funcom_train/29290027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConfigCMPData findByPrimaryKey(Integer config_id) throws EJBException {
ConfigCMPData configData = new ConfigCMPData();
try {
ConfigCMPLocal configLocal = getConfigCMPLocalHome().findByPrimaryKey(config_id);
configData.setLock_register(configLocal.getLock_register());
configData.setLock_web(configLocal.getLock_web());
} catch (FinderException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return configData;
}
COM: <s> get config to update </s>
|
funcom_train/12181481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Element replace(Element element) {
Element replacement = null;
if (!selectionIsAppropriate(element)) {
throw new IllegalArgumentException(
"The action can not replace a " + //$NON-NLS-1$
element.getName());
} else {
replacement = FormatPrototype.get(formatType);
//call common utility method
this.replaceElement(element, replacement);
}
return replacement;
}
COM: <s> the specified format is replaced by a prototypical instance of the </s>
|
funcom_train/39533506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initializeParts(){
//getting the icons
ImageIcon icon=ResourcesManager.getIcon("Window", false);
ImageIcon disabledIcon=ResourcesManager.getIcon("Window", true);
//getting the menu
JMenu menu=editor.getMenuBar().getMenu(idmenuframe);
if(menu!=null){
menu.setIcon(icon);
menu.setDisabledIcon(disabledIcon);
editor.getMenuBar().build();
}
}
COM: <s> initializes some parts after the modules are initialized </s>
|
funcom_train/49077212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Method getMethodClassByReqURI(String requestURI) {
if(methodCache.get(getControllerName(requestURI)) == null){
return methodCache.get(capitalize(Settings.get("DEFAULT_CONTROLLER"))).get("index");
}
return methodCache.get(getControllerName(requestURI)).get(getMethodName(requestURI));
}
COM: <s> given a request uri returns a method class </s>
|
funcom_train/26669899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int colourDiff(int c1, int c2) {
int a = (c1 >> 24) & 0xFF - ((c2 >> 24) & 0xFF);
int r = (c1 >> 16) & 0xFF - ((c2 >> 16) & 0xFF);
int g = (c1 >> 8) & 0xFF - ((c2 >> 8) & 0xFF);
int b = c1 & 0xFF - (c2 & 0xFF);
return (int) Math.sqrt(a*a+r*r+g*g+b*b);
}
COM: <s> returns the difference in the colour component </s>
|
funcom_train/27940115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void evidenceDealt(Evidence e) {
String name = e.getName();
switch(name.charAt(0)) {
case 's': evidenceDealt((Evidence.Suspect)e);
break;
case 'r': evidenceDealt((Evidence.Room)e);
break;
case 'w': evidenceDealt((Evidence.Weapon)e);
break;
default:
}
}
COM: <s> evidence has been dealt lets update the code notebook panel code </s>
|
funcom_train/15872399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addExtension(String name, PluginPeerItemFactory item) {
TableColumnCore tci = new OldPeerPluginItem(TableManager.TABLE_TORRENT_PEERS,
name, item);
tci.initialize(TableColumnCore.ALIGN_LEAD,
TableColumnCore.POSITION_INVISIBLE, item.getDefaultSize());
addColumn(tci);
}
COM: <s> add an extension from the deprecated plugin peer item factory </s>
|
funcom_train/6253934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InvocationConstraint makeAbsolute(long baseTime) {
if (!rel) {
return this;
}
InvocationConstraint[] vals =
new InvocationConstraint[constraints.length];
for (int i = vals.length; --i >= 0; ) {
InvocationConstraint c = constraints[i];
if (c instanceof RelativeTimeConstraint) {
c = ((RelativeTimeConstraint) c).makeAbsolute(baseTime);
}
vals[i] = c;
}
return reduce(vals, true);
}
COM: <s> returns a constraint equal to the result of taking the constraints in </s>
|
funcom_train/31739751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt(int row, int column) {
SessionListEntry entry = (SessionListEntry) sessions.get(row);
if (column == 0) {
return entry.getSession();
} else if (column == 1) {
return entry.getUserName();
} else {
return "<error>";
}
}
COM: <s> returns the value at row column </s>
|
funcom_train/8525561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSessionKey(String key, MutableHttpResponse response) {
MutableCookie sessionCookie = new DefaultCookie(cookieId);
sessionCookie.setMaxAge(-1); // "non-persistent"
sessionCookie.setValue(key);
// TODO: Set "isSecure" based on whether the request came in over
// a secure transport
response.addCookie(sessionCookie);
}
COM: <s> adds a session cookie to the specified request </s>
|
funcom_train/2369801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getSound(final SOUNDS sound) throws IOException {
InputStream result = null;
if (this.soundNames != null) {
final String resourceName = this.soundNames.get(sound);
if (StringUtils.isNotBlank(resourceName)) {
result = this.getStream(resourceName);
}
}
return result;
}
COM: <s> this method returns an input stream to the sound file which represents </s>
|
funcom_train/33927415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onSetUp() throws Exception {
this.complete = !this.isRollback();
if (this.transactionManager == null) {
this.logger.info("No transaction manager set: test will NOT run within a transaction");
}
else if (this.transactionDefinition == null) {
this.logger.info("No transaction definition set: test will NOT run within a transaction");
}
else {
onSetUpBeforeTransaction();
startNewTransaction();
try {
onSetUpInTransaction();
}
catch (final Exception ex) {
endTransaction();
throw ex;
}
}
}
COM: <s> this implementation creates a transaction before test execution </s>
|
funcom_train/21178340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString () {
String K = (kind==LOCATION)?"LOCATION":"VALUE ";
String S = K + "\t" + tracePoint.toString() + "\t:";
for(int i=0; i< methods.length; i++)
S += "\t" + methods[i];
return S;
}
COM: <s> format the data in an easy to parse form </s>
|
funcom_train/8229872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int numTrapsTotal() {
int count = 0;
int num;
if (setTraps.size() < numTraps) {
num = setTraps.size();
} else {
num = numTraps;
}
for (int i = 0; i < num; i++) {
if (hasTrap(setTraps.get(i)) || hasTrapItem(setTraps.get(i))) {
count++;
}
}
return count;
}
COM: <s> how many traps are down total </s>
|
funcom_train/20207992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnSelecionarConcurso() {
if (btnSelecionarConcurso == null) {
btnSelecionarConcurso = new JButton();
btnSelecionarConcurso.setBounds(new Rectangle(273, 70, 162, 25));
btnSelecionarConcurso.setText("Selecionar Concurso");
btnSelecionarConcurso.addActionListener
(
new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent e)
{
try
{
setConcursoCorrente((Concurso)obterSelecionado());
dispose();
}
catch(Exception ex)
{
new ExceptionSistema(ex);
}
}
}
);
}
return btnSelecionarConcurso;
}
COM: <s> this method initializes btn selecionar concurso </s>
|
funcom_train/2558546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MethodPart getInstance(Method method, Annotation label) throws Exception {
MethodName name = getName(method, label);
MethodType type = name.getType();
if(type == MethodType.SET) {
return new SetPart(name, label);
}
return new GetPart(name, label);
}
COM: <s> this is used to acquire a code method part code for the name </s>
|
funcom_train/38388890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectMember(IMember member) {
fSelectInEditor= false;
if (member.getElementType() != IJavaElement.TYPE) {
} else {
Control viewerControl= getCurrentViewer().getControl();
if (viewerControl != null && !viewerControl.isDisposed()) {
viewerControl.setFocus();
}
if (!member.equals(fSelectedType)) {
getCurrentViewer().setSelection(new StructuredSelection(member), true);
}
}
fSelectInEditor= true;
}
COM: <s> selects an member in the methods list or in the current hierarchy </s>
|
funcom_train/11056859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void verifyInverseCumulativeProbabilities() throws Exception {
for (int i = 0; i < inverseCumulativeTestPoints.length; i++) {
Assert.assertEquals("Incorrect inverse cumulative probability value returned for "
+ inverseCumulativeTestPoints[i], inverseCumulativeTestValues[i],
distribution.inverseCumulativeProbability(inverseCumulativeTestPoints[i]));
}
}
COM: <s> verifies that inverse cumulative probability density calculations match expected values </s>
|
funcom_train/10013659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeSelectedDate(Date d, boolean refresh) {
for (Iterator<Date> it = selection.iterator(); it.hasNext();) {
Date itDate = (Date) it.next();
if (itDate.equals(d)) {
it.remove();
break;
}
}
if (refresh)
refreshDisplay();
}
COM: <s> removes the given date from the selection </s>
|
funcom_train/8012833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(Collection dataRows, Object storeBean, Method storeMethod) throws DataStoreException {
updateInternal(dataRows);
Collection beans = getBeans(dataRows);
try {
Object[] storeParams = {beans};
if (storeMethod != null) {
storeMethod.invoke(storeBean, storeParams);
}
} catch (Exception e) {
throw new DataStoreException("Unable to store bean data back to physical storage.", e);
}
}
COM: <s> copy changed data in the specified datastore rows to their bean source </s>
|
funcom_train/50862516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPowerMode(String newPowerMode) {
if (!powerMode.equals(newPowerMode)) {
if (POWER_UP_MODE.equals(newPowerMode)) powerMode = POWER_UP_MODE;
else if (POWER_DOWN_MODE.equals(newPowerMode)) powerMode = POWER_DOWN_MODE;
settlement.fireUnitUpdate(POWER_MODE_EVENT);
}
}
COM: <s> sets the power grid mode </s>
|
funcom_train/546808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImage(BufferedImage img,int maxX,int maxY) {
BufferedImage lastImage = theImage;
theImage = img;
repaint();
if(lastImage != null)
lastImage.flush();
lastImage = null;
yAxis.setMinimum(0);
yAxis.setMaximum(maxY);
xAxis.setMinimum(-maxX);
xAxis.setMaximum(0);
}
COM: <s> sets the image </s>
|
funcom_train/19544106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSelectedItem() {
if (!required && iconURL.getSelectedIndex() == 0) return null;
String selected = (String)iconURL.getSelectedItem();
if (selected == null || (selected = selected.trim()).length() == -0)
return null;
return selected;
}
COM: <s> get the value in the code jcombo box code </s>
|
funcom_train/29514166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
localChanged = Archive.findChanges(localArchive);
if (client.isLoggedIn()) {
// Collect changed items in archives
Vector remoteChanged = remoteArchive.getContents();
// Compare changed items and collect them in one list, retrieving the associated sync tasks
OsiClient.syncList = Synchronizer.createSyncTasks(localChanged, remoteChanged);
}
else {
OsiClient.syncList = localChanged;
}
refresh();
}
COM: <s> resets the tables synchronization tasks to their default values </s>
|
funcom_train/51783679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Inet4Address getPublicIPAddress() {
try {
return (Inet4Address) InetAddress.getByAddress(new byte[] {
buf.get(8), buf.get(9), buf.get(10), buf.get(11) });
} catch (UnknownHostException e) {
throw new Error("IT shouldn't have been possible to get this!", e);
}
}
COM: <s> only valid if the op code 128 </s>
|
funcom_train/42474801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setClassName(String className) {
if (className == null) throw new NullPointerException("Parameter 'className' must not be null.");
if (className.equals("")) throw new IllegalArgumentException("Parameter 'className' must not be empty.");
this.className = className;
}
COM: <s> sets the class name </s>
|
funcom_train/30140783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void verifyWorkflow() {
this.rightBottomTabbedPane
.setSelectedComponent(this.semanticMatcherViewerPane
.getSwingComponent());
Collection<EdgeConnection> connections = (new VerifyWorkflow(
this.engine)).verifyWorkflow(getGraphCanvas().getGraph()
.getEdges());
this.semanticMatcherViewerPane.showConnectionInfo(connections);
// Repaint the graph canvas because the mis-matched edges may be
// colored.
getGraphCanvas().repaint();
}
COM: <s> verifies that all the connections in the current workflow are compatible </s>
|
funcom_train/16380531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addValuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new UnsettablePropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IncorrectType_value_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IncorrectType_value_feature", "_UI_IncorrectType_type"),
CTEPackage.Literals.INCORRECT_TYPE__VALUE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the value feature </s>
|
funcom_train/46945734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFullNameMethods() throws Exception {
Map<Mutation, Set<int[]>> mutations = mf.extractMutations("alanine64-->Gly");
assertEquals(1, mutations.size());
mutations = mf.extractMutations("Ala64-->glycine");
assertEquals(1, mutations.size());
}
COM: <s> test that mf identifies full name mentions of amino acids </s>
|
funcom_train/20307824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runListClassesTest(int depth, int NS, int NI, boolean withProps) {
createTest(depth, NS, NI, withProps);
long t = list(null, RDF.type.asNode(), RDFS.Class.asNode(), false);
System.out.println("Took " + t + "ms");
}
COM: <s> create and run a list classes test </s>
|
funcom_train/5606190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PyObject adapt(Object o) {
PyObjectAdapter adapter = findAdapter(preClassAdapters, o);
if (adapter != null) {
return adapter.adapt(o);
}
adapter = (PyObjectAdapter) classAdapters.get(o.getClass());
if (adapter != null) {
return adapter.adapt(o);
}
adapter = findAdapter(postClassAdapters, o);
if (adapter != null) {
return adapter.adapt(o);
}
return null;
}
COM: <s> attempts to adapt o using the pre class class and post class adapters </s>
|
funcom_train/22307669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object set(final int index, final Object element) throws UnsupportedOperationException {
final List oldValues = new ArrayList(1);
oldValues.add(delegate_.get(index));
final List newValues = new ArrayList(1);
newValues.add(element);
Object rc = delegate_.set(index, element);
fireChanged( index, oldValues, newValues );
return rc;
}
COM: <s> replaces the element at the specified position in this list with the </s>
|
funcom_train/7777696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getTypeID (String typeName) throws ErrorBean {
FoodItemTypeBroker fitb = FoodItemTypeBroker.getBroker();
List<FoodItemTypeBean> search = new ArrayList<FoodItemTypeBean>();
FoodItemTypeBean toSearch = new FoodItemTypeBean(typeName);
search = fitb.search(toSearch);
if(search.size() == 0)
throwError(
ITEMTYPE_NAME_INVALID,
typeName,
this);
return search.get(0).getId();
}
COM: <s> takes an code item type code name and returns the id </s>
|
funcom_train/22264102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CmsXmlContentErrorHandler getErrorHandler() {
if (m_errorHandler == null && m_content != null) {
// errors were not yet checked, do this now and store result in member
m_errorHandler = m_content.validate(getCms());
}
return m_errorHandler;
}
COM: <s> returns the error handler for error handling of the edited xml content </s>
|
funcom_train/50333098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NceMessage makeAIUPoll(int aiuNo) {
NceMessage m = new NceMessage(2);
m.setBinary(true);
m.setReplyLen(4);
m.setElement(0, NceBinaryCommand.READ_AUI4_CMD);
m.setElement(1, aiuNo);
m.setTimeout(pollTimeout);
return m;
}
COM: <s> construct a binary formatted aiu poll message </s>
|
funcom_train/41301777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean sendStop() {
String cmd = "$STO\r\n";
try {
oStream.write(cmd.getBytes());
} catch (IOException e) {
R.getErrorScreen().view(e, "COMNMEALocationProvider.sendStop", null);
return false;
}
return true;
}
COM: <s> sends the stop command to hge 100 to stop transmitting data </s>
|
funcom_train/47552575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean runToCompletion(Goal endGoal) {
boolean okay = false;
try {
okay = attempt(endGoal);
}
catch (CyclicDependencyException e) {
}
if (Report.should_report(Report.frontend, 1))
Report.report(1, "Finished all passes for " + this.getClass().getName() + " -- " +
(okay ? "okay" : "failed"));
return okay;
}
COM: <s> attempt to complete all goals in the worklist and any subgoals they </s>
|
funcom_train/37020098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeNewGraph() {
gl = new GridLayout(1, 0);
panel = new JPanel(gl);
dataFound = false; // see findData()
setContentPane(panel);
setSize(500, 500);
addWindowListener(new GraphWindowListener());
pack();
centerDialog();
}
COM: <s> instantiates a new content jpanel for this jdialog </s>
|
funcom_train/45809784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInstanceOf(TypedIF typed, TopicIF klass) {
TopicIF _type = typed.getType();
if (klass != null && _type != null
&& (klass.equals(_type) || supertypesWalker.isAssociated(_type, klass))) {
return true;
}
return false;
}
COM: <s> internal determines if the singly typed object code typed code </s>
|
funcom_train/14371931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidForRange(double [] timeStamps) {
if (timeStamps == null || timeStamps.length < 2)
return false;
if (rangeInterval.longValue() == INFINITE.longValue())
return true;
double timeRange = timeStamps[timeStamps.length - 1] - timeStamps[0];
return timeRange >= ((double) getRangeLength());
}
COM: <s> checks whether this data aggregator is valid for use with the specified range </s>
|
funcom_train/26489597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(String err_msg) {
try {
// Get the template node and its children.
Element elem = getElement();
// Return error message if conversion fails.
if(elem == null)
return err_msg;
// Serialize the virtual page.
DOMSerializer serializer = new DOMSerializer(getContext(), language);
return serializer.toString(elem);
} catch (Exception err) {
logError("Exception in virtual page toString", err);
return err_msg;
}
}
COM: <s> p will return the dom object of the template page as a string </s>
|
funcom_train/18790599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addPropertiesToList(IDXMLNode xml, List list, String prefix, String property) {
for (int i = 1; i <= xml.getCount(prefix + ":" + property); i++) {
String element = prefix + ":" + property + "@" + new Integer(i).toString();
Property newProperty = new Property();
newProperty.buildEntity( property, xml.getElement(element) );
list.add(newProperty);
}
}
COM: <s> adds a feature to the properties to list attribute of the entity object </s>
|
funcom_train/1028366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setCalendarHour(Calendar cal, int hour) {
cal.set(java.util.Calendar.HOUR_OF_DAY, hour);
if (cal.get(java.util.Calendar.HOUR_OF_DAY) != hour && hour != 24) {
cal.set(java.util.Calendar.HOUR_OF_DAY, hour + 1);
}
}
COM: <s> advance the calendar to the particular hour paying particular attention </s>
|
funcom_train/24933257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String cycleRepresentation(){
String s = "\nGraph repesentaion of the cycle:\n";
for(DefaultWeightedEdge e : super.getCircle())
s = s + e.toString() + "[weight=" + _graph.getEdgeWeight(e)
+ "]" + ", ";
s = s.substring(0, s.length()-2);
s = s + "\nCycle weight: " + _weight + "\n";
return s;
}
COM: <s> cycle representation by edges with weights </s>
|
funcom_train/39255984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BaseObjectCollection getResolvedBugs() throws Exception {
BaseObjectCollection oResolved = new BaseObjectCollection();
BaseObjectCollection oBugs = getBugs();
for(int i=0;i<oBugs.getCount();i++) {
Bug oBug = (Bug)oBugs.getItem(i);
if(oBug.resolved)
oResolved.Add(oBug);
}
return oResolved;
}
COM: <s> this returns a collection of bugs that have been resolved </s>
|
funcom_train/31801462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertProbeCode(MethodVisitor cv) {
cv.visitInsn(Opcodes.DUP2);
cv.visitLdcInsn(new Integer(getID()));
cv.visitMethodInsn(Opcodes.INVOKESTATIC, HIT_CLASS, "hitBranch",
"(Ljava/lang/Object;Ljava/lang/Object;I)V");
}
COM: <s> returns the code of the probe </s>
|
funcom_train/17679969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SqlExp findWhereJoinExp(SqlExp list) {
for (Join j = joinList; j != null; j = j.next) {
SqlExp e = j.exp;
if (e != null) list = list.next = e;
list = j.selectExp.findWhereJoinExp(list);
}
return list;
}
COM: <s> recursively add all join expressions we can find to list and </s>
|
funcom_train/34794164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String resolve(boolean force) throws PerforceException {
StringBuffer sb = new StringBuffer();
Enumeration en = getFileEntries().elements();
try {
while (en.hasMoreElements()) {
sb.append(((FileEntry)en.nextElement()).resolve(force));
}
} catch (Exception ex) {
throw new PerforceException(ex.getMessage());
}
return sb.toString();
}
COM: <s> resolves this file </s>
|
funcom_train/13913557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getType() {
String ret=null;
org.eclipse.jdt.core.dom.Expression expr=
getAnnotationValue(getVariableAnnotationType(),
"type");
if (expr != null) {
if (expr instanceof StringLiteral) {
ret = ((StringLiteral)expr).getLiteralValue();
} else if (expr instanceof Name) {
ret = org.pi4j.common.ast.ClassUtil.getStaticFieldValue(getTypeDeclaration(),
(Name)expr);
}
}
return(ret);
}
COM: <s> this method returns the schema type for the variable </s>
|
funcom_train/25778966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addJumpTargetInstrNumPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Instruction_jumpTargetInstrNum_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Instruction_jumpTargetInstrNum_feature", "_UI_Instruction_type"),
CoveragepackagePackage.Literals.INSTRUCTION__JUMP_TARGET_INSTR_NUM,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the jump target instr num feature </s>
|
funcom_train/16987562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void turnTo(float angle){
float sinA = (float) Math.sin(angle);
float cosA = (float) Math.cos(angle);
forward.set(1, 0, 0);
float nx = forward.x * cosA - forward.z * sinA;
float nz = forward.x * sinA + forward.z * cosA;
forward.x = nx;
forward.y = 0;
forward.z = nz;
forward.normalize();
}
COM: <s> change direction of movement about y axis to angle in radians </s>
|
funcom_train/44778277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() {
StringBuffer buffer = new StringBuffer();
buffer.append(getTaxon().getName());
buffer.append(":");
buffer.append(getEnvironmentExperiment().getName());
buffer.append(":");
buffer.append(getOntology());
return buffer.toString();
}
COM: <s> returns the name of this phenotype </s>
|
funcom_train/22845234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getResourceAsString(String page, ResourceContext ctx) throws HttpErrorPage, IOException {
String actualPage = VariablesResolver.replaceAllVariables(page, ctx.getOriginalRequest());
ResourceContext resourceContext = new ResourceContext(this, actualPage, null, ctx.getOriginalRequest(), ctx.getOriginalResponse());
String currentValue = getResourceAsString(resourceContext);
return currentValue;
}
COM: <s> this method returns the content of an url as a string </s>
|
funcom_train/33819359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NaturalDomain intersect(final NaturalDomain other){
if(isEmpty() || other.isEmpty()) {
clear();
} else {
if(isContinuous() && other.isContinuous()) {
min = Math.max(min, other.min);
max = Math.min(max, other.max);
if(min > max) { clear(); }
} else {
this.vectorize();
map.intersect(other.map());
this.normalize();
}
}
clearCache();
return this;
}
COM: <s> intersects the domain with the code other code domain </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.