__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/23216865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addGroupNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Group_groupName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Group_groupName_feature", "_UI_Group_type"),
ContractPackage.Literals.GROUP__GROUP_NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the group name feature </s>
|
funcom_train/50846168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetFetchDirection() throws Exception {
// default direction for every driver should be FETCH_FORWARD
// TODO: sets and gets with corresponding check of getWarnings
Statement stmt = newStatement();
int expResult = ResultSet.FETCH_FORWARD;
int result = stmt.getFetchDirection();
assertEquals(expResult, result);
}
COM: <s> test of get fetch direction method of interface java </s>
|
funcom_train/7502385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
cmdBack = new Command(PacManMIDlet.LABEL_CMD_BACK, Command.EXIT, 1);
addCommand(cmdBack);
setCommandListener(this);
SocketClientManager manager=new SocketClientManager(mainApp.getServerURL(), mainApp);
manager.downloadMaze(mazename);
}
COM: <s> initializes the screen </s>
|
funcom_train/16578835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getJRadioBtnReverseDirection() {
if (jRadioBtnReverseDirection == null) {
jRadioBtnReverseDirection = new JRadioButton();
jRadioBtnReverseDirection.setBounds(new Rectangle(15, 53, 180, 23));
jRadioBtnReverseDirection.setText(_T("Reverse_direction"));
jRadioBtnReverseDirection.setSelected(false);
}
return jRadioBtnReverseDirection;
}
COM: <s> this method initializes j radio btn reverse direction </s>
|
funcom_train/40669402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifySuperTypesOf(JClassType me) {
// TODO(scottb): revisit
if (superclass != null) {
superclass.acceptSubtype(me);
}
for (int i = 0, n = interfaces.size(); i < n; ++i) {
JClassType intf = interfaces.get(i);
intf.acceptSubtype(me);
}
}
COM: <s> tells this types superclasses and superinterfaces about it </s>
|
funcom_train/11792810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String updateForBundledZip() throws Exception {
logger.debug("updateForBundledZip started");
FileHelper.getInstance().addFilesToZip(createZipFile(),
createFilesToZipFromFileList(),
ClientProperties.getInstance().getWorkingDirectory());
Update request = new Update();
request.setAA(createAATypeForBundledZip());
String strEpr = executeUpdate(request);
logger.debug("updateForBundledZip finished");
return strEpr;
}
COM: <s> implements an update operation for the bundled zip transport type </s>
|
funcom_train/40026638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void waitForUserInput() {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
removeAll();
add(continueButton);
validate();
repaint();}
});
Set<Action> allowedActions = new HashSet<Action>();
allowedActions.add(Action.CONTINUE);
getUserInput(allowedActions);
}
COM: <s> waits for the user to click the continue button </s>
|
funcom_train/46741126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShortDisplay(String shortDisplay) {
if (Converter.isDifferent(this.shortDisplay, shortDisplay)) {
String oldshortDisplay= null;
oldshortDisplay = this.shortDisplay;
this.shortDisplay = shortDisplay;
setModified("shortDisplay");
firePropertyChange(String.valueOf(REFLOGS_SHORTDISPLAY), oldshortDisplay, shortDisplay);
}
}
COM: <s> shorter display for reference code display if applicable </s>
|
funcom_train/27747743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setControl (Control control) {
checkWidget ();
Control oldControl = this.control, newControl = control;
this.control = control;
int index = parent.indexOf (this);
if (index != parent.getSelectionIndex ()) {
if (newControl != null) newControl.setVisible (false);
return;
}
if (newControl != null) {
newControl.setBounds (parent.getClientArea ());
newControl.setVisible (true);
}
if (oldControl != null) oldControl.setVisible (false);
}
COM: <s> sets the control that is used to fill the client area of </s>
|
funcom_train/44813213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadApplicationProperties(Properties properties) throws ApplicationException {
try {
if (properties == null) {
return;
}
if ("true".equals(properties.getProperty("is-external-config"))) {
AppEnvironment.setExternalConfigFile(true);
}
// Set application manager
AppEnvironment.setApplicationManagerClass(properties.getProperty("application-manager"));
// Set system properties
AppEnvironment.setProperties(properties);
} catch (Exception ex) {
throw new ApplicationException(ex);
}
}
COM: <s> load application properties </s>
|
funcom_train/11322515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRedirectWherePageAndContextPathAreTheSame() {
MockContainer container = new MockContainer("web");
container.start();
container.getRequest().setMethod("GET");
container.testPage(RedirectToSelfPage.class);
assertEquals(RedirectToSelfPage.class.getName(), container.getRedirectPageClass().getName());
container.stop();
}
COM: <s> test that page </s>
|
funcom_train/3374626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initSelections(int p0, int p1) {
int viewPosCount = p1 - p0 + 1;
if (selections == null || viewPosCount > selections.length) {
selections = new byte[viewPosCount];
return;
}
for (int i = 0; i < viewPosCount; selections[i++] = 0);
}
COM: <s> lazily initializes the selections field </s>
|
funcom_train/25965585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void seek(int offset) throws IOException {
reset();
int actual = skipBytes(offset);
if (actual != offset) {
throw new IllegalStateException("Skip(" + offset + ") only skipped " +
actual + " bytes");
}
if (false) System.out.println("(seek " + offset + ")");
}
COM: <s> seek to the given offset </s>
|
funcom_train/46621535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected OutputStream getOutputStream() throws IOException {
if (AggregateTransformer.FRAMES.equals(caller.format)) {
// dummy output for the framed report
// it's all done by extension...
return new ByteArrayOutputStream();
} else {
return new BufferedOutputStream(new FileOutputStream(new File(caller.toDir, "junit-noframes.html")));
}
}
COM: <s> get the appropriate stream based on the format frames noframes </s>
|
funcom_train/31652027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document marshall(InputStream data) throws DataSourceException {
try{
HL7ParserConfig parserConfig = new HL7ParserConfig(super.getProperties());
DOMParser p = new DOMParser(parserConfig);
p.parse(new InputSource(data));
return p.getDocument();
}
catch (Exception e){
throw new DataSourceException(e);
}
}
COM: <s> method for transforming a stream of data into a dom object </s>
|
funcom_train/1443268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(AuralInfo info) {
if (info instanceof PlayModeInfo) {
this.myFactBase.update(info);
PlayModeInfo pmi = (PlayModeInfo) info;
this.playMode = pmi.getPlayModeType();
if (this.playMode == PLAY_MODE.GOAL_OTHER) {
this.oppGoals++;
}
if (this.playMode == PLAY_MODE.GOAL_OWN) {
this.ownGoals++;
}
}
}
COM: <s> the code update code method for aural information changes </s>
|
funcom_train/14237923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeSweetSpotsOutsideBounds(Collection spots, Rectangle bounds) {
//the way Line2D works with bounds is different, they add an extra pixel to the size
Rectangle fixedBounds = new Rectangle(bounds.x, bounds.y, bounds.width - 1, bounds.height - 1);
Iterator i = spots.iterator();
while(i.hasNext()) {
SweetSpot ss = (SweetSpot)i.next();
if(! ss.intersects(fixedBounds))
i.remove();
}
}
COM: <s> remove sweet spots from the given collection that are </s>
|
funcom_train/21982790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JBarcode createPostNet(){
JBarcode jbc = new JBarcode(PostNetEncoder.getInstance(), HeightCodedPainter.getInstance(), BaseLineTextPainter.getInstance());
jbc.setBarHeight(6);
try {
jbc.setXDimension(0.264583333);
} catch (InvalidAtributeException e) {}
jbc.setShowText(false);
jbc.setCheckDigit(true);
jbc.setShowCheckDigit(false);
return jbc;
}
COM: <s> creates a new jbarcode instance to post net barcode type </s>
|
funcom_train/34190755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String callToString(final Method method, final Object... objects) {
return String.format("%s.%s(%s)", getType().getName(), method.getName(), (objects == null) ? "" : Lists.newArrayList(objects));
}
COM: <s> stringifies a method invocation in the form class </s>
|
funcom_train/5721875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String i18n(String key) {
String message;
try {
message = getBundle().getString(key);
} catch (java.util.MissingResourceException mre) {
logger.warn("Missing key for '" + key + "'");
return "[?" + key + "?]";
} catch (NullPointerException ex) {
return "[?" + key + "(bundle not found) ?]";
}
return message;
}
COM: <s> convenience method to get a string from the resources </s>
|
funcom_train/5028354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTuesdayValue(int minutes) {
IElementWrapper iew = this.getParentWrapper();
if (iew instanceof PersonWrapper) {
PersonWrapper personWrapper = (PersonWrapper) iew;
getAvailabilityRecord().setTuesdayValue(minutes);
persisting(personWrapper);
}
if (iew instanceof OrganizationWrapper) {
OrganizationWrapper organizationWrapper = (OrganizationWrapper) iew;
getAvailabilityRecord().setTuesdayValue(minutes);
persisting(organizationWrapper);
}
}
COM: <s> set the availability in minutes on tuesday </s>
|
funcom_train/14069678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(final ModuleID id,final ModuleCommand command,final int level) {
try {
Env.getInterface().sendModuleCommand(id,command,level);
}
catch (OOHomeException e) {
UITools.errorDialog(e.getLocalizedMessage());
}
}
COM: <s> executes a direct command </s>
|
funcom_train/10390234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void invokePlugin(Node.CustomTag n) {
TagPlugin tagPlugin = tagPlugins.get(n.getTagHandlerClass().getName());
if (tagPlugin == null) {
return;
}
TagPluginContext tagPluginContext = new TagPluginContextImpl(n, pageInfo);
n.setTagPluginContext(tagPluginContext);
tagPlugin.doTag(tagPluginContext);
}
COM: <s> invoke tag plugin for the given custom tag if a plugin exists for </s>
|
funcom_train/41162649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(MaUser entity) {
EntityManagerHelper.log("saving MaUser instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved ma user entity </s>
|
funcom_train/18166021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newCDF() {
if (viewer.contains(DEFAULT_NEW)) {
viewer.select(DEFAULT_NEW);
return;
}
ICDF immutable = cdParser.create();
//MutableCDF cdfData = new MutableCDF(immutable);
IMutableCDData cdfData = cdModeler.newCDModel(immutable);
cdfData.setVersion("1.0"); // reasonable default.
CDFScope cs = new CDFScope(cdfData);
// add to our list.
viewer.add(DEFAULT_NEW, cs);
// ensure we activate when needed.
trm.setEnabled(viewer.size() > 0);
}
COM: <s> user has requested to create a new cd file </s>
|
funcom_train/38773325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFormattedTextField createFormattedTextField(int mode) {
Object initialValue = Integer.valueOf(42);
boolean focusLocked = mode == COMMIT_OR_LOCK;
JFormattedTextField field = new JFormattedTextField(initialValue);
field.setFocusLostBehavior(focusLocked
? JFormattedTextField.COMMIT
: mode);
if (focusLocked) {
field.setInputVerifier(new FormattedTextFieldVerifier());
}
return field;
}
COM: <s> creates and return a formatted text field with the specified </s>
|
funcom_train/14156877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private CurFileAdvertisement forgeCurFileAdvertisement(String reqID, String endOrStart) {
CurFileAdvertisement adv = (CurFileAdvertisement)
AdvertisementFactory.newAdvertisement(CurFileAdvertisement.getAdvertisementType());
adv.setPeerID(peerGroupRef.getPeerID().toString());
adv.setReqID(reqID);
adv.setEndOrStart(endOrStart);
return adv;
}
COM: <s> forge an adv indicating the start end of a request </s>
|
funcom_train/11023561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructor_5() {
// ------------- Construct using specified Locale --------
converter = new BigDecimalLocaleConverter(localizedLocale, true);
// Perform Tests
convertValueNoPattern(converter, localizedDecimalValue, expectedValue);
convertValueWithPattern(converter, localizedDecimalValue, localizedDecimalPattern, expectedValue);
convertInvalid(converter, null);
convertNull(converter, null);
}
COM: <s> test converter locale loc pattern constructor </s>
|
funcom_train/26626438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GDNInf bindToObject(String name) throws GlobeException {
try {
// bind to object and get interface
SOI soi = globe.bindTo(pkg);
GDNInf gdn = new GDNInf(pkg, soi);
return gdn;
} catch (ObjectNotFoundException e) {
throw new GlobeException(e);
} catch (BindingException e) {
throw new GlobeException(e);
}
}
COM: <s> bind to a gdn package </s>
|
funcom_train/37017568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addInLayout(Component component, int gridY, int gridX, int fill, int gridWidth, int gridHeight, int anchor, int weightX, int weightY){
GridBagConstraints constraints= new GridBagConstraints();
constraints.gridx= gridX;
constraints.gridy= gridY;
constraints.gridwidth= gridWidth;
constraints.gridheight= gridHeight;
constraints.weightx= weightX;
constraints.weighty= weightY;
constraints.fill= fill;
constraints.anchor= anchor;
theLayout.setConstraints(component, constraints);
this.getContentPane().add(component);
}
COM: <s> add a component in the grid bag layout </s>
|
funcom_train/47551874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result typeVarSig(String value, int pos){
Result res = null;
char token = value.charAt(pos);
switch(token){
case T: {
String id = "";
pos++;
token = value.charAt(pos);
while (token != SEMI_COLON){
id += token;
pos++;
token = value.charAt(pos);
}
pos++;
// CHECK sounds that if we're here it means we already resolved the TypeVariable somewhere ?
res = new Result(findTypeVar(id), pos);
}
}
return res;
}
COM: <s> type variable signature </s>
|
funcom_train/3711708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doBox () {
x1 = box_origin.getX();
x2 = box_corner.getX();
y1 = box_origin.getY();
y2 = box_corner.getY();
Viewport wcs = new Viewport (Math.min (x1, x2), Math.max (x1, x2),
Math.min (y1, y2), Math.max (y1, y2));
finishZoom(wcs);
}
COM: <s> draw the final box and redefine the wcs viewport based on </s>
|
funcom_train/1331668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int logSystemLog(int userId, String isSucceed, String failureReason) throws Exception{
LogInfoCVO logCvo = new LogInfoCVO();
logCvo.setLogonDateTime(DateUtils.getCurrentTimestamp());
logCvo.setLogonUserId(userId);
logCvo.setLogonIpAddr(getRequest().getRemoteAddr());
logCvo.setSuccessInd(isSucceed);
logCvo.setFailureReason(failureReason == null ? null : failureReason);
return logService.logSystemLog(logCvo);
}
COM: <s> log the log </s>
|
funcom_train/19094169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DOMError modifyDOMError(String message, short severity, Node node){
fDOMError.reset();
fDOMError.fMessage = message;
fDOMError.fSeverity = severity;
fDOMError.fLocator = new DOMLocatorImpl(-1, -1, -1, node, null);
return fDOMError;
}
COM: <s> the method modifies global dom error object </s>
|
funcom_train/44328666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateServerActions() {
boolean enable = (tabFolder.getItemCount() > 0);
boolean connected = getCurrentViewer().isConnected();
actionConfigure.setEnabled(enable && connected);
actionRefresh.setEnabled(!getCurrentViewer().isEmpty() && connected);
actionReconnect.setEnabled(!connected);
}
COM: <s> updates server related actions </s>
|
funcom_train/19673535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMail() throws Exception,SendFailedException
{
for(int index=0;index<recipients.length;index++)
{
Address to_address=new InternetAddress(recipients[index].trim());
message.setRecipient(Message.RecipientType.TO,to_address);
transport.sendMessage(message, message.getAllRecipients());
}
transport.close();
}
COM: <s> send the email to all the recipients </s>
|
funcom_train/5726984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void filterEntriesByPermission(Collection entries) {
// FIXME ACEGI - Should be implemented as aspect
if (entries != null && entries.size() > 0) {
Object object = entries.iterator().next();
if (!AcegiUtils.hasPermission(object, new Integer[] { LectureAclEntry.ASSIST })) {
CollectionUtils.filter(entries, new ReleasedFolderEntryPredicate());
}
}
}
COM: <s> filter not released files if user doesnt have assist permission </s>
|
funcom_train/43045052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getDirectMessagesAsync(TwitterListener listener) {
getDispatcher().invokeLater(new AsyncTask(DIRECT_MESSAGES, listener,null) {
public void invoke(TwitterListener listener,Object[] args) throws TwitterException {
listener.gotDirectMessages(getDirectMessages());
}
});
}
COM: <s> returns a list of the direct messages sent to the authenticating user </s>
|
funcom_train/49817814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEstimatedTimeRemaining(final long time) {
// Ignore events if user has requested to halt task.
if (!haltRequested) {
// Update the UI
// Only update when the new value != old value
// This dramatically cuts down on the number of new events added
// to the Event Dispatch Thread.
if (timeRemaining != time) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
timeRemainingValue.setText(StringUtils.getTimeString(time));
}
});
}
timeRemaining = time;
}
}
COM: <s> sets estimated time remaining </s>
|
funcom_train/15824847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String option(char c, String defaultValue) {
if (options == null)
return defaultValue;
String s;
try {
Object o = options.get(new Character(c));
if (o == null || !(o instanceof String))
s = defaultValue;
else
s = (String) o;
} catch (Exception e) {
s = defaultValue;
}
return s;
}
COM: <s> return an option or if missing a default value </s>
|
funcom_train/7264263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void interest(ThrottleListener writer) {
boolean wakeup;
synchronized(_requests) {
//LOG.debug("Adding: " + writer + " to requests");
wakeup = _requests.isEmpty();
_requests.add(writer);
}
if (wakeup || _available >= MINIMUM_TO_GIVE)
NIODispatcher.instance().wakeup();
}
COM: <s> interests this code throttle listener code in being notified when </s>
|
funcom_train/25108700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(String name, Rectangle value) {
setProperty(name,
(int) value.getX() + ", " +
(int) value.getY() + ", " +
(int) value.getWidth() + ", " +
(int) value.getHeight());
}
COM: <s> sets a rectangle property </s>
|
funcom_train/37592400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ItemT removeDocument(ItemT doc) {
assert (EventQueue.isDispatchThread() || Utilities.TEST_MODE);
synchronized(_model) { // lock for mutation
LeafNode<ItemT> toRemove = getNodeForDoc(doc);
if (toRemove == null) return null;
return removeNode(getNodeForDoc(doc));
}
}
COM: <s> removes a given code inavigator item code from this navigator </s>
|
funcom_train/18032232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMenuFileSettings() {
if (m_menuFileSettings == null) {
m_menuFileSettings = new JMenuItem();
m_menuFileSettings.setText(Messages.getString("FBMenu.2")); //$NON-NLS-1$
m_menuFileSettings.setMnemonic(Messages.getString("FBMenu.3").charAt(0)); //$NON-NLS-1$
}
return m_menuFileSettings;
}
COM: <s> returns the file settings item </s>
|
funcom_train/40359602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAuthenticateSuccess() throws Exception {
instantiator.addConnector(connectorName, new MockConnector(null,
new AuthenticatingAuthenticationManager(), null, null));
AuthenticationResponse response =
manager.authenticate(connectorName, identity);
assertNotNull(response);
assertTrue(response.isValid());
assertEquals("bar", response.getData());
}
COM: <s> test authenticate with success response </s>
|
funcom_train/44797933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int print(final Graphics graphics, final PageFormat pageFormat, final int pageIndex) throws PrinterException {
LOG.debug("");
Graphics2D g2 = (Graphics2D) graphics;
g2.translate(-mOrigin.getX(), -mOrigin.getY());
mPainter.print(g2, pageFormat, 1);
return PAGE_EXISTS;
}
COM: <s> prints the page at the specified index into the specified </s>
|
funcom_train/38552306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRequiredParameter(Parameter parameter) {
Cube42NullParameterException.checkNull(parameter, "parameter", "addRequredParameter", this);
if (this.optionalParameters.get(parameter.getName()) != null)
Logger
.error(
ParameterSystemCodes.DUPLICATE_PARAMETER,
new Object[] { parameter.getName()});
this.requiredParameters.put(parameter.getName(), parameter);
}
COM: <s> adds a required parameter to the group </s>
|
funcom_train/50865790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawMap(Coordinates newCenter) {
if ((newCenter != null) && (!newCenter.equals(currentCenter))) {
mapImage = createMapImage(newCenter);
MediaTracker mt = new MediaTracker(displayArea);
mt.addImage(mapImage, 0);
try {
mt.waitForID(0);
}
catch (InterruptedException e) {
logger.log(Level.SEVERE,"MediaTracker interrupted " + e);
}
mapImageDone = true;
currentCenter = new Coordinates(newCenter);
}
}
COM: <s> creates a 2 d map at a given center point </s>
|
funcom_train/4533535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registered(RegistrationEvent evt) {
status = SipRegisterStatus.Registered;
preferences.setPreferredAddress(NetworkAddressManager.getLocalHost().getHostAddress());
//preference.commit();
registerStatusChanged(new RegisterEvent(this, SipRegisterStatus.Registered, evt.getReason()));
if (callTo.length() > 2) {
handleDialRequest(callTo);
}
registerMenu.setSelected(true);
}
COM: <s> fired when softphone is register sucessfully </s>
|
funcom_train/3000266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Row getRow(int rowIndex) {
Row row = new Row();
int columnCount = getColumnCount();
for (int column = 0; column < columnCount; ++column) {
row.put(getColumnName(column), get(rowIndex, column));
}
return row;
}
COM: <s> returns the given row </s>
|
funcom_train/49211202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTabbedPane getJTabbedPane() {
if (jTabbedPane == null) {
jTabbedPane = new JTabbedPane();
jTabbedPane.addTab("nodes", getNodesScrollPane());
jTabbedPane.addTab("edges", getEdgesScrollPane());
jTabbedPane.addTab("cluster",getClusterScrollPane());
jTabbedPane.addTab("summary", getJPanel());
jTabbedPane.setBackground(Color.white);
}
return jTabbedPane;
}
COM: <s> this method initializes j tabbed pane </s>
|
funcom_train/3653003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void releaseReader() {
XMLReader reader = (XMLReader)threadMap.get(Thread.currentThread());
// red alert if somehow a release is being done
// on a Thread that does not own an XMLReader!
org.amberarcher.util.Assert.notNull (reader, "reader") ;
synchronized (threadMap) {
checkIn(reader);
threadMap.remove(Thread.currentThread());
}
}
COM: <s> releases the xmlreader owned by the current thread </s>
|
funcom_train/1541972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int writeBytes(byte[] data, int nBytes, int offset) {
maxPos = Math.max(maxPos, offset + nBytes);
if (nBytes + offset > pngBytes.length) {
pngBytes = resizeByteArray(pngBytes, pngBytes.length
+ Math.max(1000, nBytes));
}
System.arraycopy(data, 0, pngBytes, offset, nBytes);
return offset + nBytes;
}
COM: <s> write an array of bytes into the png bytes array specifying number of </s>
|
funcom_train/801667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void hideTabs() {
if (getPageCount() <= 1) {
setPageText(0, "");
if (getContainer() instanceof CTabFolder) {
((CTabFolder)getContainer()).setTabHeight(1);
Point point = getContainer().getSize();
getContainer().setSize(point.x, point.y + 6);
}
}
}
COM: <s> if there is just one page in the multi page editor part </s>
|
funcom_train/1589784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TimeOfDay withMinuteOfHour(int minute) {
int[] newValues = getValues();
newValues = getChronology().minuteOfHour().set(this, MINUTE_OF_HOUR, newValues, minute);
return new TimeOfDay(this, newValues);
}
COM: <s> returns a copy of this time with the minute of hour field updated </s>
|
funcom_train/12860968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_negative_SaveEntities_0() throws Exception {
beginTransaction();
one2 = new ClassOne2();
try {
//try to save without setting: one2.setOne1(one1)
getEntityManager().persist(one2);
commitTransaction();
fail();
} catch (Exception ex) {
//catch thrown exception
}
}
COM: <s> testing the one to one association </s>
|
funcom_train/34673743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBeanShellInheritance() throws Exception {
TestCommand command=(TestCommand)getCore().newCommand("TestBeanShellInheritance");
// Test the first rule in the base class (x<100 so r=x+y)
command.setX(9);
command.setY(10);
command.invoke();
assertEquals(19, command.getR());
}
COM: <s> test that the bean shell accessors inheritance support is working </s>
|
funcom_train/24941304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean consumesReset() {
for (Component component : getDesignModule().getComponents()) {
if (component.consumesReset())
return true;
}
// this adds logic for pins FIXME for all the other things!
for (Pin pin : getPins()) {
if (pin.consumesReset()) {
return true;
}
}
return !getRegisters().isEmpty() || !getLogicalMemories().isEmpty();
}
COM: <s> tests whether or not this design is resettable </s>
|
funcom_train/15812702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InetAddress getLocalAddress() {
InetAddress localAddr = null;
try {
localAddr = InetAddress.getLocalHost();
} catch (UnknownHostException e) {
e.printStackTrace();
return null;
}
if (localAddr.isLinkLocalAddress() == true ||
localAddr.isLoopbackAddress() == true) {
/* there is no valid address */
/* XXX logging */
return null;
}
return localAddr;
}
COM: <s> get own address </s>
|
funcom_train/42087427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ComicSite getPreviousComic() {
if (allComics.isEmpty()) {
return null;
}
if (current >= allComics.size() || --current < 0) {
current = allComics.size() - 1;
}
ComicSite cs = allComics.get(current);
cs.getStrip().loadImage();
return cs;
}
COM: <s> moves to and returns the previous comic site for display </s>
|
funcom_train/48054119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean constainsActiveCompositeNodes() {
if (compositeListeners != null) {
SELECTIONSTATUS status;
for (CompositeTreeTableNode n : compositeListeners) {
status = n.getSelectionStatus();
if (status == SELECTIONSTATUS.SELECTED ||
status == SELECTIONSTATUS.SELECTING ||
status == SELECTIONSTATUS.REVALIDATE) {
return true;
}
}
}
return false;
}
COM: <s> determines whether or not any of the composite nodes that depend upon </s>
|
funcom_train/39401053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonActivate() {
if (jButtonActivate == null) {
jButtonActivate = new JButton();
jButtonActivate.setPreferredSize(new Dimension(100,25));
jButtonActivate.setText("Activeren");
jButtonActivate.setToolTipText("Activeren");
jButtonActivate.setMnemonic(KeyEvent.VK_A);
jButtonActivate.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
activateKey();
}
});
}
return jButtonActivate;
}
COM: <s> this method initializes j button activate </s>
|
funcom_train/15696976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addComponent (DistributionComponent component) throws DistributionConfigurationException {
if ((nodes.containsKey(component.getId())) || (components.containsKey(component.getId()))) {
throw new DistributionConfigurationException("A component with the same name (" + component.getId() + ") already exists in this process.");
}
components.put(component.getId(), component);
}
COM: <s> adds a message output channel to this list </s>
|
funcom_train/9994241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeDuplicateSession(final SocketSession newSession) {
for (SocketSession session : mSessions) {
if (session.getName().equals(newSession.getName()) && !session.equals(newSession)) {
session.addOutput("Take over from other connection.");
removeSession(session);
}
}
}
COM: <s> remove duplicate session </s>
|
funcom_train/17905238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConnectionValue(DatabaseHost host) {
connectButton.setEnabled(false);
disconnectButton.setEnabled(false);
if (databaseConnection != null) {
populateConnectionObject();
}
this.host = host;
populateConnectionFields(host.getDatabaseConnection());
// set the focus field
focusNameField();
// queue a save
EventMediator.fireEvent(new DefaultConnectionRepositoryEvent(this,
ConnectionRepositoryEvent.CONNECTION_MODIFIED,
databaseConnection));
}
COM: <s> sets the connection fields on this panel to the </s>
|
funcom_train/2388870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getCboxRatio2() {
if (cboxRatio2 == null) {
cboxRatio2 = new JComboBox();
cboxRatio2.setBounds(new Rectangle(261, 42, 177, 26));
cboxRatio2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
validateSelection(cboxRatio2);
}
});
InitializeCombobox(cboxRatio2);
}
return cboxRatio2;
}
COM: <s> this method initializes cbox ratio2 </s>
|
funcom_train/37818547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void markStatement(SimulationStatement s) {
int start = getCaretAtLine(s.getAddress().getLine() - 1);
int end = s.getCodeText().length() + 1;
SimpleMarker a = new SimpleMarker(Color.ORANGE);
Markers.markText(codeEditor, start, start + end, a);
codeEditor.setCaretPosition(start + end - 1);
}
COM: <s> mark a specific </s>
|
funcom_train/18284609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBigDecimal(int parameterIndex, BigDecimal x) throws DAOException {
try {
parms.put("" + parameterIndex, "" + x);
this.preparedStatement.setBigDecimal(parameterIndex, x);
} catch (SQLException e) {
_log.error("Exception in setBigDecimal() method", e);
this.setTransactionRollbackOnly();
}
}
COM: <s> sets the designated parameter to big decimal value </s>
|
funcom_train/37769082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBuffer(String value) {
if (value == null) { return; }
value = value.trim();
if (value.length() == 0) { return; }
try {
buffer_size = Integer.parseInt(value);
} catch (Exception e) {
String errorMsg = "JDBCAppender::setBuffer(), Invalid BUFFER_OPTION value : " + value
+ " !";
LogLog.error(errorMsg);
errorHandler.error(errorMsg, null, 0);
return;
}
}
COM: <s> defines how many messages will be buffered until they will be updated to </s>
|
funcom_train/27712829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isEmpty(Element element) {
if (!element.hasChildNodes()) {
return true;
}
Node child = element.getFirstChild();
while (child != null) {
int type = child.getNodeType();
if (type == Node.ELEMENT_NODE || type == Node.TEXT_NODE) {
return false;
}
child = child.getNextSibling();
}
return true;
}
COM: <s> returns true if the element is empty </s>
|
funcom_train/39102265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeContext(Context context) {
this.currentContext = NULL_CONTEXT;
// Notify listeners
// Note: The complete context is equivalent to the removed context
// in this context management implementation
fireContextChange(this.currentContext, context,
ContextChangeEvent.REMOVE_CONTEXT);
Assert.post(getContext() == NULL_CONTEXT, "currentContext is set");
}
COM: <s> remove the context given as a parameter </s>
|
funcom_train/14400724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean startSlpSa() throws IOException {
try {
SLPConfig.getGlobalCfg().setPort(PORT);
this.iSrvAgent = new ServiceAgent();
this.iSrvAgent.start();
} catch (IOException e) {
if (e.getCause() instanceof BindException) {
warning("Couldn't bind to SLP port " + PORT + " ... skipping SLP tests");
return false;
}
throw e;
}
return true;
}
COM: <s> starts a slp service agent sa on the loopback address 127 </s>
|
funcom_train/32862976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean amConvener() {
View v = null;
try {
/*
* this is fragile because someone else could join and thus the
* convener would not be identified. Need to look in JGroup bowels
* for solution.
*/
v = this.getView();
if (v != null) {
return (v.size() <= 1);
} else {
return false;
}
} catch (final Exception e) {
e.printStackTrace();
return true;
}
}
COM: <s> returns true if the current instance is the convener of the group i </s>
|
funcom_train/47958104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TileCollection load_tile_coords(int[] tile_coord, boolean with_metadata){
final int[] tc = tile_coord;
Generator<int[]> tile_coords = new Generator<int[]>() {
@Override
public void run() {
yield(tc);
}
};
return load_tile_coords(tile_coords, with_metadata);
}
COM: <s> overloaded member used by cache </s>
|
funcom_train/6268507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String byteStringNoSemicolon() {
StringBuffer retval = new StringBuffer();
try {
while (true) {
char next = lookAhead(0);
// bug fix from Ben Evans.
if (next == '\0' || next == '\n' || next == ';' || next == ',' ) {
break;
} else {
consume(1);
retval.append(next);
}
}
} catch (ParseException ex) {
return retval.toString();
}
return retval.toString();
}
COM: <s> return a substring containing no semicolons </s>
|
funcom_train/3765886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int positionForBuilder(String aBuilder) throws CoreException {
IProjectDescription desc = null;
ICommand[] coms = null;
try {
desc = this.getIProject().getDescription();
coms = desc.getBuildSpec();
for (int i = 0; i < coms.length; i++) {
if (coms[i].getBuilderName().equals(aBuilder))
return i;
}
} finally {
desc = null;
coms = null;
}
return BuilderNotFound;
}
COM: <s> method position for builder </s>
|
funcom_train/3860942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean doTick() {
boolean ret = super.doTick();
if (isChanged()) {
titleText.setLocation(0, (int) (size.height - titleText.getFont().getHeight()));
titleText.setSize(size.width, (int) titleText.getFont().getHeight());
}
titleText.setBackgroundColor(isActive() ? Interface.getWindowActiveTitleBarColor() : Interface.getWindowInactiveTitleBarColor());
return ret;
}
COM: <s> make sure the titles at the top </s>
|
funcom_train/18349036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getCanonicalValues() {
List propList = getType().getConceptProperties();
List retval = new ArrayList(propList.size());
for (int p = 0; p < propList.size(); p++) {
ConceptProperty cp = (ConceptProperty) propList.get(p);
Object value =
cp.getCapProperty().getCapDatatype()
.canonicalWrite(getValue(cp));
retval.add(value);
}
return retval;
}
COM: <s> get a list of the canonical values for this instance declaring type only </s>
|
funcom_train/22615498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object convertResult(Method facadeMethod, Object mappedResult) {
Class<?> targetType = facadeMethod.getReturnType();
Class<?> targetComponentType = getReturnComponentTypeHint(facadeMethod);
log.debug("Converting result {} to target type {} "
+ "with target component type {}", new Object[] { mappedResult,
targetType, targetComponentType });
Object convertedResult = getConfig().getResultConverter().convert(
targetType, mappedResult, targetComponentType);
return convertedResult;
}
COM: <s> convert mapped result value to facade method return type using result </s>
|
funcom_train/22215909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setAuditFields(InfoBean bean) {
if (bean.getInfoType().hasAuditFields()) {
bean.setProperty("updatedAt", new Date());
bean.setProperty("updatedBy", Thread.currentThread().getName());
if (bean.isNew()) {
bean.setProperty("createdAt", new Date());
bean.setProperty("createdBy", Thread.currentThread().getName());
}
}
}
COM: <s> update audit fields in given info bean </s>
|
funcom_train/25332455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetParameter() throws Exception {
CoordinateSystemDefaultVersionTypeHandler i = new CoordinateSystemDefaultVersionTypeHandler();
final PreparedStatement ps = this.context.mock(PreparedStatement.class);
try {
i.setParameter(ps, 1, new Object(), JdbcType.BIT);
} catch (Exception e) {
fail();
}
}
COM: <s> test of set parameter method of class coordinate system default version type handler </s>
|
funcom_train/10482537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void skipExtensionItem() throws MessagingException {
Token token = next();
int type = token.getType();
// list form? Scan to find the correct list closure.
if (type == '(') {
skipNestedValue();
}
// found an EOF? Big problem
else if (type == Token.EOF) {
throw new ResponseFormatException("Missing ')'");
}
}
COM: <s> skip over an extension item </s>
|
funcom_train/41163855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoTextType entity) {
EntityManagerHelper.log("saving CoTextType instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co text type entity </s>
|
funcom_train/43934056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pause(int position) throws IllegalStateException {
switch (playlistSubscriberStream.state) {
case PLAYING:
case STOPPED:
//allow pause if playing or stopped
synchronized (this) {
playlistSubscriberStream.state = State.PAUSED;
}
releasePendingMessage();
clearWaitJobs();
sendClearPing();
sendPauseStatus(currentItem);
playlistSubscriberStream.notifyItemPause(currentItem, position);
break;
default:
throw new IllegalStateException("Cannot pause in current state");
}
}
COM: <s> pause at position </s>
|
funcom_train/2539212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCharacters(BitmapFontCharacter[] characters) {
uniCodeToChar.clear();
charNameToChar.clear();
for (BitmapFontCharacter currentChar : characters) {
uniCodeToChar.put(currentChar.getUnicode(), currentChar);
charNameToChar.put(currentChar.getName(), currentChar);
}
this.characters = characters;
}
COM: <s> sets the characters for the font </s>
|
funcom_train/47509394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(ExpedienteTransmitido entity) {
EntityManagerHelper.log("saving ExpedienteTransmitido instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved expediente transmitido entity </s>
|
funcom_train/44706219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireQueryPending(PageState state, DataQuery query) {
Iterator
i = m_queryListeners.getListenerIterator(QueryListener.class);
QueryEvent e = null;
while (i.hasNext()) {
if ( e == null ) {
e = new QueryEvent(this, state, query);
}
((QueryListener) i.next()).queryPending(e);
}
}
COM: <s> fire the query event listeners to indicate that a query </s>
|
funcom_train/19109821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void launchVerset() {
String text = mVerset.getText();
if (text.length() != 0) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
mVerset.setText("");
}
});
ModelSongs model = SongManagerApp.getModel();
ActionCompilLaunchSong.launchSong(model.getSelectedSong(), text);
}
}
COM: <s> invoked when the mouse has been clicked on a component </s>
|
funcom_train/3729719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
Enumeration e;
try {
e =
PersistentManager.getInstance().findAllProxy(
"Pump",
"org.jiuston.bo.PumpProxy");
PumpProxy pp;
while (e.hasMoreElements()) {
pp = (PumpProxy) e.nextElement();
this.getPumps().addElement(pp);
pp.setState(OldCleanState.getInstance());
Cache.getInstance().addObject(pp);
}
} catch (PersistentManagerException e1) {
e1.printStackTrace();
}
}
COM: <s> initialize pumps collection from database </s>
|
funcom_train/1024516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void aliasSystemAttribute(String alias, String systemAttributeName) {
if (systemAttributeAliasingMapper == null) {
throw new InitializationException("No "
+ SystemAttributeAliasingMapper.class.getName()
+ " available");
}
systemAttributeAliasingMapper.addAliasFor(systemAttributeName, alias);
}
COM: <s> create an alias for a system attribute </s>
|
funcom_train/46695156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBuildingStatus() {
System.out.println("buildingStatus");
GraphByLevel instance = new GraphByLevel();
assertEquals(State.UNINITIALIZED,instance.buildingStatus());
instance.buildQuery(1, Operation.EQ);
assertEquals(State.READY,instance.buildingStatus());
}
COM: <s> test of building status method of class graph by level </s>
|
funcom_train/38788675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double superRandom() {
int k = (int) randMixerBuffer.length *
(randomGenerator.nextInt(RAND_GEBERATOR_MODULAS) / RAND_GEBERATOR_MODULAS);
int l = randMixerBuffer[k];
randMixerBuffer[k] = randomGenerator.nextInt(RAND_GEBERATOR_MODULAS);
return (double) l / RAND_GEBERATOR_MODULAS;
}
COM: <s> specially implemented for this class </s>
|
funcom_train/12270299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String s = new String();
for ( int i = 0; i < link.length; ++i ) {
s += i + ": ";
s += "Link : " + link[ i ] + " ";
s += "Rank : " + rank[ i ] + "\n";
}
return s;
}
COM: <s> transfers this to a string </s>
|
funcom_train/18725838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyFrom(final JaxoDefaultGrid g) {
this.transparent = g.transparent;
setBackground(g.getBackground());
setGridColor(g.getGridColor());
setGridType(g.getGridType());
setGridSize(g.getGridSize());
setGridStyle(g.getGridStyle());
setCanvasSize(g.getCanvasSize());
}
COM: <s> copies all properties from the argument </s>
|
funcom_train/3371999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAutoCreateContainerGaps(boolean autoCreateContainerPadding){
if (this.autocreateContainerPadding != autoCreateContainerPadding) {
this.autocreateContainerPadding = autoCreateContainerPadding;
horizontalGroup = createTopLevelGroup(getHorizontalGroup());
verticalGroup = createTopLevelGroup(getVerticalGroup());
invalidateHost();
}
}
COM: <s> sets whether a gap between the container and components that </s>
|
funcom_train/12735428 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getSize() {
long size = 0;
try {
ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
ObjectOutputStream objOut = new ObjectOutputStream(byteOut);
objOut.writeObject(this);
objOut.flush();
return byteOut.size();
}
catch (IOException e) {
logger.error("Can not calculate object size", e);
}
return size;
}
COM: <s> gets the size in bytes for this object serialized </s>
|
funcom_train/37009447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int maxBlue() {
int m = Integer.MIN_VALUE;
for (int v = 0; v < getHeight(); v++)
{
for (int u = 0; u < getWidth(); u++)
{
if (blue(u, v) > m) m = blue(u, v);
}
}
return m;
}
COM: <s> returns the maximum blue pixel value in band 2 </s>
|
funcom_train/3703566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected RequestResponsePair createTransaction(Subscription sub) {
RequestResponsePair pair;
String[] strArr = extractInfoSpaceAndXPath(
UrlLib.getRemainder(sub.getContentLocation()));
pair = InfoSpaceTransaction.createTransaction(
InfoSpaceTransaction.METHOD_QUERY);
pair.setInfoSpaceServer(Confab.getServerRoot());
pair.setInfoSpacePath(strArr[0]);
return (pair);
} // of method
COM: <s> create a request response pair for this subscription </s>
|
funcom_train/16833453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttribute(Object bean, String attribute, Object attributeValue) throws UnknownAttribute {
try {
PropertyUtils.setProperty(bean, attribute, attributeValue);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
} catch (InvocationTargetException e) {
throw new RuntimeException(e.getCause().getMessage());
} catch (NoSuchMethodException e) {
throw new UnknownAttribute();
}
}
COM: <s> assign a value to beans fields </s>
|
funcom_train/825210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createMaterial() {
if (ambientColor != null) {
material.setAmbientColor(ambientColor);
}
if (diffuseColor != null) {
material.setDiffuseColor(diffuseColor);
}
if (specularColor != null) {
material.setSpecularColor(specularColor);
}
if (emissiveColor != null) {
material.setEmissiveColor(emissiveColor);
}
material.setShininess(shininess);
}
COM: <s> creates the material </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.