__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/28719690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uninstall() {
if (fIsInstalled) {
StyledText text = contentViewer.getTextWidget();
text.removeVerifyKeyListener(this);
if (xmlViewer != null) {
text = xmlViewer.getTextWidget();
text.removeVerifyKeyListener(this);
}
fIsInstalled = false;
fKeyBindingService = null;
}
}
COM: <s> uninstalls this trigger from the editors text widget </s>
|
funcom_train/19648522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createInstance( String elementName, String className, boolean isFinal ) {
if ( isFinal ) {
sourceWriter.print( "final " );
}
sourceWriter.print( className );
sourceWriter.print( " " );
sourceWriter.print( elementName );
sourceWriter.print( " = injector.get" );
sourceWriter.print( elementName );
sourceWriter.println( "();" );
}
COM: <s> write the lines to create a new instance of an element </s>
|
funcom_train/15825999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printVersion() {
Properties props = new Properties();
try {
props.load(getClass().getResourceAsStream("/version.properties"));
} catch (IOException e) {
LOG.error("Error reading version properties", e);
}
LOG.info("CruiseControl Version " + props.getProperty("version"));
}
COM: <s> writes the current version information as indicated in the </s>
|
funcom_train/26525274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void callListeners( DRMRequest curReq, int status, Object info ) {
DRMRequestListener currListener = null;
synchronized( listeners ) {
for( int i=0; i < listeners.size(); i++ ) {
currListener = (DRMRequestListener)listeners.get( i );
currListener.requestStateChanged(
new DRMRequestEvent( curReq, status, info ) );
}
}
}
COM: <s> call the attached listeners and send them an event with the current </s>
|
funcom_train/13272176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCeilingTexture(HomeTexture ceilingTexture) {
if (ceilingTexture != this.ceilingTexture
|| (ceilingTexture != null && !ceilingTexture.equals(this.ceilingTexture))) {
HomeTexture oldCeilingTexture = this.ceilingTexture;
this.ceilingTexture = ceilingTexture;
this.propertyChangeSupport.firePropertyChange(Property.CEILING_TEXTURE.name(),
oldCeilingTexture, ceilingTexture);
}
}
COM: <s> sets the ceiling texture of this room </s>
|
funcom_train/3290111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(MMObjectNode vwmnode, Vwms Vwms) {
this.wvmnode=vwmnode;
this.name=vwmnode.getStringValue("name");
this.sleeptime=wvmnode.getIntValue("maintime");
this.Vwms=Vwms;
/* or :
this.Vwms = (Vwms)vwmnode.parent;
*/
probe = new VwmProbe(this);
this.start();
}
COM: <s> initialize the vwm </s>
|
funcom_train/18031178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createSession(String user) {
String session = user + ":"
+ System.currentTimeMillis()
+ ":"
+ (Math.random()*1000);
synchronized (sessions) {
Iterator<String> set = sessions.keySet().iterator();
while (set.hasNext()) {
String key = set.next();
if ((sessions.get(key) + sessionLife*1000) < System.currentTimeMillis()) {
set.remove();
//sessions.remove(key);
}
}
sessions.put(session, System.currentTimeMillis());
}
return session;
}
COM: <s> create new session and kill old ones </s>
|
funcom_train/48588260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidGroupName(String name) throws Exception {
if (!StringUtils.hasText(name))
return false;
if (integraGroupServiceInterface.getGroupIdByName(name, false) != null)
return false;
for (int i = 0; i < name.length(); i++)
if (name.charAt(i) == ' ')
return false;
return true;
}
COM: <s> checks if the group name is valid </s>
|
funcom_train/10594417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroy() {
try {
ContainerUtil.dispose(this.portletContainerEnvironment);
this.portletContainerEnvironment = null;
if (this.portletContainer != null ) {
this.portletContainer.shutdown();
this.portletContainer = null;
}
} catch (Throwable t) {
this.getLogger().error("Destruction failed!", t);
}
}
COM: <s> destroy this component </s>
|
funcom_train/16103199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JList getLstHosts() {
if (lstHosts == null) {
lstHosts = new JList(this.hostListModel);
lstHosts.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
lstHosts.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
if (lstHosts.isSelectionEmpty()) {
btnDeleteHost.setEnabled(false);
btnEditHost.setEnabled(false);
} else {
btnDeleteHost.setEnabled(true);
btnEditHost.setEnabled(true);
}
}
});
}
return lstHosts;
}
COM: <s> this method initializes lst hosts </s>
|
funcom_train/41318026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXsl (String xslFilePath) {
this.xslFilePath = xslFilePath;
File file = new File (xslFilePath);
if (!file.exists ()) throw new Failure ("XSLT Script [%] not found.", file.getAbsolutePath ());
this.xsl = new String (Files.readBinary (file));
}
COM: <s> the xslt script that is used to transform the xml structure </s>
|
funcom_train/35026610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Logger getPublisher(LogRecord record) {
String name = null;
if (classname) {
name = record.getSourceClassName();
} else {
name = record.getLoggerName();
if (name == null) {
name = JULLoggingBridge.class.getName();
}
}
return Logger.getLogger(name);
}
COM: <s> return the logger instance that will be used for logging </s>
|
funcom_train/11737496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDefaultTypeNode() {
QNodeDefinition def = getChildNode("childNodeType", "defaultTypeNode");
assertEquals("defaultTypeNode defaultPrimaryType",
FACTORY.create(Name.NS_NT_URI, "base"),
def.getDefaultPrimaryType());
}
COM: <s> test for the code default primary type code child node attribute </s>
|
funcom_train/47138358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int update(final Role role) {
Object[] params = new Object[] { role.getName(), role.getDescription(), role.getCreated(),
role.getLastChanged(), new Long(role.getId()) };
return update(params);
}
COM: <s> update role in database </s>
|
funcom_train/45622810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUseProxyTypesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SGenType_useProxyTypes_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SGenType_useProxyTypes_feature", "_UI_SGenType_type"),
MSBPackage.eINSTANCE.getSGenType_UseProxyTypes(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the use proxy types feature </s>
|
funcom_train/7624387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateQueryHint() {
if (isShowing()) {
String hint = null;
if (mSearchable != null) {
int hintId = mSearchable.getHintId();
if (hintId != 0) {
hint = mActivityContext.getString(hintId);
}
}
mSearchTextField.setHint(hint);
}
}
COM: <s> update the hint in the query text field </s>
|
funcom_train/45290582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JCTree resource() {
JCModifiers optFinal = optFinal(Flags.FINAL);
JCExpression type = parseType();
int pos = token.pos;
Name ident = ident();
return variableDeclaratorRest(pos, optFinal, type, ident, true, null);
}
COM: <s> resource variable modifiers opt type variable declarator id expression </s>
|
funcom_train/14177475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent arg0) {
// // make the actual displayed center to stay the zoom/unzoomed center after the scale effect
// Point center = new Point();
// center.x = displaySurface.getWidth()/2/getScale() + horizontalBar.getValue();
// center.y = displaySurface.getHeight()/2/getScale() + verticalBar.getValue();
displaySurface.repaint();
}
COM: <s> when changing the scale </s>
|
funcom_train/44082918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() {
try {
//ensure existence of folder path
Utils.createDirectoryRecursively(new File(this.nameSpace));
//attempt to save file
writePropertiesToFile(this, file);
}
catch (IOException e) {
System.out.println(e);
// throw an unchecked exception, and then create default
}
}
COM: <s> save this set of properties </s>
|
funcom_train/41150466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
// XXX MAYBE WE SHOULD USE STRINGBUFFER AND USE A FIXED
// NUMBER OF DECIMALS BEHIND THE COMMA
String s = "[" + getNumSymbols() + "]:";
for (int i = 0; i < getNumSymbols(); i++)
s += " " + getCumulativeProbability(i);
return s;
}
COM: <s> get a string representation of the cumulative probability </s>
|
funcom_train/49159452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exit() {
logger.info("Exiting the client ...");
try {
logger.info("Save settings ...");
settings.writeSettingsToXml(ClientFileStructure.getClientSettingsFileName());
} catch (Exception error) {
logger.log(Level.SEVERE, "Settings save failed!", error);
}
logger.info("Exit");
System.exit(0);
}
COM: <s> exits game and saves the scenario </s>
|
funcom_train/16613557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStrand(int strand) {
if (!gap && seqRegionName == null && segRegionID<1 && strand != 0)
throw new IllegalStateException(
"Can not set strand unless sequence region specified.");
if (strand < -1 || strand > 1)
throw new InvalidLocationException("Strand should be -1,0,+1, not "
+ strand);
this.strand = strand;
}
COM: <s> sets the strand </s>
|
funcom_train/28170569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getElementCount() {
int count = 0;
NodeList list = current.getChildNodes();
for (int i=0; i < list.getLength(); i++) {
Node node = list.item(i);
if ((node instanceof Element)) {
count++;
}
}
return count;
}
COM: <s> returns the number of child elements of the current element </s>
|
funcom_train/7866475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void trashObject(String resourceId, boolean delete) throws Exception {
if (resourceId == null) {
throw new RuntimeException("null resourceId");
}
String feedUrl = URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId;
if (delete) {
feedUrl += "?delete=true";
}
service.delete(buildUrl(feedUrl), getDocsListEntry(resourceId).getEtag());
}
COM: <s> trash an object </s>
|
funcom_train/2854532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dataReceived () {
logMsg("NodeRegSListener.dataReceived()"); // DEBUG
dataIn.flip();
ByteBuffer out = parser.parse ();
if (out == null) {
_close();
} else {
out.flip(); // prepare for write
cnx.sendData (out); // send the reply
}
}
COM: <s> the byte buffer contains some data echo it back </s>
|
funcom_train/16218147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void resetFrame() {
lastDispose = dispose;
lastRect = new Rectangle(ix, iy, iw, ih);
lastImage = image;
lastBgColor = bgColor;
// original code, seems senseless:
// int dispose = 0;
// boolean transparency = false;
// int delay = 0;
// changed code:
dispose = 0;
transparency = false;
delay = 0;
lct = null;
}
COM: <s> resets frame state for reading next image </s>
|
funcom_train/31023244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeMessageResourcesKey(String messageId) throws ApplicationConfigException {
//System.out.println(messageId);
MessageResourcesConfig message = (MessageResourcesConfig) messageResources.get(messageId);
if ( findMessageResourcesConfig(message.getKey()) != null ) {
throw new ApplicationConfigException(ApplicationConfigException.EXIST,message);
}
messageResources.remove(messageId);
renameXMLMessageResources(messageId,message.getKey());
messageResources.put(message.getKey(),message);
}
COM: <s> method change message resources key </s>
|
funcom_train/4706675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepare() {
log.debug("exec prepare()");
if (getRequest().getMethod().equalsIgnoreCase("post")) {
// prevent failures on new
String newsId = getRequest().getParameter("news.id");
if (newsId != null && !newsId.equals("")) {
news = newsManager.getNewsByid(new Long(newsId));
}
}
}
COM: <s> grab the entity from the database before populating with request </s>
|
funcom_train/16942412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PersonType getPersonType(int id) throws SQLException {
String query = "SELECT * FROM person_type WHERE (id = " + id + " )";
PersonType personType;
ResultSet result = ConnectionDB.getInstance().executeReader(query);
while (result.next()) {
personType = new PersonType();
personType.setId(result.getInt("id"));
if (result.getString("description") != null)
personType.setDescription(result.getString("description"));
ConnectionDB.getInstance().close();
return personType;
}
return null;
}
COM: <s> method that returns a specific person type for your id </s>
|
funcom_train/42840468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Question findRandomPastQuestion(JDateTime untilDate) {
DbOomQuery dbOom = query(sql("select $C{q.*} from $T{Question q} where $q.date < :date order by rand() limit 1"));
dbOom.setMaxRows(1);
dbOom.setFetchSize(1);
dbOom.setInteger("date", DateUtil.toIntDate(untilDate));
return dbOom.findOneAndClose(Question.class);
}
COM: <s> finds random question from the past </s>
|
funcom_train/35298739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processImageProgress(float percentageDone) {
if (progressListeners == null) {
return;
}
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOWriteProgressListener listener =
(IIOWriteProgressListener)progressListeners.get(i);
listener.imageProgress(this, percentageDone);
}
}
COM: <s> broadcasts the current percentage of image completion to all </s>
|
funcom_train/9680147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTestConstructor() {
cat.info("Testing DC for Test constructor");
final BinClass test = (BinClass) getType("Test");
assertEquals(
"DC",
0d,
DcMetric.calculate(test.getDeclaredConstructors()[0]),
0.001);
cat.info("SUCCESS");
}
COM: <s> tests dc for test constructor </s>
|
funcom_train/40322395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Button getButtonVolver() {
if (botonVolver == null) {
botonVolver = new Button();
botonVolver.setLabel("Volver");
botonVolver.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed()
getCustomComponent().setLocation(10, 10);
}
});
}
return botonVolver;
}
COM: <s> this method initializes button volver </s>
|
funcom_train/4482312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModelAndView initJSSchedule(HttpServletRequest request, HttpServletResponse response) throws Exception {
ModelAndView modelAndView = new ModelAndView(ModelAndViewConstants.JS_SCHEDULER_VIEW);
this.timetableWrapper.clearExceptions();
modelAndView.addObject(ModelAndViewConstants.TIMETABLE_MODEL, timetableWrapper);
return modelAndView;
}
COM: <s> redirects to the java script schedule </s>
|
funcom_train/51618441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setup_lst_timeRanges(){
//Get Delegate
ListBasedComponentDelegate d = lst_timeRanges.getBindingDelegate();
//Add Components
d.addBoundComponent( cbo_startCalendarHour );
d.addBoundComponent( cbo_endCalendarHour );
d.setPrimaryComponent( -2 );
d.load();
d.selectItem( 0 );
}
COM: <s> sets up the binding for the list of time ranges </s>
|
funcom_train/35157081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void apply(ActionTable table, Node node) {
try {
Method m = table.lookupActionMethod(node);
if (m != null) {
argTmp[0] = this;
argTmp[1] = node;
push(node);
try {
m.invoke(null, argTmp);
} finally {
pop();
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
COM: <s> invokes the appropriate action method for the given node </s>
|
funcom_train/50078965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeEntry(JarEntry entry) throws IOException {
// opens an output stream and closes it without writing anything to it
if (entry != null && getEntry(entry.getName()) != null) {
JarEntryOutputStream outputStream =
new JarEntryOutputStream(this, entry.getName());
outputStream.close();
}
}
COM: <s> removes the given entry from the jar </s>
|
funcom_train/15636986 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BitString increment() {
boolean carryin = false;
boolean carryout = true; // temporary variable
for (int i = stream.length-1; i >= 0; --i) {
carryin=carryout;
carryout = (stream[i]&&carryin);
stream[i] = (stream[i]!=carryin);
}
return this;
}
COM: <s> increments bit string by one </s>
|
funcom_train/1835427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText () {
StringBuilder sb = new StringBuilder ();
for (YamlLine line: lines) {
for (int i=0; i < (line.getIdent () - shift); ++i)
sb.append (this.identString);
sb.append (getTextLine (line)).append (this.getLineBreak ());
}
return sb.toString ();
}
COM: <s> yaml text parsed into single string </s>
|
funcom_train/8961182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeCache(){
try {
System.out.println("Writing tree cache to disk...");
//write cache to disk
File file = new File(this.cacheLocation);
if(!file.exists()){
file.createNewFile();
}
ObjectOutputStream oo = new ObjectOutputStream(new FileOutputStream(file, false));
oo.writeObject(parseCache);
oo.writeObject(depCache);
oo.flush();
oo.close();
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> write out our cache to disk when were done </s>
|
funcom_train/22027407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireActionEvent() {
//System.out.println("Sending an ActionEvent");
ActionEvent e = new ActionEvent(this, 0, actionCommand);
for(int i=0;i<actionListeners.size();i++) {
((ActionListener)actionListeners.elementAt(i)).actionPerformed(e);
}
}
COM: <s> send an action event to all the classes that have been added as </s>
|
funcom_train/3374022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(Writer out) throws IOException {
Document doc = getDocument();
try {
getUI().getEditorKit(this).write(out, doc, 0, doc.getLength());
} catch (BadLocationException e) {
throw new IOException(e.getMessage());
}
}
COM: <s> stores the contents of the model into the given </s>
|
funcom_train/12803598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Number parse(String text) throws ParseException {
ParsePosition parsePosition = new ParsePosition(0);
//parse the text to a number
Number parsedNumber = numberFormatMask.parse(text, parsePosition);
//in case the entire string is not parseable then return
if (parsePosition.getIndex() != text.length() || parsedNumber == null) {
throw new ParseException(text,parsePosition.getIndex());
}
return parsedNumber;
}
COM: <s> this method uses the decimal format </s>
|
funcom_train/43371843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void importResearchers(String researcherOntologyList, String researcherList) throws Exception {
EBIHarvester testHarvester = new EBIHarvester();
File researcherOntologyFile = new File(researcherOntologyList);
testHarvester.importResearchers(researcherOntologyFile);
File researcherFile = new File(researcherList);
List<EBICollection> allQueryItemCollections = testHarvester.importResearchers(researcherFile);
for (EBICollection collection : allQueryItemCollections) {
testHarvester.getEbiData(collection);
}
}
COM: <s> import research institutions from an input text file </s>
|
funcom_train/42295920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector cross(Vector vector) {
// calculate component values
double x = (this.y * vector.z) - (vector.y * this.z);
double y = (this.z * vector.x) - (vector.z * this.x);
double z = (this.x * vector.y) - (vector.x * this.y);
// create and return cross product
return new Vector(x, y, z);
}
COM: <s> calculates the vector cross product of this vector and a given vector </s>
|
funcom_train/8806221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkImplementation() {
if (fNeedsConversion) {
fNeedsConversion= false;
fDelegate= new TreeLineTracker((ListLineTracker) fDelegate) {
protected DelimiterInfo nextDelimiterInfo(String text, int offset) {
return AbstractLineTracker.this.nextDelimiterInfo(text, offset);
}
public String[] getLegalLineDelimiters() {
return AbstractLineTracker.this.getLegalLineDelimiters();
}
};
}
}
COM: <s> converts the implementation to be a </s>
|
funcom_train/28152161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Runner doLoad() {
if (wrap) return wrapMe();
File file=OurDialog.askFile(true, null, ".xml", ".xml instance files");
if (file==null) return null;
Util.setCurrentDirectory(file.getParentFile());
loadXML(file.getPath(), true);
return null;
}
COM: <s> this method asks the user for a new xml instance file to load </s>
|
funcom_train/2994644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean checkState() {
boolean result = false;
if (emptyStringAllowed)
result = true;
if (textField == null)
result = false;
String txt = textField.getText();
if (txt == null)
result = false;
result = (txt.trim().length() > 0) || emptyStringAllowed;
// call hook for subclasses
result = result && doCheckState();
if (result)
clearErrorMessage();
else
showErrorMessage(errorMessage);
return result;
}
COM: <s> checks whether the text input field contains a valid value or not </s>
|
funcom_train/48618392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepare() {
log.debug("Prepare for Item File permissions:: itemFileId = "+ itemFileId + " item id=" + itemId);
if (itemId != null) {
item = itemService.getGenericItem(itemId, false);
itemFile = item.getItemFile(itemFileId);
} else if (itemFileId != null) {
itemFile = itemService.getItemFile(itemFileId, false);
}
}
COM: <s> prepares the action </s>
|
funcom_train/12639791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void joinGroup(InetAddress mcastaddr) throws IOException {
if (isClosed()) {
throw new SocketException("Socket is closed");
}
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkMulticast(mcastaddr);
}
if (!mcastaddr.isMulticastAddress()) {
throw new SocketException("Not a multicast address");
}
getImpl().join(mcastaddr);
}
COM: <s> joins a multicast group </s>
|
funcom_train/12160503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCutAction(IAction action) {
if (cutAction == action) {
return;
}
if (cutAction != null) {
cutAction.removePropertyChangeListener(cutActionListener);
}
cutAction = action;
if (cutAction != null) {
cutAction.addPropertyChangeListener(cutActionListener);
}
cutActionHandler.updateEnabledState();
}
COM: <s> set the default code iaction code handler for the cut action </s>
|
funcom_train/51572906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void accumulateChangedFiles(Set<File> acc) {
if (subDeltas != null) {
for (FingerprintElementDelta subDelt : subDeltas) {
FingerprintElement element = subDelt.getLeftElement();
if (element.isDirectory() || element.isArchive()) {
subDelt.accumulateChangedFiles(acc);
} else {
acc.add(element.getFile());
}
}
}
}
COM: <s> add to the accumulator files that have different signature values in the </s>
|
funcom_train/22279348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decode(Decoder decoder) throws CodingException {
viewConstraints = (Hashtable)decoder.decodeObject(VIEWCONSTRAINTS_KEY);
viewVector = (Vector)decoder.decodeObject(VIEWVECTOR_KEY);
if (decoder.versionForClassName("netscape.application.PackLayout") > 1) {
defaultConstraints = (PackConstraints)decoder.decodeObject(DEFAULT_CONSTRAINTS_KEY);
}
}
COM: <s> encodes the pack layout </s>
|
funcom_train/7965317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stopTrying(HttpURLConnection connection) throws IOException {
logger.log(Level.WARNING, "Request refused. Server returned error code "
+ connection.getResponseCode());
throw new ConnectException("Connection was not established. "
+ "Server responded with error code "
+ connection.getResponseCode()
+ " with following message: "
+ connection.getResponseMessage());
}
COM: <s> stops trying to retrieve population anymore </s>
|
funcom_train/28878184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeActionListener(String _p, ActionListener _l) {
if ((_p == null) || (_l == null))
return false;
if (ac_.containsKey(_p)) {
Vector _prop = (Vector) ac_.get(_p);
if ((_prop != null) && (_prop.contains(_l))) {
_prop.remove(_l);
if (_prop.size() <= 0)
ac_.remove(_p);
} else
return false;
} else {
return false;
}
return true;
}
COM: <s> unregisters the specified registered listener for this action </s>
|
funcom_train/42214025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String makeHelpXML(String action,String parameter,String description, String example) {
String serviceXML = "<service>";
serviceXML += "<action>";
serviceXML += action;
serviceXML += "</action>";
serviceXML += "<parameter>";
if (parameter == "")
serviceXML += "null";
else
serviceXML += parameter;
serviceXML += "</parameter>";
serviceXML += "<description>";
serviceXML += description;
serviceXML += "</description>";
serviceXML += "<example>";
serviceXML += "<![CDATA[";
serviceXML += example;
serviceXML += "]]>";
serviceXML += "</example>";
serviceXML += "</service>";
return serviceXML;
}
COM: <s> makes one node of help xml </s>
|
funcom_train/24121099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(OutputStream out) throws IOException {
int size = this.getSize();
WMFConstants.writeLittleEndian(out, size);
WMFConstants.writeLittleEndian(out, WMFConstants.WMF_RECORD_SETTEXTALIGN);
WMFConstants.writeLittleEndian(out, alignmentMode);
out.write(0);
out.write(0);
}
COM: <s> writes the content of the set text align record to a stream </s>
|
funcom_train/49009254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getContinueButton() {
if (continueButton == null) {
continueButton = new JButton();
continueButton.setText("继续");
continueButton.setEnabled(false);
continueButton
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
model.getNN().continueRun();
startButton.setEnabled(false);
pauseButton.setEnabled(true);
continueButton.setEnabled(false);
setNNControlState(false);
}
});
}
return continueButton;
}
COM: <s> this method initializes continue button </s>
|
funcom_train/4779942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getRepositoryPanel() {
if (repositoryPanel == null) {
repositoryLabel = new JLabel();
repositoryLabel.setPreferredSize(new Dimension(100, 15));
repositoryLabel.setText(ResourceUtil.getString(type + ".repository"));
repositoryPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
repositoryPanel.add(repositoryLabel);
repositoryPanel.add(getRepositoryComboBox());
repositoryPanel.add(getAddRepositoryButton());
}
return repositoryPanel;
}
COM: <s> this method initializes repository label </s>
|
funcom_train/15401334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setNewWindowLevelValue(WindowLevel wl, boolean flag) {
String[] propName = { DICOMRenderedOpImage.WINDOW_LEVEL_PROPERTY };
Object[] value = { wl };
String[] opName = { DICOMRenderedOpWindowLevel.OPERATION_NAME };
getImage().setImageProperty(propName, value, opName, flag);
applyToolEffects(DICOMRenderedOpImage.WINDOW_LEVEL_PROPERTY, wl);
}
COM: <s> sets new window level value </s>
|
funcom_train/20043795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String toString(Object obj) {
if (obj instanceof DateTime) {
DateTime dt = (DateTime)obj;
return dt.Year + ":" + dt.Month + ":" + dt.Day
+ ":" + dt.Hours + ":" + dt.Minutes
+ ":" + dt.Seconds + ":" + dt.HundredthSeconds;
} else {
return super.toString(obj);
}
}
COM: <s> prints date time </s>
|
funcom_train/16676389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateSectionLabel(PieDataset dataset, Comparable key) {
String result = null;
if (dataset != null) {
result = key + " " + dataset.getValue(key).toString( ); //$NON-NLS-1$
if (options.is(OptionName.USE_RELATIVE)) {
result = result +
I18n.getString("CustomLabelGenerator.text.percentOccurence"); //$NON-NLS-1$
}
else {
result = result +
I18n.getString("CustomLabelGenerator.text.occurence"); //$NON-NLS-1$
}
}
return result;
}
COM: <s> generates a section label for the given </s>
|
funcom_train/3392138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildPackageSerializedForm(List elements) {
String foo = currentPackage.name();
ClassDoc[] classes = currentPackage.allClasses(false);
if (classes == null || classes.length == 0) {
return;
}
if (!serialInclude(currentPackage)) {
return;
}
if (!serialClassFoundToDocument(classes)) {
return;
}
build(elements);
}
COM: <s> build the package serialized for for the current package being processed </s>
|
funcom_train/24197324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPagosFacturaVenta(List<PagoCobroFactura> pagosFacturaVenta) {
List<PagoCobroFactura> oldPagosFacturaVenta = this.pagosFacturaVenta;
this.pagosFacturaVenta = pagosFacturaVenta;
propertyChangeSupport.firePropertyChange(PROP_PAGOSFACTURAVENTA, oldPagosFacturaVenta, pagosFacturaVenta);
}
COM: <s> set the value of pagos factura venta </s>
|
funcom_train/16683497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHistoryItem() {
if (history.isEmpty()) {
return ("/index.xhtml");
}
String returnItem;
try {
returnItem = history.pop();
try {
returnItem = history.pop();
} catch (EmptyStackException ex) {
return (returnItem);
}
} catch (EmptyStackException ex) {
return ("/index.xhtml");
}
history.clear();
return returnItem;
}
COM: <s> returns previous page visited by user </s>
|
funcom_train/19070902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NeuralNet restore(String fileName) throws IOException {
try {
FileInputStream stream = new FileInputStream(fileName);
ObjectInput input = new ObjectInputStream(stream);
return (NeuralNet)input.readObject();
}
catch (ClassNotFoundException exception) {
throw new IOException("Could not restore NeuralNet '" + fileName +"': class not found!");
}
}
COM: <s> restore a neural net from a file with a given name </s>
|
funcom_train/46459298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setScaleX(int n, double value) {
if (isLocked()) return;
if (isFixedScale()) {
setAllScalesX(value);
return;
}
scaleX.set(n, value);
try {
updateTransforms(n);
} catch(NoninvertibleTransformException ex) {
ex.printStackTrace();
}
}
COM: <s> sets the scale factor image units per world unit along the image </s>
|
funcom_train/22429327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnStop() {
if (btnStop == null) {
btnStop = new JButton();
btnStop.setText("Stop");
btnStop.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
if (hostProcess != null) {
hostProcess.stop();
}
btnStop.setEnabled(false);
}
});
}
return btnStop;
}
COM: <s> this method initializes btn stop </s>
|
funcom_train/10866951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean stem(char[] wordBuffer, int offset, int wordLen) {
reset();
if (b.length < wordLen) {
b = new char[ArrayUtil.oversize(wordLen, NUM_BYTES_CHAR)];
}
System.arraycopy(wordBuffer, offset, b, 0, wordLen);
i = wordLen;
return stem(0);
}
COM: <s> stem a word contained in a portion of a char array </s>
|
funcom_train/12549304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MatrixInputTable generateMatrixInputTable(String key, int[][] newValues) {
MatrixInputTable internalMatrixInputTable = new MatrixInputTable(newValues);
internalMatrixInputTable.setToolTipText(getTranslator().translateMessage(
key + ".toolTipText"));
internalMatrixInputTable.setLocalHeaderString(getTranslator()
.translateMessage("column"));
registerComponent(key, internalMatrixInputTable);
return internalMatrixInputTable;
}
COM: <s> method for generating a new matrix input table with passed int values </s>
|
funcom_train/4040046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleAddEvent() {
ISelection selection = availableCategoriesViewer.getSelection();
if (selection.isEmpty()) {
return;
}
for (Object element : ((IStructuredSelection) selection).toArray()) {
availableCategories.remove(element);
selectedCategories.add((ICategory) element);
}
refreshViewers();
}
COM: <s> adds the selected elements from </s>
|
funcom_train/25332069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetSequenceStorage() {
DAEnsemblDNASequenceReader proxyLoader = new DAEnsemblDNASequenceReader();
DADNASequence instance = new DADNASequence();
assertNull(instance.getProxySequenceReader());
instance.setSequenceStorage(proxyLoader);
assertEquals(instance.getProxySequenceReader(),proxyLoader);
}
COM: <s> test of set sequence storage method of class dadnasequence </s>
|
funcom_train/26595306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getColumnValues() throws DException {
ArrayList aList = new ArrayList();
for (int i = 0; i < iterators.length; i++) {
Object obj = iterators[i].getColumnValues();
if (obj != null) {
aList.addAll(Arrays.asList( (Object[]) obj));
}
}
return aList.toArray();
}
COM: <s> this method is used to retrieve the all the values of record </s>
|
funcom_train/9643959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateTableHeight() {
setPreferredScrollableViewportSize(new Dimension(width,
// (tableModel.getRowCount() > 0 && tableModel.getRowCount() < 23) ?
// tableModel
// .getRowCount()
// * getRowHeight()
// : getRowHeight() * 23));
tableModel.getRowCount() * getRowHeight()));
}
COM: <s> update table height </s>
|
funcom_train/21849590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createSubdirectories(String directories) throws IOException {
StringBuffer abspath = new StringBuffer(m_tshome);
// allow either \ or / path delimiter
StringTokenizer tz = new StringTokenizer(directories, "/\\");
while (tz.hasMoreElements()) {
String subpath = (String) tz.nextToken();
abspath.append(File.separatorChar);
abspath.append(subpath);
File dir = new File(abspath.toString());
dir.mkdir();
}
}
COM: <s> creates a set of subdirectories under the main resources directory </s>
|
funcom_train/12652764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToString() {
assert "C".equals(CharacteristicCode.PREFIX) : "Prefix is not C: " + CharacteristicCode.PREFIX;
int code = generator.nextInt();
CharacteristicCode characteristicCode = new CharacteristicCode(code);
String description = characteristicCode.toString();
assert description.equals("C" + code) : "Description " + description + " is not C" + code;
}
COM: <s> test to string description </s>
|
funcom_train/24000629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParse() throws Exception {
JOCLParser instance = new JOCLParser(Boolean.class);
instance.addExternalVariable("x", String.class);
OclParsedExpression res = instance.parse("x");
assertEquals("let self : Boolean, x : String in x",res.toFullConcrete());
assertEquals("bob",res.evaluate(Boolean.TRUE, "bob"));
}
COM: <s> test of parse method of class joclparser </s>
|
funcom_train/2903627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void changeBackgroundColor(){
if(colorChooser == null){
colorChooser = ZDialogChooser.getThemeColorChooser();
}
ZDrawable d = drawerData;
Color old = d.getBackground();
if(old == null){
old = Color.black;
}
Color c = colorChooser.showDialog(null, "Choose New Color", old);
if(c != null){
rootMenu.setBackground(c);
root.setBackground(c);
setBackground(c);
d.setBackground(c);
if(parentOwner != null){
pwin.setBackground(c);
}
else{
pad.setBackground(c);
}
drawerData = d;
rootMenu.repaint();
repaint();
}
}
COM: <s> change background color </s>
|
funcom_train/10284823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getFile(boolean pRefresh) {
String lFolder = getFeed().getFolder();
if (mFile == null || mFile.length() == 0 || mFile.equals("null")
|| pRefresh) {
mFile = super.getName();
if (mFile == null) {
return null;
}
}
return FileHandler.getLocalEnclosureFile(mFile, lFolder);
}
COM: <s> overrides the xfile method </s>
|
funcom_train/4174061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseForGet(HttpExchange httpExchange) throws SQLException, InvalidCollectionException {
Clear();
URI uri = httpExchange.getRequestURI();
path = uri.getPath().split("\\.")[0];
query = uri.getQuery();
parseBasic(path);
parseTableQueryParameters(query);
}
COM: <s> parse the uri address </s>
|
funcom_train/29516324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int find_peak_last_read(int i, int max_extended_length) {
if (i == this.sorted_reads.length - 1) {
return i;
}
while ((i + 1 < this.sorted_reads.length)
&& ((this.sorted_reads[i].get_alignStart() + max_extended_length - 1)
>= this.sorted_reads[i + 1].get_alignStart())) {
i++;
}
return i;
}
COM: <s> set method used to find the last read in a cluster of reads </s>
|
funcom_train/26458877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFullDefaultResultType() {
if ((defaultResultType == null) && !parents.isEmpty()) {
for (Iterator iterator = parents.iterator(); iterator.hasNext();) {
PackageConfig parent = (PackageConfig) iterator.next();
String parentDefault = parent.getFullDefaultResultType();
if (parentDefault != null) {
return parentDefault;
}
}
}
return defaultResultType;
}
COM: <s> returns the default result type for this package </s>
|
funcom_train/31146023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileStatus stat() {
FileStatus s = new FileStatus();
s.file = this;
s.isDirectory = m_file.isDirectory();
s.canRead = m_file.canRead();
s.canWrite = m_file.canWrite();
s.length = m_file.length();
return s;
}
COM: <s> return information on the properties of the file </s>
|
funcom_train/9480693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeHandler(Handler handler) {
// Anonymous loggers can always remove handlers
if (this.isNamed) {
LogManager.getLogManager().checkAccess();
}
if (handler == null) {
return;
}
this.handlers.remove(handler);
updateDalvikLogHandler(); // android-only
}
COM: <s> removes a handler from this logger </s>
|
funcom_train/20823422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void select(final int selectedIndex) {
boolean selectionChanged = false;
for (int i = 0; i < size(); i++) {
if (get(i).setSelected(i == selectedIndex)) {
selectionChanged = true;
}
}
previousSelectedCueIndex = selectedIndex;
if (selectionChanged) {
fireSelectionChanged();
}
}
COM: <s> select the code cue code with given index </s>
|
funcom_train/45767958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String displayName() {
try {
return java.beans.Introspector.getBeanInfo(getClass()).getBeanDescriptor().getDisplayName();
} catch (Exception e) {
if (Boolean.getBoolean("netbeans.debug.exceptions"))
e.printStackTrace();
return getClass().getName();
}
}
COM: <s> get the display name </s>
|
funcom_train/35297631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deregisterServiceProvider(Object provider) {
if (provider == null) {
throw new IllegalArgumentException("provider == null!");
}
Iterator regs = getSubRegistries(provider);
while (regs.hasNext()) {
SubRegistry reg = (SubRegistry)regs.next();
reg.deregisterServiceProvider(provider);
}
}
COM: <s> removes a service provider object from all categories that </s>
|
funcom_train/44715883 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int updateProduct() throws SQLException {
Connection conn = ConnectionManager.getConnection();
PreparedStatement pstmt = conn.prepareStatement(lookupQuery("updateProductSQL"));
pstmt.setString(1, m_sName);
pstmt.setString(2, m_sDesc);
pstmt.setBigDecimal(3, m_ID);
return pstmt.executeUpdate();
}
COM: <s> updates this products information in the database </s>
|
funcom_train/37062201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rebuildContainer() {
diagramContainer.removeAll();
legendContainer.removeAll();
this.validate();
setGridLayoutDimensions(dc.getNumberOfDiagrams(), 1);
addSingleDiagramPanels();
updateTrainingAxisMaxValues();
addDiagramLegendPanel();
this.validate();
System.gc();
}
COM: <s> when other training s is are selected the single diagram panels are removed </s>
|
funcom_train/13974253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireSockIOEvent(SockIOEvent evt){
Object[] listeners = listenerList.getListenerList();
for (int i = 0; i < listeners.length; i += 2) {
if (listeners[i] == SockIOListener.class) {
((SockIOListener) listeners[i + 1]).sockIOOccurred(evt);
}
}
}
COM: <s> fired when there is a valid data read </s>
|
funcom_train/24536451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Rectangle getBounds(IJavaObjectInstance aBean) {
IBeanProxy beanProxy = BeanProxyUtilities.getBeanProxy(aBean);
IRectangleBeanProxy rectangleProxy = BeanAwtUtilities.invoke_getBounds(beanProxy);
Rectangle r = new Rectangle(rectangleProxy.getX(), rectangleProxy.getY(), rectangleProxy.getWidth(), rectangleProxy.getHeight());
return r;
}
COM: <s> return a rectangle containing the bounds of a bean </s>
|
funcom_train/48045935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DateTimeFormatter toFormatter(Locale locale) {
DateTimeFormatterBuilder.checkNotNull(locale, "Locale must not be null");
while (active.parent != null) {
optionalEnd();
}
return new DateTimeFormatter(locale, new CompositePrinterParser(printers, parsers, false));
}
COM: <s> completes this builder by creating the date time formatter using the specified locale </s>
|
funcom_train/28470869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int openDB(String name, int cardNo, int openMode) throws SyncException {
int ir[] = new int[1];
int res;
res = SyncOpenDB(name, cardNo, ir, openMode);
verifyResult(res, "Error Opening Database");
return ir[0];
}
COM: <s> opens a database on the palm os device for read write exclusive access </s>
|
funcom_train/23278737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateProject(Project p) {
if(!validateClass(p)) throw new ARISException("Invalid project");
// VersionController.version(p,this);
getHibernateTemplate().update(p);
auditDAO.auditAction("Project.updateProject","title="+p.getTitle());
}
COM: <s> updates the given project </s>
|
funcom_train/25575866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToChangeHistory(final int methodID, final Object... params) {
Object[] historyEntry = new Object[params.length + 1];
historyEntry[0] = methodID;
for (int i = 0; i < params.length; i++) {
historyEntry[i + 1] = params[i];
}
this.changeHistory.add(historyEntry);
}
COM: <s> adds the method with the specified id and its parameters to the change </s>
|
funcom_train/44011577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPositionID() {
System.out.println("getPositionID");
PositionBO instance = new PositionBO();
String expResult = "";
String result = instance.getPositionID();
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 position id method of class edu </s>
|
funcom_train/25819815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Control createDialogArea(Composite parent) {
Control c = super.createDialogArea(parent);
Composite myDialogArea = (Composite) c;
Control[] children = myDialogArea.getChildren();
for (int i = 0; i < children.length; i++) {
Control curr = children[i];
if (curr instanceof Text) {
myPattern = (Text) curr;
break;
}
}
return c;
}
COM: <s> hook for creating dialog area to fetch protected text field from dialog </s>
|
funcom_train/3155469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initBaselineAlgorithm() throws ProcessorException {
if (_algorithm == null) {
_algorithm = new BaselineAlgorithm();
}
// set wavelengths
_algorithm.setWavelengths(_wavelengthLow, _wavelengthHigh, _wavelengthSignal);
// set invalid pixel
_algorithm.setInvalidPixelValue(_invalidPixelValue);
}
COM: <s> initializes the baseline algorithm class </s>
|
funcom_train/45251311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean testCustom(Object object, IActionFilter filter) {
Map filterProperties = getFilterProperties();
if (filterProperties == null)
return false;
Iterator iter = filterProperties.keySet().iterator();
while (iter.hasNext()) {
String key = (String) iter.next();
String value = (String) filterProperties.get(key);
if (!filter.testAttribute(object, key, value))
return false;
}
return true;
}
COM: <s> returns whether the object passes a custom key value filter implemented </s>
|
funcom_train/39107822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public Record getRecord(int i){
if (env.getMode() == Mode.TAG_PREVIEW ||
env.getMode() == Mode.ANONYMOUS_XML_DOWNLOAD ||
env.getMode() == Mode.PREVIEW) {
return Record.dummyRecord();
}
else {
return getRecordlist().getRecord(i);
}
}
COM: <s> returns user record number i </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.