__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/1602488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteAppointment(int id) {
try {
Class.forName("org.sqlite.JDBC");
conn = DriverManager.getConnection("jdbc:sqlite:"+ databaseName);
prep = conn.prepareStatement(
"delete from APPOINTMENT where id = ?;");
prep.setInt(1, id);
prep.executeUpdate();
conn.close();
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
COM: <s> function to remove an appointment from the database </s>
|
funcom_train/45741665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTextFieldChainUri () {
if (textFieldChainUri == null) {//GEN-END:|117-getter|0|117-preInit
// write pre-init user code here
textFieldChainUri = new TextField ("Enter URI for certificate chain:", null, 32, TextField.ANY);//GEN-LINE:|117-getter|1|117-postInit
// write post-init user code here
}//GEN-BEGIN:|117-getter|2|
return textFieldChainUri;
}
COM: <s> returns an initiliazed instance of text field chain uri component </s>
|
funcom_train/5348804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExtractHeaderValue() {
String value = "value";
String[] headers = {
HTTPHeaderName.CONTENT_RANGE+":" +value,
HTTPHeaderName.CONTENT_RANGE+": " +value,
HTTPHeaderName.CONTENT_LENGTH+": "+value,
HTTPHeaderName.CONTENT_TYPE+": " +value
};
for(int i=0; i<headers.length; i++) {
String curValue = HTTPUtils.extractHeaderValue(headers[i]);
assertEquals("values should be equal", value, curValue);
}
}
COM: <s> tests the method to extract a header value from an http header </s>
|
funcom_train/27822752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void restoreConfiguration() {
String lookAndFeelClassName=m_configuration.getString("lookAndFeel");
if (lookAndFeelClassName!=null)
try {
UIManager.setLookAndFeel(lookAndFeelClassName);
}
catch (Exception error) {
displayErrorNotification(error);
}
}
COM: <s> called to restore the configuration </s>
|
funcom_train/26485163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endElement() {
ElementInfo info =
(ElementInfo)elementStack.remove(elementStack.size() - 1);
if (info.outdentBeforeEnd)
outdent();
if (inElementStart) {
inElementStart = false;
println("/>");
}
else {
doIndent();
println("</" + info.name + ">");
}
}
COM: <s> ends an element </s>
|
funcom_train/18366229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void retrieveData() throws SQLException {
ResultSet rs;
Statement statement;
java.util.Date checkInDate;
statement = SQLHandler.openNewStatement();
rs = SQLHandler.queryGetRevisionFileData(statement, rFileReference);
while (rs.next()) {
rFormat = rs.getString("FORMAT_NAME");
rFile = rs.getString("FILE_PATH");
}
statement.close();
}
COM: <s> retrieves the data from the database into this structure </s>
|
funcom_train/8086594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getKeys(){
StringBuffer key = new StringBuffer();
for(int i = 0;i < m_orderBy.size(); i++){
key.append((String)m_orderBy.elementAt(i));
if(i != m_orderBy.size()-1)
key.append(", ");
}
return key.toString();
}
COM: <s> gets the key columns name </s>
|
funcom_train/9919629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Solution withAgentForJob(int job,int agent){
//int[] newAssignment = Arrays.copyOf(assignment, assignment.length); // can only use this in Java 6
int[] newAssignment = new int[gap.numJobs()];
System.arraycopy(assignment, 0, newAssignment, 0, assignment.length);
newAssignment[job] = agent;
return new Solution(gap, newAssignment, ff);
}
COM: <s> creates a new solution using the same assignments except reassigns </s>
|
funcom_train/28299121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteEntity(Object entityObject, String id) throws Exception {
startTransaction();
Object object = em.find(entityObject.getClass(), new Long(id).longValue());
em.remove(object);
this.endTransaction();
log.info("Deleted object: " + object.toString());
return true;
}
COM: <s> delete the database entity object </s>
|
funcom_train/3760203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getSpread(UserId exclude, double cost) {
double aa = getAverageAsk(exclude,cost);
double ab = getAverageBid(exclude,cost);
//System.out.println("Average spread " + cost + " = " + aa + " - " + ab);
return aa - ab;
}
COM: <s> return the difference of get average bid and get average cost </s>
|
funcom_train/19313625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FoProperty getContentType(final String input) {
if (input.equals("inherit")) {
return null;
}
final DtCountry country = DtCountry.makeCountryDT(input);
if (country != null) {
return FoProperty.COUNTRY;
}
final DtLanguage language = DtLanguage.makeLanguageDT(input);
if (language != null) {
return FoProperty.LANGUAGE;
}
return null;
}
COM: <s> for the given token determines which kind of property should be built </s>
|
funcom_train/39292053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void currentPageChanged() {
getWorkflowActivityPage().refreshModel();
// update delegating command stack
getCommandStackManager().setCurrentCommandStack(
getCurrentPage().getCommandStack());
// update zoom actions
getEditorZoomManager().setCurrentZoomManager(
getZoomManager(getCurrentPage().getGraphicalViewer()));
// reinitialize outline page
// getOutlinePage().initialize(getCurrentPage());
}
COM: <s> indicates that the current page has changed </s>
|
funcom_train/18854321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + userId;
hashCode = 31 * hashCode + who;
hashCode = 31 * hashCode + (profilesWhen == null ? 0 : profilesWhen.hashCode());
hashCode = 31 * hashCode + fieldId;
return hashCode;
}
COM: <s> override hash code </s>
|
funcom_train/15738026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String toRelative(File basedir, String absolutePath) {
String relative;
if (absolutePath.startsWith(basedir.getAbsolutePath())) {
relative = absolutePath.substring(basedir.getAbsolutePath().length() + 1);
} else {
relative = absolutePath;
}
relative = StringUtils.replace(relative, "\\", "/");
return relative;
}
COM: <s> translate the absolute path into its relative path </s>
|
funcom_train/24184684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getBreadcrump() {
StringBuilder builder = new StringBuilder();
// business entity
if(!StringUtils.isEmpty(selectedBusinessEntityKey)) {
builder.append(juddiService.getBusinessEntity(selectedBusinessEntityKey).getName());
}
// business service
if(!StringUtils.isEmpty(selectedBusinessServiceKey)) {
builder.append(" -> ");
builder.append(juddiService.getBusinessService(selectedBusinessServiceKey).getName());
}
// build and return
return builder.toString();
}
COM: <s> build and returns breadcrump string </s>
|
funcom_train/44158754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean authenticate() {
m_log.info("authenticating #0", m_identity.getUsername());
//write your authentication logic here,
//return true if the authentication was
//successful, false otherwise
m_identity.addRole("admin");
return true;
}
COM: <s> try to authenticate the user </s>
|
funcom_train/28756008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHasscs(Long newVal) {
if ((newVal != null && this.hasscs != null && (newVal.compareTo(this.hasscs) == 0)) ||
(newVal == null && this.hasscs == null && hasscs_is_initialized)) {
return;
}
this.hasscs = newVal;
hasscs_is_modified = true;
hasscs_is_initialized = true;
}
COM: <s> setter method for hasscs </s>
|
funcom_train/40222345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected RectangleHierarchy calculateChildR2(Rectangle tree, Rectangle r) {
/** If rectangles share a right border, no R2 child */
if (tree.x + tree.width == r.x + r.width) return null;
Rectangle r2 = new Rectangle (r.x + r.width, r.y, tree.x + tree.width - r.width - r.x, r.height);
return new RectangleHierarchy(r2);
}
COM: <s> return the r2 child or null if it is empty </s>
|
funcom_train/18808813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() throws CloneNotSupportedException {
final DefaultKeyedValues clone = (DefaultKeyedValues) super.clone();
clone.data = new java.util.ArrayList();
final Iterator iterator = this.data.iterator();
while (iterator.hasNext()) {
final DefaultKeyedValue kv = (DefaultKeyedValue) iterator.next();
clone.data.add(kv.clone());
}
return clone;
}
COM: <s> returns a clone </s>
|
funcom_train/3410124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNotify() {
synchronized (getTreeLock()) {
if (peer == null) {
peer = getToolkit().createFrame(this);
}
FramePeer p = (FramePeer)peer;
MenuBar menuBar = this.menuBar;
if (menuBar != null) {
mbManagement = true;
menuBar.addNotify();
p.setMenuBar(menuBar);
}
p.setMaximizedBounds(maximizedBounds);
super.addNotify();
}
}
COM: <s> makes this frame displayable by connecting it to </s>
|
funcom_train/10375363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void failed(Bundle bundle, String contextPath, Throwable cause) {
EventAdmin eventAdmin = getEventAdmin();
if (eventAdmin == null) {
return;
}
Dictionary<String, Object> props = createDefaultProperties(bundle, contextPath);
if (cause != null) {
props.put(EventConstants.EXCEPTION, cause);
}
eventAdmin.postEvent(new Event(WebContainerConstants.TOPIC_FAILED, props));
}
COM: <s> dispatch a failed event </s>
|
funcom_train/12184568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Audio getAudio() throws ConverterException {
Audio audio = new Audio();
// Set standard media parameters
setMediaParameters(audio);
// Set audio size.
String limitParameter = getParameterValue(ParameterNames.MAX_AUDIO_SIZE);
if (limitParameter != null) {
audio.setSizeLimit(Long.parseLong(limitParameter));
}
// Set audio specific parameters.
audio.setCodec(getParameterValue(ParameterNames.AUDIO_CODEC));
return audio;
}
COM: <s> retrieving audio model object from request </s>
|
funcom_train/49078679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Discount create(){
String ID = null;
try {
ID = new GUID().generate();
} catch (Exception ex) {
ex.printStackTrace();
}
Discount Discount = new Discount();
Discount.setDiscountGUID(ID);
Cache.getInstance().put(ID,Discount);
Discount.setDirty(true);
return Discount;
}
COM: <s> creates an empty discount object with an id guid </s>
|
funcom_train/8208427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User getUserFromName(String firstName, String lastName) throws DAOException {
User user = null;
try {
User[] users = factory.match(MatchArg.equalsIgnoreCase("firstName",firstName),
MatchArg.equalsIgnoreCase("lastName", lastName));
if (users.length == 1)
user = users[0];
else {
throw new DAOException("There are multiple users with the same name or none!");
}
}
catch (RollbackException e) {
throw new DAOException(e);
}
return user;
}
COM: <s> get a user from the input first name and last name </s>
|
funcom_train/49200612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStartSequencePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ExhibitionModule_startSequence_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ExhibitionModule_startSequence_feature", "_UI_ExhibitionModule_type"),
TransformedPackage.Literals.EXHIBITION_MODULE__START_SEQUENCE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the start sequence feature </s>
|
funcom_train/24003124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void println(double x, final AsyncCallback<Boolean> callback) {
synchronized (this) {
print(x, new AsyncCallback<Boolean>()
{
public void onSuccess(Boolean b)
{
newLine(callback);
}
public void onFailure(Throwable t)
{
callback.onFailure(t);
}
}
);
}
}
COM: <s> prints a double and then terminate the line </s>
|
funcom_train/22307695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertInstanceOf( final String label, final Object object, final Class clazz ) {
if( clazz.isAssignableFrom( object.getClass() ) == false ) {
fail( label + ": object [" + object + "] is not an instance of class ["
+ clazz.getName() + "]" );
}
}
COM: <s> assert that the specified object is an instance of this class </s>
|
funcom_train/5380166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Button createToggleButton(Composite parent) {
final Button button = new Button(parent, SWT.CHECK | SWT.LEFT);
GridData data = new GridData(SWT.NONE);
data.horizontalSpan = 2;
button.setLayoutData(data);
button.setFont(parent.getFont());
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
toggleState = button.getSelection();
}
});
return button;
}
COM: <s> creates a toggle button without any text or state </s>
|
funcom_train/2761472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MemberAccessor getMemberAccessor() {
if(_memberAccessor == null) {
_memberAccessor = new MemberAccessorPropertyUsingReflection(_metaClass.getClassForMeta(), getName());
//_memberAccessor = MemberAccessorGenerator.generateMemberAccessorProperty(_metaClass.getClassForMeta(), getName());
}
return _memberAccessor;
}
COM: <s> returns the member accessor </s>
|
funcom_train/20655915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFrame getJFrame() {
if (jFrame == null) {
jFrame = new JFrame();
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jFrame.setJMenuBar(getJJMenuBar());
jFrame.setSize(1014, 534);
jFrame.setContentPane(getJContentPane());
jFrame.setTitle("LANSim");
jFrame.setIconImage(new ImageIcon(Config.iconPath + "lansim.png").getImage());
}
return jFrame;
}
COM: <s> this method initializes j frame </s>
|
funcom_train/31947759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStopPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ESession_stop_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ESession_stop_feature", "_UI_ESession_type"),
SailuserdataPackage.Literals.ESESSION__STOP,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the stop feature </s>
|
funcom_train/50885304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closePopup() {
if(popup != null) {
popup.hide();
if(frame != null)
frame.invalidate();
if(contents != null)
contents.finalizePopup();
SwingUtilities.invokeLater(new Runnable() {
public void run() {
requestFocus();
}
});
}
popup = null;
}
COM: <s> called each time the popup is hidden </s>
|
funcom_train/19311442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LayoutMasterSet getLayoutMasterSet() {
// layout-master-set is always the first child.
final FObj firstChild = getChildren().get(0);
if (firstChild instanceof LayoutMasterSet) {
return (LayoutMasterSet) firstChild;
}
throw new IllegalStateException("First child of fo:root must be "
+ "fo:layout-master-set");
}
COM: <s> return the child layout master set </s>
|
funcom_train/34806821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ArrayList getModes() {
ArrayList theModes = new ArrayList();
Iterator modes = f_namespace_2_ht_attrs.keySet().iterator();
String l_name;
while(modes.hasNext()) {
l_name = (String)modes.next();
if (!l_name.equals("")) {
theModes.add(l_name);
}
}
return theModes;
}
COM: <s> returns the modes that this element contains </s>
|
funcom_train/3414019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initFromCollection(Collection<? extends E> c) {
Object[] a = c.toArray();
// If c.toArray incorrectly doesn't return Object[], copy it.
if (a.getClass() != Object[].class)
a = Arrays.copyOf(a, a.length, Object[].class);
queue = a;
size = a.length;
}
COM: <s> initializes queue array with elements from the given collection </s>
|
funcom_train/16533173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addElement(GraphElement element) {
//this.sceneRoot.addChild(element.create());
if ((element instanceof NodeElement)) {
NodeElement ele = (NodeElement) element;
BranchGroup bg = ele.create();
if (bg != null) {
if (bg.getParent() == null) {
this.elementRoot.addChild(bg);
}
}
} else if (element instanceof EdgeElement){
this.elementRoot.addChild(element.create());
}
}
COM: <s> adds a graph element object to the display </s>
|
funcom_train/14654204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open (String filename, boolean append) {
try {
stream = new PrintWriter (new FileWriter (filename, append));
stream.println (new StringBuffer("Start: ").append(new Date ()).toString ());
} catch (IOException exception) {
System.out.println (exception.toString ());
}
}
COM: <s> open print writerstream to filename and appen true false </s>
|
funcom_train/12686425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFile(File file) {
this.file = file;
if (file != null && file.exists() && !file.isDirectory()) {
setStatusMessage("File: " + file.getAbsolutePath());
}
else {
setStatusMessage("New File");
}
}
COM: <s> set the file </s>
|
funcom_train/42851209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNewTVShowName(MediaDirConfig dirConfig,String pattern,final IEpisode episode,final String ext) throws PatternException {
PatternProcessor processor = new PatternProcessor() {
@Override
protected String processName(String name) {
ISeason season = episode.getSeason();
IShow show = season.getShow();
String value = processTVShowName(name,show,season,episode,ext);
return value;
}
};
return processor.doit(dirConfig,pattern);
}
COM: <s> get a file name for a tv show pattern </s>
|
funcom_train/33146979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeOptions(Options options) {
options.addOption(SharedOptions.inputFileOption);
options.addOption(SharedOptions.outputFileOption);
options.addOption(SharedOptions.standardEncoding);
options.addOption(SharedOptions.prefixEncoding);
options.addOption(SharedOptions.infixEncoding);
options.addOption(SharedOptions.noWarnIfTwoFields);
options.addOption(SharedOptions.annotationSeparatorCharacterOption);
}
COM: <s> command line options for the tool </s>
|
funcom_train/5444937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read(byte b[], int off, int len) throws IOException {
if (count == 0) {
return -1;
}
if (len > count) {
len = (int)Math.min(count, Integer.MAX_VALUE);
}
len = zf.read(pos, b, off, len);
if (len == -1) {
throw new ZipException("premature EOF");
}
pos += len;
count -= len;
return len;
}
COM: <s> reads zip file entry into an array of bytes </s>
|
funcom_train/25291487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReverbDelay(float reverbDelay) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_REVERB_DELAY_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("AuralAttributes5"));
((AuralAttributesRetained)this.retained).setReverbDelay(reverbDelay);
}
COM: <s> set reverberation delay time </s>
|
funcom_train/31931301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openActualResultViewer(String fileName) {
try {
new ActualResultViewer(fileName);
}
catch (BlitzException be) {
error(null, "Can't open actual result viewer", be);
JOptionPane.showMessageDialog(this, "Unable to open file \"" + fileName
+ "\"", "Can't Open Viewer", JOptionPane.ERROR_MESSAGE);
}
}
COM: <s> open an external viewer on the actual result file specified by </s>
|
funcom_train/35703285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLimitString(String querySelect, int offset, int limit) {
if ( offset > 0 ) {
throw new UnsupportedOperationException( "query result offset is not supported" );
}
return new StringBuffer( querySelect.length() + 16 )
.append( querySelect )
.insert( 6, " first " + limit )
.toString();
}
COM: <s> add a tt limit tt clause to the given sql tt select tt </s>
|
funcom_train/28312536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void growArray(int required) {
Object base = getArray();
int size = Math.max(required, countLimit
+ Math.min(countLimit, maximumGrowth));
Class type = base.getClass().getComponentType();
Object grown = Array.newInstance(type, size);
resizeCopy(base, grown);
countLimit = size;
setArray(grown);
}
COM: <s> increase the size of the array to at least a specified size </s>
|
funcom_train/39398400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateFiles(SharedFileInfo[] fileInfos) {
removeFiles();
for (int i = 0; i < fileInfos.length; i++) {
SharedFileInfo fileInfo = fileInfos[i];
Hash fileId = fileInfo.getFileId();
boolean complete = fileInfo.complete();
sharedFiles.put(fileId,new Boolean(complete));
NeighborSelectionStrategy.getInstance().addPeerToFile(this,fileId);
}
}
COM: <s> updates the shared files of the peer </s>
|
funcom_train/35717999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void disconnect() {
Assert.isTrue(isConnected());
try {
fUpdaterDocument.removePosition(fUpdaterCategory, fSelection);
fUpdaterDocument.removePosition(fUpdaterCategory, fStableLine);
fUpdaterDocument.removePositionUpdater(fUpdater);
fUpdater= null;
fUpdaterDocument.removePositionCategory(fUpdaterCategory);
fUpdaterCategory= null;
} catch (BadPositionCategoryException x) {
// cannot happen
Assert.isTrue(false);
}
}
COM: <s> disconnects from the document </s>
|
funcom_train/22498455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendTableRow() {
final Element cell = getCurrentTableCell();
if (cell != null) {
final Element table = cell.getParentElement().getParentElement();
final Element lastRow = table.getElement(table.getElementCount() - 1);
createTableRow(lastRow, Util.getRowIndex(lastRow.getElement(0)), false, null);
}
}
COM: <s> appends a row to a table if the caret is inside a table </s>
|
funcom_train/13848192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addNotify(ArrayList notifies, Map groupsMap, int eventType) {
synchronized (pendingNotifies) {
pendingNotifies.addLast(new NotifyTask(notifies,
groupsMap,
eventType));
if (notifierThread == null) {
Security.doPrivileged(new PrivilegedAction() {
public Object run() {
notifierThread = new Notifier();
notifierThread.start();
return null;
}//end run
});//end doPrivileged
}//endif
}//end sync
}//end addNotify
COM: <s> add a notification task to the pending queue and start an instance of </s>
|
funcom_train/880442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node findConnection(String name_conection){
// Find in XML file the conection
NodeList list_connections = document.getElementsByTagName("conection");
for(int i=0 ; i<list_connections.getLength(); i++){
Node conection = list_connections.item(i);
// Process conection name
if(conection.hasAttributes()){
NamedNodeMap conection_attrib = conection.getAttributes();
Node name = conection_attrib.getNamedItem("name");
if (name!=null){
if(name.getNodeValue().compareTo(name_conection)==0){
return conection;
}
}
}
}
return null;
}
COM: <s> find a conection we know the name in the xml file </s>
|
funcom_train/19301804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Att removeAtt(String namespace, String localName) {
for (int i = 0; i < attributes.size(); i++) {
Att att = attributes.get(i);
if (att.getLocalName().equals(localName) &&
att.getNamespace().equals(namespace)) {
attributes.remove(i);
return att;
}
}
return null;
}
COM: <s> removes the attribute with the specified namespace and local </s>
|
funcom_train/3273166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() {
switch(componentSize){
case Component.SMALL:
return smallComponentDisplayName();
case Component.MEDIUM:
return mediumComponentDisplayName();
case Component.LARGE:
return largeComponentDisplayName();
case Component.SPECIALIZED:
return specializedComponentDisplayName();
case Component.MISSILE:
return missileComponentDisplayName();
}
return "";
}
COM: <s> get a name representing this component with </s>
|
funcom_train/22286088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void newTextBox() {
spin = new SpinBoxTextWidget();
spin.setBackground(background);
spin.setAlign(align);
spin.setEditable(true);
if (fillMode==CONTENT || fillMode==FILLED) {
spin.setStyle(FILLED);
} else {
spin.setStyle(BOXED);
}
if (fillMode==BUTTON || fillMode==FILLED) {
spin.setFillButtons(true);
} else {
spin.setFillButtons(false);
}
spin.setText(String.valueOf(value));
spin.setDisabled(isDisabled());
add(spin);
}
COM: <s> creates a new spin box text widget </s>
|
funcom_train/32734054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Integer findInteger(String sql) {
assureDatabaseConnection();
try {
return i_stmtExecuter.getSingleRowColAsInteger(sql);
} catch (SQLException ex) {
throw new DatabaseException(ex, sql + " failed.");
} finally {
if (!i_inTransactionState) {
i_jrfConnection.closeOrReleaseResources();
}
}
}
COM: <s> returns a single row single column query result as a code integer </s>
|
funcom_train/25638018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildAnnotationTypeOptionalMemberSummary(XMLNode node, Content memberSummaryTree) {
MemberSummaryWriter writer =
memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL];
VisibleMemberMap visibleMemberMap =
visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL];
addSummary(writer, visibleMemberMap, false, memberSummaryTree);
}
COM: <s> build the summary for the optional members </s>
|
funcom_train/3027378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAccess(MethodSummary parent, ASTName name, boolean isMessageSend) {
// Record the access
if (isMessageSend) {
// Add the dependency
parent.addDependency(new MessageSendSummary(parent, (ASTName) name));
} else {
// Add the dependency
parent.addDependency(new FieldAccessSummary(parent, (ASTName) name));
}
}
COM: <s> adds an access to the method </s>
|
funcom_train/38530328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEventOutput(final File eventsOut) {
if (!isSetup) {
throw new IllegalStateException(
"You may not call setEventOutput() before calling setupOffline().");
}
sortControl.setEventOutput(eventsOut);
LOGGER.log(Level.INFO, "Set file for pre-sorted events"
+ eventsOut.getAbsolutePath());
}
COM: <s> set the file to output events to when the users sort routine invokes </s>
|
funcom_train/3559862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValue(int numValue) throws WizardException {
switch (numValue) {
case 0:
return (String) cboMountPoint.getSelectedItem();
case 1:
return txtVolumeName.getText();
case 2:
return (String) cboVolumeType.getSelectedItem();
default:
throw new WizardException(mediBundle.getString("Volume2DbPanel_value_non_valid"));
}
}
COM: <s> returns the value whose position is specified </s>
|
funcom_train/22233812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getReflectionCoefficient() {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_REFLECTION_COEFFICIENT_READ))
throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes21"));
return ((AuralAttributesRetained)this.retained).getReflectionCoefficient();
}
COM: <s> retrieve reflective coefficient </s>
|
funcom_train/19245560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final InitialPredicateDefinition initialDefinition) {
final PredicateKey predicate = new PredicateKey(initialDefinition.getName(),
initialDefinition.getArgumentNumber());
if (predicateExists(predicate)) {
throw new IllegalArgumentException(LogicErrors.PREDICATE_ALREADY_DEFINED_TEXT
+ predicate);
}
initialPredicateDefinitions.put(predicate, initialDefinition);
}
COM: <s> add unknown predicate constant definition </s>
|
funcom_train/13389997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() throws Exception {
try {
// we can only register if the event service is not null
if (eventService != null) {
// now register my interest in ident messages
eventService.addListener(this);
}
logger.info("starting channel");
notificationBus.start();
} catch (Exception ex) {
log.error(ex);
}
}
COM: <s> start the channel </s>
|
funcom_train/48406892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addProcessComponentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ProcessComponentUse_processComponent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ProcessComponentUse_processComponent_feature", "_UI_ProcessComponentUse_type"),
SpemxtcompletePackage.eINSTANCE.getProcessComponentUse_ProcessComponent(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the process component feature </s>
|
funcom_train/44771786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void spool(OutputStream out) throws FileSystemException, IOException {
InputStream in = fs.getInputStream(path);
try {
byte[] buffer = new byte[8192];
int read;
while ((read = in.read(buffer)) > 0) {
out.write(buffer, 0, read);
}
} finally {
try {
in.close();
} catch (IOException ioe) {
}
}
}
COM: <s> spools this resource to the given output stream </s>
|
funcom_train/48269496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Transition doStartMonitoring() {
HeadlessApi.MonitoringOnOptions options = HeadlessApi.MonitoringOnOptions.createObject().cast();
options.clearData();
HeadlessApi.startMonitoring(options, new MonitoringCallback() {
public void callback() {
runStateMachine(Transition.ACTION_COMPLETE);
}
});
return Transition.WAITING;
}
COM: <s> invokes the asynchronous speed tracer </s>
|
funcom_train/45623038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWarningsAsErrorsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CscType_warningsAsErrors_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CscType_warningsAsErrors_feature", "_UI_CscType_type"),
MSBPackage.eINSTANCE.getCscType_WarningsAsErrors(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the warnings as errors feature </s>
|
funcom_train/33859911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getSkolemPanel() {
if (skolemPanel == null) {
GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
gridBagConstraints6.fill = GridBagConstraints.BOTH;
gridBagConstraints6.weighty = 1.0;
gridBagConstraints6.weightx = 1.0;
skolemPanel = new JPanel();
skolemPanel.setLayout(new GridBagLayout());
skolemPanel.add(getSkolemSplitPane(), gridBagConstraints6);
}
return skolemPanel;
}
COM: <s> this method initializes skolem panel </s>
|
funcom_train/40359992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDestinationExistsWithNoOverwrite() throws Exception {
// Add PROP7 to PROP2, no overwrite.
Document filter = createFilter(false, PROP2, EXTRA_STRING);
// PROP2 + PROP7 = PROP4
Map<String, List<Value>> expectedProps = createProperties();
expectedProps.put(PROP2, expectedProps.get(PROP4));
checkDocument(filter, expectedProps);
}
COM: <s> test add values to existing property with no overwrite should augment </s>
|
funcom_train/45452331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isComplete() {
if (this.getEvaluations().size() == 0) {
throw new IllegalStateException("Profile has no evaluations");
}
for (Evaluation evaluation : this.getEvaluations()) {
if (!evaluation.isDone()) {
return false;
}
}
return true;
}
COM: <s> returns whether or not the profile is complete </s>
|
funcom_train/12164684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPipelineFactory() throws Exception {
XMLPipelineFactory factory = pi.getPipelineFactory();
assertTrue("getPipelineFactory() should return an instance " +
" of the MCSPipelineFactory class",
factory.getClass().getName().equals(
"com.volantis.mcs.runtime.pipeline." +
"PipelineInitialization$MCSPipelineFactory"));
}
COM: <s> tests the get pipeline factory method </s>
|
funcom_train/23246904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long parseDate(final String aDateStr) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
try {
return (sdf.parse(aDateStr)).getTime();
} catch (ParseException e) {
LOG.log(Level.WARNING, "Error in GPX date parsing : " + aDateStr);
}
return 0;
}
COM: <s> convert between gpx string date and time representation and long </s>
|
funcom_train/45692447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNumPatternsNotEmptyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EsxFile_numPatternsNotEmpty_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EsxFile_numPatternsNotEmpty_feature", "_UI_EsxFile_type"),
EsxPackage.Literals.ESX_FILE__NUM_PATTERNS_NOT_EMPTY,
false,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the num patterns not empty feature </s>
|
funcom_train/8689991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateAttributes() throws BuildException {
if (destDir == null) {
throw new BuildException(ERROR_NO_DESTDIR);
}
if (mapper == null) {
throw new BuildException(ERROR_NO_MAPPER);
}
if (path == null) {
throw new BuildException(ERROR_NO_PATH);
}
}
COM: <s> ensure we have a consistent and legal set of attributes and set any </s>
|
funcom_train/28489859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void closeInputWindow() {
ProgressLogger.getInstance().debug("enter closeInputWindow()");
ProgressLogger.getInstance().info("closing input window");
if (command != null) {
command.removeAll();
}
if (mainFrame != null) {
mainFrame.removeAll();
mainFrame.dispose();
}
ProgressLogger.getInstance().debug("exit closeInputWindow()");
}
COM: <s> exiting from the system </s>
|
funcom_train/47108492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEvent( FormEvent event, int index ) {
if( events == null )
events = new ArrayList();
if( index < 0 || index == events.size() ) {
index = events.size();
events.add( event );
} else
events.add( index, event );
event.setComponent( this );
if( model != null && model.eventProvider != null )
model.eventProvider.fireEventAdded( this, event, index );
}
COM: <s> adds a form event to this form component at the specified position </s>
|
funcom_train/3832990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSimple(CssParameter cssParam) {
boolean simple = true;
Object[] o = cssParam.getValue().getComponents();
for (int i = 0; i < o.length; i++) {
if ( o[i] instanceof Expression ) {
simple = false;
break;
}
}
return simple;
}
COM: <s> returns true if the passed css parameter contain a simple value </s>
|
funcom_train/25762532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxtFilename() {
if (txtFilename == null) {
txtFilename = new JTextField();
txtFilename.setBounds(new Rectangle(121, 29, 206, 28));
txtFilename.setText(Configuration.getInstance().getProperty(
"heightprofile.default.filename"));
}
return txtFilename;
}
COM: <s> this method initializes txt filename </s>
|
funcom_train/32648984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createExtThemeComboBox() {
GridData gridData2 = new GridData();
gridData2.widthHint = 150;
extThemeComboBox = new ThemeComboBox(leftComposite, SWT.NONE);
extThemeComboBox.setEmbeddedInBindableGroup(false);
extThemeComboBox.setBindingSubPath("appearance");
extThemeComboBox.setEnumClass("net.sf.tapestry_jsmenu.themegui.xmlbinding.SeparatorAppearance");
extThemeComboBox.setLayoutData(gridData2);
}
COM: <s> this method initializes ext theme combo box </s>
|
funcom_train/36626647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateTableColumns(final AsyncCallback<Object> completedCallback) {
this.tableModelService.getColumns(new AsyncCallback<Object>() {
public void onFailure(Throwable caught) {
completedCallback.onFailure(caught);
}
public void onSuccess(Object result) {
TableColumn[] columns = (TableColumn[]) result;
AdvancedTable.this.updateTableColumns(columns);
completedCallback.onSuccess(result);
}
});
}
COM: <s> updates and redraws the table columns based on the table data coming from </s>
|
funcom_train/49439839 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleUpdateRequest(UpdateRequest req, ReplyHandler handler ) {
if(req.getVersion() > UpdateRequest.VERSION)
return; //we are not going to deal with these types of requests.
byte[] data = UpdateHandler.instance().getLatestBytes();
if(data != null) {
UpdateResponse msg = new UpdateResponse(data);
handler.reply(msg);
}
}
COM: <s> handles an update request by sending a response </s>
|
funcom_train/42508067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLanguage(String language) {
if (!language.equals(this.language)) {
String oldLanguage = this.language;
this.language = language;
updateDefaultLocale();
this.classResourceBundles.clear();
this.resourceBundles.clear();
this.propertyChangeSupport.firePropertyChange(Property.LANGUAGE.name(),
oldLanguage, language);
}
}
COM: <s> sets the preferred language to display information changes current default locale accordingly </s>
|
funcom_train/37506904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void startDataEventListener(PushletClientListener aListener, String aListenURL) {
// Suggestion by Jeff Nowakowski 29.oct.2006
dataEventListener = new DataEventListener(aListener, aListenURL);
synchronized (dataEventListener) {
dataEventListener.start();
try {
// Wait for data event listener (thread) to start
dataEventListener.wait();
} catch (InterruptedException e) {
}
}
}
COM: <s> starts default data event listener and waits for its thread to start </s>
|
funcom_train/18546754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear(){
this.name = null;
this.type = null;
this.description = null;
this.enableStatus = null;
this.textQuery = null;
this.retryNumber = null;
this.fieldsHtml = null;
this.fieldIdList = null;
this.periodicity = null;
this.hour = null;
this.minute = null;
this.setSaveMethod(null, null);
}
COM: <s> clear values of notification form </s>
|
funcom_train/49217393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasColumnReferenceAfter(int columnIndex) {
TextTableCellReference[] textTableCellReferences = textTableFormulaModel
.getCellReferences();
for (int i = 0; i < textTableCellReferences.length; i++) {
TextTableCellReference textTableCellReference = textTableCellReferences[i];
if (!textTableCellReference.isModified()) {
boolean value = textTableCellReference
.containsColumnAfter(columnIndex);
if (value)
return true;
}
}
return false;
}
COM: <s> returns information whether this formula has a reference to a column </s>
|
funcom_train/1385902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnReparti() {
if (btnReparti == null) {
try {
btnReparti = new JButton();
btnReparti.setText("Categoria"); // Generated
btnReparti.setPreferredSize(new Dimension(120, 70)); // Generated
btnReparti.addActionListener(myActionListener);
} catch (java.lang.Throwable e) {
// TODO: Something
}
}
return btnReparti;
}
COM: <s> this method initializes btn reparti </s>
|
funcom_train/13391273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serviceAdded(ServiceDiscoveryEvent serviceDiscoveryEvent) {
logServiceDiscoveryAction("serviceAdded", serviceDiscoveryEvent);
synchronized (Collections.synchronizedCollection(svcEventListeners)) {
for (ServiceDiscoveryListener serviceListener : svcEventListeners) {
serviceListener.serviceAdded(serviceDiscoveryEvent);
}
// send an even on the event bus
sendAnonymousNewBusEvent(serviceDiscoveryEvent);
}
}
COM: <s> process a service added trigger </s>
|
funcom_train/11671809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPSVIWriterToPipeline() {
if (fSchemaValidator != null) {
fSchemaValidator.setDocumentHandler(fPSVIWriter);
fPSVIWriter.setDocumentSource(fSchemaValidator);
fPSVIWriter.setDocumentHandler(fDocumentHandler);
if (fDocumentHandler != null) {
fDocumentHandler.setDocumentSource(fPSVIWriter);
}
}
} // addPSVIWriterToPipeline()
COM: <s> adds psvi writer to the pipeline </s>
|
funcom_train/18583847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TapasUser getTapasUsers(String username, String password) {
TapasUser user = null;
String qry = "from TapasUser where name='" + username +
"' and password = '" + password + "'";
List usr = this.getListResultsByQuery(qry);
if (usr.size() > 0) {
user = (TapasUser) usr.get(0);
}
return user;
}
COM: <s> returns a tapas user instance specified by the supplied username password combination </s>
|
funcom_train/44995102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double rightAscension(final double jd) {
final double epsilon = eclipticObliquity(jd) * MathConstantes.D2R;
final double trueLong = trueLongitude(jd) * MathConstantes.D2R;
ra = Math.atan2(Math.cos(epsilon) * Math.sin(trueLong), Math
.cos(trueLong));
ra = ra * MathConstantes.R2D;
if (ra < 0) {
ra += 360.0;
}
return ra;
}
COM: <s> compute the right ascension </s>
|
funcom_train/26570509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
loopOverIncomingCommands();
} catch (Exception e) {
e.printStackTrace();
LOG.error("clientLoop failed: " + e);
} finally {
try {
LOG.info("Closing ClientSocket");
this.clientSocket.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
COM: <s> runs the protocol interpreter for a client </s>
|
funcom_train/19396314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "Entry{key=" + key + ",obj=" + obj + ",dirty=" + dirty
+ ",prior=" + (prior == null ? "N/A" : "" + prior.key)
+ ",next=" + (next == null ? "N/A" : "" + next.key)+ "}";
}
COM: <s> human readable representation used for debugging in test cases </s>
|
funcom_train/2344531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ClearObserver(){
for(int i = 0; i < Configuration.FEATURES.length; i++)
Configuration.FEATURES[i].instance.deleteObservers();
connectionSplitter.deleteObservers();
trafficLiveInput.deleteObservers();
trafficFileInput.deleteObservers();
for(int SOMnumbers = 0; SOMnumbers < svmsom_table_data.size(); SOMnumbers++){
(svmsom_table_data.get(SOMnumbers)).deleteObservers();
}
}
COM: <s> clears the complete observer structure </s>
|
funcom_train/18789594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addUsingStatements(List<String> statements, String statement) {
if (statement == null || statement.equals("")) {
return;
}
if (statement.startsWith("java.")) {
log.warn("Java import statement " + statement
+ " can not be converted to .NET!");
return;
}
if (!statements.contains(statement)) {
statements.add(statement);
}
}
COM: <s> adds a using statement to the statement list </s>
|
funcom_train/15621887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCurrentLoop() {
int erg = 0;
if (getNumberOfLoops(false) > 0) {
String value = iterlist.getSelected();
try {
erg = Integer.parseInt(value);
} catch (Exception e) {
//this exception should not occure because the values of the spinner are integers
M4Interface.print.doPrint(Print.ERROR,e.getMessage(),e);
}
}
return erg;
}
COM: <s> gets the current loopnumber </s>
|
funcom_train/1869725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getParserName() {
SAXParser saxParser = getSAXParser();
if (saxParser == null) {
return getMessage("couldNotCreateParser");
}
// check to what is in the classname
String saxParserName = saxParser.getClass().getName();
return saxParserName;
}
COM: <s> what parser are we using </s>
|
funcom_train/37803121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IGraphEdge addEdge(IGraphNode start, IGraphNode end) {
// System.err.println("Adding edge from " + start + " to " + end);
addNode(start);
if (end != start) {
addNode(end);
}
IGraphEdge edge = createEdge(start, end);
putExit(start, edge);
putEnter(end, edge);
return edge;
}
COM: <s> adds edge between two nodes </s>
|
funcom_train/11322109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameterValues(String name, Object[] values) {
if (name == null) {
throw new IllegalArgumentException("Null name parameter");
}
if (values != null) {
getParameters().put(name, values);
} else {
getParameters().remove(name);
}
}
COM: <s> set the link parameter with the given parameter name and values </s>
|
funcom_train/8347819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getItemGuardarCambios() {
if (itemGuardarCambios == null) {//GEN-END:|186-getter|0|186-preInit
// write pre-init user code here
itemGuardarCambios = new Command("Guardar cambios", Command.ITEM, 0);//GEN-LINE:|186-getter|1|186-postInit
// write post-init user code here
}//GEN-BEGIN:|186-getter|2|
return itemGuardarCambios;
}
COM: <s> returns an initiliazed instance of item guardar cambios component </s>
|
funcom_train/38736752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStartTime(float startTime) {
if (logger.isTraceEnabled()) {
logger.trace("Start animation " + "startTime=" + startTime);
}
for (int i = 0; i < ins.length; i++) {
ComputorInDataImpl in = ins[i];
in.setStartTime(startTime);
in.setRootActions(isRootActions());
changed(i);
}
}
COM: <s> called when start animator generated new code start time code </s>
|
funcom_train/39779781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setValue(AttributeSet a) {
boolean success = false;
ignoreTextChanges = true;
Object newSelection;
if (a.isDefined(CSS.Attribute.FONT_FAMILY)) {
newSelection = a.getAttribute(CSS.Attribute.FONT_FAMILY);
setSelection(a.getAttribute(CSS.Attribute.FONT_FAMILY));
success = true;
} else {
newSelection = (Object) "SansSerif";
setSelection(newSelection);
}
ignoreTextChanges = false;
if (++setValCount < 2) {
originalValue = newSelection;
}
return success;
}
COM: <s> set the value of this code titled pick list code </s>
|
funcom_train/47360799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public xmlWriter writeAttribute(String attr, String value){
if (this.attrs == null) {
this.attrs = new StringBuffer();
}
this.attrs.append(" ");
this.attrs.append(attr);
this.attrs.append("=\"");
this.attrs.append(escapeXml(value));
this.attrs.append("\"");
return this;
}
COM: <s> write an attribute out for the current entity </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.