__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/51581582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Javelin create(IODriverConnectionRequest connectionRequest, boolean autoConnect) throws JavelinException {
assert (_registry != null);
IODriverFactory ioDriverFactory = new IODriverFactory();
ioDriverFactory.setRegistry(_registry);
IODriver driver = ioDriverFactory.createDriver(connectionRequest);
JavelinJvm jvm = new JavelinJvm(driver);
Javelin javelin = new Javelin(jvm, driver, autoConnect);
return javelin;
}
COM: <s> creates the javelin </s>
|
funcom_train/46378603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEnteredConeOfSilence(PresenceInfo info, boolean inConeOfSilence) {
info.setInConeOfSilence(inConeOfSilence);
fireAvatarNameEvent(info, inConeOfSilence?EventType.ENTERED_CONE_OF_SILENCE:EventType.EXITED_CONE_OF_SILENCE);
notifyListeners(info, ChangeType.UPDATED);
}
COM: <s> set entered cone of silence flag </s>
|
funcom_train/19673602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public UsersDB getDefaultInstance(String root_path) throws DatabaseException {
try {
File rp = new File(root_path);
if(!rp.exists())
rp.mkdirs();
return new XMLUsersFile(root_path + File.separator + "users.xml");
} catch (Exception ex) {
throw new DatabaseException(ex.getMessage());
}
}
COM: <s> returns a default instance of an xmlusers file object </s>
|
funcom_train/5322491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void learn(double difficulty, double rating) {
double p = combinedProficiency();
// Adjusted teacher success rating.
double r = Math.max(Math.min(rating, 1.2 * difficulty), 0.5);
// The difference in difficulty levels.
double dd = Math.abs(p-difficulty);
// The unadjusted number of theoretical proficiency points to add.
double l = (1/dd) * (practicalProficiency / p) * r;
theoreticalProficiency += l / 1000;
}
COM: <s> gain theoretical knowledge of the skill </s>
|
funcom_train/45009268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCacheDir() {
// if (cacheDir == null) {
// first access. Check if need to create directory.
cacheDir = "data/servers/" + Config.getParam("SERVERIP") + "." + Config.getParam("SERVERPORT");
File dir = new File(cacheDir);
if (!dir.exists()) {
dir.mkdirs();
}
// }
return cacheDir;
}
COM: <s> return the directory where all cache files can go into </s>
|
funcom_train/18551451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setUpProjectWizardDialog() {
this.setSize(400, 500);
this.setTitle("New Project");
// Center the Dialog on the Screen
centerDialog();
// Set up the Action Listeners - for when the button is pressed
gProjectWizardDialogButtonHandler = new ProjectWizardDialogButtonHandler();
// Add the Components
setUpandAddComponents();
this.setModal(true);
this.setResizable(false);
this.setVisible(true);
}
COM: <s> sets up this dialog </s>
|
funcom_train/27899598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Hashtable getData(Connection conn, List idlist) throws Aborted {
if ( idlist.size() <= 0 ) {
return new Hashtable();
}
if ( !gotTemplate ) {
lookupTemplate(conn);
}
initHash(idlist.iterator());
processQueries(conn, idlist);
return objData;
}
COM: <s> for a particular list of objects look up their </s>
|
funcom_train/28127659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object o1, Object o2) {
if ((o1 instanceof SystemProperty) && (o2 instanceof SystemProperty)) {
SystemProperty sp1 = (SystemProperty)o1;
SystemProperty sp2 = (SystemProperty)o2;
if (ascending) return sp1.getName().compareTo(sp2.getName());
else return sp2.getName().compareTo(sp1.getName());
}
else return 0;
}
COM: <s> compares two objects </s>
|
funcom_train/49928949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isUserExist(String userName) throws Exception {
Connection con = null;
Statement stmt = null;
try {
String check_user_sql = "select 1 from user_info where user_name='"
+ userName + "'";
con = DBUtil.getConnection();
stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(check_user_sql);
if (rs.next()) {
return true;
}
} catch (SQLException e) {
throw e;
}
return false;
}
COM: <s> used to check if the new user name has existed </s>
|
funcom_train/21116872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetGun() {
System.out.println("setGun");
String gun = "";
Zaman instance = new Zaman();
instance.setGun(gun);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set gun method of class persistence </s>
|
funcom_train/17915146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serailize(Node node, Writer writer) throws IOException, SmooksException {
Serializer serializer;
if(node == null) {
throw new IllegalArgumentException("null 'doc' arg passed in method call.");
} else if(writer == null) {
throw new IllegalArgumentException("null 'writer' arg passed in method call.");
}
serializer = new Serializer(node, containerRequest);
try {
serializer.serailize(writer);
} catch (CDRArchiveEntryNotFoundException e) {
throw new SmooksException("Unable to serialize document.", e);
}
}
COM: <s> serialise the node to the supplied output writer instance </s>
|
funcom_train/1010031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCD(CCD cd) {
if (SubIndex >= SubCount) {
System.err.println("Out of Max CD Count !");
return;
}
cds[SubIndex] = cd;
if(cd!=null){
fixArea(cd.X1, cd.Y1, cd.X2, cd.Y2);
}
Frames[SubIndex] = new short[]{(short)SubIndex};
SubIndex++;
}
COM: <s> add a collision block part br 1 7 </s>
|
funcom_train/7508297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getScheme() {
String scheme = getHttpServletRequest().getScheme();
String clean = "";
try {
clean = ESAPI.validator().getValidInput("HTTP scheme: " + scheme, scheme, "HTTPScheme", 10, false);
} catch (ValidationException e) {
// already logged
}
return clean;
}
COM: <s> returns the scheme from the http servlet request after canonicalizing and </s>
|
funcom_train/22284481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperties(PropertyList list) {
super.setProperties(list);
menu = createWidgetMenu();
menu.setMenuContent(list.getString("items", ""));
popupDirection = list.getOption("popupDirection", popupDirectionOptions, DOWN);
popupAlignment = list.getOption("popupAlignment", popupAlignmentOptions, LEFT);
triangle.setDirection(popupDirection);
}
COM: <s> set the properties of this flat menu button which also </s>
|
funcom_train/12171173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MCSAttributes getCurrentAttributes(VolantisProtocol protocol) {
MCSAttributes parentAttributes = null;
Stack stack = getWidgetDefaultModule(protocol).getInnerAttributesStack();
if (stack.size() >= 1) {
parentAttributes = (MCSAttributes) stack.get(stack.size() - 1);
}
return parentAttributes;
}
COM: <s> returns attributes of the currently rendered widget or null if no widget </s>
|
funcom_train/46017257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue(Object value) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NullPointerException, ExceptionInInitializerError {
if (methodset == null) {
methodset = findMethod(getSetname());
}
if (methodset == null) {
throw new IllegalAccessException("Method \"" + getGetname() + "\" don't exist.");
} else {
methodset.invoke(getElement(), value);
}
}
COM: <s> sets the value of the element </s>
|
funcom_train/38514202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getJcboStationaryPhase() {
if (jcboStationaryPhase == null) {
jcboStationaryPhase = new JComboBox();
jcboStationaryPhase.addItem(new String("Agilent Zorbax SB-C8"));
jcboStationaryPhase.setSelectedIndex(0);
jcboStationaryPhase.setLocation(new Point(8, 26));
jcboStationaryPhase.setSize(new Dimension(233, 27));
}
return jcboStationaryPhase;
}
COM: <s> this method initializes jcbo stationary phase </s>
|
funcom_train/4256993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected float extractQuality(Series<Parameter> parameters) {
float result = 1F;
boolean found = false;
if (parameters != null) {
Parameter param = null;
for (Iterator<Parameter> iter = parameters.iterator(); !found
&& iter.hasNext();) {
param = iter.next();
if (param.getName().equals("q")) {
result = PreferenceUtils.parseQuality(param.getValue());
found = true;
// Remove the quality parameter as we will directly store it
// in the Preference object
iter.remove();
}
}
}
return result;
}
COM: <s> extract the quality value </s>
|
funcom_train/9727145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ensureCapacity(int capacity) {
int newlength = capacity;
if (capacity > limit)
newlength = limit;
float[] newArr = new float[newlength];
int copylen = arr.length < newArr.length ? arr.length : newArr.length;
System.arraycopy(arr, 0, newArr, 0, copylen);
arr = newArr;
}
COM: <s> ensure that the float list has the given capacity </s>
|
funcom_train/39386731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Method getMethod(String aMethodName, Class anArgType) {
log.debug("getMethod trying to get method: '" + aMethodName + "'");
Class[] args = new Class[] { anArgType };
try {
return this.getClass().getMethod(aMethodName, args);
} catch (NoSuchMethodException e) {
return null;
}
}
COM: <s> get the specified method which sets the type specified </s>
|
funcom_train/12176226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pushContainerInstance(ContainerInstance instance) {
if (containerInstanceStack == null) {
containerInstanceStack = new Stack();
}
containerInstanceStack.push(instance);
if (logger.isDebugEnabled()) {
logger.debug("CONTAINER INSTANCE STACK: Pushed " + instance);
}
pushOutputBuffer(instance.getCurrentBuffer());
}
COM: <s> push the specified container instance onto the top of the stack </s>
|
funcom_train/37185987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshMaterialTable() {
Vector materials = null;
try {
materials = this.parentWindow.acm.getAllMaterials();
}
catch (SQLException ex) {
ErrorDisplayDialog errorDialog = new ErrorDisplayDialog(null, "", ex);
ex.printStackTrace();
return;
}
if (materials != null) {
this.materialTable.setRows(materials);
}
}
COM: <s> fetches all materials anew from database </s>
|
funcom_train/31310503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object setValue( Object value, String fieldName, Object field ) {
Object key;
key = getSubMapperKey(value);
IoSCellEditorValueMapper mapper =
(CellEditorSubMapper) subMappers.get(key);
if (mapper == null)
throw new RuntimeException("No submapper for key = "+key+" !");
return mapper.setValue(value, fieldName, field);
}
COM: <s> dispatch set value call to sub mapper </s>
|
funcom_train/28423802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
// may need to do this differently for Ant 1.6, need to check when 1.6
// is final
getProject().addTaskDefinition( "else", ElseTask.class );
getProject().addTaskDefinition( "bool", BooleanConditionTask.class );
getProject().addTaskDefinition( "break", Break.class );
}
COM: <s> automatically define dependent tasks </s>
|
funcom_train/2501405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeValidate(FacesContext context, UIComponent component, Object componentValue) {
log.debug("Validating \"Titulo de Eleitor\"");
if (!TituloEleitor.validateTitulo((String) componentValue)) {
String[] params = {(String) componentValue};
FacesMessage message = createFacesMessage(params, TITULOELEITOR_SUMARY_KEY, TITULOELEITOR_DETAIL_KEY, DEFAULT_MESSAGE, context.getViewRoot().getLocale());
throw new ValidatorException(message);
}
}
COM: <s> execute the validation of titulo eleitor </s>
|
funcom_train/3164589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBracketContentPropertyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getString("_UI_BracketOperator_bracketContentProperty_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BracketOperator_bracketContentProperty_feature", "_UI_BracketOperator_type"),
GrammarPackage.eINSTANCE.getBracketOperator_BracketContentProperty(),
true));
}
COM: <s> this adds a property descriptor for the bracket content property feature </s>
|
funcom_train/51617408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ServiceType getServiceType() {
if( service == null ) return null;
if( service instanceof ConnectionOrientedUserService ) return ServiceType.CONNECTION_ORIENTED_WITH_USER;
if( service instanceof ConnectionOrientedService ) return ServiceType.CONNECTION_ORIENTED;
if( service instanceof Service ) return ServiceType.GENERIC;
return null; //should not get here
}
COM: <s> gets the service type </s>
|
funcom_train/17847982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChangeListener(ChangeListener listener) {
ChangeListener[] newArray = new ChangeListener[mChangeListenerArray.length+1];
System.arraycopy(mChangeListenerArray,0,newArray,0,mChangeListenerArray.length);
newArray[mChangeListenerArray.length] = listener;
mChangeListenerArray = newArray;
}
COM: <s> adds a change listener to this panel </s>
|
funcom_train/46740050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInsertDt(DateTimeModel insertDt) {
if (Converter.isDifferent(this.insertDt, insertDt)) {
DateTimeModel oldinsertDt= DateTimeModel.getNow();
oldinsertDt.copyAllFrom(this.insertDt);
this.insertDt.copyAllFrom(insertDt);
setModified("insertDt");
firePropertyChange(String.valueOf(SETTINGVALUES_INSERTDT), oldinsertDt, insertDt);
}
}
COM: <s> date the setting value was created </s>
|
funcom_train/3272896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
// Update the World
Fleet fleet = null;
// Enumerate through the Fleets in the World
// and update the state of each one.
for(Enumeration units = fleets.elements(); units.hasMoreElements();){
fleet = (Fleet) (units.nextElement());
// Update this Fleet
fleet.update();
}
// Update the visibility of the Objects in the World
updateVisibility();
}
COM: <s> update the world and all the objects and actions in it </s>
|
funcom_train/21109011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel additionalQueriesPanel(){
JPanel additionalQueriesPanel = new JPanel();
additionalQueriesPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
additionalQueriesPanel.add(IPAddressLookups());
additionalQueriesPanel.add(MiscellaneousQueries());
additionalQueriesPanel.setBackground(Color.WHITE);
return additionalQueriesPanel;
}
COM: <s> creates a sub panel containing two inner sub panels </s>
|
funcom_train/10628519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstrLong() {
long a = 4576578677732546982L;
String res = "4576578677732546982";
int resScale = 0;
BigDecimal result = new BigDecimal(a);
assertEquals("incorrect value", res, result.unscaledValue().toString());
assertEquals("incorrect scale", resScale, result.scale());
}
COM: <s> new big decimal long value </s>
|
funcom_train/3081409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean renderUpdate(RenderContext rc, ServerComponentUpdate update, String targetId) {
boolean fullReplace = false;
if (update.hasUpdatedProperties()) {
if (partialUpdateManager.canProcess(rc, update)) {
partialUpdateManager.process(rc, update);
} else {
fullReplace = true;
}
}
return renderUpdateBaseImpl(rc, update, targetId, fullReplace);
}
COM: <s> this method ends up calling </s>
|
funcom_train/22579446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setName(KnownDevice dev) {
String sqlString = null;
sqlString = new String ("UPDATE "+D_TBL_NAME
+ " SET name=\""+dev.getSysName()+"\""
+ " WHERE deviceID="+dev.getDeviceID());
System.out.println("\nDbKnownDevice.setName:\n sqlString = "+sqlString);
return executeUpdate(sqlString);
}
COM: <s> update the device table record with a new name </s>
|
funcom_train/5375960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFont (Font font) {
if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
/*
if (font == null) {
OS.SelectObject(handle, data.device.systemFont);
} else {
if (font.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
OS.SelectObject(handle, font.handle);
}
*/
if (font == null) {
font = Display.getDefault().getSystemFont();
} else {
if (font.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
this.font = font;
}
}
COM: <s> sets the font which will be used by the receiver </s>
|
funcom_train/49213349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("TodoListsWebService".equals(portName)) {
setTodoListsWebServiceEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/44018876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RobotSelectionPanel getRobotSelectionPanel() {
if (robotSelectionPanel == null) {
robotSelectionPanel = new RobotSelectionPanel(repositoryManager, minRobots, maxRobots, false,
"Select the robot or team you would like to package.", /* true */false, false, false/* true */, true,
false, true, null);
}
return robotSelectionPanel;
}
COM: <s> return the page property value </s>
|
funcom_train/5073024 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printCloseTag(int level, String tag, boolean appendNewline) {
if (appendNewline && !compress) {
println(level, "</"+tagPrefix+":"+replaceCharsInTag(tag)+">");
}
else {
print(level, "</"+tagPrefix+":"+replaceCharsInTag(tag)+">");
}
}
COM: <s> prints a close tag at the given indentation level and </s>
|
funcom_train/49863818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
synchronized (this) {
if (processor != null) {
try {
processor.stop();
processor.close();
processor = null;
rtptransmitter.stop();
rtptransmitter.close();
rtptransmitter = null;
} catch (IOException ex) {
Logger.getLogger(VideoTransmiter.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
}
COM: <s> stops the transmission if already started </s>
|
funcom_train/11103490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSortBy() {
StringBuffer tmp = new StringBuffer();
if (sortBy != null) {
Iterator li = sortBy.iterator();
while (li.hasNext()) {
if (tmp.length() > 0) {
tmp.append(", ");
}
tmp.append(li.next());
}
}
return tmp.toString();
}
COM: <s> p returns a comma delimited list of property names used to compare </s>
|
funcom_train/10954233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String determineNamespace(String namespace, ValueStack stack, HttpServletRequest req) {
String result;
if (namespace == null) {
result = TagUtils.buildNamespace(actionMapper, stack, req);
} else {
result = findString(namespace);
}
if (result == null) {
result = "";
}
return result;
}
COM: <s> determines the namespace of the current page being renderdd </s>
|
funcom_train/48406936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTaskPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TaskUse_task_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TaskUse_task_feature", "_UI_TaskUse_type"),
SpemxtcompletePackage.eINSTANCE.getTaskUse_Task(),
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the task feature </s>
|
funcom_train/3407309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SchemaImpl createSchema(String targetNamespace, Locator location) {
SchemaImpl obj = (SchemaImpl)schemas.get(targetNamespace);
if (obj == null) {
obj = new SchemaImpl(this, location, targetNamespace);
schemas.put(targetNamespace, obj);
schemas2.add(obj);
}
return obj;
}
COM: <s> gets a reference to the existing schema or creates a new one </s>
|
funcom_train/20748091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIndexOf() {
System.out.println("indexOf");
List<ISIMetaData> instance = jaseSearchable.search("document");
assertEquals(1, instance.indexOf(instance.get(1)));
assertEquals(-1, instance.indexOf("hello"));
}
COM: <s> test of index of method of class org </s>
|
funcom_train/32068480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addEmailMessages(Collection<EmailMessage> emailMessages) {
boolean addOk = getEmailMessages().addAll(emailMessages);
if (addOk) {
for(EmailMessage emailMessage : emailMessages) {
emailMessage.setMailbox((Mailbox)this);
}
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed email messages collection to the mailbox collection </s>
|
funcom_train/21157494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void print(String s) {
if (s == null) {
print("null");
return;
}
if (binDataWritten)
throw new IllegalStateException("Cannot print() after binary data has been written");
if (osw == null)
try {
osw = new OutputStreamWriter(stream, encoding);
} catch (UnsupportedEncodingException e) {
throw new IllegalArgumentException("The specified encoding '" + encoding + "' is not defined");
}
try {
osw.write(s);
} catch (IOException e) {
throw new JSSPException("Error printing output: " + e.getMessage());
}
}
COM: <s> prints a string to the output </s>
|
funcom_train/3772032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recycle() {
path = "/";
statusCode = HttpException.METHOD_NOT_PROCESSED;
statusText = "Method Not Processed";
requestHeaders.clear();
responseHeaders.clear();
parameters.clear();
state = null;
used = false;
query = null;
queryString = null;
followRedirects = false;
}
COM: <s> recycle the method object so that it can be reused again </s>
|
funcom_train/21954815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdownManager() {
VariableBundle resources = Pooka.getResources();
List profiles = getUserProfileList();
for (int i = 0; i < profiles.size(); i++) {
UserProfile up = (UserProfile) profiles.get(i);
resources.removeValueChangeListener(up);
}
resources.removeValueChangeListener(manager);
}
COM: <s> removes all user profiles from this manager </s>
|
funcom_train/7661179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTimedInvokeAny1() {
ExecutorService e = new ScheduledThreadPoolExecutor(2);
try {
e.invokeAny(null, MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS);
} catch (NullPointerException success) {
} catch(Exception ex) {
unexpectedException();
} finally {
joinPool(e);
}
}
COM: <s> timed invoke any null throws npe </s>
|
funcom_train/6518990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SurveyLineModel parseLine(int nextLine){
// SurveyStationModel startStation = caveModel.getStation(caveFileModel.getField(nextLine,0));
// surveyLine = new SurveyLineModel();
// if (startStation!=null) surveyLine.setFromStation(startStation);
// else surveyLine.setFromStation(parseStation(nextLine));
// parseLine(nextLine+1);
// surveyLine.setToStation(parseStation(nextLine+2));
// return surveyLine;
return null;
}
COM: <s> parses a survey line into a survey line model </s>
|
funcom_train/49822398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEqual(Prolog mediator, Term t) {
t = t.getTerm();
if (t instanceof Struct) {
Struct ts = (Struct) t;
if (arity == ts.arity && name.equals(ts.name)) {
for (int c = 0;c < arity;c++) {
if (!arg[c].isEqual(mediator, ts.arg[c])) {
return false;
}
}
return true;
} else {
return false;
}
} else {
return false;
}
}
COM: <s> test if a term is equal to other </s>
|
funcom_train/5525200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String expand (String s)
{ try
{ StringBuffer B=new StringBuffer();
StringTokenizer T=new StringTokenizer(s,"\\()",true);
while (T.hasMoreTokens())
{ String a=T.nextToken();
if (a.equals("("))
{ String b=T.nextToken();
String c=T.nextToken();
if (!c.equals(")")) return null;
PositionRange p=
(PositionRange)E.elementAt(Integer.parseInt(b));
B.append(new String(A,p.start(),p.end()-p.start()));
}
else if (a.equals("\\"))
{ a=T.nextToken();
B.append(a);
}
else B.append(a);
}
return B.toString();
}
catch (Exception e)
{ return null;
}
}
COM: <s> expand the replacement string and change 1 2 </s>
|
funcom_train/18003506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printWeights(Synapse s){
Matrix m = s.getWeights();
double [][] values= m.getValue();
for(int i=0; i<m.getM_rows(); i++){
for(int j=0; j<m.getM_cols();j++){
System.out.println("Weight("+i+","+j+")= "+values[i][j]);
}
}
}
COM: <s> prints the weights of a certain synapse to screen for debugging </s>
|
funcom_train/947899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int totalProjs(String pRuleFile){
int lTotal=0;
try{
Document lNewDoc= domBuilder.parse (pRuleFile);
NodeList lProjTags=lNewDoc.getElementsByTagName("project");
lTotal=lProjTags.getLength();
}
catch(Exception e){
System.err.println("Exception in ProjFile::totalProjs!"+e.getMessage());
e.printStackTrace();
}
return lTotal;
}
COM: <s> description fecthes total projects bid from the xml file </s>
|
funcom_train/11741993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean attachToRuntimeIfNeeded() {
if (channel != null) {
return false;
}
Injector injector = CayenneRuntime.getThreadInjector();
if (injector == null) {
throw new CayenneRuntimeException("Can't attach to Cayenne runtime. "
+ "Null injector returned from CayenneRuntime.getThreadInjector()");
}
attachToRuntime(injector);
return true;
}
COM: <s> checks whether this context is attached to cayenne runtime stack and if not </s>
|
funcom_train/34805042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
mLabelToUElem.clear();
mLabelToLazyDOM.clear();
//mTransientDocControlList.clear();
mTransientLabelSet.clear();
mXPathUsageCount++;
mMergeDOM = null;
mMergeKey = null;
mMergeDOMInsertionRefs.clear();
}
COM: <s> reset dom context clears all dom pointer </s>
|
funcom_train/46825350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update (int resultType, int newRating) {
// Update wins/losses/draws depending on result type.
switch (resultType) {
case IGameOver.WIN:
wins++;
streak = streak > 0 ? streak + 1 : 1;
break;
case IGameOver.LOSE:
loses++;
streak = streak < 0 ? streak - 1 : -1;
break;
case IGameOver.DRAW:
draws++;
streak = 0;
break;
}
// Update rating
this.rating = newRating;
// Update observers
setChanged ();
notifyObservers ();
}
COM: <s> update a user depending on a result type and their new rating </s>
|
funcom_train/44686452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reLoadImageButKeepImageForDisplay(){
WorkbenchContext context = this.getWorkbenchContext();
PlanarImage pi = this.getImageForDisplay();
//[sstein 24.Sept.2010] commented out:
//PlanarImage dontNeedThisImage = RasterImageLayer.loadImage( context, imageFileName); //causes error for .clone()
this.setImage(pi);
}
COM: <s> use this to assign the raster data again </s>
|
funcom_train/25639441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Content getNavLinkIndex() {
Content linkContent = getHyperLink(relativePath +(configuration.splitindex?
DirectoryManager.getPath("index-files") + fileseparator: "") +
(configuration.splitindex?"index-1.html" : "index-all.html"), "",
indexLabel, "", "");
Content li = HtmlTree.LI(linkContent);
return li;
}
COM: <s> get link for generated class index </s>
|
funcom_train/44869730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WCMDrawGeometricBean getFOfBLine() {
if (fOfBLine == null) {
fOfBLine = new WCMDrawGeometricBean();
fOfBLine.setY1(getFOfB());
fOfBLine.setX2(getBInput());
fOfBLine.setY2(getFOfB());
if (presentation) {
fOfBLine.setLineWidth(3);
}
}
return fOfBLine;
}
COM: <s> this method initializes f of bline </s>
|
funcom_train/39456912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object unmarshalArrayFromElement(Element element, Class clazz, Map unmarshalContext) throws Exception {
List subElements = element.elements();
Object array = Array.newInstance(clazz.getComponentType(), subElements.size());
for (int i = 0; i < subElements.size(); i++) {
Element subElement = (Element) subElements.get(i);
Object value = unmarshalFromElement(subElement, null, unmarshalContext);
Array.set(array, i, value);
}
return array;
}
COM: <s> creates an array of the correct type and loads it full of values </s>
|
funcom_train/8067328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadClasses(){
int numClasses = parser.getClassNodes().size();
FigViewParameter param;
for (int i=0; i<numClasses; i++){
param = parser.getClassNodes().get(i);
System.out.println("Valor de la propiedad de objetos " + param);
//create the OWL Entitiy
OWLClass c = ExampleViewComponent.manager.getOWLClass(param.getOWLEntityName());
//add the pair to the hashtable
classes.put(c, param);
}
}
COM: <s> load the classes declared in the view file </s>
|
funcom_train/11345080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class defineClass(String name, byte[] clazz, ProtectionDomain domain) {
if (m_definedClasses.containsKey(name)) { return (Class) m_definedClasses.get(name); }
Class clas = super.defineClass(name, clazz, 0, clazz.length, domain);
m_definedClasses.put(name, clas);
return clas;
}
COM: <s> the define class method </s>
|
funcom_train/51267937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Calendar createCalendar() {
int tz = (hasTimezone() ? tzMinutes * 60000 : 0);
Calendar calendar = getNewCalendar(tz);
int yr = year;
// if (year <= 0) {
// yr = 1 - year;
// calendar.set(Calendar.ERA, GregorianCalendar.BC);
// }
calendar.set(yr, month - 1, day, hour, minute, second);
calendar.set(Calendar.MILLISECOND, microsecond / 1000); // /1000 loses
// precision
// unavoidably
return calendar;
}
COM: <s> create a calendar object representing the value of this date time </s>
|
funcom_train/43827475 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addValuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GlobalReferenceDeclaration_value_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GlobalReferenceDeclaration_value_feature", "_UI_GlobalReferenceDeclaration_type"),
DeclarationPackage.Literals.GLOBAL_REFERENCE_DECLARATION__VALUE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the value feature </s>
|
funcom_train/34233220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printAll(){
Iterator<String[]> stateIter = state.iterator();
String[] stateArray;
System.out.println("==========================StateManager========================");
while(stateIter.hasNext()){
stateArray = stateIter.next();
for(int i = 0; i< stateArray.length; i++){
System.out.println(stateArray[i]);
}
}
}
COM: <s> print all entries currently in the statemanager </s>
|
funcom_train/29779719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConstraints(Component comp, Cell constraints) {
Cell cell = (Cell) constraints.clone();
// Lay out the component using the Strategy Pattern.
strategy.addComponent(comp, cell);
if (comp == null) {
logger.fatal("Cannot add to layout: cannot add null components!");
System.exit(TetrisLayout.FATAL_ERROR);
}
// Store the component.
constraintsMap.put(comp, cell);
}
COM: <s> set the specified component constraint object </s>
|
funcom_train/45248777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refresh() {
if (dialog == null) {
return;
}
if (dialogArea == null || dialogArea.isDisposed()) {
return;
}
updateTitleArea();
updateListArea();
updateEnablements();
// adjust width if necessary
Point currentSize = getShell().getSize();
Point desiredSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT);
if(currentSize.x < desiredSize.x){
getShell().setSize(desiredSize.x, currentSize.y);
} else {
getShell().layout();
}
}
COM: <s> method which should be invoked when new errors become available for </s>
|
funcom_train/31357345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private XMLObject getRequest(XMLObject command) {
XMLObject xml, xml2;
xml = XMLObject.create("CONTEXT");
xml.setProperty("NAME", "MAPLE");
xml2 = XMLObject.create("ACTION");
xml2.setProperty("NAME", "EVALUATE");
xml2.addChild(xml);
// add data elements
for (int i=0; i<command.getChildren().size(); i++) {
xml2.addChild(command.getChild(i));
}
XMLObject request = XMLObject.create("REQUEST");
request.setProperty("SERVICE", "MATH");
request.addChild(xml2);
return request;
}
COM: <s> creates a request containing the specified commands to send to pearl server </s>
|
funcom_train/51222924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void deleteColumn() {
ListSelectionModel selectionModel = this.columnTable.getSelectionModel();
if (!selectionModel.isSelectionEmpty()) {
int rowIndex = selectionModel.getMinSelectionIndex();
ITableColumn tableColumn = this.columnModel.getTableColumnAt(rowIndex);
this.columnModel.removeTableColumn(tableColumn);
selectionModel.setSelectionInterval(rowIndex, rowIndex);
this.indexModel.handleTableColumnRemoved(tableColumn);
handleIndexSelection();
}
}
COM: <s> delete the selected column </s>
|
funcom_train/43415037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean haveReadPermission(String chave_recurso) {
boolean havePermission = false;
for (int i = 0; i < getPermissoes().size(); i++) {
if (getPermissoes().get(i).getChaveRecurso().equals(chave_recurso)) {
if(getPermissoes().get(i).getReadfield() == 1){
havePermission = true;
}
}
}
return havePermission;
}
COM: <s> checks if current user has read permission of an interface area or widget </s>
|
funcom_train/45612102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStats(Vector<A> targets){
Vector<A> oldV=stats;
stats.clear();
int i;
for(ListIterator li=targets.listIterator(); li.hasNext();){
i=li.nextIndex();
A a=targets.elementAt(i);
stats.add(a);
}
}
COM: <s> clears stats vector and adds all members of the target array in </s>
|
funcom_train/23453064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHasInputPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Process_hasInput_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Process_hasInput_feature", "_UI_Process_type"),
ProcessPackage.Literals.PROCESS__HAS_INPUT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the has input feature </s>
|
funcom_train/3076262 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List getLoadElements() {
BufferedReader reader = new BufferedReader(new StringReader(viewCfgSpec.replace(';', '\n')));
List loadElements = new ArrayList();
try {
String line;
Pattern pattern = Pattern.compile("^\\s*load(.*)", Pattern.CASE_INSENSITIVE);
while ((line = reader.readLine()) != null) {
Matcher matcher = pattern.matcher(line);
if (matcher.find())
loadElements.add(matcher.group(1).trim());
}
} catch (IOException e) {
}
return loadElements;
}
COM: <s> get the elements configured for load in the view config spec </s>
|
funcom_train/18304862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendOpenInlinedQuoteTag(String style) {
StringBuffer sb = new StringBuffer("<q");
if (style != null) {
sb.append(" style=\"");
sb.append(style);
sb.append("\"");
}
sb.append(">");
text.append(sb.toString());
}
COM: <s> appends a tag that indicates that an inlined quote section begins </s>
|
funcom_train/46188421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getLastModified() {
Date date = new Date(0);
Iterator it = BlogManager.getInstance().getPublicBlogs().iterator();
Blog blog;
while (it.hasNext()) {
blog = (Blog)it.next();
if (blog.getLastModified().after(date)) {
date = blog.getLastModified();
}
}
return date;
}
COM: <s> gets the date that this blog was last updated </s>
|
funcom_train/14499921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printAuthorizedClients(WorkerConfig config) {
Iterator<AuthorizedClient> iter = new ProcessableConfig(config).getAuthorizedClients().iterator();
while (iter.hasNext()) {
AuthorizedClient client = (AuthorizedClient) iter.next();
this.getOutputStream().println(" " + client.getCertSN() + ", " + client.getIssuerDN() + "\n");
}
}
COM: <s> prints the list of authorized clients to the output stream </s>
|
funcom_train/18594178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration collectTests() {
String jcp = System.getProperty("java.class.path");
String classPath = loader instanceof URLClassLoader
? convertURLsToClasspath(((URLClassLoader)loader).getURLs())
: jcp;
Hashtable hash = collectFilesInPath(classPath);
if (loader instanceof URLClassLoader)
hash.putAll(collectFilesInPath(jcp));
return hash.elements();
}
COM: <s> override to use something other than java </s>
|
funcom_train/9546111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCountryFromGeoIP(String countryCode, String country) {
if (!countryLookup.containsKey(countryCode)) {
String[] names = new String[3];
names[0] = country;
if (pingErCountryRegions.containsKey(country)) {
names[1] = country;
names[2] = pingErCountryRegions.get(country);
}
countryLookup.put(countryCode, names);
}
}
COM: <s> adds geo ip country code and country name </s>
|
funcom_train/3416321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNextException(SQLException ex) {
SQLException current = this;
for(;;) {
SQLException next=current.next;
if (next != null) {
current = next;
continue;
}
if (nextUpdater.compareAndSet(current,null,ex)) {
return;
}
current=current.next;
}
}
COM: <s> adds an code sqlexception code object to the end of the chain </s>
|
funcom_train/869386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getSiblingOrder(Element current) {
Node previous = current.getPreviousSibling();
while (previous != null) {
if (previous.getNodeType() != Node.ELEMENT_NODE)
previous = previous.getPreviousSibling();
else break;
}
if (previous == null) return 1;
return getSiblingOrder((Element) previous) + 1;
}
COM: <s> determines the sibling order of </s>
|
funcom_train/23229644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readPassword(BufferedReader in) throws IOException {
System.out.print("Enter your password: ");
password = in.readLine();
while (password == null || password.equals("")) {
System.out.println("Please enter a valid password!");
System.out.print("Enter your password: ");
password = in.readLine().trim();
}
}
COM: <s> request and read the password through the cli </s>
|
funcom_train/4520028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateTimeScrollBar(int max, int pos, int secondsDisplayed) {
if (_orientation == Orientation.HORIZONTAL) {
_tbvi.updateXScrollBar(max, pos, secondsDisplayed);
} else if (_orientation == Orientation.VERTICAL) {
_tbvi.updateYScrollBar(max, pos, secondsDisplayed);
}
}
COM: <s> diapatch updating of the time scrollbar according to orientation </s>
|
funcom_train/44216309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemovalDoesNotChangeIndex() throws Exception {
JFrame frame1 = new JFrame();
frame1.setVisible(true);
JFrame frame2 = new JFrame();
frame2.setVisible(true);
ww.waitTillWindowPresent(frame1);
ww.waitTillWindowPresent(frame2);
assertEquals(frame2, ww.getWindowByID(1));
frame1.dispose();
frame1 = null;
ww.waitTillWindowNotPresent(frame1);
assertEquals(frame2, ww.getWindowByID(1));
}
COM: <s> test not guaranteed </s>
|
funcom_train/41162866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoMultipleChoiceE2 entity) {
EntityManagerHelper.log("deleting CoMultipleChoiceE2 instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoMultipleChoiceE2.class, entity.getMultipleChoiceE2Id());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co multiple choice e2 entity </s>
|
funcom_train/17005563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element extractSOAPBody(Document document) throws Exception {
Element soapBody = null;
NodeList nodeList =
document.getElementsByTagNameNS
(SOAP_ENVELOPE_NAMESPACE_URI, "Body");
if ( nodeList.getLength() != 1 ) {
System.out.println("This is an error ");
return null;
}
soapBody = (Element) nodeList.item(0);
return soapBody;
}
COM: <s> this method extracts the soapbody from a document </s>
|
funcom_train/24217073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(String name) {
bs.deactivateSquares();
Piece p = Pieces.getPiece(name);
mp.setMoves(p.getMoveTypes());
mp.setJoker(p.isJoker());
mp.setRook(p.isRook());
mp.setPawn(p.isPawn());
mp.setKing(p.isKing());
isp.changeSelectedIcon(name);
changeIcon(PieceImages.getImage(name));
}
COM: <s> load a given piece in this panel </s>
|
funcom_train/48031292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void putObject(String key, NDbm2ObjectWriter wrt) throws NDbmException {
try {
NDbmByteArrayOutputStream pobj1_bout = new NDbmByteArrayOutputStream();
NDbmDataOutputStream pobj1_dout = new NDbmDataOutputStream(pobj1_bout);
super.writeObject(pobj1_dout, wrt);
writeBlob(new Blob(key, pobj1_bout.bytes(), pobj1_bout.size()));
} catch (NDbmException E) {
throw E;
} catch (Exception E) {
throw new NDbmException(E);
}
}
COM: <s> puts an object in ndbm under the given key recursable function </s>
|
funcom_train/32280116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNodeDescendant(DefaultMutableTreeNode node) {
// Variables
TreeNode current;
// Sanity Check
if (node == null) {
return false;
} // if
// Search For Descendant
current = node;
while (current != null && current != this) {
current = current.getParent();
} // while
// Check for Descendant
if (current == this) {
return true;
} // if
// Otherwise, no
return false;
} // isNodeDescendant()
COM: <s> is node descendant </s>
|
funcom_train/18093100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SignatureVisitor visitTypeArgument(final char tag) {
if (argumentStack % 2 == 0) {
++argumentStack;
declaration.append('<');
} else {
declaration.append(", ");
}
if (tag == SignatureVisitor.EXTENDS) {
declaration.append("? extends ");
} else if (tag == SignatureVisitor.SUPER) {
declaration.append("? super ");
}
startType();
return this;
}
COM: <s> visits a type argument of the last visited class or inner class type </s>
|
funcom_train/41163260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(ToGlossary entity) {
EntityManagerHelper.log("deleting ToGlossary instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(ToGlossary.class, entity.getGlossaryId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent to glossary entity </s>
|
funcom_train/8170478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireStateChanged() {
ChangeEvent event = new ChangeEvent(this);
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ChangeListener.class) {
((ChangeListener) listeners[i + 1]).stateChanged(event);
}
}
}
COM: <s> runs each code change listener code s code state changed code </s>
|
funcom_train/12160499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCopyAction(IAction action) {
if (copyAction == action) {
return;
}
if (copyAction != null) {
copyAction.removePropertyChangeListener(copyActionListener);
}
copyAction = action;
if (copyAction != null) {
copyAction.addPropertyChangeListener(copyActionListener);
}
copyActionHandler.updateEnabledState();
}
COM: <s> set the default code iaction code handler for the copy action </s>
|
funcom_train/442146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getScore(String str1, String str2) {
int score = 0;
for (int i = 0; i < str1.length(); i++) {
score += getMatchScore(basecode(str1.charAt(i)), basecode(str2.charAt(i)));
}
return score;
}
COM: <s> return the match score for two aligned sequences </s>
|
funcom_train/13496575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void release() throws IOException {
try {
for (final List<Object> values : parameters.values()) {
for (int i = 0; i < values.size(); i++) {
final Object obj = values.get(i);
if (obj instanceof File)
((File)obj).release();
}
}
} finally {
synchronized (objects) {
objects.remove(Integer.valueOf(getId()));
}
}
}
COM: <s> releases this code multipart request code object and all of its </s>
|
funcom_train/34899946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean deleteTransitionListGeneratorSetup(ATAQSProject project) {
TransitionListGeneratorSetup tlgSetup;
try{
TransitionListGeneratorSetupDAO tlgSetupDao = new TransitionListGeneratorSetupDAO();
tlgSetup = tlgSetupDao.getTLGSetup(project);
if (tlgSetup != null)
tlgSetupDao.deleteTLGSetup(tlgSetup);
return true;
} catch (DAOException de){
log.error("ProjectInfoProvider - DAOException " + de.getMessage());
log.error(de.getCause());
return false;
}
}
COM: <s> delete transition list generator setup for a given project </s>
|
funcom_train/25211885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPages(CharSequence spec) throws IllegalArgumentException {
if (pages == null) {
pages = new ArrayList<Range>();
}
int len = spec.length();
int start;
for (int i = 0; i < len; i++) {
start = i;
while (i < len && spec.charAt(i) != ',') {
i++;
}
addPages(spec, start, i);
}
}
COM: <s> add some pages to be accepted </s>
|
funcom_train/39380861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMimeType() {
assertEquals("application/vnd.ms-excel", ClickUtils.getMimeType("worksheet.xls"));
assertEquals("application/vnd.ms-excel", ClickUtils.getMimeType("WORKSHEET.XLS"));
try {
assertNull(ClickUtils.getMimeType("broken.xxx"));
} catch (Exception e) {
assertTrue(false);
}
}
COM: <s> sanity checks for click utils </s>
|
funcom_train/2807897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Term copyForProof(AxiomSource as, Scope scope) {
Term[] newTerms = new Term[terms.length];
for (int i = 0; i < terms.length; i++) {
newTerms[i] = terms[i].copyForProof(as, scope);
}
return new ConsultingNot(new ConsultingStructure(as, functor, newTerms));
}
COM: <s> create a code consulting not code counterpart that </s>
|
funcom_train/34005938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancelSale(Long idSale) throws CommonException{
try {
this.getConfig().startTransaction();
this.getConfig().update("sales.cancelSalesById", idSale);
this.getConfig().commitTransaction();
} catch (SQLException e) {
throw new CommonException(e);
} finally {
try {
this.getConfig().endTransaction();
} catch (SQLException e) {
e.printStackTrace();
throw new CommonException(e);
}
}
}
COM: <s> cancel a specific sale </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.