__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/47944475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPriority(int priority, int range, Date date) {
if (date == null) {
Calendar cal = Calendar.getInstance();
date = cal.getTime();
}
QueueLogPriority queueLogPriority = new QueueLogPriority(priority, range, date);
this.priorities.add(queueLogPriority);
}
COM: <s> adds the priority </s>
|
funcom_train/29372482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getJMenu_Networking() {
if (jMenu_Networking == null) {
jMenu_Networking = new JMenu();
jMenu_Networking.setText("Networking");
//This is a know fix problem for menus going behind canvas
jMenu_Networking.getPopupMenu().setLightWeightPopupEnabled(false);
jMenu_Networking.add(getJMenuItem_Connect());
jMenu_Networking.add(getJMenuItem_Disconnect());
}
return jMenu_Networking;
}
COM: <s> this method initializes j menu networking </s>
|
funcom_train/9550290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel_AU() {
if (jPanel_AU == null) {
jPanel_AU = new JPanel();
jPanel_AU.setLayout(null);
jPanel_AU.add(getjScrPane_AU(), null);
jPanel_AU.add(getJScrPane_AUDetail(), null);
}
return jPanel_AU;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/20128982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPossibleValues(String column) throws SQLException {
if (index.containsKey(column)) {
return possibleValues[index.get(column).intValue()];
} else {
final SqlExceptionState state = SqlExceptionState.COLUMN_NOT_FOUND;
throw new SQLException("Column " + column + " does not exist in resultset.", state.name(), state.code());
}
}
COM: <s> returns the designated columns possible values separated by comma </s>
|
funcom_train/38270185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPortalControlStructures(PortalControlStructures pcs) throws PortalException {
themePrefs = pcs.getUserPreferencesManager().getUserPreferences().getThemeStylesheetUserPreferences();
IUserLayoutManager ulm = pcs.getUserPreferencesManager().getUserLayoutManager();
if (ulm instanceof TransientUserLayoutManagerWrapper)
ulm = ((TransientUserLayoutManagerWrapper)ulm).getOriginalLayoutManager();
if (ulm instanceof IAggregatedUserLayoutManager)
alm = (IAggregatedUserLayoutManager) ulm;
}
COM: <s> passes portal control structure to the channel </s>
|
funcom_train/17455586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPanelPrincipal() {
if (panelPrincipal == null) {
GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
gridBagConstraints4.fill = GridBagConstraints.BOTH;
gridBagConstraints4.gridy = 0;
gridBagConstraints4.weightx = 1.0;
gridBagConstraints4.weighty = 1.0;
gridBagConstraints4.gridx = 0;
panelPrincipal = new JPanel();
panelPrincipal.setLayout(new GridBagLayout());
panelPrincipal.add(getJTabbedPane(), gridBagConstraints4);
}
return panelPrincipal;
}
COM: <s> this method initializes panel principal </s>
|
funcom_train/9663327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createImage() {
if (isLeaf()) {
return;
}
if (isExpanded())
setImage(new ThemeImage("expanded.gif"));
else if (!isLeaf())
setImage(new ThemeImage("collapsed.gif"));
addListeners(getImage());
}
COM: <s> this method creates the node image and adds the listener </s>
|
funcom_train/48669013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleOk() {
// apply all defined filters
List<ColumnData> data = ((TableModel)fColumnsTable.getModel()).fData;
boolean filterSet = false;
for(ColumnData col : data) {
if(col.fFilter != null) {
fTableModel.addFilter(col.fIdx, col.fFilter);
filterSet = true;
}
}
if(!filterSet) {
fTableModel.removeFilters();
}
dispose();
}
COM: <s> handles ok button pressed </s>
|
funcom_train/6226968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void installUI(JComponent c) {
super.installUI(c);
// Note: It never happened before Java 1.5 that scrollbar is null
JScrollBar sb = scrollpane.getHorizontalScrollBar();
if(sb != null) {
sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE);
}
sb = scrollpane.getVerticalScrollBar();
if(sb != null) {
sb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE);
}
}
COM: <s> installs some default values for the given scrollpane </s>
|
funcom_train/28348736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateWheelListener() {
wheelListener = new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
double val = pvWheel.getValue();
if(theChannel != null) {
try{
System.out.println(theChannel.getId() + " " + val);
theChannel.putVal(val);
}
catch(Exception ex) {
System.out.println("trouble sending new value to channel theChannel.getId()");
}
}
}
};
}
COM: <s> a listener to send updated values to a channel </s>
|
funcom_train/24135707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disconnect() {
if (isConnected()) {
fireStatusEvent("Sending quit command...");
_connection.writeln("QUIT :goodbye!");
}
else if (isConnecting()) {
fireStatusEvent("Forcing a disconnect...");
_connection.close();
}
else {
fireStatusEvent("Cannot disconnect: not connected.");
}
}
COM: <s> disconnect from server by sending a quit to the server closing </s>
|
funcom_train/46158992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setFloatAttribute(String attributeName, float value) throws IllegalArgumentException {
if (wrappedStyle != null) {
StyleAttribute floatAttribute = wrappedStyle.getStyleAttribute(attributeName);
if (floatAttribute instanceof MutableFloatValue) {
((MutableFloatValue) floatAttribute).setFloat(value);
return true;
}
}
return false;
}
COM: <s> set the specified float style attribute to the specified value </s>
|
funcom_train/15686818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private VerticalIndicator createIcon(Spieler spieler, int skillIndex) {
double point = getOffset(spieler, skillIndex);
double trainingLength = getTrainingLength(spieler, skillIndex);
VerticalIndicator vi = new VerticalIndicator(Helper.round(point, 1),Helper.round(trainingLength, 1));
return vi;
}
COM: <s> create a vertical indicator object </s>
|
funcom_train/24262199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDeleteUserA1() {
try {
User user1 = (User) brianFarnsworth.clone();
curationService.addUser(admin, user1);
int identifier2 = curationService.getUserIdentifier(admin, user1);
user1.setIdentifier(identifier2);
ArrayList<User> itemsToDelete
= new ArrayList<User>();
itemsToDelete.add(user1);
curationService.deleteUsers(admin, itemsToDelete);
ArrayList<User> usersSoFar
= curationService.getUsers(admin);
assertEquals(0, usersSoFar.size());
}
catch(MacawException exception) {
log.logException(exception);
fail();
}
}
COM: <s> delete record from a one item list </s>
|
funcom_train/17975654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateCode(JDefinedClass myInterface, NestedProperty property, final Map<String, ValueObject> definitions) {
for ( NestedProperty nestedProperty : property.getNestedProperty() ) {
this.generateInterface(myInterface, nestedProperty, definitions);
super.logger.debug("Generated property <" + nestedProperty.getName() + "> for NestedProperty <" + property.getName() + ">");
}
}
COM: <s> generates code child elements for the given interface from the given property </s>
|
funcom_train/2844292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getCellEditorValue() {
if (isDefaultEditorUsed) {
return defaultEditor.getCellEditorValue();
}
if (isCheckBox) {
return new EntityTreeNode(getID(), getEntities(), isSelected());
}
return new Boolean(isSelected());
}
COM: <s> returns the value contained in the editor </s>
|
funcom_train/37388927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitFieldDeclaration(JFieldDeclaration self) {
// if (self.ident.indexOf("$") != -1) {
// return; // dont print generated elements
// }
newLine();
print(CModifier.toString(self.variable.getModifiers()));
print(self.variable.getType());
print(TABSPACE);
print(self.variable.getIdent());
if (self.variable.getValue() != null) {
print(TABSPACE + "= ");
self.variable.getValue().accept(this);
}
print(";");
}
COM: <s> prints a field declaration </s>
|
funcom_train/33959218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetStorage() {
System.out.println("getStorage");
UbernotesManagerImplementation instance = new UbernotesManagerImplementation();
Storage expResult = null;
Storage result = instance.getStorage();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get storage method of class ubernotes manager implementation </s>
|
funcom_train/36830787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TableViewer getTableViewer(Composite parent) {
if (tableViewer == null) {
tableViewer = new TableViewer(parent, SWT.BORDER | SWT.V_SCROLL
| SWT.H_SCROLL | SWT.FULL_SELECTION);
Table table = tableViewer.getTable();
table.setFont(parent.getFont());
table.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
selectionChanged();
super.widgetSelected(e);
}
});
} else {
checkParent(tableViewer.getTable(), parent);
}
return tableViewer;
}
COM: <s> returns this field editors list control </s>
|
funcom_train/29706268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeObject(ObjectOutputStream out_p) throws IOException {
// We'll write template, then states
// Template
out_p.writeShort(_template.rows);
out_p.writeShort(_template.columns);
// And states
for (int i = 0; i < _states.length; i++) {
int aValue = _states[i];
out_p.writeInt(aValue);
}
}
COM: <s> this is a custom serialization for the fun of it </s>
|
funcom_train/30172457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getUploadActive(){
Vector v = new Vector();
for(int i=0;i<dThread.length;i++){
if(dThread[i].getStateThread() == RUNNABLE){
v.add(dThread[i].getUploadInfo());
}
}
return v;
}
COM: <s> get upload active </s>
|
funcom_train/5419698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public List findListByEmail( String email , Session s ) {
try {
List l = s.find( "SELECT user FROM User user WHERE user.email = ?" , email , Hibernate.STRING );
return l;
} catch( Exception e ) {
Log.print(e);
return new LinkedList();
}
}
COM: <s> finds all users with this email </s>
|
funcom_train/50908865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Square getSquareContainingPiece(Piece p) {
for (int y=0; y<8; ++y) {
for (int x=0; x<8; ++x) {
if (squares[x][y].getPiece() != null
&& squares[x][y].getPiece().equals(p))
{
return squares[x][y];
}
}
}
return null;
}
COM: <s> finds the square containing the piece that equals the specified piece </s>
|
funcom_train/8632755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printStackTrace(PrintStream output) {
synchronized (output) {
super.printStackTrace(output);
Throwable throwable = getException();
if (throwable != null) {
if (this.fileName != null) {
output.print("Caused in "); //$NON-NLS-1$
output.print(this.fileName);
output.print(" by: "); //$NON-NLS-1$
} else {
output.print("Caused by: "); //$NON-NLS-1$
}
throwable.printStackTrace(output);
}
}
}
COM: <s> prints this exceptions stack trace to the given print stream </s>
|
funcom_train/17863822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Date getTimeIn() {
return getDateTime(this.dateInField.getDate(), this.cboHourIn.getSelectedItem().toString(),
this.cboMinuteIn.getSelectedItem().toString(), this.cboAmPmIn.getSelectedItem().toString());
}
COM: <s> gets the time in for this entry </s>
|
funcom_train/19423662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValidEmail(String email) {
boolean isValidEmailFlag = false;
if (!StringUtils.nullOrBlank(email)) {
try {
//validate the email to address as well
//method below only in new version of java mail
// overriden by one in j2ee
InternetAddress.parse(email);
// if here it is valid
isValidEmailFlag = true;
} catch (AddressException e) {
// bad email address
}
}
//return the flag
return isValidEmailFlag;
}
COM: <s> checks that the string passed is a valid email address </s>
|
funcom_train/40678541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getPropertyDefaultValue(String property) {
GObjectAPI.GParamSpec propertySpec = findProperty(property);
if (propertySpec == null) {
throw new IllegalArgumentException("Unknown property: " + property);
}
final GType propType = propertySpec.value_type;
return findProperty(property, propType).getDefault();
}
COM: <s> gets the default value set to tt gobject tt property </s>
|
funcom_train/31306804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JImageBoardImageView createImageView( File node){
if( node == null )
return null;
ImageBoardImage img = null;
JImageBoardImageView imageView = null;
img = factory.get( node );
if( img != null ){
imageView = new JImageBoardImageView( img );
imageView.setOrientation( imageOrientation );
imageView.init();
}
return imageView;
}
COM: <s> create an jimage board image view from a file </s>
|
funcom_train/16222231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInt( int index ) {
Object o = get( index );
if( o != null ){
return o instanceof Number ? ((Number) o).intValue() : (int) getDouble( index );
}
throw new JSONException( "JSONArray[" + index + "] is not a number." );
}
COM: <s> get the int value associated with an index </s>
|
funcom_train/36242715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Action getDeleteAction() {
Action action = new AbstractAction() {
private static final long serialVersionUID = 8299630020852663643L;
public void actionPerformed(ActionEvent e) {
int index = uriDisplay.getSelectedIndex();
uriList.remove(index);
notifyActionListeners(e);
}
};
action.putValue(Action.SMALL_ICON, TABLE_ROW_DELETE_SMALL_ICON);
action.putValue(Action.LARGE_ICON_KEY, TABLE_ROW_DELETE_LARGE_ICON);
action.putValue(Action.SHORT_DESCRIPTION, "Delete selected URI from the list");
action.putValue(Action.NAME, "Delete");
return action;
}
COM: <s> delete the selected entry from the store and thus from the table </s>
|
funcom_train/24001054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getJavaData() {
HlAttributeType type = getType();
if (type == null) {
//TODO log
return null;
}
doRead(type);
switch (type) {
case BOOLEAN:
return Value.b;
case INTEGER:
return Value.i;
case UNSIGNED_INTEGER:
return Value.ui.uiValue;
case FLOAT:
return Value.f;
case STRING:
return Native.toString(Value.s);
default:
//TODO log
return null;
}
}
COM: <s> converts and returns the appropriate data held this struct depending on </s>
|
funcom_train/38311987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void importData(eventmanager.ejb.interfaces.PersonTO updated) {
responsible = updated.getResponsible();
birth = updated.getBirth();
name = updated.getName();
church = updated.getChurch();
city = updated.getCity();
email = updated.getEmail();
phone = updated.getPhone();
if (updated.getPasswd() != null)
passwd = updated.getPasswd();
if (updated.getLogin() != null)
login = updated.getLogin();
mustSave = true;
}
COM: <s> updates this person to reflect the transfer object passed </s>
|
funcom_train/10602345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addItemManagerListener(ItemManagerListener listener) {
if (!this.itemManagerListeners.contains(listener)) {
if (getLogger().isDebugEnabled()) {
getLogger().debug("Adding listener: [" + listener + "]");
}
this.itemManagerListeners.add(listener);
}
}
COM: <s> attaches an item manager listener to this accreditable manager </s>
|
funcom_train/14016628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DataBinder createBinder(RequestContext context, Object formObject) throws Exception {
DataBinder binder = new WebDataBinder(formObject, getFormObjectName());
if (getMessageCodesResolver() != null) {
binder.setMessageCodesResolver(getMessageCodesResolver());
}
initBinder(context, binder);
registerPropertyEditors(context, binder);
return binder;
}
COM: <s> create a new binder instance for the given form object and request context </s>
|
funcom_train/3076562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getViewValue() {
StringBuffer buf = new StringBuffer();
for(int i = 0; i < this.viewValue.size(); i++)
buf.append("\t" + (String)this.viewValue.get(i) + "\n");
return buf.toString();
}
COM: <s> returns client spec view value as a string lines separated by t n </s>
|
funcom_train/1151179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void adjustClassSizes(Vector<DataPoint> xvec, int i1, int i2) {
double classSizes[] = classSizesMatrix.data[0];
for(int i=i1; i<i2; i++) {
DataPoint x = xvec.elementAt(i);
Discrimination.Cla trueC = x.claForDisc(dis);
if (trueC != null) {
classSizes[trueC.getPos()] ++;
maxInfNorm = Math.max(maxInfNorm, x.infNorm());
}
}
}
COM: <s> count class membership </s>
|
funcom_train/13491741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean sql_update_execute(final Object[] r, final List bindings) throws SQLException {
String sTable = (String) r[1];
String sCommand = ((StringBuffer) r[2]).toString();
Statement stmt = null;
stmt = ((Connection) r[0]).createStatement();
String query = "update " + sTable + sCommand;
// System.out.println(query);
stmt.executeUpdate(query);
Object[] retobj = new Object[3];
retobj[0] = r[0];
retobj[1] = r[1];
retobj[2] = r[2];
bindings.add(retobj);
return Boolean.TRUE;
}
COM: <s> a built in predicate sql update for updating tuples in a relational database </s>
|
funcom_train/12596946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ResultSet getResultSet(String query, int maxRows, Object[] stmtParams) throws JdbcException {
PreparedStatement ps = null;
ResultSet result = null;
try {
ps = connection.prepareStatement(query);
int index = 1;
if (stmtParams != null && stmtParams.length > 0) {
for (Object arg : stmtParams) {
ps.setObject(index, arg);
index++;
}
}
result = ps.executeQuery();
}
catch (SQLException ex) {
throw new JdbcException(ex);
}
return result;
}
COM: <s> returns a result set based on the given sql query and the prepared </s>
|
funcom_train/18381893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ForumItem updateForumThread(ForumThread ft) throws ClientException {
boolean success = false;
try {
dao.updateForumThread(ft);
return dao.readForumItem(ft.getParentId());
} catch (DAOException e) {
logger.error("error"+e.getMessage());
throw new ClientException(e.getMessage());
}
}
COM: <s> business client method wich call the dao layer to update a forum thread </s>
|
funcom_train/7656200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSubjectKeyIdentifier(byte[] subjectKeyIdentifier) {
if (subjectKeyIdentifier == null) {
this.subjectKeyIdentifier = null;
return;
}
this.subjectKeyIdentifier = new byte[subjectKeyIdentifier.length];
System.arraycopy(subjectKeyIdentifier, 0, this.subjectKeyIdentifier, 0,
subjectKeyIdentifier.length);
}
COM: <s> sets the criterion for the </s>
|
funcom_train/4844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
String output = "Case : ";
output += "\n\tInputs : ";
output += "\n\t\t" + m_inputs.toString(m_inputs.getSensoryItemNames());
output += "\n\tActions : ";
for(AgentAction a : m_actions){
output += "\n\t\t" + a.toString();
}
return output;
}
COM: <s> returns a string representation of a case class </s>
|
funcom_train/779229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset(ActionMapping mapping, HttpServletRequest request) {
booleanProperty = false;
collectionSelect = new String[0];
intMultibox = new int[0];
multipleSelect = new String[0];
stringMultibox = new String[0];
if (nested != null)
nested.reset(mapping, request);
}
COM: <s> reset the properties that will be received as input </s>
|
funcom_train/16358276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void SetDatePattern(String pattern, String timeZone) {
sdf = new SimpleDateFormat(pattern);
GregorianCalendar c = null;
if (timeZone.equalsIgnoreCase("null")) {
c = new GregorianCalendar(TimeZone.getTimeZone("GMT+00:00"), Locale.getDefault());
} else {
c = new GregorianCalendar(TimeZone.getTimeZone(timeZone), Locale.getDefault());
}
sdf.setCalendar(c);
}
COM: <s> set the date pattern </s>
|
funcom_train/28751852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNeedprocess(Long newVal) {
if ((newVal != null && this.needprocess != null && (newVal.compareTo(this.needprocess) == 0)) ||
(newVal == null && this.needprocess == null && needprocess_is_initialized)) {
return;
}
this.needprocess = newVal;
needprocess_is_modified = true;
needprocess_is_initialized = true;
}
COM: <s> setter method for needprocess </s>
|
funcom_train/37645939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getMeasuredDownstreamBandwidth() {
float sum=0.f;
List connections=getInitializedConnections();
for (Iterator iter=connections.iterator(); iter.hasNext(); ) {
ManagedConnection mc=(ManagedConnection)iter.next();
sum+=mc.getMeasuredDownstreamBandwidth();
}
return sum;
}
COM: <s> returns the downstream bandwidth between the last two calls to </s>
|
funcom_train/3990343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream createInput(String filename) {
InputStream input = createInputRaw(filename);
if ((input != null) && filename.toLowerCase().endsWith(".gz")) {
try {
return new GZIPInputStream(input);
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
return input;
}
COM: <s> simplified method to open a java input stream </s>
|
funcom_train/34678923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AssessmentLine addDiscount(String reason, Reference relatesTo, String contributesTo, String dependsOn, Rate rate, int priority) {
return addDiscount(generateLineId(), reason, relatesTo, contributesTo, dependsOn, rate, priority);
}
COM: <s> add a rate based discount with a generated line id </s>
|
funcom_train/17203249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearCodeOrder() {
SpaceEffGraphNode cur = _firstNode;
if (cur == null) return;
while (true) {
SpaceEffGraphNode next = cur.next;
if (next == null) break;
cur.next = null;
next.prev = null;
cur = next;
}
_firstNode = null;
_lastNode = null;
}
COM: <s> clear the code ordering information for the cfg </s>
|
funcom_train/39877305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPasswordQuality(ComponentName admin) {
if (mService != null) {
try {
return mService.getPasswordQuality(admin);
} catch (RemoteException e) {
Log.w(TAG, "Failed talking with device policy service", e);
}
}
return PASSWORD_QUALITY_UNSPECIFIED;
}
COM: <s> retrieve the current minimum password quality for all admins </s>
|
funcom_train/50759228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUtteranceRelations() {
assertTrue("Utterance Created", utterance != null);
Relation tokens = utterance.createRelation("tokens");
assertTrue("retrieved token relation missing",
utterance.getRelation("tokens") == tokens);
assertTrue("token relation missing",
utterance.hasRelation("tokens"));
assertTrue("missing relation found",
!utterance.hasRelation("missing_relation"));
assertTrue("retrieved missing token relation found",
utterance.getRelation("missing_relation") == null);
}
COM: <s> tests the utterance relations capabilities </s>
|
funcom_train/9361665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawBitmap(Bitmap bitmap, float left, float top, Paint paint) {
throwIfRecycled(bitmap);
native_drawBitmap(mNativeCanvas, bitmap.ni(), left, top,
paint != null ? paint.mNativePaint : 0, mDensity, mScreenDensity,
bitmap.mDensity);
}
COM: <s> draw the specified bitmap with its top left corner at x y using </s>
|
funcom_train/19681783 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTick(TickVO tick) {
// save the most recent tick
lastTick = tick;
// add the tick to the history, the first is the newest
if (!tickHistory.contains(tick))
tickHistory.add(0, tick);
// new, not processed tick
isTickCompleteness = true;
startCalculation();
// clean up the history time by time
tickHistoryCleanup();
}
COM: <s> input of the calculation </s>
|
funcom_train/8097254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionListener getActionListener(JFrame owner) {
final JFrame finalOwner = owner;
ActionListener result = new ActionListener() {
public void actionPerformed(ActionEvent evt) {
BrowserHelper.openURL(finalOwner, "http://www.cs.waikato.ac.nz/~ml/weka/");
}
};
return result;
}
COM: <s> returns an action listener to start up a browser </s>
|
funcom_train/26484011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
String cmd = e.getActionCommand();
if (I18N.get("GUI.ok").equals(cmd)) {
String choice = (String)combo.getSelectedItem();
prefs.put("last_used_engine", choice);
dispose();
runReport(choice);
}
else if (I18N.get("GUI.cancel").equals(cmd))
dispose();
}
COM: <s> handles the ok and cancel buttons </s>
|
funcom_train/28760973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCssheadweight(String newVal) {
if ((newVal != null && this.cssheadweight != null && (newVal.compareTo(this.cssheadweight) == 0)) ||
(newVal == null && this.cssheadweight == null && cssheadweight_is_initialized)) {
return;
}
this.cssheadweight = newVal;
cssheadweight_is_modified = true;
cssheadweight_is_initialized = true;
}
COM: <s> setter method for cssheadweight </s>
|
funcom_train/19977422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File createHtml() {
if (getModel() != null) {
try {
write(0, Color.BLACK);
} catch (IOException ex) {
mpv5.logging.Log.Debug(ex);//Logger.getLogger(TableHtmlWriter.class.getName()).log(Level.SEVERE, null, ex);
}
} else {
Log.Print("No datamodel given.");
}
return getFile();
}
COM: <s> this method creates the html file with standard values </s>
|
funcom_train/10357763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ClassLoader getClassLoader() {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null) {
if (authenticator != null) {
cl = authenticator.getClass().getClassLoader();
}
else {
cl = this.getClass().getClassLoader();
}
}
return cl;
}
COM: <s> resolve a class loader used to resolve context resources </s>
|
funcom_train/41164756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AgStatusExercises1 update(AgStatusExercises1 entity) {
EntityManagerHelper.log("updating AgStatusExercises1 instance", Level.INFO, null);
try {
AgStatusExercises1 result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved ag status exercises1 entity and return it or a </s>
|
funcom_train/33402909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString () {
StringBuffer sb = new StringBuffer();
sb.append("Birch Cluster Statistics\n");
sb.append("Number of Documents: " + this.getNumberOfDocuments() + "\n");
sb.append("Cluster Quality: " + this.getQuality() + "\n");
sb.append("Cluster Sparsity: " + this.getSparsity() + "\n");
return sb.toString();
}
COM: <s> returns a textual description of the state of this object </s>
|
funcom_train/892002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getKey(Table table, HttpServletRequest request) {
String refSource = ParseUtil.getParameter(request, "source");
if (Util.isNull(refSource))
refSource = request.getRequestURI();
refSource = refSource + "?" + table.getName();
return refSource;
}
COM: <s> get the key string used to retrieve the data source object from the </s>
|
funcom_train/35848473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemovedClass() {
Model.getPump().addClassModelEventListener(listener,
elem.getClass(),
new String[] {
"remove",
});
Model.getUmlFactory().delete(elem);
Model.getPump().flushModelEvents();
assertTrue(eventcalled);
}
COM: <s> tests whether a listener that is registered for a remove event on the </s>
|
funcom_train/18729368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vertex project(Vertex vector) {
double t = a * vector.getX() + b * vector.getY() + c * vector.getZ();
t = t / (a * a + b * b + c * c);
Vertex n = new Vertex(t * a, t * b, t * c);
return vector.minus(n);
}
COM: <s> project a vector into this plane </s>
|
funcom_train/19457459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateAndDeleteDos33() throws IOException {
ByteArrayImageLayout imageLayout = new ByteArrayImageLayout(Disk.APPLE_140KB_DISK);
ImageOrder imageOrder = new DosOrder(imageLayout);
FormattedDisk[] disks = DosFormatDisk.create(
"createanddelete-test-dos33.dsk", imageOrder); //$NON-NLS-1$
createAndDeleteFiles(disks, "B"); //$NON-NLS-1$
saveDisks(disks);
}
COM: <s> test creating and deleting many files on a dos 3 </s>
|
funcom_train/9296070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Seat giveWinnerSideCards(Seat winner) {
PrefTradeStepInfo stInfo = new PrefTradeStepInfo(
PrefTradeStep.GIVE_SIDE_CARDS);
// add 2 cards
winner.addCard(sideCards.getFirst());
winner.addCard(sideCards.getSecond());
// do anything it wants. Analyze, decide, ...
winner.tradeStep(this, stInfo);
return winner;
}
COM: <s> give winner side cards prikup </s>
|
funcom_train/3875560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isValid(String wholeString) {
boolean found = false;
List lines = logic.getLines();
for (int i = 0; i < lines.size() && !found; ++i) {
String line = (String) lines.get(i);
found = wholeString.equals(line);
}
return found;
}
COM: <s> validates a given string with the completion list </s>
|
funcom_train/16476116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireProjectContentChangedEvent(BenchmarkProject e) {
// System.out.println("Fire ProjectNameChangedEvent: " + e.toString()); // DEBUG
final BenchmarkProjectEvent event = new BenchmarkProjectEvent(e);
fireEvent(
new EventHandler<BenchmarkProjectEvent>(event) {
@Override
protected void dispatch(ProjectEventListener listener, BenchmarkProjectEvent event)
{
listener.projectContentChanged(event);
}
});
}
COM: <s> fire an event to note that the given projects contents </s>
|
funcom_train/32762885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RemoteLogging findLogger( final String groupID, final int maxAttempts ) {
final Collection<RemoteLogging> remoteServices = getRemoteServices();
for ( final RemoteLogging service : remoteServices ) {
try {
if ( service.hasLoggerSession( groupID ) ) {
return service;
}
}
catch ( Exception exception ) {}
}
if ( maxAttempts > 0 ) {
try {
Thread.sleep( 1000 );
return findLogger( groupID, maxAttempts - 1 );
}
catch( Exception exception ) { return null; }
}
else {
return null;
}
}
COM: <s> find the first logger which is accessible and can log the specified group </s>
|
funcom_train/41266385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Linea entity) {
EntityManagerHelper.log("saving Linea instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved linea entity </s>
|
funcom_train/8492957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLoop(IPlain2D plain) {
int xstart = (int) plain.getX() / widthQuad;
int ystart = (int) plain.getY() / heightQuad;
if (!fullMemory) {
if (loopGrid[xstart][ystart] == null)
loopGrid[xstart][ystart] = new QuadLoopList();
}
loopGrid[xstart][ystart].add((IPureLoopable)plain);
}
COM: <s> adds a loopable object to the quad </s>
|
funcom_train/50183761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String propertyName(IDataRefOrDecl anAttrOrElem) {
String res = anAttrOrElem.getLocalStringBindingAttribute(IBindingAttributes.NAME);
if (null == res) {
res = StringUtil.firstUpper(anAttrOrElem.getName());
}
return StringUtil.firstUpper(StringUtil.toJavaIdentifier(res));
}
COM: <s> gets the property name of the decl </s>
|
funcom_train/18247767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateExhaustively() throws DataStoreException{
try {
this.validateExhaustivelyWorker(this.getStartConstraint(), this.getEndConstraint());
}
catch (SeqdataException sx) {
Log.log(Log.ERROR, new Throwable(), sx,
ResourceUtil.getMessage(TDBAssembly.class, "caught_seqdata_exception"));
String message = ResourceUtil.getResource(TDBAssembly.class, "text.caught_seqdata_exception",
sx.getMessage());
throw new DataStoreException(message);
}
}
COM: <s> validate ourself exhaustively over our constrained range the </s>
|
funcom_train/2386511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showAlbumOfType(String type){
try{
update(albumManager.findAlbumsOfType(type));
}catch(PhotoAlbumException pae){
JOptionPane.showMessageDialog(this, pae.getMessage(), "Warning", JOptionPane.WARNING_MESSAGE);
}
}
COM: <s> show albums with a specific type </s>
|
funcom_train/12643669 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fillArc(int x, int y, int w, int h, int startAngle, int endAngle) {
pFillArc(psd, x + originX, y + originY, w, h, startAngle, endAngle);
}
COM: <s> fills an arc </s>
|
funcom_train/41965326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectionInterval(int index0, int index1) {
mAnchorIndex = index0;
mLeadIndex = index1;
int[] indices = order(index0, index1);
index0 = indices[0];
index1 = indices[1];
if (0 <= index0) {
updateTransientSelection(index0, index1);
}
}
COM: <s> changes the selection to be between </s>
|
funcom_train/3025156 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mousePressed(MouseEvent evt) {
TreePath path = getTree().getClosestPathForLocation(evt.getX(), evt.getY());
currentNode = path.getLastPathComponent();
System.out.println("Hit: " + currentNode.toString() +
" is a " + currentNode.getClass().getName());
}
COM: <s> the mouse was pressed </s>
|
funcom_train/15400450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent evt) {
if (evt.getPropertyName().equals(imageviewer.model.ImageToolModel.PROP_ACTIVE_TOOL)) {
// Set the cursor to be consistent with the active tool.
updateCursor();
// Clear the bordered status of the cluster.
setBorderHighlight(false);
}
}
COM: <s> notifies changes in properties of the selected tool </s>
|
funcom_train/45623340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPublishFilesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ResolveManifestFilesType_publishFiles_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ResolveManifestFilesType_publishFiles_feature", "_UI_ResolveManifestFilesType_type"),
MSBPackage.eINSTANCE.getResolveManifestFilesType_PublishFiles(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the publish files feature </s>
|
funcom_train/31976654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int AUTH(CommandEvent event, String urlstr, String user, String password) throws Exception{
URL url = new URL(urlstr);
HttpURLConnection huc = (HttpURLConnection) url.openConnection();
String encoded = Base64.encode(user+":"+password);
huc.setRequestProperty("Authorization","Basic "+encoded);
int response = 401;
try{
response = huc.getResponseCode();
}catch(Exception e) { }
event.instance.nv.put("AUTH_RESPONSE",""+response);
huc.disconnect();
if (response == 401) return 0;
event.instance.nv.putValue("ENV:REMOTE_USER",user);
return 1;
}
COM: <s> encodes the user and password and authenticates against the url provided </s>
|
funcom_train/36242302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFactory(TerminalFactory factory, boolean isPolling) {
FactoryPoller poller = factories.get(factory);
if (poller == null) {
poller = new FactoryPoller(factory, this);
factories.put(factory, poller);
}
if (isPolling && !isPolling(factory)) {
startPolling(factory);
}
if (!isPolling && isPolling(factory)) {
stopPolling(factory);
}
}
COM: <s> adds a factory </s>
|
funcom_train/35715825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addListeners() {
StyledText text= fTextViewer.getTextWidget();
if (text != null) {
fKeyAndMouseListener= new KeyAndMouseListener();
text.addMouseListener(fKeyAndMouseListener);
text.addKeyListener(fKeyAndMouseListener);
fTextInputListener= new TextInputListener();
fTextViewer.addTextInputListener(fTextInputListener);
}
}
COM: <s> registers all necessary listeners with the text viewer </s>
|
funcom_train/9760408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RGB interpolate(RGB fg, RGB bg, double scale) {
return new RGB(
(int) ((1.0-scale) * fg.red + scale * bg.red),
(int) ((1.0-scale) * fg.green + scale * bg.green),
(int) ((1.0-scale) * fg.blue + scale * bg.blue)
);
}
COM: <s> returns a specification of a color that lies between the given </s>
|
funcom_train/23280931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WorkflowProcess getWorkflowById(String id) {
for (WorkflowProcess workflow : getUnmarshaller().getPackage().getWorkflowProcesses().getWorkflowProcess())
if(workflow.getId().equals(id))return workflow;
throw new WorkflowDoesntExistException("Workflow with id '" + id + "' does not exist");
}
COM: <s> returns the workflow with the given id </s>
|
funcom_train/17201308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resizeCounters(int countersNeeded) {
// Confirm that counters have been initialized (using initializeCounters(int))
if (VM.VerifyAssertions) {
VM._assert(handle != -1);
}
counterManager.resizeCounterSpace(this.getHandle(), countersNeeded);
numCounters = countersNeeded;
}
COM: <s> used to reset the number of counters for this data </s>
|
funcom_train/7644315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear(int pos) {
if (pos >= 0) {
if (pos < bits.length * ELM_SIZE) {
bits[pos / ELM_SIZE] &= ~(1L << (pos % ELM_SIZE));
} else {
growBits(pos); // Bit is cleared for free if we have to grow
}
} else {
throw new IndexOutOfBoundsException("Negative index specified");
}
}
COM: <s> clears the bit at index pos </s>
|
funcom_train/37607106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void adjustmentValueChanged(AdjustmentEvent adj) {
newclr = new Color(redSlider.getValue(),
greenSlider.getValue(),
blueSlider.getValue(),
alpha);
if (alpha > 0) {
okb.setBackground(newclr);
if (newclr.getGreen() < 128)
okb.setForeground(Color.white);
else
okb.setForeground(Color.black);
bkgc.setBackground(Color.lightGray);
bkgc.setForeground(Color.black);
} else {
okb.setBackground(Color.black); // color of invisible
okb.setForeground(Color.white);
bkgc.setBackground(Color.black);
bkgc.setForeground(Color.white);
}
}
COM: <s> changes the color of the ok button when a slider is moved </s>
|
funcom_train/39314739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPreviousImage() {
System.out.println("testPreviousImage");
boolean expected1 = false;
boolean expected2 = true;
boolean actual1 = slide.previousImage();
boolean actual2 = slide.previousImage();
assertEquals(expected1,actual1);
assertEquals(expected2,actual2);
System.out.println("Done testPreviousImage");
}
COM: <s> test of previous image method of class slide show </s>
|
funcom_train/42188596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getJRadioButton1() {
if (jRadioButton1 == null) {
jRadioButton1 = new JRadioButton();
jRadioButton1.setText("Aditivo");
jRadioButton1.setSelected(true);
jRadioButton1.setVisible(false);
jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
jRadioButton11.setSelected(false);
jPanel5.setVisible(false);
jPanel51.setVisible(true);
}
});
}
return jRadioButton1;
}
COM: <s> this method initializes j radio button1 </s>
|
funcom_train/47891946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitLocalVariableDecl(LocalVariableDecl lvd) {
super.visitLocalVariableDecl(lvd);
// get the variable type
TypeDecl type = lvd.getType();
if (type instanceof UserType) {
links = links + localVariableWeight;
if (type.getSource() == null) {
if (!counted.contains(type.getSimpleName())) {
componentCount++;
counted.add(type.getSimpleName());
}
}
}
}
COM: <s> visit local variable decl </s>
|
funcom_train/44811478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initConfigObjectName(IObjectConfig objectConfig) {
if (objectConfig == null) {
return;
}
// DISABLE 2010-04-28
/*
String name = objectConfig.getName();
if (!isEmpty(name)) {
return;
}
if (!isEmpty(objectConfig.getCode())) {
objectConfig.setName(objectConfig.getCode());
return;
}
if (!isEmpty(objectConfig.getId())) {
objectConfig.setName(objectConfig.getId());
return;
}
*/
}
COM: <s> the special initialize config object name </s>
|
funcom_train/14421692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws TimeoutException {
notify(SWT.Close);
asyncExec(new VoidResult() {
public void run() {
getShell().close();
}
});
new SWTBot().waitUntil(new DefaultCondition() {
public boolean test() throws Exception {
return !isOpen();
}
public String getFailureMessage() {
return "Timed out waiting for " + SWTUtils.toString(widget) + " to close.";
}
});
}
COM: <s> closes the shell </s>
|
funcom_train/26098273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnEvaluate() {
if (btnEvaluate == null) {
btnEvaluate = new JButton();
btnEvaluate.setText("Evaluate");
btnEvaluate.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
beanShellEval(getBeanShellPanel().getTxtEditor().getText());
}
});
}
return btnEvaluate;
}
COM: <s> this method initializes j button </s>
|
funcom_train/21110589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Color getTextForeground(boolean isSelected) {
Color c =
UIManager.getColor(
isSelected
? "InternalFrame.activeTitleForeground"
: "InternalFrame.inactiveTitleForeground");
if (c != null) {
return c;
}
return UIManager.getColor(
isSelected
? "InternalFrame.activeTitleForeground"
: "Label.foreground");
}
COM: <s> determines and answers the headers text foreground color </s>
|
funcom_train/1917461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int readSize(ByteBuffer bb, int version) {
int value = 0;
if (version == Id3v2Tag.ID3V24) {
value = readSyncsafeInteger(bb);
} else {
if (version == Id3v2Tag.ID3V23)
value += (bb.get() & 0xFF) << 24;
value += (bb.get() & 0xFF) << 16;
value += (bb.get() & 0xFF) << 8;
value += (bb.get() & 0xFF);
}
return value;
}
COM: <s> this mehtod reads the data of an integer out of the given buffer </s>
|
funcom_train/40684502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testASimpleColumnChart() {
loadApi(new Runnable() {
public void run() {
DataTable data = createDailyActivities();
// Create a minimal column chart.
Options options = Options.create();
options.setWidth(400);
options.setHeight(240);
RootPanel.get().add(new ColumnChart(data, options));
}
});
}
COM: <s> this test case will try creating a simple column chart </s>
|
funcom_train/27753432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openFiles(String path, String[] fileNames) {
for (int i = 0; i < fileNames.length; i++) {
File file = new File(fileNames[i]);
if (!file.isAbsolute()) {
file = new File(path, fileNames[i]);
}
openFile(file);
}
}
COM: <s> opens the specified array of files </s>
|
funcom_train/9563977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String get(final String aKey) {
String tmpMessage = null;
try {
tmpMessage = bundle.getString(aKey);
} catch (MissingResourceException e) {
LOGGER.warn("Missing resource " + aKey, e);
}
if (tmpMessage == null) {
tmpMessage = aKey;
} else {
tmpMessage = tmpMessage.replaceAll("&([^&])", "$1");
}
return tmpMessage;
}
COM: <s> returns message for given key from active resource bundle </s>
|
funcom_train/3762337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(String key) {
if (key == null) {
String message = "null-key not allowed";
throw new NullPointerException(message);
}
String str = null;
try {
str = bundle.getString(key);
} catch (MissingResourceException mre) {
str = "Cannot find message associated with key '" + key + "'";
}
return str;
}
COM: <s> get a string for a key </s>
|
funcom_train/48190239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(PosFailMsg entity) {
LogUtil.log("saving PosFailMsg instance", Level.INFO, null);
try {
entityManager.persist(entity);
LogUtil.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved pos fail msg entity </s>
|
funcom_train/3363738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object configureValue(Object value) {
if (value instanceof Integer) {
value = new Font(DefaultMetalTheme.getDefaultFontName(type),
DefaultMetalTheme.getDefaultFontStyle(type),
((Integer)value).intValue());
}
return super.configureValue(value);
}
COM: <s> overriden to create a font with the size coming from the desktop </s>
|
funcom_train/3813256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetTotals() {
totalSentences = 0;
totalSentencesWithErrors = 0;
totalSentencesWithSubtitutions = 0;
totalSentencesWithInsertions = 0;
totalSentencesWithDeletions = 0;
totalReferenceWords = 0;
totalHypothesisWords = 0;
totalAlignedWords = 0;
totalWordsCorrect = 0;
totalSubstitutions = 0;
totalInsertions = 0;
totalDeletions = 0;
}
COM: <s> reset the total insertions deletions and substitutions counts for this class </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.