__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/37645797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertIntoMapAndList(Uploader uploader, String host) {
int numUploads = 1;
// check to see if the map aleady contains
// a reference to this host. if so, get its
// value.
if ( _uploadsInProgress.containsKey(host) ) {
Integer myInteger = (Integer)_uploadsInProgress.get(host);
numUploads += myInteger.intValue();
}
_uploadsInProgress.put(host, new Integer(numUploads));
_activeUploadList.add(uploader);
}
COM: <s> increments the count of uploads in progress for host </s>
|
funcom_train/9705679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NodeList getChildNodes() {
NodeList childNodes = document.getChildNodes();
NodeListImpl nodes = new NodeListImpl();
for (int i = 0; i < childNodes.getLength(); i++) {
nodes.addNode(toSAAJNode(childNodes.item(i)));
}
return nodes;
}
COM: <s> a code node list code that contains all children of this node </s>
|
funcom_train/9235898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Alias getNewAlias() {
final List<ActionCondition> conditions =
new ArrayList<ActionCondition>();
conditions.add(new ActionCondition(1,
CoreActionComponent.STRING_STRING,
CoreActionComparison.STRING_EQUALS, getCommand()));
if (getArguments() != null) {
conditions.add(getArguments());
}
return new Alias(getCommand(), conditions, getResponse());
}
COM: <s> returns an alias reflecting the changes in this panel </s>
|
funcom_train/31928973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void spillPC(int pc) {
appendInstruction(PutField.create(PUTFIELD,
new OPT_IntConstantOperand(pc), gc.makeLocal(1, psTref),
new OPT_AddressConstantOperand(pcFieldRef.peekResolvedField()
.getOffset()), new OPT_LocationOperand(pcFieldRef),
new OPT_TrueGuardOperand()));
}
COM: <s> spill a given pc value into the process space </s>
|
funcom_train/22277971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector externalWindows() {
int i, count = rootViews.count();
Vector windows = new Vector();
for (i = 0; i < count; i++) {
RootView rootView = (RootView)rootViews.elementAt(i);
ExternalWindow window = rootView.externalWindow();
if (window != null) {
windows.addElement(window);
}
}
return windows;
}
COM: <s> returns a vector containing all the external windows being displayed </s>
|
funcom_train/3384186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setExceptionStatus(AccessControlException e) {
Permission p = e.getPermission();
if (p instanceof RuntimePermission) {
if (p.getName().startsWith("modifyThread")) {
if (loader == null)
loader = getClassLoader(getCodeBase(), getClassLoaderCacheKey());
loader.setExceptionStatus();
}
}
}
COM: <s> this kludge is specific to get over access control exception thrown during </s>
|
funcom_train/2886303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HadoopService getService() throws SmartFrogResolutionException, RemoteException {
Prim prim = getTarget();
if (!(prim instanceof HadoopService)) {
String error = "Unable to bind to a component that is not a Hadoop service: "
+ prim.sfCompleteName();
throw new SmartFrogResolutionException(refTarget, sfCompleteNameSafe(), error);
}
return (HadoopService) prim;
}
COM: <s> get the service </s>
|
funcom_train/48389911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addImageClickHandler(com.smartgwt.client.widgets.tableview.events.ImageClickHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.tableview.events.ImageClickEvent.getType()) == 0) setupImageClickEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.tableview.events.ImageClickEvent.getType());
}
COM: <s> add a image click handler </s>
|
funcom_train/46427669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
Button b = (Button) e.getSource();
if (b == playButton) {
Concept concept = Memory.nameToConcept(StringParser.parseTerm(termField.getText()).getName());
if (concept != null) {
concept.startPlay(true);
}
} else if (b == hideButton) {
close();
}
}
COM: <s> handling button click </s>
|
funcom_train/44533939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getShortName(String name){
// Remove the first word if a separator exists
int dotIndex = name.indexOf(COMPONENT_NAME_SEPARATOR);
if (dotIndex != -1) {
name = name.substring(dotIndex + 1);
if (projDef.getProjectSettings().isHierarchical()) {
// Replace separators with file separators.
name = name.replace(COMPONENT_NAME_SEPARATOR, InvictaConstants.FILE_SEPARATOR_CHAR);
}
}
return name;
}
COM: <s> returns the short name of the component without the project prefix </s>
|
funcom_train/51601800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveDatabase() {
JFileChooser fc = new JFileChooser();
int returnVal = fc.showDialog(WindowManager.getInstance().getMainFrame(), "Save database");
File file = fc.getSelectedFile();
if(file != null) DatabaseManager.getInstance().saveDatabase(file);
}
COM: <s> save the database to an external file </s>
|
funcom_train/19315553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getBreakChosen(final int index) {
if (this.breaksChosen == null
|| index < 0
|| index >= this.breaksChosen.size()) {
return -1;
}
final Object object = this.breaksChosen.get(index);
final Integer integer = (Integer) object;
return integer.intValue();
}
COM: <s> returns the value for a specific chosen item </s>
|
funcom_train/16466453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addJob(Job job) throws InterruptedException {
while (jobQueue.size() > maxJobsInQueue) {
Thread.sleep(200);
if ((jobQueue.size() < minJobsInQueue) && (maxJobsInQueue < 2000)) {
// System and download connection is very fast - we have to
// increase the maximum job count in the queue
maxJobsInQueue *= 2;
minJobsInQueue *= 2;
}
}
jobQueue.put(job);
}
COM: <s> blocks if more than 100 jobs are already scheduled </s>
|
funcom_train/12687306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void linkButton(QName key, JButton button) throws DataSetException {
IDataControl control = new ButtonDataControl(button);
linkDataControl(key, control);
control.setDescription("Button");
control.setValueTranslator(EmptyValueTranslator.getInstance());
control.setValueValidator(EmptyValueValidator.getInstance());
}
COM: <s> helper method to bind a button </s>
|
funcom_train/6340488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Index SetIndex(Structure data) {
Index wanted;
Enumeration indices = ReturnIndices();
while (indices.hasMoreElements()) {
wanted=((Index)indices.nextElement());
if (wanted.CheckIndex(data))
return wanted;
}
// this is unique index but this will change
return wanted = CreateIndex("U "+data.Definition());
}
COM: <s> here are methods which extends main table class </s>
|
funcom_train/46866934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFriendsCount(Long userId) {
String result = null;
List list = baseDao.findByNamedParam(
"select count(*) from UserLink as ul where ul.fromUser.userId =:userId"
+ " AND ul.active='Y'", "userId", userId);
if (list.isEmpty()) {
return result;
} else {
result = list.get(0).toString();
return result;
}
}
COM: <s> returns count of active user links of a user </s>
|
funcom_train/17622786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Aggregator getDefaultTrackerAggregator() {
Aggregator aggregator = null;
while ((aggregator = aggregatorMap.get(Aggregator.DEFAULT_AGGREGATOR_NAME)) == null) {
aggregator = doCreateTrackerAggregator(Aggregator.DEFAULT_AGGREGATOR_NAME);
aggregatorMap.putIfAbsent(Aggregator.DEFAULT_AGGREGATOR_NAME, aggregator);
}
return aggregator;
}
COM: <s> thread safe method to retrieve and possibly create the default tracker aggregator </s>
|
funcom_train/22899905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processLoginAck(String message) {
String username = message.substring(message.indexOf("\"") + 1, message.lastIndexOf("\""));
this.username = username;
gt.printMessage("Login approved for " + username + "\r\n", IOUtils.yellow);
}
COM: <s> acknowledges the login and continues the process </s>
|
funcom_train/46015344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAdmin(String name) {
try {
result = statement.executeQuery("SELECT * FROM " + dbAccountTable + " WHERE name ='" + name + "'");
if (result.next()) {
return result.getBoolean("isAdministrator");
}
} catch (SQLException ex) {
return false;
}
return false;
}
COM: <s> read is administrator in database for user </s>
|
funcom_train/48667496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleMousePressedOnSessionTree(MouseEvent e) {
/* JTree tree = getLeftPanel().getJTreeHosts();
int selRow = tree.getRowForLocation(e.getX(), e.getY());
if(selRow == -1) {
// if the mouse was pressed in the white space
// of the tree deselect all tree items
tree.getSelectionModel().clearSelection();
}
*/ }
COM: <s> handles mouse pressed event on the hosts tree </s>
|
funcom_train/18165757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuBar getAppMenuBar() {
JMenuBar bar = new JMenuBar();
JMenu action = new JMenu("Actions");
JMenuItem hide = new JMenuItem("Hide");
action.add(hide);
hide.addActionListener (new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
setVisible (false);
}
});
// clear the log entries.
JMenuItem clear = new JMenuItem("Clear log");
action.add(clear);
clear.addActionListener (new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
logContents.setText("");
}
});
bar.add(action);
return bar;
}
COM: <s> menu for this gui logger </s>
|
funcom_train/50501158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
IAppImplementation application = EditorContext.getApplication();
IProject p = application.getCurrentProject();
if(p == null || !(EditorContext.getApplication().isProjectActivated(p.getName()))) {
return "Activate project for BeanFactory";
}
else {
return "Deactivate project for BeanFactory";
}
}
COM: <s> the actions name by default de activate project for bean factory </s>
|
funcom_train/36180983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeMinMax(double[] values) {
this.minValue = Double.MAX_VALUE;
this.maxValue = -Double.MAX_VALUE;
for (int i=0;i<values.length;i++) {
this.minValue = Math.min(this.minValue, values[i]);
this.maxValue = Math.max(this.maxValue, values[i]);
}
// System.out.println("Min " + this.minValue + " max " + this.maxValue);
}
COM: <s> compute the min and max of the data </s>
|
funcom_train/47487672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object dateTime) {
if (dateTime == null) {
return false;
}
if (dateTime.getClass() == this.getClass()) {
DateTime dt = (DateTime) dateTime;
return systemDur.toMillis() == dt.toMillis()
&& systemDur.getNanos() == dt.getNanos();
}
return false;
}
COM: <s> this compares a date time with another date time </s>
|
funcom_train/9753566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printStartDelay(long msDelay) {
try
{
extruders[extruder].setExtrusion(extruders[extruder].getExtruderSpeed());
Thread.sleep(msDelay);
// extruders[extruder].setExtrusion(0); // What's this for? - AB
} catch(Exception e)
{
// If anything goes wrong, we'll let someone else catch it.
}
}
COM: <s> extrude for the given time in milliseconds so that polymer is flowing </s>
|
funcom_train/22926530 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initGraphicsContext() {
// Sets the layout
setLayout(new BorderLayout());
// Creates a new canvas using the preferred graphics configuration
canvas3D = new Canvas3D(SimpleUniverse.getPreferredConfiguration());
// Stops the renderer for immediate mode
canvas3D.stopRenderer();
// Get a reference to the canvas object's graphics context
graphicsContext = canvas3D.getGraphicsContext3D();
// Creates a new simple universe using the specified canvas
simpleUniverse = new SimpleUniverse(canvas3D);
// Adds the canvas to the applet
add("Center", canvas3D);
}
COM: <s> initializes the java3 d objects required for basic direct mode rendering </s>
|
funcom_train/35164271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BufferedImage loadJavaImage(String imgName) {
BufferedImage tmpi = null;
try {
tmpi = ImageIO.read(JOApp.getInputStream(imgName));
}
catch (Exception e) {
JOApp.err("JOImage.loadJavaImage() exception: FAILED TO LOAD IMAGE " + e);
}
return tmpi;
}
COM: <s> load a buffered image from the given image file name </s>
|
funcom_train/7994930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCombo2() {
comboRisk = new Combo(top, SWT.NONE);
comboRisk.setBounds(new Rectangle(572, 71, 94, 31));
comboRisk.addFocusListener(new org.eclipse.swt.events.FocusAdapter() {
public void focusLost(org.eclipse.swt.events.FocusEvent e) {
controller.updateStoryRisk(comboRisk.getText());
}
});
comboRisk.add("1");
comboRisk.add("2");
comboRisk.add("3");
}
COM: <s> this method initializes combo2 </s>
|
funcom_train/42637932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setY0(CombinationNumber x, CombinationNumber y){
if(y.getCombination() instanceof ConservativeLinearCombination){
ConservativeLinearCombination yComb = (ConservativeLinearCombination)y.getCombination();
yComb.setX0(0.);//to use getDoubleValue();
yComb.setX0(y.doubleValue()-yComb.getDoubleValue());
}
}
COM: <s> sets x0 for ys conservative linear combination </s>
|
funcom_train/4521174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RegistroLinea update(RegistroLinea entity) {
LogUtil.log("updating RegistroLinea instance", Level.INFO, null);
try {
RegistroLinea result = entityManager.merge(entity);
//entityManager.flush();
LogUtil.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
LogUtil.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved registro linea entity and return it or a copy </s>
|
funcom_train/21087455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDefaultPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Filtre_default_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Filtre_default_feature", "_UI_Filtre_type"),
SNI_Package.Literals.FILTRE__DEFAULT, true, false, false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the default feature </s>
|
funcom_train/135035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String toComparisonString() {
// Do NOT consider the "name" in tests of equality.
// We do not want to allow two links that are identical except for name.
// This is important in allowing users to over-ride the default links.
return original_regex + ", " + url.toString() + ", " + id_field_name;
}
COM: <s> used to compute the hash code and in the equals method </s>
|
funcom_train/44534278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPnlSaveCancel() {
if (pnlSaveCancel == null) {
pnlSaveCancel = new JPanel();
pnlSaveCancel
.setComponentOrientation(java.awt.ComponentOrientation.LEFT_TO_RIGHT);
pnlSaveCancel.add(getBtnSave(), null);
pnlSaveCancel.add(getBtnCancel(), null);
pnlSaveCancel.setVisible(false);
}
return pnlSaveCancel;
}
COM: <s> this method initializes j panel1 </s>
|
funcom_train/32061868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getMaxFuel() {
float totalfuel = 0;
// add up all the fuel in the fuel cells
for (Component c : components) {
if (c.getTechnology().isGoodProduced(Good.Fuel)) {
if (c instanceof StorageComponent)
totalfuel += ((StorageComponent)(c)).getStorageCapacity();
}
}
return totalfuel;
}
COM: <s> returns the maximum amount of fuel this starship can have </s>
|
funcom_train/3159523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(byte[] rawHeaderData) throws IOException {
_reader = new InputStreamReader(new ByteArrayInputStream(rawHeaderData));
createEmptyNodes();
parseBaseParameter();
parseOrbitParameter();
parseClockCalibrationParameter();
parseProductOptionalContentsParameter();
parseProductPositionParameters();
parseInstrumentModesAndTemperatureParameter();
parseSolarAndViewAngleParameter();
parseProductConfidenceInformation();
}
COM: <s> parses the data array passed in as atsr sadist 2 header data </s>
|
funcom_train/12276435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readFully(byte b[], int off, int len) throws IOException {
if (len < 0)
throw new IndexOutOfBoundsException();
int n = 0;
while (n < len) {
int count = read(b, off + n, len - n);
if (count < 0)
throw new EOFException();
n += count;
}
}
COM: <s> read until the buffer supplied is full </s>
|
funcom_train/8627496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Transfer writeString(String s) throws IOException {
if (s == null) {
out.writeInt(-1);
} else {
int len = s.length();
out.writeInt(len);
for (int i = 0; i < len; i++) {
out.writeChar(s.charAt(i));
}
}
return this;
}
COM: <s> write a string </s>
|
funcom_train/23326159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getClassName(Cls theCls) {
String className = theCls.getName();
if (!useJADENames) {
return className;
}
// if there is a slot for the JADE name use this insteead of the Protege name
if (jadeNameSlot != null) {
Object temp = theCls.getOwnSlotValue(jadeNameSlot);
if (temp != null) {
className = (String) temp;
}
}
return className;
}
COM: <s> get the name of the class </s>
|
funcom_train/25365708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTrapdescriptionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RoomEvent_trapdescription_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RoomEvent_trapdescription_feature", "_UI_RoomEvent_type"),
LeveleditorPackage.Literals.ROOM_EVENT__TRAPDESCRIPTION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the trapdescription feature </s>
|
funcom_train/44136183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean getDisplayed(Node node) {
String dis = "false";
NamedNodeMap map = node.getAttributes();
if(map.getLength() > 0) {
Node n = map.getNamedItem(OSMFile.OSMTHM_MODEL_ATT_DISPLAYED);
if(n != null)
dis = n.getNodeValue();
}
return "true".equals(dis);
}
COM: <s> it indicates whether it is displayed </s>
|
funcom_train/3674568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Document importElement(Element e) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
Document result = null;
try {
DocumentBuilder builder = factory.newDocumentBuilder();
result = builder.newDocument();
result.appendChild(result.importNode(e, true));
}
catch (Throwable ex) {
throw new IllegalArgumentException("Unable to import element:" + ex);
}
return result;
}
COM: <s> converts the element to its own document for processing </s>
|
funcom_train/4942483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProjectFrame(Project project) {
ProjectFrame frame = new ProjectFrame(project);
frame.addProjectFrameListener(menuBar);
frame.addPropertyChangeListener(appFrame);
workPanel.addCascaded(frame, JDesktopPane.DEFAULT_LAYER);
frame.setVisible(true);
frame.centerMainPanel();
((AbstarctCursorEvent) PencilAction.getAction()).addCursorChangeListener(frame);
((AbstarctCursorEvent) DrawSegmentAction.getAction()).addCursorChangeListener(frame);
}
COM: <s> adds a project frame into work space </s>
|
funcom_train/24178838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void changeFillColor(SelectionEvent event) {
if (fillColor != null) {
previousColor = FigureUtilities.RGBToInteger(fillColor);
}
fillColor = changeColorSelected(event, fillColorButton,
PackageUtil.getID(NotationPackage.eINSTANCE
.getFillStyle_FillColor()), FILL_COLOR_COMMAND_NAME,
AbstractUIPlugin.imageDescriptorFromPlugin(
PropertiesActivator.PLUGIN_ID, ICONS_FILL_COLOR_GIF));
}
COM: <s> change fill color property value </s>
|
funcom_train/21429699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkPermissions() throws InsufficientPermissions {
// if (glycanSequenceContext != null && ! getGlycanSequenceContext().getBiologicalContext().getContributor().equals(getContributor())) {
// throw new InsufficientPermissions(this,"Biological context does not belong to logged in user");
// }
// throw new InsufficientPermissions(this,"Biological context does not belong to logged in user");
}
COM: <s> check permissions for the parent biological context </s>
|
funcom_train/25102566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(F2AMapping n) {
n.f0.accept(this);
n.f1.accept(this);
n.f2.accept(this);
n.f3.accept(this);
n.f4.accept(this);
n.f5.accept(this);
n.f6.accept(this);
n.f7.accept(this);
}
COM: <s> f0 f2 a mapping </s>
|
funcom_train/1555064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFreeLabel(String suggestedLabel) {
if (suggestedLabel != null) {
if ("x".equals(suggestedLabel) || "y".equals(suggestedLabel))
return getDefaultLabel(false);
if (cons.isFreeLabel(suggestedLabel))
return suggestedLabel;
else if (suggestedLabel.length() > 0)
return getIndexLabel(suggestedLabel);
}
// standard case: get default label
return getDefaultLabel(false);
}
COM: <s> get a free label </s>
|
funcom_train/22711293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIndex(boolean withTestSessionColumn) {
if(!withTestSessionColumn && this == Columns.TESTSESSION) {
throw new IllegalArgumentException();
}
if(!withTestSessionColumn
&& this.index > Columns.TESTSESSION.getIndex(true)) {
return this.index-1;
} else {
return this.index;
}
}
COM: <s> returns the index of this column </s>
|
funcom_train/31539623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setId(String id) {
Contract.require((this.hasId() == false), "Request has no id");
//assert(this.hasId() == false);
setId(new Integer(id));
Contract.ensure(this.hasId(), "Request is not identifiable");
//assert(this.hasId());
}
COM: <s> method set id can only be called if the request has no id </s>
|
funcom_train/27842405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Control createControl() {
Control returnValue = super.createControl();
if (LOG.isDebugEnabled()) {
LOG.debug("createControl: Creating the control " + returnValue + "with value " + this.shownModel);
}
returnValue.setParameter(this.shownModel);
return returnValue;
}
COM: <s> now overwrite the firing of the control to include the additional </s>
|
funcom_train/25704867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exitSave() throws StorageException {
final List<FrostDownloadItem> itemList = getItems();
try {
FrostFilesStorage.inst().saveDownloadFiles(itemList);
} catch (final Throwable e) {
logger.log(Level.SEVERE, "Error saving download items", e);
throw new StorageException("Error saving download items");
}
}
COM: <s> saves the download model to database </s>
|
funcom_train/26199159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
if (respawnOnDrop()){
return argName + "[, " + argName + "...]";
} else if (optionalArg){
return "<html><i>[, " + argName + "]</i></html>";
} else{
return argName;
}
}
COM: <s> returns a string representation </s>
|
funcom_train/25764128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matrix computeCorrelations() {
Matrix correlation = new BasicMatrix(getLoadings());
for (int i = 0; i < correlation.getRowDimension(); i++) {
for (int j = 0; j < correlation.getColumnDimension(); j++) {
double value = correlation.get(i, j);
value *= getStandardDeviations()[j];
correlation.set(i, j, value);
}
}
return correlation;
}
COM: <s> returns the matrix of the correlations between variables i </s>
|
funcom_train/5433097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectMoveable(int index) {
unitList.removeAll();
Object o=choices.elementAt(index);
if(o instanceof Squad) {
Enumeration e=((Squad)o).theUnits.elements();
while(e.hasMoreElements())
unitList.add(e.nextElement().toString());
}
}
COM: <s> setup the unit list to reflect the given index </s>
|
funcom_train/50062380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean close()throws HL7IOException {
if (!this.isOpen()) {
return true;
} // if
try {
this.reader.close();
} catch (IOException ioEx) {
throw new HL7IOException("HL7FileReader.close:IOException", ioEx);
} // try - catch
this.statusValue = HL7FileReader.CLOSED;
return true;
} // close
COM: <s> closes the context hl7 file reader stream </s>
|
funcom_train/3004880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh() {
if ( _invocator != null ) {
_date = (Timestamp) _invocator.get();
if ( _date == null ) {
setText( "" );
} else {
setText( BSFDateFormatter.getDateAndTimeRenderingString( _date ) );
}
}
if ( getPropertyController() != null ) {
setEnabled( getPropertyController().isPropertyEnabled( getPropertyName() ) );
}
}
COM: <s> called to refresh this component </s>
|
funcom_train/19636304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnboundedFifoBufferRemove() {
resetFull();
int size = confirmed.size();
for (int i = 0; i < size; i++) {
Object o1 = ((UnboundedFifoBuffer)collection).remove();
Object o2 = ((ArrayList)confirmed).remove(0);
assertEquals("Removed objects should be equal", o1, o2);
verify();
}
}
COM: <s> tests that unbounded fifo buffer removes elements in the right order </s>
|
funcom_train/45451510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSummaryAnswer(final EntityReference<SummaryQuestion> summaryQuestionRef) {
assert summaryQuestionRef != null : "summaryQuestionRef cannot be null";
int index = this.summaryQuestionRefs.indexOf(summaryQuestionRef);
assert index > -1 : "summaryQuestionRef must be in the summaryQuestionRefs List";
return answers[(topicDetailRefs.size() * detailQuestionRefs.size()) + index];
}
COM: <s> returns the answer for a summary question ref </s>
|
funcom_train/35848842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstruction() {
ProjectBrowser pb = ProjectBrowser.getInstance();
assertNotNull(pb.getLocale());
assertNotNull(pb.getAppName());
// ProjectBrowser exposes functionality, not components.
// assertNotNull(pb.getTabProps());
// assertNotNull(pb.getStatusBar());
assertNotNull(pb.getJMenuBar());
assertNotNull(pb.getEditorPane());
assertNotNull(pb.getTodoPane());
}
COM: <s> tests that the projectbrowser is created or can be created </s>
|
funcom_train/29272111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchCard(long rowId) throws SQLException {
Cursor mCursor = mDb.query(CARD_TABLE, new String[] {KEY_ROWID, KEY_CATEGORY, KEY_BOX, KEY_FRONT, KEY_BACK},
KEY_ROWID + "=" + rowId,
null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;
}
COM: <s> returns a card with a given row id </s>
|
funcom_train/51055475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unlock() throws IOException {
synchronized (this) {
if (task != null) task.cancel();
task = null;
}
if (isOpen() == false) return;
send(new SmbComClose(fid, 0l), new SmbComBlankResponse());
opened = false;
}
COM: <s> unlocks the resource </s>
|
funcom_train/32353453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLNode getSubNode(final String tagname) {
final NodeList children = node.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
final Node child = children.item(i);
final String childName = child.getNodeName();
if (childName.equals(tagname)) {
final XMLNode childXMLNode = new XMLNode(child);
return childXMLNode;
}
}
return null;
}
COM: <s> getter for a subnode by tag name </s>
|
funcom_train/101567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUpperValue(int value) {
// Compute new extent.
int lowerValue = getValue();
int newExtent = Math.min(Math.max(0, value - lowerValue), getMaximum() - lowerValue);
// Set extent to set upper value.
setExtent(newExtent);
}
COM: <s> sets the upper value in the range </s>
|
funcom_train/29385179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData( double[] pts, int nSeries, String[] names, boolean animate )
{
backgroundImage = null;
boolean showNow = !animate || ( newPoints == null );
newSeries = nSeries;
newPoints = pts;
seriesNames = names;
if ( showNow )
showNewData();
else {
animationScale = 0.1;
animationScaleInc = -0.1;
animationTimer.start();
}
}
COM: <s> set the chart data </s>
|
funcom_train/33528383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSave() throws UserNotFoundException, LeagueRestrictionException {
User user = new User("Andre", "Henrique", null, null, null, "andre@email", null, "senha");
Integer userId = userService.save(user);
User userPersistent = userService.findByEmail("andre@email");
assertTrue(loginService.validation(userPersistent.getEmail(), "senha"));
userService.delete(userId);
}
COM: <s> some login service testes </s>
|
funcom_train/37090410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createRawJnetNode() {
if (jnetNode!=null) return; // ?
jnetNode = jnet().createRawJnetNode(this);
// not needed anymore -> tainted -> setModVis sets flags
//jnetNode.setBallsShapeVis(true); // isVisible balls, default hidden
}
COM: <s> create jnet node x y z creates jnet node assigning coordinates </s>
|
funcom_train/10302296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
// set title
PortletPreferences prefs = request.getPreferences();
String measureName = prefs.getValue(Constants.FIELD_MEASURE_NAME, default_measure);
response.setTitle(measureName);
super.doView(request, response);
}
COM: <s> overrides parent method in order to set own title </s>
|
funcom_train/9042812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
String s= event.getCommand().getId();
IParameter[] x = new IParameter[0];
try {
x = event.getCommand().getParameters();
} catch (NotDefinedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if(x.length>0)
x[0].getName();
MessageDialog.openInformation(
window.getShell(),
"Usefultools",
"Deneme");
return null;
}
COM: <s> the command has been executed so extract extract the needed information </s>
|
funcom_train/31156030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(MouseEvent e) {
super.mousePressed(e);
if (SwingUtilities.isLeftMouseButton(e)) {
_pressedPoint = new ScaledPoint(pressedPixel.getX(), pressedPixel
.getY(), 1);
// _scaleFactor);
dbg.say(dbg.pairln("mousePressed after scaled: ", ""
+ _pressedPoint.getX(), "" + _pressedPoint.getY()));
_releasedPoint = null; // reset releasedPoint
}
}
COM: <s> implements a mouse event calls the mouse pressed of its parent class </s>
|
funcom_train/34042063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStrippedID() {
if (id_.indexOf("~") >= 0) {
//System.out.println("strID "+id_.split("~",1)[0]);
return id_.substring(0, id_.indexOf("~"));
}
return id_;
}
COM: <s> strips any scenario specifier off the end of the route id </s>
|
funcom_train/9237649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasFrameContainer() {
Class target = null;
if (type.getType().getArgTypes().length > 0) {
target = type.getType().getArgTypes()[0];
while (target != null && target != FrameContainer.class) {
target = target.getSuperclass();
}
}
return target == FrameContainer.class;
}
COM: <s> returns true if this action types first argument is a frame container </s>
|
funcom_train/50747186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map findTerminatedInstances() throws ServiceException, RemoteException {
Call call = getCall();
log.debug("Getting terminated processes list");
call.setOperationName("findTerminatedInstances");
Map result = (Map) call.invoke(new Object[]{});
log.debug("Got terminated processes list");
return result;
}
COM: <s> returns all terminated instances of process </s>
|
funcom_train/4755529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkSubtractionCompatible(final FieldMatrix<T> m) {
if ((getRowDimension() != m.getRowDimension()) ||
(getColumnDimension() != m.getColumnDimension())) {
throw new MatrixDimensionMismatchException(m.getRowDimension(), m.getColumnDimension(),
getRowDimension(), getColumnDimension());
}
}
COM: <s> check if a matrix is subtraction compatible with the instance </s>
|
funcom_train/31761177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCategories(String[] categories) {
ArrayList list = new ArrayList ();
for (int i = 0; i < categories.length; i++) {
String cat = categories[i];
if (!cat.trim().equals("")) {
list.add(cat);
}
}
if (list.size() == 0)
this.categories = null;
else
this.categories = (String[])list.toArray(new String[0]);
}
COM: <s> sets the categories </s>
|
funcom_train/2904330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initKeyStore(File ks, char[] sPass) throws IOException, NoSuchAlgorithmException, CertificateException, NullPointerException, KeyStoreException{
storePass = new char[sPass.length];
System.arraycopy(sPass, 0, storePass, 0, sPass.length);
kStore = KeyStore.getInstance("JKS");
if((ks!=null) && ks.exists()){
jks = ks;
}
FileInputStream fs = new FileInputStream(jks);
kStore.load(fs, storePass);
fs.close();
sign = Signature.getInstance(algo);
}
COM: <s> initialize the key store </s>
|
funcom_train/50224282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enableTypes(Collection types) {
for (Iterator i = typeMap.keySet().iterator(); i.hasNext(); ) {
Object key = i.next();
((JCheckBox) typeMap.get(key)).setSelected(types.contains(key));
}
}
COM: <s> ensure that the typesname in set types are selected </s>
|
funcom_train/5379206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Object parentElement, Object[] childElements) {
Assert.isNotNull(parentElement);
assertElementsNotNull(childElements);
Widget widget = findItem(parentElement);
// If parent hasn't been realized yet, just ignore the add.
if (widget == null)
return;
internalAdd(widget, parentElement, childElements);
}
COM: <s> adds the given child elements to this viewer as children of the given </s>
|
funcom_train/20481193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void intersectSelf(Interval i) {
List<Interval> newIntervals = new ArrayList<Interval>();
for (Iterator iterator = intervals.iterator(); iterator.hasNext();) {
Interval local = (Interval) iterator.next();
if (local.intersects(i)) {
newIntervals.add(Interval.intersection(local, i));
}
}
intervals = newIntervals;
}
COM: <s> intersects the instance and an interval </s>
|
funcom_train/33567291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateStatus() {
if (formatter != null) {
bold.setDown(formatter.isBold());
italic.setDown(formatter.isItalic());
underline.setDown(formatter.isUnderlined());
subscript.setDown(formatter.isSubscript());
superscript.setDown(formatter.isSuperscript());
strikethrough.setDown(formatter.isStrikethrough());
}
}
COM: <s> updates the status of all the stateful buttons </s>
|
funcom_train/11774460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ipAddressEntered(){
String ip = txtIpAddress.getText();
if(!ip.equalsIgnoreCase("Enter IP Address")){
if(!Simulation.validateDecIP(ip)){
lblError.setText("Invalid IP Address");
lblError.setForeground(Color.RED);
lblError.setVisible(true);
controller.shakeDiaLog(this);
ErrorFlag = true;
}else{
lblError.setVisible(false);
IPAddress = ip;
SubnetMask = Simulation.getDefaultSubnetMask(IPAddress);
txtSubnetMask.setText(SubnetMask);
txtSubnetMask.setEnabled(true);
ErrorFlag = false;
}
}
}
COM: <s> this method will validate the entered in ip address </s>
|
funcom_train/34811030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeArrayNames(float[][] t, float[][] c){
int num = t.length + c.length;
ans = new ArrayName[num];
int counter = 0;
//make t's
for (int i=0; i<t.length; i++){
ans[counter] = new ArrayName(counter, t[i]);
counter++;
}
//make c's
for (int i=0; i<c.length; i++){
ans[counter] = new ArrayName(counter, c[i]);
counter++;
}
}
COM: <s> convert intensity arrays into an array name </s>
|
funcom_train/8074345 | /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();
for (int i = 0; i < m_Elements.length; i++) {
if (i > 0) text.append(",");
text.append(Utils.doubleToString(m_Elements[i],6));
}
text.append("\n");
return text.toString();
}
COM: <s> converts a vector to a string </s>
|
funcom_train/6476064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPolicy(Agent agent, String service, int right) {
AFPolicy policy = (AFPolicy) services.get(service);
if (policy == null) {
policy = new AFPolicy(AFRight.DENY);
services.put(service, policy);
}
policy.addRight(agent, right);
}
COM: <s> adds an agent right to a service policy </s>
|
funcom_train/46523760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillRectangle(int x, int y, int w, int h, Color color) {
Shape s = new Rectangle2D.Float((float)x,(float)y,(float)w,(float)h);
fillShape(s, color);
}
COM: <s> fill a rectangle with a color </s>
|
funcom_train/18869133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SecurityNode getSecurity(final String symbol) {
ReadLock commodityReadLock = commodityLock.readLock();
commodityReadLock.lock();
try {
List<SecurityNode> list = getSecurities();
SecurityNode sNode = null;
for (SecurityNode node : list) {
if (node.getSymbol().equals(symbol)) {
sNode = node;
break;
}
}
return sNode;
} finally {
commodityReadLock.unlock();
}
}
COM: <s> find a security node given its symbol </s>
|
funcom_train/8632967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startLoggingProblems(int errors, int warnings) {
this.parameters.put(Logger.NUMBER_OF_PROBLEMS, new Integer(errors + warnings));
this.parameters.put(Logger.NUMBER_OF_ERRORS, new Integer(errors));
this.parameters.put(Logger.NUMBER_OF_WARNINGS, new Integer(warnings));
printTag(Logger.PROBLEMS, this.parameters, true, false);
}
COM: <s> used to start logging problems </s>
|
funcom_train/37646005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int oldConnections() {
//TODO3: augment state of this if needed to avoid loop
int ret=0;
for (Iterator iter=_initializedConnections.iterator(); iter.hasNext();){
ManagedConnection mc=(ManagedConnection)iter.next();
if (mc.getProperty(ConnectionHandshakeHeaders.X_SUPERNODE)==null)
ret++;
}
return ret;
}
COM: <s> returns the number of old fashioned unrouted connections </s>
|
funcom_train/31365249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator componentNameIterator () {
initializeSubcomponentList();
return new Iterator () {
Iterator i = subcomponents.iterator();
public boolean hasNext() { return i.hasNext(); }
public Object next () { return i.next(); }
public void remove () {
throw new UnsupportedOperationException("can't remove");
}};
}
COM: <s> iterator over names of properties that are subcomponents </s>
|
funcom_train/1553586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Pnt extend (double... coords) {
double[] result = new double[coordinates.length + coords.length];
System.arraycopy(coordinates, 0, result, 0, coordinates.length);
System.arraycopy(coords, 0, result, coordinates.length, coords.length);
return new Pnt(result);
}
COM: <s> create a new pnt by adding additional coordinates to this pnt </s>
|
funcom_train/25248370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkDBexists(String tem) {
File temp = new File(tem);
boolean dbexists = false;
for (int l = 0; l < temp.listFiles().length; l++) {
if (temp.listFiles()[l].getName().equalsIgnoreCase(
databasename)) {
dbexists = true;
}
}
return dbexists;
}
COM: <s> it checks whether database available in local folder or not </s>
|
funcom_train/10003907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRunning(boolean running) {
if(!running) {
topButtons[playButtonID].setToolTipText(ls.getString(LanguageStrings.BUTTON_PLAY));
topButtons[playButtonID].setIcon(new ImageIcon(SeevolutionView.class.getResource("/icons/play.jpg")));
} else {
topButtons[playButtonID].setToolTipText(ls.getString(LanguageStrings.BUTTON_PAUSE));
topButtons[playButtonID].setIcon(new ImageIcon(SeevolutionView.class.getResource("/icons/pause.jpg")));
}
}
COM: <s> starts and stops the animation </s>
|
funcom_train/29040656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeTransitiveClosure() {
// Now start computing the transitive closure
for (String sSecond : sFeatures) {
for (String sFirst : sFeatures) {
if (isOrdered(sFirst, sSecond)) {
Set<String> sFirsts = msssTransitiveOrder.get(sFirst);
Set<String> sSeconds = msssTransitiveOrder.get(sSecond);
msssTransitiveOrder.put(sFirst, union(sFirsts, sSeconds));
}
}
}
}
COM: <s> an adaptation of </s>
|
funcom_train/8045173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Airfoil getSelected() {
if (getSelectedNode()==null) return null;
String path = getSelectedNode().getAttributes().getNamedItem("LogicalPath").getNodeValue();
String name = getSelectedNode().getAttributes().getNamedItem("FileName").getNodeValue();
return new Airfoil(new File(FinalSet.getFileURL(path+"/"+name).getFile()));
}
COM: <s> returns an airfoil generated from the data in the file parsed </s>
|
funcom_train/39364818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double rpp(double p) {
double rpp = 1;
double x = Math.abs(p * a1);
if (x > EPS)
return rpp;
if (Math.abs(p * a2) > EPS)
return rpp;
if (Math.abs(p * b1) > EPS)
return rpp;
if (Math.abs(p * b2) > EPS)
return rpp;
return reflectedPP(x);
}
COM: <s> calculate reflection coefficient for a particular ray parameter </s>
|
funcom_train/41446085 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) return true;
if (!(obj instanceof TimerOptions)) return false;
TimerOptions that = (TimerOptions)obj;
return (this.persistent == that.persistent)
&& (this.timeout == that.timeout)
&& (this.preserveMissed.equals(that.preserveMissed));
}
COM: <s> compare this timer options object for equality with another </s>
|
funcom_train/36182159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IAdvertisementMgr getAdvertMgr() throws GroupingException {
try {
IAdvertisementMgr service = (IAdvertisementMgr) advertMgrTracker.getService();
if (null == service) {
throw new GroupingException("Error: could not get instance of IAdvertisementMgr service");
}
return service;
} catch (Throwable t) {
throw new GroupingException("Couldn't get Advert Manager ervice", t);
}
}
COM: <s> gets a reference to the advertisement manager </s>
|
funcom_train/22213245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addToDo(AbstractTimerEvent ate) {
synchronized(toDoQueue) {
// if it is already pending, remove it
toDoQueue.removeElement(ate) ;
// (re)add it to the pending event queue
toDoQueue.addElement(ate) ;
// could this effect are wait interval?
if (ate.getExpireTime() < alphaEventTime) {
this.interrupt() ;
}
}
}
COM: <s> add an event to the to do queue </s>
|
funcom_train/50149040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(AbstractButton b) {
if(b == null) {
return;
}
buttons.addElement(b);
if(selection == null && b.getModel().isSelected()) {
selection = b.getModel();
}
b.getModel().setGroup(this);
}
COM: <s> adds the button to the group </s>
|
funcom_train/16557703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getFillAlpha() {
// will compute the acumulated opacity
double myAlpha = 0;
for (int i = 0; i < layers.length; i++) {
double layerAlpha = layers[i].getFillAlpha()/255D;
myAlpha += (1-myAlpha)*layerAlpha;
}
int result = (int) Math.round(myAlpha * 255);
return (result>255) ? 255 : result;
}
COM: <s> returns the transparency of the multi layer fill symbol created </s>
|
funcom_train/18256818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getMin() {
update();
double min = Double.POSITIVE_INFINITY;
for (int i = 0; i < seriesSelected.length; i++) {
if (seriesSelected[i]) {
if (dataGroup.getSeries(i).getMin() < min) {
min = dataGroup.getSeries(i).getMin();
}
}
}
return min;
}
COM: <s> returns the minimum value across all series in the selection </s>
|
funcom_train/39314762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /** public void testExportActionPerformed() {
//needs work
System.out.println("testExportActionPerformed");
System.out.print("cannot be tested because this function instantiates ");
System.out.print("a JFileChooser that requires user input. ");
System.out.println("done testExportActionPerformed");
}
COM: <s> public void test import action performed </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.