__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/13994224 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnsubscribeAttributeChange() {
eventBroker.unsubscribeAttributeChange(ATTRIBUTES[0],
attributeSubscribers[0]);
publishChange(ATTRIBUTES[0], IDS[0], TYPES[0]);
assertNotification(false, attributeSubscribers[0]);
assertNotification(true, attributeSubscribers[1]);
assertNotification(false, attributeSubscribers[2]);
}
COM: <s> tests unsubscribe mechanism for attribute change subscribers </s>
|
funcom_train/23284465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLineInLevel(int leftLevel, int rightLevel) throws IOException, UPNPResponseException {
ActionMessage message = messageFactory.getMessage("SetLineInLevel");
message.setInputParameter("DesiredLeftLineInLevel", leftLevel);
message.setInputParameter("DesiredRightLineInLevel", rightLevel);
message.service();
}
COM: <s> sets the level for each component of the line in </s>
|
funcom_train/3182980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void beginProcessLogout(WebRequest webRequest) {
logger.debug("setting request parameters for processLogout test");
try {
super.logIn(webRequest, "EmrAdmin", "emr123");
super.setupParameters("processLogout", webRequest);
} catch (Exception e) {
logger.error("Test Failed", e);
fail(e.getMessage());
}
}
COM: <s> sets necessary parameters for process logout state in the request </s>
|
funcom_train/11739056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void selectRow(Object row, int index, TreePath path) {
if (index > 0 && columns.get(index - 1).getSelectedValue() != row) {
columns.get(index - 1).setSelectedValue(row, true);
}
else { //update
updateFromModel(row, index - 1);
}
}
COM: <s> selects one path component </s>
|
funcom_train/35043911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GetResponse getBucketLogging(String bucket, Map headers) throws IOException {
Map pathArgs=new HashMap();
pathArgs.put("logging", null);
return new GetResponse(makeRequest("GET", bucket, "", pathArgs, headers));
}
COM: <s> get the logging xml document for a given bucket </s>
|
funcom_train/7641771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateDescription(TableItem item) {
if (item != null) {
Object data = item.getData();
if (data instanceof AvdInfo) {
String newTooltip = ((AvdInfo) data).getPath();
mDescription.setText(newTooltip == null ? "" : newTooltip); //$NON-NLS-1$
}
}
}
COM: <s> updates the description label with the path of the items avd if any </s>
|
funcom_train/24380381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createMathMLMarshaller() throws JAXBException {
MQMain.logger.info("Creating MathML marshaller.");
mathmlMarshaller = mathmlJC.createMarshaller();
mathCf = new JAXBCommentFactory();
mathmlMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
Boolean.TRUE);
mathmlMarshaller.setProperty("com.sun.xml.bind.namespacePrefixMapper",
new MathMLNamespacePrefixMapper());
mathmlMarshaller.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,
"http://www.w3.org/1998/Math/MathML mathml2.xsd");
mathmlMarshaller.setSchema(mathmlSchema);
}
COM: <s> creates the math ml marshaller </s>
|
funcom_train/13260582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean MVAtoSIM_parallel(String srcPath, String dstPath) {
//source xsd
String srcXsdPath = XSDSchemaLoader.loadSchema(XSDSchemaLoader.JMVA_MODEL_DEFINITION);
//destination xsd
String dstXsdPath = XSDSchemaLoader.loadSchema(XSDSchemaLoader.JSIM_MODEL_DEFINITION);
//xslt transformation
String transPath = XSDSchemaLoader.loadSchema(XSDSchemaLoader.JMVA_TO_JSIM);
configureTransformer(srcPath, dstPath, transPath, srcXsdPath, dstXsdPath);
return transform();
}
COM: <s> transform an xml file describing the model converting it from the </s>
|
funcom_train/16769813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void releasePendingMessage() {
if (pendingMessage != null) {
IRTMPEvent body = pendingMessage.getBody();
if (body instanceof IStreamData && ((IStreamData<?>) body).getData() != null) {
((IStreamData<?>) body).getData().free();
}
pendingMessage.setBody(null);
pendingMessage = null;
}
}
COM: <s> releases pending message body nullifies pending message object </s>
|
funcom_train/40700521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setClosed(boolean isClosed) {
if (isClosed)
DOM.removeEventPreview(this);
else {
if (isModalAfterOpen) {
if (!isMainSlider || this.modalWindowDeck.getWindowCount() > 1) {
DOM.removeEventPreview(this);
DOM.addEventPreview(this);
}
}
}
this.isClosed = isClosed;
this.modalWindowDeck.setVisible(!isClosed);
if (isClosed) {
refreshEnableStyle();
} else {
arrow.setStyleName("pf-slider-arrow-open");
}
}
COM: <s> sets value indicating whether this </s>
|
funcom_train/7633094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doTestEnterProximity(long expiration) throws Exception {
// update location to outside proximity range
synchronousSendLocation(30, 30);
registerProximityListener(0, 0, 1000, expiration);
sendLocation(0, 0);
waitForAlert();
assertProximityType(true);
}
COM: <s> helper variant for testing enter proximity scenario </s>
|
funcom_train/18328836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMaximumData(AiPlayerInfo ai) throws IOException {
URL url = makePisURL("getSpaceFree", Integer.toString(ai.getUid()));
int spaceFree = Integer.parseInt(readLine(url, null), 10);
// maximum data is space free + size of current data
return spaceFree + ai.getDataSize();
}
COM: <s> get the maximum persistent data size allowed for the given ai </s>
|
funcom_train/18325709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSubmachinesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StateMachine_submachines_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StateMachine_submachines_feature", "_UI_StateMachine_type"),
CoremodelPackage.Literals.STATE_MACHINE__SUBMACHINES,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the submachines feature </s>
|
funcom_train/33526845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String onViewPhoto() {
Photo selectedPhoto = (Photo) this.photos.getRowData();
JsfUtils.getSessionMap().put(Constants.SESSION_PHOTO_ID, selectedPhoto.getId());
JsfUtils.getSessionMap().put(Constants.SESSION_TOOLBAR_SELECTION, Constants.TOOLBAR_PHOTOS);
return Constants.OUTCOME_VIEW_PHOTO;
}
COM: <s> action handler for preparing the display of the selected photo </s>
|
funcom_train/11680962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initIOHandler() {
if (httpIOHandler == null) {
LOG.info("No http IO Handler associated - using defaults");
httpIOHandler = new HttpIOHandler();
}
if (container == null) {
throw new IllegalStateException("Transport not associated with a container");
}
httpIOHandler.setContainer(container);
}
COM: <s> initialises our handler creating a new default handler if none has </s>
|
funcom_train/2369612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPlayerTrick(final Player player, final CardSet set) {
synchronized (this) {
this.playerTricks.get(player).add(new CardSet(set));
this.trickTable.setMade(player, this.playerTricks.size());
this.fireChange();
}
}
COM: <s> adds the cards to the players trick list </s>
|
funcom_train/44780689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private short convertMode( char c ) throws JspException {
short lc_mode;
switch ( c ) {
case 'N':
lc_mode = 0;
break;
case 'E':
lc_mode = 2;
break;
case 'I':
lc_mode = 1;
break;
default:
throw new JspException(
"panelTag mode " + c + " is invalid. Valid mode are N, E and I" );
}
return lc_mode;
}
COM: <s> convert display mode from char to short </s>
|
funcom_train/26524798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dist( Graph g, int i ) {
if( d==null || d.length<g.size() ) d = new int[g.size()];
if( color==null || color.length<g.size() ) color = new int[g.size()];
for(int j=0; j<g.size(); ++j)
{
color[j]=WHITE;
d[j] = -1;
}
bfs( g, i );
}
COM: <s> in code d j code returns the length of the shortest path between </s>
|
funcom_train/18341748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Event getEvent() {
Event ev = new Event(getNextInt(), getNextInt(), getNextInt(), getNextInt());
ev.setSourceClientID(getNextInt());
ev.setValue(getNextInt());
ev.setOrigin(new SimpleVector(getNextFloat(), getNextFloat(), getNextFloat()));
return ev;
}
COM: <s> returns the next event from the container </s>
|
funcom_train/20042453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _loadModuleNew() {
boolean result = true ;
oObj.loadModuleNew(
new TransliterationModulesNew[]
{TransliterationModulesNew.LOWERCASE_UPPERCASE}, loc);
String name = oObj.getName();
result = name.equals("lower_to_upper(generic)");
log.println("getName return: " + name);
tRes.tested("loadModuleNew()", result);
}
COM: <s> loads code lowercase uppercase code module and checks the current </s>
|
funcom_train/4529411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int refreshNodes() throws IOException {
int exitCode = -1;
if (!(fs instanceof DistributedFileSystem)) {
System.err.println("FileSystem is " + fs.getName());
return exitCode;
}
DistributedFileSystem dfs = (DistributedFileSystem) fs;
dfs.refreshNodes();
exitCode = 0;
return exitCode;
}
COM: <s> command to ask the namenode to reread the hosts and excluded hosts </s>
|
funcom_train/3990342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInnePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BadanieOkresowe_inne_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_inne_feature", "_UI_BadanieOkresowe_type"),
PrzychodniaPackage.Literals.BADANIE_OKRESOWE__INNE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the inne feature </s>
|
funcom_train/16577576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJScrollPane5() {
if (jScrollPane5 == null) {
jScrollPane5 = new JScrollPane();
jScrollPane5.setBounds(11, 155, 422, 120);
jScrollPane5.setViewportView(getLstSelectedLayers());
jScrollPane5.setPreferredSize(new java.awt.Dimension(205, 75));
}
return jScrollPane5;
}
COM: <s> this method initializes j scroll pane5 </s>
|
funcom_train/10588369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startElement(String uri, String localName, String qName, Attributes attr) throws SAXException {
AttributesImpl newAttr = new AttributesImpl(attr);
for (int i=0; i<attr.getLength(); i++) {
newAttr.setValue(i, interp(attr.getValue(i)));
}
super.startElement(uri, localName, qName, newAttr);
}
COM: <s> replace vars in attributes </s>
|
funcom_train/33078605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValue(Object pRowObject) {
try {
if (pRowObject == null)
return null;
Object value = mGetter == null ? pRowObject : mGetter.invoke(
pRowObject, null);
return mFormat == null ? value : mFormat.format(value);
}
catch (Exception e) {
e.printStackTrace();
return pRowObject;
}
}
COM: <s> return the cell value </s>
|
funcom_train/1414728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init() {
List<Rule> rulesList = parsePattern();
mRules = (Rule[]) rulesList.toArray(new Rule[rulesList.size()]);
int len = 0;
for (int i=mRules.length; --i >= 0; ) {
len += mRules[i].estimateLength();
}
mMaxLengthEstimate = len;
}
COM: <s> p initializes the instance for first use </s>
|
funcom_train/20440018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDirectionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ESMFStateItemConnection_direction_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ESMFStateItemConnection_direction_feature", "_UI_ESMFStateItemConnection_type"),
ESMFPackage.Literals.ESMF_STATE_ITEM_CONNECTION__DIRECTION,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the direction feature </s>
|
funcom_train/44703179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disconnect() {
// make sure the reader is closed
closeReader();
if(s == null)
return;
try {
s.close();
} catch(IOException e) {
LOG.error("["+ PLUGIN_ID + "] Error disconnecting: " + e);
} finally {
s = null;
is = null;
}
}
COM: <s> disconnect the socket if connected </s>
|
funcom_train/20884970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testBigDecimalCSV() {
BigDecimalDTO dto = new BigDecimalDTO();
dto.bigDecimalField = new BigDecimal(32323455.00).setScale(2);
assertTrue(JSefaTestUtil.serialize(CSV, dto).indexOf("32323455.00") >= 0);
JSefaTestUtil.assertRepeatedRoundTripSucceeds(CSV, dto);
}
COM: <s> tests big decimal csv </s>
|
funcom_train/44284140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int get() {
int i = (int)PatchBytes.getSysexByte(patch.sysex, 9, ofs);
int j;
for (j = 0; j < cabTranslate.length; j++) {
if (i == cabTranslate[j]) {
break;
}
}
return j;
}
COM: <s> gets the cabinet type value from the sysex record and translates it </s>
|
funcom_train/38489621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void eatName() {
_type = TT_NAME;
do {
eat();
} while (isNamePart());
final String name = _token.toString();
for (int i = 0; i < _keywords.length; i++) {
// @todo this is impl. case-insensitive, must be made switchable
if (name.equalsIgnoreCase(_keywords[i])) {
_type = TT_KEYWORD;
break;
}
}
}
COM: <s> appends all subsequential characters belonging to a name to the current token </s>
|
funcom_train/25765861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tokenise(Document doc) {
try {
Locale locale = getLocale();
SentenceSplitter splitter = SentenceSplitter.getInstance(locale);
splitter.setText(doc.getText());
while (splitter.hasNext()) {
Sentence sentence = splitter.next();
doc.getSentences().add(sentence);
doc.getTokens().addAll(sentence.getTokens());
}
} catch (Throwable e) {
throw new RepositoryException(DOCUMENT_PARSING_ERROR, "Error during tokenising of document '" + doc.getName() + "'.", e);
}
}
COM: <s> extract sentences and their tokens </s>
|
funcom_train/14296893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectMetamodel(Project project) {
String mm = MetaApiFactory.getFactory().getModelHelper().getTaggedValueValueByName(
project.getModel(), Constants.TV_CM3_METAMODEL);
if (mm != null && MetamodelManager.getInstance().isRegistered(mm)) {
MetamodelManager.getInstance().selectMetamodel(mm);
}
}
COM: <s> selects the meta model specified in project tt project tt </s>
|
funcom_train/40412715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isMenuElement(Element e) {
if (DOM.isOrHasChild(getElement(), e)) {
return true;
}
for (int i = visiblePopups.size() - 1; i >= 0; i--) {
Widget w = (Widget)visiblePopups.get(i);
if (DOM.isOrHasChild(w.getElement(), e)) {
return true;
}
}
return false;
}
COM: <s> does e belong to this menu or one of its popups </s>
|
funcom_train/47827679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String extractValue(final VariableUsage variable) {
String value = null;
for (VariableCharacterisation characterisation : variable.getVariableCharacterisation_VariableUsage()) {
if (characterisation.getType() == VariableCharacterisationType.VALUE) {
value = characterisation.getSpecification_VariableCharacterisation().getSpecification();
}
}
return value;
}
COM: <s> extract the value characterization of a variable usage element </s>
|
funcom_train/20746719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Project constructProject(DbHelper db){
int id = db.getInt("project_id");
String name = db.getString("name");
String description = db.getString("description");
Date startDate = db.getDate("start_date");
Date endDate = db.getDate("end_date");
return new Project( id,
name,
description,
startDate,
startDate);
}
COM: <s> constructs a new instance of a code project code object with attributes </s>
|
funcom_train/3740023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Messag getMessage(Long mesId)throws MessageManagerException {
try
{
logg.debug(mesId);
Session sess= HibernateUtil.currentSession();
Messag mess = (Messag) sess.load(Messag.class, mesId);
return mess;
} catch (Exception e) {
String error = e.getClass()+" getMassage(mesId)";
//logger.debug(error);
throw new MessageManagerException(error);
}
}
COM: <s> get and return message with a given id </s>
|
funcom_train/31252626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeErrorPage(HttpServletResponse resp) {
try {
PrintWriter writer = resp.getWriter();
writer.println("<html><body><b>" + statusCode + ":</b> " +
ImvWebdavStatus.getStatusText(statusCode) +
"</body></html>");
writer.close();
} catch (IOException e) {
}
}
COM: <s> returns an http formatted error page </s>
|
funcom_train/34672065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getFiles(int offset, File dir) {
File[] files = dir.listFiles();
if (files != null) {
for (int i = 0; i < files.length; i ++) {
if (files[i].isDirectory()){
getFiles(offset, files[i]);
} else {
allFiles.add(files[i].getAbsolutePath().substring(offset));
}
}
}
}
COM: <s> cycles through a directory and subdirectories returning files contained therein </s>
|
funcom_train/20797972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopRecognition() {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.fine("Issuing Interrupt to Recognition-Thread...");
}
interrupt();
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.fine("...issued Interrupt to Recognition-Thread");
}
final long handle = recognizer.getRecognizerHandle();
recognizer.sapiAbortRecognition(handle);
}
COM: <s> stops the recognition process </s>
|
funcom_train/43101679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOrdering(Object handle, Object ok) {
if (handle instanceof MAssociationEnd && ok instanceof MOrderingKind) {
((MAssociationEnd) handle).setOrdering((MOrderingKind) ok);
return;
}
throw new IllegalArgumentException("handle: " + handle
+ " or ok: " + ok);
}
COM: <s> set the ordering kind of a given association end </s>
|
funcom_train/1916828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int update(Connection conn, String sql, Object[] params) throws SQLException {
PreparedStatement stmt = null;
int rows = 0;
try {
stmt = this.prepareStatement(conn, sql);
this.fillStatement(stmt, params);
rows = stmt.executeUpdate();
} catch (SQLException e) {
this.rethrow(e, sql, params);
} finally {
close(stmt);
}
return rows;
}
COM: <s> execute an sql insert update or delete query </s>
|
funcom_train/46729984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getHorizontalSplit(ISPanel bottomPanel, ISPanel topRight) throws Exception {
JSplitPane split = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
split.setDividerLocation(300);
split.setLeftComponent(getTopPanel(topRight));
if (bottomPanel == null) {
split.setRightComponent(new ISPanel());
} else {
split.setRightComponent(addToolbar(bottomPanel));
}
return split;
}
COM: <s> get the top bottom split pane </s>
|
funcom_train/41150887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double euclidDistance(double[] a1, double[] a2) {
double dist = 0;
for (int i = 0; i < a1.length; i++) {
dist += (a1[i] - a2[i]) * (a1[i] - a2[i]);
}
return dist;
}
COM: <s> calculates the square of the euclidian distance between </s>
|
funcom_train/32057694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testComponentResized() {
System.out.println("testComponentResized");
GPGraphpad pad = new GPGraphpad();
GPGraph graph = new GPGraph();
GraphUndoManager undo = new GraphUndoManager();
GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo);
try {
newDoc.componentResized(null);
} catch (Exception e) {
fail();
}
try {
FormatAlignBottom bottom = new FormatAlignBottom(pad);
newDoc.setResizeAction(bottom);
newDoc.componentResized(new ComponentEvent(pad,
ComponentEvent.COMPONENT_MOVED));
} catch (Exception e) {
fail();
}
}
COM: <s> test of component resized method of class gpdocument </s>
|
funcom_train/26210188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String form(double x) {
String r;
if (precision < 0)
precision= 6;
int s= 1;
if (x < 0) {
x= -x;
s= -1;
}
if (fmt == 'f')
r= fixed_format(x);
else if (fmt == 'e' || fmt == 'E' || fmt == 'g' || fmt == 'G')
r= exp_format(x);
else
throw new java.lang.IllegalArgumentException();
return pad(sign(s, r));
}
COM: <s> formats a double into a string like sprintf in c </s>
|
funcom_train/42402809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Comparator getColumnComparator(final int column) {
final ColumnSorting sorting = this.getColumnSorting(column);
Comparator comparator = sorting.getComparator();
if (false == sorting.isAscendingSort()) {
final Comparator originalComparator = comparator;
comparator = new Comparator() {
public int compare(final Object first, final Object second) {
return originalComparator.compare(second, first);
}
};
}
return comparator;
}
COM: <s> returns a comparator which may be used to sort a particular column </s>
|
funcom_train/4385676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Double simRank(Integer id1, Integer id2) {
if (id1.equals(id2))
return new Double(1);
if (id2.intValue() > id1.intValue()) {
Integer id3 = id1;
id1 = id2;
id2 = id1;
}
Double aux = (Double) (((Map) (scores.get(id1))).get(id2));
if (aux.intValue() < 0) {
computeSimRank();
return simRank(id1, id2);
}
return aux;
}
COM: <s> returns the sim rank score between two given link identifyers </s>
|
funcom_train/2801932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNativelySerializable(Class pObject) {
if (pObject == null) {
return false;
}
int pos = 0;
while (pos < NATIVELY_SERIALIZABLE.length) {
if (NATIVELY_SERIALIZABLE[pos].isAssignableFrom(pObject)) {
return true;
} else {
pos++;
}
}
return false;
}
COM: <s> checks if the given class must be serialized for this transport layer </s>
|
funcom_train/16839729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void queuePasswordChange(IoSession session, String username, String newPassword, String oldPassword) {
if(m_thread == null || !m_thread.isAlive()) {
start();
}
m_passChangeQueue.offer(new Object[] {session, username, newPassword, oldPassword});
}
COM: <s> places a player in the queue to update their password </s>
|
funcom_train/42480548 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Time getTime() {
int hour = 0;
int minute = 0;
int second = 0;
Time time = new TimeImpl();
try{
hour = Integer.parseInt(this.tfHour.getText());
minute = Integer.parseInt(this.tfMinute.getText());
second = Integer.parseInt(this.tfSecond.getText());
time = new TimeImpl(hour, minute, second);
}
catch (NumberFormatException e) {
// Do nothing
}
catch (IllegalArgumentException e) {
// Do nothing
}
return time;
}
COM: <s> returns the time data from this component </s>
|
funcom_train/8688810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startTestSuite(JUnitTest suite) {
if (output == null) {
return; // Quick return - no output do nothing.
}
StringBuffer sb = new StringBuffer("Testsuite: ");
sb.append(suite.getName());
sb.append(StringUtils.LINE_SEP);
output.write(sb.toString());
output.flush();
}
COM: <s> the whole testsuite started </s>
|
funcom_train/45624543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTemplateTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TemplatedType_TemplateType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TemplatedType_TemplateType_feature", "_UI_TemplatedType_type"),
CSMPackage.Literals.TEMPLATED_TYPE__TEMPLATE_TYPE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the template type feature </s>
|
funcom_train/30196866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetDataFine() {
System.out.println("setDataFine");
Date dataFine = null;
SingolaEsperienzaProfessionale instance = new SingolaEsperienzaProfessionale();
instance.setDataFine(dataFine);
Date result = instance.getDataFine();
assertEquals(null, result);
}
COM: <s> test of set data fine method of class com </s>
|
funcom_train/25310227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void queryStorage(StorageDirectory storage, String fileToQuery) {
String url = getUserDataStorageBaseUrl() + storage.getAttachUrl() + fileToQuery;
ClientResource cr = new ClientResource(url);
Representation result = cr.get();
assertNotNull(result);
assertTrue(cr.getStatus().isSuccess());
}
COM: <s> query the storage at the url of the file to query </s>
|
funcom_train/22268005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calculateHashCodeBase() {
this.hashCodeBase = (this.graphicsMode << 8) ^ (this.backgroundColorCodes[0] << 14) ^ (this.backgroundColorCodes[1] << 16) ^ (this.backgroundColorCodes[2] << 18) ^ (this.backgroundColorCodes[3] << 20) ^ ((this.xscroll ^ this.yscroll) << 28);
}
COM: <s> calculate the part of the hashcode used for screen caching which changes </s>
|
funcom_train/7826270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateInhibitorArc() {
System.out.println("createInhibitorArc");
ObjectModel instance = new ObjectModel();
Place from = instance.createPlace();
Transition to = instance.createTransition();
InhibitorArc result = instance.createInhibitorArc(from, to);
result.canBeFired();
}
COM: <s> test of create inhibitor arc method of class edu </s>
|
funcom_train/29830347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void received(BrowseItem browseItem, String id) {
if (id == null && !id.equals(servedID.getID())) return;
if (initialRequest) {
initialRequest = false;
servedID.setID(null);
browseBean.removeBrowseListener(this);
agents = browseItem;
initMenu();
}
}
COM: <s> handles received data while browsing </s>
|
funcom_train/46455337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object loadObject(XMLControl control, Object obj) {
PlottingPanel panel = (PlottingPanel) obj;
panel.setTitle(control.getString("title"));
panel.setXLabel(control.getString("x axis label"));
panel.setYLabel(control.getString("y axis label"));
super.loadObject(control, obj);
return obj;
}
COM: <s> loads a plotting panel with data from an xmlcontrol </s>
|
funcom_train/2558522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateAttributes(InputNode node, Section section) throws Exception {
NodeMap<InputNode> list = node.getAttributes();
LabelMap map = section.getAttributes();
for(String name : list) {
InputNode value = node.getAttribute(name);
if(value != null) {
validateAttribute(value, section, map);
}
}
validate(node, map);
}
COM: <s> this code validate attributes code method validates the attributes </s>
|
funcom_train/4365076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendLongInt(int val) {
buf[pos++] = (byte) ((val >>> 24) & 0xFF);
buf[pos++] = (byte) ((val >>> 16) & 0xFF);
buf[pos++] = (byte) ((val >>> 8) & 0xFF);
buf[pos++] = (byte) (val & 0xFF);
}
COM: <s> append an int 4 bytes to the message </s>
|
funcom_train/49351181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IPersistenceObject getPersistenceObject() throws BasicException{
try {
IPersistenceObject dao = (IPersistenceObject) DAOPool.borrowObject();
dao.setConfiguration(configuration.getUnderlyingConfiguration());
dao.setSessionFactory(configuration.getSessionFactory());
dao.setPoolJDBCServiceName(jdbcConnectionPool);
return dao;
} catch (Exception e) {
throw BasicException.basicErrorHandling("Error getting PersistenceObject from pool",
"errorGettingPersistenceObjectFromPool", e, log);
}
}
COM: <s> retrieve an ipersistence object object from pool </s>
|
funcom_train/36034670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showErrorInserting(File file) {
JOptionPane.showMessageDialog(this,
"Error inserting file" + file + ". Check that the file doesn't" +
"already exist and you have read permission on the file.",
"Error inserting file",
JOptionPane.ERROR_MESSAGE);
}
COM: <s> show a message indicating that the given file couldnt be inserted </s>
|
funcom_train/11702286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createTableViewer() {
tableViewer = new TableViewer(table);
tableViewer.setUseHashlookup(true);
tableViewer.setColumnProperties(columnNames);
// Assign the cell editors to the viewer
tableViewer.setCellEditors(createCellEditors());
// Set the cell modifier for the viewer
tableViewer.setCellModifier(createCellModifiers());
// Set the default sorter for the viewer
tableViewer.setSorter(createSorter());
}
COM: <s> create the table viewer </s>
|
funcom_train/44710246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected TreeWalker makeTreeWalker() {
TreeWalker tw = createTreeWalker(getInputContext(), new NodeFilter() {
public short acceptNode(Node n) {
if (n.getNodeName().equals("bebop:cell")) {
return FILTER_ACCEPT;
}
return FILTER_SKIP;
}
});
return tw;
}
COM: <s> set up the input context as our parent class would except </s>
|
funcom_train/28171080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetClosed() {
System.out.println("setClosed");
boolean newValue = true;
BezierPath instance = new BezierPath();
instance.setClosed(newValue);
// 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 closed method of class org </s>
|
funcom_train/198016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UndoableEdit execute() {
/*
* 'Filter' the mask so that the undo restores to the state of the
* CharacterisedInt at this point.
*/
int current = ch.getIntCharacteristics();
int localMask = set ? ~current & mask : current & mask;
ch.setIntCharacteristics(localMask, set);
return new ChangeIntCharacteristic(name, ch, localMask, set);
}
COM: <s> performs the edit defined by this command and returns an undoable edit </s>
|
funcom_train/15603399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseMoved(SequenceMouseEvent e) {
// Set the Nucleotide label.
if ( lastFixedRange == null || lastFixedRange.getMagnitude()==0 ) return;
long nucleotidePos = lastFixedRange.getMinimum() + e.getSequencePosition();
formatStatisticsForDisplay(nucleotidePos);
}
COM: <s> get mouse moved notification </s>
|
funcom_train/22449139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int resourceToString(String aFile, StringBuffer aBuffer) {
int cols = 0;
URL url = getClass().getResource(aFile);
try {
BufferedReader in = new BufferedReader(
new InputStreamReader(url.openStream()));
String line = "";
do {
line = in.readLine();
if (line != null) {
if (line.length() > cols) cols = line.length();
aBuffer.append(line);
aBuffer.append('\n');
}
}
while (line != null);
}
catch (IOException e) {
e.printStackTrace();
}
return cols;
}
COM: <s> read resource content to string buffer </s>
|
funcom_train/15609411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ReplacementRelationship getReplacementRelationship() {
ReplacementRelationship replacementRelationship = null;
if (!this.getGenomeVersion().hasWorkspace()) {
return replacementRelationship; //do not create one
}
Workspace myWorkspace = this.getGenomeVersion().getWorkspace();
if (myWorkspace != null) {
replacementRelationship = myWorkspace.getReplacementRelationForWorkspaceFeature(
this);
}
return replacementRelationship;
}
COM: <s> public method used to get the replacement relationships for this feature </s>
|
funcom_train/23940386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Disk getDisk(int kind, int t, int n) {
for (int i = 0; i < this.disks.length; ++i) {
DiskIdentifier id = this.disks[i].getIdentifier();
if ((this.disks[i].getKind() == kind) && (id.getTeamNumber() == t)
&& (id.getDiskNumber() == n)) {
return this.disks[i];
}
}
return null;
}
COM: <s> return the disk corresponding to parameters </s>
|
funcom_train/21965717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEncryption(byte userPassword[], byte ownerPassword[], int permissions, boolean strength128Bits) throws DocumentException {
if (stamper.isAppend())
throw new DocumentException("Append mode does not support changing the encryption status.");
if (stamper.isContentWritten())
throw new DocumentException("Content was already written to the output.");
stamper.setEncryption(userPassword, ownerPassword, permissions, strength128Bits);
}
COM: <s> sets the encryption options for this document </s>
|
funcom_train/29932843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean addColumn(String name, Integer type, Object value) throws IESException {
this.checkDBVendor();
if (this.getDoesColumnExist(name) == false) // don't let the same column get added twice
{
this.columns.add(new DataColumn(name,type,value, this.getDBVendor()));
return true;
}
else
{
throw new IESException("Column already exists in DataRow.");
}
}
COM: <s> create a new column </s>
|
funcom_train/50999055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addData(AnnealingLog addal, int series) {
int ic = addal.getItemCount(0);
Float[] entry;
for (int f = 0; f < ic; f++) {
entry = addal.getEntry(0, f);
al.addEntry(series, al.getItemCount(series), entry);
}
}
COM: <s> add the annealing data for a given host identified by number series </s>
|
funcom_train/9912998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasProperty(String expString) throws UIException {
JSONObject event = (JSONObject) this.getEventData();
if (event.has(expString)) {
Object o = event.get(expString);
if (o == null) {
return false;
}
if (o instanceof JSONObject) {
return !((JSONObject) o).isNullObject();
}
if (o instanceof JSONNull) {
return false;
}
return true;
} else {
return false;
}
}
COM: <s> checks the property is exist in event data or not </s>
|
funcom_train/10794493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isMappingMode(ClassMetaData meta) {
return isMappingMode() && (meta.getSourceMode() & MODE_MAPPING) != 0
&& (meta.getEmbeddingMetaData() != null
|| !meta.isEmbeddedOnly())
&& (meta.getEmbeddingMetaData() == null
|| isMappingMode(meta.getEmbeddingMetaData()));
}
COM: <s> convenience method for interpreting </s>
|
funcom_train/34580535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getLgCancelCommand () {
if (lgCancelCommand == null) {//GEN-END:|87-getter|0|87-preInit
// write pre-init user code here
lgCancelCommand = new Command (lang.getProperty("command.cancel"), Command.BACK, 0);//GEN-LINE:|87-getter|1|87-postInit
// write post-init user code here
}//GEN-BEGIN:|87-getter|2|
return lgCancelCommand;
}
COM: <s> returns an initiliazed instance of lg cancel command component </s>
|
funcom_train/4515083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCalendar(Calendar cal) {
if (cal==null) {
unset=true;
cal= Calendar.getInstance(_locale);
} else {
unset=false;
}
_cal.set(Calendar.DAY_OF_MONTH, cal.get(Calendar.DAY_OF_MONTH));
_cal.set(Calendar.MONTH, cal.get(Calendar.MONTH));
_cal.set(Calendar.YEAR, cal.get(Calendar.YEAR));
refreshGUI();
updateUI();
DayLabel dayLabel = _days.get(cal.get(Calendar.DAY_OF_MONTH) - 1);
dayLabel.grabFocus();
//setBackground(BACKGROUND_COLOR);
fireChangeEvent();
}
COM: <s> sets the current date using a calendar object </s>
|
funcom_train/24000477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetBagType() {
OclType result = OclTypeRegistry.getBagType(OclTypeRegistry.OclBooleanType);
assertTrue(result.isCollectionType());
assertEquals(OclTypeRegistry.OclBooleanType,((OclCollectionBase)result).getCollectionType());
assertEquals("Bag< Boolean >",result.getPathName());
}
COM: <s> test of get bag type method of class ocl type registry </s>
|
funcom_train/11089553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Properties getLocalConfiguration() {
Properties props = new Properties();
felixStorageDir = createTempDir("felix");
props.setProperty(FRAMEWORK_STORAGE, this.felixStorageDir.getAbsolutePath());
logger.trace("felix storage dir is {}", felixStorageDir.getAbsolutePath());
return props;
}
COM: <s> configuration settings for the osgi test run </s>
|
funcom_train/32973118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CertReference getCertFromCookie(String cookieValue){
try {
try {
cookieValue = URLDecoder.decode(cookieValue,"UTF-8");
} catch (UnsupportedEncodingException e1) {return null;} // Unlikely
//System.out.println(cookieValue.hashCode());
byte[] out = rec.decryptFromBase64(cookieValue);
return new CertReference(out);
} catch (IOException e) {
return null;
} catch (BaseEncryptor.EncryptionException e) {
//e.printStackTrace();
return null;
}
}
COM: <s> gets a cert object from an encrypted cookie </s>
|
funcom_train/3784605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean showPopupOptionWindow(String poTitle)
{ /* showPopupOptionWindow */
cs.ini.initSwitchOptionsData();
sog= new PopupOptions(cs.switchOptData, cs.switchOptCBvalue,
cs.switchOptValue, cs.projDir, poTitle);
return(true);
} /* showPopupOptionWindow */
COM: <s> show popup option window popup options window using the </s>
|
funcom_train/38501887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EventDO updateEvent(EventDO event) throws IDNotFoundException {
EventDO updated_event = null;
try {
_eventFactory.updateEventEntity(event);
updated_event = _eventFactory.getEventDO(event.getId());
} catch (FinderException ex) {
throw new IDNotFoundException(ex);
}
return updated_event;
}
COM: <s> update an already existing event </s>
|
funcom_train/9994173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCommandAction() throws AssertionFailedException {
System.out.println("commandAction");
Browser instance = null;
Command c_1 = null;
Displayable d_1 = null;
instance.commandAction(c_1, d_1);
fail("The test case is a prototype.");
}
COM: <s> test of test command action method of class browser </s>
|
funcom_train/24409574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNavigation(String newValue) {
// System.out.println("setNavigation called with newValue = " + newValue);
if (newValue.equalsIgnoreCase(LINEARBUTTON)){
navigationButtons.setSelected(linearButton.getModel(), true);
}
else {
// nonlinear
navigationButtons.setSelected(nonlinearButton.getModel(), true);
}
}
COM: <s> set navigation mode radio button group to reflect new value which </s>
|
funcom_train/3712666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void stopAlgorithm() {
alg.stopRunning();
// We must set the continue button to enabled state here, not at
// the running thread. We must wait until thread completion since
// the thread itself can set the buttons to a different state.
while (alg.isRunning()) {
try {
Thread.currentThread().sleep (5);
} catch (InterruptedException e) {}
}
bcontinue.setEnabled (true);
}
COM: <s> stops the fitting algorithm </s>
|
funcom_train/51576048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getWorldAddress() {
// String retStr = "nothing";
String retStr;
if (currentWorld == null) {
retStr = java.util.ResourceBundle.getBundle("anecho/JamochaMUD/JamochaMUDBundle").getString("NOTHING");
} else {
retStr = currentWorld.getAddress();
}
return retStr;
}
COM: <s> return the address of the currently selected world </s>
|
funcom_train/4253505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init(OriginField origin, SessionNameField session, ConnectionField connection, TimeField time)
{ v=new SdpField('v',"0");
o=origin;
s=session;
c=connection;
t=time;
av=new Vector();
media=new Vector();
}
COM: <s> inits the session descriptor </s>
|
funcom_train/41459845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SignalExecutor getExecutor(EventName eventName) throws UnknownPackageException {
//try to search is the local list first
for (SignalExecutor exec : executors) {
if (exec.getName().equals(eventName.getPackageName().toString())) {
return exec;
}
}
throw new UnknownPackageException(eventName.getPackageName().toString());
}
COM: <s> searches package of the specified event </s>
|
funcom_train/34527016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object buildHandlerInstance(Class<?> handlerClass) {
Object handlerInstance = null;
try {
Constructor<?> c = handlerClass
.getConstructor(EvaluationContext.class);
handlerInstance = c.newInstance((EvaluationContext) this);
} catch (Exception ex1) {
try {
handlerInstance = handlerClass.newInstance();
} catch (Exception ex2) {
}
}
if (handlerInstance != null)
evaluationHandlersPool.put(handlerClass, handlerInstance);
return handlerInstance;
}
COM: <s> builds a new evaluation handler object </s>
|
funcom_train/2800857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleShort(final IField pField, final String pTrimChars, final int pCharsLength) throws SAXException {
try {
if (pCharsLength != 0) {
pField.setData(new Short(pTrimChars));
}
} catch (Exception e) {
throwSAXExceptionForParse("Short", e);
}
}
COM: <s> assigns a short value to the given field </s>
|
funcom_train/976895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int showMessageBox(int actionTextNr, String defaultValue) {
DataMoverForm cpf = new DataMoverForm();
cpf.setTickedText(makeTickedText());
cpf.setVisibleText(makeVisibleText());
cpf.setTickedVisibleText(makeVisibleTickedText());
cpf.setFirstLineText(MyLocale.getMsg(actionTextNr, defaultValue));
int dialogResult = cpf.execute(null, Gui.CENTER_FRAME);
if (dialogResult != FormBase.IDOK) {
return -1;
}
int mode = cpf.getMode();
return mode;
}
COM: <s> shows the messagebox before copying moving deleting waypoints </s>
|
funcom_train/5446784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int size() {
int msgSize = 10; // the size of qType, qClass, ttl and rdatalength
msgSize += rdata.getDataLength();
for(int i=0; i<qName.length; i++)
msgSize += 1+qName[i].length();
return msgSize+1; // one extra for the terminating byte.
}
COM: <s> get the number of bytes needed to encode this question </s>
|
funcom_train/1671878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Db4oType db4oTypeStored(Transaction trans, Object obj) {
if (!(obj instanceof Db4oDatabase)) {
return null;
}
Db4oDatabase database = (Db4oDatabase) obj;
if (trans.referenceForObject(obj) != null) {
return database;
}
showInternalClasses(true);
try {
return database.query(trans);
} finally {
showInternalClasses(false);
}
}
COM: <s> allows special handling for all db4o type objects </s>
|
funcom_train/3083632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModel(BoundedRangeModel newModel) {
if (newModel == null) {
throw new IllegalArgumentException("The model must not be null");
}
BoundedRangeModel oldModel = getModel();
setProperty(PROPERTY_MODEL, newModel);
if (newModel != oldModel) {
if (oldModel != null) {
oldModel.removeChangeListener(changeListener);
changeListener = null;
}
if (newModel != null) {
changeListener = createChangeListener();
newModel.addChangeListener(changeListener);
}
newModel.setExtent(0);
}
}
COM: <s> sets the data model used by the slider </s>
|
funcom_train/45896313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int pageout(Page og) {
if ((endOfStream != 0 && lacingFill != 0) || /* 'were done, now flush' case */
bodyFill - bodyReturned > 4096 || /* 'page nominal size' case */
lacingFill >= 255 || /* 'segment table full' case */
(lacingFill != 0 && beginOfStream == 0)) { /* 'initial header page' case */
return flush(og);
}
return 0;
}
COM: <s> this constructs pages from buffered packet segments </s>
|
funcom_train/31012419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRow(String name, String value) {
if ( (nextPos == -1) || (hasElement(name))) {
return;
}
else {
names[nextPos] = name.toUpperCase();
values[nextPos] = value;
nextPos++;
if (nextPos == names.length) {
nextPos = -1;
}
}
}
COM: <s> adds a new row in the data set </s>
|
funcom_train/35300710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws SQLException {
checkParamIndex(parameterIndex);
if(params == null){
throw new SQLException("Set initParams() before setBigDecimal");
}
params.put(Integer.valueOf(parameterIndex - 1), x);
}
COM: <s> sets the designated parameter to the given </s>
|
funcom_train/18480409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setItems(Map<String,ChannelType<?>> items) {
for(Map.Entry<String,ChannelType<?>> item: items.entrySet()) {
my_pane.dlm.addElement(new ListItem(item.getKey(),item.getValue())) ;
}
}
COM: <s> sets the list of mapped channetypes </s>
|
funcom_train/134332 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeAllBaseCalls() {
setActiveBaseCalls(new NullBaseCalls());
// Not removing based axis because,
// this is only called when about to replace the base calls with reverse complements.
// To be correct,
// we should remove all the base glyphs.
int iBaseGlyphs = base_glyphs.size();
for (int i = 0; i < iBaseGlyphs; i++) {
TraceBaseGlyph baseGlyph = base_glyphs.get(i);
base_map.getScene().removeGlyph(baseGlyph);
}
//base_glyphs.clear();
base_calls_vector.clear();
}
COM: <s> clears all the base callss added with add base calls </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.