__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/28870292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent e) {
if (e.getSource() == stepsizeVisual) {
adjustZoom();
repaint();
} else if (e.getSource() == maxvalueVisual) {
maxvalue = ((Integer) maxvalueVisual.getValue()).intValue();
repaint();
}
}
COM: <s> this function processes the monitor options and resets the internal variables appropriately </s>
|
funcom_train/22024569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlanes( Vector3 [] vertices ) {
computeTrianglePlane( vertices, facePlane );
computeEdgePlane( vertices[0], vertices[1], facePlane, edgePlane1 );
computeEdgePlane( vertices[1], vertices[2], facePlane, edgePlane2 );
computeEdgePlane( vertices[2], vertices[0], facePlane, edgePlane3 );
}
COM: <s> sets the face and edge planes for a triangle with specified coordinates </s>
|
funcom_train/3153601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private URL createDualCoeffUrl() {
URL ret = null;
try {
File beamHome = SystemUtils.getBeamHomeDir();
File dualCoeff = new File(beamHome, "test/unit/org/esa/beam/processor/sst/sstTestCoefficientsDual.coef");
assertEquals(true, dualCoeff.exists());
ret = dualCoeff.toURL();
} catch (MalformedURLException e) {
fail("unable to create dual URL");
}
return ret;
}
COM: <s> creates an url pointing to the dual coefficient test file </s>
|
funcom_train/27809084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHelpText( String helpCmd ) throws SQLException {
String helpText = null;
if ( getHelpStatement == null )
getHelpStatement = c.prepareStatement(HELP_TEXT_SQL);
getHelpStatement.setString( 1, helpCmd );
ResultSet rs;
rs = getHelpStatement.executeQuery();
if ( rs.next() )
helpText = rs.getString( 1 );
rs.close();
return helpText;
}
COM: <s> gets the help text for a given help command eg help cddb read </s>
|
funcom_train/38318638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Iterator getFiles () throws BuildException {
List l= new ArrayList();
Iterator i= _filesets.iterator();
while (i.hasNext()) {
final FileSet fs= (FileSet) i.next();
final DirectoryScanner ds= fs.getDirectoryScanner(getProject());
final File fRoot= fs.getDir(getProject());
final String[] aFiles= ds.getIncludedFiles();
for (int k= 0; k < aFiles.length; k++) {
l.add(
new FileInfo(
new File(fRoot, aFiles[k]),
aFiles[k]
)
);
}
}
return l.iterator();
}
COM: <s> returns an iterator for the files to operate on </s>
|
funcom_train/51706283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSampleParameter(SampleParameter sampleParameter){
sampleParameter.setSample(this);
Collection<SampleParameter> sampleParameters = this.getSampleParameterCollection();
if(sampleParameters == null) sampleParameters = new ArrayList<SampleParameter>();
sampleParameters.add(sampleParameter);
this.setSampleParameterCollection(sampleParameters);
}
COM: <s> adds a sample parameter to the sample </s>
|
funcom_train/18328246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreePath getNodePath( Node node) {
int nodeLevel = getNodeLevel(node)+1;
Object[] nodePath = new Object[nodeLevel];
Node traversalNode = node;
treeWalker.setCurrentNode( node );
do {
nodePath[--nodeLevel] = traversalNode;
}
while ((traversalNode = treeWalker.parentNode()) != null);
return new TreePath(nodePath);
}
COM: <s> returns the path of the node in the tree </s>
|
funcom_train/11075685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Pointer getPointerByKey(String key, String value) {
KeyManager manager = getKeyManager();
if (manager != null) {
return manager.getPointerByKey(this, key, value);
}
throw new JXPathException(
"Cannot find an element by key - "
+ "no KeyManager has been specified");
}
COM: <s> locates a node by a key value </s>
|
funcom_train/45256650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void firePropertyChange(final int type) {
Object[] array = getListeners();
for (int nX = 0; nX < array.length; nX++) {
final IPropertyListener l = (IPropertyListener) array[nX];
Platform.run(new SafeRunnable() {
public void run() {
l.propertyChanged(EditorRegistry.this, type);
}
});
}
}
COM: <s> fires a property changed event to all registered listeners </s>
|
funcom_train/8452082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
user = getUser();
if (user == null) {
setLoginScreen();
return;
}
service.checkSessionIdIsValid(user.getSessionId(), new AsyncCallback() {
public void onFailure(Throwable caught) {
// NOP
}
public void onSuccess(Object result) {
boolean res = (Boolean) result;
if (res) {
setAgendaScreen();
} else {
logout();
}
}
});
}
COM: <s> this is the entry point method </s>
|
funcom_train/42181762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean showDialog(JComponent parent) {
String dialogTitle = resource.getString("preferences.title");
return JOptionPane.showConfirmDialog(parent, this, dialogTitle,
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.PLAIN_MESSAGE) == JOptionPane.OK_OPTION;
}
COM: <s> displays this panel in a dialog box </s>
|
funcom_train/10680862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNextValueAsInt() {
reading_data_index = reading_data_index
+ TypesLengths.getTypeLength(TypesLengths.INT_ID);
return (int)readFromByteArray(data, reading_data_index
- TypesLengths.getTypeLength(TypesLengths.INT_ID), TypesLengths
.getTypeLength(TypesLengths.INT_ID));
}
COM: <s> gets the next value of the data of the packet as int </s>
|
funcom_train/7972211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IViewImage getDefaultImage() {
if (_defaultImage == null) {
_defaultImage = _factory.makeImage( imagePath( _vars,
getUniqueID(), _viewManager.getSize(), _viewManager
.getLanguage() ) );
}
return _defaultImage;
}
COM: <s> this is the getter for default image </s>
|
funcom_train/9813756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createText() {
Text label = Text.createDefaultTextLabel("instructions", "Use arrows to drive. Use the mouse wheel to control the chase camera. S to reset the car.");
label.setLocalTranslation(0, 20, 0);
fpsNode.attachChild(label);
fpsNode.updateRenderState();
}
COM: <s> simple instructions on screen </s>
|
funcom_train/49626260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkBytes() throws XSSStreamException {
String head = this.bytes.toString().toLowerCase().substring(0, 511);
for (String trigger : SNIFFING_TRIGGERS) {
int i = head.indexOf(trigger);
if (i > -1) {
throw new XSSStreamException("Filtered stream contains a "
+ "MIME sniffing trigger (" + trigger + ") at " + i
+ ".");
}
}
this.finished = true;
}
COM: <s> actually does the checking against the triggers </s>
|
funcom_train/35185061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void executeMethod() {
// disable GUI components
executeButton.setEnabled(false);
if (parametersTable != null)
parametersTable.setEnabled(false);
if (outputTable != null)
outputTable.setEnabled(false);
// create array of parameters
Object[] parameters = new Object[method.getParameterTypes().length];
for (int i = 0; i < parameters.length; i++)
parameters[i] = ((ParameterItem) parametersTM.rowBinding.get(i)).value;
// invoke the method
OIInvoker.executeMethod(object, method, parameters, this);
}
COM: <s> executes the method </s>
|
funcom_train/2039371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processElapsedHours(GregorianCalendar lower, GregorianCalendar greater) {
GregorianCalendar tmp = (GregorianCalendar) lower.clone();
do {
tmp.add(Calendar.HOUR_OF_DAY, 1);
if (tmp.equals(greater) || tmp.before(greater)) {
lower.add(Calendar.HOUR_OF_DAY, 1);
this.hours++;
}
} while (tmp.before(greater));
}
COM: <s> process elapsed hours </s>
|
funcom_train/5344963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int request() {
if(!_active) // this is gonna happen from NIODispatcher's processing
return 0;
int ret = Math.min(_available, MAXIMUM_TO_GIVE);
_available -= ret;
//LOG.trace("GAVE: " + ret + ", REMAINING: " + _available + ", TO: " + attachment);
return ret;
}
COM: <s> requests some bytes to write </s>
|
funcom_train/14437890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopAll() {
if (singleAccountMailDeleterAll != null)
singleAccountMailDeleterAll.stop();
if (singleAccountMailDeleterMarked != null)
singleAccountMailDeleterMarked.stop();
if (singleAccountMailRetriever != null)
singleAccountMailRetriever.stop();
if (multipleAccountsMailDeleterAll != null)
multipleAccountsMailDeleterAll.stop();
if (multipleAccountsMailDeleterMarked != null)
multipleAccountsMailDeleterMarked.stop();
if (multipleAccountsMailRetriever != null)
multipleAccountsMailRetriever.stop();
}
COM: <s> stopping all checks of all checkers </s>
|
funcom_train/30005896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(TestBase element) {
boolean result = false;
if (element != null) {
result = this.getChildren().add(element);
}
if (result) {
PreparationElementInsertedEvent e = new PreparationElementInsertedEvent(element, this, this.getChildren().
indexOf(element));
PreparationController.getInstance().dataHasChanged(e);
}
return result;
}
COM: <s> adds a test base to the sequence </s>
|
funcom_train/15370530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getImportedTypes() throws MetamodelException {
try {
final ArrayList result = new ArrayList();
new RobustVisitor() {
public Object visit(Object element) throws MetamodelException {
try {
result.add(((TypeImport)element).getType());
}
catch(MetamodelException exc) {
((TypeImport)element).getType();
throw exc;
}
return null;
}
public void unvisit(Object element, Object undo) {
//NOP
}
}
.applyTo(getTypeImports());
return result;
}
catch (MetamodelException e) {
throw e;
}
catch (Exception e) {
e.printStackTrace();
throw new Error();
}
}
COM: <s> the result is a list with as elements types </s>
|
funcom_train/1151246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemCommand10() {
if (itemCommand10 == null) {//GEN-END:|355-getter|0|355-preInit
// write pre-init user code here
itemCommand10 = new Command("Escuchar", Command.ITEM, 0);//GEN-LINE:|355-getter|1|355-postInit
// write post-init user code here
}//GEN-BEGIN:|355-getter|2|
return itemCommand10;
}
COM: <s> returns an initiliazed instance of item command10 component </s>
|
funcom_train/2845349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startRoles(Attributes attr) {
role_list = new ArrayList();
role_num_list = new ArrayList();
if (isKorean()) {
//temp_nums = new ArrayList();
temp_roles = new HashMap();
}
role_list.add("Verb");
role_num_list.add("V");
}
COM: <s> called when a new group of roles is found </s>
|
funcom_train/28947686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String killJob(String jobID) throws ArcException {
String commandKillJob = "ngkill "+jobID;
log.debug("We are going to execute: "+commandKillJob);
String[] ret=uiConnector.executeGridUICommand(commandKillJob);
log.debug("stdOut: "+ret[0]+"\nstdErr: "+ret[1]+"\ncommand: "+commandKillJob);
return ret[0]+"\n"+ret[1];
}
COM: <s> kill a job with a given job id </s>
|
funcom_train/35488830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageIcon createImageIcon(String path) {
String fullPath = prefix0 + path;
java.net.URL imgURL = this_class.getResource(fullPath);
if (imgURL == null) {
fullPath = prefix1 + path;
imgURL = this_class.getResource(fullPath);
}
if (imgURL != null) {
return new ImageIcon(imgURL);
} else {
System.err.println("couldn't find file: " + fullPath);
return null;
}
}
COM: <s> returns an image icon or null if the path was invalid </s>
|
funcom_train/16394569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionForward create(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp) {
GroupEnterOrEditForm groupEnterOrEditForm = (GroupEnterOrEditForm) form;
GroupManager manager = new GroupManager(locale,session);
Group group = new Group();
groupEnterOrEditForm.modifyGroup(group, locale, session, getResources(req),req.isUserInRole(UserManagerBase.ADMINISTRATOR));
checkAccessRights(req, group);
manager.createGroup(group);
return mapping.findForward("created");
}
COM: <s> saves the new entered group </s>
|
funcom_train/3363010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContentPane(Container content) {
if(content == null)
throw new IllegalComponentStateException("contentPane cannot be set to null.");
if(contentPane != null && contentPane.getParent() == layeredPane)
layeredPane.remove(contentPane);
contentPane = content;
layeredPane.add(contentPane, JLayeredPane.FRAME_CONTENT_LAYER);
}
COM: <s> sets the content pane the container that holds the components </s>
|
funcom_train/33854497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void work(final IProject project, final String fileName) {
FindBugsJob runFindBugs = new FindBugsJob("Loading XML data from " + fileName + "...", project) {
@Override
protected void runWithProgress(IProgressMonitor monitor) throws CoreException {
FindBugsWorker worker = new FindBugsWorker(project, monitor);
worker.loadXml(fileName);
}
};
runFindBugs.scheduleInteractive();
}
COM: <s> run a find bugs import on the given project displaying a progress </s>
|
funcom_train/36259119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawCaption(final Graphics2D g) {
final String caption = actionBuilder.getString("showDatabaseStatistic." + activeGraphSelector + ".caption");
g.setColor(Color.black);
g.setFont(captionFont);
g.drawString(caption, BORDER, this.getHeight() - BORDER);
}
COM: <s> draw the caption string </s>
|
funcom_train/5502928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHistoryURLs(Enumeration historyURLs) {
sVersionHistory = "<D:version-history-set>";
while (historyURLs.hasMoreElements())
{
sVersionHistory += "<D:href>"+ historyURLs.nextElement().toString() + "</D:href>";
}
sVersionHistory += "</D:version-history-set>";
}
COM: <s> sets history url for locate by history report </s>
|
funcom_train/8569660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List select( Configuration a_activeConfiguration, int a_howManyToSelect ) {
Collections.sort( chromosomes, new ChromosomeFitnessComparator( false /* asc */, speciatedFitness /* speciated fitness*/ ) );
List<Chromosome> result = new ArrayList<Chromosome>( a_howManyToSelect );
Iterator<Chromosome> it = chromosomes.iterator();
while ( it.hasNext() && ( result.size() < a_howManyToSelect ) )
result.add(it.next());
return result;
}
COM: <s> returns the code a how many to select code chromosomes with highest fitness </s>
|
funcom_train/8715979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processVersion(String versionString) {
try {
StringTokenizer tokens = new StringTokenizer(versionString, ".");
majorVersion = Integer.parseInt(tokens.nextToken());
minorVersion = Integer.parseInt(tokens.nextToken());
this.versionString = versionString;
} catch (Exception e) {
// ignore
}
}
COM: <s> process a version string to determine the major and minor versions </s>
|
funcom_train/50141854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStartSeparator(String startSeparator) {
if (startSeparator == null) {
throw new IllegalArgumentException("StartSeparatorFlag can not be null.");
}
if (startSeparator.length() == 0) {
throw new IllegalArgumentException("StartSeparatorFlag must al least have 1 char length.");
}
this.startSeparator = startSeparator;
}
COM: <s> set the seperator string denoting the start of a variable </s>
|
funcom_train/25778990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBranchCoveragePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CoverageCalculator_branchCoverage_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CoverageCalculator_branchCoverage_feature", "_UI_CoverageCalculator_type"),
CoveragepackagePackage.Literals.COVERAGE_CALCULATOR__BRANCH_COVERAGE,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the branch coverage feature </s>
|
funcom_train/29575907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String createCategory(String storeName, String storeDescription, String storeURL) {
(cm.logger()).println(5, "XCCategoryCommand::createCategory<");
String tmpstoreId = "";
(cm.logger()).println(5, "XCCategoryCommand::createCategory>");
return tmpstoreId;
}
COM: <s> todo create category </s>
|
funcom_train/47283175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTreeNodeInsertToChildEvent() {
folder.addChild(mmo);
treeModel.addTreeModelListener(counter);
mmo.addChild(new MungeProcess());
assertEquals("insert event count should be 1",
1, counter.getChildrenInsertedCount());
assertEquals("total event count should be 1",
1, counter.getAllEventCounts());
assertEquals("Parent of last event source should be project",
mmo,((FolderNode)counter.getLastEvt().getSource()).getParent());
}
COM: <s> all tree node on the tree should listen to the tree event </s>
|
funcom_train/2496528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void login() throws Exception {
new FacesRequest("/login.xhtml") {
@Override
protected void updateModelValues() throws Exception {
assert !isSessionInvalid();
setValue("#{identity.username}", "ldapadmin");
setValue("#{identity.password}", "test");
}
@Override
protected void invokeApplication() {
invokeAction("#{identity.login}");
}
@Override
protected void renderResponse() {
assert getValue("#{identity.loggedIn}").equals(true);
Assert.assertEquals("ldapadmin", getValue("#{identity.username}"));
assert getValue("#{identity.hasRole('admin')}").equals(true);
}
}.run();
}
COM: <s> helper method for testing components which have </s>
|
funcom_train/51055601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getRequestURICharset() {
ServletConfig config = getServletConfig();
String charset = (config == null) ? null : (String)
config.getServletContext().getAttribute(
Davenport.REQUEST_URI_CHARSET);
return (charset != null) ? charset : "ISO-8859-1";
}
COM: <s> returns the charset used to interpret request uris </s>
|
funcom_train/48552210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FastStringBuffer append(String string) {
int strLen = string.length();
int newCount = count + strLen;
if (newCount > this.value.length) {
resizeForMinimum(newCount);
}
string.getChars(0, strLen, value, this.count);
this.count = newCount;
return this;
}
COM: <s> appends a string to the buffer </s>
|
funcom_train/46011604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getDateOffset(RunningSimulation rs) {
TimeZone tz_server = TimeZone.getDefault();
TimeZone tz_rs = TimeZone.getTimeZone(rs.getTimeZone());
long offsetServer = tz_server.getOffset(new Date().getTime());
long offsetRunningSim = tz_rs.getOffset(new Date().getTime());
long relativeOffset = offsetServer - offsetRunningSim;
return relativeOffset;
}
COM: <s> sets the time in milliseconds between the server and the running </s>
|
funcom_train/25541481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invokeTool(ObservationToolPluginBase plugin) {
if (validObsList != null) {
try {
plugin.invoke(validObsList);
} catch (Throwable t) {
MessageBox.showErrorDialog("Tool Error", t);
}
} else {
MessageBox.showMessageDialog(MainFrame.getInstance(), "Tool Error",
"There are no observations loaded.");
}
}
COM: <s> invokes a tool plugin with the currently loaded observation set </s>
|
funcom_train/18739182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void recordCreatedNodes(RuleEffect record) {
RuleNode[] creatorNodes = getRule().getCreatorNodes();
if (record.isNodesInitialised()) {
record.addCreatorNodes(creatorNodes);
} else {
HostNode[] createdNodes =
getCreatedNodes(record.getSourceNodes(),
record.getCreatedNodes());
record.addCreatedNodes(creatorNodes, createdNodes);
}
}
COM: <s> adds the created nodes to the application record </s>
|
funcom_train/24050304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAllItemsFromOverlapping(Interval interval, Collection<Object> resultItems) {
if (interval != null && !isSearchMatch(interval))
return;
// some of these may not actually overlap - this is allowed by the
// bintree contract
resultItems.addAll(items);
if (subnode[0] != null)
subnode[0].addAllItemsFromOverlapping(interval, resultItems);
if (subnode[1] != null)
subnode[1].addAllItemsFromOverlapping(interval, resultItems);
}
COM: <s> adds items in the tree which potentially overlap the query interval to </s>
|
funcom_train/7808161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand3() {
if (backCommand3 == null) {//GEN-END:|77-getter|0|77-preInit
// write pre-init user code here
backCommand3 = new Command("Back", Command.BACK, 0);//GEN-LINE:|77-getter|1|77-postInit
// write post-init user code here
}//GEN-BEGIN:|77-getter|2|
return backCommand3;
}
COM: <s> returns an initiliazed instance of back command3 component </s>
|
funcom_train/37592957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetStackTrace() {
final String trace = "hello";
Throwable t = new Throwable() {
public void printStackTrace(PrintWriter w) {
w.print(trace);
}
};
assertEquals("Should have returned the correct stack trace!", trace, StringOps.getStackTrace(t));
}
COM: <s> tests that getting the stack trace of a throwable works correctly </s>
|
funcom_train/23351868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double longestRootToTipDistance() {
if (nodes.size() == 0) {
return getBranchLength();
}
double longest = -100000000;
for (Node n : nodes) {
double l = n.longestRootToTipDistance();
if (l > longest) {
longest = l;
}
}
return longest + getBranchLength();
}
COM: <s> returns the longest root to tip branch length of the tree </s>
|
funcom_train/36182182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IServiceModification getServiceModification() throws GroupingException {
try {
IServiceModification service = (IServiceModification) serviceModificationTracker.getService();
if (null == service) {
throw new GroupingException("Error: could not get instance of Service Modification service");
}
return service;
} catch (Throwable t) {
throw new GroupingException("Couldn't get Service Modification service", t);
}
}
COM: <s> gets a reference to the service modification </s>
|
funcom_train/22279169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
//- synchronized (this) {
//- ApplicationEvent event = new ApplicationEvent();
//-
//- if (!appletStarted) {
//- // If this is the first start for the applet, unlock the
//- // run() call.
//- appletStarted = true;
//- notifyAll();
//- }
//- event.type = ApplicationEvent.APPLET_STARTED;
//- event.processor = application;
//- application.eventLoop.addEvent(event);
//- }
}
COM: <s> starts the applet </s>
|
funcom_train/50504076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SecurityRoleRef getSecurityRoleRef(String linkName) {
Iterator iter = securityRoleLinks.iterator();
while (iter.hasNext()) {
SecurityRoleRef role = (SecurityRoleRef) iter.next();
if (role.getName().equals(linkName)) {
return role;
}
}
return null;
}
COM: <s> gets the security role ref attribute of the deployment descriptor object </s>
|
funcom_train/21995507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPlaylistType(int src_id) throws DatabaseException {
ConnectionPool pool = null;
Connection conn = null;
try {
pool = ConnectionPool.getInstance();
conn = pool.getConnection();
return getPlaylistType(conn, src_id);
}
finally {
if (pool != null)
pool.releaseConnection(conn);
}
}
COM: <s> obtain a playlists subtype </s>
|
funcom_train/48869788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Product getBySaleSKU(String serial, Connection conn) throws DataException, SQLException {
Product p = null;
PreparedStatement ps = conn.prepareStatement("Select * from CONCEPTUAL where SKU = ?");
ps.setString(1, serial);
ResultSet rs = ps.executeQuery();
if (rs.next()) {
p = read2(rs.getString("CONCEPTUALID"), conn);
}
return p;
}
COM: <s> returns an object using its sku </s>
|
funcom_train/42824247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printConnections() {
Node n;
for (ModelElement m : getElements()) {
if (m instanceof Node) {
n = (Node) m;
for (Node to : n.getConnectedTo())
System.out.println(n.getName() + " -> " + to.getName());
for (Node from : n.getConnectedFrom())
System.out.println(from.getName() + " -> " + n.getName());
}
}
}
COM: <s> print connections prints out a list of all connections in each model </s>
|
funcom_train/50134635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hashtable getMedicalInfos() {
Hashtable table = new Hashtable(8);
table.put("patient.name",getPatientName());
table.put("patient.id",getPatientID());
table.put("patient.birthdate",getPatientBirthdate());
table.put("sex",sex);
table.put("study.date",getStudyDate());
table.put("physician",physician);
table.put("institution",institution);
table.put("transfert.syntax.uid",transfertSyntaxUID);
return table;
}
COM: <s> from leon bailey and michael pasternak </s>
|
funcom_train/22127901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyJarToClasspath(File jarFile) throws ThinklabIOException {
File outfile = new File(getLoadPath() + "/" + MiscUtilities.getFileName(jarFile.toString()));
if (outfile.exists() && outfile.lastModified() >= jarFile.lastModified())
return;
CopyURL.copyChanneled(jarFile, outfile);
}
COM: <s> copy a specific jar to classpath </s>
|
funcom_train/9236544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void increment(final GridBagConstraints constraints) {
if (position.isHorizontal()) {
constraints.gridx++;
if (constraints.gridx > maxButtons) {
constraints.gridy++;
constraints.gridx = 0;
}
} else {
constraints.gridy++;
if (constraints.gridy > maxButtons) {
constraints.gridx++;
constraints.gridy = 0;
}
}
}
COM: <s> increments the x and y offsets where appropriate of the gridbag </s>
|
funcom_train/6263719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doUp() {
int jobNum = jobList.getSelectedIndex();
if ( jobNum != -1 && jobNum != 0 ) {
jt.swapJob( jobNum, jobNum - 1 );
refreshList();
templateChanged = true;
jobList.setSelectedIndex( jobNum - 1 );
}
}
COM: <s> move a job up in the list </s>
|
funcom_train/29579911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finishMethod() {
nextSlide(getCurrentPanel(), finishWizard);
bbp.setCaption("NEXT_BUTTON", saveButton);
bbp.nextButton.setActionCommand("SAVE");
finishWizard.writePolicy();
bbp.nextButton.setEnabled(true);
}
COM: <s> displays the last slide of the wizard the one displaying the readable </s>
|
funcom_train/3471232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireReplayEvent(ReplayEvent event) {
// copy into new vector because of concurrent
// modification exceptions when using iterators...
// Logger.getLogger(this.getClass()).debug("Replay.fireReplayEvent(): "
// + event.getID());
if (replayListeners != null) {
for (ReplayListener listener : replayListeners) {
listener.replayStateChanged(event);
}
}
}
COM: <s> fires a session event to all listeners </s>
|
funcom_train/50073270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearTable() {
setKeyboardLocked(true);
sizeFields = nextField = fieldIds = 0;
cpfExists = false; // clear the cursor progression fields flag
currentField = null;
pendingInsert = false;
homePos = -1;
masterMDT = false;
for (int x = 0; x < screenSize; x++) {
fieldExtended[x] = 0x0;
}
}
COM: <s> clear the fields table </s>
|
funcom_train/10864212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGeneralSynchronization() throws Exception {
int numIters = atLeast(2);
for (int i = 0; i < numIters; i++) {
doTestGeneralSynchronization(_TestUtil.nextInt(random, 2, 4),
random.nextBoolean() ? -1 : _TestUtil.nextInt(random, 1, 10),
_TestUtil.nextInt(random, 0, 3));
}
}
COM: <s> runs a few instances of </s>
|
funcom_train/18748943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Shape createRectangleShape(float x, float y, float width, float height) {
GeneralPath result = new GeneralPath(GeneralPath.WIND_NON_ZERO, 5);
result.moveTo(x, y);
result.lineTo(x+width, y);
result.lineTo(x+width, y+height);
result.lineTo(x, y+height);
result.closePath();
return result;
}
COM: <s> creates a shape tracing the bounds given in the parameters </s>
|
funcom_train/10910899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void putChar(int x, int y, char ch, boolean ischar) {
if (isLayInside(x, y)) {
StringBuffer sb = ischar ? charData[y] : decoData[y];
while (sb.length() <= x) {
sb.append(' ');
}
sb.setCharAt(x, ch);
}
}
COM: <s> add char to text or background buffer </s>
|
funcom_train/8015374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showDetails() {
showHideDetails.setText(hideDetails);
showHideDetails.setIcon(downIcon);
JPanel panel = (JPanel) showHideDetails.getParent();
if (panel.getComponentCount() == 1) {
dialogHeight += 200;
int dialogWidth = this.getWidth();
setSize(dialogWidth, dialogHeight);
detailsScrollPane.setPreferredSize(new Dimension(320,200));
panel.add(detailsScrollPane, BorderLayout.CENTER);
pack();
repaint();
}
}
COM: <s> this method sets up the panel that displays the genetics details when the </s>
|
funcom_train/21644401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPreferencesDialogContentPane() {
getButtonsPanel();
if (preferencesDialogContentPane == null) {
preferencesDialogContentPane = new JPanel();
preferencesDialogContentPane.setLayout(new BorderLayout());
preferencesDialogContentPane.add(getTabbedPane(), BorderLayout.CENTER);
preferencesDialogContentPane.add(getButtonsPanel(), BorderLayout.SOUTH);
}
return preferencesDialogContentPane;
}
COM: <s> return the preferences dialog content pane </s>
|
funcom_train/1169308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final static public void playStackFree(SpellAbility sa) {
sa.setActivatingPlayer(AllZone.getComputerPlayer());
Card source = sa.getSourceCard();
if (sa.isSpell() && !source.isCopiedSpell())
AllZone.getGameAction().moveToStack(source);
AllZone.getStack().add(sa);
}
COM: <s> p play stack free </s>
|
funcom_train/44340569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Lexicon getLexicon(Identifier language) {
if (language == null)
return null;
boolean found = false;
Lexicon lexicon = null;
for (Iterator i = lexicons.iterator(); i.hasNext() && !found;) {
lexicon = (Lexicon) i.next();
found = lexicon.getLanguage().equals(language);
}
if (found)
return lexicon;
else return null;
}
COM: <s> get the lexicon associated to the specified language </s>
|
funcom_train/42429594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHashtable(Hashtable hashmap){
try{
this.xmlFile = "Hashtable given";
this.hashmap = hashmap;
}
catch(Exception e){
//logger.log(logger.ERROR,"In function XmlHelper.setHashtable() parameter hashmap is null!");
}
//System.out.println("\n\n\n-----------------:"+hashmap);
}
COM: <s> set the hashtable to the one given </s>
|
funcom_train/41682831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getNext(int type) {
//get the next index
findNext(type);
QueueElement elem = null;
//get element from correct queue
if(gCurrent[type] < gQueue[type].size())
elem = (QueueElement)gQueue[type].get( gCurrent[type]++ );
else{
elem = (QueueElement)queue[type].get( current[type]++ );
}
return elem;
}
COM: <s> get the next element of a queue of a given type </s>
|
funcom_train/39288527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleChangedResources() {
if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
editingDomain.getCommandStack().flush();
for (Iterator i = changedResources.iterator(); i.hasNext(); ) {
Resource resource = (Resource)i.next();
if (resource.isLoaded()) {
resource.unload();
try {
resource.load(Collections.EMPTY_MAP);
}
catch (IOException exception) {
SDLModel30EditorPlugin.INSTANCE.log(exception);
}
}
}
}
}
COM: <s> handles what to do with changed resources on activation </s>
|
funcom_train/41164142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoSingleFormat entity) {
EntityManagerHelper.log("deleting CoSingleFormat instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoSingleFormat.class, entity.getSingleFormatId());
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 format entity </s>
|
funcom_train/38288915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InsertListImpl getUnified() {
if (pool == null)
throw new IllegalStateException("pool is null"); //$NON-NLS-1$
if (exps.isEmpty())
return null;
final InsertListImpl ilImpl = new InsertListImpl();
final ElementLocImpl eLoc = new ElementLocImpl(point,
NameListImplBuilder.getElementBuilder().build(exps, pool));
ilImpl.add(eLoc);
return ilImpl;
}
COM: <s> returns unified insertlist </s>
|
funcom_train/47870414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean intersects(double x, double y, double w, double h) {
// a cheap bounding box check first off, before we start the real work
if (!getBounds2D().intersects(x, y, w, h)) return false;
return intersectsImpl(new Rectangle2D.Double(x, y, w, h));
}
COM: <s> determine whether the triangle intersects a rectangle given by </s>
|
funcom_train/5463119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buff = new StringBuffer(name);
buff.append("(");
for (int i = 0; i < args.length; i++) {
buff.append(args[i]);
if (i < args.length - 1) {
buff.append(" ");
}
}
buff.append(")");
return buff.toString();
}
COM: <s> printable string describing the functor </s>
|
funcom_train/2292078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getActiveTabName() {
if (m_activeTab < 0) {
getActiveTab();
}
List tabNames = getTabs();
try {
return (String)tabNames.get(m_activeTab - 1);
} catch (IndexOutOfBoundsException e) {
// should usually never happen
if (LOG.isInfoEnabled()) {
LOG.info(e.getLocalizedMessage());
}
return null;
}
}
COM: <s> returns the localized name of the currently active tab </s>
|
funcom_train/18099945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int validData() throws IOException{
//#debug
//# System.out.println("validData()");
inflate();
if (this.status!=GZipInputStream.FINISHED){
return -1;
} else {
if (this.validData){
return 1;
} else {
return 0;
}
}
}
COM: <s> checks if the current status is valid </s>
|
funcom_train/20247281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element createShadeElement(Widget dropTarget) {
Element shade = DOM.createSpan();
shade.addClassName(CSS_SHADE_CLASS);
CSS.setZIndex(shade, CSS_SHADE_Z_INDEX);
WindowPanel window = getWindow(dropTarget);
CSS.setAbsoluteBounds(shade,
dropTarget.getAbsoluteLeft() - window.getAbsoluteLeft(),
dropTarget.getAbsoluteTop() - window.getAbsoluteTop(),
dropTarget.getOffsetWidth(), dropTarget.getOffsetHeight());
return shade;
}
COM: <s> creates a shade element that has bounds of drop target element but an </s>
|
funcom_train/42006878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(double time, double ctime) {
_assert("Mac_802_11_Timer start()", "busy_ == false", (busy_ == false));
busy_ = true;
paused_ = false;
stime = ctime;
rtime = time;
_assert("Mac_802_11_Timer start()", "rtime >= 0.0", (rtime >= 0.0));
timer_ = host_.setTimeout(o_, rtime);
}
COM: <s> start the timer </s>
|
funcom_train/37253822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNumberType(String type) {
if("int".equals(type) || "long".equals(type) || "float".equals(type)
|| "double".equals(type) || "short".equals(type) || "auto".equals(type)) {
return true;
} else {
return false;
}
}
COM: <s> specify if the type is number type group </s>
|
funcom_train/45599499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File getJarFileWithoutSubPath(File jarFile) {
String jarFilePath = jarFile.getPath();
int index = jarFilePath.lastIndexOf('!');
if (index < 0) {
return jarFile;
}
return new File(jarFilePath.substring(0, index));
}
COM: <s> gets jar file with the sub path stripped off </s>
|
funcom_train/41266291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(RequiDoc entity) {
EntityManagerHelper.log("deleting RequiDoc instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(RequiDoc.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 requi doc entity </s>
|
funcom_train/49836937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPrivateMessages(String nick) {
if(DEBUG) System.out.println("Chat.getPrivateMessages(\"" + nick + "\")");
Player player = Player.getPlayer(nick);
if(player != null) {
return player.getPrivateMessages();
}
return ";";
}
COM: <s> get all private messages for a player </s>
|
funcom_train/12644562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getMinimumSize() {
/* Avoid grabbing the lock if a reasonable cached size value
* is available.
*/
Dimension dim = minSize;
if (dim != null && isValid()) {
return dim;
}
synchronized (getTreeLock()) {
minSize = (layoutMgr != null) ?
layoutMgr.minimumLayoutSize(this) :
super.getMinimumSize();
return minSize;
}
}
COM: <s> returns the minimum size of this container </s>
|
funcom_train/3525422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveSettings() throws java.io.IOException {
File propFile = new File(getPropertyFilePath());
if (!propFile.exists())
propFile.mkdirs();
propFile = new File(getPropertyFileName());
propFile.createNewFile();
FileOutputStream stream = new FileOutputStream(propFile);
properties.store(stream, description);
stream.close();
}
COM: <s> saves the code gen settings to the default settings file </s>
|
funcom_train/10495938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getProjectXmlFiles(File geronimoRoot) {
// get Module list
searchDirs(geronimoRoot);
// searchDirs(new File(geronimoRoot.getAbsoluteFile() + "/configs"));
for (int x = 0; x < projectXmls.size(); x++) {
System.out.println(((File) projectXmls.get(x)).getAbsolutePath());
}
}
COM: <s> after this routine returns we have a list of all project </s>
|
funcom_train/20884938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMax() {
ValidatorTestUtil.check(XML, new IntegerDTO(5), VALID);
ValidatorTestUtil.check(XML, new IntegerDTO(11), INVALID);
ValidatorTestUtil.check(XML, new IntDTO(5), VALID);
ValidatorTestUtil.check(XML, new IntDTO(11), INVALID);
}
COM: <s> tests the constraint max </s>
|
funcom_train/17203820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNumberOfNonvolatileGPRs(short n) {
if (VM.BuildForPowerPC) {
setFirstNonVolatileGPR(ArchitectureSpecific.RegisterConstants.NUM_GPRS - n);
} else if (VM.BuildForIA32) {
setFirstNonVolatileGPR(ArchitectureSpecific.RegisterConstants.NUM_NONVOLATILE_GPRS - n);
} else if (VM.VerifyAssertions) {
VM._assert(VM.NOT_REACHED);
}
}
COM: <s> set the number of non volatile gprs used by this method </s>
|
funcom_train/27710087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
synchronized(processingLock) {
try {
preProcess();
} catch (Throwable th) {}
if (greeting != null)
outputMessage(greeting);
inputEnabled = true;
awaitInput(null);
synchronized(cancelLock) {
processingCancelled = false;
processor = null;
}
firePropertyChange("processing", true, false);
}
}
COM: <s> does preliminary processing for the console </s>
|
funcom_train/7457714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ByteString toByteString() {
try {
final ByteString.CodedBuilder out =
ByteString.newCodedBuilder(getSerializedSize());
writeTo(out.getCodedOutput());
return out.build();
} catch (final IOException e) {
throw new RuntimeException(
"Serializing to a ByteString threw an IOException (should " +
"never happen).", e);
}
}
COM: <s> serializes the message to a </s>
|
funcom_train/46657807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void objectData(Object object) throws SAXException {
if(this.contentHandler instanceof MyContentHandler) {
((MyContentHandler) this.contentHandler).objectData(object);
} else {
if(object!=null) {
final String output=object.toString();
this.write(output);
} else {
// we could have a "configurable null-toString"...
this.write("null");
}
}
}
COM: <s> pass data through the pipline </s>
|
funcom_train/925521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getIpAsLong() {
byte[] data = getAttributeData();
if (data == null || data.length != 4)
throw new RuntimeException("expected 4 bytes attribute data");
return ((long)(data[0] & 0x0ff)) << 24 | (data[1] & 0x0ff) << 16 |
(data[2] & 0x0ff) << 8 | (data[3] & 0x0ff);
}
COM: <s> returns the ip number as a 32 bit unsigned number </s>
|
funcom_train/3393028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean compilerBootstrap(Symbol c) {
return
this == JSR14 &&
(c.flags() & Flags.ENUM) != 0 &&
c.flatName().toString().startsWith("com.sun.tools.")
// && !Target.class.getSuperclass().getName().equals("java.lang.Enum")
;
}
COM: <s> for bootstrapping javac only we do without java </s>
|
funcom_train/41513728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(ClassExtendsDeclaration n, A argu) {
n.f0.accept(this, argu);
n.f1.accept(this, argu);
n.f2.accept(this, argu);
n.f3.accept(this, argu);
n.f4.accept(this, argu);
n.f5.accept(this, argu);
n.f6.accept(this, argu);
n.f7.accept(this, argu);
}
COM: <s> f0 class f1 identifier f2 extends f3 identifier f4 </s>
|
funcom_train/8090120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer text = new StringBuffer();
if (m_optimizer == null || !m_optimizer.modelBuilt()) {
return "SMOreg: No model built yet.";
}
try {
text.append(m_optimizer.toString());
}
catch (Exception e) {
return "Can't print SMVreg classifier.";
}
return text.toString();
}
COM: <s> prints out the classifier </s>
|
funcom_train/12639657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object other) {
if (this == other)
return true;
if (! (other instanceof CertPath))
return false;
CertPath otherCP = (CertPath) other;
if (! otherCP.getType().equals(type))
return false;
List thisCertList = this.getCertificates();
List otherCertList = otherCP.getCertificates();
return(thisCertList.equals(otherCertList));
}
COM: <s> compares this certification path for equality with the specified </s>
|
funcom_train/44170368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private static class RawStrategy implements Strategy {
public Result compute(IntInterval interval) {
long startChrono = System.currentTimeMillis();
syslog.log("raw: computing from " +
interval.start + " to " + interval.end);
BigDecimal bd = ZERO;
for (int k = interval.start; k <= interval.end; k++) {
bd = bd.add(f(k));
}
return new Result(bd,
System.currentTimeMillis() - startChrono);
}
}
COM: <s> p basic strategy </s>
|
funcom_train/5183414 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PaletteContainer createStructuredActivities4Group() {
PaletteGroup paletteContainer = new PaletteGroup(Messages.StructuredActivities4Group_title);
paletteContainer.setId("createStructuredActivities4Group"); //$NON-NLS-1$
paletteContainer.setDescription(Messages.StructuredActivities4Group_desc);
paletteContainer.add(createConditionalNode1CreationTool());
paletteContainer.add(createExpansionRegion2CreationTool());
paletteContainer.add(createLoopNode3CreationTool());
paletteContainer.add(createStructuredActivityNode4CreationTool());
return paletteContainer;
}
COM: <s> creates structured activities palette tool group </s>
|
funcom_train/36621754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAnswer(DNSRecord rec, long now) throws IOException {
if (numAuthorities > 0 || numAdditionals > 0) {
throw new IllegalStateException(
"Questions must be added before answers");
}
if (rec != null) {
if ((now == 0) || !rec.isExpired(now)) {
writeRecord(rec, now);
numAnswers++;
}
}
}
COM: <s> add an answer to the message </s>
|
funcom_train/34562692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object constructor(final Item[] ar) throws Exception {
for(final Constructor<?> con : cls.getConstructors()) {
final Object[] arg = args(con.getParameterTypes(), ar, true);
if(arg != null) return con.newInstance(arg);
}
throw new Exception();
}
COM: <s> calls a constructor </s>
|
funcom_train/28405535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireFailureEvent(Throwable exception) {
log.info("Build failure event ");
FailureEvent event = new FailureEvent(this, id, new Date(),
exception.getMessage(), exception);
log.error("Firing failure event ");
this.fireFailureEvent(event);
log.error("Done firing a failure event ");
}
COM: <s> the method code fire failure event code </s>
|
funcom_train/38500652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List ejbHomeGetStationNumbers(Integer raceId) {
try {
Set station_set = ejbSelectStationNumbersByRace(raceId);
List station_list = new ArrayList(station_set);
Collections.sort(station_list);
return station_list;
} catch (FinderException fex) {
return Collections.EMPTY_LIST;
}
}
COM: <s> return all station numbers of a specific race </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.