__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/34531613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initInfoPanel() {
GridBagLayout layout = new GridBagLayout();
informationalPanel.setLayout(layout);
prepareInfoHeadings();
preparePlayerInfo(0, "N/A", Color.RED);
addInfoPanelRow(layout, 0);
preparePlayerInfo(1, "N/A", Color.BLUE);
addInfoPanelRow(layout, 1);
}
COM: <s> initializes the informational pannel </s>
|
funcom_train/644433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void switchToOptionAppearance(DialogOptions dialogOptions) {
this.dialogOptions = dialogOptions;
CardLayout cl = (CardLayout) (dialogOptions.getPanelOptions().getLayout());
cl.show(dialogOptions.getPanelOptions(), PersistenceManager.Values.CARD_APPEARANCE.name());
dialogOptions.setSelectedOption(PersistenceManager.Values.CARD_APPEARANCE.name());
}
COM: <s> switches to the appearance category in the option dialog </s>
|
funcom_train/2266553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton_save() {
if (jButton_save == null) {
jButton_save = new JButton();
jButton_save.setText("save");
jButton_save.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
daoListener.onSaveAction();
}
});
}
return jButton_save;
}
COM: <s> this method initializes j button save </s>
|
funcom_train/31686349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectionPaths(List paths) {
if(m_tree != null && paths != null) {
TreeModel tModel = (TreeModel) m_tree.getModel();
Iterator iter = paths.iterator();
while (iter.hasNext()) {
String sPath = (String) iter.next();
TreePath tPath = tModel.getTreePath(sPath);
m_tree.addSelectionPath(tPath);
}
}
}
COM: <s> sets which resources are to be selected </s>
|
funcom_train/39966415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JDesktopPane getJContentPane() throws RefreshException, SQLException, ClassNotFoundException {
if (jContentPane == null) {
jContentPane = new JDesktopPane();
jContentPane.setLayout(new BorderLayout());
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getPanelToolBar(),BorderLayout.NORTH);
jContentPane.add(getPanelPrincipal(),BorderLayout.CENTER);
jContentPane.add(getPanelStatus(),BorderLayout.SOUTH);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/11015272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateNamesAfterCellShift(FormulaShifter shifter) {
for (int i = 0 ; i < getNumNames() ; ++i){
NameRecord nr = getNameRecord(i);
Ptg[] ptgs = nr.getNameDefinition();
if (shifter.adjustFormula(ptgs, nr.getSheetNumber())) {
nr.setNameDefinition(ptgs);
}
}
}
COM: <s> updates named ranges due to moving of cells </s>
|
funcom_train/10617169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCertificateParsingException04() {
Throwable cause = null;
CertificateParsingException tE = new CertificateParsingException(cause);
assertNull("getMessage() must return null.", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
COM: <s> test for code certificate parsing exception throwable code </s>
|
funcom_train/35019691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateDirectory(String path) {
String msg = validateDirectory(new File(path));
if (msg != null) {
messageLabel.setText(msg);
} else {
messageLabel.setText("");
}
// Force an update of the Next button.
Controller.getDefault().markBusy(false);
}
COM: <s> validate the given path and set the message label appropriately </s>
|
funcom_train/30276944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeWorkItemTypeName(String oldWiTypeName, String newWiTypeName) {
// WorkItem Detail table
if (this.widItem.getWIType().equals(oldWiTypeName)) {
this.widItem.setWIType(newWiTypeName);
}
if (this.wiType.equals(oldWiTypeName)) {
this.wiType = newWiTypeName;
}
}
COM: <s> changes a work item type name </s>
|
funcom_train/49045285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButtonMenuItem getJRadioButtonMethyl_Green_DAB() {
if (buttMethyl_Green_DAB == null) {
buttMethyl_Green_DAB = new JRadioButtonMenuItem();
buttMethyl_Green_DAB.setText("Methyl Green DAB");
buttMethyl_Green_DAB.setToolTipText("Methyl Green DAB");
buttMethyl_Green_DAB.addActionListener(this);
buttMethyl_Green_DAB.setActionCommand("parameter");
}
return buttMethyl_Green_DAB;
}
COM: <s> this method initializes the option methyl green dab </s>
|
funcom_train/38465850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newWorksheet() {
int ans = JOptionPane.YES_OPTION;
if (isSheetDirty()) {
ans = promptAndSave();
}
if (ans != JOptionPane.CANCEL_OPTION) {
_sheet.clear();
setSheetSource(null);
setSheetDirty(false);
}
}
COM: <s> creates a new empty spreadsheet with default settings </s>
|
funcom_train/46702485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Appendable printColumnAlias(final ColumnWrapper column, final Appendable out) throws IOException {
final TableWrapper table = column.getTable();
out.append(table.getAlias());
out.append('.');
out.append(MetaColumn.NAME.of(column.getModel()));
return out;
}
COM: <s> print a full sql column alias name by sample table alias </s>
|
funcom_train/38551672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
try {
this.dbConnectionThread.kill();
//Only need to commit if autocommit = false
//con.commit();
con.close();
} catch(SQLException e) {
Logger.error(
DataManagerSystemCodes.DATA_POINT_STORE_SHUTDOWN_SQL_EXCEPTION,
new Object[] {e.getMessage()});
this.dbConnectionThread.resetConnection();
}
}
COM: <s> shuts the store down </s>
|
funcom_train/19081328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Player getPlayer(Player oldPlayer) {
if (activated) {
if (next != null) {
return ((ControllerModifier) next).getPlayer(newController.getPlayer(
ability, null));
}
return newController.getPlayer(ability, null);
}
if (next != null) {
return ((ControllerModifier) next).getPlayer(oldPlayer);
}
return oldPlayer;
}
COM: <s> return the modified controller </s>
|
funcom_train/41575820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double pathDistance(LinkedList<Point> pts1, LinkedList<Point> pts2) {
double d = 0.0;
for (int i = 0; i <= pts1.size() - 1; i++) {
try {
d += distance(pts1.get(i), pts2.get(i));
} catch (Exception e) {
}
}
double r = d / pts1.size();
return r;
}
COM: <s> calculates the distance between two paths </s>
|
funcom_train/38552697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getStatuses() throws RemoteException {
Vector statuses = new Vector();
Iterator iter = this.getRegisteredCores().values().iterator();
RemoteSubSystemCore core;
while (iter.hasNext()) {
core = (RemoteSubSystemCore)iter.next();
try {
statuses.add(core.remoteGetStatus());
} catch (RemoteException e) {
//maintainence thread will catch it
}
}
return statuses;
}
COM: <s> returns a vector of all the statuses from all the subsystems running </s>
|
funcom_train/13249068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processSave(boolean saved) {
showWaitCursor(false);
if (!saved) {
MessageDisplay.displayErrorMessage(this, getFileManager().getErrorMessage(),
RESOURCE_BUNDLE.getString(ConverterResource.CONVERTER_ERROR));
} else {
setHasTextAreaChanged(false);
updatePreviousFileMenuItems(getFileMenu());
updateTitle();
}
}
COM: <s> determines which action to take depending on whether the current file was </s>
|
funcom_train/12188843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNotANumber() throws ExpressionException {
final Function function = new FloorFunction();
Value result = function.invoke(expressionContextMock, new Value[]{
DoubleValue.NOT_A_NUMBER});
assertTrue(result instanceof DoubleValue);
assertTrue(Double.isNaN(((DoubleValue) result).asJavaDouble()));
}
COM: <s> tests if function works correctly for not a number </s>
|
funcom_train/26212101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int minIgnoreNegativeOnes(int i, int j, int k) {
int[] nbrs = new int[] { i, j, k };
int retVal = Integer.MAX_VALUE;
boolean negativeOne = true;
for (int l = 0; l < 3; l++) {
if (nbrs[l] != -1) {
retVal = Math.min(retVal, nbrs[l]);
negativeOne = false;
}
}
if (negativeOne) {
return -1;
}
return retVal;
}
COM: <s> returns the smallest of the three numbers ignoring values of negative </s>
|
funcom_train/42761520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void outputItemSet(short[] itemSet) {
// Loop through item set elements
if (itemSet == null) System.out.print(" null ");
else {
int counter = 0;
for (int index=0;index<itemSet.length;index++) {
if (counter == 0) {
counter++;
System.out.print(" {");
}
else System.out.print(" ");
System.out.print(itemSet[index]);
}
System.out.print("} ");
}
}
COM: <s> outputs a given item set </s>
|
funcom_train/39535559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEnabled(boolean enable) {
if(this.enable!=enable) {
this.enable=enable;
if(canvas!=null && canvasPaintListener!=null) {
if(enable) {
canvas.addLayerPaintListener(SVGCanvas.TOP_LAYER, canvasPaintListener, true);
}else {
canvas.removePaintListener(canvasPaintListener, true);
}
}
}
}
COM: <s> sets whether this painter is enabled or not </s>
|
funcom_train/34340198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getCantidad4() {
if (cantidad4 == null) {//GEN-END:|41-getter|0|41-preInit
// write pre-init user code here
cantidad4 = new TextField("CANTIDAD", null, 6, TextField.ANY);//GEN-LINE:|41-getter|1|41-postInit
// write post-init user code here
}//GEN-BEGIN:|41-getter|2|
return cantidad4;
}
COM: <s> returns an initiliazed instance of cantidad4 component </s>
|
funcom_train/22053516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getEMail(boolean fcheck_secret) {
if (fcheck_secret && isSecretPC()) {
return DMOptions.getDMEmail();
} else {
if ( (tE_mail.length() == 0) || !fIs_PC) {
return DMOptions.getDMEmail();
} else {
return tE_mail;
}
}
}
COM: <s> returns e mail of character </s>
|
funcom_train/47870442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int currentSegment(double[] coords) {
if (i == 3) return SEG_CLOSE;
Point2D p = getCorner(i);
coords[0] = p.getX();
coords[1] = p.getY();
if (at != null) at.transform(coords, 0, coords, 0, 1);
if (i == 0) return SEG_MOVETO;
else return SEG_LINETO;
}
COM: <s> retrieve current segment with double coordinates </s>
|
funcom_train/36931041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isInside(CCVector2d thePoint, boolean theIsBaryCentric) {
if(!theIsBaryCentric)thePoint = toBarycentricCoordinates(thePoint);
// Check if point is in triangle
return (thePoint.x > 0) && (thePoint.y > 0) && (thePoint.x + thePoint.y < 1);
}
COM: <s> returns true if the given point lies inside the triangle </s>
|
funcom_train/35883400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getBeanNameFromUrlPath(HttpServletRequest request){
String urlPath = URL_PATH_HELPER.getLookupPathForRequest(request);
try {
Matcher m = BEAN_NAME_FROM_URL_PATH.matcher(urlPath);
m.find();
urlPath = m.group(2);
} catch (Exception e) {
throw new RuntimeException("The url path is illegal, cannot complete the request : " + urlPath);
}
return urlPath;
}
COM: <s> update list delete bean name </s>
|
funcom_train/15955292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Context removeContext(int type) {
int liNo = fContexts_No;
for(int i = 0; i < liNo ; i++)
{
Context lC = fContexts[i];
if( lC.getType() == type )
{
System.arraycopy(fContexts,i+1, fContexts,i,1);
fContexts_No--;
return lC;
}
}/*for*/
return null;
}
COM: <s> remove a context based on context type </s>
|
funcom_train/45692144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPositionCurrentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SongPattern_positionCurrent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SongPattern_positionCurrent_feature", "_UI_SongPattern_type"),
EsxPackage.Literals.SONG_PATTERN__POSITION_CURRENT,
false,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the position current feature </s>
|
funcom_train/25663435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IRuleTarget getTarget() {
final IRuleTarget ruleTarget;
final Object o;
if (target != null) {
ruleTarget = target;
} else {
o = getDigester().peek();
if (o != null && o instanceof IRuleTarget) {
ruleTarget = (IRuleTarget) o;
} else {
throw new IllegalStateException("No object found for key " + key);
}
}
return ruleTarget;
}
COM: <s> the target object instance of property setter is either specified </s>
|
funcom_train/26629570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRegisterDuplicateUser() throws AuthorizationException {
User u = getDummyUser();
userBiz.registerUser(u, null);
boolean ok = false;
try {
User u2 = getDummyUser();
userBiz.registerUser(u2, null);
} catch ( AuthorizationException e ) {
assertTrue("AuthExpt with reason 'duplicate login' should be thrown",
AuthorizationException.DUPLICATE_LOGIN == e.getReason());
ok = true;
}
if ( !ok ) {
fail("AuthorizationException with reason 'duplicate login' was not thrown");
}
}
COM: <s> test register duplicate user </s>
|
funcom_train/25523224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJpContent() {
if(jpContent == null) {
jpContent = new JPanel(new BorderLayout());
// Add the tab pane.
jpContent.add(getJpGroupNotice(), BorderLayout.CENTER);
// Create a south panel.
JPanel southPanel = new JPanel(new FlowLayout());
// Add the close button to the south panel.
southPanel.add(getJbClose());
// Add the south panel.
jpContent.add(southPanel, BorderLayout.SOUTH);
}
return jpContent;
}
COM: <s> get the content pane </s>
|
funcom_train/29368503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FtpUser findUserByUserName(String userName) throws IOException{
FtpUser ftpUser = null;
if(TextUtil.isEmpty(userName)){
if(FtpLogger.debug){
logger.debug(" FtpUserAdmin.findUserByUserName () userName is null ");
}
return null;
}
try {
ftpUser= ftpAdminDB.findUserByUserName(userName);
} catch (IOException e) {
logger.warn(e);
throw e;
}
return ftpUser;
}
COM: <s> find the ftp user with the name </s>
|
funcom_train/3619405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTgtIterationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Requirement_tgtIteration_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Requirement_tgtIteration_feature", "_UI_Requirement_type"),
EclipsesrsPackage.Literals.REQUIREMENT__TGT_ITERATION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the tgt iteration feature </s>
|
funcom_train/3990265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWatrobaPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BadanieOkresowe_watroba_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_watroba_feature", "_UI_BadanieOkresowe_type"),
PrzychodniaPackage.Literals.BADANIE_OKRESOWE__WATROBA,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the watroba feature </s>
|
funcom_train/36063207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double addAccount( String sessionIdentifier, String userName, String realName, String password, String emailAddress, boolean unrestricted ) throws NoSessionException, GeneralizedException, InsufficientPermissionException, InputValidationException, UnknownHostException, InvalidLocalPartException, DisallowedOperationException{
return userManager.addAccount( sessionIdentifier, userName, realName, password, emailAddress, unrestricted);
}
COM: <s> create an account with the given parameters for the new users account </s>
|
funcom_train/26139364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String findAllPlayers() throws FileNotFoundException{
FileReader fr = new FileReader("Accounts.txt");
Scanner scan = new Scanner(fr);
String players = new String();
while (scan.hasNext()){
StringTokenizer st = new StringTokenizer(scan.nextLine(), " ");
players += (showPlayerName(st.nextToken()) + " ");
}
scan.close();
return players;
}
COM: <s> returns all of the player names and passwords from the accounts file </s>
|
funcom_train/1087486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int calculateOffsetToIncrement() {
int[] offsets = getOffsets();
for (int i = offsets.length - 1; i >= 0; i--) {
if (offsets[i] < (getObjects().size() - offsets.length + i))
return i;
}
return -1;
}
COM: <s> returns the offset that should be incremented or 1 if there are no </s>
|
funcom_train/37853557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
transact(Lock.READ_LOCK);
try {
if (handle.getDocumentCount(broker) == 0 && handle.getChildCollectionCount(broker) == 0) return;
broker.removeCollection(tx.tx, handle);
createInternal(path);
commit();
} catch (PermissionDeniedException e) {
throw new DatabaseException(e);
} catch (IOException e) {
throw new DatabaseException(e);
} catch (TriggerException e) {
throw new DatabaseException(e);
} finally {
release();
}
changePath(path); // reset stale marker
}
COM: <s> remove all resources and subfolders from this folder but keep the folder itself </s>
|
funcom_train/37217764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validClassLoaderForName(ClassLoader parent, String name) {
if (!isParentRavenClassLoader())
return true;
// the only class of the package net.sf.taverna.raven that isn't part of
// the raven artifact is Log4jLog - which would shouldn't be found here
// anyway
if (name.startsWith("net.sf.taverna.raven")
&& !name.endsWith("Log4jLog"))
return true;
return false;
}
COM: <s> temporary patch to prevent a urlclass loader used to bootstrap taverna </s>
|
funcom_train/7635376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadTile(int key, Drawable tile) {
Bitmap bitmap = Bitmap.createBitmap(mTileSize, mTileSize, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
tile.setBounds(0, 0, mTileSize, mTileSize);
tile.draw(canvas);
mTileArray[key] = bitmap;
}
COM: <s> function to set the specified drawable as the tile for a particular </s>
|
funcom_train/50187038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showStylesheets(String path) {
File rootdoc = new File(path);
StringBuffer files = new StringBuffer();
log.info("\ncurrent rootdoc = " + new File("").getAbsolutePath());
String suffix = ".stx";
printAllDocuments(rootdoc, suffix, files);
// update shell
DebugManager.updateShell(files.toString());
}
COM: <s> this method displays all available transformation sheets </s>
|
funcom_train/34339523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTextFieldPedido() {
if (textFieldPedido == null) {//GEN-END:|33-getter|0|33-preInit
// write pre-init user code here
textFieldPedido = new TextField("Pedido", null, 32, TextField.ANY);//GEN-LINE:|33-getter|1|33-postInit
// write post-init user code here
}//GEN-BEGIN:|33-getter|2|
return textFieldPedido;
}
COM: <s> returns an initiliazed instance of text field pedido component </s>
|
funcom_train/45186748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(TapeArchive archive) {
// if (!getType().equals(archive.getType())) throw new IllegalArgumentException ("Can only append archives of same type!");
for (int i = 0; i < archive.getNumEntries(); i++) {
addEntry(archive.getEntry(i));
}
}
COM: <s> append entries from another archive </s>
|
funcom_train/13391149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeDiscovery(DiscoveryManagement discoManagement) throws IOException {
serviceDiscoveryManager = new ServiceDiscoveryManager(discoManagement, null);
// create a service cache with the service template
cache = serviceDiscoveryManager.createLookupCache(null, null, this);
logger.info("--- jini discovery started with jsb disco management --- ");
}
COM: <s> initialize the discovery background thread </s>
|
funcom_train/13682888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RelationView createRelationView(String name, int x, int y, Relation relation, ArrayList cardViews, ArrayList entViews) {
String defaultName = "";
RelationView relView = null;
if (name==""){
defaultName = nameAnonyme();
}
else{
defaultName = name;
}
relView = new RelationView(defaultName, x, y, relation, cardViews, entViews);
return relView;
}
COM: <s> create new relation </s>
|
funcom_train/19697814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeTouchTypeMap(TouchType[] touchTypeMap) {
if(touchTypeMap.length != this.touchTypeMap.length) {
throw new IllegalArgumentException("Array size does not match with Frame size");
}
System.arraycopy(touchTypeMap, 0, this.touchTypeMap, 0, this.touchTypeMap.length);
}
COM: <s> update the frame with new touch types </s>
|
funcom_train/31930950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void makeTitledGrid(JPanel panel, int rows, int cols, String title) {
squeezePane(panel, rows, cols, 0, 0, 6, 2);
panel.setBorder(BorderFactory.createTitledBorder(BorderFactory
.createLineBorder(Color.GRAY, 1), title));
}
COM: <s> force the code panel code into a tight grid bordered with the specified </s>
|
funcom_train/15930845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParallelDoubleArray removeAll(DoublePredicate selector) {
DFPap v = new DFPap(ex, 0, fence, array, selector);
PAS.FJRemoveAllDriver f = new PAS.FJRemoveAllDriver(v, 0, fence);
ex.invoke(f);
removeSlotsAt(f.offset, fence);
return this;
}
COM: <s> removes from the array all elements for which the given </s>
|
funcom_train/2324934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOmega(float omegaF, float omegaR) {
if (omegaF < 0 || omegaF > 2)
throw new IllegalArgumentException("omegaF must be between 0 and 2");
if (omegaR < 0 || omegaR > 2)
throw new IllegalArgumentException("omegaR must be between 0 and 2");
this.omegaF = omegaF;
this.omegaR = omegaR;
}
COM: <s> sets the overrelaxation parameters </s>
|
funcom_train/51296524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Storage getStorage() {
Storage st = parent != null ? parent.getStorage() : null;
if (st == null) {
if (storage == null && storageId > 0) {
try {
storage = (Storage) WorkplaceFactory.getInstance().get(
storageId);
} catch (ErrorHandler e) {
e.printStackTrace();
storageId = 0;
}
}
st = storage;
}
return st;
}
COM: <s> stock that is linked to menu instance or parents menu instance </s>
|
funcom_train/32730238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void constructEmbeddedObjectsAfterFetch(PersistentObject aPO, List embeddedObjectsToFetch) {
Iterator iterator = embeddedObjectsToFetch.iterator();
while (iterator.hasNext()) {
EmbeddedPersistentObjectHandler handler = (EmbeddedPersistentObjectHandler) iterator.next();
if (handler.getConstructObjectContext() == EmbeddedPersistentObjectHandler.CONSTRUCT_CONTEXT_AFTER_ALL_ROWS) {
handler.constructObjects(aPO);
}
}
}
COM: <s> converts embedded objects base after all rows fetched context </s>
|
funcom_train/2958402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNextValue(int x) {
IStateBinaryTree.Node n = btree.nextNode(x);
if (n == null) {
return Integer.MAX_VALUE;
} else if (n.contains(x + 1)) {
return x + 1;
} else {
return n.getInf();
}
}
COM: <s> gets the next value of x in this domain </s>
|
funcom_train/11663258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getBooleanAttribute(String name, boolean defValue) {
try {
String attr = getAttribute(name, defValue ? "1" : "0").toLowerCase();
return "[true][yes][1][y][on]".indexOf("[" + attr + "]") != -1;
} catch (Exception e) {
return defValue;
}
}
COM: <s> get boolean attribute returns an attribute from the configuration node </s>
|
funcom_train/15563403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assignOperation(Operation op){
for (int walk = op.getScheduledStartTime(); walk < op.completionTime(); walk++) {
int walk_op = 0;
while (this.operations[walk][walk_op] != null) {
walk_op++;
}
this.operations[walk][walk_op] = op.getOpId().id;
this.availableResourceCount[walk] -= op.getResourceDemand();
}
}
COM: <s> assign the operation to resource and update the resource availability </s>
|
funcom_train/6413100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JoglCanvas initJogl() {
final JoglCanvasRenderer canvasRenderer = new JoglCanvasRenderer(this);
final DisplaySettings settings = new DisplaySettings(800, 600, 24, 0, 0, 8, 0, 0, false, false);
return new JoglCanvas(canvasRenderer, settings);
}
COM: <s> setup a jogl canvas and canvas renderer </s>
|
funcom_train/3514686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAccept() throws IOException {
final FileFilter filter = new RegExpFileFilter("temp.txt", new File("files"));
assertTrue(filter.accept(new File("files/temp.txt")));
assertFalse(filter.accept(new File("fillets/temp.txt")));
}
COM: <s> try a couple of simple regexps </s>
|
funcom_train/13275717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeCamera() {
String now = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM).format(new Date());
String name = getView().showStoreCameraDialog(now);
if (name != null) {
getHomeController3D().storeCamera(name);
}
}
COM: <s> prompts a name for the current camera and stores it in home </s>
|
funcom_train/3526445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Connection getCurrentConnection() throws ServiceAccessException {
getLogger().log("Getting current connection for thread " + Thread.currentThread(), LOG_CHANNEL, Logger.DEBUG);
TransactionId id = getActiveTransactionContext();
if (id == null) {
getLogger().log("No id for current thread - called outside transaction?", LOG_CHANNEL, Logger.DEBUG);
return null;
}
return id.connection;
}
COM: <s> get the connection object associated with the current transaction </s>
|
funcom_train/49665265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void defineCard() {
card =
new CardFigure( new Point(TarguiViewDefinition.TRIBE_CARD_OFFSET_X,
TarguiViewDefinition.TRIBE_CARD_OFFSET_Y) );
addFigureToContents(card);
// Initialize card with current color
if (game.getPlayerInTurn() != null) {
card.changeToValue(game.getPlayerInTurn().getColor());
}
}
COM: <s> define the card </s>
|
funcom_train/36720543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LispNode getf(String key) {
for (int i=0; i<params.size(); ++i) {
LispNode kid = params.get(i);
if (kid.value.equalsIgnoreCase(key)) {
LispNode res = this.get(i+1);
if( res.value.equals("'")){
res = this.get(i+2);
}
return res;
} else if (kid.params.size() > 0) {
LispNode grandKid = kid.get(0);
if (grandKid.value.equalsIgnoreCase(key)) {
return kid.get(1);
}
}
}
return new LispNode();
}
COM: <s> treats this node as a plist </s>
|
funcom_train/18744205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String toEscaped(String string, Set<Character> specialChars) {
StringBuffer result = new StringBuffer();
for (char c : string.toCharArray()) {
// insert an ESCAPE in front of quotes or ESCAPES
if (c == ESCAPE_CHAR || specialChars.contains(c)) {
result.append(ESCAPE_CHAR);
}
result.append(c);
}
return result.toString();
}
COM: <s> transforms a string by escaping all characters from of a given set </s>
|
funcom_train/3081838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireTreeCollapsed(TreePath path) {
Object[] listeners = getEventListenerList().getListeners(TreeExpansionListener.class);
TreeExpansionEvent e = null;
for (int index = 0; index < listeners.length; ++index) {
if (e == null)
e = new TreeExpansionEvent(this, path);
((TreeExpansionListener) listeners[index]).treeCollapsed(e);
}
}
COM: <s> notify all listeners that have registered interest for notification on </s>
|
funcom_train/9298636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void minimize(String name) throws ConnectorConfigException{
for (int i=0; i<text.size(); i++){
ConnectorField field = text.get(i);
if (field.name.equals(name)){
this.text = new ArrayList<ConnectorField>();
this.text.add(new ConnectorField(name,"value"));
this.data = new ArrayList<ConnectorField>();
this.data.add(new ConnectorField(name,"value"));
return;
}
}
throw new ConnectorConfigException("Incorrect dataset minimization, master field not found.");
}
COM: <s> minimize configuration by removing unused fields </s>
|
funcom_train/3711029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUnits (Units units) throws IllegalArgumentException {
enumeration = getSpectrumList();
while (enumeration.hasMoreElements()) {
id = enumeration.nextElement();
Spectrum spectrum = getSpectrum(id);
spectrum.setUnits (units);
}
if (notify) {
setChanged();
notifyObservers();
}
}
COM: <s> stores current physical units in currently selected array </s>
|
funcom_train/18051090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public KeydbEntry getEntryByIndex(int groupId, int index) throws KeydbLockedException {
passLock();
for(int i = 0; i < header.numEntries; ++i) {
if ((this.entriesGids[i] == groupId) && (this.entriesMeta[i] == 0)) {
if (index > 0) --index;
else {
KeydbEntry entry = new KeydbEntry(this);
entry.read(this.entriesOffsets[i], i);
return entry;
}
};
}
return null;
}
COM: <s> get entry by index in group </s>
|
funcom_train/12189333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Thread getThread(final URL inputURL, final URL expectedURL) {
Thread thread = new Thread() {
public void run() {
try {
doTest(new TestPipelineFactory(),
inputURL,
expectedURL);
} catch (Exception exc) {
exc.printStackTrace();
errorMsg = "Unexpected Exception encountered: " + exc;
}
}
};
return thread;
}
COM: <s> get a thread that runs the pipeline process </s>
|
funcom_train/13773430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getBoolParm(int parm) throws WrongLPX {
ensureLPXCreated();
if (!Param.isValidBoolParam(parm)) {
throw new IllegalArgumentException("GetBoolParm: " + "unknown parameter: " + parm);
}
return native_get_int_parm(id, Param.getParam(parm));
}
COM: <s> return the value of the given real valued parameter </s>
|
funcom_train/10628627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNegPos() {
String numA = "-27384627835298756289327365";
String numB = "0";
String res = "-27384627835298756289327365";
BigInteger aNumber = new BigInteger(numA);
BigInteger bNumber = new BigInteger(numB);
BigInteger result = aNumber.xor(bNumber);
assertTrue(res.equals(result.toString()));
}
COM: <s> xor for a negative number and zero </s>
|
funcom_train/20640511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPassword() {
//return passwordTextField.getText();
char[] pass = passwordTextField.getPassword();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < pass.length; i++) {
sb.append(pass[i]);
}
return sb.toString();
}
COM: <s> get password value </s>
|
funcom_train/32759296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void display(WireScanner.ProfileAttrSet setSigPrps) {
for (WireScanner.Data.ANGLE angle : WireScanner.Data.ANGLE.values()) {
SingleProfileDisplay pnlPrpDspl = this.mapPrj2Dspl.get(angle);
WireScanner.ProfileAttrs datSigPrps = setSigPrps.getSignalTraits(angle);
pnlPrpDspl.display(datSigPrps);
}
}
COM: <s> displays the signal properties of the various projections </s>
|
funcom_train/5246062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAgent(AILAgent a) {
agents.add(a);
ArrayList<GoalMessage> msgl = new ArrayList<GoalMessage>();
if (agMessages.get(a.getAgName()) == null) {
agMessages.put(a.getAgName(), msgl);
}
if (agPercepts.get(a.getAgName()) == null) {
VerifySet<Predicate> agl = new VerifySet<Predicate>();
agPercepts.put(a.getAgName(), agl);
}
}
COM: <s> add an agent to the list the environment knows about </s>
|
funcom_train/13598658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Token loadToken(long tokenId) {
try {
Token token = (Token) session.load(Token.class, new Long(tokenId));
return token;
} catch (Exception e) {
e.printStackTrace(); log.error(e);
jbpmSession.handleException();
throw new JbpmException("couldn't load token '" + tokenId + "'", e);
}
}
COM: <s> loads a token from the database by the identifier </s>
|
funcom_train/50802039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List getDefectableTargets(String userName) {
ArrayList houses = new ArrayList();
for (Iterator it = CampaignMain.cm.getData().getAllHouses().iterator(); it.hasNext();) {
House h = (House)it.next();
if (canDefectToHouse(userName, h.getName()) == null)
houses.add(h.getName());
}
return houses;
}
COM: <s> return a list of all targets this player could defect to </s>
|
funcom_train/28752907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setClienteditable(Long newVal) {
if ((newVal != null && this.clienteditable != null && (newVal.compareTo(this.clienteditable) == 0)) ||
(newVal == null && this.clienteditable == null && clienteditable_is_initialized)) {
return;
}
this.clienteditable = newVal;
clienteditable_is_modified = true;
clienteditable_is_initialized = true;
}
COM: <s> setter method for clienteditable </s>
|
funcom_train/13220886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPieceLength (int piece) {
int length = getLength();
if (piece >= 0 && piece < length - 1) {
return getPieceLength();
}
else if (piece == length - 1) {
return (int) (length - piece * pieceLength);
}
else {
throw new IndexOutOfBoundsException("no piece: " + piece);
}
}
COM: <s> return the length of a piece </s>
|
funcom_train/784016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void log(Level logLevel, String msg, Throwable thrown) {
if (internalIsLoggable(logLevel)) {
LogRecord record = new LogRecord(logLevel, msg);
record.setLoggerName(this.name);
record.setThrown(thrown);
setResourceBundle(record);
log(record);
}
}
COM: <s> logs a message of the specified level with the supplied </s>
|
funcom_train/50543365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDisconnectConnectOne_TUNNEL() throws Exception {
String props=getTUNNELProps(startRouter(), startGossipServer());
channel=new JChannel(props);
channel.connect("testgroup1");
channel.disconnect();
channel.connect("testgroup2");
View view=channel.getView();
assertEquals(1, view.size());
assertTrue(view.containsMember(channel.getLocalAddress()));
}
COM: <s> tests connect disconnect connect sequence for a group with one member </s>
|
funcom_train/48748756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hashtable getTextElements() {
Hashtable textElements = new Hashtable();
String oneKey = null;
for (Enumeration ee = myParser.keys(); ee.hasMoreElements(); ) {
oneKey = (String) ee.nextElement();
if (!myParser.hasFileItem(oneKey)) {
textElements.put(oneKey, myParser.get(oneKey));
}
}
return textElements;
}
COM: <s> this method is called on to retrieve all the text </s>
|
funcom_train/25707000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getDownloadingBoardCount() {
int downloadingBoards = 0;
synchronized( runningDownloadThreads ) {
final Iterator i = runningDownloadThreads.values().iterator();
while( i.hasNext() ) {
final Object o = i.next();
if( o instanceof Vector ) {
final Vector v = (Vector) o;
if( v.size() > 0 ) {
downloadingBoards++;
}
}
}
}
return downloadingBoards;
}
COM: <s> returns the count of boards that currently have running download threads </s>
|
funcom_train/28371572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getOpenBrowserR2Q2() {
if (OpenBrowserR2Q2 == null) {
OpenBrowserR2Q2 = new JButton();
OpenBrowserR2Q2.setText("Open R2Q2 in a browser window");
OpenBrowserR2Q2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
BareBonesBrowserLaunch.openURL("http://127.0.0.1:"+port+"/r2q2");
}
});
}
return OpenBrowserR2Q2;
}
COM: <s> this method initializes open browser r2 q2 </s>
|
funcom_train/21346080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double selectSaValue(BrendaEnzyme enzyme) {
double value = 0;
List<SaValue> saValues = enzyme.getSaValues();
List<Double> validValues = new ArrayList<Double>();
for (SaValue saValue : saValues) {
String svalue = saValue.getValue();
try {
double dvalue = Double.valueOf(svalue);
if (dvalue > 0) {
validValues.add(dvalue);
}
} catch (NumberFormatException e) {
}
}
if (validValues.size() > 0) {
value = median(validValues);
}
return value;
}
COM: <s> selects a specific activity value from an enzyme </s>
|
funcom_train/16816640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit() throws IOException {
ObjectOutputStream oo= new ObjectOutputStream(new FileOutputStream(name+PWD_EXT));
oo.writeObject(passwordMap);
oo.close();
oo= new ObjectOutputStream(new FileOutputStream(name+DB_EXT));
oo.writeObject(principals);
oo.close();
}
COM: <s> saves all changes made to the database </s>
|
funcom_train/20727647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processUserStatus(IMessage inMessage) {
// check if user is still loged on
if (serverState.getUserByThread(this) != null) {
// userStatusChange and send it to all users
User user = serverState.getUserByThread(this);
user.setStatus((String) inMessage.getParameter("userstatus"));
serverState.updateUserInMap(user);
xsThreadMaster.sendMessageToAll(new UserUpdateMessage(user));
}
}
COM: <s> processing user status message </s>
|
funcom_train/24469970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int wbNullE1(Tree t,String e, int start, boolean e1){
if(t.value().startsWith(e)){
if(e1) return start+t.getLeaves().size();
else return start;
}
else{
if(t.isPreTerminal() || t.isLeaf()){
return -1;
}
else{
int i = start;
for(Tree c : t.getChildrenAsList()){
int out = wbNullE1(c,e,i,e1);
if(out!=-1) return out;
i+=c.getLeaves().size();
}
}
}
return -1;
}
COM: <s> delivers the end of e1 or the start of e2 </s>
|
funcom_train/7389266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cellLabelChanged(Object cell, Object value, boolean autoSize) {
model.beginUpdate();
try {
getModel().setValue(cell, value);
if (autoSize) {
cellSizeUpdated(cell, false);
}
}
finally {
model.endUpdate();
}
}
COM: <s> sets the new label for a cell </s>
|
funcom_train/1406472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFillAreaMarker(final FillAreaType fillAreaType, final Color color, final int startLineIndex, final int endLineIndex) {
getParameter(ChartMarkersParameter.class).addFillAreaMarker(fillAreaType, color, startLineIndex, endLineIndex);
}
COM: <s> adds the fill area marker </s>
|
funcom_train/37116025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkIndexExists(int index) {
if (index < 0) {
throw new ArrayIndexOutOfBoundsException(
"Index less than zero: " + index + " < 0");
}
if (index >= size()) {
throw new ArrayIndexOutOfBoundsException(
"Index greater than/equal to size(): " + index + " >= " + size());
}
}
COM: <s> checks whether an index is valid or not </s>
|
funcom_train/8579290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSqlLogicalOperator(CompoundFilter.LogicalOperator operator) {
String stringOperator;
switch (operator) {
case AND:
stringOperator = "AND";
break;
case OR:
stringOperator = "OR";
break;
default:// Should never get here.
throw new RuntimeException("Logical operator was not found: " + operator);
}
return stringOperator;
}
COM: <s> returns the sql operator of the given compound filter </s>
|
funcom_train/6442658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(TestResult result) {
try{
setUp();
for (Enumeration e= tests(); e.hasMoreElements(); ) {
if ( result.shouldStop() ) break;
Test test= (Test)e.nextElement();
test.run(result);
}
tearDown();
} catch (Exception e) {
result.addError(this, e);
}
}
COM: <s> runs the tests and collects their result in a test result </s>
|
funcom_train/42089392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addKeyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EStringToStringMapEntry_key_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EStringToStringMapEntry_key_feature", "_UI_EStringToStringMapEntry_type"),
DecModelPackage.Literals.ESTRING_TO_STRING_MAP_ENTRY__KEY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the key feature </s>
|
funcom_train/33927390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void injectDependencies() throws Exception {
Assert.state(getApplicationContext() != null,
"injectDependencies() called without first configuring an ApplicationContext");
if (isPopulateProtectedVariables()) {
if (this.managedVariableNames == null) {
initManagedVariableNames();
}
populateProtectedVariables();
}
getApplicationContext().getBeanFactory().autowireBeanProperties(this, getAutowireMode(), isDependencyCheck());
}
COM: <s> inject dependencies into this instance that is this test instance </s>
|
funcom_train/46383185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getTotalSize() throws SQLException {
synchronized (stmtComputeTotalSize) {
/* Do the SQL statement to compute the sum */
stmtComputeTotalSize.clearParameters();
ResultSet result = stmtComputeTotalSize.executeQuery();
/* Fetch the one result, which should be the sum */
if (result.next() == true) {
long size = result.getLong(0);
return size;
}
}
return 0;
}
COM: <s> computes and returns the sum of all of the assets </s>
|
funcom_train/9829436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getHeight() {
int height;
if (_children.size() == 0)
return _y;
TreeBrowserNode btNode = (TreeBrowserNode)_children.elementAt( _children.size() - 1 );
height = btNode._y + btNode.getChildSize()*DEFAULT_DIMENSION;
return height;
} // end method getHeight
COM: <s> gets the preferred height of this node and all of its children </s>
|
funcom_train/885054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getSelectionState() {
if (fContainer instanceof JTextComponent) {
int p0 = getElement().getStartOffset();
int p1 = getElement().getEndOffset();
JTextComponent textComp = (JTextComponent) fContainer;
int start = textComp.getSelectionStart();
int end = textComp.getSelectionEnd();
if (start <= p0 && end >= p1) {
if (start == p0 && end == p1 && isEditable())
return 2;
else
return 1;
}
}
return 0;
}
COM: <s> determines whether the image is selected and if its the only thing </s>
|
funcom_train/30005460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Icon getIcon() {
URL url = MainMenu.class.getResource(MainMenu.GOTO_ICON);
if (url != null) {
return new ImageIcon(url);
}
else {
MainController.getInstance().handleException(new IconNotFoundException("The icon '" + MainMenu.GOTO_ICON +
"' was not found or is not readable."));
return null;
}
}
COM: <s> returns an icon for this plugin </s>
|
funcom_train/44880658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLocalJndiName(JavaClass clazz) {
String jndiName = ejbUtils.getNamedParameter(
(AbstractJavaEntity)clazz, "ejb.bean", "local-jndi-name", null);
if (jndiName == null) jndiName = ejbUtils.getJndiName(clazz, EjbUtils.LOCAL);
return jndiName;
}
COM: <s> returns the local jndi name of the given bean reading the </s>
|
funcom_train/22206308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getMergeMapAddedThemes(Locator mapLocator) {
if (m_provider.isTransactionOpen()) {
return getMergeMapAddedThemes(m_provider.getOpenTransaction(),
mapLocator);
} else {
ProviderTransaction txn = m_provider.openTransaction();
Set ret = getMergeMapAddedThemes(txn, mapLocator);
txn.rollback();
return ret;
}
}
COM: <s> returns the collection of themes to be added to the external </s>
|
funcom_train/40874064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addGraphicalRoles() {
Iterator i = graphicalRoot.getChildren(XMLObjectName.GRAPHICAL_ROLE).iterator();
// Parse all graphical role nodes
while (i.hasNext()) {
Element current = (Element) i.next();
String roleReference = current.getChild(XMLObjectName.ROLE_REFERENCE).getAttributeValue(XMLObjectName.REFERENCE);
PointList list = createPointList(current);
graphicalInformations.put(roleList.get(roleReference), list);
}
}
COM: <s> add all graphical informations about roles into the graphical informations </s>
|
funcom_train/3282455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GridSquare getSquare (int x, int y) {
// test for out of bounds
if(x < 0 || x >= this.sizeX || y < 0 || y >= this.sizeY) {
Log.error(this, "Grid.GridSquare(x,y) out of bounds");
return null;
}
return (GridSquare) ((ArrayList)gridSquares.get(x)).get(y);
}
COM: <s> returns the grid square at the specified cordinates </s>
|
funcom_train/18745514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean updateMat(Materialisation mat, Solution sol) {
boolean result = false;
switch (this.stage) {
case 1:
result = this.updateMatFirstStage(mat, sol);
break;
case 2:
result = this.updateMatSecondStage(mat, sol);
break;
case 3:
result = this.updateMatThirdStage(mat, sol);
break;
default:
assert false;
}
return result;
}
COM: <s> updates the given materialisation object using the given solution </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.