__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/36399555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void warningLevel2(){
try{
leds[1].setRGB(255, 165, 0);
if (!leds[1].isOn()){
leds[1].setOn();
System.out.println("Warninglevel 2 Reached.");
}
}catch(Exception e){
System.out.println("Warninglevel 2 has an Error:" + e);
}
}
COM: <s> sets the warninglevel to level 2 orange </s>
|
funcom_train/40071018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String buildIds(List<String> ids) {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < ids.size(); i++) {
if (i == 0) {
builder.append(ids.get(i));
continue;
}
builder.append(",").append(ids.get(i));
}
return builder.toString();
}
COM: <s> build comma separated ids for movie </s>
|
funcom_train/3792315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PeerIdentity getPeerIdentity() {
if(_pl != null) {
String name = (String)_comboBox.getSelectedItem();
PeerIdentity pi = new PeerIdentity(name);
try {
pi.setLocation(_pl.locatePeerService(pi.getName()));
} catch (LocatingException e) {
__log.debug(e.getMessage(), e);
}
return pi;
} else {
return _cdp.getPeerIdentity();
}
}
COM: <s> returns a peer information </s>
|
funcom_train/4264669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void expandCapacity(int minimumCapacity) {
int newCapacity = (characters.length + 1) * 2;
if (newCapacity < 0) {
newCapacity = Integer.MAX_VALUE;
} else if (minimumCapacity > newCapacity) {
newCapacity = minimumCapacity;
}
char newValue[] = new char[newCapacity];
System.arraycopy(characters, 0, newValue, 0, count);
characters = newValue;
}
COM: <s> ensures that the capacity is at least equal to the specified minimum </s>
|
funcom_train/18548327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(TransferObject to, Connection c) throws DataAccessException {
PreparedStatement pstmt = null;
try {
MetaFieldTO mfto = (MetaFieldTO)to;
pstmt = c.prepareStatement("delete from meta_field where id=?");
pstmt.setString(1, mfto.getId());
pstmt.executeUpdate();
} catch (SQLException e) {
throw new DataAccessException(e);
}finally{
super.closeStatement(null, pstmt);
}
}
COM: <s> remove a meta field object from data base </s>
|
funcom_train/33371510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getValue(int row, int col) {
if(row < 0) row = this.row + row;
if(col < 0) col = this.col + col;
if(row >= this.row) row = this.row - row;
if(col >= this.col) col = this.col - col;
return data[row][col];
}
COM: <s> returns the value of a cell at the specified location </s>
|
funcom_train/46636908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PropertyChangeListener getPropertyChangeListener() {
return new PropertyChangeListener(){
public void propertyChange(PropertyChangeEvent event) {
PropertyUpdateEvent<BlinkingRowDataFixture> updateEvent = new PropertyUpdateEvent<BlinkingRowDataFixture>(
new DataLayerFixture(), (BlinkingRowDataFixture)event.getSource(), event.getPropertyName(), event.getOldValue(), event.getNewValue());
layerUnderTest.handleLayerEvent(updateEvent);
}
};
}
COM: <s> listen for updates and put them in the </s>
|
funcom_train/10210807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkForDragAcceptance(final DropTargetDragEvent event) {
if (isDroppable(event)) {
try {
Point2D globalPoint = controller.getGraphCoordinateConverter().windowToGlobal(event.getLocation());
GraphicsView<ModelElement> draggedView = getDraggedItem(event);
if (draggedView.isDroppableAt(globalPoint, controller)){
event.acceptDrag(event.getDropAction());
} else {
event.rejectDrag();
}
} catch (Exception e) {
logger.debug(e);
}
}
}
COM: <s> first checks if the mouse is dragged over the network view </s>
|
funcom_train/39467845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copy(@NotNull final InputStream in, @NotNull final OutputStream out) throws IOException {
final byte[] buf = new byte[BUF_SIZE];
//noinspection NestedAssignment
for (int bytesRead; (bytesRead = in.read(buf)) != -1;) {
out.write(buf, 0, bytesRead);
}
}
COM: <s> copies data from one input stream to another </s>
|
funcom_train/14519437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getNotificationEventsCollection(){
String events = getNotificationEvents();
ArrayList ret = new ArrayList();
if (StringUtils.isNotEmpty(events)) {
StringTokenizer tokenizer = new StringTokenizer(events, ";", false);
while (tokenizer.hasMoreTokens()) {
ret.add(tokenizer.nextToken());
}
}
return ret;
}
COM: <s> returns a collection view of get notification events </s>
|
funcom_train/48407446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBasedOnElementPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ReuseRelationship_basedOnElement_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ReuseRelationship_basedOnElement_feature", "_UI_ReuseRelationship_type"),
SpemxtcompletePackage.eINSTANCE.getReuseRelationship_BasedOnElement(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the based on element feature </s>
|
funcom_train/4747781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CourseEntity getDefaultCourseCG1() {
// CG1 Course for Theme Computer
final CourseEntity result = new CourseEntity("Computer Graphics I");
// Owner must be set mannually
result.setReferenceOwner( this.getSystemUser() );
// Add Questionnaire to Course
result.addQuest( this.getDefaultQuestionnaire1CG1() );
result.addQuest( this.getDefaultQuestionnaire2CG1() );
return result;
}
COM: <s> will return a default cours entity with two </s>
|
funcom_train/124882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setDoubleValue(double value, NumberDisplayTable table) {
if (new Double(value).equals(doubleNAN)) {
setText(value + space);
} else {
if (table != null) {
numberFormat.setMaximumFractionDigits(table.getPrecision());
numberFormat.setMinimumFractionDigits(table.getPrecision());
}
setText(numberFormat.format(value) + space);
}
}
COM: <s> sets how a code double code value is printed as text </s>
|
funcom_train/7674243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int get(int n) {
if (n >= size) {
throw new IndexOutOfBoundsException("n >= size()");
}
try {
return values[n];
} catch (ArrayIndexOutOfBoundsException ex) {
// Translate exception.
throw new IndexOutOfBoundsException("n < 0");
}
}
COM: <s> gets the indicated value </s>
|
funcom_train/6494044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setBounds() {
Dimension screen_size = Toolkit.getDefaultToolkit().getScreenSize();
Dimension window_size = getSize();
setBounds( ( screen_size.width - window_size.width ) / 2,
100,
window_size.width,
window_size.height );
}
COM: <s> puts this frame on the screen in a nice location </s>
|
funcom_train/49636788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Configuration getClientRepositoryConfig() {
Configuration conf = Configuration.newMemoryBased();
conf.set(BundleRepository.CONF_DOWNLOAD_DIR, clientDownloadDir);
conf.set(ClientConnection.CONF_REPOSITORY_CLASS,
clientRepoClass.getName());
conf.set(BundleRepository.CONF_REPO_ADDRESS, address);
return conf;
}
COM: <s> return the client repository configuration </s>
|
funcom_train/46056458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TemporaryKeyImpl loadTemporaryKeyByRegistrationKey(String regkey) {
DB db = DBFactory.getInstance();
List tks = db.find("from r in class org.olat.registration.TemporaryKeyImpl where r.registrationKey = ?", regkey,
Hibernate.STRING);
if (tks.size() == 1) {
return (TemporaryKeyImpl) tks.get(0);
} else {
return null;
}
}
COM: <s> looks for a temporary key by a given registrationkey </s>
|
funcom_train/11728709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testString() throws RepositoryException {
try {
property.setValue("abc");
node.save();
fail("Property.setValue(String) must throw a VersionException " +
"immediately or on save if the parent node of this property " +
"is checked-in.");
}
catch (VersionException e) {
// success
}
}
COM: <s> tests if set value string throws a version exception immediately </s>
|
funcom_train/50560523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void renderView(WorkData data) {
if (System.currentTimeMillis() - lastRefresh > refresh) {
run();
}
try {
data.getOutputWriter().write(cached);
} catch (Exception e) {
logger.error("Cannot write to Writer: " + e.getMessage(), e);
}
}
COM: <s> gets the html representation of this displayer </s>
|
funcom_train/2904473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean addGetDataTag(XMLTag parent, Vector pm){
if((pm!=null) && (pm.size()>0)){
File file = (File)pm.remove(0);
if(file != null){
XMLTag.addTag(parent, "uri", file.toURI().toString());
}
Long offset = (Long)pm.remove(0);
if(offset != null){
XMLTag.addTag(parent, "offset", offset.toString());
}
if((file!=null) && (offset!=null)){
return true;
}
}
return false;
}
COM: <s> add a get data tag </s>
|
funcom_train/3405652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeHeader(String name) {
for (int i = 0; i < headers.size(); i++) {
hdr h = (hdr) headers.get(i);
if (name.equalsIgnoreCase(h.name)) {
headers.remove(i);
i--; // have to look at i again
}
}
}
COM: <s> remove all header entries that match the given name </s>
|
funcom_train/17094697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addState(String state, Runnable entryCode, Runnable exitCode, Runnable alwaysRunCode) {
boolean isInitial = (states.size() == 0);
if (!states.containsKey(state)) {
states.put(state, new State(entryCode, exitCode, alwaysRunCode));
}
if (isInitial) {
setState(state);
}
}
COM: <s> establish a new state the fsm is aware of </s>
|
funcom_train/1050257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rational getMaxSpeed() {
Rational maxSpeed = new Rational(1);
for (Representable r: this) {
if (r.getType() == Representable.SPEED) {
maxSpeed = Rational.max(maxSpeed, (Rational) ((Unit) r).getObject());
} else if (r.getType() == Representable.BUNDLE) {
maxSpeed = Rational.max(maxSpeed, ((BolBundle)r).getSequence().getMaxSpeed());
}
}
return maxSpeed;
}
COM: <s> returns the maximum occurring speeds also scanning bundles </s>
|
funcom_train/15488351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isJavaId(String id) {
if(ZUtils.DEBUG) {
ZUtils.assert_(id != null);
}
if(id.length() == 0) return false;
if(!Character.isJavaIdentifierStart(id.charAt(0))) return false;
for(int i = 1; i < id.length(); i++) {
if(!Character.isJavaIdentifierPart(id.charAt(i))) return false;
}
return true;
}
COM: <s> checks whether id is a valid java identifier </s>
|
funcom_train/37062947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProgram( UserWattProgram uwp ) throws ErgoConfigException {
int progNum = uwp.getNumber();
if ( getProgramByNumber( progNum ) != null ) {
String err = "a program with the number " + progNum + " already exists";
LOGGER.error( err );
throw new ErgoConfigException( err );
}
userPrograms.add( uwp );
}
COM: <s> adds a user watt program </s>
|
funcom_train/16481194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void scasb() throws MemoryException {
Address address =
m_machine.newAddress(m_state.getES(), m_state.getDI());
sub8(m_state.getAL(), m_memory.readByte(address));
byte diff = (m_state.getDirectionFlag() ? (byte)-1 : (byte)1);
m_state.setDI((short)(m_state.getDI() + diff));
}
COM: <s> implements the scasb opcode </s>
|
funcom_train/18653914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object invokeNewInstance( Class beanClass ) {
Object bean = null;
try {
bean = beanClass.newInstance();
}
catch ( IllegalAccessException iae ) {
throw new MockEjbSystemException( "Error instantiating a bean "+
beanClass.getName(), iae );
}
catch ( InstantiationException ie ) {
throw new MockEjbSystemException( "Error instantiating a bean "+
beanClass.getName(), ie );
}
return bean;
}
COM: <s> create an instance of a bean </s>
|
funcom_train/50940287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getKey(Transaction t) {
Date date = t.getDate();
if ( date == null ) return i18n.getString("--_NON_DEFINI_--");
Period p = new Period(date, kind, Period.IND_CURRENT, true);
return p.toString();
};
COM: <s> a key is a label to string </s>
|
funcom_train/17363671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMenuQueue() {
if (menuQueue == null) {
menuQueue = new JMenuItem("Queue file");
menuQueue.setAccelerator(KeyStroke.getKeyStroke("Q"));
menuQueue.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
getPlayList().enqueueSelSong();
}
});
}
return menuQueue;
}
COM: <s> this method initializes menu queue </s>
|
funcom_train/3618378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getAgendaAsVector() {
Object[] keys = agenda.keySet().toArray();
Arrays.sort(keys);
Vector topicsVector = new Vector();
for (int i = 0; i < keys.length; i++) {
topicsVector.add((String)keys[i] + " " + getTopic((String)keys[i]));
}
return topicsVector;
}
COM: <s> convenience method exporting currend agenda a vector of strings </s>
|
funcom_train/24621876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTask(Task task) {
if ( preferenceTable.getRowCount() > 0 )
preferenceTable.removeRowSelectionInterval(0, preferenceTable.getRowCount()-1);
if ( preferenceTable.getCellEditor() != null ) preferenceTable.getCellEditor().stopCellEditing();
TaskPreferenceTableModel.instance.setTask(task);
valueChanged(null);
}
COM: <s> sets a new task which preferences should be displayed </s>
|
funcom_train/1996893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void example(com.crosslogic.strata.htmlobject.Document aDoc) {
Form aForm = new Form("myform");
aDoc.text("Calendar A ");
DatePicker aCal = new DatePicker("idb");
aForm.add(aCal);
aForm.lineBreak();
aDoc.text("Calendar B ");
aCal = new DatePicker("ida");
aForm.add(aCal);
aDoc.add(aForm);
}
COM: <s> generates an example body containing a form having two date </s>
|
funcom_train/33395823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addStereotypes(Set<Annotation> annotations) {
Set<Annotation> stereotypeAnnotations = ClassUtils.getMetaAnnotations(
annotations, Stereotype.class);
for (Annotation stereotypeAnnotation : stereotypeAnnotations) {
Class<? extends Annotation> stereotype = stereotypeAnnotation
.annotationType();
stereotypes.add(stereotype);
addStereotypes(Sets.newHashSet(stereotype.getAnnotations()));
}
}
COM: <s> recursively adding stereotypes </s>
|
funcom_train/36423939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MoneyAmountStyle withGrouping(boolean grouping) {
if (grouping == iGrouping) {
return this;
}
return new MoneyAmountStyle(
iZeroCharacter,
iPositiveCharacter, iNegativeCharacter,
iDecimalPointCharacter, iGroupingCharacter,
iGroupingSize, grouping, iForceDecimalPoint);
}
COM: <s> returns a copy of this style with the specified grouping setting </s>
|
funcom_train/50224919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recursiveSetStateToken(boolean parents, boolean myvalue) {
this.setStateToken(parents, myvalue);
for (Iterator it = states.keySet().iterator(); it.hasNext(); ) {
SMState current = (SMState) states.get(it.next());
current.recursiveSetStateToken(parents&&myvalue, current.getIsCurrent());
}
}
COM: <s> sets the state token of this and all enclosed states </s>
|
funcom_train/32136392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getJCheckBoxProcessorBound() {
if (jCheckBoxProcessorBound == null) {
jCheckBoxProcessorBound = new JCheckBox();
jCheckBoxProcessorBound.setText("Processor ID");
jCheckBoxProcessorBound
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
keyBoundChecked();
}
});
}
return jCheckBoxProcessorBound;
}
COM: <s> this method initializes j check box processor bound </s>
|
funcom_train/51596491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printMembershipDetails(GateSubPopulation gateResult) throws IOException {
FileOutputStream out;
PrintStream p;
String sGateId = gateResult.getGate().getId();
out = new FileOutputStream(DETECTED_GATE_MEMBERSHIP_DETAILS_DIRECTORY + "/" + sGateId + ".txt");
p = new PrintStream(out);
p.println(sGateId);
for (Event event : gateResult.getParentPopulation()) {
if(gateResult.contains(event)) p.println("1");
else p.println("0");
}
out.flush();out.close();
p.close();
}
COM: <s> prints debug membership details for each gate </s>
|
funcom_train/44309326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void delete( File file ){
if( file == null ){
return;
} else if( file.isDirectory() ){
File files[] = file.listFiles();
for( int i=0; i<files.length; i++ )
delete( files[i] );
}
file.delete();
}
COM: <s> deletes a directory and all its subdirectories </s>
|
funcom_train/25827991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(byte b[], int off, int len) throws IOException {
String s = new String(b, off, len);
StyleConstants.setForeground(attributes, color);
try {
doc.insertString(doc.getLength(), s, attributes);
// this.scrollToBottom();
} catch (BadLocationException ex) {
}
}
COM: <s> writes len bytes from the specified byte array starting at offset off to </s>
|
funcom_train/32869544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInsertAspectNotification() {
ProseRunNode run = new ProseRunNode("test", "dummyhost", -1, null);
AspectManagerNode aspectManager = new AspectManagerNode(run, true);
ProsePlugin.getDefault().fireAspectInserted(aspectManager);
assertEquals(aspectManager, listener.aspectManager);
}
COM: <s> test if listeners are notified when an code aspect code has been </s>
|
funcom_train/26485596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDriver(Driver driver) {
logger.info("METHOD_ENTRY: setDriver, driver="
+ ProviderExt.toString((Provider) this));
checkChoiceAndDriver();
getProviderChoice().setDriver(driver);
logger.info("METHOD_EXIT: setDriver, driver="
+ ProviderExt.toString((Provider) this));
}
COM: <s> sets the value of field driver </s>
|
funcom_train/42012907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JDialog getDialogoNuevaReserva() {
if (dialogoNuevaReserva == null) {
dialogoNuevaReserva = new JDialog(getFrameReservas());
dialogoNuevaReserva.setSize(new Dimension(310, 251));
dialogoNuevaReserva.setTitle("Nueva Reserva");
dialogoNuevaReserva.setModal(true);
dialogoNuevaReserva.setResizable(false);
dialogoNuevaReserva.setLocationRelativeTo(frameReservas);
dialogoNuevaReserva.setContentPane(getPanelNuevaReserva());
}
return dialogoNuevaReserva;
}
COM: <s> this method initializes dialogo nueva reserva </s>
|
funcom_train/32112297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCoreBoneId(final String strName) {
Integer id = mapCoreBoneNames.get(strName);
//Check to make sure the mapping exists
if (id == null) {
//TODO afegir excepció
//CalError::setLastError(CalError::INVALID_HANDLE, __FILE__, __LINE__);
return -1;
}
return id;
}
COM: <s> returns the id of a specified core bone </s>
|
funcom_train/28424304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addProperties( Properties fileprops ) {
resolveAllProperties( fileprops );
Enumeration e = fileprops.keys();
while ( e.hasMoreElements() ) {
String name = ( String ) e.nextElement();
String value = fileprops.getProperty( name );
props.put( name, value );
}
}
COM: <s> borrowed from property iterate through a set of properties resolve </s>
|
funcom_train/18721777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getContentCreationLocation() {
String xPath = OFFSET + "Description/MultimediaContent/*/MediaInformation/CreationInformation/Creation/CreationCoordinates/CreationLocation/Name";
//System.out.println(mpeg7.toString());
contentCreationLocation = readXmlValue(xPath, contentCreationLocation);
if (contentCreationLocation == null) {
contentCreationLocation = "";
}
return contentCreationLocation;
}
COM: <s> where the description has been created </s>
|
funcom_train/3174542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String attribute(String key, String format) {
// parse attributes
Matcher m = REGEX_ATTR.matcher(format);
while (m.find()) {
if (m.group(1).trim().equals(key) )
return m.group(2).trim();
}
// not found
return null;
}
COM: <s> find an attribute in format </s>
|
funcom_train/27938088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed( MouseEvent e ) {
System.err.println("BASILDI..."+e.getX()+" and "+e.getY());
ste.printCoordinates(e.getX(), e.getY());
this.state = this.state.mousePressed( e );
}
COM: <s> automatically called when the mouse is pressed </s>
|
funcom_train/19588702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read(JMEImporter e) throws IOException {
InputCapsule capsule = e.getCapsule(this);
origin = (Vector3f) capsule.readSavable("origin", Vector3f.ZERO.clone());
direction = (Vector3f) capsule.readSavable("direction", Vector3f.ZERO.clone());
}
COM: <s> support for jme importing </s>
|
funcom_train/3703217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getBetweenTime(String strKind) {
Condition cond = getConditionByName(COND_BETWEEN_TIMES);
if (cond == null) {
return (null);
}
else {
MultiCondition mcond = (MultiCondition) cond;
cond = mcond.getConditionByName(strKind);
if (cond != null) {
return (cond.getRelationValue());
}
else {
return (null);
}
}
} // of method
COM: <s> get either the start or end between time </s>
|
funcom_train/22286731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream getResourceAsStream(String name) {
if (parent == null) {
// the actual functionality is implemented by
// ApplicationClassLoader
return null;
}
// invoke the method on the topmost classloader which should
// be an ApplicationClassLoader
marimba.persist.URLClassLoader l = parent;
while (l.getURLParent() != null) {
l = l.getURLParent();
}
return l.getResourceAsStream(name);
}
COM: <s> get an input stream on a given resource </s>
|
funcom_train/41405728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void swap(Entry entryA, Entry entryB) {
int indexA = entryA.index;
int indexB = entryB.index;
entryA.index = indexB;
entryB.index = indexA;
indexToEntry.set(indexA, entryB);
indexToEntry.set(indexB, entryA);
}
COM: <s> structural swap of two entries </s>
|
funcom_train/28453593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PyObject Time(int hour, int minute, int second) {
Calendar c = Calendar.getInstance();
c.set(Calendar.HOUR, hour);
c.set(Calendar.MINUTE, minute);
c.set(Calendar.SECOND, second);
return TimeFromTicks(c.getTime().getTime() / 1000);
}
COM: <s> this function constructs an object holding a time value </s>
|
funcom_train/41164531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoScoreExercises1 entity) {
EntityManagerHelper.log("deleting CoScoreExercises1 instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoScoreExercises1.class, entity.getId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co score exercises1 entity </s>
|
funcom_train/21466046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addValueSetToCell(int x, int y, MapStatus values) {
int newX = x - dx;
int newY = y - dy;
if (newX >= 0 && newX < elements.length && newY >= 0
&& newY < elements[0].length) {
if (elements[newX][newY] == null) {
elements[newX][newY] = new MapStatus();
}
elements[newX][newY].add(values);
}
}
COM: <s> adds a set of values to a cell on a specific position </s>
|
funcom_train/24072510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void returnFromModule(APLModule module, SubstList<Term> theta) {
// No action if the module is the main module
if (module.getParent() == null)
return;
// Inform parent that the child module has finished
module.getParent().controlReturned(module, theta);
activateModule(module.getParent());
deactivateModule(module);
executor.passControl(module, module.getParent());
}
COM: <s> hands control from the executed module back to the parent </s>
|
funcom_train/3108099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLayoutComponent(Component comp) {
synchronized (comp.getTreeLock()) {
HIGConstraints c = (HIGConstraints) components.remove(comp);
if (c == null)
return;
if (colComponents[c.x] != null)
colComponents[c.x].remove(comp);
if (rowComponents[c.y] != null)
rowComponents[c.y].remove(comp);
}
}
COM: <s> removes the specified component from the layout </s>
|
funcom_train/41257606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printProperty(String father) {
Collection<XMLProperty> properties = this.children.values();
if ( properties.size() == 0 ) {
System.out.println( father + "." + this.getName() + " = " + this.getValue() );
} else {
for ( XMLProperty property : properties ) {
property.printProperty( father + "." + this.getName() );
}
}
}
COM: <s> this method prints all the associated properties and their </s>
|
funcom_train/20671826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addListener(IEngineListener l){
if (_logger.isDebugEnabled()) {
_logger.debug("addListener(IEngineListener) - >> ENTER");
}
if(l == null)
throw new IllegalArgumentException("Missing mandatory listener!");
this._listeners.add(l);
if (_logger.isDebugEnabled()) {
_logger.debug("addListener(IEngineListener) - << EXIT");
}
}
COM: <s> add a new listener </s>
|
funcom_train/11011340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String formatUnit(double f, int units) {
long Whole = (long)f;
f -= Whole;
long Num = Math.round(f * units);
return new StringBuffer().append(Whole).append(" ").append(Num).append("/").append(units).toString();
}
COM: <s> this method formats the double in the units specified </s>
|
funcom_train/45472258 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void extractAnnotations(final Annotated annotated, final JClass jClass) {
//-- process annotation
String comment = extractCommentsFromAnnotations(annotated);
if (comment != null) {
jClass.getJDocComment().setComment(comment);
if (getConfig().generateExtraDocumentationMethods()) {
generateExtraDocumentationMethods(annotated, jClass);
}
}
}
COM: <s> extract documentation annotations from the </s>
|
funcom_train/12304345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toRSL(StringBuffer buf, boolean explicitConcat) {
buf.append("( ");
buf.append( getAttribute() );
buf.append(" ");
buf.append(getOperatorAsString(operator));
buf.append(" ");
toRSLSub(getValues(), buf, explicitConcat);
buf.append(" )");
}
COM: <s> produces a rsl representation of this relation </s>
|
funcom_train/14399988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLocalProperty(String pKey, String pValue) {
if (isGlobal()) throw new IllegalStateException(
"Global configuration cannot be modified by setLocalProperty()");
Properties localProperties = (Properties) this.iLocalProperties.get();
if (localProperties == null) {
localProperties = new Properties();
this.iLocalProperties.set(localProperties);
}
localProperties.setProperty(pKey, pValue);
}
COM: <s> sets a property value of the local properties </s>
|
funcom_train/19088251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(XMLInputSource xis) {
this.xis = xis;
// we want to load the Document into memory here already!
content = readInput(xis);
parser.getRecorder().setContent(content);
// should create a new XMLInputSource here, but...
xis.setCharacterStream(new CharArrayReader(content));
try {
parser.parse(xis);
} catch (IOException e) {
throw new JivanHTMLException(e);
}
masterDoc = parser.getDocument();
checkDocValid(masterDoc);
symTab = new HashMap(50);
makeSymbolTable(symTab, masterDoc);
checkForXerces();
}
COM: <s> ask the manager to load a document with the uri </s>
|
funcom_train/3099574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getStateValue(Object stateVariable) {
if (stateVariableDictionary.containsKey(stateVariable))
return stateVariableDictionary.get(stateVariable);
if (node == null || node.getParentNode() == null)
return null;
else
return node.getParentNode().getWorldModel().getState().getStateValue(stateVariable);
}
COM: <s> gets the value of the for the given state variable </s>
|
funcom_train/1683385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BufferedHeader getLastHeader(String name) {
// start at the end of the list and work backwards
for (int i = headers.size() - 1; i >= 0; i--) {
BufferedHeader header = (BufferedHeader) headers.get(i);
if (header.getName().equalsIgnoreCase(name)) {
return header;
}
}
return null;
}
COM: <s> gets the last header with the given name </s>
|
funcom_train/16613927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addMappableOligoFeatureIfUnique(MappableOligoFeature feature) {
// Optimisation: Using binarySearch minimizes the number of location
// comparisons required which is necessary for large datasets.
int insertPoint = Collections.binarySearch(oligoFeatures,feature);
// feature already known
if (insertPoint>=0)
return false;
oligoFeatures.add(-insertPoint-1, feature);
mappedTranscripts = null;
return true;
}
COM: <s> adds a mappable oligo feature if it is has not already been added </s>
|
funcom_train/3836264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanelTransport() {
if (jPanelTransport == null) {
FlowLayout flowLayout = new FlowLayout();
flowLayout.setHgap(20);
flowLayout.setVgap(0);
jPanelTransport = new JPanel();
jPanelTransport.setLayout(flowLayout);
jPanelTransport.add(getJPanelBack(), null);
jPanelTransport.add(getJPanel(), null);
}
return jPanelTransport;
}
COM: <s> this method initializes j panel transport </s>
|
funcom_train/44568191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSelected(File file) throws BuildException{
FileInputStream fis = null;
try {
fis = new FileInputStream(file);
return isSelected(fis);
} catch (FileNotFoundException e) {
throw new BuildException(e);
} finally{
try {
if (fis != null) fis.close();
} catch (IOException e) {
throw new BuildException(e);
}
}
}
COM: <s> determines wheter the image file </s>
|
funcom_train/31668702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearBuffer() {
for (int i = 0; i < gridWidth; i++)
for (int j = 0; j < gridHeight; j++)
if (buffer[i][j] == null)
buffer[i][j] = new Point3D();
else {
buffer[i][j].x = 0;
buffer[i][j].y = 0;
buffer[i][j].z = 0;
}
}
COM: <s> creates or clears the point3 d objects in code buffer code </s>
|
funcom_train/40547660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveCallBackListenerOrderStatusChangedListener() throws Exception {
int beforeRemove = _handler.getListenerSize(OrderStateChangeNotificationEvent.class);
_handler.removeCallBackListener(_orderStatusHandler);
int afterRemove = _handler.getListenerSize(OrderStateChangeNotificationEvent.class);
assertEquals(beforeRemove - 1, afterRemove);
}
COM: <s> the b test remove call back listener order status changed listener b method </s>
|
funcom_train/46477854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAssetsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SecurityContextModel_Assets_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SecurityContextModel_Assets_feature", "_UI_SecurityContextModel_type"),
SecurityContextPackage.Literals.SECURITY_CONTEXT_MODEL__ASSETS,
true,
false,
false,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the assets feature </s>
|
funcom_train/16786713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void linkResponsibleDepartmentByDepartmentNumber(String responsibleTableRowDepartmentNumber) throws RQLException {
Page depPageOrNull = getResponsibleDeparmentRowByNumber(responsibleTableRowDepartmentNumber);
if (depPageOrNull == null) {
throw new InvalidResponsibleDepartmentException("Responsible department row for given number "
+ responsibleTableRowDepartmentNumber + " cannot be found. Try with a valid number again.");
}
linkResponsibleDepartment(depPageOrNull);
}
COM: <s> connect page with the given responsible table department number to this page </s>
|
funcom_train/41445708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("ResourceAdaptor[");
super.toString(buf);
buf.append(",resource adaptor types=").append(Arrays.asList(raTypes)).
append(",supports active reconfig=").append(supportsActiveReconfiguration).
append(']');
return buf.toString();
}
COM: <s> get a string representation for this resource adaptor component descriptor </s>
|
funcom_train/2302255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean canExpand(MinimizeTreeNode node) {
if (expanding == null && node.getChildCount() > 0) {
JOptionPane.showMessageDialog
(view, "This group has already been expanded.");
return false;
}
if (expanding == null || expanding == node)
return true;
JOptionPane.showMessageDialog
(view, "We're already expanding the group "+
minimizer.getString(expanding.getStates())+"!");
return false;
}
COM: <s> check if were able to expand some node at this time </s>
|
funcom_train/14661604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (o == this)
return true;
if (!(o instanceof BinaryOperation))
return false;
BinaryOperation bo = (BinaryOperation) o;
if (type != bo.getType())
return false;
if (!(operand1.equals(bo.getOperand1()) && operand2.equals(bo
.getOperand2())))
return false;
return true;
}
COM: <s> returns code true code if the specified code object code is a </s>
|
funcom_train/375418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTwoProperties() {
ConfigString string =
new ConfigString("before @{a.b} after @{a.b.c}", variables, properties);
assertTrue("sub failed in expand", string
.expand("mark", properties));
assertEquals("before A.B after A.B.C", string.toString());
string.reset(); // Reintialize
}
COM: <s> test two properties </s>
|
funcom_train/17787640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMetadaBin0(HTTPResponseSender httpResponseSender, JPIPMessageEncoder jpipMessageEncoder) throws IOException {
JPIPMessageHeader jpipMetadataHeader = new JPIPMessageHeader(-1, JPIPMessageHeader.METADATA, 0, 0, 0, true, -1);
byte[] jpipHeader = jpipMessageEncoder.encoderHeader(jpipMetadataHeader);
httpResponseSender.sendChunk(jpipHeader);
}
COM: <s> adds the metadata bin 0 to the response </s>
|
funcom_train/44717089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInitListenerFormVisible() {
_form.addInitListener(new FormInitListener() {
public void init(FormSectionEvent fse) {
ServletRequest req = fse.getPageState().getRequest();
req.setAttribute("executedInit", "true");
}
});
createFormData();
assertEquals(_httpRequest.getAttribute("executedInit"), "true");
}
COM: <s> verifies that init listeners run with the form visible </s>
|
funcom_train/8661952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean callsSuper() throws CannotCompileException {
CodeAttribute codeAttr = methodInfo.getCodeAttribute();
if (codeAttr != null) {
CodeIterator it = codeAttr.iterator();
try {
int index = it.skipSuperConstructor();
return index >= 0;
}
catch (BadBytecode e) {
throw new CannotCompileException(e);
}
}
return false;
}
COM: <s> returns true if this constructor calls a constructor </s>
|
funcom_train/20120505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object doGroovyScript(final HandlerI openedHandler, String strGroovyScript) {
LazyProxyHandler proxyHandler = new LazyProxyHandler() {
@Override
public void destroy() {
}
@Override
public HandlerI createHandler() {
return openedHandler;
}
};
try {
Script script = GROOVY_SHELL.parse(strGroovyScript);
script.getBinding().setProperty("db", new GroovyHandlerWrapper( proxyHandler, getSecurityOptions()));
return script.run();
} catch ( Throwable t) {
logger.trace("Error execution", t);
throw new RuntimeException(t);
}
}
COM: <s> run groovy script in groovy trigger context </s>
|
funcom_train/16627571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertSectionAfter(String section, String tt, String newSection) {
int i, N;
for (i = 0, N = _tb.size(); i < N && !_tb.get(i).name().equals(section); i++)
;
if (i == N) {
this.addSection(newSection, tt);
} else {
_tb.add(i + 1, new toolbarSection(newSection, tt));
}
}
COM: <s> adds a new section after the given section which must exist </s>
|
funcom_train/50385872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LoginDataType getLoginDataType() throws Exception {
LoginDataType ret = LoginDataType.Factory.newInstance();
ret.setGcID(dbGcId); //take db* !!!
ret.setXlogin(xLogin);
ret.setToken(X509Utils.getPEMStringFromX509(dbCert)); // takedb* !!!
ret.setRole(role);
ret.setProjects(projects);
return ret;
}
COM: <s> gives xml representation of x uudb entry </s>
|
funcom_train/13525118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void layoutCells(int rightmostPos, int bottommostPos) {
Iterator iter = cells.iterator();
Cell cell;
Rectangle cellRect = new Rectangle();
Rectangle tempRect = new Rectangle();
while (iter.hasNext()) {
cell = (Cell) iter.next();
cell.doLayout(cellRect, tempRect, rightmostPos, bottommostPos);
}
}
COM: <s> lays out all cells of this cell area </s>
|
funcom_train/31930850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Properties copy(Properties original) {
Properties p = null;
try {
p = (Properties) MiscOps.deepCopy(original);
}
catch (BlitzException be) {
LoggerOps.error(this.getClass(), "Unable to copy Properties object", be);
p = (Properties) original.clone();
}
return p;
}
COM: <s> return a copy of the code original code </s>
|
funcom_train/885110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void finished() {
try {
deactivateGlassPane();
doUIUpdateLogic();
} catch (RuntimeException e) {
// Do nothing, simply cleanup below
ViewManagerImpl.getLog().error("SwingWorker error" + e); //$NON-NLS-1$
} finally {
// Allow original component to get the focus
if (getAComponent() != null) {
getAComponent().requestFocus();
}
}
}
COM: <s> called on the event dispatching thread not on the worker thread after </s>
|
funcom_train/31662462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPatternTable(Pattern[] newPatternTable) {
if (newPatternTable != patternTable) {
patternTable = newPatternTable;
if (patternTable != null)
for (int i = 0; i < patternTable.length; i++)
patternTable[i].setSpectrum(this);
}
}
COM: <s> sets a new pattern table </s>
|
funcom_train/31339223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logError(String msg, Throwable e) {
if (msg == null)
msg = ""; //$NON-NLS-1$
getLog().log(new Status(IStatus.ERROR, getBundle().getSymbolicName(), IStatus.ERROR, msg, e));
}
COM: <s> log an error message </s>
|
funcom_train/17046079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MappedString append(int mappedCodePoint, String origSubString) {
final int mappedPos = mappedString.length();
final int origPos = originalString.length();
originalString.append(origSubString);
mappedString.appendCodePoint(mappedCodePoint);
reverseMap.put(mappedPos, new int[]{origPos, origSubString.length()});
return this;
}
COM: <s> append the given mapped code point to this mapped string </s>
|
funcom_train/17774326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeLine(int y) {
if (y < 0 || y >= height) {
return;
}
for (; y > 0; y--) {
for (int x = 0; x < width; x++) {
matrix[y][x] = matrix[y - 1][x];
}
}
for (int x = 0; x < width; x++) {
matrix[0][x] = null;
}
}
COM: <s> removes a single line </s>
|
funcom_train/4237276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetOrdenPlatilloPK() {
System.out.println("setOrdenPlatilloPK");
OrdenPlatilloPK ordenPlatilloPK = new OrdenPlatilloPK(5,6);
OrdenPlatillo instance = new OrdenPlatillo();
instance.setOrdenPlatilloPK(ordenPlatilloPK);
assertTrue(true);
}
COM: <s> test of set orden platillo pk method of class data </s>
|
funcom_train/8035873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isConnected() throws IOException, SAXException {
Map<String, String> nameValue = simpleUPnPcommand(controlURL,
serviceType, "GetStatusInfo", null);
String connectionStatus = nameValue.get("NewConnectionStatus");
if (connectionStatus != null
&& connectionStatus.equalsIgnoreCase("Connected")) {
return true;
}
return false;
}
COM: <s> retrieves the connection status of this device </s>
|
funcom_train/23971122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Expression readCaseWhenExpressionOrNull() {
Expression l = null;
int position = getPosition();
read();
if (!readIfThis(Tokens.OPENBRACKET)) {
rewind(position);
return null;
}
l = XreadBooleanValueExpression();
readThis(Tokens.COMMA);
Expression then = XreadValueExpression();
readThis(Tokens.COMMA);
Expression thenelse = new ExpressionOp(OpTypes.ALTERNATIVE, then,
XreadValueExpression());
l = new ExpressionOp(OpTypes.CASEWHEN, l, thenelse);
readThis(Tokens.CLOSEBRACKET);
return l;
}
COM: <s> reads a casewhen expression </s>
|
funcom_train/2799576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDisplayAlias() {
java.util.Iterator it = null;
if(pubKey != null){
it = pubKey.getUserIDs();
}else {
it = secKey.getUserIDs();
}
if (it.hasNext()) {
return (String) it.next();
}
return null;
}
COM: <s> returns the display information for this key </s>
|
funcom_train/26491542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getName(Address[] addr) {
if(addr[0] instanceof InternetAddress) {
InternetAddress a = (InternetAddress)addr[0];
String personal = a.getPersonal();
if(personal != null) return personal;
else return a.getAddress();
} else
return addr[0].toString();
}
COM: <s> gets some kind of name out of the first address in an array </s>
|
funcom_train/6204421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PaletteContainer createCategory(ITemplateCategory category) {
PaletteDrawer group = new PaletteDrawer(category.getName());
Iterator it = category.getTemplates().iterator();
while (it.hasNext()) {
ITemplate template = (ITemplate) it.next();
ImageDescriptor imageDesc = GaijinUIPlugin.getTemplateImageDescriptor(template);
PaletteTemplateEntry entry = new PaletteTemplateEntry(template.getName(),
template.getDescription(), template, imageDesc, imageDesc);
group.add(entry);
}
return group;
}
COM: <s> create the drawer and entries for a category </s>
|
funcom_train/18807558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIndex(final Comparable key) {
int result = -1;
int i = 0;
final Iterator iterator = this.data.iterator();
while (iterator.hasNext()) {
final KeyedObject ko = (KeyedObject) iterator.next();
if (ko.getKey().equals(key)) {
result = i;
}
i++;
}
return result;
}
COM: <s> returns the index for a given key </s>
|
funcom_train/1589132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInto(ReadWritablePeriod writablePeriod, Object object, Chronology chrono) {
ReadableDuration dur = (ReadableDuration) object;
chrono = DateTimeUtils.getChronology(chrono);
long duration = dur.getMillis();
int[] values = chrono.get(writablePeriod, duration);
for (int i = 0; i < values.length; i++) {
writablePeriod.setValue(i, values[i]);
}
}
COM: <s> extracts duration values from an object of this converters type and </s>
|
funcom_train/15913611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getImage(String p_key) {
if (imagesMap.containsKey(p_key)) {
return (Image)imagesMap.get(p_key);
}
ImageDescriptor iDesc = getDescriptor(p_key);
if (iDesc == null) {
return null;
} else {
Image img = iDesc.createImage();
imagesMap.put(p_key, img);
return img;
}
}
COM: <s> returns the image for the passed key or code null code </s>
|
funcom_train/14300640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(PrintStream out) {
out.println("BucketTree:" + "\n\tActive Bucket is " + active_bucket + ".");
for (int i=0; i<bucket_tree.length; i++)
bucket_tree[i].print(out);
out.println("Bucket result: ");
unnormalized_result.print(out);
}
COM: <s> print method for bucket tree </s>
|
funcom_train/3812111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stopRecognitionThread() {
if (recognitionThread == null) {
return;
}
recognitionThread.stopRecognition();
final long maxSleepTime = 5000;
long sleepTime = 0;
while (recognitionThread.isAlive() && (sleepTime < maxSleepTime)) {
try {
Thread.sleep(SLEEP_MSEC);
sleepTime += SLEEP_MSEC;
} catch (InterruptedException e) {
return;
}
}
recognitionThread = null;
}
COM: <s> stop the recognition thread and wait until it is terminated </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.