__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/1798156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addIfElement(QName id) {
ElementKey<?, ?> elemKey;
if (selectedElement != null) {
elemKey = selectedElement.findElement(id);
if (elemKey == null) {
return false;
}
selectedElement = selectedElement.bindElement(elemKey);
} else {
elemKey = ElementKey.of(id);
}
addToStepList(elemKey);
return true;
}
COM: <s> conditionally adds a new element path step </s>
|
funcom_train/11009445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte getConditionType(){
switch (_cfRule.getType().intValue()){
case STCfType.INT_EXPRESSION: return ConditionalFormattingRule.CONDITION_TYPE_FORMULA;
case STCfType.INT_CELL_IS: return ConditionalFormattingRule.CONDITION_TYPE_CELL_VALUE_IS;
}
return 0;
}
COM: <s> type of conditional formatting rule </s>
|
funcom_train/33959357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private HtmlTag createTextarea() {
HtmlTag textarea = new HtmlTag( "textarea" );
textarea.addAttribute("id", "experior");
textarea.addAttribute("rows", "50");
textarea.addAttribute("cols", "130");
textarea.addAttribute("class", "experior");
if( content.isEmpty() )
textarea.add(" " );
else
textarea.add( content );
return textarea;
}
COM: <s> creates a html tag object with a textarea </s>
|
funcom_train/3746659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getRoot() {
// the root element is always a group
try {
GroupDO root = addressBook.findGroupByPrimaryKey(securitySession, rootId);
return new PersonTreeNode(root);
} catch(CausedByException e) {
throw new RuntimeException("ERROR in group tree model: could not locate root with id '"
+ rootId
+ "'",
e);
}
}
COM: <s> p get the root node of the tree </s>
|
funcom_train/27944562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void enableGC(boolean enable) {
try {
if( enable ) {
iprof.enableGC();
}
else {
iprof.disableGC();
}
} catch (COMMUN_Exception e) {
fireVMDisconnected();
} catch (UNAVAILABLE_Exception e) {
//PENDING
throw new RuntimeException("TODO: handle this: \"Enabling of Garbage Collection is unavailable\"" + e.getMessage());
}
}
COM: <s> enables disables the garbage collection in the mirrored virtual machine </s>
|
funcom_train/3714120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void saveAsImage(String dummy) {
String filename = getSaveFileName(".jpg", null, null, JMenuItem36);
SpvImageWriter writer = new SpvImageWriter();
try {
writer.write(main_widget.getJComponent(), filename, "jpg");
} catch (IOException e) {
handleException(e);
}
}
COM: <s> saves the main display area to a jpeg file </s>
|
funcom_train/50577216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean addFile(MusicFile f, TuneologyStatus pm) {
try {
if (f != null) {
((DirectoryContents) contents).add(f);
return true;
} else
return false;
} catch (Exception ex) {
Tuneology.logException(ex, "addFile");
return false;
}
}
COM: <s> add a file to the directory </s>
|
funcom_train/18878650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EuclideanVector getCurrentAtLocationAndTime(Position position, Date time) throws IOException, NoValidGribException, NotSupportedException, OutOfGribSectorException {
double u = this.getDataAtLocationAndTime(uCurrentData, position, time);
double v = this.getDataAtLocationAndTime(vCurrentData, position, time);
return computeVector(u, v);
}
COM: <s> retrieves the current at a specific location at a given time </s>
|
funcom_train/48588165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CalendarEventEntry createWebContentEvent(String title, String type, String url, Person author, String icon, String width, String height, String domainName, String calendarId) throws ServiceException, IOException, Exception {
WebContent wc = new WebContent();
wc.setHeight(height);
wc.setWidth(width);
wc.setTitle(title);
wc.setType(type);
wc.setUrl(url);
wc.setIcon(icon);
return createEvent(title, null, author, null, false, wc, domainName, calendarId);
}
COM: <s> creates a web content event </s>
|
funcom_train/31224099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel addField(String text) {
JLabel f = new JLabel(text);
f.setFont(FONT_FIELD);
layout.putConstraint(SpringLayout.WEST, f, 5, SpringLayout.EAST, indexComponent);
layout.putConstraint(SpringLayout.NORTH, f, 0, SpringLayout.NORTH, indexComponent);
this.add(f);
indexComponent = f;
return f;
}
COM: <s> adds a field to zone information pane </s>
|
funcom_train/20643737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireEvent(Named who, NamedEvent ne) {
// TODO Reactivate the following assertion when the problem in
// compactNode is resolved.
//assert Thread.currentThread() != m_eventQueueThread :
// "An event should not encours other events.";
synchronized(m_eventQueue) {
m_eventQueue.addLast(new EventQueueListItem(who,ne));
}
synchronized(m_eventQueueThread) {
m_eventQueueThread.notify();
}
}
COM: <s> fire an event </s>
|
funcom_train/11722381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExternalEntities() {
try {
String source =
"<!DOCTYPE foo SYSTEM \"http://invalid.address/\"><foo/>";
new ParsingContentHandler(new DefaultHandler()).parse(
new ByteArrayInputStream(source.getBytes("UTF-8")));
} catch (Exception e) {
fail("JCR-1355: XML import should not access external entities");
}
}
COM: <s> test case for jcr 1355 </s>
|
funcom_train/3154295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetUnit() {
testSetUnit(_rsBandBlaByte5050);
testSetUnit(_rsBandBlubbUShort1010);
testSetUnit(_rsBandTestShort2020);
testSetUnit(_rsBandGnmpfInt1515);
testSetUnit(_rsBandBlimFloat2323);
testSetUnit(_rsBandBlepDouble100100);
}
COM: <s> tests base class functionality set unit </s>
|
funcom_train/8012510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getTableNames() {
loadTable(null);
Enumeration enumera = _tables.keys();
StringVector tables = new StringVector(_tables.size());
String tableName = "";
while (enumera.hasMoreElements()) {
tableName = (String) enumera.nextElement();
tables.addElement(tableName);
}
tables.sort();
return tables;
}
COM: <s> returns a vector of all the table names in the database </s>
|
funcom_train/1151455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initFallback() {
String[] cnames =
(supportsSimpleLabels==SupportsSimpleLabels.MultipleBinary) ?
new String[] {DIS_NAME, NOT_DIS_NAME} : new String[0];
String defName = (cnames.length==0) ? null : NOT_DIS_NAME;
Discrimination f = addDiscrimination(SYSDEFAULTS, cnames,
defName, null,
SysDefaults.dcs, true);
}
COM: <s> creates a fallback discrimination in this suite and initializes it with sysdefaults </s>
|
funcom_train/37836676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void syncPlayerStatus(List<String> names) {
final List<Player> players = new ArrayList<Player>();
for (IEntity entity : GameObjects.getInstance()) {
if (entity instanceof Player) {
if (names.contains(entity.getName())) {
players.add((Player) entity);
}
}
}
if (!players.isEmpty()) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
panel.addPlayers(players);
}
});
}
}
COM: <s> update the status of players just added to the group </s>
|
funcom_train/3341345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendEchoReply(ICMPEchoHeader hdr, SocketBuffer skbuf) throws SocketException {
final IPv4Header ipHdr = (IPv4Header) skbuf.getNetworkLayerHeader();
final IPv4Header ipReplyHdr = new IPv4Header(ipHdr);
ipReplyHdr.swapAddresses();
ipReplyHdr.setTtl(0xFF);
send(ipReplyHdr, hdr.createReplyHeader(), new SocketBuffer(skbuf));
}
COM: <s> send a reply on an icmp echo header </s>
|
funcom_train/33847297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Project project2) {
analysisTargets = appendWithoutDuplicates(analysisTargets, project2.analysisTargets);
srcDirList = appendWithoutDuplicates(srcDirList, project2.srcDirList);
auxClasspathEntryList = appendWithoutDuplicates(auxClasspathEntryList, project2.auxClasspathEntryList);
}
COM: <s> add information from project2 to this project </s>
|
funcom_train/12913017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public double min(double[] value) {
double min = 0.0;
if (value.length > 0) min = value[0];
for (int i = 0; i < value.length; ++i) {
if (value[i] < min) min = value[i];
}
return min;
}
COM: <s> find the minimum of an array of numbers </s>
|
funcom_train/10906879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getPDFNameForCIDFontType(CIDFontType cidFontType) {
if (cidFontType == CIDFontType.CIDTYPE0) {
return cidFontType.getName();
} else if (cidFontType == CIDFontType.CIDTYPE2) {
return cidFontType.getName();
} else {
throw new IllegalArgumentException("Unsupported CID font type: "
+ cidFontType.getName());
}
}
COM: <s> returns the pdf name for a certain cid font type </s>
|
funcom_train/37062210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillUpperXVector( double max ) {
pointsUpperX.removeAllElements();
int y = 0;
for( int i = 0; i <= gWidth; i++ ) {
y = (int) (max * (double) i / (double) gWidth);
pointsUpperX.add( new Point2D.Double( i, y ) );
}
}
COM: <s> scaling the upper x axis save pixel value assignment in vector </s>
|
funcom_train/6464432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCustomData(ICustomData customData) {
if(customData == null) {
AILibException e = new AILibException(this.getClass(), "setCustomData(ICustomData)", Messages.get("null.argument"));
} else
this.customData = customData;
}
COM: <s> assigns a new custom data object to this genome </s>
|
funcom_train/3703524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAllVariants(String strVariant, String strDataFormat) {
mapVariants.put(strVariant, strDataFormat);
mapVariants.put(strVariant.toUpperCase(), strDataFormat);
mapVariants.put(strVariant.toLowerCase(), strDataFormat);
} // of method
COM: <s> add upper and lower case variants </s>
|
funcom_train/29546686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SourceTwikiFileProperty getSourceTWikiFileProperty() {
ArrayList sourceTWikiFileProperties
=(ArrayList)resource.data.properties.get(SourceTwikiFileProperty.qname);
if(sourceTWikiFileProperties==null) {
return null;
} else {
return (SourceTwikiFileProperty)sourceTWikiFileProperties.get(0);
}
}
COM: <s> get source twiki file property </s>
|
funcom_train/50156341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCommonDirs(String[] dirs) {
/*
* for (int i = 0; (i < dirs.length) && (i < commonDirs.length); i++) {
* commonDirs[i] = dirs[i];
* }
*/
int n = getMAX_DIRS();
commonDirs = new String[n];
for (int i = 0; i < n; i++) {
commonDirs[i] = dirs[i];
}
}
COM: <s> sets the common dirs attribute of the harvester admin form object </s>
|
funcom_train/10658763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBasic() throws Exception {
System.setSecurityManager(new RMISecurityManager());
// Create registry.
int port = CUSTOM_PORT_1;
Registry reg = LocateRegistry.createRegistry(port);
System.out.println("Registry on CUSTOM port ("
+ port + ") created.");
// Destroy registry.
UnicastRemoteObject.unexportObject(reg, true);
System.out.println("Test complete.");
}
COM: <s> tests registry creation and destruction </s>
|
funcom_train/15819905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JonasProject getProject(TargetModuleID tmID) {
if (!Utilities.isWindows()) {
return projects.get(tmID.getModuleID());
} else {//on windows a "\" is added to the path in 0 position
String key = Utils.replaceSlashes(tmID.getModuleID().substring(1));
return projects.get(key);
}
}
COM: <s> get the project of the deployed module defined by its target module id </s>
|
funcom_train/20775900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float normalizedDot(Vector v) {
double s1 = this.norm();
double s2 = v.norm();
if (s1 == 0 || s2 == 0) return 0;
float d = 0;
for (int i = 0; i < this.getDimension(); i++) {
d += (this.get(i) / s1) * (v.get(i) / s2);
}
return d;
}
COM: <s> computes the dot product between this and the given vector </s>
|
funcom_train/22184702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
logger.info("Menu request: bring frame " + frame.getTitle() + " to front.");
// De-icon and select the internal frame if possible, and move it to front
try {
frame.setIcon(false);
frame.setSelected(true);
} catch (java.beans.PropertyVetoException ex) {
logger.info("Could not select the requested frame.", ex);
}
frame.moveToFront();
DeepEmailDesktop.getInstance().validate();
}
COM: <s> bring the associated frame to the front </s>
|
funcom_train/5346522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddAlternateLocation() {
AlternateLocationCollection alc =
AlternateLocationCollection.create(_alCollection.getSHA1Urn());
Iterator iter = _alternateLocations.iterator();
int i = 0;
for(AlternateLocation al = (AlternateLocation)iter.next();
iter.hasNext(); al = (AlternateLocation)iter.next()) {
alc.add(al);
assertEquals("was not able to add as new",
++i, alc.getAltLocsSize() );
}
}
COM: <s> tests the method for adding alternate locations to this alternate </s>
|
funcom_train/37860473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addObserversToIndexer(DBBroker broker, Indexer indexer) {
broker.deleteObservers();
if (observers != null) {
for (int i = 0; i < observers.length; i++) {
indexer.addObserver(observers[i]);
broker.addObserver(observers[i]);
}
}
}
COM: <s> add observers to the indexer </s>
|
funcom_train/32830415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getLong(String sql, Object... args) {
Long result = getObject(sql, Long.class, args);
if (result == null) {
throw new UnitilsException("Unable to get long value. Statement returned a null value: '" + sql + "'.");
}
return result;
}
COM: <s> returns the long extracted from the result of the given query </s>
|
funcom_train/3832492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FeatureListURL createFeatureListURL( Element element ) throws XMLParsingException {
// required: <Format>
String format = XMLTools.getRequiredStringValue( "Format", wmsNS, element );
// required: <OnlineResource>
URL onlineResource = createOnlineResource( XMLTools.getRequiredChildByName(
"OnlineResource", wmsNS, element ) );
return new FeatureListURL_Impl( format, onlineResource );
}
COM: <s> creates a tt feature list url tt instance according to the contents of </s>
|
funcom_train/1574604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void computeProtocolRoots() {
// Create the protocol tree
// protocolRoots = getProtocolTree(getRoots(), new TreeMap<Object[],
// List<ProtocolNode>>(Comparators.OBJECT_COMPARE));
// protocolRoots = getProtocolTree(getRoots(), new TreeMap<Object[],
// List<ProtocolNode>>());
protocolRoots = getProtocolTree(getRoots(), new THashMap());
}
COM: <s> compute protocol roots </s>
|
funcom_train/8992438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ArrayList getfilteredListUserIDsFromWFStep(ArrayList userIdsList, WorkflowStep wstep, WorkflowProgress wprogress) throws ApplicationException {
WorkflowStepDAObject setpDAO = new WorkflowStepDAObject(this.sessionContainer, this.conn);
return setpDAO.getfilteredListUserIDsFromWFStep(userIdsList, wstep, wprogress);
}
COM: <s> get the filtered user ids list from the work flow step filter </s>
|
funcom_train/32040621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIdentifierPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StaffType_identifier_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StaffType_identifier_feature", "_UI_StaffType_type"),
ImsldPackage.eINSTANCE.getStaffType_Identifier(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the identifier feature </s>
|
funcom_train/40004037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Brain getNewBrain() {
// 50% chance of creating a new, mutated a brain
if (MoreMath.chance(.5f)) {
BrainStat brain =
(BrainStat)getRandomTopBrain().clone();
// 10% to 25% chance of changing each attribute
float p = MoreMath.random(0.10f, 0.25f);
brain.mutate(p);
return brain;
}
else {
return getRandomTopBrain();
}
}
COM: <s> gets a new brain from the gene pool </s>
|
funcom_train/17893186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemDelete() {
if (jMenuItemDelete == null) {
jMenuItemDelete = new JMenuItem(this.windowBundle
.getString("deleteMenuItem"));
jMenuItemDelete.setToolTipText(this.windowBundle
.getString("deleteMenuItemTip"));
jMenuItemDelete.setActionCommand(UiUtilities.DEL_ACTION_COMMAND);
jMenuItemDelete.addActionListener(this);
}
return jMenuItemDelete;
}
COM: <s> this method initializes j menu item delete </s>
|
funcom_train/8712292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Token next(final Token reusableToken) throws IOException {
assert reusableToken != null;
if (tokenWrapper == null)
throw new UnsupportedOperationException("This TokenStream only supports the new Attributes API.");
if (supportedMethods.hasIncrementToken) {
tokenWrapper.delegate = reusableToken;
return incrementToken() ? tokenWrapper.delegate : null;
} else {
assert supportedMethods.hasNext;
return next();
}
}
COM: <s> returns the next token in the stream or null at eos </s>
|
funcom_train/40339482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getImageUrl(String size) {
try {
List<Element> images = this.getProperties("image");
for (Element i : images) {
if (i.attributeValue("size").equals(size)) {
return new URL(i.getText());
}
}
} catch (MalformedURLException e) {
Logger._().warning("Artist:getImageUrl:MalformedURLException" + this.toString());
}
return null;
}
COM: <s> returns the url of the first picture of this artist </s>
|
funcom_train/17818462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupEditorPane() {
if (logger.isDebugEnabled()) {
logger.debug("Setup the image editing area");
}
//Setup the JPanel
jpEditor = new JPanel(new BorderLayout());
//Setups the various items on it
setupToolBar();
initExtraBar();
setupTabbedPane();
//add it to the frame
cont.add(jpEditor, BorderLayout.CENTER);
if (logger.isDebugEnabled()) {
logger.debug("setupEditorPane() - end");
}
}
COM: <s> setups the editor pane which containts the </s>
|
funcom_train/50862617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SettlementTemplate getSettlementTemplate(String templateName) {
SettlementTemplate result = null;
Iterator<SettlementTemplate> i = settlementTemplates.iterator();
while (i.hasNext()) {
SettlementTemplate template = i.next();
if (template.getTemplateName().equals(templateName)) result = template;
}
if (result == null) throw new IllegalArgumentException("templateName: "
+ templateName + " not found.");
return result;
}
COM: <s> gets the settlement template that matches a template name </s>
|
funcom_train/26171847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Table get ( String name, Row row ) {
if ( null == name || 0 == name.length() || null == row )
throw new IllegalArgumentException( "must provide a name and a valid row description" );
return new TSVTable( _dbPath + name, row.columnNames().length, true, true, true );
}
COM: <s> returns a table implementation for a given row description </s>
|
funcom_train/25473756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispatchEvent(IEvent<?> event){
for (int i = 0; i < targetList.size(); i++){
try{
Object targetObject = targetList.get(i);
String targetObjectMethod = targetMethodNameList.get(i);
callMethod(targetObject, targetObjectMethod, event);
}catch (InvocationTargetException e){
throw new RuntimeException(e);
}catch (Exception e){
throw new RuntimeException(e);
}
}
}
COM: <s> send an event to every target which has been added to this record </s>
|
funcom_train/50586527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
originalPropertiesPath = ClassLoader.getSystemClassLoader().getResource("bugkilla.properties").getPath();
System.out.println(originalPropertiesPath+"setUp: originalProsAAAAAAAAAAAAAAAAAAAAaa");
File original = new File(originalPropertiesPath);
System.out.println("copy");
System.out.println(originalPropertiesPath);
System.out.println(originalPropertiesPath + "tmp");
File next = new File(originalPropertiesPath + "tmp");
boolean b = original.renameTo(next);
System.out.println(b);
super.setUp();
}
COM: <s> sets original properties path to the location of the properties file </s>
|
funcom_train/28121695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newKey() {
String sNewKey =
JOptionPane.showInputDialog(
moPanel.getParent(),
Resources.getString("new_attr_message"),
Resources.getString("new_attr_title"),
JOptionPane.QUESTION_MESSAGE);
if (sNewKey != null) {
PreferencesModel.Instance().setAttribute(sNewKey, "");
}
}
COM: <s> prompts for and creates a new attribute key for the </s>
|
funcom_train/8367590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBack() {
if (back == null) {//GEN-END:|33-getter|0|33-preInit
// write pre-init user code here
back = new Command("Zur\u00FCck", Command.BACK, 0);//GEN-LINE:|33-getter|1|33-postInit
// write post-init user code here
}//GEN-BEGIN:|33-getter|2|
return back;
}
COM: <s> returns an initiliazed instance of back component </s>
|
funcom_train/34526465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Cell getCell(int col, int row) {
Cell cell = new Cell(col, row);
if (!cellProperties.containsKey(cell)) {
String msg = "The cell (" + col + "," + row + ") doesn't" +
"exist in the table template '" + name + "'.";
throw new IllegalArgumentException(msg);
}
return cell;
}
COM: <s> gets the cell object representing the specified column </s>
|
funcom_train/18484509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Object key) {
Object rc;
if (hashMap == null) {
outError.fireOutPin("remove: map not initialized");
return;
}
if (key == null) {
outError.fireOutPin("remove: parameter is null");
return;
}
rc = hashMap.remove(key);
if (rc == null) {
outError.fireOutPin("remove: No mapping for this key");
}
}
COM: <s> removes the mapping for this key from this map if present </s>
|
funcom_train/37583315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public T last() {
Iterable<? extends T> lastNonEmpty = null;
for (Iterable<? extends T> iter : _iters) {
if (lastNonEmpty == null || !IterUtil.isEmpty(iter)) { lastNonEmpty = iter; }
}
return IterUtil.last(lastNonEmpty);
}
COM: <s> determine the last value in the iterable </s>
|
funcom_train/34356347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSourceModel(SourceModel sourceModel) {
// if there is a current source model, remove this object from its dependent models
if (this.sourceModel != null) {
this.sourceModel.removeDependentModel(this);
}
this.sourceModel = sourceModel;
// add this object to the new source model, as a dependent model
if (sourceModel != null) {
sourceModel.addDependentModel(this);
this.dereferenced = sourceModel.isDereferenced();
}
}
COM: <s> sets the source model for this object i </s>
|
funcom_train/17592482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int numInterleaveConstraints() {
int n = 0;
for (Iterator i = list.iterator(); i.hasNext(); ) {
Object o = i.next();
if (o instanceof Collection) {
int k = ((Collection) o).size();
n += k * (k-1) / 2;
}
}
return n;
}
COM: <s> get the number of interleave constraints in this order </s>
|
funcom_train/3791843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shwMsg(final String n) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
try {
_doc.insertString(_doc.getLength(), "\n" + n + "", getStyle("regular"));
} catch ( BadLocationException ble ) {
Debug.signal(Debug.WARNING, null, "Couldn't insert Message.");
}
}
});
//this.arrangeScrollBars();
}
COM: <s> shows a normal string of text in the displayer </s>
|
funcom_train/34564609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ch(final int ch) throws IOException {
switch(ch) {
case '&': print(E_AMP); break;
case '>': print(E_GT); break;
case '<': print(E_LT); break;
case 0xD: print(E_CR); break;
default : print(ch);
}
}
COM: <s> prints a single character </s>
|
funcom_train/37854699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleLogEntry(SVNLogEntry logEntry) throws SVNException {
try {
sendToHandler(logEntry);
} catch (SAXException e) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.XML_MALFORMED, e.getLocalizedMessage());
SVNErrorManager.error(err, e, SVNLogType.DEFAULT);
}
}
COM: <s> handles a next log entry producing corresponding xml </s>
|
funcom_train/20081485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean hasInterface(Class<?> clazz, Class<?> interfaceClass) {
if (clazz == null)
return false;
if (clazz.equals(interfaceClass)) {
return true;
}
// Recursively Process All Interfaces
for (Class<?> c : clazz.getInterfaces()) {
if (hasInterface(c, interfaceClass)) {
return true;
}
}
// Recursively Process Super Class
if (hasInterface(clazz.getSuperclass(), interfaceClass)) {
return true;
}
return false;
}
COM: <s> returns true if the given class implements a given interface either </s>
|
funcom_train/10549087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String findDefaultBuiltinAlgorithm() {
try {
// First check for the preferred default, and return it if present
MessageDigest.getInstance(
Property.AUTHENTICATION_BUILTIN_ALGORITHM_DEFAULT);
return Property.AUTHENTICATION_BUILTIN_ALGORITHM_DEFAULT;
} catch (NoSuchAlgorithmException nsae) {
// Couldn't find the preferred algorithm, so use the fallback
return Property.AUTHENTICATION_BUILTIN_ALGORITHM_FALLBACK;
}
}
COM: <s> find the default message digest algorithm to use for builtin </s>
|
funcom_train/3417870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Number parse(String source) throws ParseException {
ParsePosition parsePosition = new ParsePosition(0);
Number result = parse(source, parsePosition);
if (parsePosition.index == 0) {
throw new ParseException("Unparseable number: \"" + source + "\"",
parsePosition.errorIndex);
}
return result;
}
COM: <s> parses text from the beginning of the given string to produce a number </s>
|
funcom_train/7629057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void acquire() {
synchronized (mBinder) {
if (mRefCounted ? (++mRefCount > 0) : (!mHeld)) {
try {
mService.acquireWifiLock(mBinder, mLockType, mTag);
} catch (RemoteException ignore) {
}
mHeld = true;
}
}
}
COM: <s> locks the wi fi radio on until </s>
|
funcom_train/8061045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidNode(IElement ele) {
if (ele.isTextNode()) {
return null != ele.getTextNodeText() && ele.getTextNodeText().trim().length() > 0;
} else {
Rectangle rect = rectangleFactory.create(ele);
return rect.getHeight() != 0 || rect.getWidth() != 0;
}
}
COM: <s> a node that can be seen through the browser </s>
|
funcom_train/20139237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void activate(Controller theController) {
if (map.containsKey(theController)) {
startTime = System.nanoTime();
_myController = theController;
currentPosition.set(theController.getControlWindow().mouseX, theController.getControlWindow().mouseY, 0);
updateText(map.get(_myController));
_myMode = ControlP5.WAIT;
}
}
COM: <s> a tooltip is activated when the mouse enters a controller </s>
|
funcom_train/4375696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int hash = LangUtils.HASH_SEED;
hash = LangUtils.hashCode(hash, this.getName());
hash = LangUtils.hashCode(hash, this.cookieDomain);
hash = LangUtils.hashCode(hash, this.cookiePath);
return hash;
}
COM: <s> returns a hash code in keeping with the </s>
|
funcom_train/37082616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DASDsn getDSN(String uri) {
if (dsnList == null)
getDSNs(); // fills in dsnList
Iterator dsnIterator = dsnList.iterator();
while (dsnIterator.hasNext()) {
SimpleDASDsn dsn = (SimpleDASDsn)dsnIterator.next();
if (dsn.getSourceId().equals(uri))
return dsn;
}
logger.warn("DAS2Request.getDSN: couldn't find DSN for " + uri);
return null;
}
COM: <s> given a uri return the dsn if any for that uri </s>
|
funcom_train/26011375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void process( Socket socket )
{
try{
BufferedReader in = new BufferedReader( new InputStreamReader( socket.getInputStream() ) );
PrintStream out = new PrintStream( socket.getOutputStream() );
setFirstLine(in);
setRequest();
logger.debug((r.toString()));
this.sendResponse(out, r);
out.close();
in.close();
socket.close();
}
catch( Exception e )
{
logger.debug( e.getMessage());
}
}
COM: <s> implement the handle request method </s>
|
funcom_train/11381786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void ensureAuthorizedJVM(JobID jobId) throws IOException {
String currentJobId =
UserGroupInformation.getCurrentUser().getUserName();
if (!currentJobId.equals(jobId.toString())) {
throw new IOException ("JVM with " + currentJobId +
" is not authorized for " + jobId);
}
}
COM: <s> check that the current ugi is the jvm authorized to report </s>
|
funcom_train/20675531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NodeView getLayoutRoot() {
// if (m_root != null)
return root;
// final EntitySet ts = viewSet.getGroup(group);
// if (ts instanceof Graph) {
// final Tree tree = ((Graph) ts).getSpanningTree();
// return (NodeView) tree.getRoot();
// }
// throw new IllegalStateException(
// "This action's data group does not resolve to a Graph instance.");
}
COM: <s> return the node view to use as the root for this tree layout </s>
|
funcom_train/34523850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object call_with(ELContext elctx, Object scope, Closure... args) {
if (scope instanceof ClosureObject) {
scope = ((ClosureObject)scope).get_owner();
}
EvaluationContext env = getContext(elctx);
env = env.pushContext(new EnvExtent(env, scope));
return node.invoke(env, args);
}
COM: <s> invoke the procedure within the given scope </s>
|
funcom_train/51210004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDataFileInfoText(String text) {
fileInfoArea.setText(text + "\n ");
JScrollBar sb = ((JScrollPane) fileInfoArea.getParent().getParent()).getVerticalScrollBar();
if (null != sb)
sb.setValue(sb.getMaximum());
} // private void setDataFileInfoText
COM: <s> displayes data file info </s>
|
funcom_train/3393975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Name replace(byte from, byte to) {
byte[] names = table.names;
int i = 0;
while (i < len) {
if (names[index + i] == from) {
byte[] bs = new byte[len];
System.arraycopy(names, index, bs, 0, i);
bs[i] = to;
i++;
while (i < len) {
byte b = names[index + i];
bs[i] = b == from ? to : b;
i++;
}
return fromUtf(table, bs, 0, len);
}
i++;
}
return this;
}
COM: <s> replace all from bytes in this name with to bytes </s>
|
funcom_train/17585286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void playItemClearPlaylist(SlimPlayableObject object) throws SlimException {
controlPlaylistLoad(PREFIX_TRACK_ID + object.getId());
firePlaylistEvent(new PlaylistChangeEvent(this, PlaylistChangeEvent.PLAYLIST_CLEARED, object));
firePlaylistEvent(new PlaylistChangeEvent(this, PlaylistChangeEvent.ITEM_LOADED, object));
firePlaylistEvent(new PlaylistChangeEvent(this, PlaylistChangeEvent.ITEM_CHANGED, object));
}
COM: <s> clears playlist and plays object </s>
|
funcom_train/13779669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRunmethodTestable() {
for (int i = 0; i < getNumberOfTests(); i++) {
if (getTest(i).isExpectedResultDefined() || getTest(i).isExpectedErrorDefined() ||containsFieldsForSprCellTests(getTest(i).getTestObject().getFieldValues().keySet())) {
return true;
}
}
return false;
}
COM: <s> indicates if test method has any row rules for testing target table </s>
|
funcom_train/16141123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element getFirstChild(Element el, String name) {
for (int i = 0; i < el.getElementCount(); i++) {
Element e = el.getElement(i);
if (e.getName() == name) {
return e;
}
}
if (el == null) System.err.println("Couldn't find matching child element "+name+".");
return null;
}
COM: <s> gets the first named child element </s>
|
funcom_train/42982184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillSchedData() {
Unit selUnit = (Unit) frame.cbInstUnit.getSelectedItem();
Instance inst = (Instance) frame.cbInst.getSelectedItem();
if (inst != null)
frame.ttSched.setSchedules(selUnit.getCourse(), inst.getSchedules());
else
frame.ttSched.clearSchedules();
}
COM: <s> fills the schedule data on the gui of an instance </s>
|
funcom_train/22929498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAssertNull() {
Assert.isNull(null, MESSAGE);
try {
Assert.isNull("OK", MESSAGE);
fail("Expected IllegalArumentException");
}
catch (AssertFailedException expected) {
LOG.info("Expected: " + expected);
assertExceptionMessageContains(expected, MESSAGE);
}
}
COM: <s> test the assert null method </s>
|
funcom_train/40616662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isBeforeFirst() throws SQLException {
try {
debugCodeCall("isBeforeFirst");
checkClosed();
int row = result.getRowId();
int count = result.getRowCount();
return count > 0 && row < 0;
} catch (Exception e) {
throw logAndConvert(e);
}
}
COM: <s> checks if the current position is before the first row that means next </s>
|
funcom_train/15628315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTabSplitMode(@NotNull final Tab tab, final boolean splitMode) {
if (tab.isAlternativeLocation() == splitMode) {
return;
}
final boolean open = tab.isOpen();
final DoubleButtonList buttonList = buttonLists.toggleTabSplitMode(tab);
if (open) {
buttonList.selectButton(tab.getButton(), tab.isAlternativeLocation());
}
}
COM: <s> toggles split mode for the given tab </s>
|
funcom_train/39398138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean resultExists(String domain, int queryType) {
try {
String update = "SELECT domain FROM google_query_result WHERE domain = ? AND query_type_id = ?";
Object[] args = { domain, new Integer(queryType) };
ResultSet rs = ((DBThread)Thread.currentThread()).getSQLUtils().submitQuery(update,args);
return rs.next();
} catch (SQLException sqle) {
// if failed, then assume query does NOT exist
return false;
}
}
COM: <s> lookup if query of given type on the given domain exists </s>
|
funcom_train/44016080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String transformXML(String input) {
Source xml = new StreamSource(new StringReader(input));
StringWriter text = new StringWriter();
synchronized (this.trans) {
try {
this.trans.transform(xml, new StreamResult(text));
} catch (TransformerException e) {
String err = "Unable to transform the result";
this.log.error(err, e);
text.append(err);
}
}
return text.toString();
}
COM: <s> transforms a string in the standard sparql response format into a string </s>
|
funcom_train/24001775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init(byte[] seed) {
try {
digest = MessageDigest.getInstance ("SHA");
} catch (NoSuchAlgorithmException e) {
throw new IllegalStateException("internal error: SHA-1 not available."); // InternalError("internal error: SHA-1 not available.");
}
if (seed != null) {
engineSetSeed(seed);
}
}
COM: <s> this call used by the constructors instantiates the sha digest </s>
|
funcom_train/18596054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectAWTMenuItem(MenuComponent item) {
// Can't do this through coordinates because MenuComponents don't
// store any of that information
fireAccessibleAction(getContext(item), item.getAccessibleContext().
getAccessibleAction(), toString(item));
if (queueBlocked())
key(KeyEvent.VK_ESCAPE);
}
COM: <s> select an awt menu item </s>
|
funcom_train/3542978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean restrict(Object exclude) {
int index = shownHistory.indexOf(exclude);
if (index != -1) {
if (shownHistory == history) {
shownHistory = new ArrayList<Object>(history);
}
shownHistory.remove(index);
fireIntervalAdded(this, index, index);
return true;
}
return false;
}
COM: <s> restricts the elements from the history without removing it </s>
|
funcom_train/36286050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExtractMetaDataNonExistantTable() throws Exception
{
String tableName = "nonExistantTable";
List/*<char[]>*/[] charArrays = new List/*<char[]>*/[]
{
getTableMetaDataCharArray(tableName)
};
testExtractMetaData(tableName, charArrays, null);
}
COM: <s> use activity to get meta data for a non existant table </s>
|
funcom_train/49409434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() throws Exception {
try {
Properties idLocDb = new Properties();
idLocDb.load(new FileInputStream(config.getIdLocatorDbProps()));
idLocator = new DbLoader(idLocDb);
} catch (Exception e) {
throw new RepoException(
"Error in Id Locator DB Loader during ArchiveRegister init");
}
}
COM: <s> initializes the idlocator database connections </s>
|
funcom_train/25565520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object processDataSet(DataSet value, Object object, String fieldName) {
try {
//Getting field even from subclasses.
Field field = DefaultFieldSetter.getFieldWithName(fieldName, object.getClass());
Class type = field.getType().getComponentType();
return createObjectArray(value, type);
} catch (SecurityException e) {
throw new ObjectByDataException(e.getMessage());
}
}
COM: <s> getting array from data set corresponding to some object field </s>
|
funcom_train/12923765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void orderAlpha(final byte[] img) {
byte alpha;
for (int i = 0; i < img.length; i += RGBA_CHANNELS) {
alpha = img[i + ALPHA];
img[i + ALPHA] = img[i + BLUE];
img[i + BLUE] = img[i + GREEN];
img[i + GREEN] = img[i + RED];
img[i + RED] = alpha;
}
}
COM: <s> reorder the image pixels from rgba to argb </s>
|
funcom_train/24640175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flushBuffer() throws IOException {
if (getOutput() != null) {
for (Iterator<String> i = history.iterator(); i.hasNext(); getOutput()
.println((String) i.next())) {
;
}
getOutput().flush();
}
}
COM: <s> flush the entire history buffer to the output print writer </s>
|
funcom_train/45253478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List collectDirtyEditors() {
List result = new ArrayList(3);
IEditorReference[] editors = page.getEditorReferences();
for (int i = 0; i < editors.length; i++) {
IEditorPart part = (IEditorPart) editors[i].getPart(false);
if (part != null && part.isDirty()) {
result.add(part);
}
}
return result;
}
COM: <s> answer a list of dirty editors </s>
|
funcom_train/42944405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
if (!this.hasChangeListeners()) {
this.getBackingList().clear();
}
else {
for (Iterator i = this.getBackingList().iterator(); i.hasNext();) {
Object obj = i.next();
this._remove(obj, i);
}
}
}
COM: <s> remove all of the elements in this set </s>
|
funcom_train/49631463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EntityBeanClass getBean() {
/*if (null == bean) {
bean = newEntityBeanInstance();
bean.setEntity(newEntityInstance());
} else */
if (isReloadEntity()) {
if (log.isDebugEnabled()) {
log.debug("Forced to reload entity");
}
bean.setEntity(loadEntity(bean.getId()));
setReloadEntity(false);
}
return bean;
}
COM: <s> return the attached entity bean instance </s>
|
funcom_train/44011580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTitle() {
System.out.println("getTitle");
PositionBO instance = new PositionBO();
String expResult = "";
String result = instance.getTitle();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get title method of class edu </s>
|
funcom_train/3902477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateDatafromlmsType_MaxLength(String datafromlmsType, DiagnosticChain diagnostics, Map context) {
int length = datafromlmsType.length();
boolean result = length <= 255;
if (!result && diagnostics != null)
reportMaxLengthViolation(AdlcpRootv1p2Package.Literals.DATAFROMLMS_TYPE, datafromlmsType, length, 255, diagnostics, context);
return result;
}
COM: <s> validates the max length constraint of em datafromlms type em </s>
|
funcom_train/14225926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer toString = new StringBuffer();
toString.append("EMPLOYER [{");
toString.append("name = " + this.getName() + ", ");
toString.append("address = " + this.getAddress() + ", ");
toString.append(super.toString() + "}]");
return toString.toString();
}
COM: <s> generate string representation of this </s>
|
funcom_train/44314434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isObjectMasked(int idf, int ido) {
IDSPFObject o = getObject(idf,ido);
if(o == null || o.getWFObject() == null || !(o.getWFObject() instanceof IWFOutputObject))
return false;
IWFOutputObject wf = (IWFOutputObject)o.getWFObject();
return (wf.getMasked() != 0);
}
COM: <s> checks whether a given dspf is masked or not </s>
|
funcom_train/25214069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBefore(long scaled, OcpProgram program) {
Long l = Long.valueOf(scaled);
List<OcpProgram> list = map.get(l);
if (list == null) {
list = new ArrayList<OcpProgram>();
map.put(l, list);
}
list.add(0, program);
}
COM: <s> add an omega cp program at the beginning of the pipe </s>
|
funcom_train/27822025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getSelectedFileEx() {
File selectedFile=getSelectedFile();
if (selectedFile!=null) {
FileFilter fileFilter=getFileFilter();
if (fileFilter instanceof ExtensionFileFilter) {
ExtensionFileFilter extensionFileFilter=(ExtensionFileFilter)fileFilter;
selectedFile=extensionFileFilter.mangleFileName(selectedFile);
}
}
return selectedFile;
}
COM: <s> returns the selected file with the default extension attached to it </s>
|
funcom_train/18750879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fixate(Map<String, NestedRule> subrules) {
setFixed();
if( this.subrules == null ) {
this.subrules = new HashMap<String, NestedRule> (subrules);
boolean isModifying = super.isModifying();
hasCreators = super.hasCreators();
for( NestedRule tmp : subrules.values() ) {
tmp.setFixed();
isModifying = tmp.isModifying() || isModifying;
hasCreators = tmp.hasCreators() || hasCreators;
}
setModifying(isModifying);
}
}
COM: <s> fixates the nested rule </s>
|
funcom_train/42886992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
final StringBuilder buf = new StringBuilder();
buf.append("[");
final Iterator<IndexedEntry<V>> i = iterator();
boolean hasNext = i.hasNext();
while (hasNext) {
IndexedEntry<V> e = i.next();
buf.append(e.index());
buf.append("=");
if (e.value() == this)
buf.append("(this sequence)");
else
buf.append(e.value());
hasNext = i.hasNext();
if (hasNext) buf.append(", ");
}
buf.append("]");
return buf.toString();
}
COM: <s> returns a string representation of this sequence </s>
|
funcom_train/51830156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findShortestDistance(SensorData data) {
int dist1, dist2, dist3, dist4, shortest;
dist1 = data.getUs1();
dist2 = data.getUs2();
dist3 = data.getUs3();
dist4 = data.getUs4();
shortest = dist1;
if (dist2 < shortest) {
shortest = dist2;
}
if (dist3 < shortest) {
shortest = dist3;
}
if (dist4 < shortest) {
shortest = dist4;
}
return shortest;
}
COM: <s> finds the shortest distance in the parameter </s>
|
funcom_train/31900156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renderingStarted(java.net.URL url, java.lang.String title) {
if (activeFrame == this) {
getBTC().getWorkingButton().setAnimationRun(true);
setStatus("Loading: " + url);
getStatusBar().getIOStatus().setState(IOStatus.STATE_ACTIVE);
}
}
COM: <s> rendering started method comment </s>
|
funcom_train/7981424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean lookahead() {
try {
next = this.reader.readLine();
if(next == null) {
// TODO: make this close-on-exhaust optional?
reader.close();
}
return (next!=null);
} catch (IOException e) {
logger.warning(e.toString());
return false;
}
}
COM: <s> loads next line into lookahead spot </s>
|