__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/47145942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSalesPointDisplay(final SalesPoint sp) {
switch(getViewMode()) {
case WINDOW_VIEW: addSalesPoint_Window(sp); break;
case TABBED_VIEW: addSalesPoint_Tab(sp); break;
case DESKTOP_VIEW: addSalesPoint_InternalFrame(sp); break;
}
}
COM: <s> opens a display for a sales point according to the current view mode </s>
|
funcom_train/4892098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String join(String separator) throws JSONException {
int len = length();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < len; i += 1) {
if (i > 0) {
sb.append(separator);
}
sb.append(JSONObject.valueToString(myArrayList.get(i)));
}
return sb.toString();
}
COM: <s> make a string from the contents of this jsonarray </s>
|
funcom_train/11302465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMaxConnectionsPerHost() {
ClientConnectionManager ccm =
client.getConnectionManager();
if (ccm instanceof ThreadSafeClientConnManager) {
ThreadSafeClientConnManager cm =
(ThreadSafeClientConnManager) client.getConnectionManager();
return cm.getDefaultMaxPerRoute();
} else return -1;
}
COM: <s> return the maximum number of connections allowed for a single host </s>
|
funcom_train/1341471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testViderStock() {
System.out.println("viderStock");
EntrepriseGlob instance = new EntrepriseGlob();
instance.setCapital(100);
instance.setNbBiensDispo(10);
instance.viderStock();
Assert.assertEquals(90.0, instance.getCapital());
}
COM: <s> test of vider stock method of class caps land </s>
|
funcom_train/4233080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Color getLeastUsedColor() {
int usage = -1;
Color color = null;
for (int i=0; i<seriesColors.length; i++) {
int seriesUsingColor = getSeriesUsingColor(seriesColors[i]);
if (usage == -1 || seriesUsingColor < usage) {
usage = seriesUsingColor;
color = seriesColors[i];
}
}
return color;
}
COM: <s> return a color that is least used </s>
|
funcom_train/24622042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TaskCell createCellFromTask( Task task ) {
TaskCell cell = new TaskCell(task);
cell.getGeometry().setX(task.getXPos());
cell.getGeometry().setY(task.getYPos());
cell.getGeometry().setWidth(task.getWidth());
cell.getGeometry().setHeight(task.getHeight());
return cell;
}
COM: <s> creates a task cell from a task data </s>
|
funcom_train/3338493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCompletion(String completion, boolean partial) {
if (completion == null || completion.length() == 0) {
return;
}
if (completions == null) {
completions = new TreeSet<String>();
}
if (interpreter != null) {
completion = interpreter.escapeWord(completion);
}
if (!partial) {
completion += ' ';
}
completions.add(completion);
}
COM: <s> this method is called to register a possible completion </s>
|
funcom_train/46463654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @TestMethod
public void testColors(Tester t){
// comparing Color objects
t.checkExpect(cred, new Color(255, 0, 0), "same Color-s OK");
// comparing Color objects
t.checkExpect(cred, Color.red, "same Color-s OK");
// comparing Color objects
t.checkFail(cred, cblue, "not same Color-s -- fails");
}
COM: <s> tests for different versions of colors in code java </s>
|
funcom_train/41599862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeInviteTrigger(final Channel toChannel, final IrcUser invitedBy) {
MomoBot.getBotInstance().joinChannel(toChannel.toString());
MomoBot.getBotInstance().sendNotice(invitedBy, "Allez, c'est bien parce que c'est toi.");
}
COM: <s> on est sympa on join tout </s>
|
funcom_train/1041294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StageDriver createStageDriver(Stage stage, StageContext context) {
try {
return new DedicatedThreadStageDriver(stage, context, queueFactory.createQueue(), timeout, faultTolerance);
} catch (Exception e) {
throw new IllegalStateException("Instantiation of driver failed due to illegal factory state.", e);
}
}
COM: <s> creates the new </s>
|
funcom_train/2688512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveUserPrivilege(String userLogin, String userPermission) {
if (!this.verifyAuth.getPrivilegesManager()
.getSetDeliveryOptionPrivilege()
.canModifyPermissionForOtherUsers()) {
logger.warn("Access denied");
return;
}
SaveUserPrivilegeClientHandler ph = (SaveUserPrivilegeClientHandler) this.handlers
.getProtocolHandler(SSProtocolConstants.SAVE_USER_PRIVILEGS);
ph.saveUserPrivileges(userLogin, userPermission);
}
COM: <s> save user privilege </s>
|
funcom_train/15859033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restoreRevision(int rev) throws LDAPException {
if (rev > this.getRevisionCount()) {
throw new LDAPException("Revision does not exist", LDAPException.NO_SUCH_OBJECT, "Revision does not exist");
}
this.setRevision(0);
this.createRevision();
this.removeAllAttributes();
this.copyAttributes(this.getRevisionDN(rev), this.baseDN);
}
COM: <s> restores a revision and makes it the most recent revision </s>
|
funcom_train/18846447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String createMessageFlowTargetNodeIDMissingException(String tscToken, String componentID, String subSystemCode, String arcID) {
PropertyMap propertyMap = new PropertyMap();
DiagnosticsListCreator edg = new DiagnosticsListCreator();
String severityType = "E";
String exceptionID = "82041";
propertyMap.addPropertyValuePair("arcID", arcID);
String serExMsg = edg.constructErrorDocOneItemParam(tscToken,
componentID,
severityType,
subSystemCode,
exceptionID,
propertyMap);
return serExMsg;
}
COM: <s> target node id of message flow arc not supplied </s>
|
funcom_train/37828885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public T getHighestCountedObject() {
Map.Entry<T, Integer> highestEntry = null;
for (Map.Entry<T, Integer> entry : map.entrySet()) {
if (highestEntry == null) {
highestEntry = entry;
} else {
if (highestEntry.getValue().compareTo(entry.getValue()) < 0) {
highestEntry = entry;
}
}
}
if (highestEntry == null) {
return null;
} else {
return highestEntry.getKey();
}
}
COM: <s> gets the object with the highest amount </s>
|
funcom_train/2291967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CmsUUID getProjectId() {
CmsUUID projectId = m_resource.getProjectLastModified();
if (!getLock().isUnlocked() && !getLock().isInherited()) {
// use lock project ID only if lock is not inherited
projectId = getLock().getProjectId();
}
return projectId;
}
COM: <s> returns the id of the project which the resource belongs to </s>
|
funcom_train/14123091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void downloadSystemVariables() {
AsyncCallback callback = new AsyncCallback() {
public void onSuccess(Object result) {
systemVariables = (int[]) result;
}
public void onFailure(Throwable caught) {
// HTML html = new HTML(caught.toString());
debug("downloadSystemVariables error");
}
};
GWTMailServiceCaller.getService().getSystemVariables(callback);
}
COM: <s> rpc for downloading system variables </s>
|
funcom_train/25826837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveSingleSimulationCharts() {
if (chartList.size() == 1) {
saveSingleChart(0);
} else {
for (int i = 0; i < timeSeriesList.size(); i++) {
if (timeSeriesList.get(i) != null) {
saveSingleChart(i);
}
}
}
}
COM: <s> usage save all shown charts in single simulation </s>
|
funcom_train/33704008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDayPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Date_day_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Date_day_feature", "_UI_Date_type"),
BankabeulePackage.Literals.DATE__DAY, true, false, false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the day feature </s>
|
funcom_train/36537561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshDictionaryWordsCountLabel() {
dictionaryWordsCountLabel.setText(
"<html><b>Total Words (To Test/Total): "
+ dictionariesManager.
getToTestWordsCount(testManager.getCurrentTestType()) + "/" +
dictionariesManager.getWordsCount() + " </b></html>");
}
COM: <s> refreshes words count label </s>
|
funcom_train/12838298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertValueIntoVariableSubstitutionVelocityContext(SessionID sessionID, String key, String value) throws SessionFacilitiesException {
if ((sessionID == null) || StringUtils.isBlank(key) || StringUtils.isBlank(value)) {
return;
}
VelocityContext context = getVariableSubstitutionVelocityContext(sessionID);
context.put(key, value);
}
COM: <s> inserts a key value pair into the velocity variable substitution context </s>
|
funcom_train/365597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu getFileMenu() {
if (FileMenu == null) {
FileMenu = new JMenu();
FileMenu.setText("File");
FileMenu.add(getJMenuItemSaveImage()); // Generated
FileMenu.add(getJMenuItemloadDataFromFile()); // Generated
FileMenu.add(getJMenuItem()); // Generated
}
return FileMenu;
}
COM: <s> this method initializes file menu </s>
|
funcom_train/40853377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean areValidValues(int equal, int left, int right) {
boolean res;
res = (this.substitutionVariable.domain.contains(equal)
&& this.right.domain.contains(right) && this.left.domain.contains(left));
if (res) {
switch (substitutionOperator) {
case ADD:
res = (equal == (left + right));
break;
case SUB:
res = (equal == (left - right));
break;
case MUL:
res = (equal == (left * right));
break;
case DIV:
res = ((right != 0) && (equal == (left / right)));
break;
}
}
return res;
}
COM: <s> variable identification doesnt matter here see constraint </s>
|
funcom_train/35173129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSample(MonitorModel model) {
this.CURRENT = model;
if (MAP.containsKey(model.getURL())) {
List newlist = updateArray(model, (List) MAP.get(model.getURL()));
MAP.put(model.getURL(), newlist);
} else {
List samples = Collections.synchronizedList(new LinkedList());
samples.add(model);
MAP.put(model.getURL(), samples);
}
}
COM: <s> method will look up the server in the map </s>
|
funcom_train/22347955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getFromFile()
throws Throwable {
// When empty
if ((base.loginContext == null) ||
(base.loginContext.length() == 0)) {
// say is null
T.login_context = null;
}
else {
// set real
T.login_context = base.loginContext;
} // endif
// good
return 0;
} // end-method
COM: <s> get the login context from the cfg file </s>
|
funcom_train/3888372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSearchTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SearchType_searchType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SearchType_searchType_feature", "_UI_SearchType_type"),
ImsldV1p0Package.Literals.SEARCH_TYPE__SEARCH_TYPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the search type feature </s>
|
funcom_train/29018923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getHours () {
checkWidget ();
if ((style & SWT.CALENDAR) != 0) return time.wHour;
SYSTEMTIME systime = new SYSTEMTIME ();
int msg = (style & SWT.CALENDAR) != 0 ? OS.MCM_GETCURSEL : OS.DTM_GETSYSTEMTIME;
OS.SendMessage (handle, msg, 0, systime);
return systime.wHour;
}
COM: <s> returns the receivers hours </s>
|
funcom_train/38864979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getMax() {
int Tobs = size();
int Nobs = 0;
float max = -9999.9f;
float val = 0.f;
for (int i = 0; i < Tobs; i++) {
IonoObs d = this.get(i);
float obs = d.getData();
if (obs != MISSING) {
if (obs > max) {
max = obs;
}
}
}
return max;
}
COM: <s> get the maximum non missing observations value </s>
|
funcom_train/48388600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addButton(ToolStripButton button) {
if(button.getTitle() == null) {
button.setIconSpacing(0);
button.setLabelHPad(3);
} else if (button.getIcon() == null) {
button.setLabelHPad(7);
}
addMember(button);
}
COM: <s> add a button to the tool strip </s>
|
funcom_train/3740132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPhone(AllUser user) throws UserManagerException {
String ret=null;
try {
Session sess= HibernateUtil.currentSession();
if (user.getUser()==null) {
ret = user.getDeletedUser().getPhone();
} else {
ret = user.getUser().getPhone(); }
} catch (HibernateException e) {
throw new UserManagerException();
}
return ret;
}
COM: <s> return phone field of the given user </s>
|
funcom_train/17939566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isServerTrusted(X509Certificate chain[]) {
boolean accept = false;
for (int i = 0; !accept && i < chain.length; i++)
accept = Util.confirmDialog("Do you want to accept this server's X509 "+
"certificate?", "SSL X509 Certificate");
return accept;
}
COM: <s> invoked when the client should check wether he trusts the server or not </s>
|
funcom_train/23704253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUsername(Long userId){
String userName = null;
try {
AshUserIdUsername userIdU = dao.getUserIdUsernameById().get(userId);
if (userIdU != null){
userName = userIdU.getUsername();
} else {
userName = "";
}
} catch (DatabaseException e) {
// TODO Auto-generated catch block
userName = "";
e.printStackTrace();
}
return userName;
}
COM: <s> gets the username from local bdb </s>
|
funcom_train/45411287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initializeGame() {
game.setHighscore(null);
game.setQuestions(new ClientQuestion[15]);
game.setCurrentQuestionNumber(-1);
game.setGameWon(false);
JokerFactory jokerFactory = JokerFactory.getInstance();
game.setJokerAudience(jokerFactory.createJokerAudience());
game.setJoker5050(jokerFactory.createJoker5050());
game.setJokerPhone(jokerFactory.createJokerPhone());
getNextQuestion();
}
COM: <s> initializes the game </s>
|
funcom_train/24243101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDatasourceType(String id) throws DBException {
String dataType = "";
DatasourceTypeDB datasourceType = null;
try {
datasourceType = new DatasourceTypeDB(DbSource.getConnection());
datasourceType.getRecordBy("id", id);
dataType = datasourceType.record.getName();
}
finally {
if (datasourceType != null) {
datasourceType.release();
}
}
return dataType;
}
COM: <s> retrieve type of the the data source </s>
|
funcom_train/31208241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColumnCount() throws SQLException {
try {
if(Trace.isDetailed()) Trace.trace(getId());
rs.checkClosed();
int count=rs.columnCount;
if(Trace.isEnabled()) Trace.traceResult(count);
return count;
} catch(Throwable e) {
throw convertThrowable(e);
}
}
COM: <s> returns the number of columns </s>
|
funcom_train/18739941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GraphGrammar getGrammar() {
if (this.grammar == null) {
try {
this.grammar = getGrammarModel().toGrammar();
this.grammar.setFixed();
} catch (FormatException exc) {
printError("Grammar format error: " + exc.getMessage(), false);
}
}
return this.grammar;
}
COM: <s> returns the grammar used for generating the state space </s>
|
funcom_train/14355761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CustomerTO getCustomerByUsername(String username) throws ValueListHandlerException {
try {
referenceDAO();
} catch (DAOFactoryException e) {
e.printStackTrace();
}
ValueListHandler vlhtemp = new ValueListHandler(dao.listService());
ListParams lptemp = new ListParams();
lptemp.addSearchCriteria("username", username, SearchCriteria.opEqual, SearchCriteria.joinAnd);
if (vlhtemp.executeSearch(lptemp) > 0) {
List lsttemp = vlhtemp.allElements();
return (CustomerTO)lsttemp.get(0);
} else {
return null;
}
}
COM: <s> searches for a customer by a given username from login </s>
|
funcom_train/1038880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkUserExists(String username){
boolean userExists = false;
Statement statement = db.getStatement();
String sql = "SELECT idUser from User " + "Where userName='" + username+"';";
try {
statement = db.getStatement();
ResultSet rs = statement.executeQuery(sql);
userExists = rs.next();
rs.close();
statement.close();
} catch (SQLException e) {
e.printStackTrace();
System.exit(0);
}
if (!userExists) {
return false;
} else {
return true;
}
}
COM: <s> check username exists in database </s>
|
funcom_train/3631831 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toXML() {
StringBuffer xml = new StringBuffer();
xml.append("\n<transaction>\n");
for (int i = 0; i < ejItems.size(); i++) {
EjLine line = (EjLine) ejItems.elementAt(i);
xml.append(line.dataRecord().toXML());
}
xml.append("</transaction>\n");
return xml.toString();
}
COM: <s> call to xml data virtual function for all items in the ej </s>
|
funcom_train/28604840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IRegion modelRange2WidgetRange(IRegion region) {
if (fTextViewer instanceof ITextViewerExtension5) {
ITextViewerExtension5 extension = (ITextViewerExtension5) fTextViewer;
return extension.modelRange2WidgetRange(region);
}
IRegion visibleRegion = fTextViewer.getVisibleRegion();
int start = region.getOffset() - visibleRegion.getOffset();
int end = start + region.getLength();
if (end > visibleRegion.getLength())
end = visibleRegion.getLength();
return new Region(start, end - start);
}
COM: <s> translated the given range in the viewers document into the </s>
|
funcom_train/32056498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetGraphModelFileFormatFilter() {
System.out.println("testGetGraphModelFileFormatFilter");
GraphModelProvider form = new DefaultGraphModelProvider();
GraphModelProviderRegistry.addGraphModelProvider(form);
GPFileChooser chooser = new GPFileChooser((TPDocument) null);
assertNotNull(GraphModelProviderRegistry
.getGraphModelFileFormat((FileFilter) chooser.getFileFilter()));
GraphModelProviderRegistry.removeGraphModelProvider(form);
}
COM: <s> test of get graph model file format method of class </s>
|
funcom_train/37136468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void position(int position) {
int oldPosByte = this.posBytes;
this.posBytes = position >>> 3; // same as divide by 2^3 or 8
this.delagate.position(posBytes);
this.posBits = (M >>> 5) & position; // same as % 8
if (posBits != 0 || oldPosByte != this.posBytes) {
fetch();
}
}
COM: <s> sets a new position </s>
|
funcom_train/42383969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Object module, Key<?> key) {
if (module == null) {
throw new IllegalArgumentException(
"Attempt to remove key value on null module.");
}
Map<Key<?>,Object> map = settings.get(module);
if (map == null) {
return;
}
map.remove(key);
}
COM: <s> removes a value from this sheet </s>
|
funcom_train/47947630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLatAxisMaxValueAsString() {
CoordinateAxis axis = getLatAxis();
if (axis == null) {
return null;
}
MAMath.MinMax minMax = NetCdfWriter.getMinMaxSkipMissingData(axis, null);
return NetCdfReader.getStandardLatAsString(minMax.max);
}
COM: <s> gets the maximum value of the latitude axis </s>
|
funcom_train/19412301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeUIPlugIn(UIActivePlugIn func) {
View v = getViewForPlugIn(func);
if (v != null) {
currentViews.remove(func);
removeView(v);
}
else {
throw new RuntimeException("No view to remove for " + func.getClass().getName()); //$NON-NLS-1$
}
}
COM: <s> remove the active uiplugin from the view </s>
|
funcom_train/36242279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object other) {
try {
if (other == null) { return false; }
if (other == this) { return true; }
if (!other.getClass().equals(this.getClass())) { return false; }
CardTerminalEvent otherCardTerminalEvent = (CardTerminalEvent)other;
return type == otherCardTerminalEvent.type && terminal.equals(otherCardTerminalEvent.terminal);
} catch (ClassCastException cce) {
return false;
}
}
COM: <s> whether this event is equal to the event in code other code </s>
|
funcom_train/23890374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConnectWithPassword() throws Exception {
log.trace("testConnectWithPassword()");
ConnectionFactory factory = newFactory();
if (!factory.isFeatureSupported(Features.AUTH_CREDENTIALS)) {
log.warn("Connection factory " + factory + " doesn't support '"
+ Features.AUTH_CREDENTIALS + "' feature");
return;
}
AuthenticationOptions authOptions = new PasswordAuthenticationOptions(
user, pass);
testConnect(factory, authOptions);
}
COM: <s> test that it is possible to connect to test host using credentials </s>
|
funcom_train/37739910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void timeoutSubflow() throws Exception {
ProcessMgr mgr = defDir.processMgr("SystemTest", "timeoutSubflow");
WfProcess proc = mgr.createProcess(requester);
String procKey = proc.key();
proc.start();
assertTrue(stateReached(proc, "closed.completed"));
ProcessData data = proc.processContext();
String path = (String)data.get("TransitionPath");
assertTrue(path,
path.equals("PATH:start:a1:t1:a3:a2:t0:end"));
procDir.removeProcess(proc);
}
COM: <s> test deadline execution within subflows </s>
|
funcom_train/28398950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object invoke(String action, Object[] params, String[] signature) throws AppiaManagementException {
try {
return bean.invoke(action, params, signature);
} catch (MBeanException e) {
throw new AppiaManagementException(e);
} catch (ReflectionException e) {
throw new AppiaManagementException(e);
}
}
COM: <s> invokes a method inside an appia layer </s>
|
funcom_train/12278295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionForward toogleShowPersonalPolicies(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
AbstractWizardPolicySelectionForm policyForm = (AbstractWizardPolicySelectionForm) form;
//policyForm.setShowPersonalPolicies(!policyForm.isShowPersonalPolicies());
return unspecified(mapping, policyForm, request, response);
}
COM: <s> allow to display or hide personal policies </s>
|
funcom_train/10190467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAbsoluteURI(String absolute_uri)
{ absolute_uri=absolute_uri.trim();
if (absolute_uri.indexOf("<")<0) absolute_uri="<"+absolute_uri;
if (absolute_uri.indexOf(">")<0) absolute_uri=absolute_uri+">";
m_strValue=absolute_uri;
}
COM: <s> sets the absolute uri </s>
|
funcom_train/40946721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void populateContainer(OrderedLayout container, int n) {
for (int i = 0; i < n; i++) {
// array_type array_element = [i];
final Table t = TestForTablesInitialColumnWidthLogicRendering
.getTestTable(5, 100);
container.addComponent(t);
}
}
COM: <s> adds n table components to given container </s>
|
funcom_train/36617706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MultiStatus lock(Document document) throws WebDAVException {
String sPrefix = "D";
String userName = System.getProperties().getProperty("user.name");
Element owner = document.createElementNS("DAV:","D:owner");
owner.setAttribute("xmlns:D", "DAV:");
owner.appendChild(document.createTextNode(userName));
return lock(ActiveLock.exclusive, ActiveLock.writeLock, -1, owner);
}
COM: <s> exclusively write lock this resource for all time </s>
|
funcom_train/40460126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onClick(ClickEvent event) {
KwicksItem kwicksItem = (KwicksItem) event.getSource();
if (kwicksItem.linkURL.startsWith("http://")) {
Window.Location.replace(kwicksItem.linkURL);
} else {
Window.Location.assign(kwicksItem.linkURL);
}
}
COM: <s> if any link url is specified will link to that url </s>
|
funcom_train/26114130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void copyChanges(Map<String, Integer[]> map1, Map<String, Integer[]> map2) {
for(String key : map1.keySet()) {
Integer state1 = map1.get(key)[0];
Integer state2 = map1.get(key)[1];
Integer[] states = {state1, state2};
map2.put(key, states);
}
}
COM: <s> copy the map of changes </s>
|
funcom_train/26239832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initDataFields() {
nameField.addFocusListener(new FocusAdapter() {
public void focusLost(FocusEvent e) {
/* Update data if something has changed. */
if (selectedQuestion != null && !nameField.getText().equals(selectedQuestion.getName())) {
selectedQuestion.setName(nameField.getText());
}
}
});
}
COM: <s> setup the text fields by installing event handlers </s>
|
funcom_train/25388687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(VisualArtefact d) {
GraphicObject go = d.getGraphicObject();
if (!ht.containsKey(go)) {
ht.put(go, d);
}
List<GraphicObject> parts = d.getGraphicObjectParts();
for (GraphicObject g : parts) {
if (!ht.containsKey(g)) {
ht.put(g, d);
}
}
}
COM: <s> adds the graphical object and its parts to the hash map </s>
|
funcom_train/46455109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveObject(XMLControl control, Object obj) {
Circle circle = (Circle) obj;
control.setValue("x", circle.x);
control.setValue("y", circle.y);
control.setValue("drawing r", circle.pixRadius);
control.setValue("color", circle.color);
}
COM: <s> saves the circles data in the xml control </s>
|
funcom_train/50872870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInsertElementAt() {
OMApplication application = new OMApplication();
OMInteger integer = new OMInteger("1");
OMSymbol symbol = new OMSymbol("a","b");
application.addElement(integer);
application.addElement(symbol);
application.insertElementAt(integer, 1);
assertTrue(application.getElementAt(2)==symbol);
}
COM: <s> test of insert element at method of class omapplication </s>
|
funcom_train/26221772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open() {
if ( getFormatter() != null ) {
int index = _text.getDocument().getLength();
try {
_text.getDocument().insertString( index, getFormatter().getHead( AntelopeGUILogHandler.this ), null );
}
catch ( Exception e ) {
}
}
}
COM: <s> description of the method </s>
|
funcom_train/29554743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void isClosedContext() throws InterruptedException {
ExampleJob.setStopped();
assertFalse("The should not be started started", ExampleJob.isStarted());
Thread.sleep(TIMEOUT);
assertFalse("The should not be started started", ExampleJob.isStarted());
}
COM: <s> returns whether the context is closed </s>
|
funcom_train/47603817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getWishPrice() {
if (wishPrice == null) {//GEN-END:|94-getter|0|94-preInit
// write pre-init user code here
wishPrice = new TextField("\u041C\u043E\u044F \u0446\u0435\u043D\u0430", null, 32, TextField.ANY);//GEN-LINE:|94-getter|1|94-postInit
// write post-init user code here
}//GEN-BEGIN:|94-getter|2|
return wishPrice;
}
COM: <s> returns an initiliazed instance of wish price component </s>
|
funcom_train/39281339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object remove_comparator(Object known, FastLinkedListComparator llc) {
ssLinkedListElement tmp;
tmp = first;
while (tmp != null) {
if (llc.compare(known, tmp.obj)) {
// cut it out and return it
if (tmp == first) {
return this.remove_head();
} else if (tmp == last) {
return this.remove_tail();
} else {
// somewhere in middle
Object retobj;
(tmp.prev).next = tmp.next;
(tmp.next).prev = tmp.prev;
num_in_list--;
retobj = tmp.obj;
free_lle(tmp);
return retobj;
}
}
tmp = tmp.next;
}
return null;
}
COM: <s> removes the first object to match according to the comparator function </s>
|
funcom_train/46622841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void add12ArgIfNotEmpty(String key, String value) {
if (!javadoc1) {
if (value != null && value.length() != 0) {
cmd.createArgument().setValue(key);
cmd.createArgument().setValue(value);
} else {
log("Warning: Leaving out empty argument '" + key + "'",
Project.MSG_WARN);
}
}
}
COM: <s> utility method to add a non jdk1 </s>
|
funcom_train/2924440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Type getTypeForEClassifier(final EGenericType element) {
EClassifier baseType = element.getEClassifier();
if ((baseType == null) || !listTypes.contains(baseType))
return getTypeForEClassifier(baseType);
if (element.getETypeArguments().size() != 1)
throw new RuntimeException("Unexpected number of type arguments");
return (Type) cache.get(element);
}
COM: <s> returns the corresponding type of the metamodel for a generic type </s>
|
funcom_train/7661707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGet2_IndexOutOfBoundsException() {
try {
CopyOnWriteArrayList c = new CopyOnWriteArrayList();
c.add("asdasd");
c.add("asdad");
c.get(100);
shouldThrow();
} catch(IndexOutOfBoundsException e){}
}
COM: <s> get throws an index out of bounds exception on a too high index </s>
|
funcom_train/28352875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeContents() {
setSize( 1200, 900 );
final Box mainView = new Box( BoxLayout.Y_AXIS );
getContentPane().add( mainView );
mainView.add( makeQualifierView() );
mainView.add( new JScrollPane( _parameterTable ) );
mainView.add( makeMessageView() );
}
COM: <s> make the window contents </s>
|
funcom_train/45250269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshAll() {
Object[] infos = getSortedChildren(getRoot());
Control[] existingChildren = control.getChildren();
for (int i = 0; i < existingChildren.length; i++) {
existingChildren[i].dispose();
}
int maxLength = Math.min(infos.length,MAX_DISPLAYED);
// Create new ones if required
for (int i = 0; i < maxLength; i++) {
ProgressInfoItem item = createNewItem((JobTreeElement) infos[i]);
item.setColor(i);
}
control.layout(true);
updateForShowingProgress();
}
COM: <s> refresh everything as the root is being refreshed </s>
|
funcom_train/19540212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Pen getPenForOverlay() {
// Get the pen and modify to only show a cursor and the boundary
Pen pen = getPen(); // new copy of pen, OK to modify
pen.setBackgroundMode(Pen.MODE_SOLID);
pen.setForegroundMode(Pen.MODE_SOLID);
pen.setThickness(3);
if (pen.isEraser()) {
pen.setEraser(false);
pen.setPaint(new DrawableColorPaint(Color.WHITE));
} // endif
return pen;
}
COM: <s> get the pen set up to paint the overlay </s>
|
funcom_train/18756613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateNodeMenu(JMenu menu) {
MerlotDOMNode node = getSelectedNode();
if (node == null) {
menu.setEnabled(false);
} else {
// remove everything from the menu
menu.removeAll();
addItemsToMenu(getNodeMenuItems(node), menu);
menu.setEnabled(true);
}
}
COM: <s> updates the given node menu for the selected node </s>
|
funcom_train/26313260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deploy() {
disableButtons();
Entity en = ce();
client.deploy(cen, en.getPosition(), en.getFacing(), en.getElevation(), en
.getLoadedUnits(), assaultDropPreference);
en.setDeployed(true);
}
COM: <s> sends a deployment to the server </s>
|
funcom_train/27947027 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(InputStream input) throws IOException {
BufferedReader br1 = new BufferedReader(new InputStreamReader(input), 1024);
clear();
String line = br1.readLine();
while (line != null) {
if (!line.startsWith("#")) {
add(BaseAtomType.parse(line));
}
line = br1.readLine();
}
}
COM: <s> loads atom types from a reader </s>
|
funcom_train/15769411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireEditingCanceled(ChangeEvent e){
if(cellEditorListeners != null){
Vector listeners = cellEditorListeners;
int count = listeners.size();
for (int i = 0; i < count; i++){
((CellEditorListener) listeners.elementAt(i)).editingCanceled(e);
}
}
}
COM: <s> fires the change event for all listeners </s>
|
funcom_train/36060822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchExtract(long rowId) throws SQLException {
Cursor mCursor = mDb.query(true, EXTRACT_TABLE, new String[] { KEY_ID,
KEY_NAME, KEY_DESCRIPTION, KEY_EXTRACT, KEY_COLOR, KEY_LIQUID },
KEY_ID + "=" + rowId, null, null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;
}
COM: <s> return a cursor positioned at the extract that matches the given row id </s>
|
funcom_train/18955318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(MCRObjectID mcrid, org.jdom.Document xml) throws MCRException {
getXMLTable(mcrid.getTypeId()).update(mcrid.getId(), MCRUtils.getByteArray(xml), 1);
jdomCache.put(mcrid, xml);
CONFIG.systemModified();
}
COM: <s> the method update an item in the datastore </s>
|
funcom_train/31526046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printSelf(PrettyPrinter printout) throws IOException {
SymTabAST lhs = (SymTabAST)nodeToPrint.getFirstChild();
SymTabAST rhs = (SymTabAST)lhs.getNextSibling();
PrinterFactory.makePrinter(lhs).print(printout);
printout.print(" " + nodeToPrint.getText() + " ");
PrinterFactory.makePrinter(rhs).print(printout);
}
COM: <s> prints the binary operator to a pretty printer </s>
|
funcom_train/28750671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setArraysize(String newVal) {
if ((newVal != null && this.arraysize != null && (newVal.compareTo(this.arraysize) == 0)) ||
(newVal == null && this.arraysize == null && arraysize_is_initialized)) {
return;
}
this.arraysize = newVal;
arraysize_is_modified = true;
arraysize_is_initialized = true;
}
COM: <s> setter method for arraysize </s>
|
funcom_train/5395463 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetNetworkLatency() {
System.out.println("getNetworkLatency");
CubbyHole instance = new CubbyHole();
long expResult = 0L;
long result = instance.getNetworkLatency();
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 network latency method of class org </s>
|
funcom_train/9705648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Phase copyPhase(Phase phase) throws DeploymentException {
Phase newPhase = new Phase(phase.getPhaseName());
Iterator<Handler> handlers = phase.getHandlers().iterator();
while (handlers.hasNext()) {
try {
Handler handlerDescription = (Handler) handlers.next();
newPhase.addHandler(handlerDescription.getHandlerDesc());
} catch (PhaseException e) {
throw new DeploymentException(e);
}
}
return newPhase;
}
COM: <s> to copy phase information from one to another </s>
|
funcom_train/6289666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(DataOutputStream outputStream) throws Exception {
outputStream.writeInt(storageParts.size());
for (int i = 0; i < storageParts.size(); i++) {
((RMSStoragePart) storageParts.elementAt(i)).save(outputStream);
}
}
COM: <s> saves this storage parts to given output stream typically rms database </s>
|
funcom_train/1186298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File getTempFile() {
File tempDir = repository;
if (tempDir == null) {
tempDir = new File(System.getProperty("java.io.tmpdir"));
}
String fileName = "upload_" + getUniqueId() + ".tmp";
File f = new File(tempDir, fileName);
FileCleaner.track(f, this);
return f;
}
COM: <s> creates and returns a </s>
|
funcom_train/3427527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration getNamespaceScope(SyntaxTreeNode node) {
Hashtable all = new Hashtable();
while (node != null) {
Hashtable mapping = node.getPrefixMapping();
if (mapping != null) {
Enumeration prefixes = mapping.keys();
while (prefixes.hasMoreElements()) {
String prefix = (String)prefixes.nextElement();
if (!all.containsKey(prefix)) {
all.put(prefix, mapping.get(prefix));
}
}
}
node = node.getParent();
}
return(all.keys());
}
COM: <s> this method starts at a given node traverses all namespace mappings </s>
|
funcom_train/33158546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getService(String key) {
Constructor ctor = serviceClass.getConstructor();
/* paramNames = get params that are passed to the ctor
*
* Object[] paramValues = new Object [paramNames.size];
*
* for each param {
*
* if (this is pointing to another service)
* paramValues[ctr] = getService (paramName);
* else
* paramValues[ctr] = instantiate the param.
* }
*
* Construct the object, return.
*/
return null;
}
COM: <s> the get service method returns an instance of the service </s>
|
funcom_train/1653489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToStringAllEquals() {
BitArray methodBitArray = createAllEqualsBitArray(sampleBitsNumber,true);
String expectedString = createAllOneString(sampleBitsNumber,"1");
assertEquals(methodBitArray.toString(),expectedString);
methodBitArray = createAllEqualsBitArray(sampleBitsNumber,false);
expectedString = createAllOneString(sampleBitsNumber,"0");
assertEquals(methodBitArray.toString(),expectedString);
}
COM: <s> tests to string method </s>
|
funcom_train/15800993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PageRenderer startNewPage(String pageLabel) {
PageRenderer cPage = new PageRenderer(survey.getStrings());
cPage.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), pageLabel));
pageComponents.add(cPage);
return cPage;
}
COM: <s> create a new page object and return its renderer </s>
|
funcom_train/33622938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void workOnProperty(Object aBean, int action, IPropertyCipher propertyCipher, IPropertyDescriptor propertyDescriptor) throws PropertyCipherException {
switch (action) {
case IConstants.DO_CIPHER:
propertyCipher.cipherProperty(aBean, propertyDescriptor);
break;
case IConstants.DO_DECIPHER:
propertyCipher.deCipherProperty(aBean, propertyDescriptor);
break;
}
}
COM: <s> modify the property of the bean applying property cipher to the property value </s>
|
funcom_train/33579067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseDragged( final MouseEvent e ) {
if ( prev_point == null ) return;
updateDelta( e );
if ( ( move_delta.distance( new Point() ) < 5 ) && bui.getPeelRoot().getToolBar().snapEnabled() ) {
snapMove( e );
}
else {
dragMove( e );
}
}
COM: <s> when the mouse is dragged do either the snap moving or drag moving </s>
|
funcom_train/5864381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setPanel(Panel panel, int col, int row) {
if (col < 0 || row < 0 || panel == null || getChildren().size() <= col) return false;
final Portalchildren children = ((Portalchildren)getChildren().get(col));
if (children.getChildren().size() >= row)
return children.appendChild(panel);
else
return children.insertBefore(panel, (Component)children.getChildren().get(row));
}
COM: <s> sets the specified panel via the position col and row </s>
|
funcom_train/37837195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void contentHandling(final String name, final InputStream in) throws IOException, ClassNotFoundException {
final int i = name.indexOf('.');
if (name.endsWith(".jar")) {
in.close();
DataLoader.addJarFile(cache.getFilename(name));
} else {
if (i > -1) {
final String layer = name.substring(i + 1);
currentZone.addLayer(layer, in);
}
}
}
COM: <s> load layer data </s>
|
funcom_train/38302515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SSLEngineResult wrapAppData(ByteBuffer b) throws SSLException, IOException {
wrapData.clear();
SSLEngineResult result = encode(b);
if (log.isLoggable(Level.FINE)) {
log.fine("wrapped " + result);
}
if (result.bytesProduced() > 0) {
wrapData.flip();
return result;
} else {
throw new IOException("wrap produced no data " + getRemoteHost());
}
}
COM: <s> encrypt application data does not write data to socket </s>
|
funcom_train/33733817 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readFile(){
try{
//The following 3 lines are just debug code. They appear in the re5 command window
System.out.println(this.userFile.getFilename());
System.out.println(this.userFile.exists());
System.out.println(this.userFile.getURL());
InputStream xmlStream = this.userFile.getInputStream();
xr = XMLReaderFactory.createXMLReader();
xr.setContentHandler(this);
xr.setErrorHandler(this);
xr.parse(new InputSource(xmlStream));
} catch(Exception e){
e.printStackTrace();
System.out.println("ERROR!");
}
}
COM: <s> parses the whole xml file and stores it in a hash map </s>
|
funcom_train/3923793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteObserver( Observer o ) {
super.deleteObserver(o);
if ( o instanceof VRObject ) {
observers.remove( ((VRObject) o).getClassName()+((VRObject) o).getId() );
active = observers.isEmpty();
notifyOwners( o );
}
}
COM: <s> removes observer o to the observer list </s>
|
funcom_train/44715135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addDependency(Task task) {
if (getDependenciesInternal().contains(task)) {
return false;
}
HashSet alreadyVisited = new HashSet();
alreadyVisited.add(task);
alreadyVisited.add(this);
if (hasLoop(task, alreadyVisited)) {
return false;
}
add(DEPENDENCY_LIST, task);
notifyAddDependency(task);
save();
updateState();
return true;
}
COM: <s> adds a dependency to this task </s>
|
funcom_train/50892142 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Color getColor(JLabyHtmlColor labyColor) {
Color color = (Color)colorTable.get(labyColor);
if(color == null) {
int red = labyColor.getRed();
int green = labyColor.getGreen();
int blue = labyColor.getBlue();
color = new Color(red, green, blue);
colorTable.put(labyColor, color);
}
return color;
}
COM: <s> creates awt colors according to laby colors </s>
|
funcom_train/32057247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUpdate() {
System.out.println("testUpdate");
ActionEvent e = new ActionEvent(new Object(),ActionEvent.ACTION_PERFORMED,"command");
GPGraphpad gp = new GPGraphpad();
FileNew fn = new FileNew(gp);
fn.update();
}
COM: <s> tests update method of class file new </s>
|
funcom_train/49262608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void load(final PreferenceCollection<?> preferences) {
try {
Element root = loadXmlData(preferences.getPreferenceClass()).getRootElement();
Preference preference;
for (Object child : root.getChildren()) {
if (child instanceof Element) {
preference = preferences.addPreference();
setPreferenceData((Element) child, preference);
}
}
} catch (Exception e) {
System.err.println(e);
for (int i = 0; i < preferences.getDefaultCount(); i++) {
preferences.addPreference().loadDefaults();
}
}
}
COM: <s> load a collection of preference object </s>
|
funcom_train/32081572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultButton (Button button) {
checkWidget();
int /*long*/ buttonHandle = 0;
if (button != null) {
if (button.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if (button.menuShell () != this) error (SWT.ERROR_INVALID_PARENT);
buttonHandle = button.handle;
}
saveDefault = defaultButton = button;
OS.gtk_window_set_default (topHandle (), buttonHandle);
}
COM: <s> if the argument is not null sets the receivers default </s>
|
funcom_train/50864798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
// Update work progress bar.
double workTimeRequired = process.getInfo().getWorkTimeRequired();
double workTimeRemaining = process.getWorkTimeRemaining();
int workProgress = 100;
if (workTimeRequired > 0D) workProgress =
(int) (100D * (workTimeRequired - workTimeRemaining) / workTimeRequired);
workBarModel.setValue(workProgress);
}
COM: <s> updates the panels information </s>
|
funcom_train/28549094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ViewComponentPlugin getViewComponent(String aViewId) {
ViewComponentPlugin result = null;
final String vId = getFullPluginId(aViewId);
log.fine("Retrieveing viewcomponent " + vId);
for (final ViewComponentPlugin vcp : getViewManager()
.getViewComponentPlugins()) {
log.fine("\t " + vcp.getId());
if (vId.equals(vcp.getId())) {
result = vcp;
break;
}
}
log.fine("Retrieved viewcomp " + result);
return result;
}
COM: <s> returns the view component plugin corresponding to a view id </s>
|
funcom_train/49214521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDBValue() {
System.out.println("getDBValue");
String key = "column.sql";
String database = "celeritas.database.type";
String expResult = "SELECT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME = '%1'";
String result = PropertyHelper.getDBValue(key, database);
assertEquals(expResult, result);
}
COM: <s> test of get dbvalue method of class property helper </s>
|
funcom_train/7791270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOnline(boolean away) {
if (connection != null) {
try {
connection.setMyStatus(away ? UserStatus.ONLINE
: UserStatus.ONLINE);
} catch (IOException e) {
log.log(Level.SEVERE, "Failed to set status", e);
}
}
super.setAway(away);
}
COM: <s> sets the online flag </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.