__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/3275705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ICSRating parseICSRating (Matcher match, int index) {
ICSRating rating = null;
try {
if (match.group(index) != null)
rating = new ICSRating(match.group(index));
}
catch (NumberFormatException e) {
Log.error(Log.PROG_WARNING,
"Can't parse rating"
+ match.group(index) + " of " + match.group(0));
if (Log.debug && debug)
Log.debug(DEBUG, "regex:", match);
}
return rating;
}
COM: <s> parses a rating and logs the correct errors if one is encountered </s>
|
funcom_train/4918252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XmlMappingMetaData getXmlMappingMetaData(String id) {
// Obtain recursive xml mappings for id
List<ReferenceXmlMapping> recursiveMappings = this.registry.get(id);
// Obtain the first meta-data (as will be the same for the id)
if (recursiveMappings != null) {
for (ReferenceXmlMapping recursiveMapping : recursiveMappings) {
return recursiveMapping.getXmlMappingMetaData();
}
}
// No mapping found
return null;
}
COM: <s> obtains the meta data of the </s>
|
funcom_train/38733750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetVisitedNodeList(){
Goal goal1 = ResourceLoader.getGoal("goalFederationNFP.wsml");
FederationGoal fedGoal = new FederationGoalImpl(goal1);
List<String> nodes = fedGoal.getVisitedNodesList();
int expectedNodesSize = 2;
assertEquals(expectedNodesSize,nodes.size());
logger.info("Goal "+fedGoal+" has "+nodes.size()+" visitedNodes: "+nodes);
}
COM: <s> testing to load list of nfp values </s>
|
funcom_train/22203438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkSetup() throws Exception {
mapResolver.resolveTopicMap(this);
if (tm == null) {
throw new NullPointerException("The Topicmap may not be null");
}
for (int i = 0; i < actions.size(); i++) {
((HarvestAction) actions.get(i)).prepare();
}
}
COM: <s> must be called after the digester has parsed the modelfile </s>
|
funcom_train/46761080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long store(final TermModel term, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
IChainStore chain = new ChainStore();
try {
Long termId = store(term, chain, call);
chain.execute();
// return primary key
return termId;
} catch (Exception ex) {
Log.exception(ex);
Log.error(term);
chain.rollback();
throw ex;
}
}}; return (Long) call(method, call);
}
COM: <s> save the term model model creating a new term or updating existing rows </s>
|
funcom_train/31251460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uninstallFile(String fileName, boolean delFile) {
// take it out of memory
_curTaskSetFiles.remove(fileName);
if (delFile) {
File f = new File(TaskScheduler.TASK_DIR + fileName);
if (f.exists()) {
_lw.logDebugMsg("TS: Deleting taskset file: " + fileName);
f.delete();
}
}
}
COM: <s> removes the task set from the current batch </s>
|
funcom_train/3398902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBaseClass(CClass base) {
assert baseClass==null;
assert base!=null;
baseClass = base;
assert nextSibling==null;
if (base instanceof CClassInfo) {
CClassInfo realBase = (CClassInfo) base;
this.nextSibling = realBase.firstSubclass;
realBase.firstSubclass = this;
}
}
COM: <s> this method accepts both </s>
|
funcom_train/43907926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testShapefileDataStore() throws Exception {
HashMap params = new HashMap();
params.put("url", TestData.url(TEST_FILE));
DataStore ds = DataStoreFinder.getDataStore(params);
assertNotNull(ds);
params.put("url", TestData.url(TEST_FILE).toString());
assertNotNull(ds);
}
COM: <s> ensure that we can create a data store using url or string url </s>
|
funcom_train/1534926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GeoPointND handleAbsoluteStartPoint(Map<String, String> attrs) {
double x = Double.parseDouble((String) attrs.get("x"));
double y = Double.parseDouble((String) attrs.get("y"));
double z = Double.parseDouble((String) attrs.get("z"));
GeoPoint p = new GeoPoint(cons);
p.setCoords(x, y, z);
return p;
}
COM: <s> create absolute start point coords expected </s>
|
funcom_train/13865125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void formatDayOfWeek(StringBuffer buf, int count, Date date) {
int value = date.getDay();
if (count >= 4) {
buf.append(dateTimeConstants.weekdays()[value]);
} else {
buf.append(dateTimeConstants.shortWeekdays()[value]);
}
}
COM: <s> formats day of week field according to pattern specified </s>
|
funcom_train/18787939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void preProcessView(MetaView view, ValidationResult messages) {
assert view != null;
String name = view.getName();
view.addAttribute(CONTAINER_CLASS, expandIdentifier(CONTAINER_CLASS_PREFIX_KEY, name,
CONTAINER_CLASS_POSTFIX_KEY));
}
COM: <s> computes the container relevant attributes for the meta view </s>
|
funcom_train/12177229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void popAll(StyleSheetContainer stylingEngine) {
if (!immutable) {
throw new IllegalStateException();
}
for (int i = compiledStyleSheets.size() - 1; i >= 0; i--) {
CompiledStyleSheet styleSheet = (CompiledStyleSheet)
compiledStyleSheets.get(i);
stylingEngine.popStyleSheet(styleSheet);
}
}
COM: <s> pop all the style sheets in the collection from the supplied styling </s>
|
funcom_train/44011419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetWageRate() {
System.out.println("setWageRate");
double wageRate = 0.0;
EmployeeBO instance = new EmployeeBO();
instance.setWageRate(wageRate);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set wage rate method of class edu </s>
|
funcom_train/18289097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLeftOne() {
testEditor.setText("hello world");
testEditor.setCaretPosition(6);
//test bold button
//start with empty editor, then attempt with text in editor.
testALS[9][0].actionPerformed(null);
assertEquals(testEditor.getText(),"hello \\begin{flushleft}"
+ "\r\n" + "\r\n" + "\\end{flushleft}world");
}
COM: <s> test left alignment with no highlight </s>
|
funcom_train/9862735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(final Named pObject) {
/*
* if (!(pObject instanceof Named)) { throw new
* IllegalArgumentException("The type of the value put into the map is not
* an implementation of Named"); }
*/
final String name = pObject.getName();
if (aStore.containsKey(name)) {
return false;
}
aStore.put(name, pObject);
return true;
}
COM: <s> add the specified value to the set </s>
|
funcom_train/21417998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyEventReceived(String eventString, double timeStarts, int counterStarts, double timeEnds, int counterEnds) {
try {
EtalisEvent event = EventBuilder.buildEventFromString(eventString);
event.setTimeStarts(new EventTimestamp(timeStarts, counterStarts));
event.setTimeEnds(new EventTimestamp(timeEnds, counterEnds));
context.outputEvent(event);
}
catch (InvalidEventFormatException e) {
logger.warning(e.toString());
}
}
COM: <s> takes the passed event constructs </s>
|
funcom_train/29773415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(IndirectObjectFactory objects) {
// right pane
nodes = new TreeNodeFactory(objects);
pdf.resetRoot(nodes, reader.getTrailer());
// left pane
pages.loadPages(pdf, PdfPageLabels.getPageLabels(reader));
outlines.loadOutlines(nodes, pdf);
form.loadFields(nodes, pdf);
xref.setObjects(objects, info);
}
COM: <s> updates the components of the rups application </s>
|
funcom_train/31800849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TaskType findTypeDB(String typeId) throws DAOException {
TaskType type = null;
String queryString = "select type " +
"from TaskType as type " +
"where type.id='" + typeId + "'";
type = (TaskType) getOne(queryString);
logger.info("Found object: " + type.getId());
return type;
} /* findTypeDB() */
COM: <s> method for finding event type with given id </s>
|
funcom_train/28266497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override
public void logoutUser(User user) {
try {
deRegisterUser(user);
ChatMessage cm = new ChatMessage(user, null, null, ChatMessage.Type.LOGOUT);
sendAndWaitMsgQueue.sendMsg(cm);
}
catch (UserException e) {
RocketServer.log().severe(user.toString() + ":" + e.toString());
}
}
COM: <s> sends a logout request for the user </s>
|
funcom_train/31682996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getLocks() throws WebDAVException {
Element lockdiscovery = (Element) getLockDiscovery();
Vector allLocks = new Vector();
if (lockdiscovery != null) {
NodeList activeLocks = ((Element) lockdiscovery).getElementsByTagNameNS("DAV:", "activelock");
Element activeLock = null;
for (int i = 0; i < activeLocks.getLength(); i++) {
activeLock = (Element) activeLocks.item(i);
allLocks.addElement(new ActiveLock(activeLock));
}
}
return allLocks;
}
COM: <s> get the locks that exist on this resource </s>
|
funcom_train/9806641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getSinkNodes() {
Collection<Object> sinks = new LinkedHashSet<Object>();
Collection nodes = this.getNodes();
for (Object node : nodes) {
Collection outputs = this.getOutputEdges(node);
if (outputs == null || outputs.isEmpty())
sinks.add(node);
}
return sinks;
}
COM: <s> returns a collection of nodes which have no predecessors </s>
|
funcom_train/38302743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
if (myLogger.isLoggable(Logger.FINE)) {
myLogger.log(Logger.FINE, "Initiate HTTPBEDispatcher shutdown");
}
// Deregister from the JICPServer
if (myID != null) {
myMediatorManager.deregisterMediator(myID);
myID = null;
}
// In case shutdown() is called while the device is disconnected
// this resets the disconnection timer (if any).
myOutgoingsHandler.setTerminating();
}
COM: <s> clean up this httpbedispatcher </s>
|
funcom_train/21918638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calculateMigrationRequirements(float deployedVersion,int deployedRevision){
if(getSinceVersion() == null || getSinceVersion().floatValue() > deployedVersion || deployedVersion == 0){
this.isNewInVersion = true;
}
if(getSinceRevision() == null || getSinceRevision().intValue() > deployedRevision || deployedRevision == 0){
this.isNewInRevision = true;
}
}
COM: <s> calculates whether this element should be added to the database 1 </s>
|
funcom_train/10794163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void syncUnique(MetaDataContext context, Unique unq) {
if (unq == null) {
_unq = null;
return;
}
_canUnq = true;
_unq = new Unique();
_unq.setIdentifier(unq.getIdentifier());
_unq.setDeferred(unq.isDeferred());
}
COM: <s> sets internal constraint information to match given mapped constraint </s>
|
funcom_train/4472282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public DataTaskResult inspectText(String szText, String szXmlBase, String szRdfSyntax, DataEvaluationConfig vc){
TaskLoad task_load = TaskLoad.loadText(szText, szXmlBase, szRdfSyntax);
//run rdf parse and validation
return inspect(new AgentModelLoaderOie(task_load), vc);
}
COM: <s> validate owl instance data in the supplied text </s>
|
funcom_train/26475342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean before(SimpleDate when) {
int other = when.getYear();
if (date.year > other)
return false;
if (date.year < other)
return true;
other = when.getMonth();
if (date.month > other)
return false;
if (date.month < other)
return true;
other = when.getDay();
if (date.day > other)
return false;
if (date.day < other)
return true;
return (this.nanoSeconds < when.getNanoSecondsSinceMidnight());
}
COM: <s> tests if this timestamp is before the specified date </s>
|
funcom_train/40494681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getImage() {
if (image == null) {
try {
image = Image.createImage("/pics/sendSMSIcon.png");
} catch (IOException ex) {
Logger.add(getClass().getName(), "getImage", ex.getMessage());
ex.printStackTrace();
}
}
return image;
}
COM: <s> returns an initiliazed instance of image component </s>
|
funcom_train/3080489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireWindowClosing() {
WindowEvent e = new WindowEvent(this);
EventListener[] listeners = listenerList.getListeners(WindowListener.class);
for (int index = 0; index < listeners.length; ++index) {
((WindowListener) listeners[index]).windowClosing(e);
}
}
COM: <s> notifies code window listener code s that the window has been </s>
|
funcom_train/35287671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void render(String path) throws ServletException, IOException {
RequestDispatcher dispatcher = this.getRequest().getRequestDispatcher(path);
if (dispatcher != null) {
dispatcher.forward(this.getRequest(), this.getResponse());
} else {
throw new FileNotFoundException("Can not find the resource " + path);
}
}
COM: <s> this method will render the jsp file in the path parameter </s>
|
funcom_train/11734348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File getFile(DataIdentifier identifier) {
usesIdentifier(identifier);
String string = identifier.toString();
File file = directory;
file = new File(file, string.substring(0, 2));
file = new File(file, string.substring(2, 4));
file = new File(file, string.substring(4, 6));
return new File(file, string);
}
COM: <s> returns the identified file </s>
|
funcom_train/37818719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bottom() {
view.getTablePanel().getTableModel().showLastPage();
view.getTablePanel()
.getTable()
.scrollRectToVisible(
view.getTablePanel()
.getTable()
.getCellRect(
view.getTablePanel().getTable()
.getRowCount() - 1,
view.getTablePanel().getTable()
.getColumnCount(), true));
};
COM: <s> scroll to the bottom of the machine configuration table </s>
|
funcom_train/25648394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File restoreImage(String name) {
File restored = null;
File disposed = new File(this.directory, name.concat(".trash"));
if (disposed.exists()) {
log.debug("Restoring file " + name);
restored = new File(this.directory, name);
disposed.renameTo(restored);
}
return restored;
}
COM: <s> restores an image that has been marked for deleting by removing the </s>
|
funcom_train/25488913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToggleButton getBtnTimer() {
if (btnTimer == null) {
btnTimer = new JToggleButton();
btnTimer.setText("Start Timer for Random Ins/Del");
btnTimer.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
timerBtnClicked(e);
}
});
}
return btnTimer;
}
COM: <s> this method initializes btn timer </s>
|
funcom_train/46456279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBuffered(boolean _buffered) {
buffered = _buffered;
if(buffered) { // turn off Java buffering because we are doing our own
setDoubleBuffered(false);
} else { // small default image is not used
workingImage = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
offscreenImage = workingImage;
setDoubleBuffered(true); // use Java's buffer
}
validImage = false;
}
COM: <s> sets the buffered image option </s>
|
funcom_train/16676893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceChild(LayoutTree oldChild, LayoutTree newChild) {
if (children[0] == oldChild){
children[0] = newChild;
}
else if (children[1] == oldChild){
children[1] = newChild;
}
newChild.setParent(this);
if (!children[0].isVisible( ) || !children[0].isVisible( )){
getSash( ).dispose( );
}
}
COM: <s> replace a child with a new child and sets the new childs br </s>
|
funcom_train/45784459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void afterInit() {
java.awt.Toolkit tk = java.awt.Toolkit.getDefaultToolkit();
java.awt.Dimension d = tk.getScreenSize();
java.awt.Dimension dim = this.getSize();
setBounds(d.width / 2 - dim.width / 2, d.height / 2 - dim.height / 2,
dim.width, dim.height);
}
COM: <s> centralizes the dialog on the screen </s>
|
funcom_train/9163472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Value execute(Path path, List<Value> parameters, MemberType cls) {
state.enter(path, parameters);
MemberValue that = null;
if (cls != null) {
that = new MemberValue(manager, cls);
state.setLocal("this", that);
}
Callable f = (Callable)path.getDefinition();
walk(f.getBody());
Value result;
if (f instanceof Constructor) {
result = that;
} else if (f.isVoid()) {
result = null;
} else {
result = state.pop();
}
state.exit();
return result;
}
COM: <s> executes a function </s>
|
funcom_train/45486313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton2Del() {
if (jButton2Del == null) {
jButton2Del = new JButton();
jButton2Del.setBounds(new Rectangle(951, 34, 64, 26));
Font font = new Font("Serif", Font.BOLD, 16);
jButton2Del.setFont(font);
jButton2Del.setForeground(Color.red);
jButton2Del.setText("2");
}
return jButton2Del;
}
COM: <s> this method initializes j button2 del </s>
|
funcom_train/18032286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getItemExpand() {
if (m_itemExpand == null) {
m_itemExpand = new JMenuItem();
m_itemExpand.setAction(new ExpandTreeNodeAction(m_tree));
m_itemExpand.setText(Messages.getString("TreePopupMenu.4")); //$NON-NLS-1$
m_itemExpand.setMnemonic(Messages.getString("TreePopupMenu.5").charAt(0)); //$NON-NLS-1$
}
return m_itemExpand;
}
COM: <s> returns the expand item </s>
|
funcom_train/5593848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMotd() {
System.out.println("testMotd");
sender.motd();
assertEquals("MOTD", bufferToString());
sender.motd("*.chatservs.com");
assertEquals("MOTD *.chatservs.com", bufferToString());
}
COM: <s> test of motd method of class net </s>
|
funcom_train/50865956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawConstructionSites(Graphics2D g2d, Settlement settlement) {
if (settlement != null) {
Iterator<ConstructionSite> i = settlement.getConstructionManager().
getConstructionSites().iterator();
while (i.hasNext()) drawConstructionSite(i.next(), g2d);
}
}
COM: <s> draw all of the construction sites in the settlement </s>
|
funcom_train/19318409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeShort(short value) throws JMSException {
if(!isBodyModifiable()) {
throw new MessageNotWriteableException("StreamMessage read_only");
}
try {
dos.writeByte((int) TYPE_SHORT);
dos.writeShort((int) value);
}
catch(IOException e) {
throw new JMSException(e.getMessage());
}
}
COM: <s> writes a code short code to the stream message </s>
|
funcom_train/3909454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MD_Field createWidget(MD_ProfileElement profileElement) {
SchemaNode schemaNode = _schemaController.getSchemaNode(profileElement.getXMLPath());
// Attribute
//if(schemaNode instanceof SchemaAttribute)
// return createAttributeWidget((SchemaAttribute)schemaNode);
// Element
if(schemaNode instanceof SchemaElement)
return createElementWidget((SchemaElement)schemaNode);
else return null;
}
COM: <s> create a suitable component for a schema element or attribute </s>
|
funcom_train/2799334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String replace(String str, String pattern, String replace) {
int s = 0;
int e = 0;
StringBuffer result = new StringBuffer();
while ((e = str.indexOf(pattern, s)) >= 0) {
result.append(str.substring(s, e));
result.append(replace);
s = e + pattern.length();
}
result.append(str.substring(s));
return result.toString();
}
COM: <s> silly help function plain search replace </s>
|
funcom_train/37820460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SynDiaElem getPositionBehind(SynDiaElem anElem) {
if (anElem instanceof TerminalSymbol) {
return getPositionBehindInConcatenation(anElem);
}
if (anElem instanceof Variable) {
if (this.isJumpToDiagram()) {
this.disablePositionBehind();
return anElem;
} else {
return getPositionBehindInConcatenation(anElem);
}
}
if (anElem instanceof Concatenation) {
Concatenation aConcat = (Concatenation) anElem;
return getPositionBehindConcatenation(aConcat, anElem);
}
this.disablePositionBehind();
return anElem;
}
COM: <s> searches for the next position in the diagram and returns it </s>
|
funcom_train/19402546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean set( long[] bits, long index ) {
final int unit = (int)( index >> LOG2_LONG_SIZE );
final long mask = 1L << ( index & BIT_INDEX_MASK );
final boolean result = ( bits[ unit ] & mask ) != 0;
bits[ unit ] |= mask;
return result;
}
COM: <s> sets the bit with specified index in the specified array </s>
|
funcom_train/45448430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void prepareRendering(final int clipX, final int clipY, final int clipW, final int clipH) {
// check that the offscreen images are initialized and large enough
checkOffScreenImages(clipW, clipH);
// fill the region in the AWT image with the transparent color
final java.awt.Graphics awtGraphics = awtImage.getGraphics();
awtGraphics.setColor(new java.awt.Color(TRANSPARENT_COLOR));
awtGraphics.fillRect(0, 0, clipW, clipH);
}
COM: <s> prepare the awt offscreen image for the rendering of the rectangular </s>
|
funcom_train/14583315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String parse(String target, String handle, boolean append) throws TemplateException {
if (!this.templates.containsKey(handle)) {
String loadedFile = loadFile(handle);
this.templates.put(handle,loadedFile);
}
String text = preg_replace("{([^}]+)}",(String)templates.get(handle));
COM: <s> performs variable substitution inside a template </s>
|
funcom_train/4289486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRefPropPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PropertySelector_refProp_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PropertySelector_refProp_feature", "_UI_PropertySelector_type"),
RequirementsPackage.Literals.PROPERTY_SELECTOR__REF_PROP,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the ref prop feature </s>
|
funcom_train/194186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton() {
if (closeButton == null) {
closeButton = new JButton();
closeButton.setText(Messages.getString("GameOverUI.CloseButton"));
closeButton.grabFocus();
getRootPane().setDefaultButton(closeButton);
closeButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setVisible(false);
dispose();
}
});
}
return closeButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/19164700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAbstractClassConstruction() {
try {
// wir schmeissen hier mal eine abstrakte klasse rein und hoffen auf eine exception
new DefaultObjectFactory(AbstractCollection.class);
fail("exception expected - how do you think an abstract class is to be instantiated?");
} catch (IllegalArgumentException e) {
//fail("aischokey");
} catch (Exception e) {
fail("unexpected exception occured: " + e.getMessage());
}
}
COM: <s> test abstract class construction </s>
|
funcom_train/41344606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLongitudeSpan() {
if (getWidth() > 0 && getWidth() > 0) {
GeoPoint left = this.projection.fromPixels(0, 0);
GeoPoint right = this.projection.fromPixels(getWidth(), 0);
return Math.abs(left.getLongitudeE6() - right.getLongitudeE6());
}
throw new IllegalStateException("the MapView has no valid dimensions");
}
COM: <s> returns the current longitude span in microdegrees degrees 10 6 </s>
|
funcom_train/18001035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTeamMemberString() {
if (!isRoot() && isTeamMembershipInherited()) return getParentBinder().getTeamMemberString();
String members = (String)getProperty(ObjectKeys.BINDER_PROPERTY_TEAM_MEMBERS);
if (Validator.isNull(members)) return Constants.EMPTY_ACL_FIELD;
return members;
}
COM: <s> return acl index string representing team membership </s>
|
funcom_train/26525543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
boolean answer = false;
Object oUser = null;
if(this == o) return true;
if(o instanceof DreamComponent) {
oUser = ((DreamComponent)o).userObject;
if((userObject != null) && (oUser != null)) {
if(userObject.equals(oUser)) answer = true;
}
}
return answer;
}
COM: <s> overrides the default equals method comparing the </s>
|
funcom_train/25189326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetMediaType() throws Exception {
System.out.println("setMediaType");
JSchema instance = new JSchema();
assertNull(instance.getMediaType());
instance.setMediaType("application/json");
assertEquals("application/json", instance.getMediaType());
instance.setMediaType(null);
assertNull(instance.getMediaType());
}
COM: <s> test of set media type method of class jschema </s>
|
funcom_train/28365889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPoint(double x, double y){
resize(nPoints+1);
pointsX[nPoints] = x;
pointsY[nPoints] = y;
nPoints++;
if(x_min > x) x_min = x;
if(y_min > y) y_min = y;
if(x_max < x) x_max = x;
if(y_max < y) y_max = y;
}
COM: <s> adds a point </s>
|
funcom_train/44849726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getState(String inState, CodeList inCodeList, IMessages inMessages) {
if (inState == null || inState.length() == 0) {
inState = "1"; //$NON-NLS-1$
}
return String.format(inMessages.getMessage("ui.question.view.label.state"), inCodeList.getLabel(inState)); //$NON-NLS-1$
}
COM: <s> translates the contributions state code to a human readable state information </s>
|
funcom_train/44011390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetMemberExpireDate() {
System.out.println("setMemberExpireDate");
String memberExpireDate = "";
MembershipBO instance = null;
instance.setMemberExpireDate(memberExpireDate);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set member expire date method of class edu </s>
|
funcom_train/29937123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tree getPreorderNeighbor() {
if(isRoot())
return null;
else if(getParent().getChildren().getFirst() == this)
/* are we the leftmost child? if so, return our parent. */
return getParent();
else
/* otherwise, return our left sibling's leftmost descendent */
return getLeftSibling().getLeftmostLeaf();
}
COM: <s> returns the node that would be returned previous to this node </s>
|
funcom_train/3315067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertConsistency(){
B obj = getTestObject();
assertEquals("A Object should equal itself",obj,obj);
assertFalse("Object equals null.",obj.equals(null));
assertEquals("hashCode should be repeatable",
obj.hashCode(),obj.hashCode());
}
COM: <s> checks if the test object fulfils the </s>
|
funcom_train/4467844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rectangle getBounds() {
String[] lines = text.split("\n|\r");
int maxWidth = 0;
for ( int i = 0 ; i < lines.length;i++) {
maxWidth = Math.max(maxWidth,lines[i].length());
}
final double width = maxWidth * getLineHeight()* 0.75 ;
final double height = lines.length * getLineHeight();
return new Rectangle(getX(),getY(),width,height*1.5);
}
COM: <s> returns approximative bounds of this text </s>
|
funcom_train/41842198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String stripofUnwantedtags(String text){
String subString;
subString = text.replaceAll(UtilityConstants.h3StartTag, "");
subString = subString.replaceAll(UtilityConstants.h3EndTag, "");
subString = subString.replaceAll(UtilityConstants.strongStartTag, "");
subString = subString.replaceAll(UtilityConstants.strongEndTag, "");
return subString;
}
COM: <s> remove all the unwanted tags from the result string </s>
|
funcom_train/22285070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
if (current >= 0 && text.editingText == false) {
String s = getKey(choices[current]);
if (s == null) {
s = "";
}
if (!s.equals(text.getText())) {
int len = s.length();
char[] c = new char[len];
s.getChars(0, len, c, 0);
text.text = c;
text.selStart = text.selEnd = text.len = len;
}
}
}
COM: <s> refreshes text with key value </s>
|
funcom_train/47193558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPasswordField getJPasswordField() {
if (jPasswordField == null) {
jPasswordField = new JPasswordField();
jPasswordField.setPreferredSize(new Dimension(300, 20));
jPasswordField.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent e) {
if (e.getKeyChar() == '\n')
login();
}
});
}
return jPasswordField;
}
COM: <s> this method initializes j password field </s>
|
funcom_train/4717627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSynthPanRightPureData() {
SynMessage msg = new SYN(SYN.PUREDATA).synth(1).pan(100);
assertEquals("Fi", msg.getTypetag());
assertEquals((SynMessage.MAX_24BIT), msg.getArguments()[1]);
assertEquals("/SYN/ID1/PAN", msg.getAddress());
}
COM: <s> synth pan right for pure data </s>
|
funcom_train/35195527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() throws MojoExecutionException, MojoFailureException {
System.setProperty("basedir", basedir.getAbsolutePath());
Locale locale = Locale.getDefault();
try {
JSMeterGenerator gen = new JSMeterGenerator(tempDir, directory, srcDir, complexityLimit, recurseLevel, getLog());
gen.generateReport(locale);
} catch (JSMeterException e) {
throw new MojoExecutionException(e.getLocalizedMessage());
}
}
COM: <s> execute the mojo this is what mvn calls to start this mojo </s>
|
funcom_train/16524476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireTilesetRemoved(int index) {
Iterator iterator = mapChangeListeners.iterator();
MapChangedEvent event = null;
while (iterator.hasNext()) {
if (event == null) event = new MapChangedEvent(this);
((MapChangeListener) iterator.next()).tilesetRemoved(event, index);
}
}
COM: <s> notifies all registered map change listeners about the removal of a </s>
|
funcom_train/23779184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void _launchResource(IResource argRes) {
ILaunchConfiguration configuration = null;
try {
configuration = _launchConfigFromResource(argRes);
} catch (CoreException ce) {
EslinkPlugin.showErrorDialog("run.error.title", "run.error.unexpected", null, ce);
return;
}
DebugUITools.launch(configuration, ILaunchManager.RUN_MODE);
}
COM: <s> prepares a launch configuration for the given resource and launches it </s>
|
funcom_train/45249888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleShowOnChange() {
layout.removeTrim(trim);
trim.dock(radioVal.get());
layout.addTrim(radioVal.get(), trim, null);
// perform an optimized layout to show the trim in its new location
LayoutUtil.resize(trim.getControl());
}
COM: <s> handle the event generated when a user selects a new side to </s>
|
funcom_train/40611537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Problem reportSpotProblem(final ProblemReport report) throws GowallaException {
final String response = post(String.format("/spots/%d/flags/%s", report.getSpotId(), report.getType().name().toLowerCase()),
new StringRequestParameter("description", report.getDescription()));
return responseTranslator.translateProblem(response);
}
COM: <s> report a problem to gowalla </s>
|
funcom_train/1546923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Complex parse(String source) throws ParseException {
ParsePosition parsePosition = new ParsePosition(0);
Complex result = parse(source, parsePosition);
if (parsePosition.getIndex() == 0) {
throw MathRuntimeException.createParseException(
parsePosition.getErrorIndex(),
LocalizedFormats.UNPARSEABLE_COMPLEX_NUMBER, source);
}
return result;
}
COM: <s> parses a string to produce a </s>
|
funcom_train/18728849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAdd() {
JaxoObjectList instance = new JaxoObjectList();
assertTrue(instance.add(new JaxoFLine()));
assertEquals(1, instance.size());
instance.add(0, new JaxoFLine());
assertEquals(2, instance.size());
instance.add(1, new JaxoFLine());
assertEquals(3, instance.size());
}
COM: <s> test of add method of class jaxo object list </s>
|
funcom_train/13692651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertFile(String filename) throws IOException {
System.out.println("inserting file " + filename);
LineNumberReader r = new LineNumberReader(new FileReader(filename));
String line = null;
while ((line=r.readLine()) != null) {
writeln(line);
}
}
COM: <s> an external file can completly insert in this ns2 file </s>
|
funcom_train/3346698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Config read(File configFile) throws IOException {
Properties properties = readProperties(configFile);
// read the vm configuration
String vm = ConfigUtils.getString(properties, "use.vm");
Properties vmProperties = readProperties(new File(configFile.getParentFile(), vm + ".properties"));
VMConfig vmConfig = createVMConfig(vmProperties, vm);
return new Config(properties, vmConfig);
}
COM: <s> read the jtest server configuration and the vm configuration </s>
|
funcom_train/26052877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean disable(ASUser user) {
logger.debug("Response Action: Disabling User " + user.getAccountId());
logger.fatal("INTRUSION - Multiple intrusions observed by AppSensorUser:" +
user.getAccountName() + ", UserID:" + user.getAccountId() + ", Action: Disabling and logging out malicious account");
user.disable();
user.logout();
return true;
}
COM: <s> disable the currently logged in user </s>
|
funcom_train/43247062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPatientType() {
System.out.println("getPatientType");
PatientDemographicsObject instance = new PatientDemographicsObject();
String expResult = "";
String result = instance.getPatientType();
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 patient type method of class org </s>
|
funcom_train/37566149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getLinks(MD5Hash md5) throws IOException {
Vector records = new Vector(3);
Link l = new Link();
l.getFromID().set(md5);
reader.seek(l);
while (reader.next(l, NullWritable.get())) {
if (md5.equals(l.getFromID())) {
records.add(l);
l = new Link();
} else {
break;
}
}
return records;
}
COM: <s> grab all the links from the given md5 hash </s>
|
funcom_train/16939071 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String progressBar(double percentage, int length) {
if(length < 3){
throw new IllegalArgumentException("Minimum size is 3");
}
int count = (int) Math.floor(percentage * (length - 2));
StringBuilder builder = new StringBuilder("[");
for (int i = 0; i < (length - 2); i++) {
if (i < count) {
builder.append('#');
} else {
builder.append(':');
}
}
builder.append(']');
return builder.toString();
}
COM: <s> creates a progress bar for the requested percentage </s>
|
funcom_train/51502505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setTitle("Tagesnachricht eingeben");
this.setSize(399, 295);
this.setContentPane(getJContentPane());
ButtonGroup bg=new ButtonGroup();
bg.add(rbSingleLine);
bg.add(rbMultiLine);
nu=Agenda.actDate.toString(TimeTool.DATE_COMPACT);
rbSingleLine.setSelected(true);
SwingHelper.centerComponent(this,Agenda.client);
this.setModal(true);
this.setVisible(true);
}
COM: <s> this method initializes this </s>
|
funcom_train/18000363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRelativeLastActivityDate(Integer daysNumber) {
checkCurrent();
Element filterTerm = currentFilterTerms.addElement(SearchFilterKeys.FilterTerm);
filterTerm.addAttribute(SearchFilterKeys.FilterType, SearchFilterKeys.FilterTypeRelative);
filterTerm.addAttribute(SearchFilterKeys.FilterRelativeType, SearchFilterKeys.FilterTypeDate);
filterTerm.addText(daysNumber.toString());
}
COM: <s> adds relative date </s>
|
funcom_train/33819653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NaturalSet outActiveRegion(){
NaturalSet region;
if(outDegree() > 0){
region = genealogy.snpDomain.createEmptyNaturalSet();
for ( Edge edge : edges ) {
try { if (isSource(edge)) region.union(edge.activeRegion());}
catch (NaturalSetException e) {genealogy.env().log().printError(e);}
}
} else {
region = genealogy.snpDomain.createCompleteNaturalSet();
} return region;
}
COM: <s> union the active regions on all outgoing edges </s>
|
funcom_train/14421989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyKeyboardEvent(int modificationKey, char c, int keyCode) {
if (log.isDebugEnabled())
log.debug("Enquing keyboard notification: " + toString(modificationKey, c));
assertEnabled();
notify(SWT.KeyDown, keyEvent(modificationKey, c, keyCode));
notify(SWT.KeyUp, keyEvent(modificationKey, c, keyCode));
}
COM: <s> notifies of keyboard event </s>
|
funcom_train/4135843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCitationKeyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BibTexEntry_citationKey_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BibTexEntry_citationKey_feature", "_UI_BibTexEntry_type"),
BibtexPackage.Literals.BIB_TEX_ENTRY__CITATION_KEY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the citation key feature </s>
|
funcom_train/10961621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testResultNotModified() throws Exception {
request.addHeader("If-None-Match", "123");
request.setMethod("GET");
RestAction restAction = (RestAction)restActionInvocation.getAction();
List<String> model = new ArrayList<String>() {
@Override
public int hashCode() {
return 123;
}
};
model.add("Item");
restAction.model = model;
restActionInvocation.processResult();
assertEquals(SC_NOT_MODIFIED, response.getStatus());
}
COM: <s> test the not modified status code </s>
|
funcom_train/31901244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processDOMEvent(DOMEvent event) {
if (event instanceof DOMMouseEvent) {
processDOMMouseEvent((DOMMouseEvent) event);
} else
if (event instanceof DOMKeyEvent) {
processDOMKeyEvent((DOMKeyEvent) event);
} else
if (event instanceof DOMFocusEvent) {
processDOMFocusEvent((DOMFocusEvent) event);
} else
if (event instanceof DOMDocumentEvent) {
processDOMDocumentEvent((DOMDocumentEvent) event);
} else {
return;
}
}
COM: <s> process a dom event </s>
|
funcom_train/31760325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWebCompletedDate(String webCompletedDate) {
this.webCompletedDate = webCompletedDate;
try {
Logger.debug(this, "Setting Web Completed Date " + webCompletedDate);
this.completedDate = new SimpleDateFormat("MM/dd/yyyy HH:mm").parse(webCompletedDate);
Logger.debug(this, "Setting Completed Date " + this.completedDate);
} catch(ParseException ex) {
}
}
COM: <s> sets the web completed date </s>
|
funcom_train/31457278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder sb = new StringBuilder();
InstructionSet iset = VirtualMachineFactory.getInstance().getInstructionSet(VMType);
for (int i = 0; i < realLen; i++) {
Instruction instr = iset.getInstruction(memory[i]);
String mnem = (instr != null) ? instr.getMnemonic() : "RAW " + memory[i];
sb.append(mnem).append('\n');
}
for (int i = realLen; i < memory.length; i++)
sb.append("0\n");
return sb.toString();
}
COM: <s> returns the string representation of the codetape </s>
|
funcom_train/5714102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidWriting(){
ByteArrayOutputStream baos = new ByteArrayOutputStream();
BitOutputStream bos = new BitOutputStream(baos);
try{
bos.write(-1);
fail("exception expected on writing -1");
}
catch(IOException ioe){}
try{
bos.write(2);
fail("exception expeceted on writing 2");
}
catch(IOException ioe){}
}
COM: <s> tests the correct behavior when trying to write in an invalid way </s>
|
funcom_train/33493497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonCancel() {
if (jButtonCancel == null) {
jButtonCancel = new JButton();
jButtonCancel.setText("Cancel");
jButtonCancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
jDialogSettings.setVisible(false);
}
});
}
return jButtonCancel;
}
COM: <s> this method initializes j button cancel </s>
|
funcom_train/6343202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void multicast () {
ThreadPoolManager tpm = ThreadPoolManager.getInstance();
Iterator it = servers.iterator();
while ( it.hasNext() ) {
tpm.runIt(new LateralCacheUnicaster(ice, (String)it.next() + servlet));
}
return;
} // end run
COM: <s> multi casts the cache changes to the distributed servers </s>
|
funcom_train/18215802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTitle(Element fieldset, Element legend, String title) {
if ((title != null) && (!title.equals(""))) {
DOM.setInnerHTML(legend, title);
DOM.insertChild(fieldset, legend, 0);
} else if (DOM.getParent(legend) != null) {
DOM.removeChild(fieldset, legend);
}
}
COM: <s> set the title of a fieldset element </s>
|
funcom_train/40312401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsSearchable_InvalidColumn3() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.isSearchable(10);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by isSearchable method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests is searchable with column index larger than the number of column </s>
|
funcom_train/43245521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetSpEmpStreetAddr3() {
System.out.println("setSpEmpStreetAddr3");
String spEmpStreetAddr3 = "";
EmploymentDataDG2Object instance = new EmploymentDataDG2Object();
instance.setSpEmpStreetAddr3(spEmpStreetAddr3);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set sp emp street addr3 method of class org </s>
|
funcom_train/51548613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showToaster(Icon icon, String msg) {
SingleToaster singleToaster = new SingleToaster();
if (icon != null) {
singleToaster.iconLabel.setIcon(icon);
}
singleToaster.message.setText(msg);
singleToaster.message.setCaretPosition(0);
singleToaster.animate();
}
COM: <s> show a toaster with the specified message and the associated icon </s>
|
funcom_train/14014267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processTree(FacesContext context, UIComponent component) {
if (component instanceof EditableValueHolder) {
((EditableValueHolder) component).setValid(true);
}
ValueBinding binding = component.getValueBinding("binding");
if (binding != null) {
binding.setValue(context, component);
}
Iterator it = component.getFacetsAndChildren();
while (it.hasNext()) {
UIComponent child = (UIComponent) it.next();
processTree(context, child);
}
}
COM: <s> walk the component tree to perform any required per component operations </s>
|
funcom_train/20269771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSType explicitReturnExpected(Node scope) {
FunctionType scopeType = JSType.toMaybeFunctionType(scope.getJSType());
if (scopeType == null) {
return null;
}
if (isEmptyFunction(scope)) {
return null;
}
JSType returnType = scopeType.getReturnType();
if (returnType == null) {
return null;
}
if (!isVoidOrUnknown(returnType)) {
return returnType;
}
return null;
}
COM: <s> determines if the given scope should explicitly return </s>
|
funcom_train/2643818 | /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 (matchTuple(o)) {
VersionID ov = (VersionID) o;
if (_rest == null || _rest.equals(ov._rest)) {
if ((_useGreaterThan == ov._useGreaterThan) &&
(_usePrefixMatch == ov._usePrefixMatch)) {
return true;
}
}
}
return false;
}
COM: <s> compares if two version ids are equal </s>
|
funcom_train/28261852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
// Get displacement byte (immediate)
// Jump is relative to _next_ instruction, but by the time the
// displacement is added to
// the IP, it has already been incremented twice, so no extra arithmetic
// necessary
displacement = cpu.getByteFromCode();
cpu.ip = Util.addWords(cpu.ip, new byte[]{
Util.signExtend(displacement), displacement}, 0);
}
COM: <s> execute unconditional relative short jump indicated by immediate signed </s>
|
funcom_train/20896519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRecordNotFoundDuringRead () throws DataExceedsFieldLengthException, SQLException {
// try reading the taxon node with taxon ID 2000
// which should not exist in the database
try {
TaxonNode.readRecord(dbConnection, 2000);
fail("As a taxon node record does not exist with taxon ID 2000 a record not found" +
"exception should have been thrown");
} catch (RecordNotFoundException e) {
// Test is successful
}
}
COM: <s> the code test record not found during read code method verifies that </s>
|
funcom_train/13547588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOnerror( String value ) throws BuildException {
if ( "failimmediately".equalsIgnoreCase( value ) ) {
failImmediately = true;
} else if ( "failatend".equalsIgnoreCase( value ) ) {
failImmediately = false;
failAtEnd = true;
} else if ( "nofail".equalsIgnoreCase( value ) ) {
failAtEnd = failImmediately = false;
}
}
COM: <s> sets the behavior to exercise if a test fails </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.