__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/34673287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUpdateConfig() throws Exception {
if (TimeZone.getDefault().getDisplayName(false, TimeZone.SHORT).equals("GMT")) {
Configuration config=getConfiguration();
config.findParameter("TestParameter").setValue("2");
getCore().setConfiguration(config);
}
}
COM: <s> if the timezone is gmt </s>
|
funcom_train/28438167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void seedRNG(byte [] seed){
if(seed==null){
// This is a dummy to let us do fast testing
seed=new byte[0];
}
if(rng==null)
rng=new SecureRandom(seed);
else
rng.setSeed(seed);
// Differentiate RNG streams even if
// we seeded with null
rng.setSeed(System.currentTimeMillis());
}
COM: <s> build new rng based on the indicated seed or </s>
|
funcom_train/4920656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFailGetManagedObjectSourceMetaData() {
final Error failure = new Error("Obtain meta-data failure");
// Record failure to obtain the meta-data
this.record_issue("Failed to get ManagedObjectSourceMetaData", failure);
// Attempt to load
this.loadManagedObjectType(false, new Init<None>() {
@Override
public void init(ManagedObjectSourceContext<None> context,
InitUtil util) {
MockManagedObjectSource.metaDataFailure = failure;
}
});
}
COM: <s> ensure issue if fails to obtain the </s>
|
funcom_train/35691166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNoIcons() {
if (noIcons != null) {
return noIcons;
}
ValueBinding vb = getValueBinding("noIcons");
if (vb != null) {
return vb.getValue(getFacesContext()).toString();
}
return String.valueOf(false);
}
COM: <s> return the value of the no icons property </s>
|
funcom_train/8742300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MapLayer checkErrorFlags(Discovery discovery, MapLayer mapLayer) {
MapLayer checked;
if ((broken || parseError || readError)) {
checked = null;
logger.log(
getLogLevel(),
"Disabling discovery " + discovery.getId() + " at '"
+ uriResolver.resolve(discovery) + "' - because: " + lastErrorMessage);
} else {
checked = mapLayer;
}
return checked;
}
COM: <s> we managed to process the service but something somewhere is broken </s>
|
funcom_train/2487786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean useRelations() {
String templateValue = (String) getTemplateSettings().get(GragGenerator.TEMPLATE_USE_RELATIONS);
if (templateValue == null || "true".equalsIgnoreCase(templateValue)) {
return new Boolean(true);
}
else {
return new Boolean(false);
}
}
COM: <s> check if the container managed relations checkbox was checked </s>
|
funcom_train/34505026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
if (dlg==null) {
dlg=new JDialog(ApplicationContext.getInstance().getDefaultDialogOwner(),
ResourceFactory.getString(ACTION_CIRCLE_OF_FIFTHS_NAME),
false);
dlg.setLayout(new BorderLayout());
dlg.add(new CircleOfFifths(), BorderLayout.CENTER);
dlg.pack();
Dimension d=dlg.getSize();
d.setSize(new Dimension(d.width, d.height+200));
}
if (dlg.isVisible()) {
dlg.toFront();
} else {
dlg.setVisible(true);
}
}
COM: <s> possibly creates the dialog and displays </s>
|
funcom_train/35280997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Transform combineWithParent(Transform parent) {
scale.multLocal(parent.scale);
// rot.multLocal(parent.rot);
parent.rot.mult(rot, rot);
// This here, is evil code
// parent
// .rot
// .multLocal(translation)
// .multLocal(parent.scale)
// .addLocal(parent.translation);
translation.multLocal(parent.scale);
parent
.rot
.multLocal(translation)
.addLocal(parent.translation);
return this;
}
COM: <s> changes the values of this matrix acording to its parent </s>
|
funcom_train/42044552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DataObjectNode searchParentTree(DataObjectNode searchNode, String sourceParent) {
while (true) {
// Quit if there are no more parents
if (searchNode == null) {
break;
}
// Did we find the node we were searching for
if (searchNode.getName().equals(sourceParent)) {
return searchNode;
}
// Go up to the tree to the next parent
searchNode = searchNode.parentNode;
}
return null;
}
COM: <s> search the tree of parent nodes to find a specific node </s>
|
funcom_train/31900544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: {
int lineNo = toker.lineno();
// !!! DEBUG
// if (outLines < lineNo)
// System.err.println("outLines == " + outLines + " lineNo == " + lineNo);
while (outLines < lineNo)
{
outLines++;
outStream.println();
} // while
} // padWithNewlines
COM: <s> since multiline comments will be quietly removed we need to pad </s>
|
funcom_train/22234156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextureBlendColor(float r, float g, float b, float a) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_BLEND_COLOR_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("TextureAttributes3"));
if (isLive())
((TextureAttributesRetained)this.retained).setTextureBlendColor(r, g, b, a);
else
((TextureAttributesRetained)this.retained).initTextureBlendColor(r, g, b, a);
}
COM: <s> sets the texture blend color for this </s>
|
funcom_train/23853341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGlobalConfig(GlobalConfig globalConfig) {
this.globalConfig = (GlobalConfig) globalConfig.copy();
this.globalConfigBackup = (GlobalConfig) globalConfig.copy();
if (ctrl.getCurrentSession() != null) {
updateGlobalConfig(ctrl.getCurrentSession().getViewManager().getAllViews());
}
}
COM: <s> sets the new global configuration and updates the views </s>
|
funcom_train/31133161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String toHex(byte[] b) {
StringBuilder output = new StringBuilder();
for (int i = 0; i < b.length; i++) {
if (i > 0)
output.append(' ');
byte j = b[i];
output.append(Character.forDigit((j >> 4) & 0xF, 16));
output.append(Character.forDigit(j & 0xF, 16));
}
return output.toString();
}
COM: <s> convert a byte array to a string of hex characters </s>
|
funcom_train/17455868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onPreWindowOpen( ApplicationWindowConfigurer configurer ) {
// If you override this method, it is critical to allow the superclass
// implementation to run as well.
super.onPreWindowOpen(configurer);
// Uncomment to hide the menubar, toolbar, or alter window size...
// configurer.setShowMenuBar(false);
// configurer.setShowToolBar(false);
// configurer.setInitialSize(new Dimension(640, 480));
}
COM: <s> this method is called prior to the opening of an application window </s>
|
funcom_train/2861879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(UserStateObject user) {
for (Enumeration e = illSessions.keys(); e.hasMoreElements(); ) {
currentIllSession = (IllSession)illSessions.get(e.nextElement());
currentIllSession.reset();
}
illSessions = null;
user.applicationContext().remove("ILLUserData");
}
COM: <s> cleans up the illuser data object for the input user state object </s>
|
funcom_train/46164204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String parseComment(String[] lineArray) {
StringBuilder sbComment = new StringBuilder();
for (int i = COMMENT_START; i < lineArray.length; i++) {
String element = lineArray[i];
sbComment.append(element);
sbComment.append(' ');
}
return sbComment.toString();
}
COM: <s> parse the commit comment from the line </s>
|
funcom_train/45018360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEmailPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NXuser_email_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NXuser_email_feature", "_UI_NXuser_type"),
NexusPackageImpl.Literals.NXUSER__EMAIL,
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the email feature </s>
|
funcom_train/2903172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JXUser getUser(String ukey){
if(ukey == null){
return null;
}
StringBuffer sb = new StringBuffer(usrPath.toString()).append(ukey).append(".xml");
File saved = new File(sb.toString());
if(saved.exists()){
try{
FileInputStream fis = new FileInputStream(saved);
XMLTag spec = XMLHandler.parseXML((InputStream)fis);
fis.close();
return new JXUser(spec);
}
catch(Exception e){
new JXError(getClass(), "Error while restoring user data="+ukey, e.getStackTrace());
}
}
return null;
}
COM: <s> get a specific user data </s>
|
funcom_train/2894560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Document doc) {
Enumeration fields = doc.fields();
while (fields.hasMoreElements()) {
Field field = (Field) fields.nextElement();
add(field.name(), field.isIndexed(), field.isTermVectorStored());
}
}
COM: <s> adds field info for a document </s>
|
funcom_train/41383422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isArrow() {
boolean ret = (isRightArrow() || isUpArrow() || isLeftArrow() || isDownArrow() || isDownLeftArrow() || isDownRightArrow() || isUpLeftArrow() || isUpRightArrow() || isSelfArrow());
return ret;
}
COM: <s> can be used to determine if current char key is a directional character </s>
|
funcom_train/2467179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document createDefaultDocument() {
StyleSheet styles = getStyleSheet();
StyleSheet ss = new StyleSheet();
ss.addStyleSheet(styles);
HTMLDocument doc = new HTMLDocument(ss);
doc.setParser(getParser());
doc.setAsynchronousLoadPriority(4);
doc.setTokenThreshold(100);
return doc;
}
COM: <s> create an uninitialized text storage model </s>
|
funcom_train/1663087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void actionCopyURI() {
int selectedIndex = projectList.getSelectedIndex();
if (selectedIndex > -1) {
Project selectedProject = (Project) projectList.getSelectedValue();
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(new StringSelection(selectedProject.getFinalRequestURI(0)), this);
}
}
COM: <s> copies the request uri of the currently selected project to the </s>
|
funcom_train/2558915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateParameters(Creator creator) throws Exception {
List<Parameter> list = creator.getParameters();
for(Parameter parameter : list) {
Label label = resolver.resolve(parameter);
String path = parameter.getPath();
if(label == null) {
throw new ConstructorException("Parameter '%s' does not have a match in %s", path, type);
}
}
}
COM: <s> this is used to ensure that for each parameter in the builder </s>
|
funcom_train/7641103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setThreadUpdateEnabled(boolean enabled) {
mThreadUpdateEnabled = enabled;
if (enabled == false) {
mClientData.clearThreads();
}
try {
HandleThread.sendTHEN(this, enabled);
} catch (IOException ioe) {
// ignore it here; client will clean up shortly
ioe.printStackTrace();
}
update(CHANGE_THREAD_MODE);
}
COM: <s> enables or disables the thread update </s>
|
funcom_train/22286120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getPreferredSize() {
FontMetrics fm = getFontMetrics(getFont());
int labelWidth = fm.stringWidth(getKey(label)) + 20;
int buttonSiz = Math.max(13, Math.min(20, fm.getAscent()));
return new Dimension(labelWidth + buttonSiz, buttonSiz + 6);
}
COM: <s> get the preferred size of checkboxes </s>
|
funcom_train/26481843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hyperlinkUpdate(HyperlinkEvent e) {
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
try {
BasicService bs = (BasicService) ServiceManager.lookup("javax.jnlp.BasicService");
// Invoke the showDocument method
bs.showDocument(e.getURL());
} catch (Exception e1) {
e1.printStackTrace();
}
}
}
COM: <s> called when a hypertext link is updated </s>
|
funcom_train/46767008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getClearMenuItem() {
if (clearMenuItem == null) {
clearMenuItem = new JMenuItem();
clearMenuItem.setText("Clear");
clearMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(final java.awt.event.ActionEvent e) {
clear();
}
});
}
return clearMenuItem;
}
COM: <s> this method initializes clear menu item </s>
|
funcom_train/50077101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void treatDirListEvent(DirList dirL) {
IDirection dir = dirL.getDirection();
String oldDir = dir.getValue();
String newDir = (String) dirL.getSelectedItem();
if (!oldDir.equals(newDir)) {
dir.setValue(newDir);
showStatus("Direction changed successfully");
}
}
COM: <s> treats any event associated with the given dir list object </s>
|
funcom_train/50338817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(int value) {
if (log.isDebugEnabled()) log.debug("CV "+number()+" value changed from "+_value+" to "+value);
setState(EDITED);
if (_value != value) {
_value = value;
_tableEntry.setText(""+value);
notifyValueChange(value);
}
}
COM: <s> edit a new value into the cv </s>
|
funcom_train/11024026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetPropertyConvertFromString() {
try {
BeanUtils.setProperty(bean, "dateProperty", testStringDate);
} catch (Throwable t) {
fail("Threw " + t);
}
assertEquals("String --> java.util.Date", testUtilDate, bean.getDateProperty());
}
COM: <s> test code set property code converting from a string </s>
|
funcom_train/37806215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isCorrectlySelectedMessage() {
final int row = messageTable.getSelectedRow();
if (row < 0
|| selectedMessage == null
|| ftMessageTab.getTreeModel().getSelectedNode() == null
|| !ftMessageTab.getTreeModel().getSelectedNode().isBoard() )
// || selectedMessage.isDummy() )
{
return false;
}
return true;
}
COM: <s> returns true if message was correctly selected </s>
|
funcom_train/39238448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getProtocolLevel() throws FreedbException {
int ret = 0;
if (sendCommand("proto", response) != null) {
String code = response.getCode();
String lvl = response.getSingleResponse();
if ("200".equals(code)) {
int index = lvl.lastIndexOf(',');
lvl = lvl.substring(index - 1, index);
ret = Integer.parseInt(lvl);
currProtoLevel = ret;
}
}
return ret;
}
COM: <s> sends the em proto em command to retrieve the current protocol level </s>
|
funcom_train/8079015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DoubleVector nnlse1( PaceMatrix b, IntVector pvt ) {
PaceMatrix c = new PaceMatrix( 1, n, 1 );
PaceMatrix d = new PaceMatrix( 1, b.n, 1 );
return nnlse(b, c, d, pvt);
}
COM: <s> solves the nonnegative least squares problem with equality </s>
|
funcom_train/30290686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String replace(String value, String oldstring, String newstring) {
String result = new String(value);
int pos = value.indexOf(oldstring);
while (pos >= 0) {
result = result.substring(0, pos)
+ newstring
+ result.substring(pos + oldstring.length(), result
.length());
pos = result.indexOf(oldstring, pos + newstring.length());
}
return result;
}
COM: <s> returns a new string resulting from replacing all occurrences of </s>
|
funcom_train/12128142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Edge findOutEdgeByKey(Node head, String key) {
if(head == null || key == null || outEdges == null) {
return null;
}
Edge edge = null;
for(int i = 0; i < outEdges.size(); i++) {
edge = (Edge)(outEdges.elementAt(i));
if(head == edge.getHead() && key.equals(edge.getKey())) {
return edge;
}
}
return null;
}
COM: <s> find an outbound edge given its head and key </s>
|
funcom_train/1589319 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Period plusWeeks(int weeks) {
if (weeks == 0) {
return this;
}
int[] values = getValues(); // cloned
getPeriodType().addIndexedField(this, PeriodType.WEEK_INDEX, values, weeks);
return new Period(values, getPeriodType());
}
COM: <s> returns a new period plus the specified number of weeks added </s>
|
funcom_train/5471902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startupInit(Object arg) throws Exception {
logger.startupInit(arg);
Hashtable cfg = (Hashtable)arg;
// Register our orb name...
Object objName = cfg.get("ObjName");
Code.assert(objName != null && objName instanceof String,
"Must give ORB object name");
OrbUser.connect(this);
OrbUser.rebind(objName.toString(), this);
Startup.setObject("Logger", logger);
}
COM: <s> process the config stuff </s>
|
funcom_train/11104554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addValidator(String type, String id, CommonsValidator v) {
// look for validators organized by type
Map map = (Map) validators.get(type);
if (map == null) {
map = new LinkedHashMap();
validators.put(type, map);
}
if (id != null) {
map.put(id, v);
}
}
COM: <s> p registers a validator according to type and id </s>
|
funcom_train/11641216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getDouble(int columnIndex) throws SQLException {
Object obj = this.currentRow[columnIndex - 1];
this.setWasNull(obj);
try {
return (obj == null)
? new Double(0)
: Double.valueOf(obj.toString());
} catch (NumberFormatException e) {
throw new SQLException(e.getMessage());
}
}
COM: <s> gets the double value at the given column index </s>
|
funcom_train/29379765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisibility( String group, boolean v )
{
selected = (Group)diagram.getElement( group );
try {
selected.setAttribute( "visibility", AnimationElement.AT_XML, v ? "visible" : "hidden" );
selected.updateTime( 0.0 );
resetBuffer();
repaint();
}
catch ( Exception ex )
{
if ( BuildProperties.DEBUG )
ex.printStackTrace();
}
}
COM: <s> sets the visibility of a group </s>
|
funcom_train/3470563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
if (isRunning() && isPaused()) {
replayStack.clear();
isPaused = false;
isRunning = false;
replayWasSuccessful = true;
mediaTime = 0;
glassPaneManager.setVisible(GlassPaneCompound.PSEUDO_MOUSE_PANE,
false);
glassPaneManager
.setVisible(GlassPaneCompound.MARK_MODE_PANE, false);
currentCompound = null;
fireReplayEvent(new ReplayEvent(this, ReplayEvent.Type.RESTARTED));
}
}
COM: <s> resets the replay process </s>
|
funcom_train/46787072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPowerPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Task_power_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Task_power_feature", "_UI_Task_type"),
EZRealtimePackage.Literals.TASK__POWER, true, false, false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the power feature </s>
|
funcom_train/32769987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMenuItemCloseAll() {
if (menuItemCloseAll == null) {
menuItemCloseAll = new JMenuItem();
menuItemCloseAll.setText(OpenJCADLanguage.getString("_close_all_")); // Generated
menuItemCloseAll.addActionListener(new OpenJCADCloseAllDesignAction(this.tabbedPane));
}
return menuItemCloseAll;
}
COM: <s> this method initializes menu item close all </s>
|
funcom_train/20339985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsTeacher() {
System.out.println("isTeacher");
assertEquals(true, UserReader.isTeacher("admin"));
assertEquals(false, UserReader.isTeacher("userTest1"));
assertEquals(false, UserReader.isTeacher("adminn"));
}
COM: <s> test of is teacher method of class user reader </s>
|
funcom_train/35742354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendToNetwork(Message msg, RendezVousPropagateMessage propHdr) throws IOException {
if (Logging.SHOW_FINE && LOG.isLoggable(Level.FINE)) {
LOG.fine("Endpoint propagating " + msg + " (" + propHdr.getMsgId() + ")");
}
rdvService.endpoint.propagate(msg, PropSName, PropPName);
}
COM: <s> propagates the message via endpoint propagation multicast broadcast on </s>
|
funcom_train/18826545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TableViewColumn getSelectedColumnObject() {
int idx = super.getSelectedColumn();
if (idx < 0) {
idx = 0;
}
return ((TableViewAdapter) super.getModel()).getColumn(getColumnModel().getColumn(idx)
.getModelIndex());
}
COM: <s> gets the selected column </s>
|
funcom_train/49631375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getShortEntityClassName() {
if (null == shortEntityClassName) {
Class cls = getEntityClass();
shortEntityClassName = cls.getName();
// Strip out everything before last dot:
int pos = shortEntityClassName.lastIndexOf(".");
if (pos >= 0) {
shortEntityClassName = shortEntityClassName.substring(pos + 1);
}
}
return shortEntityClassName;
}
COM: <s> return short i </s>
|
funcom_train/44289677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void bug() {
try {
setCursor(true);
FactoryWriterXML err = new FactoryWriterXML();
getCurrent().print(err, false, true);
new ImportErrXML(this).xmlErrorIn(err);
} catch (Exception ex) {
addMessage(ex);
} finally {
setCursor(false);
}
}
COM: <s> submits bug information to developers </s>
|
funcom_train/2697459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doStore() {
Set names = textAttributeTable.keySet();
Iterator iterator = names.iterator();
while (iterator.hasNext()) {
String attributeName = (String) iterator.next();
TextAttributeDescriptor ad = (TextAttributeDescriptor) textAttributeTable.get(attributeName);
fPreferenceStore.setValue(attributeName, ad.toString());
}
}
COM: <s> this method stores all attributes in preference store </s>
|
funcom_train/31740580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addView(View view){
this.getContentPane().removeAll();
view.setViewContainer(this);
actionManager.setActionMap(view.getNamedActionsMap());
views.add(view);
this.getContentPane().add(BorderLayout.CENTER, view);
if (isVisible()) {
validate();
repaint();
}
}
COM: <s> appends the view to the end of this windows </s>
|
funcom_train/43224437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWidgets(Composite parent) {
button = new Button(parent, SWT.CHECK);
final GridData gridData = new GridData();
gridData.horizontalSpan = 3;
button.setLayoutData(gridData);
button.setText(this.title);
button.setToolTipText(this.toolTip);
button.addSelectionListener(new SelectionListener(){
public void widgetSelected(SelectionEvent e) {
currentValue = button.getSelection();
}
public void widgetDefaultSelected(SelectionEvent e) {
}
});
button.setSelection(defaultValue);
}
COM: <s> add the necessary widgets to </s>
|
funcom_train/21438211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int findFirstOf(String str, String chars) {
if( str==null || str.length()==0 || chars==null || chars.length()==0 )
return -1;
for (int i = 0; i < str.length(); i++) {
if( chars.indexOf(str.charAt(i))!=-1 )
return i;
}
return -1;
}
COM: <s> return the first index in the string of any one of the </s>
|
funcom_train/21953900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeFile() {
AttachmentHandler handler = new AttachmentHandler(mMessageProxy);
try {
handler.saveFileAs(mAttachment, mTmpFile);
} catch (IOException exc) {
handler.showError(Pooka.getProperty("error.SaveFile", "Error saving file") + ":\n", Pooka.getProperty("error.SaveFile", "Error saving file"), exc);
}
}
COM: <s> writes the file object for this attachment </s>
|
funcom_train/22353792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element save() {
try {
StringBuffer buffer = new StringBuffer();
save(buffer, window, " ");
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document document = builder.parse(new StringInputStream(buffer.toString()));
return document.getDocumentElement();
} catch (Exception exception) {
DockingLayout.log.error(exception);
}
return null;
}
COM: <s> saves this docking layout in a xml element </s>
|
funcom_train/3785276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getScrollbarWidth()
{ /* getScrollbarWidth */
if(siCanvas==null)
return(0);
int nChild= sp.getComponentCount();
if(nChild<=0)
return(0);
Point pt= sp.getScrollPosition();
int w= pt.x;
return(w);
} /* getScrollbarWidth */
COM: <s> get scroll bar width return scroll width position </s>
|
funcom_train/34083266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean onOptionsItemSelected(MenuItem item) {
Intent i;
switch (item.getItemId()) {
case R.id.menu_item_mapsearch:
i = new Intent(this, Search.class);
i.putExtra("isMapView", true);
startActivity(i);
return true;
case R.id.menu_item_listsearch:
i = new Intent(this, Search.class);
i.putExtra("isMapView", false);
startActivity(i);
return true;
case R.id.menu_item_favs://go to the favorites view
i = new Intent(this, Favorites.class);
startActivity(i);
return true;
case R.id.menu_item_help:
mHelpD.show();
return true;
}
return false;
}
COM: <s> called when one of the items in the menu is clicked on </s>
|
funcom_train/4715173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initial_board(int[][] board){
for(int i=0;i<PMM.getMaxY();i++){
for(int x=0; x<PMM.getMaxX(); x++){
boardPieces[i][x]=new BoardPiece(x, i, board[i][x]);
boardArray.add(boardPieces[i][x].getLabel());
}
}
}
COM: <s> a helper method to add the characters to the board </s>
|
funcom_train/43244978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDisposeOfConnection() {
System.out.println("disposeOfConnection");
VistAConnection connection = null;
ConnectionManager instance = new ConnectionManager();
instance.disposeOfConnection(connection);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of dispose of connection method of class org </s>
|
funcom_train/4553357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(String key) throws JSONException {
if (key == null) {
throw new JSONException("Null key.");
}
Object object = opt(key);
if (object == null) {
throw new JSONException("JSONObject[" + quote(key) +
"] not found.");
}
return object;
}
COM: <s> get the value object associated with a key </s>
|
funcom_train/13849214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Policy lookupSubPolicy(final ClassLoader ldr) {
assert Thread.holdsLock(subPolicies);
return (Policy) AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
for (ClassLoader l = ldr; l != null; l = l.getParent()) {
Policy p = (Policy) subPolicies.get(l);
if (p != null) {
return p;
}
}
return mainPolicy;
}
});
}
COM: <s> returns sub policy associated with the given class loader </s>
|
funcom_train/44660547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Icon getEditIcon() {
final IconSource iconSource = (IconSource) ApplicationServicesLocator.services().getService(IconSource.class);
// @TODO find the form Id.
Icon icon = null;
if (getFormId() != null) {
icon = iconSource.getIcon(getFormId() + ".shuttleList.edit");
}
if (icon == null) {
icon = iconSource.getIcon("shuttleList.edit");
}
return icon;
}
COM: <s> using the application services check for form id </s>
|
funcom_train/1353181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initSelection(M model){
if(!"".equals(selectionProperty)){
if(model.<Boolean>get(selectionProperty)) {
this.getSelectionModel().select(model, true);
}
//model.set(CHECKED_PROPERTY_ID, getCheckedValue());
}
}
COM: <s> initialise the button based on the selection property </s>
|
funcom_train/41165667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CoQuestionWeighted update(CoQuestionWeighted entity) {
EntityManagerHelper.log("updating CoQuestionWeighted instance", Level.INFO, null);
try {
CoQuestionWeighted result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved co question weighted entity and return it or a </s>
|
funcom_train/1029796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBug20306() throws Exception {
createTable("testBug20306", "(field1 TINYINT UNSIGNED, field2 TINYINT UNSIGNED)");
this.stmt.executeUpdate("INSERT INTO testBug20306 VALUES (2, 133)");
try {
this.pstmt = this.conn.prepareStatement("SELECT field1, field2 FROM testBug20306");
this.rs = this.pstmt.executeQuery();
this.rs.next();
checkBug20306();
this.rs = this.stmt.executeQuery("SELECT field1, field2 FROM testBug20306");
this.rs.next();
checkBug20306();
} finally {
closeMemberJDBCResources();
}
}
COM: <s> tests fix for bug 20306 result set </s>
|
funcom_train/19869088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void preRender() {
log.info("state is " + state + "(" + ((state == null) ? -1 : state.length()) + ") title is " + facet.getTitle());
if (state != null) {
addObject("_state", state);
}
if (facet.getTitle() != null) {
addObject("_title", facet.getTitle());
}
addObject("_name", getName());
}
COM: <s> put things which are necessary to display to the model </s>
|
funcom_train/25290745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBaseLevel(int baseLevel) {
if (isLiveOrCompiled()) {
if (!this.getCapability(ALLOW_LOD_RANGE_WRITE)) {
throw new CapabilityNotSetException(
Ding3dI18N.getString("Texture32"));
}
}
if (isLive()) {
((TextureRetained)this.retained).setBaseLevel(baseLevel);
} else {
((TextureRetained)this.retained).initBaseLevel(baseLevel);
}
}
COM: <s> specifies the base level for this texture object </s>
|
funcom_train/9874013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resetControls() {
//set original values
upperTextField.setText(String.valueOf(origUpper));
lowerTextField.setText(String.valueOf(origLower));
midTextField.setText(String.valueOf(origMid));
if(origDoubleGradient) {
doubleGradientButton.setSelected(true);
} else
singleGradientButton.setSelected(true);
doubleGradient = origDoubleGradient;
midLabel.setEnabled(origDoubleGradient);
midTextField.setEnabled(origDoubleGradient);
//update the limits and reset the viewer
updateLimits();
}
COM: <s> resets the text fields to original values updates stats repaints preview </s>
|
funcom_train/34342107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTexto7() {
if (texto7 == null) {//GEN-END:|35-getter|0|35-preInit
// write pre-init user code here
texto7 = new TextField("CAMPO 5", null, 5, TextField.NUMERIC);//GEN-LINE:|35-getter|1|35-postInit
// write post-init user code here
}//GEN-BEGIN:|35-getter|2|
return texto7;
}
COM: <s> returns an initiliazed instance of texto7 component </s>
|
funcom_train/22607244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleOpenFile ( File f ) {
try {
handleOpenURL ( f.toURL() );
} catch ( java.net.MalformedURLException e ) {
System.err.println("Unable to launch " + f + " - " + e.getMessage() );
if ( verbose ) {
e.printStackTrace();
}
}
}
COM: <s> processes the opening of a file via the launcher </s>
|
funcom_train/50177391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addClassInMaps(final DbRuntimeClass dbClass) throws RuntimeException {
try {
dbClassByClass.put(Class.forName(dbClass.getClassName()), dbClass);
} catch (Exception e) {
throw new RuntimeException(e);
}
dbClassByName.put(dbClass.getClassName(), dbClass);
}
COM: <s> internal use only register class in all mapping structures </s>
|
funcom_train/18645701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(ServiceDescription sdesc) {
boolean ret=false;
ServiceDescription[] list=getServiceDescriptions();
for (int i=0; ret == false && list != null &&
i < list.length; i++) {
ServiceDescription sd=(ServiceDescription)
list[i];
if (sd.getFullyQualifiedName().equals(sdesc.getFullyQualifiedName())) {
ret = true;
}
}
return(ret);
}
COM: <s> this method returns whether the supplied service description </s>
|
funcom_train/32092923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasConnection(int iDestAddr, int iDestPort) {
for(int i=0; i < m_Connections.size(); i++ ) {
if ( (((CommConfig)m_Connections.get(i)).destAddr == iDestAddr) &&
(((CommConfig)m_Connections.get(i)).destPort == iDestPort) )
return true;
}
return false;
}
COM: <s> checks whether a connection to the specified destination node and port exists </s>
|
funcom_train/48622137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteDatabase(Long fileServerId, String name) {
DefaultFileServer defaultFileServer = (DefaultFileServer)this.fileServerDAO.getById(fileServerId, false);
boolean deleted = false;
if(defaultFileServer != null)
{
defaultFileServer.deleteDatabase(name);
}
try
{
fileServerDAO.makePersistent(defaultFileServer);
}
catch(Exception e)
{
throw new RuntimeException("Could not delete the file database " + name
+ " in file server " + defaultFileServer );
}
return deleted;
}
COM: <s> delete fhe file database from the specified file server </s>
|
funcom_train/26614797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton3() {
if (jButton3 == null) {
jButton3 = new JButton();
jButton3.setBounds(280, 100, 100, 30);
jButton3.setText("cancel");
jButton3.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
serverToDelete.setText("");
jPanel.setVisible(false);
startPanel.setVisible(true);
}
});
}
return jButton3;
}
COM: <s> this method initializes j button3 </s>
|
funcom_train/50775249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj instanceof BackendFileTreeNode) {
BackendFileTreeNode node = (BackendFileTreeNode) obj;
if (node.getFile() == null) {
if (getUserObject() == null)
return true;
else
return false;
}
if (getUserObject() == null)
return false;
if (node.getFile().equals(getUserObject()))
return true;
}
return false;
}
COM: <s> compares the specified object with itself </s>
|
funcom_train/28477468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renameFileInGuest(String oldName, String newName) throws VixException {
VixHandle jobHandle = VixWrapper.VixVM_RenameFileInGuest(vmHandle,
oldName, newName, 0, new VixHandle(VixWrapper.VIX_INVALID_HANDLE), null, null);
try {
/*List result =*/ VixWrapper.VixJob_Wait(jobHandle, Collections.EMPTY_LIST);
} finally {
VixWrapper.Vix_ReleaseHandle(jobHandle);
}
}
COM: <s> this function renames a file or directory in the guest operating system </s>
|
funcom_train/48382622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int place(int offset, EncodedMethod previousEncodedMethod) {
int previousIndex = previousEncodedMethod==null?0:previousEncodedMethod.method.getIndex();
offset += Leb128Utils.unsignedLeb128Size(method.getIndex() - previousIndex);
offset += Leb128Utils.unsignedLeb128Size(accessFlags);
offset += codeItem==null?1:Leb128Utils.unsignedLeb128Size(codeItem.getOffset());
return offset;
}
COM: <s> calculates the size of this code encoded method code and returns the offset </s>
|
funcom_train/48336138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
if (runner == null) {
try {
serverSocket = new ServerSocket(portNumber);
runner = new Thread(this);
runner.start();
} catch (IOException ioe) {
System.out.println("TCPServerSocket init error: "+ioe + " on port number "+portNumber);
}
}
}
COM: <s> starts a server socket and a thread with this tcpserver socket as the </s>
|
funcom_train/14364927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fillActionsBars(IActionBars actionBars_p, List<IAction> actions_p) {
for (IAction action : actions_p) {
if (action.isEnabled()) {
actionBars_p.setGlobalActionHandler(action.getId(), action);
}
}
}
COM: <s> fill action bars </s>
|
funcom_train/18548425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DataAccess getDBClass(Integration iobj) throws BusinessException{
DataAccess response = null;
if (iobj instanceof ResourceTaskAllocIntegration) {
response = new ResourceTaskAllocDAO();
} else if (iobj instanceof ResourceTaskIntegration){
response = new ResourceTaskDAO();
} else {
throw new BusinessException("The Integration object didn't match with any DataAccess object of system");
}
return response;
}
COM: <s> return the dao object based on integration object info </s>
|
funcom_train/35092394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMatch(V value, String string) {
String lcString = string.toLowerCase();
StringCharacterIterator it = new StringCharacterIterator(lcString);
TrieNode node = root;
//Traverse the trie and create new nodes as necessary
for (char c = it.first(); c != CharacterIterator.DONE; c = it.next()) {
node = node.createSibling(c);
if (node == null) return; //createSibling could fail in case of incorrect input
}
node.data = (Object)value;
}
COM: <s> adds a string with its id number to the list of matches </s>
|
funcom_train/31702382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createBoundariesD(int iX0, int iXE, int iY0, int iYE) {
this.iX0 = iX0;
this.iXE = iXE;
this.iY0 = iY0;
this.iYE = iYE;
nSpaceD = new Rectangle(iX0, iY0, iXE - iX0, iYE - iY0);
}
COM: <s> creates the boundaries those on screen to draw in </s>
|
funcom_train/36110544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getAvantiCommand() {
if (avantiCommand == null) {//GEN-END:|215-getter|0|215-preInit
// write pre-init user code here
avantiCommand = new Command("Avanti", Command.OK, 0);//GEN-LINE:|215-getter|1|215-postInit
// write post-init user code here
}//GEN-BEGIN:|215-getter|2|
return avantiCommand;
}
COM: <s> returns an initiliazed instance of avanti command component </s>
|
funcom_train/27823673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnName(int columnIndex) {
LocalizationManager localizationManager=m_oimodelerViewable.getModule().getAppDriver().getLocalizationManager();
switch (columnIndex) {
case 0:
return " ";
case 2:
default:
return localizationManager.getPhrase("oimodeler.searchResultName");
}
}
COM: <s> returns the name of the column </s>
|
funcom_train/27821747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyCommandException(Command command,CommandException commandException) {
m_executingCommand=false;
Object[] listeners=m_listenerList.getListenerList();
for (int i=listeners.length-2;i>=0;i-=2)
if (listeners[i]==CommandManagerListener.class)
((CommandManagerListener)listeners[i+1]).commandException(this,command,commandException);
}
COM: <s> called on the main thread when asynchronous command invocation throws an error </s>
|
funcom_train/19436932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWindowSize() {
if (Gui.screenIs(Gui.PDA_SCREEN)) {
// ZAURUS
windowFlagsToSet |= Window.FLAG_FULL_SCREEN;
windowFlagsToClear |= Window.FLAG_HAS_CLOSE_BUTTON;
} else {
//setFixedSize(240, 280); // simulating Zaurus
setPreferredSize(240, 280);
}
}
COM: <s> set size of window </s>
|
funcom_train/25365986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCreatureClassPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Creature_creatureClass_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Creature_creatureClass_feature", "_UI_Creature_type"),
LeveleditorPackage.Literals.CREATURE__CREATURE_CLASS,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the creature class feature </s>
|
funcom_train/43621730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUserNameEnabled(boolean enabled) {
boolean old = isUserNameEnabled();
this.namePanelEnabled = enabled;
if (namePanel != null) {
namePanel.setEnabled(enabled);
namePanel.setEditable(enabled);
}
firePropertyChange("userNameEnabled", old, isUserNameEnabled());
}
COM: <s> enables or disables strong user name strong for this panel </s>
|
funcom_train/40678918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(final UNKNOWN_TYPE listener) {
connect(UNKNOWN_TYPE.class, listener, new GstCallback() {
@SuppressWarnings("unused")
public void callback(DecodeBin2 elem, Pad pad, Caps caps) {
listener.unknownType(elem, pad, caps);
}
});
}
COM: <s> adds a listener for the code unknown type code signal </s>
|
funcom_train/23869799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean MASKData(FrameData f) {
if(size() != f.size())
return false;
for(int i = 0; i < size(); i++) {
// result = curValue & ( ~Mask)
int orValue = get(i) & ( ~f.get(i) ) ;
setData(i, orValue);
}
return true;
}//end ORData
COM: <s> zeros out data in this frame data that are ones in f </s>
|
funcom_train/48337774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (this == o) return true;
if (! (o instanceof Syntax)) return false;
Syntax other = (Syntax)o;
return ( (name.equals(other.name))
&& (opcode == other.opcode)
&& (minArgs == other.minArgs)
&& (maxArgs == other.maxArgs));
}
COM: <s> determine whether this syntax form equals the specified </s>
|
funcom_train/21878380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean projectExists(String projectName) throws DepoException {
String projects[] = this.listProjects();
if (!Arrays.asList(projects).contains(projectName)) {
logger.debug("project " + projectName + " does not show up in listProjects()");
return false;
}
return true;
}
COM: <s> determines if project project name exists </s>
|
funcom_train/48444618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bindSelection(DataBindingContext bindingContext, Observable bean, String beanPropertyName, String... propertyNamesToObserve) {
// TODO observe composite property to update text field when selected entity changes
IObservableValue beanObserveValue = BeansObservables.observeValue(bean, beanPropertyName);
IObservableValue selectedObserveValue = BeansObservables.observeValue(this, PROP_selected);
bindingContext.bindValue(selectedObserveValue, beanObserveValue, null, null);
}
COM: <s> a convenience method for manually binding selection to a property since </s>
|
funcom_train/40312110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetColumnLabel_InvalidColumn1() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.getColumnLabel(-1);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by getColumnLabel method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests get column label with negative column index </s>
|
funcom_train/12272822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer str = new StringBuffer();
str.append("[");
str.append(getPath());
str.append(",");
str.append(FileStatus.asString(getFileStatus()));
str.append(":Opn=");
str.append(getOpenCount());
str.append(",Str=");
str.append(getStreamCount());
str.append(":");
str.append(",Fid=");
str.append(getFileId());
str.append(",Expire=");
str.append(getSecondsToExpire(System.currentTimeMillis()));
str.append(",Sts=");
str.append(_fileStates[getStatus()]);
str.append(",Locks=");
str.append(numberOfLocks());
str.append("]");
return str.toString();
}
COM: <s> return the file state as a string </s>
|
funcom_train/1797186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReverse(Boolean reverse) {
if (reverse == null) {
reverse = false;
}
// check if setting to existing value
if (!this.reverse.equals(reverse)) {
// set to new value for customer parameter
this.reverse = reverse;
setStringCustomParameter("reverse", !reverse ? null : reverse.toString());
}
}
COM: <s> sets the whether to sort in descending or ascending order </s>
|
funcom_train/25749449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showInformation(Information info, int document) {
// create and configure window
com.extjs.gxt.ui.client.widget.Window window = new com.extjs.gxt.ui.client.widget.Window();
window.setSize(600, 400);
window.setBodyStyleName("tc-information-window");
window.setHeading("Additional Information on " + info.getId());
window.setModal(true);
window.add(new TCInformationWidget(info, document));
window.show();
}
COM: <s> displays some information window </s>
|
funcom_train/42652685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDefaultStatus() {
CheckBoxTreeModel model = createTestModel() ;
model.setDefaultStatus(true);
assertTrue(model.getRootStatus(model.getRoots().get(0)));
model.setDefaultStatus(false);
assertFalse(model.getRootStatus(model.getRoots().get(0)));
}
COM: <s> tests that the default statuses is applied for each node when </s>
|
funcom_train/10254313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Type translateType(Type type) {
if (this.translateDTIType) {
if (type.isIntervalType()) {
type = new CharacterType(Types.SQL_VARCHAR,
type.displaySize());
} else if (type.isDateTimeTypeWithZone()) {
type = ((DateTimeType) type).getDateTimeTypeWithoutZone();
}
}
return type;
}
COM: <s> translates an interval type to varchar </s>
|
funcom_train/33395429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setPasswordField() {
passwordLabel = new HTML(custPasswordLabel);
passwordField = new PasswordTextBox();
passwordField.setWidth("15em");
passwordField.addKeyPressHandler(keyHandler);
form.setWidget(ROW_PASSWD, COL_LABEL, passwordLabel);
form.setWidget(ROW_PASSWD, COL_WIDGET, passwordField);
}
COM: <s> create the whole password field and add it to the form </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.