__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/46825036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNoCellsLeft () {
int count = 0;
// check each cell
for (int x = 0; x < COLS; x++) {
for (int y = 0; y < ROWS; y++) {
if (data[x][y] != BLANK)
count++;
}
}
//if all 9 spaces filled return true
return (count == ROWS * COLS);
}
COM: <s> return true if all spaces are taken </s>
|
funcom_train/39166305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValue(Annotation annot, AnnotationSet context) {
if(featureName == null || featureName.length() == 00)
throw new IllegalStateException("setKey has not been called with "
+ "the featureName or key was empty");
if(annot == null || annot.getFeatures() == null) return null;
return annot.getFeatures().get(featureName);
}
COM: <s> obtain a named feature </s>
|
funcom_train/38975634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File getFileProperty(final String key, final File defaultValue) {
final String value = getProperty(key);
if (StringUtils.isBlank(value)) {
return defaultValue;
}
final File file = new File(value);
if (file.exists()) {
return file;
}
log.warning("Configuration Path/File does not exists:" + file.getAbsolutePath()
+ ", using default value.");
return defaultValue;
}
COM: <s> get a property which should be a path </s>
|
funcom_train/25825800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getPhysicalObjectRotation(int index, Physical phy) {
// Get the space component the physical is placed onto
SpaceComponent comp = spaceModel.getSpaceComponents().get(index);
// Get the rotation that is dependent on the space model
double rotation = comp.getRotation(phy.getX(), phy.getY());
// Add the rotation that comes from the physical itself
rotation += phy.getRotZ();
return rotation;
}
COM: <s> returns the rotation of a physical object </s>
|
funcom_train/42268032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
ContourPlot newObject = null;
// Make a shallow copy of this object.
newObject = (ContourPlot) super.clone();
// Make a copy of this object's data structures.
int length = this.paths.length;
newObject.paths = new ContourPath[length];
for (int i=0; i < length; ++i)
newObject.paths[i] = (ContourPath)this.paths[i].clone();
// Output the newly cloned object.
return newObject;
}
COM: <s> make a copy of this contour plot object </s>
|
funcom_train/8483396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ATObject base_receive(ATObject receiver, ATAsyncMessage message) throws InterpreterException {
// this additional dispatch to receive will schedule an async self-send when performed
// on near references, which then invokes message.base_process in a later execution turn
// We do not short-circuit this behaviour for consistency purposes: receive is invoked
// on all receiver objects consistently, whether they are near refs, far refs, custom eventual
// refs or any other kind of mirage.
return receiver.meta_receive(message);
}
COM: <s> this operation is </s>
|
funcom_train/31910690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGlyphPosition(int glyphIndex, Point2D newPos) {
int idx = getGVIdx(glyphIndex);
// System.out.println("setting: " + idx + " - " + (glyphIndex-off[idx]) +
// " -> " + newPos);
gvs[idx].setGlyphPosition(glyphIndex-off[idx], newPos);
}
COM: <s> sets the position of the specified glyph within this glyph vector </s>
|
funcom_train/37241405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeOutAudio(int length){
bos.reset();
for(int i=0;i<length;i++){
this.sampleArray[i] = this.sampleArray[i]/*/this.totLines*/;
try{
dos.writeShort((short)(this.sampleArray[i]*32767));
}catch(IOException ioe){ioe.printStackTrace();}
this.sampleArray[i] = (float)0.0;
}
int returned = this.dline.write(bos.toByteArray(),0,bos.size());
this.currentTime += (long)length;
}
COM: <s> this method writes out the convolved sample array to the source data line </s>
|
funcom_train/32156351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getNorthPanel() {
if (northPanel == null) {
northPanel = new JPanel(new CardLayout());
northPanel.add(getEmptyPanel(), EMPTY);
northPanel.add(generatorsPanel, GENERTORSPANEL);
northPanel.add(configurationPanel, CONFIGPANEL);
northPanel.add(resultsPanel, RESULTS_PANEL);
northPanel.add(visualizingPanel, VISUALIZING_PANEL);
northPanel.add(debugPanel, DEBUG_PANEL);
northPanel.add(simulationPanel, SIMULATION_PANEL);
}
return northPanel;
}
COM: <s> this method initializes south panel </s>
|
funcom_train/41593093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRenterStatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Renter_renterState_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Renter_renterState_feature", "_UI_Renter_type"),
LibraryPackage.Literals.RENTER__RENTER_STATE, true, false,
false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the renter state feature </s>
|
funcom_train/34849931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCaretColor(final String stateID, final GLColor color)
{
WidgetState state = null;
if ( stateID == ALL_STATE )
{
Iterator<WidgetState> i = getStates().iterator();
while ( i.hasNext() )
{
state = i.next();
if ( state instanceof FocusedState )
{
((FocusedState)state).setCaretColor(color);
}
}
}
else
{
state = getState(stateID);
if ( state instanceof FocusedState )
{
((FocusedState)state).setCaretColor(color);
}
}
}
COM: <s> sets the caret color for a state of a widget </s>
|
funcom_train/8353177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startExpiringIfNotStarted() {
stateLock.readLock().lock();
try {
if (running) {
return;
}
} finally {
stateLock.readLock().unlock();
}
stateLock.writeLock().lock();
try {
if (!running) {
running = true;
expirerThread.start();
}
} finally {
stateLock.writeLock().unlock();
}
}
COM: <s> if this thread has not started then start it </s>
|
funcom_train/25368440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String globalInfo() {
return "Cluster data using the k means algorithm. Can use either "
+ "the Euclidean distance (default) or the Manhattan distance."
+ " If the Manhattan distance is used, then centroids are computed "
+ "as the component-wise median rather than mean."
+ " For more information see:\n\n"
+ getTechnicalInformation().toString();
}
COM: <s> returns a string describing this clusterer </s>
|
funcom_train/4126089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getMaximumAutoProduction() {
int available = colony.getGoodsCount(getGoodsOutputType());
if (available < getGoodsOutputType().getBreedingNumber()) {
// we need at least two horses/animals to breed
return 0;
}
return Math.max(1, available / 10);
}
COM: <s> returns the maximum production of a building with 0 workplaces </s>
|
funcom_train/4880497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemCommand () {
if (itemCommand == null) {//GEN-END:|67-getter|0|67-preInit
// write pre-init user code here
itemCommand = new Command ("Item", Command.ITEM, 0);//GEN-LINE:|67-getter|1|67-postInit
// write post-init user code here
}//GEN-BEGIN:|67-getter|2|
return itemCommand;
}
COM: <s> returns an initiliazed instance of item command component </s>
|
funcom_train/43904502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buf = new StringBuffer();
buf.append(key);
buf.append('=');
buf.append(type.getName());
buf.append(' ');
if (required) {
buf.append("REQUIRED ");
}
buf.append(description);
return buf.toString();
}
COM: <s> key type description </s>
|
funcom_train/15737985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setProjectScmType(Element content) {
String scmType = getScmType();
if (scmType != null) {
Element component = findComponent(content, "VcsManagerConfiguration");
Element element = findElement(component, "option", "ACTIVE_VCS_NAME");
element.addAttribute("value", scmType);
}
}
COM: <s> sets the scm type of the project </s>
|
funcom_train/4036457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
// Init rsService
rsService = (ReportingSystemServiceAsync) GWT
.create(ReportingSystemService.class);
ServiceDefTarget endpoint = (ServiceDefTarget) rsService;
String moduleRelativeURL = GWT.getModuleBaseURL()
+ "reportingSystemService";
endpoint.setServiceEntryPoint(moduleRelativeURL);
//initAdminPanel();
if ( adminMode() ) {
showAdminLoginDialog();
} else {
initFeedbackForm();
}
if (DEBUG_ENABLED) {
RootPanel.get().add(new Label("Reporting System is enabled"));
}
}
COM: <s> this is the entry point method </s>
|
funcom_train/26511448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getTrackWidth() {
// This strange calculation is here to keep the
// track in proportion to the thumb.
final double kIdealTrackWidth = 7.0;
final double kIdealThumbHeight = 16.0;
final double kWidthScalar = kIdealTrackWidth / kIdealThumbHeight;
return (int) (kWidthScalar * thumbRect.height);
}
COM: <s> returns the shorter dimension of the track </s>
|
funcom_train/36108804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void getBeginningStep() {
double minStep = minEstWaiterTime;
for (Processor processor : getListOfProcessors()) {
if (processor.getState() != Processor.INIT)
throw new ExternalException("All processors should be at INIT-state at the very beginning");
if (minStep == 0) minStep = processor.getTimeStep();
else minStep = min(minStep, processor.getTimeStep());
}
minEstWaiterTime = minStep;
}
COM: <s> calculation of minimal beginning step </s>
|
funcom_train/38762747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HechoVitalAgrupacionHV obtenerHechoVitalAgrupacionHV(Long id) {
Session session = getSession();
try {
return (HechoVitalAgrupacionHV) session.load(HechoVitalAgrupacionHV.class, id);
} catch (HibernateException he) {
throw new EJBException(he);
} finally {
close(session);
}
}
COM: <s> obtiene un hecho vital agrupacion hv </s>
|
funcom_train/34889765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean initLAPI() {
try {
Criteria criteria = new Criteria();
criteria.setPreferredResponseTime((int) DATA_UPDATE_PERIOD);
criteria.setSpeedAndCourseRequired(true);
criteria.setAltitudeRequired(true);
locationProvider = LocationProvider.getInstance(criteria);
locationProvider.setLocationListener(this, -1, -1, -1);
return true;
} catch (Exception e) {
return false;
}
}
COM: <s> inits lapi device </s>
|
funcom_train/16411474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Insets getBorderInsets(Component c) {
becta.viewer.controls.Toolbar toolbar = (becta.viewer.controls.Toolbar) c;
if( ((becta.viewer.controls.ToolbarUI)toolbar.getUI()).isFloating())
//returns the insets when toolbar is in floating mode
return new Insets(1,1,1,32);
else if( toolbar.getOrientation() == JToolBar.HORIZONTAL)
//returns the insets when toolbar in horizontal orientation
return new Insets(1,1,1,26);
else
//returns the insets when toolbar is in vertical orientation
return new Insets(30,1,1,1);
}
COM: <s> returns the insets of border </s>
|
funcom_train/24934735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(){
//Get inOctets from all interfaces of the router
inOctets = getInOctets.execute();
long sum = Utils.inOctetsSum(inOctets);
//calculate the load
double calculatedLoad = (sum - lastSumOctetsRetrieved)/ timePeriod;
if (lastSumOctetsRetrieved != 0){ //Hack to avoid the first load which is calculated against zero sample 0
this.router.getLoadCollection().add(calculatedLoad);
}
lastSumOctetsRetrieved = sum;
}
COM: <s> polls the router for in octets an all its interfaces calculates the load </s>
|
funcom_train/329159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public long getTimeInMillis() {
// Date d = new Date();
// return d.getTime();
switch (PamController.getInstance().getRunMode()) {
case PamController.RUN_NORMAL:
case PamController.RUN_MIXEDMODE:
if (soundFile) {
return sessionStartTime + soundFileTimeInMillis;
} else {
return System.currentTimeMillis();
}
case PamController.RUN_PAMVIEW:
return sessionStartTime + viewPosition;
}
return System.currentTimeMillis();
}
COM: <s> if files are being analysed return the time based on the file </s>
|
funcom_train/51226645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStatText(String filename) {
try {
File x = new File("."+fileSeperator+"statTexts"+fileSeperator+filename);
if(x.exists()) {
statText.setPage(x.toURL());
statText.setCaretPosition(0);
}
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> displayes the specified file in the statistics text windows </s>
|
funcom_train/32136136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDate(Date date) {
DateFormat df = SimpleDateFormat.getDateInstance(DateFormat.DEFAULT, getLocale());
if (date != null) {
dateField.setText(df.format(date));
} else {
dateField.setText("");
}
onTextChange();
}
COM: <s> set the current selected date of the date chooser </s>
|
funcom_train/48889735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireTimeEntryAdded(TimeEntry entry, String eventType){
for(int i = 0; i < listeners.size(); i++){
TimeEntriesListener listener = (TimeEntriesListener) listeners.elementAt(i);
if(eventType == ADD_EVENT){
listener.timeEntryAdded(entry);
}
if(eventType == REMOVE_EVENT){
listener.timeEntryDeleted(entry);
}
if(eventType == UPDATE_EVENT){
listener.timeEntryUpdated(entry);
}
}
}
COM: <s> call the all registered listeners notifying them about the event type </s>
|
funcom_train/25826854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateSingleSimComparison(List<StatisticVar> vars) {
for (int i = 0; i < vars.size(); i++) {
if (timeSeriesList.get(i) != null) {
timeSeriesList.get(i).add(vars.get(i).getCurrentStep(),
vars.get(i).getLastValue());
}
}
}
COM: <s> usage add time series value for each shown variable </s>
|
funcom_train/34897996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleListDownloadRequest(DownloadInclListRequest request, IRequestErrorHandler errorHandler) {
String url = getFileUrl(request.getProjectName(),
request.getInclListName()+OutputFileConstants.INCL_LIST_TSV);
Window.open(url, "_blank", "");
}
COM: <s> handles request for downloading a saved inclusion list </s>
|
funcom_train/49317981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveCatalogOverlaysWithImage() {
if (_navigator != null) {
TablePlotter plotter = _navigator.getPlotter();
if (plotter != null) {
TableQueryResult[] tables = plotter.getTables();
if (tables != null) {
for (TableQueryResult table : tables) {
saveFITSTable(table);
}
}
}
}
}
COM: <s> save any current catalog overlays as a fits table in the image file </s>
|
funcom_train/573711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public Hashtable searchExtendedPlugin( boolean scanJar ){
Hashtable list = new Hashtable();
FilterFileExtension filter = _CUSTOMIZATION_EXTENSION_;
searchExtendedPlugin( naaraniLibraryPath, scanJar, filter, list );
searchExtendedPlugin( applicationSourcePath, scanJar, filter, list );
searchExtendedPlugin( applicationClassPath, scanJar, filter, list );
return list;
}
COM: <s> scan for pluing customization to add em into </s>
|
funcom_train/15408071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IdBinder createIdBinder(BeanProperty[] uids) {
if (uids.length == 0){
// for report type beans that don't need an id
return EMPTY;
} else if (uids.length == 1){
if (uids[0].isEmbedded()){
return new IdBinderEmbedded(idInExpandedForm, (BeanPropertyAssocOne<?>)uids[0]);
} else {
return new IdBinderSimple(uids[0]);
}
} else {
return new IdBinderMultiple(uids);
}
}
COM: <s> create the id convert set for the given type of id properties </s>
|
funcom_train/32155921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTable getDetailsTable() {
if (detailsTable == null) {
detailsTable = new JTable();
detailsTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
detailsTable.addColumn(getDetailsTableColumn1());
detailsTable.addColumn(getDetailsTableColumn2());
detailsTable.addColumn(getDetailsTableColumn3());
detailsTable.setAutoCreateColumnsFromModel(false);
detailsTable.setModel(new ResultsPanelModel());
}
return detailsTable;
}
COM: <s> this method initializes details table </s>
|
funcom_train/13258622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInputDistribution(String text, final String property, Container cont) {
// Creates a Map with Distributions Names, then delegates addInputCombo to create graphical
// components
Map<String, String> distributions = new TreeMap<String, String>();
Distribution[] all = Distribution.findAll();
for (Distribution element : all) {
distributions.put(element.getClass().getName(), element.getName());
}
addInputCombo(text, property, cont, distributions);
}
COM: <s> adds an input field to chose a for a distribution </s>
|
funcom_train/3843252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean performOk() {
boolean result = super.performOk();
if (result && isPropertyPage()) {
// Save state of radiobuttons in project properties
IResource resource = (IResource) getElement();
try {
String value =
(useProjectSettingsButton.getSelection()) ? TRUE : FALSE;
resource.setPersistentProperty(
new QualifiedName(pageId, USEPROJECTSETTINGS),
value);
} catch (CoreException e) {
}
}
return result;
}
COM: <s> we override the perform ok method </s>
|
funcom_train/34999868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void preview(@Parameter(key = "message") String message, @Parameter(key = "options") PostFormOptions options) {
Post post = new Post();
post.setText(message);
post.setBbCodeEnabled(options.isBbCodeEnabled());
post.setHtmlEnabled(options.isHtmlEnabled());
post.setSmiliesEnabled(options.isSmiliesEnabled());
this.propertyBag.put("post", post);
}
COM: <s> displays the page to preview a message before posting it </s>
|
funcom_train/25146733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void appendSqlColumnType(DbColumn column, StringBuilder sb) {
sb.append(getTypeName(column.getDataType()));
if (column.getSize() != null) {
sb.append('(').append(column.getSize());
if (column.getScale() != null) {
sb.append(',').append(column.getScale());
}
sb.append(')');
}
}
COM: <s> append the column type and precision and scale if they are defined </s>
|
funcom_train/27929779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String comment(String commentString) {
String retval = "";
if (! _commenting)
retval += startComment();
Element sqlElement = _dbtypeRootElement.getFirstChildElement("sql");
Element continueCommentElement = sqlElement.getFirstChildElement("continue-comment");
retval += continueCommentElement.getValue();
retval += commentString;
return retval;
}
COM: <s> returns the continue comment string including the comment </s>
|
funcom_train/46760070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TemplateModel getTemplate(final long templateId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return ReferenceData.getTemplate(templateId, chain, call);
}}; return (TemplateModel) call(method, call);
}
COM: <s> same transaction return the single template model for the primary key </s>
|
funcom_train/32720079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int leftMostCompare(int n, OID other) {
for (int i=0; i<n; i++) {
if (value[i] == other.value[i]) {
continue;
}
else if ((value[i] & 0xFFFFFFFFL) <
(other.value[i] & 0xFFFFFFFFL)) {
return -1;
}
else {
return 1;
}
}
return 0;
}
COM: <s> compares the n leftmost sub identifiers with the given code oid code </s>
|
funcom_train/6279374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMessageTo() throws MessagingException {
String s = "";
String recipient = "";
Address[] ad = getMessage().getRecipients(MimeMessage.RecipientType.TO);
if (ad != null) {
for (int i = 0; i < ad.length; i++) {
if (i != 0)
s = s + "; ";
recipient = ad[i].toString();
s = s + recipient;
}
}
try {
return MimeUtility.decodeText(s);
} catch (UnsupportedEncodingException e) {
return s;
}
}
COM: <s> method get message to </s>
|
funcom_train/30075617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ModelAndView onSubmit(Object command) throws ServletException {
Contact contact = (Contact) command;
// delegate the insert to the Business layer
getGpir().storeContact(contact);
return new ModelAndView(getSuccessView(), "contactId", Integer.toString(contact.getId()));
}
COM: <s> method inserts a new code contact code </s>
|
funcom_train/68457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setMeasureBox(Serving s) {
if (s != null) {
measureBox.removeAllItems();
List measures = s.getFood().getMeasures();
for (int i=0; i<measures.size(); i++) {
measureBox.addItem(measures.get(i));
}
measureBox.setSelectedItem(s.getMeasure());
}
}
COM: <s> set the combo box table cell editor to the currently </s>
|
funcom_train/16081832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static private boolean isLocalVariable(final DetailAST child) {
final DetailAST parent = child.getParent();
if (parent.getType() == TokenTypes.METHOD_CALL) {
return false;
}
if (parent.getType() == TokenTypes.DOT) {
// We return false if it is NOT the first of DOT
DetailAST first = (DetailAST) parent.getFirstChild();
if (first != child) {
return false;
}
}
return true;
}
COM: <s> test if a detail ast is a local variable </s>
|
funcom_train/3316131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSet getOnlyRowResultSet(String aSqlQuery) throws SQLException {
Statement stmt = mConnection.createStatement();
sLogger.fine("Running one row query:" + aSqlQuery);
ResultSet rs = stmt.executeQuery(aSqlQuery);
if (rs.next()) {
return rs;
} else {
return null;
}
}
COM: <s> returns a result set that point on the first row </s>
|
funcom_train/8639990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTotalWidth(float columnWidth[]) throws DocumentException {
if (columnWidth.length != this.relativeWidths.length)
throw new DocumentException("Wrong number of columns.");
totalWidth = 0;
for (int k = 0; k < columnWidth.length; ++k)
totalWidth += columnWidth[k];
setWidths(columnWidth);
}
COM: <s> sets the full width of the table from the absolute column width </s>
|
funcom_train/10482292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Token parseHeaderList(IMAPResponseTokenizer source) throws MessagingException {
headers = new ArrayList();
// normal parsing rules going on here
while (source.notListEnd()) {
String value = source.readString();
headers.add(value);
}
// step over the closing paren
source.next();
// NB, back to the expanded token rules again
return source.next(false, true);
}
COM: <s> parse a header list that may follow the header </s>
|
funcom_train/26603070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void windowWillClose(NSNotification aNotification) {
super.windowWillClose(aNotification);
if (calcConnectedServers)
Preferences.rememberColumnSizes(this, serversList);
if (calcKnownServers)
Preferences.rememberColumnSizes(this, allServersList);
talker.stopCommandIfCurrent("vma");
if (thread!=null)
thread.stopRunning();
}
COM: <s> closes the window and stops the update thread </s>
|
funcom_train/11515648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putAll(int index, Map<? extends K, ? extends V> map) {
for (Map.Entry<? extends K, ? extends V> entry : map.entrySet()) {
put(index, entry.getKey(), entry.getValue());
index++;
}
}
COM: <s> puts the values contained in a supplied map into the map starting at </s>
|
funcom_train/14228170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void transfer(Call otherCall) throws MethodNotSupportedException, ResourceUnavailableException, InvalidArgumentException, InvalidPartyException, InvalidStateException, PrivilegeViolationException {
// see if we can find a common terminal
TerminalConnection tc = this.getTransferController();
tc = getOrVerifyController(tc, otherCall);
transfer(tc, otherCall);
}
COM: <s> transfer by conferencing and then dropping off the call </s>
|
funcom_train/47696367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration enumerateAttributeNames() {
Vector result = new Vector();
Enumeration enume = this.attributes.elements();
while (enume.hasMoreElements()) {
XMLAttribute attr = (XMLAttribute) enume.nextElement();
result.addElement(attr.getFullName());
}
return result.elements();
}
COM: <s> returns an enumeration of all attribute names </s>
|
funcom_train/3382665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WritableRaster createCompatibleWritableRaster(int w, int h) {
if (w <= 0 || h <=0) {
throw new RasterFormatException("negative "+
((w <= 0) ? "width" : "height"));
}
SampleModel sm = sampleModel.createCompatibleSampleModel(w,h);
return new IntegerComponentRaster(sm, new Point(0,0));
}
COM: <s> creates a raster with the same band layout but using a different </s>
|
funcom_train/10366166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setCertificateChallenge(BigInteger sNo, String challenge) {
if(challenges == null) {
loadChallenges();
}
if(!challenges.containsKey(sNo.toString())) {
challenges.setProperty(sNo.toString(), challenge);
storeChallenges();
return true;
}
return false;
}
COM: <s> this method stores the challenge phrase against the specified certificate serial number </s>
|
funcom_train/46857347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxfRuningSong() {
if (txfRuningSong == null) {
txfRuningSong = new JTextField();
txfRuningSong.setFont(new java.awt.Font(EnvProperties.getJbpFont2(), java.awt.Font.PLAIN, 15));
txfRuningSong.setBounds(new java.awt.Rectangle(159,18,381,29));
txfRuningSong.setText("");
}
return txfRuningSong;
}
COM: <s> this method initializes txf runing song </s>
|
funcom_train/46759794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ISTreeNode storeChildPanelDialogCopies(final long newAppDialogRefId, final Long frameOrDialogPanel, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return DialogBuilder.getInstance(self).storeChildPanelDialogCopies(newAppDialogRefId, frameOrDialogPanel, call);
}}; return (ISTreeNode) call(method, call);
}
COM: <s> creates a frame or dialog panel under the selected application dialog </s>
|
funcom_train/7510768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerAddRowButton(JButton button) {
if (addButton != null) {
throw new IllegalStateException("'addButton' button already registered ("
+ addButton.getText() + ").");
}
if (button == null) {
throw new IllegalStateException("Internal error. Parameter 'button' must be not null.");
}
this.addButton = button;
button.setActionCommand("add");
button.setName("add");
Utils.addCheckedListener(button, this);
}
COM: <s> register add row button on dialog </s>
|
funcom_train/18740427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Choice choice(RegExpr other) {
if (other instanceof Choice) {
List<RegExpr> operands = new ArrayList<RegExpr>();
operands.add(this);
operands.addAll(other.getOperands());
return new Choice(operands);
} else {
return new Choice(Arrays.asList(new RegExpr[] {this, other}));
}
}
COM: <s> creates and returns the choice composition of this regular expression and </s>
|
funcom_train/50878338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearGrid(){
myGridPanel.removeAll();
myBinTitleButtonList = new ArrayList();
myBinColorButtonList = new ArrayList();
myValueButtonList = new ArrayList();
myListMinTextFieldList = new ArrayList();
myListMaxTextFieldList = new ArrayList();
}
COM: <s> clear the contents of the array </s>
|
funcom_train/47310021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addColumns() {
// create the columns
TreeColumn[] columns = tree.getColumns();
for (int i = 0; i < columnLabels.length; i++) {
String string = columnLabels[i];
if (string != null) {
TreeColumn column;
if (i < columns.length)
column = columns[i];
else
column = new TreeColumn(tree, 0);
column.setText(string);
}
}
tree.addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent e) {
DetailsSheetViewer.this.controlResized(e);
}
});
}
COM: <s> add columns to the tree and set up the layout manager accordingly </s>
|
funcom_train/13850737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object run() {
try {
Integer value = Integer.getInteger(theProp);
if (value != null) {
return value;
}
} catch (SecurityException e) {
if (logger.isLoggable(Levels.HANDLED)) {
LogUtil.logThrow(logger, Levels.HANDLED,
GetIntegerAction.class, "run",
"security exception reading \"{0}\", returning {1}",
new Object[] { theProp, defaultValue() }, e);
}
}
return defaultValue();
}
COM: <s> determines the code int code value of the system property </s>
|
funcom_train/30009270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetReadInfo() {
System.out.println("setReadInfo");
boolean info = true;
Document instance = new Document();
int expResult = 0;
int result = instance.setReadInfo(info);
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 set read info method of class papyrus </s>
|
funcom_train/25778958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addJumpedToNextPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Jump_jumpedToNext_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Jump_jumpedToNext_feature", "_UI_Jump_type"),
CoveragepackagePackage.Literals.JUMP__JUMPED_TO_NEXT,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the jumped to next feature </s>
|
funcom_train/36956655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handlePostSelectionChanged(SelectionChangedEvent event) {
ISelection selection= event.getSelection();
// If the selection is the same as the one that triggered the last
// open event then do nothing. The editor already got revealed.
if (isLinkingEnabled() && !selection.equals(fLastOpenSelection)) {
linkToEditor((IStructuredSelection)selection);
}
fLastOpenSelection= null;
}
COM: <s> handles post selection changed in viewer </s>
|
funcom_train/32235096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getString(String prefix, int position) {
return Platform.getPreferencesService().getString(Activator.PLUGIN_ID,
MessageFormat.format("{0}.{1}", prefix, position), "", null); //$NON-NLS-1$ //$NON-NLS-2$
}
COM: <s> auxiliary method to get the value of a positional preference </s>
|
funcom_train/7494327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putSentence( int hash, int page, int sentence, String text){
ContentValues vals = new ContentValues();
vals.put(HASH_ID, hash);
vals.put(PAGE_NUMBER, page);
vals.put(SENTENCE_NUMBER, sentence);
vals.put(SENTENCE_TEXT, text);
db.insert(SENTENCE_TABLE, null, vals);
}
COM: <s> add sentence for the page </s>
|
funcom_train/39102243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void create() {
list = new JList(getModel().getValueArray().getListModel());
JScrollPane scrollPane = new JScrollPane(list);
scrollPane.setPreferredSize(new Dimension(200, 100));
setJComponent(scrollPane);
list.addListSelectionListener(new MyListSelectionListener());
update();
}
COM: <s> creates the jlist </s>
|
funcom_train/10509665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate() {
verifySettings();
dieOnCircularReference();
String errmsg = getError();
if (errmsg != null) {
throw new BuildException(errmsg);
}
Enumeration e = selectorElements();
while (e.hasMoreElements()) {
Object o = e.nextElement();
if (o instanceof BaseSelector) {
((BaseSelector) o).validate();
}
}
}
COM: <s> p this implementation validates the container by calling </s>
|
funcom_train/3581142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateGraphToMatch(Graph g) {
Pair oldAndNewVertices = getSymmetricDifference(
currentLayout.visVertexMap.keySet(), g.getVertices());
Pair oldAndNewEdges = getSymmetricDifference(currentLayout.visEdgeMap
.keySet(), g.getEdges());
updateGraph(oldAndNewVertices, oldAndNewEdges);
// cleanupReferences(g);
}
COM: <s> updates the stored set of of vertices and edges to match the input </s>
|
funcom_train/7281382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void tResume(File incFile) throws Exception {
downloadServices.download(incFile);
waitForComplete();
if (isComplete())
LOG.debug("pass" + "\n");
else
fail("FAILED: complete corrupt");
IncompleteFileManager ifm = downloadManager.getIncompleteFileManager();
VerifyingFile vf = ifm.getEntry(incFile);
assertNull("verifying file should be null", vf);
}
COM: <s> performs a generic resume download test </s>
|
funcom_train/45397209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeFromPackageInfo (ClassSource src) {
List<String> pkgs = new ArrayList<String>(this.pkgMap.keySet());
int size = pkgs.size();
for (int k=0; k<size; k++) {
CompositePackageSearchInfo info = pkgMap.get(pkgs.get(k));
if (info != null && info.sources != null) {
info.sources.remove(src);
info.searchedFormally = false;
}
}
}
COM: <s> facility method remove all cached package information related </s>
|
funcom_train/1169968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel5() {
if (jPanel5 == null) {
jPanel5 = new JPanel();
jPanel5.setLayout(null);
jPanel5.setBounds(5, 262, 583, 270);
jPanel5.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
jPanel5.add(getJScrollPane1());
}
return jPanel5;
}
COM: <s> p getter for the field code j panel5 code </s>
|
funcom_train/38314331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setQName(String qName) {
this.qName = qName;
int i = qName.indexOf(':');
if (i > -1) {
this.setLocalName(qName.substring(i + 1));
}
else {
this.setLocalName(qName);
}
}
COM: <s> sets the q name </s>
|
funcom_train/18275110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reload() {
if (chromeAdapter==null) return;
mozAsyncExec(new Runnable() { public void run() {
nsIWebNavigation nav = qi(chromeAdapter.getWebBrowser(), nsIWebNavigation.class);
nav.reload(nsIWebNavigation.LOAD_FLAGS_NONE);
}});
}
COM: <s> triggers re loading of current page </s>
|
funcom_train/36960567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static interface IAddLibrariesQuery {
/**
* Get the new classpath entries for libraries to be added to the buildpath.
*
* @param project the Ruby project
* @param entries an array of classpath entries for the project
* @return Returns the selected classpath container entries or an empty if the query has
* been cancelled by the user.
*/
public ILoadpathEntry[] doQuery(final IRubyProject project, final ILoadpathEntry[] entries);
}
COM: <s> query to add libraries to the buildpath </s>
|
funcom_train/36863305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean walkPathOnScreen(RSTile[] path, int maxDist) {
try {
RSTile next = nextTile(path, maxDist);
if (next != null)
return atTile(getTileOnScreen(next), "alk");
else
return false;
} catch (Exception e) {
log("walkPathOnScreen() error: " + e.getMessage());
return false;
}
}
COM: <s> walks a path using on screen clicks and not the mini map </s>
|
funcom_train/18358198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void RegisterServices(Collection registrars) {
// now register any services that require it.
Iterator anIt = regdservices.values().iterator();
while (anIt.hasNext() == true) {
ProviderServiceRecord aRec = (ProviderServiceRecord)anIt.next();
switch (aRec.ServiceState) {
case ProviderServiceRecord.ServiceUnregistered:
case ProviderServiceRecord.ServiceLeaseExpired:
// register an unregistered, or lease expired
RegisterService(registrars,aRec);
break;
case ProviderServiceRecord.ServiceAvailable:
// do nothing...
break;
}
}
}
COM: <s> register services will register all the services in regdservices </s>
|
funcom_train/42452646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void autoUpgrade(IPersistenceObject dao) throws BasicException {
// Get the configuration
Configuration conf = getConfiguration(dao);
// Verify update needed
if (conf.getSystemVersion() == null) {
upgrade110_111(dao, conf);
}
if (conf.getSystemVersion() != null
&& conf.getSystemVersion().equals("1.2.0")) {
upgrade120_121(dao, conf);
}
}
COM: <s> upgrade from older versions to the current </s>
|
funcom_train/20464175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
if (descriptors == null) {
super.clear();
} else {
Iterator keys = keySet().iterator();
while (keys.hasNext()) {
Object key = keys.next();
if (!descriptors.containsKey(key)) {
keys.remove();
}
}
}
}
COM: <s> p override the default code map code behavior to clear all keys and </s>
|
funcom_train/21942542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Field103 getField103() {
if (getSwiftMessage() == null) {
throw new IllegalStateException("SwiftMessage was not initialized");
}
if (getSwiftMessage().getBlock4() == null) {
log.info("block4 is null");
return null;
} else {
final Tag t = getSwiftMessage().getBlock4().getTagByName("103");
if (t == null) {
log.fine("field 103 not found");
return null;
} else {
return new Field103(t.getValue());
}
}
}
COM: <s> iterates through block4 fields and return the first one whose name matches 103 </s>
|
funcom_train/5573449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
IGraphicalNodeInfo info = (IGraphicalNodeInfo) deleted
.getGraphicalInfo();
parent.removeSubElement(deleted);
done = true;
logger.debug("execute():" + "\n\tdeleted CONSTRAINT "
+ info.getContraints() + "\n\tIGraphicalNodeInfo: "
+ info.getClass() + "\n\tparent: " + parent.getClass());
}
COM: <s> the execute is the same as a redo </s>
|
funcom_train/13588252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PlanStrategy chooseStrategy(final Person person) {
double rnd = MatsimRandom.getRandom().nextDouble() * this.totalWeights;
double sum = 0.0;
for (int i = 0, max = this.weights.size(); i < max; i++) {
sum += this.weights.get(i).doubleValue();
if (rnd <= sum) {
return this.strategies.get(i);
}
}
return null;
}
COM: <s> chooses a weight influenced random strategy </s>
|
funcom_train/20764858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean hasStringIdentifier(){
// get string descriptor
status = gUsbIo.getStringDescriptor(stringDescriptor1,(byte)1,0);
if (status != USBIO_ERR_SUCCESS) {
return false;
} else {
if(stringDescriptor1.Str.length()>0) return true;
}
return false;
}
COM: <s> checks if device has a string identifier that is a non empty string </s>
|
funcom_train/12245513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Phoneme getFirstVoicedPhoneme() {
for (int i = 0; i < syllables.size(); i++) {
Syllable syl = (Syllable) syllables.elementAt(i);
Vector ps = syl.getPhonemes();
for (int j = 0; j < ps.size(); j++) {
Phoneme p = (Phoneme) ps.elementAt(j);
if (p.hasVoicing()) {
return p;
}
}
}
return null;
}
COM: <s> retrieve the first phoneme that has a voice information f0 0 from the </s>
|
funcom_train/48630646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPreferences() {
System.out.println("getPreferences");
Graphe instance = new Graphe();
Preferences expResult = null;
Preferences result = instance.getPreferences();
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 preferences method of class graphe </s>
|
funcom_train/44710191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOption(Option opt, PageState ps) {
ArrayList list = m_options;
if (ps == null) {
Assert.assertNotLocked(this);
} else {
list = (ArrayList)m_requestOptions.get(ps);
}
opt.setGroup( this );
list.add(opt);
}
COM: <s> adds a new option for the scope of the current request or </s>
|
funcom_train/2586999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object createObject() {
final DecimalFormat format = (DecimalFormat) super.createObject();
if (getParameter("pattern") != null) {
format.applyPattern((String) getParameter("pattern"));
}
if (getParameter("localizedPattern") != null) {
format.applyLocalizedPattern((String) getParameter("localizedPattern"));
}
return format;
}
COM: <s> creates an object code decimal format code based on this description </s>
|
funcom_train/29019414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void subtract (int[] pointArray) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (OS.IsWinCE) SWT.error(SWT.ERROR_NOT_IMPLEMENTED);
int /*long*/ polyRgn = OS.CreatePolygonRgn(pointArray, pointArray.length / 2, OS.ALTERNATE);
OS.CombineRgn (handle, handle, polyRgn, OS.RGN_DIFF);
OS.DeleteObject (polyRgn);
}
COM: <s> subtracts the given polygon from the collection of polygons </s>
|
funcom_train/8686591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConfiguredInputMapper(Mapper inputMapper) {
if (isReference()) {
throw noChildrenAllowed();
}
if (this.inputMapper != null) {
if (usingInput) {
throw new BuildException("attribute \"input\""
+ " cannot coexist with a nested <inputmapper>");
} else {
throw new BuildException("Cannot have > 1 <inputmapper>");
}
}
this.inputMapper = inputMapper;
}
COM: <s> add the input file mapper </s>
|
funcom_train/40514157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initCategories(final List t) {
taxonomies = t;
List tax;
categoriesComboBox.removeAllItems();
categoriesComboBox.addItem("Choose a category");
for (int i = 0; i < t.size(); i++) {
tax = (List) t.get(i);
categoriesComboBox.addItem((String) tax.get(0));
}
}
COM: <s> method to set up the categories of the ontologies we receive it from </s>
|
funcom_train/12179460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvokeNoArgs() throws Exception {
Expression expression = parser.parse(getFunctionQName() + "()");
try {
expression.evaluate(expressionContext);
fail("Should have had an exception thrown when evaluating " +
"expression");
} catch (ExpressionException e) {
// Expected condition
} catch (ExtendedRuntimeException e) {
// @todo later remove this work-around required for bug in pipeline
}
}
COM: <s> test invoke with no arguments </s>
|
funcom_train/4814238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddTileTooBigY() {
try {
int tooBigY = maxBoardIndex + 1;
board.addTile(tree, 0, tooBigY);
fail("Shouldn't be able to add a tile at Y = " + tooBigY);
}
catch (IllegalArgumentException expected) {
// Success
}
}
COM: <s> tests adding a tile with too big a y value </s>
|
funcom_train/18485781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int calculateRequiredIndent(PartVisualization aPart) {
// System.out.println("HEIGHT " + aPart.getHeight() + "___" + aPart.getName());
return Math.max(aPart.getHeight(),
(aPart.getStrength() - 1) * INTER_PIN_INDENT);
}
COM: <s> calculating vertical space required for the part </s>
|
funcom_train/4860609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void broadcastMessage(ICommunicator sender, AMessage message) {
for (Iterator<ICommunicator> i = communicators.iterator(); i.hasNext();) {
ICommunicator communicator = (ICommunicator) i.next();
if (communicator != sender) {
communicator.receiveMessage(message, sender);
}
}
}
COM: <s> broadcast data to all other communicators </s>
|
funcom_train/40712890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertBlankNode() {
PageNode node = new PageNode("A Page");
PageNode parent = (PageNode)curNode.getParent();
if(parent == null) {
Toolkit.getDefaultToolkit().beep();
return;
}
model.insertNodeInto(node, parent,
model.getIndexOfChild(parent, curNode) + 1);
scrollPathToVisible(new TreePath(node.getPath()));
Main.frame.gotoPage(node, true);
}
COM: <s> inserts a blank page after the currently selected page </s>
|
funcom_train/16794969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveComponents(Container target, int x, int y, int width, int height, int nmembers) {
int x2 = 0;
y += height / 2;
for (int i=0; i<nmembers; i++) {
Component m = target.getComponent(i);
Dimension d = m.getSize();
if (i==0 || d.height>60)
x2 = x + (width - d.width)/2;
m.setLocation(x2, y);
y += vgap + d.height;
}
}
COM: <s> centers the elements in the specified column if there is any slack </s>
|
funcom_train/45878769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UnitValue getRainAbsolute() throws IOException {
long impulseCount = Device.binary(device.read(MemoryMap.RAIN_COUNTER, 2), 0, 3);
double mmRain = impulseCount * getRainPerImpulse().convertTo(RainfallUnit.MILLIMETRE).getValue();
return new UnitValue(mmRain, RainfallUnit.MILLIMETRE);
}
COM: <s> station keeps track of rain in a counter of impulses </s>
|
funcom_train/39965461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shuffle() {
for (int oldIndex = 0; oldIndex < NO_OF_CARDS; oldIndex++) {
int newIndex = random.nextInt(NO_OF_CARDS);
Card tempCard = cards[oldIndex];
cards[oldIndex] = cards[newIndex];
cards[newIndex] = tempCard;
}
nextCardIndex = 0;
}
COM: <s> shuffles the deck </s>
|
funcom_train/42842899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (this.getHemisphere() == Hemisphere.South) {
return getDegrees() + " " + this.getMinutes() + "'" + this.getSeconds() + "'' S";
}
else {
return getDegrees() + " " + this.getMinutes() + "'" + this.getSeconds() + "'' N";
}
}
COM: <s> returns a string representation of this latitude object </s>
|
funcom_train/34233222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendPeer() {
// send a peer command to the BROADCAST (*.255) for this subnet
try {
mUDPTalkBuffer.add("255.255.255.255", UDP_LISTEN_PORT, 1,
CommandsEnum.SYSTEM_PEER.toString(), null);
} catch (InterruptedException e) {
printLogMessage(e.toString());
}
}
COM: <s> send a udp broadcast to determine if there are any peers available </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.