__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/42725164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean hasTabItems(GuiTabItem[] tabItems) {
int len = tabItems.length;
String[] items = new String[len];
for(int i = 0; i < len; i++){
items[i] = tabItems[i].getActualId();
}
Boolean returned = null;
String operation = Operations.CONTAINS;
returned = (Boolean) this.executeOperation(this.objectToGuiObjectRequest(), operation, items);
return returned;
}
COM: <s> returns true if the tab folder has the specified tab items </s>
|
funcom_train/51788050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInteractionPartTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InteractionPart_InteractionPartType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_InteractionPart_InteractionPartType_feature", "_UI_InteractionPart_type"),
RAMPackage.Literals.INTERACTION_PART__INTERACTION_PART_TYPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the interaction part type feature </s>
|
funcom_train/22263771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String defaultActionHtml() throws JspException {
StringBuffer result = new StringBuffer(2048);
result.append(defaultActionHtmlStart());
result.append(taskInfoHtmlContent());
result.append(dialogSeperator());
result.append(processInfoHtmlContent());
result.append(defaultActionHtmlEnd());
return result.toString();
}
COM: <s> generates the dialog starting html code </s>
|
funcom_train/22946216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt(int row, int column) {
Parameter parameter = (Parameter) data.get(row);
switch (column) {
case PROPERTY_KEY_INDEX:
return parameter.getName();
case PROPERTY_INDEX:
if (parameter instanceof ParameterComplexArray)
return "...";
return parameter.getValue().toString();
default:
return new Object();
}
}
COM: <s> returns value on specified position within the table </s>
|
funcom_train/48661502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Division getDivision(String handle) throws ITunesUException {
String xml = this.showTree(handle);
String pattern = "//Division[Handle=" + handle + "]";
Element element = getElementByXPath(xml, pattern);
if (element == null) {
throw new ITunesUException("not a Division handle");
}
return Division.fromXmlElement(element);
}
COM: <s> retrieves a division by its handle </s>
|
funcom_train/16380585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNumberOfTasksPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new UnsettablePropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CorrectOnlyProcessedTasksType_numberOfTasks_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CorrectOnlyProcessedTasksType_numberOfTasks_feature", "_UI_CorrectOnlyProcessedTasksType_type"),
CTEPackage.Literals.CORRECT_ONLY_PROCESSED_TASKS_TYPE__NUMBER_OF_TASKS,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the number of tasks feature </s>
|
funcom_train/37763650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkLength(Number input, Integer intSize) {
if (input != null && intSize != null) {
double value = Math.abs(input.doubleValue());
double intLimit = Math.pow(10, intSize.intValue() - 1);
if ((long) value < (long) intLimit)
return false;
}
return true;
}
COM: <s> this method will ensure that the input number exceeds the specified limit </s>
|
funcom_train/32118447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addScriptListener(ScriptListener l) {
Validate.notNull( l, "l argument is null"); //$NON-NLS-1$
listenerListLock.writeLock().lock();
try {
if (listenerList.contains(l) == false) {
listenerList.add(l);
}
} finally {
listenerListLock.writeLock().unlock();
}
}
COM: <s> register a listener to the composite </s>
|
funcom_train/28292974 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getAttemptExDurControl() {
if (_Debug) {
System.out.println(" :: SeqActivity --> BEGIN - " +
"getAttemptExDurControl");
System.out.println(" ::--> " + mAttemptExDurControl);
System.out.println(" :: SeqActivity --> END - " +
"getAttemptExDurControl");
}
return mAttemptExDurControl;
}
COM: <s> retrieves the value of the attempt experienced duration limit </s>
|
funcom_train/49789317 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attributeValue(EClass cls, EAttribute attr, Object value) {
if (!containsKey(cls)) {
put(cls, new HashMap<EAttribute, Set<Object>>());
}
if (!get(cls).containsKey(attr)) {
get(cls).put(attr, new HashSet<Object>());
}
get(cls).get(attr).add(value);
}
COM: <s> found an instance of this attribute in this class with the </s>
|
funcom_train/20882890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fixPhoneme_AH(Utterance utterance) {
for (Item item = utterance.getRelation(Relation.SEGMENT).getHead();
item != null;
item = item.getNext()) {
if (item.getFeatures().getString("name").equals("ah")) {
item.getFeatures().setString("name", "aa");
}
}
}
COM: <s> turns all ah phonemes into aa phonemes </s>
|
funcom_train/3771951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPropertyToSet(String name, String value) {
checkNotUsed();
Property propertyToSet = new Property();
if (name != null) {
propertyToSet.name = name;
if (value != null)
propertyToSet.value = value;
else
propertyToSet.value = "";
toSet.put(name, propertyToSet);
}
}
COM: <s> add a new property to set </s>
|
funcom_train/17500306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startPrefixMapping(String prefix, String uri) throws org.xml.sax.SAXException {
if (null == prefix || prefix.equals(""))
prefix = "xmlns";
else
prefix = "xmlns:" + prefix;
this.prefixMappings.addElement(prefix);
this.prefixMappings.addElement(uri);
}
COM: <s> begin the scope of a prefix uri namespace mapping </s>
|
funcom_train/45749997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsLeafPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RedefinableElement_isLeaf_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RedefinableElement_isLeaf_feature", "_UI_RedefinableElement_type"),
OntoUMLPackage.Literals.REDEFINABLE_ELEMENT__IS_LEAF,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is leaf feature </s>
|
funcom_train/18338233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Identifier goalInstanceIDGenerator(Integer noOfGIs, Ontology sdcGraph){
Integer numberID = noOfGIs + 1;
String theID = "goalInstance" + numberID.toString();
Identifier theArcID = wsmoFactory.createIRI(sdcGraph.getDefaultNamespace(), theID);
if (sdcGraph.findInstance(theArcID) != null) {
theArcID = goalInstanceIDGenerator(numberID, sdcGraph);
}
return theArcID;
}
COM: <s> creates a unique identifier for a goal instance </s>
|
funcom_train/45803049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStart(String startString) {
try {
this.startNumber = Integer.parseInt( startString );
} catch (NumberFormatException e) {
log.warn("Reset invalid start value to '0' was '" + startString + "'.");
this.startNumber = 0;
}
if (this.startNumber < 0)
this.startNumber = 0;
}
COM: <s> sets the start number for the object in the collection at this index </s>
|
funcom_train/28142934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void nextTimeUnitFinished(int timeUnit) {
if (timeUnit < numberOfDays) {
int millisConsumed = (int)
(getServerTime() - getSimulationInfo().getStartTime()
- timeUnit * secondsPerDay * 1000);
SimulationStatus status = new SimulationStatus(timeUnit, millisConsumed);
sendToRole(MANUFACTURER, status);
}
invokeLater(afterTickTarget);
}
COM: <s> called when a new time unit has begun similar to time listeners </s>
|
funcom_train/20395536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test10_CopyCustomer() throws Exception {
Table table = new Customer();
int nCount = table.getPageCount();
byte[] nPageData;
for (int i = 0; i < nCount; i++) {
nPageData = table.readFile(i);
Utils.write(new File(Utils.FILEPATH_OUTPUT+Utils.FILENAME_OUTPUT), table.getLengthTotal(), i, nPageData);
}
}
COM: <s> test 10 copy customer </s>
|
funcom_train/50248942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deployProcessDefinition(DefinitionServiceDelegate definitionDelegate, Subject adminSubject, String definitionName) throws Exception {
byte[] definitionData = WfServiceTestHelper.readBytesFromFile(definitionName);
definitionDelegate.deployProcessDefinition(adminSubject, definitionData, new String[] { "archiving tests" });
}
COM: <s> deploys process definition </s>
|
funcom_train/32985795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getDBSignals() throws Exception {
Criteria crit = new Criteria();
crit.add(DBSignalDBAtomPeer.ATOM_ID, getAtomId());
crit.addJoin(DBSignalDBAtomPeer.SIGNAL_ID, DBSignalPeer.SIGNAL_ID);
return (DBSignalPeer.doSelect(crit));
}
COM: <s> gets the d bsignals attribute of the dbatom object </s>
|
funcom_train/26401365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BugReport createCompleteBugReport(String groupid) {
BugReport report = new BugReport();
String timestamp = StringUtility.dateToTimestamp(new Date());
return createCompleteBugReport(timestamp + ": JUnit Test",
"JUnit Test executed at " + timestamp,
getProperties().getProperty("openfuture.bugbase.test.project.package"),
groupid,
ErrorLevel.BUG_DISTURBING);
}
COM: <s> creates a complete bug report </s>
|
funcom_train/7477127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point toMapPixelsTranslated(final Point in, final Point reuse) {
final Point out = reuse != null ? reuse : new Point();
final int zoomDifference = MAXIMUM_ZOOMLEVEL - getZoomLevel();
out.set((in.x >> zoomDifference) + offsetX, (in.y >> zoomDifference) + offsetY);
return out;
}
COM: <s> performs the second computationally light part of the projection </s>
|
funcom_train/5275083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void add(QuickStringBuffer word) {
int wlen = word.length();
if (wlen >= minLength) {
int max = Math.min(maxLength, wlen);
for (int i=minLength; i<=max; i++) {
add(word.subSequence(wlen-i, wlen));
}
}
}
COM: <s> add the last ngrams from the specified word </s>
|
funcom_train/48073953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer generateIdentifier(Class<? extends IEntity> entityClass) {
// IMPORTANT - Note the null object used in id generation. This only
// works with specific identifier
// generators such as sequence and the like that don't rely on a row
// first being created in the database
return (Integer) getIdentifierGenerator(entityClass).generate(getSessionImplementor(), null);
}
COM: <s> generates the identifier using the id strategy defined for the specified </s>
|
funcom_train/43817213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init() {
WURFLModel model = new DefaultWURFLModel(root, patches);
MatcherManager matcherManager = new MatcherManager(model);
DeviceProvider deviceProvider = new DefaultDeviceProvider(model);
WURFLService service = new DefaultWURFLService(matcherManager,
deviceProvider);
WURFLManager manager = new DefaultWURFLManager(service);
WURFLUtils utils = new WURFLUtils(model, deviceProvider);
createDelegate(manager, utils);
}
COM: <s> this method build the wurflmanager instance using default implementations </s>
|
funcom_train/5848434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLenientOrdering() throws Exception {
LocalConfiguration.getInstance().getProperties().put(CASTOR_LENIENT_SEQUENCE_ORDERING_PROPERTY, "true");
CastorUtils.unmarshal(Events.class, ConfigurationTestUtils.getReaderForResource(this, "eventconf-bad-ordering.xml"));
}
COM: <s> ensure we can load a bad configuration file with </s>
|
funcom_train/18433362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(RegularTimePeriod period, Number value) {
TimeSeriesDataItem temp = new TimeSeriesDataItem(period, value);
int index = Collections.binarySearch(this.data, temp);
if (index < 0) {
throw new SeriesException("There is no existing value for the "
+ "specified 'period'.");
}
update(index, value);
}
COM: <s> updates changes the value for a time period </s>
|
funcom_train/11654061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configure(TestElement element) {
setName(element.getName());
if (element.getProperty(TestElement.ENABLED) instanceof NullProperty) {
enabled = true;
} else {
enabled = element.getPropertyAsBoolean(TestElement.ENABLED);
}
getCommentPanel().setText(element.getComment());
}
COM: <s> a newly created gui component can be initialized with the contents of a </s>
|
funcom_train/35876794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNormalClass(final Class<?> clazz) {
return !clazz.isAnonymousClass() && !clazz.isMemberClass() && !clazz.isAnnotation()
&& !clazz.isEnum() && !clazz.isInterface() && !isAbstract(clazz) && !clazz.isSynthetic();
}
COM: <s> checks if the class is a normal class </s>
|
funcom_train/20364776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testListenerChanges() {
//Test valid values;
NamedStat stat = new NamedStat(16,"Agility","AGL");
stat.addStatChangeListener( mock );
mock.statChanged( new StatChangeEvent(StatChangeEvent.EVENT_CHANGED, stat, 0) );
mock.statChanged( new StatChangeEvent(StatChangeEvent.EVENT_CHANGED, stat, 0) );
replay(mock);
//Name change
stat.setName("Excrement");
//Abbreviation change
stat.setAbbrevation("SHIT");
verify(mock);
}
COM: <s> test stat change firing for names and abbrevations </s>
|
funcom_train/22001868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GondolaExpression findRandomSite(GondolaExpression expression) {
int randomNumber = random.nextInt(expression.size());
GondolaExpression randomSite = null;
for (Iterator iterator = expression.iterator(); iterator.hasNext();) {
randomSite = (GondolaExpression) iterator.next();
// Return if this is the xth random element
if (randomNumber-- <= 0)
break;
}
assert randomSite != null;
return randomSite;
}
COM: <s> randomly pick a node in the given expression </s>
|
funcom_train/9666898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initList() {
try {
String needsSQL = "select Name from specialNeeds";
ResultSet rs = dbw.executeQuery(needsSQL);
while (rs.next()) qualsModel.addElement(rs.getString("Name"));
}
catch (SQLException sqlex) {
System.err.println(sqlex.toString());
}
}
COM: <s> intialises the special needs jlist </s>
|
funcom_train/39537648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(){
if(isStopped && ! isPaused){
if(AnimationsHandler.this.isTestVersion){
rtdpTestSimulator.setIsStarted(true);
}
//starting the other rtdps
for(RealTimeDataProvider rtdp : realTimeDataProviders.values()){
rtdp.setIsStarted(true);
}
//launches the animations
setIsStopped(false);
setIsPaused(false);
notifyAnimationsStarted();
}
}
COM: <s> starts the animations </s>
|
funcom_train/33232217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connectToSendMessage(boolean transacted, int acknowledgeMode) throws SLQueueException {
try {
createConnection(transacted, acknowledgeMode);
setMessageProducer(getSession().createProducer(getDestination()));
}
catch (JMSException e) {
throw new SLQueueException(e.getMessage(), e);
}
}
COM: <s> message producer connection </s>
|
funcom_train/13334298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateParentAsExistingTerm() {
if (selectedCandidateTerm != null) {
OntologyClassInterface ontologyClass = adapter.getOntologyClassForCandidateTerm(selectedCandidateTerm);
if (ontologyClass != null) {
Map<String, String> parents = ontologyClass.getParentMap(adapter.getLanguage());
// clear and set new parents
ontologyTermsTable.getModel().setParentsTermsOfExistingCandidateTerm(parents);
}
}
}
COM: <s> updated the parent terms in the existing loaded ontology model </s>
|
funcom_train/22769828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadChildren(List oldChildren) {
XObject[] children = getXObjectChildren();
for( int i = 0 ; i < children.length ; i++ ) {
TreeNode child = findNodeForChild(oldChildren, children[i]);
if(child == null) {
child = createNode(children[i]);
}
addChild(child);
}
}
COM: <s> loads children trying to use those that are already loaded </s>
|
funcom_train/17004665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SOAPMessage createSOAPMessage(String source) {
if (source == null) {
System.out.println(moduleName + "Specified SourceAddress is NULL!");
return null;
}
EndpointReferenceType sourceEpr = wsaEprCreator.createEpr(source);
FromDocument from = FromDocument.Factory.newInstance();
EnvelopeDocument envelopeDocument =
wsaEnvelopeCreator.createSoapEnvelope(from);
return getSOAPMessage(envelopeDocument);
}
COM: <s> this method will create simple soapenvelope for given source address </s>
|
funcom_train/7639659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IProject getAndroidProject(String projectName) {
IProject iproject = null;
IJavaProject[] javaProjects = getAndroidProjects(null);
if (javaProjects != null) {
for (IJavaProject javaProject : javaProjects) {
if (javaProject.getElementName().equals(projectName)) {
iproject = javaProject.getProject();
break;
}
}
}
return iproject;
}
COM: <s> helper method to get the android project with the given name </s>
|
funcom_train/42089222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCorePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_WrappingEObject_core_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_WrappingEObject_core_feature", "_UI_WrappingEObject_type"),
CommonWrappingPackage.Literals.WRAPPING_EOBJECT__CORE,
false,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the core feature </s>
|
funcom_train/14163950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteCommentTree(Long commentId) {
List subComments = getSubComments(commentId, 0);
if (!subComments.isEmpty()) {
for(Object comment : subComments) {
deleteCommentTree((Long)((Map)comment).get("id"));
}
}
SqlUpdate sql = new SqlUpdate(ds,
"DELETE FROM comment_node " +
"WHERE id = (?)");
sql.declareParameter(new SqlParameter(Types.INTEGER));
sql.compile();
sql.update(commentId);
}
COM: <s> delete a comment and all of its descendants if any </s>
|
funcom_train/12086407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addElement(String mbeanTypeName, String mbeanName, long timestamp, String attrName, String attrValue) {
TypeDataRecord typeRecord = typeDataRecords.get(mbeanTypeName);
if (typeRecord == null) {
typeRecord = new TypeDataRecord(mbeanTypeName);
typeDataRecords.put(mbeanTypeName, typeRecord);
}
typeRecord.addElement(mbeanName, timestamp, attrName, attrValue);
recordCount++;
}
COM: <s> adds a new mbean object attribute key value pair retrieved statistic </s>
|
funcom_train/39536516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestTagValue(final String tagName, final long horodate){
Thread thread=new Thread(){
@Override
public void run() {
Object value=null;
//getting the buffer corresponding to the given tag name
CurveBuffer buffer=null;
if(controller.getConfiguration().getCurrentMode()==
TrendsConfiguration.REAL_TIME_MODE){
buffer=rtBuffers.get(tagName);
}else{
buffer=historyBuffers.get(tagName);
}
if(buffer!=null){
value=buffer.getTagValue(horodate);
}
if(value!=null){
final Object fvalue=value;
SwingUtilities.invokeLater(new Runnable(){
public void run() {
controller.getView().setTagValue(tagName, fvalue);
}
});
}
}
};
thread.start();
}
COM: <s> requests the tag value corresponding to the tag name and that </s>
|
funcom_train/3473991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object convertElement (StructureElement element) {
ActionEventRecordable actionEventRecordable = (ActionEventRecordable) element;
Element result = (Element) super.convertElement (element);
result.setName ("ActionEvent");
String actionCommand = actionEventRecordable.getActionCommand ();
if (actionCommand == null) {
actionCommand = "";
}
result.setAttribute ("command", actionCommand);
result.setAttribute ("modifiers", "" + actionEventRecordable.getModifiers ());
return result;
}
COM: <s> converts the specified element to an other representation if this converter is responsible </s>
|
funcom_train/27811145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createTranscoding(Transcoding transcoding) {
transcodingDao.createTranscoding(transcoding);
// Activate this transcoding for all players?
if (transcoding.isDefaultActive()) {
for (Player player : playerService.getAllPlayers()) {
List<Transcoding> transcodings = getTranscodingsForPlayer(player);
transcodings.add(transcoding);
setTranscodingsForPlayer(player, transcodings);
}
}
}
COM: <s> creates a new transcoding </s>
|
funcom_train/18288338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleDuplicateButton() {
IDevice device = getSelectedDevice();
try {
IDevice clonedDevice = (IDevice) PersistableUtilities.clonePersistable(device);
String uniqueName = findUniqueName(clonedDevice);
clonedDevice.setName(uniqueName);
DeviceRegistry.singleton.addDevice(clonedDevice);
viewer.refresh();
viewer.setSelection(new StructuredSelection(clonedDevice));
} catch (Exception e) {
handleException("Error duplicating device", e);
}
}
COM: <s> handle the duplicate button being selected </s>
|
funcom_train/34829806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Thread getThread(long id) {
Map stackMap = Thread.getAllStackTraces();
Set keys = new HashSet();
keys = stackMap.keySet();
Iterator iter = keys.iterator();
//Loop thru the map
while (iter.hasNext()) {
Thread thd = (Thread) iter.next();
if (thd.getId() == id) return thd;
}
return null;
}
COM: <s> get a thread by id </s>
|
funcom_train/3335383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(int nr) {
if(first.getNr() == nr) {
first = first.next;
return;
}
RacoonNode h = first;
while(h.next != null)
if(h.next.getNr() == nr) {
h.next = h.next.next;
return;
}
h = h.next;
}
COM: <s> removes the shit specified by nr </s>
|
funcom_train/40001298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(GameObject object) {
if (object != null) {
if (object == player) {
// ensure player always moves first
allObjects.add(0, object);
}
else {
allObjects.add(object);
}
Cell cell = getCell(object);
if (cell != null) {
cell.objects.add(object);
}
}
}
COM: <s> adds a game object to this manager </s>
|
funcom_train/2877127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSetting(String key, String value) {
//If the file is cached in memory
if (this.cached) {
setSettingCached(key, value);
//The file is not cached in memory
} else {
this.cached = true;
this.loadCache();
this.setSettingCached(key, value);
this.flush();
this.setCachedState(false);
}
}
COM: <s> sets a value for a specified key </s>
|
funcom_train/12166907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Element selectElementById(Document dom, final String id) {
final ElementSelectingVisitor visitor = new ElementSelectingVisitor() {
// Javadoc inherited.
public void visit(Element element) {
if (foundElement == null && id.equals(element.getAttributeValue("id"))) {
this.foundElement = element;
}
}
};
final DOMWalker walker = new DOMWalker(visitor);
walker.walk(dom);
return visitor.foundElement;
}
COM: <s> selects the first element with the specified id from the supplied </s>
|
funcom_train/22028655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRow(int row, Object x) throws TableException {
if (! (x instanceof Object[])) {
throw new TableException("setRow: Incompatible row");
}
for (int col=0; col<arrays.length; col += 1) {
setElement(row, col, ((Object[]) x)[col]);
}
}
COM: <s> modify a row of data </s>
|
funcom_train/25569897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setSize(400, 600);
this.setTitle(java.util.ResourceBundle.getBundle("com/jjcp/resources/Strings").getString("IMAGE_VIEW"));
this.setMinimumSize(new Dimension(50, 50));
//this.setPreferredSize(new Dimension(400, 300));
this.setContentPane(getJContentPane());
this.setTitle(java.util.ResourceBundle.getBundle("com/jjcp/resources/Strings").getString("IMAGE_VIEW"));
}
COM: <s> this method initializes this </s>
|
funcom_train/20871193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document getDocumentFromFile() {
try {
SAXBuilder builder = new SAXBuilder();
document = builder.build(this.getClass().getResourceAsStream("/xandersone-config.xml"));
} catch (IOException e) {
throw new ConfigException("XmlConfigReader not properly initialized - ConfigurationException: " + e);
} catch (JDOMException e) {
throw new ConfigException("XmlConfigReader not properly initialized - ConfigurationException: " + e);
}
return document;
}
COM: <s> tramsformes the file into a xml document </s>
|
funcom_train/4138346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleXHRResponse( nsIXMLHttpRequest xhr, boolean error ){
MozXHRCall call = (MozXHRCall)callList.get( xhr );
call.captureResponse( xhr, error );
//this notifies the call list that it needs to notify its listeners that a call
//object has changed
callList.removeMap( xhr ); //no need to keep the map
callList.update( call );
}
COM: <s> the response for an xhr call has been detected </s>
|
funcom_train/19060187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireListUpdatedEvent() {
ListDataEvent event = new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, 0, logMessages.size());
for (Iterator iterator = listeners.iterator(); iterator.hasNext();) {
ListDataListener listener = (ListDataListener) iterator.next();
listener.contentsChanged(event);
}
}
COM: <s> notifies all list data listener that the contents has changed </s>
|
funcom_train/33518949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserLeague verifyUserLeague(Long userId, Long leagueId) throws InvalidParameterException {
UserLeague userLeague = userLeagueDao.findUserLeague(userId, leagueId);
if (userLeague == null) {
throw new InvalidParameterException("User is not a league member");
}
return userLeague;
}
COM: <s> this method is responsible for verifying if already exists a relationship </s>
|
funcom_train/28982277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkStartList () {
if (okStartList == null) {//GEN-END:|27-getter|0|27-preInit
// write pre-init user code here
okStartList = new Command ("Ok", Command.OK, 0);//GEN-LINE:|27-getter|1|27-postInit
// write post-init user code here
}//GEN-BEGIN:|27-getter|2|
return okStartList;
}
COM: <s> returns an initiliazed instance of ok start list component </s>
|
funcom_train/34593799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSyncDate() throws DatabaseException {
java.sql.Timestamp date = new java.sql.Timestamp(0);
date = syncClient.getDBSyncDate();
//writes the date out to the file, then returns
RTClientSyncProperties.instance().setLastGlobalUpdateDate(date);
//writes a system date out to a file
RTClientSyncProperties.instance().setLastGlobalUpdateSystemDate();
}
COM: <s> sets the sync date from the database </s>
|
funcom_train/5464815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AuthenticationResponseMessage sendAuthenticationRequest(AuthenticationRequestMessage request) {
//get the XML message
String xml = request.toXML();
//opening the connection to the openSST Server
HTTPResponse rawResponse = HTTPHelper.getInstance().connect(SERVER_DEST_URL, xml, null, "POST", null, null);
assert rawResponse != null;
String response = new String(rawResponse.getResponse());
return new AuthenticationResponseMessage(response);
}
COM: <s> send a authentication xml request and get the response </s>
|
funcom_train/15607833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String makeControlledVocabularyIndex(String propertyName) {
// Currently using a map of property name versus controlled vocab.
if (controlledMap.containsKey(propertyName))
return (String)controlledMap.get(propertyName);
else
return ControlledVocabUtil.getNullVocabIndex();
} // End method: makeControlledVocabIndex
COM: <s> given the name of the property apply any rules hint place to apply </s>
|
funcom_train/17567914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIdentifyRotationTolerance() {
try {
//Try to get the parameters from Fingerprint SDK.
return fingerprintSDK.getIdentificationRotationTolerance();
} catch (GrFingerJavaException e) {
//If fails to load the parameters, writes error to log and returns 0
ui.writeLog(e.getMessage());
return 0;
}
}
COM: <s> returns the current rotation tolerance on identification </s>
|
funcom_train/5216343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EjeServo getEjeServo(Vector3f direc) throws Exception {
if (direc.equals(Vector3f.UNIT_X))
return ejeX;
else if (direc.equals(Vector3f.UNIT_Z))
return ejeZ;
else
throw new Exception("La direccion del eje " + direc.toString() + " No estásoportada ni por jMonkey ni por nosotors");
}
COM: <s> devuelve un eje </s>
|
funcom_train/34838325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WebServiceClass createWebServiceClass(String identifier) throws GlueException {
if ((identifier==null)||(identifier=="")) return null;
if (langType.equalsIgnoreCase(wsml_lang)) return ((WebServiceClass) new WSML_WebServiceClass(identifier));
//if (langType.equalsIgnoreCase(rdf_lang)) return new (identifier);
return null;
}
COM: <s> create a new web service class </s>
|
funcom_train/1687491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String intercept(ActionInvocation invocation) throws Exception {
HttpServletRequest request = ServletActionContext.getRequest();
if (this.authorizedRoles != null) {
for (String authorizedRole : this.authorizedRoles) {
if (request.isUserInRole(authorizedRole)) {
return invocation.invoke();
}
}
}
HttpServletResponse response = ServletActionContext.getResponse();
handleNotAuthorized(request, response);
return null;
}
COM: <s> intercept the action invocation and check to see if the user has the </s>
|
funcom_train/45120863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setErrorStatus(IStatus status) {
if (status != null) {
String message= status.getMessage();
if (message != null && message.length() > 0) {
setText(message);
setImage(findImage(status));
if (fErrorMsgAreaBackground == null) {
fErrorMsgAreaBackground= new Color(getDisplay(), ERROR_BACKGROUND_RGB);
}
setBackground(fErrorMsgAreaBackground);
return;
}
}
setText(""); //$NON-NLS-1$
setImage(null);
setBackground(fNormalMsgAreaBackground);
}
COM: <s> sets the message and image to the given status </s>
|
funcom_train/2291537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CmsExplorerContextMenu getContextMenu() {
if ((m_reference != null) && (m_contextMenu.isEmpty())) {
m_contextMenu = (CmsExplorerContextMenu)OpenCms.getWorkplaceManager().getExplorerTypeSetting(m_reference).getContextMenu().clone();
}
return m_contextMenu;
}
COM: <s> returns the context menu </s>
|
funcom_train/47515915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkValidSplitObjLabels(double[] splitLabels){
if(splitLabels == null) return true;
int greatest = -1;
int label;
int numLabels = getNumSplitObjects(splitLabels);
for(double value : splitLabels){
label = (int) value;
greatest = (greatest > label) ? greatest : label;
//sequential rule broken.
if(label < greatest) return false;
//the label number is greater than the number of labels.
if(label > numLabels) return false;
}
return true;
}
COM: <s> all split object labels must be a number that is the number of </s>
|
funcom_train/14433823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isWestSquareOcean(int column, int row) {
return this.isTerrainTypeInDirectionOfSquare(column, row, BasisMap.OCEAN, CardinalPoint.WEST)
|| this.isTerrainTypeInDirectionOfSquare(column, row, BasisMap.VOID, CardinalPoint.WEST);
}
COM: <s> p check is the square in the west direction is of </s>
|
funcom_train/4425154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void configureActionInputs(FormattingConfig c) {
AstActionElements access = f.getAstActionAccess();
c.setNoSpace().before(access.getCommaKeyword_3_1_0());
c.setNoSpace().before(f.getInputPatternAccess().getColonKeyword_1());
c.setNoSpace().before(f.getInputPatternAccess().getCommaKeyword_4_0());
c.setNoSpace().before(
f.getInputPatternAccess().getLeftSquareBracketKeyword_2());
}
COM: <s> configure action input pattern </s>
|
funcom_train/32618061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Stemmer (String Str){
Stemmer s = new Stemmer();
String lowStr = Str.toLowerCase();
for (int i=0;i<lowStr.length();i++){
s.add (lowStr.charAt(i));
}
s.stem();
this.str=s.toString();
//System.out.println(s.toString());
}
COM: <s> creates the stemmer object from a given string </s>
|
funcom_train/43098194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInclude(Object usecase, Object include) {
if (usecase instanceof MUseCase
&& include instanceof MInclude) {
((MUseCase) usecase).addInclude((MInclude) include);
return;
}
throw new IllegalArgumentException("usecase: " + usecase
+ " or include: " + include);
}
COM: <s> add an include to a use case </s>
|
funcom_train/43245557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTypeOfBenefit() {
System.out.println("getTypeOfBenefit");
ApplicationObject instance = new ApplicationObject();
String expResult = "";
String result = instance.getTypeOfBenefit();
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 type of benefit method of class org </s>
|
funcom_train/21901769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadClasses() {
SchemaManager schemaMgr = Roma.schema();
Collection<SchemaClass> infos = null;
if (applicationDomainOnly)
infos = schemaMgr.getSchemaClassesByPackage(Roma.component(ApplicationConfiguration.class).getApplicationPackage());
else
infos = schemaMgr.getAllClassesInfo();
availableClassNames = new ArrayList<String>();
for (SchemaClass cls : infos)
availableClassNames.add(cls.getName());
Collections.sort(availableClassNames);
}
COM: <s> load all the classes in the schema manager </s>
|
funcom_train/13500729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComponent createStatusBar() {
JPanel result = new JPanel(new BorderLayout());
result.add(currentFileLabel, BorderLayout.CENTER);
result.add(Utility.addLabelLeft("Loading Status: ", progressBar), BorderLayout.EAST);
return result;
}
COM: <s> this method returns a jpanel containing the label displaying the </s>
|
funcom_train/12603217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Writer write(Writer writer) throws JSONException {
try {
boolean b = false;
int len = length();
writer.write('[');
for (int i = 0; i < len; i += 1) {
if (b) {
writer.write(',');
}
Object v = this.myFastList.get(i);
if (v instanceof JSONObject) {
((JSONObject) v).write(writer);
} else if (v instanceof JSONArray) {
((JSONArray) v).write(writer);
} else {
writer.write(JSONObject.valueToString(v));
}
b = true;
}
writer.write(']');
return writer;
} catch (IOException e) {
throw new JSONException(e);
}
}
COM: <s> write the contents of the jsonarray as json text to a writer </s>
|
funcom_train/47685956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreeDao geTreeDaoByName(String daoName) {
// 使用Lazy Initialization
TreeDao treeDao = (TreeDao) treeDaos.get(daoName); //享元模式
if (null == treeDao) { // 策略算法。所有树的新策略在这里添加
if ("appTree".equals(daoName)) {
treeDao = new ApplicationTreeDao();
treeDaos.put(daoName, treeDao);
}
}
return treeDao;
}
COM: <s> fly weight strategy dao </s>
|
funcom_train/9885312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File getAccessionFile(String fileName){
String sep = System.getProperty("file.separator");
File file = new File(fileName);
String accFileName = file.getName();
file = file.getParentFile();
file = new File(file.getPath()+sep+"URL data"+sep+"Tags"+sep+accFileName);
return file;
}
COM: <s> creates the code file code object containing the </s>
|
funcom_train/39314527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp(){
boolean used1 = true;
boolean used2 = false;
container = new TerpPaintContainer(used1);
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
file = fileChooser.getSelectedFile();
f = new TerpPaint(used1, new TerpPaintContainer(false));
}
COM: <s> sets the private fields to default </s>
|
funcom_train/25435030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void upgradeTo89a() throws IOException {
if (fileHeader.getFileType() != "GIF89a") {
FarbenRAF raf = new FarbenRAF(this.getParentFile(), "rw");
try {
raf.seek(this.getStartByte());
raf.writeBytes("GIF89a");
//reparse since file type has changed
parseChunk(raf);
raf.close();
} catch (IOException err) {
raf.close();
throw err;
}
}
}
COM: <s> upgrade the gif file from 87a to 89a if necessary </s>
|
funcom_train/29681059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInvDetailsMode(){
this.clearInvData();
this.setDetailedInvitation(false);
this.loadSelectedInvitation();
this.setCurrentMode(this.getINVDETAILS());
this.setInvitationsInFlow(this.getInvitationsInFlow(this.getInvitationFlowId()));
}
COM: <s> called from the webpage to set invitations details mode </s>
|
funcom_train/2625157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void testLockDir(File lockDir) throws IOException {
if (!lockDir.exists()) {
throw new IOException(
"Could not find lockDir: " + lockDir.getAbsolutePath());
}
if (!lockDir.canWrite()) {
throw new IOException(
"Could not write to lockDir: " + lockDir.getAbsolutePath());
}
}
COM: <s> tests that we can write to the lock directory </s>
|
funcom_train/8084737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawOval(int x, int y, int width, int height){
setStateToLocal();
m_printstream.println(xTransform(xScale(x)) + " " + yTransform(yScale(y)) + " " + xScale(width) + " " + yScale(height) + " false Oval");
}
COM: <s> draw an oval outline in current pen color </s>
|
funcom_train/49044467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNamePropertyDescriptor(Object object) {
NamedModelObject obj = (NamedModelObject) object;
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NamedModelObject_Name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NamedModelObject_Name_feature", "_UI_NamedModelObject_type"),
ModelPackage.Literals.NAMED_MODEL_OBJECT__NAME,
!obj.isPredefined(),
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the name feature </s>
|
funcom_train/3133101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean skip(String text){
int size = text.length();
int read = 0;
if(off + size > count){
return false;
}
while(read < size){
char a = text.charAt(read);
char b = buf[off + read++];
if(toLower(a) != toLower(b)){
return false;
}
}
off += size;
return true;
}
COM: <s> this is used to skip an arbitrary code string code within the </s>
|
funcom_train/38965209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StyleTemplate getStyleTemplate(String name) {
if ((name == null) || (name.trim().isEmpty())) {
name = "standard";
}
StyleTemplate template = templates.get(name);
if (template == null) {
template = new StyleTemplate(name, this, stylesheet);
templates.put(name, template);
}
return (template);
}
COM: <s> returns the template with the given name </s>
|
funcom_train/32007142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnSubscribe() {
if (btnSubscribe == null) {
btnSubscribe = new JButton();
btnSubscribe.setText("Subscribe");
btnSubscribe.setEnabled(true);
btnSubscribe.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setCursor(hourglassCursor);
btnSubscribe.setEnabled(false);
// STM
subscribeClient.subscribe(subscriptions);
setCursor(normalCursor);
}
});
}
return btnSubscribe;
}
COM: <s> this method initializes btn subscribe </s>
|
funcom_train/3576575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenu getMenuTactica() {
if (menuTactica == null) {
try {
menuTactica = new JMenu();
menuTactica.setName("menuTactica");
menuTactica.setText(GestorIdiomasFtol.getInstance().getString(FtolLangConstants.MEN_TACTICA));
menuTactica.setActionCommand("Tactica");
menuTactica.setEnabled(false);
menuTactica.add(getAsociarTactica());
menuTactica.add(getGuardarTactica());
menuTactica.add(getGuardarTacticaComo());
} catch (Throwable ivjExc) {
handleException(ivjExc);
}
}
return menuTactica;
}
COM: <s> returns the menu tactica </s>
|
funcom_train/10525360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
switch(_val) {
case INT_DEFAULT:
return "default";
case INT_LEGACY:
return "legacy";
case INT_LEGACY_ONLY:
return "legacyOnly";
}
String message = "Encountered an unknown id javascript with value \"" + _val + "\"";
assert false : message;
throw new IllegalStateException(message);
}
COM: <s> convert this id javascript to a readable string </s>
|
funcom_train/3904100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addChoiceExitPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ControlModeType_choiceExit_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ControlModeType_choiceExit_feature", "_UI_ControlModeType_type"),
ImsssPackage.Literals.CONTROL_MODE_TYPE__CHOICE_EXIT,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the choice exit feature </s>
|
funcom_train/17029582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Class getRealClassOfObject(Object object) {
Class realClass = null;
// Grab the name from the object class
realClass = object.getClass();
// Check for Hibernate, then replace with real class name if proxy
if (realClass.getName().contains("EnhancerByCGLIB")) {
realClass = Hibernate.getClass(object);
}
return realClass;
}
COM: <s> i had to create this method to handle hibernate proxies </s>
|
funcom_train/47594923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User getUser(String nick) {
if (nick == null)
throw new NullPointerException("Can't get a null user");
User user = null;
for (User curUser : _userChanInfo.getAValues())
if (curUser.getNick().equals(nick))
user = curUser;
if (user == null)
//User does not exist, create one
_userChanInfo.putA(user = new User(this, nick));
return user;
}
COM: <s> gets an existing user or creates a new one </s>
|
funcom_train/3086534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMaximum(int n) {
int newMin = Math.min(n, min);
int newValue = Math.min(n, value);
int newExtent = Math.min(n - newValue, extent);
setRangeProperties(newValue, newExtent, newMin, n, isAdjusting);
}
COM: <s> sets the maximum to i n i after ensuring that i n i </s>
|
funcom_train/38543518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean filtersAreEqual(final Filter[] a, final Filter[] b) {
boolean result = (a == b);
if (!result) {
result = (a.length == b.length);
for (int i = 0; (result) && (i < a.length); i++) {
result = result && (filtersAreEqual(a[i], b[i]));
}
}
return result;
}
COM: <s> convenience method that tests whether two arrays of filters are equal </s>
|
funcom_train/49670678 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
try {
IconFactory.getInstance().cleanup();
SharedStyle.releaseResources();
final Display d = Display.getDefault();
if (!d.isDisposed()) {
d.dispose();
}
} catch (final Exception e) {
log.warn("Error while cleaning up resources before exit", e);
System.exit(-1);
}
System.exit(0);
}
COM: <s> releases the resources and exits hawkscope </s>
|
funcom_train/4540358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Expression parseCaseWhen(Expression r) throws HsqlException {
readThis(Expression.WHEN);
Expression condition;
if (r == null) {
condition = readOr();
} else {
condition = new Expression(Expression.EQUAL, r, readOr());
}
readThis(Expression.THEN);
Expression current = readOr();
Expression alternatives = new Expression(Expression.ALTERNATIVE,
current, new Expression(Types.NULL, null));
Expression casewhen = new Expression(Expression.CASEWHEN, condition,
alternatives);
return casewhen;
}
COM: <s> reads part of a case </s>
|
funcom_train/22279461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int lineCount() {
int i,c,result = 0;
TextParagraph p;
for(i=0,c=_paragraphVector.count(); i < c ; i++ ) {
p = (TextParagraph)_paragraphVector.elementAt(i);
result += p.lineCount();
}
return result;
}
COM: <s> return the number of lines currently in text view </s>
|
funcom_train/17006480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteAllLinksForNode(Node n) {
Iterator it = links.iterator();
while (it.hasNext()) {
LinkDetails link = (LinkDetails) it.next();
if ((link.connectedNode1 == n) || (link.connectedNode2 == n)) {
int numLinksDeleted = link.deleteAllLinksForNode();
it.remove();
linkCount = linkCount - numLinksDeleted;
}
}
}
COM: <s> deletes all the links emerging from the specified node </s>
|
funcom_train/2337352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectNextFrame() {
JInternalFrame[] frames = getAllFrames();
if (frames.length > 0) {
try {
frames[0].setSelected(true);
} catch (java.beans.PropertyVetoException pve) {
System.out.println("Bean veto: " + pve.getMessage());
}
}
}
COM: <s> selects the next available frame upon the virtual desktop </s>
|
funcom_train/33610670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDomain(SampleSet<Double> newDomain) {
if (sampler != newDomain) {
if (sampler instanceof ChangeBroadcaster)
((ChangeBroadcaster) sampler).removeChangeListener(this);
sampler = newDomain;
if (sampler instanceof ChangeBroadcaster)
((ChangeBroadcaster) sampler).addChangeListener(this);
firePlottableChanged();
}
}
COM: <s> sets sampler of the visualization and initializes appropriate event handling </s>
|
funcom_train/31078609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getInternalForm(String className, boolean descriptor) {
if (className == null || className.length() == 0)
return className;
Map cache = (descriptor) ? _internalDescriptor : _internal;
String cached = (String) cache.get(className);
if (cached != null)
return cached;
String ret = getInternalFormInternal(className, descriptor);
cache.put(className, ret);
return ret;
}
COM: <s> converts the given class name to its internal form </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.