__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/34982747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPrice(Long newVal) {
if ((newVal != null && this.price != null && (newVal.compareTo(this.price) == 0)) ||
(newVal == null && this.price == null && price_is_initialized)) {
return;
}
this.price = newVal;
price_is_modified = true;
price_is_initialized = true;
}
COM: <s> setter method for price </s>
|
funcom_train/35842561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateOperations() {
if (!isOperationsVisible()) {
return;
}
operationsFig.populate();
Rectangle rect = getBounds();
// ouch ugly but that's for a next refactoring
// TODO: make setBounds, calcBounds and updateBounds consistent
setBounds(rect.x, rect.y, rect.width, rect.height);
damage();
}
COM: <s> updates the operations box </s>
|
funcom_train/46691060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPositivePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TestModel_positive_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TestModel_positive_feature", "_UI_TestModel_type"),
MMUnitPackage.Literals.TEST_MODEL__POSITIVE,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the positive feature </s>
|
funcom_train/37248324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleParameter(String str) {
long customValue = 0;
try {
customValue = Long.parseLong(str);
log("Setting up timed cache with interval "+customValue+" seconds ");
}
catch(Exception e) {
log("No normal number was given as parameter to timedrule '"+str+"', falling back to no cacheing");
log(e);
}
if(customValue > 0) {
refreshInterval = customValue * 1000; // rememeber we have milliseconds
}
}
COM: <s> handles the config param </s>
|
funcom_train/50847082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCharacterStream() throws Exception {
testGetXXX("getCharacterStream");
ResultSet rs = this.newFOROJdbcResultSet();
rs.next();
rs.close();
try {
rs.getCharacterStream(1);
fail("Allowed getCharacterStream after close()");
} catch (SQLException ex) {
assertEquals(
"error code",
ex.getErrorCode(),
-ErrorCode.X_24501);
}
}
COM: <s> test of get character stream method of interface java </s>
|
funcom_train/32748664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getMPSEventsSince( final Date time ) {
synchronized ( _mpsEventBuffer ) {
final int count = _mpsEventBuffer.size();
int index;
for ( index = 0; index < count; index++ ) {
final MPSEvent event = (MPSEvent)_mpsEventBuffer.get( index );
if ( !event.getTimestamp().after( time ) ) {
break;
}
}
return _mpsEventBuffer.subList( 0, index );
}
}
COM: <s> get the list of mps events which have occured since the specified time </s>
|
funcom_train/18037114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator getAncestorOrSelfAxisIterator(Object contextNode) {
if (debugging) {
log.info("[DocumentNavigator] ancestor or self axis");
}
// if (!((StAXNode) contextNode).getXMLEvent().isStartElement()) {
// return EMPTY_ITERATOR;
// }
return ((StAXNode) contextNode).getAncestorOrSelfAxis();
}
COM: <s> get an iterator over all of this nodes ancestors and self </s>
|
funcom_train/7623753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int setSinkPriority(String address, int priority) {
if (DBG) log("setSinkPriority(" + address + ", " + priority + ")");
try {
return mService.setSinkPriority(address, priority);
} catch (RemoteException e) {
Log.w(TAG, "", e);
return BluetoothError.ERROR_IPC;
}
}
COM: <s> set priority of a2dp sink </s>
|
funcom_train/43384972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
if (shiftFile == null || shiftFile.equals("")) {
throw new BuildException(MessageUtils.get("no.shift.file"));
}
if (testsFile == null || testsFile.equals("")) {
throw new BuildException(MessageUtils.get("no.tests.file"));
}
staticExecution();
}
COM: <s> executes shift testing as an ant task </s>
|
funcom_train/32056410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
Object[] cells = getCurrentGraph().getSelectionCells();
if (cells != null) {
cells =
DefaultGraphModel
.getDescendants(getCurrentGraph().getModel(), cells)
.toArray();
getCurrentGraph().getModel().remove(cells);
}
}
COM: <s> performs the delete action </s>
|
funcom_train/18344863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveAsBMP(File bmpFile) throws FileNotFoundException, IOException {
BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(bmpFile));
BMPWriter writer = new BMPWriter();
writer.write(os, srcImg, srcImg.getWidth(mainWindow), srcImg.getHeight(mainWindow));
os.close();
}
COM: <s> method that saves the source image as a bmp file </s>
|
funcom_train/41163947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoSingleText3 entity) {
EntityManagerHelper.log("deleting CoSingleText3 instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoSingleText3.class, entity.getSingleTextId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co single text3 entity </s>
|
funcom_train/18894703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Id3Tag getId3Tag(URIReference version) throws QueryException {
checkInitialized();
//lazily generate Id3 tag
try {
if ((id3 == null)
|| !(id3.getVersion().equals(version))) {
id3 = generateId3Tag(version);
}
return id3;
}
catch (Exception exception) {
throw new QueryException("Failed to generate Id3 Tag.", exception);
}
}
COM: <s> returns the mp3 files metadata id3 </s>
|
funcom_train/49111161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isBranchR_LT_X() {
for (int i = 0; i < getBranchFormList().size(); i++) {
GBranchForm form = (GBranchForm) getBranchFormList().get(i);
if (form.isR_LT_X()) {
IpssLogger.getLogger().info(
"Branch R > X, id " + form.getFromId()
+ Constants.Token_BranchIdConnectStr
+ form.getToId());
return true;
}
}
return false;
}
COM: <s> check if any branch r x </s>
|
funcom_train/4466997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddWidget() {
DojoContentPaneModule module = new DojoContentPaneModule();
module.onModuleLoad();
DojoContentPane pane = module.getPane();
int count = pane.getWidgetCount();
Label label = new Label("test");
pane.add(label);
assertTrue(count < pane.getWidgetCount());
assertSame(pane.getWidget(0),module.getImage());
assertSame(pane.getWidget(1),label);
pane.remove(label);
assertEquals(count,pane.getWidgetCount());
}
COM: <s> tests the the adding of several widgets and removing </s>
|
funcom_train/7607216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected float computeArea() {
this.area = 0;
Vector2f v1, v2;
for ( int i = 0; i < vertices.length; i++ ) {
v1 = vertices[i];
v2 = vertices[(i+1) % vertices.length];
this.area += v1.x * v2.y;
this.area -= v2.x * v1.y;
}
return Math.abs(this.area / 2f);
}
COM: <s> computes the area as described by paul borke </s>
|
funcom_train/43245159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetNOKTwoCity() {
System.out.println("getNOKTwoCity");
EmergencyContactDG2Object instance = new EmergencyContactDG2Object();
String expResult = "";
String result = instance.getNOKTwoCity();
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 get noktwo city method of class org </s>
|
funcom_train/15566091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("RTSystemPort".equals(portName)) {
setRTSystemPortEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/27702005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateAsciiStream(String columnName, java.io.InputStream x, int length) throws SQLException {
System.out.println("ResultSetAdapter.updateAsciiStream(String columnName, java.io.InputStream x, int length)");
if(dbResultSet != null)
dbResultSet.updateAsciiStream(columnName, x, length);
else
throw(new SQLException("not implemented"));
}
COM: <s> updates the designated column with an ascii stream value </s>
|
funcom_train/5342240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSelection() {
int[] sel = TABLE.getSelectedRows();
Arrays.sort(sel);
for (int counter = sel.length - 1; counter >= 0; counter--) {
int i = sel[counter];
DATA_MODEL.remove(i);
}
clearSelection();
}
COM: <s> removes all selected rows from the list </s>
|
funcom_train/12561112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lGetSelectedFlags(boolean[] selectedArray_return) {
int countSelected = 0;
for (int i = 0; i < cg.numOfEls; i++) {
selectedArray_return[i] = cg.cgElements[i].selected;
if (selectedArray_return[i]) {
countSelected++;
}
}
return countSelected;
}
COM: <s> gets selected flags only elements corresponding to the </s>
|
funcom_train/21105500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MJButton getBtShowSummary() {
if (btShowSummary == null) {
btShowSummary = new MJButton();
btShowSummary.setText("Show !");
btShowSummary.setMinimumSize(new java.awt.Dimension(152, 20));
btShowSummary.setPreferredSize(new java.awt.Dimension(152, 20));
}
return btShowSummary;
}
COM: <s> this method initializes bt show summary </s>
|
funcom_train/5380587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Shell getParentShell() {
Shell parent = parentShell.getShell();
int modal = SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL | SWT.PRIMARY_MODAL;
if ((getShellStyle() & modal) != 0) {
// If this is a modal shell with no parent, pick a shell using defaultModalParent.
if (parent == null) {
parent = defaultModalParent.getShell();
}
}
return parent;
}
COM: <s> returns parent shell under which this windows shell is created </s>
|
funcom_train/43647135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showFAQ() {
final HtmlPane faqHtmlDialog = new HtmlPane(ZTerm.class
.getResource("docs/faq.html")); //$NON-NLS-1$
final JDialog dialog = faqHtmlDialog.createDialog(view, InternationalMessages
.getString("ZTerm.Title_FAQ")); //$NON-NLS-1$
dialog.setSize(640, 400);
dialog.setVisible(true);
}
COM: <s> show faq dialog </s>
|
funcom_train/22233112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDepth() {
if (isLiveOrCompiled())
if(!this.getCapability(ImageComponent.ALLOW_SIZE_READ))
throw new CapabilityNotSetException(J3dI18N.getString("ImageComponent3D0"));
return ((ImageComponent3DRetained)this.retained).getDepth();
}
COM: <s> retrieves the depth of this 3 d image component object </s>
|
funcom_train/32779945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Row openRow() {
if (currentRow != null) {
throw new RuntimeException(
"There is already an open row. Please close it before opening a new one.");
}
return currentRow = new Row(new RowCloseCallback() {
public FlexReporterBuilder onRowClosed() {
if (currentRow == null) {
throw new RuntimeException(
"There is no open row that can be closed.");
}
rows.add(currentRow);
currentRow = null;
return FlexReporterBuilder.this;
}
});
}
COM: <s> opens a new row for constructrion </s>
|
funcom_train/1008317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void trackScreenSurface(SurfaceData sd) {
if (!done && sd instanceof D3DWindowSurfaceData) {
synchronized (this) {
if (d3dwSurfaces == null) {
d3dwSurfaces = new ArrayList<D3DWindowSurfaceData>();
}
D3DWindowSurfaceData d3dw = (D3DWindowSurfaceData)sd;
if (!d3dwSurfaces.contains(d3dw)) {
d3dwSurfaces.add(d3dw);
}
}
startUpdateThread();
}
}
COM: <s> adds a surface to the list of tracked surfaces </s>
|
funcom_train/7627622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int addStaticItem(ListView listView, int textResId) {
TextView textView = (TextView) getLayoutInflater().inflate(
com.android.internal.R.layout.select_dialog_singlechoice, listView, false);
textView.setText(textResId);
listView.addHeaderView(textView);
mStaticItemCount++;
return listView.getHeaderViewsCount() - 1;
}
COM: <s> adds a static item to the top of the list </s>
|
funcom_train/13511196 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeRow(Row row){
if (row != null){
int index = this.getRows().indexOf(row);
this.getRows().remove(row);
((TableViewModel) this.getModel()).fireTableRowsDeleted(index,index);
}
}
COM: <s> remove one row </s>
|
funcom_train/14070732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSaveRoom() {
room1.setLocation("foo");
try {
logger.info(room1.toString());
dao.saveRoom(room1);
RoomVO r2 = dao.getRoom(ROOM1);
logger.info(r2.toString());
assertEquals("Not updated",room1,r2);
}
catch (DataException e) {
fail(e.getMessage());
}
}
COM: <s> test for updating a room </s>
|
funcom_train/22489707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone () {
final EOrderedMap result = new EOrderedMap();
result._values = (Vector) _values.clone();
result._keys = new Hashtable();
final Enumeration keyEnum = _keys.keys();
while (keyEnum.hasMoreElements()) {
Object nextKey = keyEnum.nextElement();
Object nextIndex = ((Index) _keys.get(nextKey)).clone();
result._keys.put(nextKey, nextIndex);
}
return result;
}
COM: <s> returns a clone of this eordered map </s>
|
funcom_train/3612891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasNextLine() throws IOException {
if (this.afterEnd) {
return false;
}
if (this.nextLine != null) {
return true;
}
this.nextLine = this.reader.readLine();
if (this.nextLine != null) {
return true;
}
this.afterEnd = true;
return false;
}
COM: <s> checks if more lines are available for reading </s>
|
funcom_train/3830001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GM_Object removeObject( GM_Object gmo ) {
if ( gmo == null ) {
return null;
}
int i = aggregate.indexOf( gmo );
GM_Object gmo_ = null;
try {
gmo_ = removeObjectAt( i );
} catch ( GM_Exception e ) {
Debug.debugException( e, "" );
}
setValid( false );
return gmo_;
}
COM: <s> removes the submitted gm object from the aggregation </s>
|
funcom_train/34110337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public void decrementHiddenIndexValues(int fromValue) {
// for (int i=0; i<dataTable.getRowCount(); i++) {
// if (Integer.parseInt(dataTable.getText(i,7))>fromValue) {
// dataTable.setText(i, 7, ""+ (Integer.parseInt(dataTable.getText(i,7))-1) );
// }
// }
// }
COM: <s> decrement index values from a initial value 1 </s>
|
funcom_train/20264488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public V put(E key, V value) {
V oldValue = get(key);
Integer index = elemToIndex.get(key);
if(index==null) {
throw new IllegalArgumentException("Element is not in the universe!");
}
array[index] = value;
return oldValue;
}
COM: <s> associates the key with the value </s>
|
funcom_train/4922898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLoadNoProperties() {
final PropertyConfigurable target = this
.createMock(PropertyConfigurable.class);
// Test
this.replayMockObjects();
// Null for no configuration
SourceHttpResourceFactory
.loadProperties(null, null, null, null, target);
// Empty values for no configuration
SourceHttpResourceFactory.loadProperties("", new File[0],
new String[0], null, target);
this.verifyMockObjects();
}
COM: <s> ensure loads the properties if no configuration provided </s>
|
funcom_train/44598092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BodyDeclaration parseInitializerDeclaration(int start, ModifierSet ms) {
Block block = parseMethodBody();
if (block == null) return null;
Initializer init = ast.newInitializer();
init.setBody(block);
checks.checkModifiers(init.modifiers(),ms,Context.COMPUNIT,Construct.INITBLOCK);
return init;
}
COM: <s> parses an initializer block within a type declaration any modifiers must have </s>
|
funcom_train/3152321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getInitParameterMap() {
synchronized (initParameterMapSync) {
if (initParameterMap==null) {
initParameterMap=new EnumerationMap(servletContext.getInitParameterNames(),
new KeyResolver() {
public Object resolve(Object key) {
return servletContext.getInitParameter((String)key);
}
});
}
}
return initParameterMap;
}
COM: <s> get a map of init param names to values </s>
|
funcom_train/20798105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cancelItem(final Object source) {
/*
* Speakable item = null; synchronized (queue) { int index =
* queue.indexOf(source); if (index == 0) { cancelItem(); } else { item =
* (Speakable) queue.remove(index); if (item != null) { //
* item.postSpeakableCancelled(); item.cancelled(); queueDrained(); } } }
*/
}
COM: <s> cancel the given item </s>
|
funcom_train/13582198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void makeVis(){
File driversLog = new File("./drivers.txt");
File visDir = new File("./output/vis");
File eventsFile = new File("./output/vis/events.txt");
if (driversLog.exists()){
visDir.mkdir();
driversLog.renameTo(eventsFile);
Events2Snapshot events2Snapshot = new org.matsim.run.Events2Snapshot();
events2Snapshot.run(eventsFile, this.config, this.network);
// Run NetVis if possible
if (this.config.getParam("simulation", "snapshotFormat").equalsIgnoreCase("netvis")){
String[] visargs = {"./output/vis/Snapshot"};
// NetVis.main(visargs);
}
} else {
System.err.println("Couldn't find " + driversLog);
System.exit(0);
}
}
COM: <s> conversion of events snapshots </s>
|
funcom_train/48705755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IMD5Node loadMesh(String meshName) {
//create a importer for md5 files
importer = new MD5Importer();
try {
//return null, if the File not found
URL meshURL = MD5Importer.class.getClassLoader().getResource("capr/model/data/mesh/" + meshName);
//load the Mesh
mesh = importer.loadMesh(meshURL, meshName);
//cleanup the importer
importer.cleanup();
} catch(IOException e) {
e.printStackTrace();
}
//return the mesh as IMD5Node
return mesh;
}
COM: <s> ludwig lienkamp br </s>
|
funcom_train/22102881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scheduleEscalation(final EscalationState state) {
final long schedTime = state.getNextActionTime();
HQApp.getInstance().addTransactionListener(new TransactionListener() {
public void afterCommit(boolean success) {
_log.debug("Transaction committed: success=" + success);
if (success) {
scheduleEscalation_(state, schedTime);
}
}
public void beforeCommit() {
}
});
}
COM: <s> this method introduces an escalation state to the runtime </s>
|
funcom_train/24652859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CILogonConfiguration createRoot(Resource subject) throws OperatorException {
org.cilogon.rdf.CILogonConfiguration root = new org.cilogon.rdf.CILogonConfiguration(getMyThingSession(), subject);
root.addType(ROOT_TYPE);
root.setLabel("default");
return root;
}
COM: <s> creates a new empty root </s>
|
funcom_train/22087292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String decompileFunction(Function fun, int indent) {
if (fun instanceof BaseFunction)
return ((BaseFunction)fun).decompile(this, indent, false);
else
return "function " + fun.getClassName() +
"() {\n\t[native code]\n}\n";
}
COM: <s> decompile a java script function </s>
|
funcom_train/39408251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SearchCustomerToolbar getJPanelCustomerSearch() {
if (jPanelCustomerSearch == null) {
jPanelCustomerSearch = new SearchCustomerToolbar(true, true, false, false, false, true, false, false, false);
jPanelCustomerSearch.setPanel(this.parent);
jPanelCustomerSearch.setAlt(this.alt);
}
return jPanelCustomerSearch;
}
COM: <s> this method initializes j panel customer search </s>
|
funcom_train/50345724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyConsistThrottleFound(DccThrottle t) {
this.consistThrottle = t;
for (int i = 0; i < listeners.size(); i++) {
AddressListener l = listeners.get(i);
if (log.isDebugEnabled())
log.debug("Notify address listener of address change " + l.getClass());
l.notifyConsistAddressThrottleFound(t);
}
}
COM: <s> get notification that a consist throttle has been found as we requested </s>
|
funcom_train/20044144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _refresh(){
xCellForChange.setValue(5);
double oldData = xCellForCheck.getValue();
oObj.refresh();
double newData = xCellForCheck.getValue();
log.println("Old data:" + oldData + "; new data:" + newData);
tRes.tested("refresh()", oldData != newData);
}
COM: <s> test sets new value of the cell obtained by object relation </s>
|
funcom_train/41436101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clean() {
for (ClassPath classPath : classPaths) {
classPool.removeClassPath(classPath);
}
for (String classMade : classesMade) {
try {
classPool.get(classMade).detach();
} catch (NotFoundException e) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to detach class " + classMade
+ " from class pool", e);
}
}
}
}
COM: <s> cleans up the class pool cache </s>
|
funcom_train/48151668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
super.reset();
urn.showBalls(0);
orderRV.reset();
orderTable.reset();
String recordText = "";
for (int i = 1; i <= sampleSize; i++)
recordText = recordText + "\tX(" + i + ")";
getRecordTable().append(recordText);
orderGraph.reset();
}
COM: <s> this method resets the experiment including the random variable table </s>
|
funcom_train/7518244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Gasto entity) {
EntityManagerHelper.log("deleting Gasto instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(Gasto.class,
entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent gasto entity </s>
|
funcom_train/2583808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEquals2() {
IntervalCategoryToolTipGenerator g1
= new IntervalCategoryToolTipGenerator();
StandardCategoryToolTipGenerator g2
= new StandardCategoryToolTipGenerator(
IntervalCategoryToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT_STRING,
NumberFormat.getInstance());
assertFalse(g1.equals(g2));
}
COM: <s> check that the subclass is not equal to an instance of the superclass </s>
|
funcom_train/16336010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMovieFrame() {
if (movieMaker == null) {
SimUtilities.showMessage("Unable to create frame - use setMovieFileName first");
return;
}
BufferedImage bufImage = plot.getGraphicsConfiguration().createCompatibleImage(plot.getWidth(), plot.getHeight());
Graphics g = bufImage.getGraphics();
plot.repaint();
movieMaker.addImageAsFrame(bufImage);
g.dispose();
}
COM: <s> adds the currently displayed image as frame to a movie </s>
|
funcom_train/20803898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertPlainParagraph (XText text, XTextCursor textCursor, String extraText, boolean appendNewParagraph) throws Exception {
XPropertySet propertySet = As.XPropertySet (textCursor);
textCursor.collapseToEnd();
propertySet.setPropertyValue ("NumberingRules", Any.VOID);
textCursor.setString ("This is a plain paragraph" + extraText);
if (appendNewParagraph) {
text.insertControlCharacter (textCursor.getEnd(), ControlCharacter.PARAGRAPH_BREAK, false);
}
}
COM: <s> insert a plain text paragraph </s>
|
funcom_train/19622429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
this.life = Constants.PLAYER_DEFAULT_LIVES;
this.bombAmount = Constants.PLAYER_DEFAULT_MAX_BOMBS;
this.bombRadius = Constants.PLAYER_DEFAULT_BOMB_RADIUS;
this.settedBombs = 0;
this.myCoord = new ImmutableCell(0, 0);
}
COM: <s> resets player to initial state </s>
|
funcom_train/26464711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void drawHBar(Graphics graphics) throws GUIException {
Rectangle dim = getHorizontalBarDimension();
graphics.pushClipArea(dim);
int alpha = getBaseColor().a;
Color trackColor = getBaseColor().subtract(0x101010);
trackColor.a = alpha;
Color shadowColor = getBaseColor().subtract(0x303030);
shadowColor.a = alpha;
graphics.setColor(trackColor);
graphics.fillRectangle(new Rectangle(0, 0, dim.width, dim.height));
graphics.setColor(shadowColor);
graphics.drawLine(0, 0, dim.width, 0);
graphics.popClipArea();
}
COM: <s> draws the horizontal scrollbar </s>
|
funcom_train/10345485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void verify(X509Certificate cert) throws GeneralSecurityException {
if (cert == null) {
throw new NullPointerException("Certificate");
}
/*
* The invariant is that valid certificates enter the loop. The validity
* of issuer certs is checked within the loop.
*/
cert.checkValidity();
if (checkIssuer(cert, trusted_, 0) == null) {
fail("Untrusted certificate: %s", cert);
}
return;
}
COM: <s> verifies the given certificate against the trusted certificates passed to </s>
|
funcom_train/11721077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isVersionControlled(DavResource resource) {
boolean vc = false;
if (resource instanceof VersionControlledResource) {
try {
vc = ((VersionControlledResource)resource).getVersionHistory() != null;
} catch (DavException e) {
log.debug("Resource '" + resource.getHref() + "' is not version-controlled.");
}
}
return vc;
}
COM: <s> returns true if the specified resource is a </s>
|
funcom_train/34594220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CommentType insertNewComment(ApplicationType application, CommentType comment) {
CommentsType comments = (application.isSetComments() == true) ? application.getComments() : application.addNewComments();
CommentType newComment = comments.addNewComment();
newComment.set(comment);
return newComment;
}
COM: <s> insert a comment type object into the applications array of comments </s>
|
funcom_train/3098363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void scanFunctionQuote() {
Integer i;
if ( verbosity > 5 )
System.out.println("#'");
if ( (parenLevel > 0) && (parenLevel != readStack.sp) )
readStack.push(consMarkerSymbol);
readStack.push(consMarkerSymbol);
quoteStack.push(new Integer(++parenLevel));
readStack.push(CycObjectFactory.makeCycSymbol("function"));
}
COM: <s> expands s to function s when reading </s>
|
funcom_train/42302548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean iconDuplicate(String iconNumber, Game g) {
boolean b = false;
List<PlayerId> l = g.getListOfPlayers();
if (!l.isEmpty()) {
Iterator<PlayerId> ite = l.iterator();
while (ite.hasNext() && !b) {
PlayerId p = ite.next();
if ((p.getIconNumber()).equals(iconNumber)) {
b = true;
}
}
}
return b;
}
COM: <s> checks if icon number is already an used icon in game g </s>
|
funcom_train/20898649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName( String value) throws DBFException {
if( value == null) {
throw new DBFException( "Field name cannot be null");
}
if( value.length() == 0 || value.length() > 10) {
throw new DBFException( "Field name should be of length 0-10. Wrong value '"+value+"'");
}
this.fieldName = value.getBytes();
this.nameNullIndex = this.fieldName.length;
}
COM: <s> sets the name of the field </s>
|
funcom_train/5522880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printNode(Node node) {
printNode(node, "");
try {
output.write("\n\n");
} catch (Exception badPrint) {
System.err.println("Error in printNodes: " + badPrint.getMessage() + "\n");
badPrint.printStackTrace();
}
}
COM: <s> convenience method for print node with default zero indent </s>
|
funcom_train/43894425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void endAttribute() {
int index = attName.lastIndexOf('/');
if (index > -1) {
//_log.debug("removing " + attName.substring(index+1));
attName = attName.substring(0, index);
} else {
attName = "";
}
//_log.debug("attName now equals " + attName);
insideAttribute = false;
}
COM: <s> ends an attribute by resetting the attribute name and setting </s>
|
funcom_train/50640481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(MetaModelElement.class)) {
case UmpPackage.META_MODEL_ELEMENT__TYPE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
COM: <s> this handles model notifications by calling </s>
|
funcom_train/17932937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getPapPbhtjTextField() {
if (papPbhtjTextField == null) {
papPbhtjTextField = new JTextField();
papPbhtjTextField
.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
// papPbhtjTextField.setPreferredSize(new java.awt.Dimension(100,
// 20));
papPbhtjTextField.setText("16");
papPbhtjTextField.setEditable(false);
}
return papPbhtjTextField;
}
COM: <s> this method initializes ppht papj text field </s>
|
funcom_train/4745660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
Logger.getAnonymousLogger().info(
"Bundling thread started for AMI at " + dnsName);
RemoteControl c = new RemoteControl();
result = c.bundleImage(dnsName, privateKey, credentials, bucket,
imageName, use64Bit, doNotify, messageTopic, messageText,
messageInfo, privateKeyFile, certFile);
Logger.getAnonymousLogger().info(
"Bundling thread completed for AMI at " + dnsName);
}
COM: <s> this is the thread function that is invoked with thread </s>
|
funcom_train/42958320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
if ("ok".equals(e.getActionCommand())) {
Contact contact = new Contact(nameField.getText(), "", "", true);
messenger.addFriend(contact);
} else if ("cancel".equals(e.getActionCommand())) {
}
}
COM: <s> create the gui and show it </s>
|
funcom_train/28983158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getSettingsSMTPPassword () {
if (settingsSMTPPassword == null) {//GEN-END:|84-getter|0|84-preInit
// write pre-init user code here
settingsSMTPPassword = new TextField ("Password*:", null, 64, TextField.ANY | TextField.PASSWORD);//GEN-LINE:|84-getter|1|84-postInit
// write post-init user code here
}//GEN-BEGIN:|84-getter|2|
return settingsSMTPPassword;
}
COM: <s> returns an initiliazed instance of settings smtppassword component </s>
|
funcom_train/27747927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getResizable () {
checkWidget();
int index = parent.indexOf (this);
if (index == -1) return false;
int chandle=OS.GTK_CLIST_COLUMN (parent.handle);
GtkCListColumn gtkcolumn = new GtkCListColumn ();
OS.memmove(gtkcolumn, chandle+index*GtkCListColumn.sizeof, GtkCListColumn.sizeof);
return (gtkcolumn.resizeable == 1) ? true : false;
}
COM: <s> gets the resizable attribute </s>
|
funcom_train/40740029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(Object key, Object value) {
dirty = true;
Member member = ((PartitionedService)cache.getCacheService()).getKeyOwner(key);
UID id = member.getUid();
Map<Object, Object> buf = nodeBuffer.get(id);
if (buf == null) {
buf = new HashMap<Object, Object>();
nodeBuffer.put(id, buf);
}
buf.put(key, value);
if (buf.size() >= putBatchSize) {
push(buf);
buf.clear();
}
}
COM: <s> put new value to cache </s>
|
funcom_train/7518242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Gasto entity) {
EntityManagerHelper.log("saving Gasto instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved gasto entity </s>
|
funcom_train/18938008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Token readParantizer( char theChar, CharReader reader ) {
Map<String,Integer> table = CodesTable.getInstance().getParenthetics();
String toTest = "" + theChar;
if ( table.containsKey( toTest ) ) {
int code = table.get( toTest ).intValue();
this.setCode( code );
this.setLine( reader.getActualLine() );
this.setSymbol( toTest );
return this;
}
return null;
}
COM: <s> checks if the character passed as paramether is a parenthetic </s>
|
funcom_train/31934735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeZoneListener(PoolZoneConnection poolConnection, String objectName, ZoneListener listener) {
Properties environment= (Properties)_info.get(poolConnection.getZoneService());
Map listenersByClass= (Map)_listenersByEnvironment.get(environment);
EventListenerList listeners= (EventListenerList)
listenersByClass.get(objectName);
listeners.remove(ZoneServiceListener.class, listener);
}
COM: <s> remove a listener </s>
|
funcom_train/37075772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProperty(String name, int oldOrNew) {
Hashtable properties;
if (oldOrNew == OLD)
properties = oldProperties;
else
properties = newProperties;
if ((properties == null) || (properties.get(name) == null)) {
return "";
} else {
Vector values = (Vector) properties.get(name);
return (String) values.lastElement();
}
}
COM: <s> return a single property for name </s>
|
funcom_train/50149482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearPersistantDevice(TilesRequestContext tilesContext) {
// notify every persistent object of the best choice
Iterator allPersistent = getPersistentFactories().iterator();
PersistentDeviceFactory currentPersistentDevice;
while (allPersistent.hasNext()) {
currentPersistentDevice = (PersistentDeviceFactory) allPersistent
.next();
currentPersistentDevice.clearDevice(tilesContext);
}
}
COM: <s> sometimes a persistant device needs to be removed from persistance to </s>
|
funcom_train/28992381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hashtable getParmsAsHashtable() {
Hashtable parms = new Hashtable();
Enumeration keys = parameterKeys();
String k;
String[] v;
while (keys.hasMoreElements()) {
k = (String) keys.nextElement();
v = getParameterValues(k);
if (v.length < 2) {
parms.put(k, v[0]);
} else {
parms.put(k, v);
}
}
return parms;
}
COM: <s> overridden to keep string values in the returned </s>
|
funcom_train/42876452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() throws IOException {
Debug.println("enter connect");
if (id == null) {
throw new IllegalStateException("id is not specified");
}
Debug.println("id: " + id + ", connection: " + this.hashCode());
node.connectTo(ID.getID(id.getBytes()));
Debug.println("exit connect");
}
COM: <s> todo be unsupported </s>
|
funcom_train/50464090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void desktopUninstalled() {
isInstalled_flag = false;
//Remove DND Support
removeDNDSupport();
//Hide All Managed Components
Iterator _objs = compCollection.getObjectMap().values().iterator();
while(_objs.hasNext()) {
Object _obj = _objs.next();
if(_obj instanceof Component)
((Component)_obj).setVisible(false);
}
}
COM: <s> this method is called by the desktop service when </s>
|
funcom_train/51813425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JobRequest nextJob(int ms) throws InterruptedException {
if ( log.isDebugEnabled() )
log.debug( "ms="+ms );
JobRequest ret = (JobRequest) getMediator().getNewJobsQueue().pull( ms );
if ( ret != null )
getMediator().getStats().nextJob( ret );
return ret;
}
COM: <s> get next job request </s>
|
funcom_train/5399648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test004Bad() {
form = getForm("form_complex_string_001");
values.put("field_001", "000");
values.put("field_002", "00");
values.put("field_003", "0000");
if (validateForm(values)) {
fail(MSG_001);
}
printValues();
}
COM: <s> field 001 field 002 field 003 do not form proper ssn number </s>
|
funcom_train/5725593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateUniversityIndexOnStatusChange(Long universityId, boolean status) {
logger.debug("Starting method updateUniversityIndexOnStatusChange");
try {
university = universityDao.load(universityId);
if (university.isEnabled()) {
logger.debug("method updateUniversityIndexOnStatusChange: updateIndex");
indexerService.updateIndex(university);
} else {
logger.debug("method updateUniversityIndexOnStatusChange: deleteIndex");
deleteUniversityFromIndexCascade(university);
}
} catch (IndexerApplicationException e) {
logger.error(e);
}
}
COM: <s> updates university index entry when the activation status is changed </s>
|
funcom_train/3881846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAtomicBaseTypeName() {
String typeName = null;
XSDTypeDefinition xmlType = getXMLType();
if (xmlType != null) {
typeName = xmlType.getRootType().getName();
return (typeName == null) ? xmlType.getName() : typeName;
}
return "Unknown AtomicBaseType";
}
COM: <s> get the atomic base type name of this element </s>
|
funcom_train/32329014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void install(final OperationGUI opGUI) {
final Collection<? extends Operation<?, ?>> operations;
if (gui == null) {
operations = new ArrayList<Operation<?, ?>>();
} else {
operations = gui.uninstall();
}
gui = opGUI;
gui.install(operations);
}
COM: <s> installs the object responsible for the presentation </s>
|
funcom_train/42570872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTemplatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_NodeDesc_template_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_NodeDesc_template_feature", "_UI_NodeDesc_type"),
DescPackage.Literals.NODE_DESC__TEMPLATE, true, false, true,
null, null, null));
}
COM: <s> this adds a property descriptor for the template feature </s>
|
funcom_train/29772218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean dateTest(int days) {
Date currentDate = new Date();
double millisPerDay = 1000 * 60 * 60 * 24;
int passedDays = (int)((currentDate.getTime() - lastTestDateTime.getTime()) / millisPerDay);
return ((passedDays < days) && (lastAnswer == true));
}
COM: <s> returns true if the number of days passed from the last test </s>
|
funcom_train/19055063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getM_splitPane2() {
if (m_splitPane2 == null) {
m_splitPane2 = new JSplitPane();
m_splitPane2.setResizeWeight(1.0D);
m_splitPane2.setOneTouchExpandable(true);
m_splitPane2.setDividerSize(8);
m_splitPane2.setDividerLocation(1000);
m_splitPane2.setRightComponent(getM_tabbedPane2());
m_splitPane2.setLeftComponent(getM_tabbedPane());
}
return m_splitPane2;
}
COM: <s> this method initializes m split pane2 </s>
|
funcom_train/8250165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void registerJarFiles(File pluginExtractionPath, JarFolders jarFolders) throws RegistrationException {
if(jarFolders == null || jarFolders.getJarFolder() == null) {
return;
}
for(JarFolder jarFolder : jarFolders.getJarFolder()) {
List<File> files = FileUtils.traverseTree(new File(pluginExtractionPath, jarFolder.getFileName()), FileUtils.JAR_FILE_EXTENSION);
for (File file : files) {
pluginRegistrationStore.addJarRegistration(file);
}
}
}
COM: <s> register jar files </s>
|
funcom_train/33232293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public Connection getQueueConnection(String url) throws SLQueueException {
// Connection connection = null;
// try {
// setActiveMQConnectionFactory(new ActiveMQConnectionFactory(url));
// connection = getActiveMQConnectionFactory().createConnection();
// return (connection);
// }
// catch (JMSException e) {
// throw new SLQueueException(e.getMessage(), e);
// }
// }
COM: <s> get the connection of active mq </s>
|
funcom_train/20826796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Fixtures shuffled() {
List<Fixture> list = new ArrayList<Fixture>();
for (int i=0; i < size(); i++) {
list.add(get(i));
}
Collections.shuffle(list, new Random(1));
Fixtures shuffled = new Fixtures(getDirty());
for (Fixture fixture : list) {
shuffled.add(fixture);
}
return shuffled;
}
COM: <s> gets a copy of this fixture collection with all fixtures </s>
|
funcom_train/23299972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEqualOrMoreSpecific(AuthorizationSubject asHigher){
if ( ((this.authUser == asHigher.authUser) ||
(this.authUser.isDescendent(asHigher.authUser))) &&
this.isEqualOrMoreSpecificIP(asHigher) &&
this.isEqualOrMoreSpecificSN(asHigher)) {
return true;
}
else {
return false;
}
}
COM: <s> this method is used to compare this object with another </s>
|
funcom_train/39358974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel toChangePanel(){
//we create the panel we are going to return
JPanel result = new JPanel();
//we set the layout of the panel
result.setLayout(new BoxLayout(result, BoxLayout.X_AXIS));
result.add(wordToChangeLabel);
//we add some glue
result.add(Box.createRigidArea(new Dimension(20,20)));
result.add(wordToChangeField);
//we set a border around the panel
result.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
//we return the panel
return result;
}
COM: <s> this method creates the panel where the user input the word to change </s>
|
funcom_train/20765558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void getCameraFrame(int[] imgData, int waitTimeout) throws HardwareInterfaceException {
if (!cameraStarted || !CLEyeCameraGetFrame(cameraInstance, imgData, waitTimeout)) {
try {
// Added to give external thread time to catch up as cannot synchronize directly
Thread.sleep(500);
} catch (InterruptedException e) {}
throw new HardwareInterfaceException("capturing frame");
}
}
COM: <s> gets frame data </s>
|
funcom_train/27948171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addContentListener2(Content c, ContentListener l) {
Collection coll = (Collection) contentToCollectionOfContentListeners.get(c);
if (coll == null) {
coll = new LinkedList();
getDB().contentToCollectionOfContentListeners.put(c, coll);
}
coll.add(l);
}
COM: <s> adds a feature to the content listener2 attribute of the </s>
|
funcom_train/13952858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void levelChangedUpdated() {
// There is no form, so we must do this manually
String levelString = (String) context().request().formValueForKey("level");
int levelIndex = Integer.parseInt(levelString);
// If this component was not synchronzing, we would need to change the
// value in grid.row() instead
value = levelList.objectAtIndex(levelIndex);
}
COM: <s> ajax action method for updates to level </s>
|
funcom_train/20678320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeAllDBConnections(HttpServletRequest request) {
ArrayList queryTagList = (ArrayList) request
.getAttribute(REQUEST_PARAM_QUERIES);
if (queryTagList != null) {
Iterator it = queryTagList.iterator();
while (it.hasNext()) {
SmithQuery query = ((QueryTagImpl) it.next()).getQuery();
query.closeAll();
}
}
RequestConnections.releaseConnections(request);
}
COM: <s> closes all result sets at the end of request cycle </s>
|
funcom_train/36075535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean delete(Sessions session) {
Connection con = null;
try {
PreparedStatement ptmt = null;
con = DBUtil.getConnection();
ptmt = con.prepareStatement(deleteSessions);
ptmt.setString(1, session.getId());
ptmt.executeUpdate();
ptmt.close();
return true;
} catch (SQLException ex) {
logger.log(Level.SEVERE, null, ex);
return false;
} finally {
DBUtil.closeConnection(con);
}
}
COM: <s> delete session by session object </s>
|
funcom_train/4116348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reverse() {
int[] newBits = new int[bits.length];
int size = this.size;
for (int i = 0; i < size; i++) {
if (get(size - i - 1)) {
newBits[i >> 5] |= 1 << (i & 0x1F);
}
}
bits = newBits;
}
COM: <s> reverses all bits in the array </s>
|
funcom_train/41332177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MouseListener createMouseListener() {
return new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
Point clickPoint = new Point(e.getPoint());
SwingUtilities.convertPointToScreen(clickPoint, fComponent);
dX = clickPoint.x - fWindow.getX();
dY = clickPoint.y - fWindow.getY();
}
};
}
COM: <s> create the mouse listener </s>
|
funcom_train/44152365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setProbabilityOfSuccess(double p) {
if (Double.isNaN(p) || p <= 0.0 || p >= 1.0) {
throw new IllegalArgumentException("probability of success must"
+ "be between 0.0 and 1.0, exclusive.");
}
this.probabilityOfSuccess = p;
}
COM: <s> modify the probability of success parameter </s>
|
funcom_train/14272959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PADP_Packet parsePADPacket(GenericPacket data) {
if(debugMode) out.println("[PADP] - Parsing incoming PAD Packet.");
PADP_Packet pkt = PADP_Packet.bytes2Packet(data.data);
pkt.sourceSocket = data.source;
pkt.destinationSocket = data.destination;
pkt.transactionID = data.transactionID;
return pkt;
} // end-method
COM: <s> converts an incoming generic data packet into a pad packet instance </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.