__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/21975811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reloadLibrary(){
EdaTreeNode node = getProjectTree().getSelectedNode();
if(node instanceof EdaLibrary){
EdaLibrary library = (EdaLibrary)node;
library.removeAllChildren();
EdaProject project = (EdaProject)(fileParser.getSaveableFromFile(library.getFile()));
//project.linkParts(project);
library.setSourceProject(project);
getProjectTree().refresh();
((EdaTreeNode)(library.getParent())).getProject().getPartList().updateSymbols();
}
}
COM: <s> causes the selected library node to reload from the source project </s>
|
funcom_train/37241150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveData() {
FileDialog fd = new FileDialog(new Frame(), "Save histogram data as...", FileDialog.SAVE);
fd.show();
String fileName = fd.getFile();
if (fileName != null) {
saveDataAs(fd.getDirectory() + fileName);
}
}
COM: <s> save the histogram data to a tab delimited text file </s>
|
funcom_train/42982088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkConnection() {
try {
if (con == null || !con.isValid(2)) {
createConnection();
}
} catch (SQLException ex) {
Logger.getLogger(DaoMsSql.class.getName()).log(Level.SEVERE, null, ex);
}
}
COM: <s> renew the connection if it is invalid </s>
|
funcom_train/3897701 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(IAction action) {
LoadResourceAction.LoadResourceDialog loadResourceDialog = new LoadResourceAction.LoadResourceDialog(getWindow().getShell());
if (Dialog.OK == loadResourceDialog.open()) {
for (Iterator i = loadResourceDialog.getURIs().iterator(); i.hasNext();) {
openEditor(getWindow().getWorkbench(), (URI)i.next());
}
}
}
COM: <s> opens the editors for the files selected using the load resource dialog </s>
|
funcom_train/12334564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getAckMode(String modeStr) {
int mode = Session.CLIENT_ACKNOWLEDGE;
if (modeStr.equalsIgnoreCase("AUTO_ACKNOWLEDGE")) {
mode = Session.AUTO_ACKNOWLEDGE;
}
if (modeStr.equalsIgnoreCase("DUPS_OK_ACKNOWLEDGE")) {
mode = Session.DUPS_OK_ACKNOWLEDGE;
}
return mode;
} //- getMode
COM: <s> utility for translating string representations of acknowledgement </s>
|
funcom_train/3703287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Condition getConditionByName(String strName) {
Iterator it = conditions();
Condition cond;
while (it.hasNext()) {
cond = (Condition) it.next();
if (strName.equals(cond.getName())) {
return (cond);
}
}
return (null);
} // of method
COM: <s> get a condition by name </s>
|
funcom_train/49199930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCategoryIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CategorizedLink_categoryId_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CategorizedLink_categoryId_feature", "_UI_CategorizedLink_type"),
ExhibitionPackage.Literals.CATEGORIZED_LINK__CATEGORY_ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the category id feature </s>
|
funcom_train/11317116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int countAffiliations(String nodeName, PubSubAffiliation affiliation) {
Map<Entity, PubSubAffiliation> affils = this.nodeAffiliations.get(nodeName);
int i = 0;
for (PubSubAffiliation a : affils.values()) {
if (a.equals(affiliation))
++i;
}
return i;
}
COM: <s> calculates how many users with the given affiliation are present for this node </s>
|
funcom_train/1238279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Generator getGenerator(Message message, SymbolTable symbolTable) {
if (include(message.getQName())) {
MessageEntry mEntry = symbolTable.getMessageEntry(message.getQName());
messageWriters.addStuff(new NoopGenerator(), mEntry, symbolTable);
return messageWriters;
}
else {
return new NoopGenerator();
}
} // getGenerator
COM: <s> method get generator </s>
|
funcom_train/18551501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialiseAndSetUpTable() {
contextDisplayTableModel = new ContextDisplayTableModel();
//Initialise the Other Objects
contextTable = new JTable(contextDisplayTableModel);
tableScrollPane = new JScrollPane(contextTable);
contextDisplayDialogTableMouseListener =
new ContextDisplayDialogTableMouseListener();
contextTable.addMouseListener(contextDisplayDialogTableMouseListener);
//Fill it with data
populateTable();
}
COM: <s> this sets up the table </s>
|
funcom_train/50813488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean explore(int explorationIndex) {
ScheduleVar sVar = ( ScheduleVar ) getVar() ;
Boat oldHost = sVar.getHost() ;
Boat newHost = ppp.getSchedule().getHost( explorationIndex );
if( oldHost == newHost ) {
return false;
} else {
swap( sVar, oldHost, newHost );
return true ;
}
}
COM: <s> explore in swapping the host of the worst </s>
|
funcom_train/46765487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserResourceModel getUserResource(final long userResourceId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return SchedulingData.getUserResource(userResourceId, chain, call);
}}; return (UserResourceModel) call(method, call);
}
COM: <s> same transaction return the single user resource model for the primary key </s>
|
funcom_train/26488001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startElement (String name, AttributeList atts) throws SAXException{
ConfigurationImpl conf = new ConfigurationImpl(name);
if (this.root == null)
this.root = conf;
if (!stack.isEmpty()) {
((ConfigurationImpl)stack.peek()).addConfiguration(conf);
}
stack.push(conf);
}
COM: <s> receive notification of the beginning of an element </s>
|
funcom_train/3098912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString () {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("[");
stringBuffer.append(boundOutputPin.toString());
stringBuffer.append(" --> ");
stringBuffer.append(boundOutputStateVariable.toString());
stringBuffer.append("]");
return stringBuffer.toString();
}
COM: <s> returns a string representation of this object </s>
|
funcom_train/14365579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Fill createGradient(RGB leftColor_p, RGB rightColor_p) {
return GObjectFactory.instance().createGradient(ColorDefinitionImpl.create(leftColor_p.red, leftColor_p.green, leftColor_p.blue),
ColorDefinitionImpl.create(rightColor_p.red, rightColor_p.green, rightColor_p.blue));
}
COM: <s> create a gradient with given rgb colors </s>
|
funcom_train/1164632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getDailyTrendsAsync(WeiboListener listener) {
getDispatcher().invokeLater(new AsyncTask(DAILY_TRENDS, listener, null) {
public void invoke(WeiboListener listener, Object[] args) throws
WeiboException {
listener.gotDailyTrends(getDailyTrends());
}
});
}
COM: <s> returns the top 20 trending topics for each hour in a given day </s>
|
funcom_train/11051276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(double[] in) throws NullArgumentException {
DataAdapter da = new ArrayDataAdapter(in);
try {
da.computeStats();
fillBinStats(in);
} catch (IOException e) {
throw new MathIllegalStateException(e, LocalizedFormats.SIMPLE_MESSAGE, e.getLocalizedMessage());
}
loaded = true;
}
COM: <s> computes the empirical distribution from the provided </s>
|
funcom_train/45872737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NeuronCable getCable(int i) {
if (this.tempCable == null) {
this.tempCable = new NeuronCable(this, (Cable)getMorphMLCell().getCables().getCable().get(i));
return this.tempCable;
}
tempCable.setMorphMLCable((Cable)getMorphMLCell().getCables().getCable().get(i));
return tempCable;
}
COM: <s> retrieves the cable at position i </s>
|
funcom_train/50312864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void javaToNative (Object object, TransferData transferData){
transferData.result = 0;
if (!checkRTF(object) || !isSupportedType(transferData)) {
DND.error(DND.ERROR_INVALID_DATA);
}
// CF_RTF is stored as a null terminated byte array
transferData.data = OS.fromUnicode((String)object, Fox.FONTENCODING_DEFAULT);
transferData.result = 1;
}
COM: <s> this implementation of code java to native code converts rtf formatted text </s>
|
funcom_train/26391620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Semantic find(String name) {
Semantic result = null;
Wordlist w = null;
for (Enumeration e = my_vector.elements(); e.hasMoreElements();) {
w = (Wordlist) (e.nextElement());
result = w.find(name);
if (null != result) {
break;
}
} /* End for*/
return result;
} /* public Semantic find(String name)*/
COM: <s> find a semantic or null somewhere in the search order </s>
|
funcom_train/39370190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasBaseClass(String className) {
boolean hasThatBaseClass = false;
Iterator it = baseClasses.iterator();
RecordClass element;
while (it.hasNext() && !hasThatBaseClass) {
element = (RecordClass)it.next();
hasThatBaseClass = element.getName().equals(className);
if (!hasThatBaseClass) {
hasThatBaseClass = element.hasBaseClass(className);
}
}
return hasThatBaseClass;
}
COM: <s> determines whether this class has a base class of the given name </s>
|
funcom_train/42010508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPath(Path path) {
try {
pm.connect();
ManagementDB managementDB = new ManagementDB(pm.getSqlConnection());
paths.add(path);
managementDB.savePath(path);
} catch (Exception ex) {
Logger.getLogger(Indexer.class.getName()).log(Level.WARNING,
"Couldn't save current path in DB.", ex);
}
}
COM: <s> add the path to the exploration list </s>
|
funcom_train/16933297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeVar() {
myvars = new IntegerVariable[X][Y];
for (int i = 0 ; i < X ; i++)
for (int j = 0 ; j < Y ; j++)
myvars[i][j] = makeIntVar("var "+i+" "+j+" ",0,1);
}
COM: <s> creates the choco variable </s>
|
funcom_train/37036183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String logName() {
String className = this.getClass().getName();
int period = className.lastIndexOf(".");
if (period >= 0)
className = className.substring(period + 1);
return (className + "[" + getName() + "]");
}
COM: <s> return the abbreviated name of this container for logging messsages </s>
|
funcom_train/44832666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JGEvent getEvent(String eventName) {
Iterator iter = events.iterator();
while (iter.hasNext()) {
JGEvent event = (JGEvent) iter.next();
if (event.getName().equals(eventName)) {
return event;
}// if
}// while
return null;
}
COM: <s> getter for events by name </s>
|
funcom_train/2302215 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintComponent(Graphics g) {
super.paintComponent(g);
if (transformNeedsReform) reformTransform(new Rectangle(getSize()));
g.setColor(java.awt.Color.white);
g.fillRect(0, 0, getSize().width, getSize().height);
Graphics2D g2 = (Graphics2D) g;
g2.transform(transform);
drawer.drawAutomaton(g);
}
COM: <s> draws itself and the automaton </s>
|
funcom_train/16642982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String generateNewIDString() {
int newIdNumber = 1;
if (ffIdList.size() > 30) {
// Scalable solution = skip the low numbers
newIdNumber = ffIdList.size();
}
String newIdString;
do {
newIdString = "info:rrorife/f/" + Integer.toString(newIdNumber);
newIdNumber++;
} while (ffIdList.contains(newIdString));
return newIdString;
}
COM: <s> finds an unused id string to give to the new format </s>
|
funcom_train/14375460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addRecentFileToMenu(File f) {
if (maxRecentFiles>0) {
String fileName = f.toString();
if (!recentFileList.contains(fileName)) {
if (recentFileList.size()==maxRecentFiles) {
recentFileList.remove(maxRecentFiles-1);
}
recentFileList.add(0, fileName);
setRecentFileMenuList();
}
}
}
COM: <s> add a file to the list and rebuild the menu </s>
|
funcom_train/36060651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long createHop(String name, String description, float alpha, float beta, boolean noble) {
ContentValues initialValues = new ContentValues();
initialValues.put(KEY_NAME, name);
initialValues.put(KEY_DESCRIPTION, description);
initialValues.put(KEY_ALPHA_ACID, alpha);
initialValues.put(KEY_BETA_ACID, beta);
initialValues.put(KEY_NOBLE, noble);
return mDb.insert(HOP_TABLE, null, initialValues);
}
COM: <s> create a new hop </s>
|
funcom_train/11358052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Protocol getProtocol(URI uri) throws ProtocolNotFoundException {
Protocol protocol = null;
try {
String protocolName = uri.getScheme();
if (protocolName == null) {
throw new ProtocolNotFoundException(uri);
}
protocol = getMap().get(protocolName);
} catch (ProtocolNotFoundException e) {
throw new ProtocolNotFoundException(uri, e.toString());
}
return protocol;
}
COM: <s> will lookup a protocol based on the underlying uri </s>
|
funcom_train/28350436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setReferenceSource( final OrbitSource referenceSource ) {
try {
_busyLock.lock();
_orbit = null;
if ( _referenceSource != null ) {
_referenceSource.removeOrbitSourceListener( this );
}
_referenceSource = referenceSource;
if ( referenceSource != null ) {
referenceSource.setSequence( getSequence(), getBpmAgents() );
referenceSource.addOrbitSourceListener( this );
}
}
finally {
_busyLock.unlock();
}
}
COM: <s> set the new reference orbit source </s>
|
funcom_train/51296185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NamedId getIdByMnemo(String uid) {
NamedId org = new NamedId();
String sql = "SELECT id FROM orgs WHERE mnemo = '" + uid + "';";
ResultSet res = null;
try {
res = DBAccessor.getInstance().makeSelect(sql);
if (res.next()) {
org.setValues(res.getInt("id"), uid);
return org;
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
DBAccessor.getInstance().releaseConnection(res);
}
return null;
}
COM: <s> returns named id by uid specified </s>
|
funcom_train/1104210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addZorunluPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Alan_zorunlu_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Alan_zorunlu_feature", "_UI_Alan_type"),
HarzemliPackage.eINSTANCE.getAlan_Zorunlu(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
getString("_UI_validasyonPropertyCategory"),
null));
}
COM: <s> this adds a property descriptor for the zorunlu feature </s>
|
funcom_train/26551429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addIndex(Index index) {
if (index == null) {
throw new IllegalArgumentException("index cannot be null");
} else if (this.indexes.indexOf(index) != -1) {
throw new IllegalArgumentException("an index with the name '" +
index.getName() +
"' already exists for this table");
}
indexes.addElement(index);
}
COM: <s> appends the given index to the vector of indexes </s>
|
funcom_train/38856081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentRole(Role currentRole) {
AsyncServiceInstanceHelper.getUserServiceAsync().setCurrentRoleOfCurrentUser(currentRole, new AsyncCallback<Role>() {
@Override
public void onFailure(Throwable caught) {
logout();
}
@Override
public void onSuccess(Role result) {
CurrentUserModel.this.user.setCurrentRole(result);
fireCurrentRoleChanged();
}
});
}
COM: <s> sets the current selected user role </s>
|
funcom_train/16623930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toggleFontEngine(ActionEvent event) {
try {
if (currentDocumentState != null) {
// toggle flag.
isFontEngine = !isFontEngine;
// refresh current page state.
refreshDocumentState();
}
} catch (Throwable e) {
logger.log(Level.WARNING, "Error enable/disabling document.", e);
}
}
COM: <s> toggle the font engine functionality and refresht he current page view </s>
|
funcom_train/39188236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resolveInheritances() throws NoSuchDefinitionException {
// Walk through all definitions and resolve individual inheritance
Iterator i = definitions.values().iterator();
while (i.hasNext()) {
XmlCacheDefinition definition = (XmlCacheDefinition) i.next();
definition.resolveInheritance(this);
} // end loop
}
COM: <s> resolve extended instances </s>
|
funcom_train/43420982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Color changeColor(Color color) {
int red = color.getRed() + 50;
if (red > 255) red = red - 255;
int green = color.getGreen() - 50;
if (green < 0) green = green + 255;
int blue = color.getBlue() + 100;
if (blue > 255) blue = blue - 255;
return new Color(red, green, blue);
}
COM: <s> returns new color visibly different from the given one </s>
|
funcom_train/8409649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StrBuilder append(char[] chars) {
if (chars == null) {
return appendNull();
}
int strLen = chars.length;
if (strLen > 0) {
int len = length();
ensureCapacity(len + strLen);
System.arraycopy(chars, 0, buffer, len, strLen);
size += strLen;
}
return this;
}
COM: <s> appends a char array to the string builder </s>
|
funcom_train/50757095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeUpdateListener(UpdateListener updateListener) {
Iterator updateInfosIterator = updateInfos.iterator();
UpdateInfo updateInfo;
while (updateInfosIterator.hasNext()) {
updateInfo = (UpdateInfo)updateInfosIterator.next();
if (updateInfo.getUpdateListener().equals(updateListener)) {
updateInfosIterator.remove();
}
}
}
COM: <s> remomes all references to the given update listener </s>
|
funcom_train/19682194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AxHistory getFirstHighPivo(List<AxHistory> historyList) {
AxHistory firstMinHistory = getFirstMin(historyList, maxRange);
int index = historyList.lastIndexOf(firstMinHistory);
List<AxHistory> historyFromMin = historyList.subList(index, historyList.size());
return getFirstMax(historyFromMin, maxRange);
}
COM: <s> this get the first high isolated peek </s>
|
funcom_train/19152842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEditorTitleUpdate() throws Exception {
entity.set(TestObject.STRING_PROPERTY, "first");
editor = openEditor();
assertEquals(entity.toString(), editor.getTitle());
entity.set(TestObject.STRING_PROPERTY, "second");
assertEquals(entity.toString(), editor.getTitle());
}
COM: <s> tests that the editor title is updated when the model changes </s>
|
funcom_train/31872120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class FrameWCOP extends FrameW {
public String getLongName () { return "Copyright URL frame"; }
public FrameWCOP (ID3V2Frame frm) {
super (frm);
}
public FrameWCOP (ID3V2Frame frm, DataSource ds)
throws SeekPastEndException {
super (frm, ds);
}
public String toString () {
return getLongName () + "\nURL : "
+ url;
}
}
COM: <s> copyright url frame </s>
|
funcom_train/4717586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSynthPitchPureData() {
SynMessage msg = new SYN(SYN.PUREDATA).synth(1).pitch(261.6256);
assertEquals("FTi", msg.getTypetag());
assertEquals(new Integer(66976), msg.getArguments()[2]);
assertEquals("/SYN/ID1/PITCH", msg.getAddress());
}
COM: <s> synth pitch in hz for pure data </s>
|
funcom_train/28123162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invoke() {
if (!isInvocable() || invoking)
return;
boolean ButtonState = jButtonInvoke.isEnabled();
jButtonInvoke.setEnabled(false);
invoking = true;
if (Repeated)
while (isGateOpen() && Repeated)
invokeConnections();
else if (isGateOpen())
invokeConnections();
invoking = false;
jButtonInvoke.setEnabled(ButtonState);
}
COM: <s> invoke reference visualisers via their connectors which will always be methods or </s>
|
funcom_train/12273827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPortItem(AbstractPortItem port) {
portItems.addElement(port);
for(int i = listeners.size() - 1 ; i >= 0 ; i--) {
((TableModelListener)listeners.elementAt(i)).rowInserted(portItems.size() - 1);
}
}
COM: <s> add a new port to this model </s>
|
funcom_train/37609305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUsePrc(float prc) {
if (lanedir < 0) { // -1 left
rgtprc = 0;
if (shared) {
lftprc = prc/2;
truprc = prc/2;
} else {
lftprc = prc;
truprc = 0;
}
} else if (lanedir > 0) { // 1 right
lftprc = 0;
if (shared) {
rgtprc = prc/2;
truprc = prc/2;
} else {
rgtprc = prc;
truprc = 0;
}
} else if (shared) { // 0 thru
lftprc = prc/4;
rgtprc = prc/4;
truprc = prc/2;
} else {
lftprc = 0;
rgtprc = 0;
truprc = prc;
}
} // end setUsePrc()
COM: <s> set a percent of total vehicles by lane </s>
|
funcom_train/23703952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getWaitClass10g1(long eventId) {
String value = null;
try {
AshWaitClass10g1 ashWaitClass10g1 = dao.getEventIdWaitClass10g1()
.get(eventId);
if (ashWaitClass10g1 != null) {
value = ashWaitClass10g1.getValueWaitClass();
} else {
value = "";
}
} catch (DatabaseException e) {
// TODO Auto-generated catch block
value = "";
e.printStackTrace();
}
return value;
}
COM: <s> gets the wait class value from local bdb </s>
|
funcom_train/1174212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCombatDamage(final int damage, final Card source) {
int damageToDo = damage;
damageToDo = replaceDamage(damageToDo, source, true);
damageToDo = preventDamage(damageToDo, source, true);
addDamageAfterPrevention(damageToDo, source, true); //damage prevention is already checked
if (damageToDo > 0) {
GameActionUtil.executeCombatDamageToPlayerEffects(this, source, damageToDo);
}
}
COM: <s> p add combat damage </s>
|
funcom_train/46858309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToggleButton getBtnNewSelection() {
if (btnNewSelection == null) {
btnNewSelection = new JToggleButton();
btnNewSelection.setIcon(new ImageIcon(getClass().getResource("/resources/icons/selectionnew.png")));
btnNewSelection.setToolTipText("New selection");
btnNewSelection.setSelected(true);
btnNewSelection.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
SetNewSelection();
}
});
}
return btnNewSelection;
}
COM: <s> this method initializes btn new selection </s>
|
funcom_train/5373847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelection(int [] indices) {
checkWidget ();
if (indices == null) error (SWT.ERROR_NULL_ARGUMENT);
deselectAll ();
int length = indices.length;
if (length == 0 || ((style & SWT.SINGLE) != 0 && length > 1)) return;
select (indices, true);
if ((style & SWT.MULTI) != 0) {
int focusIndex = indices [0];
if (focusIndex >= 0) setFocusIndex (focusIndex);
}
}
COM: <s> fixme in java2 script there are no distinguish of int and string </s>
|
funcom_train/12243008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCompliant() {
// Assuming that a row cannot be taken out of compliance, this is a shortcut.
if(this.compliant) {return true;}
for(int i = 0; i < this.size(); i++) {
if(!valueIsCompliant(i, this.get(i))) {return false;}
}
this.compliant = true;
return true;
}
COM: <s> determine if this values in this row are complaint with the rows </s>
|
funcom_train/40026662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calculateHighCard() {
type = HandValueType.HIGH_CARD;
rankings[0] = type.getValue();
// Get the five highest ranks.
int index = 1;
for (Card card : cards) {
rankings[index++] = card.getRank();
if (index > 5) {
break;
}
}
}
COM: <s> calculates the hand value based on the highest ranks </s>
|
funcom_train/607515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Atr open() {
Atr atr = new Atr();
try {
output.addText("Power on");
atr = session.open();
}
catch (Exception e) {
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
error.addText(sw.toString());
}
return atr;
}
COM: <s> opens the default session </s>
|
funcom_train/10505336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCompletelyBlacklisted() {
if (isRoot()) {
return false;
}
String[] rootModuleConfigurations = getRootModuleConfigurations();
for (int i = 0; i < rootModuleConfigurations.length; i++) {
if (!isBlacklisted(rootModuleConfigurations[i])) {
return false;
}
}
return true;
}
COM: <s> indicates if this node has been blacklisted in all root module configurations </s>
|
funcom_train/18785104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createTagStack(char[] src, IWikiModel wikiModel, int endPos) {
fEndPos = endPos;
if (fEndPos > fStartPos) {
String rawWikiText = new String(src, fStartPos, fEndPos - fStartPos);
AbstractParser parser = wikiModel.createNewInstance(rawWikiText);
fStack = parser.parseRecursiveInternal(wikiModel, true, true);
}
}
COM: <s> create the internal tag nodes stack for a single list line </s>
|
funcom_train/5723019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reloadWikiSiteInfo() throws ApplicationException {
if (siteVersionInfo == null || siteVersionInfo.getId() == null) {
logger.error("Site version info incomplete!");
throw new ApplicationException("wiki_error_siteinfo_not_found");
}
siteVersionInfo = wikiService.getWikiSiteContent(siteVersionInfo.getId());
if (siteVersionInfo == null) {
logger.error("Site version info incomplete!");
throw new ApplicationException("wiki_error_siteinfo_not_found");
}
}
COM: <s> reloads site version info object from business layer </s>
|
funcom_train/15907470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add_Relation(UmlRelation relation, UmlClassInstance other) throws RuntimeException {
UmlItem[] v = new UmlItem[2];
v[0] = relation;
v[1] = other;
UmlCom.send_cmd(identifier_(), OnInstanceCmd.addRelationCmd, v);
UmlCom.check();
}
COM: <s> add the slot does nothing if it already exist </s>
|
funcom_train/20583019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findLine(int lineNumber) {
try {
if (lineNumber < getLineNumber())
return -1;
else if (lineNumber == getLineNumber())
return 1;
else {
while (!isEOF()) {
readLine();
if (getLineNumber() == lineNumber)
return 1;
}
// if the code reached here, the EOF was reached before lineNumber
return 0;
}
}
catch (Exception e) {
System.err.println("File input error");
}
return -2;
}
COM: <s> runs over the file until reaching the line number </s>
|
funcom_train/19826387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void activationChanged() {
int i = selectionModel.getSelectedIndex();
if (i != -1) {
Rectangle r = new Rectangle();
getTabRect(i, r);
if (r.width != 0 && r.height != 0) {
displayer.repaint(r.x, r.y, r.width, r.height);
}
}
}
COM: <s> called if prop active on the displayer changes </s>
|
funcom_train/46627350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSections(Element output, Element body) {
List content = getBodyContent(body.content());
for (Iterator iter = content.iterator(); iter.hasNext();) {
Node node = (Node) iter.next();
if (isHeading(node)) {
makeSection(output, node);
} else {
guaranteeHasSection(output);
processNode(node);
}
}
}
COM: <s> iterates thorugh the given body looking for h1 h2 h3 nodes and </s>
|
funcom_train/50000624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configure(JobConf conf) {
setConf(conf);
try {
filesystem = FileSystem.get(conf);
} catch(Exception e) {
throw new RuntimeException("Cannot get file system.", e);
}
try {
hostName = InetAddress.getLocalHost().getHostName();
} catch(Exception e) {
throw new RuntimeException("Error getting hostname", e);
}
}
COM: <s> mapper base implementation </s>
|
funcom_train/25524149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayFriendshipRequestPopup(final String fromName, final UUID fromUUID, final UUID sessionUUID) {
// Run in a new thread to avoid blocking the connection reader.
new Thread(new Runnable() {
/**
* Called when the thread is run.
*/
@Override
public void run() {
new PopupFriendshipRequest(mainWindow, fromName, fromUUID, sessionUUID).setVisible(true);
}
}).start();
}
COM: <s> display a friendship request popup </s>
|
funcom_train/16310566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setExternal(boolean external) {
externalRadio.setSelection(external);
externalDirCombo.setEnabled(external);
externalScript.setEnabled(external);
externalBrowseButton.setEnabled(
external
&& ( externalDirCombo.getSelectionIndex()
== externalDirCombo.indexOf(
MarkingScriptWizard.DIR_EXERCISE)));
manualRadio.setSelection(!external);
manualScript.setEnabled(!external);
}
COM: <s> configures the page according to the given boolean so that external </s>
|
funcom_train/1406746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGridLineParameter(final double xAxisStepSize, final double yAxisStepSize, final int lengthOfLineSegment, final int lengthOfBlankSegment) {
parameterMap.put(GridLineParameter.class, new GridLineParameter(xAxisStepSize, yAxisStepSize, lengthOfLineSegment, lengthOfBlankSegment));
}
COM: <s> sets the grid line parameter </s>
|
funcom_train/9913338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getFieldData(Object businessEntityInstance, ContextInterface context) {
Object fieldData = null;
fieldData = (String)FieldUtils.getTargetField(businessEntityInstance, this.getFieldName());
if(this.isNull(fieldData) && this.getInstanceHandler() != null){
return this.getInstanceHandler().createJsonInstance(this);
}
return fromObject(fieldData);
}
COM: <s> gets the field data </s>
|
funcom_train/13493577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String fitToDigits(String s, int i) {
if (s.length() < i) {
int end = i - s.length();
for (int j = 0; j < end; j++) {
s = "0" + s;
}
} else if (s.length() > i) {
s = s.substring(0, i);
}
return s;
}
COM: <s> adds leading zeros or removes digits if string does not match the </s>
|
funcom_train/37829482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void filterOutAboveOrBelowGround(final Set<StendhalRPZone> zonesInRegion, final Boolean aboveGround) {
final Set<StendhalRPZone> removals = new HashSet<StendhalRPZone>();
for (StendhalRPZone zone : zonesInRegion) {
if(aboveGround.booleanValue()) {
if(zone.getLevel() < 0) {
removals.add(zone);
}
} else {
if(zone.getLevel() >= 0) {
removals.add(zone);
}
}
}
zonesInRegion.removeAll(removals);
}
COM: <s> filter out zones above or below ground </s>
|
funcom_train/12760611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void debugFile(String prefix) {
PrintWriter pw = null;
try {
pw = DebugFiles.getWriter(prefix, "html");
debugPrint(pw, prefix);
}
catch(Throwable t) {
//TODO Provide missing message ?
logger.error("", t);
}
finally {
if(pw != null)
pw.close();
}
}
COM: <s> create a debug file containing all information about the response </s>
|
funcom_train/15867201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void body() {
try {
AgentContext actx = getContext(getAgentName() );
actx.getContext().quitWorkspace();
} catch (Exception ex) {
System.err.println("quit_workspace failed");
ex.printStackTrace();
//throw new Exception("quit_workspace failed: " + ex);
}
}
COM: <s> creates a new instance of quit workspace </s>
|
funcom_train/27838034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void listRightBox6_itemStateChanged(ItemEvent e) {
String value = (String) _listRightBox6.getSelectedItem();
if (value != null) {
if (value.equals(" ")) {
_listRightBox6.setSelectedIndex(-1);
}
}
_query.setModified(true);
} //--listRightBox6_itemStateChanged
COM: <s> executed when value of the right combobox in row 6 has changed </s>
|
funcom_train/21471796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeDocumentText(int offset, int length) {
System.out.println(offset + " REMOVE " + length);
try {
String first = document.get(0, offset);
String last = document.get(offset + length, document.getLength()
- offset - length);
first = first + last;
System.out.println(first);
document.set(first);
setDirty(true);
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> removes text in the document </s>
|
funcom_train/8631870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAfterLast() throws SQLException {
try {
debugCodeCall("isAfterLast");
checkClosed();
int row = result.getRowId();
int count = result.getRowCount();
return row >= count || count == 0;
} catch (Exception e) {
throw logAndConvert(e);
}
}
COM: <s> checks if the current position is after the last row that means next </s>
|
funcom_train/40616680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isAfterLast() throws SQLException {
try {
debugCodeCall("isAfterLast");
checkClosed();
int row = result.getRowId();
int count = result.getRowCount();
return count > 0 && row >= count;
} catch (Exception e) {
throw logAndConvert(e);
}
}
COM: <s> checks if the current position is after the last row that means next </s>
|
funcom_train/20798982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected URLConnection openURLConnection() throws IOException {
final String locator = getMediaLocator();
if (locator == null) {
return null;
}
final URL url;
try {
url = new URL(locator);
} catch (MalformedURLException ex) {
throw new IllegalArgumentException(ex);
}
// Open a connection to URL
final URLConnection connection = url.openConnection();
connection.connect();
return connection;
}
COM: <s> opens the connection to the configured media locator </s>
|
funcom_train/51210963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processCacheEvent(Event<CacheEvent> event) {
if (event.getProducer() != dataCache)
return;
switch(event.getType()) {
case CACHE_UpdatedLabels:
resetScreenDataBuffer();
updateScreenData();
break;
case CACHE_UpdatedData:
for (int s = 0; s < screenDataBuffer.length; s++) {
if (screenDataBuffer[s].doShow)
updateSeriesTransformer(s);
}
updateScreenData();
break;
}
}
COM: <s> if cached label info is changed the screen buffer is recreated </s>
|
funcom_train/3417600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AbstractStringBuilder insert(int dstOffset, CharSequence s) {
if (s == null)
s = "null";
if (s instanceof String)
return this.insert(dstOffset, (String)s);
return this.insert(dstOffset, s, 0, s.length());
}
COM: <s> inserts the specified code char sequence code into this sequence </s>
|
funcom_train/40614401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSet getGeneratedKeys() throws SQLException {
try {
int id = getNextId(TraceObject.RESULT_SET);
if (isDebugEnabled()) {
debugCodeAssign("ResultSet", TraceObject.RESULT_SET, id, "getGeneratedKeys()");
}
checkClosed();
return conn.getGeneratedKeys(this, id);
} catch (Exception e) {
throw logAndConvert(e);
}
}
COM: <s> return a result set that contains the last generated auto increment key </s>
|
funcom_train/3656121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sync() {
try {
StreamResult result = new StreamResult(src.getOutputStream());
BinderFactory.getInstance().createBinder().
marshal(DefaultEncoding.ENC_NAME, this, result);
} catch (IOException e) {
throw new RegistryException(e);
}
}
COM: <s> saves the bootstrap back to its original source </s>
|
funcom_train/37829436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setZoneColors(Integer color) {
if (((color == null) && (currentColor != null))
|| ((color != null) && !color.equals(currentColor))) {
for (ZoneAttributes attr : zones) {
setZoneColor(attr, color);
if (color != null) {
attr.put("blend_method", "bleach");
} else {
attr.remove("blend_method");
}
}
}
currentColor = color;
}
COM: <s> set the current daylight color </s>
|
funcom_train/1550017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validate(K key, V value) {
if (keyPredicate != null && keyPredicate.evaluate(key) == false) {
throw new IllegalArgumentException("Cannot add key - Predicate rejected it");
}
if (valuePredicate != null && valuePredicate.evaluate(value) == false) {
throw new IllegalArgumentException("Cannot add value - Predicate rejected it");
}
}
COM: <s> validates a key value pair </s>
|
funcom_train/14070116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EventDAO getEventDAO() throws UninitializedException {
if (closed) {
throw new UninitializedException(DAOFactory.DB_ERROR_MESSAGE);
}
if (eventDAO == null) {
try {
eventDAO = new EventDAO(env,dbConfig);
}
catch (DatabaseException e) {
throw new UninitializedException("Cannot access event database",e);
}
}
return eventDAO;
}
COM: <s> get the dao in charge of handling event persistence </s>
|
funcom_train/34084719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean connect() {
String url = "jdbc:mysql://" + add + ":" + port + "/" + name;
if(Settings.DEBUG) System.out.println("Database URL: " + url);
try {
con = DriverManager.getConnection(url, user, pass);
} catch (SQLException e) {
System.err.println("SQL Error on connect!");
if(Settings.DEBUG) e.printStackTrace();
return false;
}
return true;
}
COM: <s> establish a connection to the database </s>
|
funcom_train/47738969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GraphModelEdit createCellEdit(Map attributes, ConnectionSet cs, ParentMap pm, UndoableEdit[] edits) {
//GraphModelEdit edit = new GraphModelEdit(cs, propertyMap, pm);
GraphModelEdit edit = createEdit(null, null, attributes, cs, pm);
if (edit != null) {
if (edits != null) for (int i = 0; i < edits.length; i++)
edit.addEdit(edits[i]);
edit.end();
}
return edit;
}
COM: <s> returns an edit that represents a change </s>
|
funcom_train/2026482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTests(List<TestSuite> testSuites) {
RunTestDialog.suites = testSuites;
TestLogger.debug("Number of test suites: "
+ RunTestDialog.suites.size());
if (testSuites.size() == 0) {
throw new RuntimeException("List of test suites must not be empty");
}
// view first test suite or first test case:
if (testSuites.size() > 0) {
TestSuite ts = suites.get(0);
setTestSuite(ts);
}
}
COM: <s> set lists of test suites and test cases to be executed </s>
|
funcom_train/13995952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void tearDownAttributeSubscribers() {
eventBroker.unsubscribeAttributeChange(TYPES[0], ATTRIBUTES[0], attributeSubscribers[0]);
eventBroker.unsubscribeAttributeChange(TYPES[0], ATTRIBUTES[0], attributeSubscribers[1]);
eventBroker.unsubscribeAttributeChange(TYPES[0], ATTRIBUTES[1], attributeSubscribers[2]);
eventBroker.unsubscribeAttributeChange(TYPES[1], ATTRIBUTES[0], attributeSubscribers[3]);
}
COM: <s> tears down attribute change subscribers </s>
|
funcom_train/3346390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stopDriver() {
final Device dev = getDevice();
final int max = ideProcessors.length;
for (int i = 0; i < max; i++) {
ideProcessors[i].stop();
ideProcessors[i] = null;
}
dev.unregisterAPI(IDEControllerAPI.class);
}
COM: <s> stop and release the structures required by this driver </s>
|
funcom_train/40227363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int bufIndex(int nodeIndex) {
if(nodeIndex == 0) return 0;
if(buf != null) {
int cni = 0;
for(int i = 0; i < buf.length(); ++i) {
if(buf.charAt(i) == '.') {
if(++cni == nodeIndex) return i + 1;
}
}
}
return -1;
}
COM: <s> calculates the string wise index from a given node index </s>
|
funcom_train/2891198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
try {
if (cm != null) {
if (cm.connection != null) {
cm.connection.kill();
}
cm = null;
}
if (am != null) {
if (am.connection != null) {
am.connection.kill();
}
am = null;
}
} catch (NullPointerException e) {
if (Debug.mode) {
e.printStackTrace(Debug.stream);
}
} catch (Exception e) {
if (Debug.mode) {
e.printStackTrace(Debug.stream);
}
}
}
COM: <s> clears the main data members of the whiteboard </s>
|
funcom_train/10616920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testKeyStoreException04() {
Throwable cause = null;
KeyStoreException tE = new KeyStoreException(cause);
assertNull("getMessage() must return null.", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
}
COM: <s> test for code key store exception throwable code constructor </s>
|
funcom_train/11095855 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
for (int i = 0; i < callbacks.length; i++) {
WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
String pass = passwords.get(pc.getIdentifer());
if (pass != null) {
pc.setPassword(pass);
return;
}
}
}
COM: <s> it attempts to get the password from the private </s>
|
funcom_train/13511264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ImageIcon getIcon(){
URL url = null;
if (value.booleanValue()){
url = ClassLoader.getSystemResource("net/sf/birdy/tableview/true.gif");
} else {
url = ClassLoader.getSystemResource("net/sf/birdy/tableview/false.gif");
}
return new ImageIcon(url);
}
COM: <s> get the icon from the value </s>
|
funcom_train/41737575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private char getNextchar(char c)throws CharNotFoundException{
int i=-1;
do{i++;
if(i==alphabet.length) {
throw new CharNotFoundException("..One or more char in the seed string is not a valid char in our alphabet list which is "+ new String(alphabet));
}
} while(c!=alphabet[i]);
return alphabet[i+1];
}
COM: <s> this method implements the rules which determines how to combine and permute </s>
|
funcom_train/44832792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMask(java.lang.String mask) {
String result = (String) ComponentUtils.invokeMethod(getPage().getHandler(),
getMethod("onSetMask"), new Object[] {mask});
this.mask = (result != null) ? result : mask;
}
COM: <s> setter for property mask </s>
|
funcom_train/17096148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOutputDir(String outputDir) {
String separator = System.getProperty("file.separator");
if (!outputDir.endsWith(separator))
outputDir = outputDir + separator;
if (System.getProperty("file.separator").equals(WINDOWS_FILE_SEPARATOR)) {
outputDir = outputDir.replace("\\", "\\\\");
}
this.outputDir = outputDir;
}
COM: <s> sets the output dir </s>
|
funcom_train/19149870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection getConnection() throws SQLException {
Connection con = null;
if (this.username == null && this.password == null) {
con = DriverManager.getConnection(this.url);
}
else {
con = DriverManager.getConnection(this.url, this.username, this.password);
}
return con;
}
COM: <s> returns a connection to the database </s>
|
funcom_train/28752277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInfrontgroup(Long newVal) {
if ((newVal != null && this.infrontgroup != null && (newVal.compareTo(this.infrontgroup) == 0)) ||
(newVal == null && this.infrontgroup == null && infrontgroup_is_initialized)) {
return;
}
this.infrontgroup = newVal;
infrontgroup_is_modified = true;
infrontgroup_is_initialized = true;
}
COM: <s> setter method for infrontgroup </s>
|
funcom_train/8804604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update(int value32) {
update((byte)((value32>>>24)&0xff));
update((byte)((value32>>>16)&0xff));
update((byte)((value32>>> 8)&0xff));
update((byte)((value32>>> 0)&0xff));
}
COM: <s> add four bytes for hashing </s>
|
funcom_train/37859239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unlinkDocument(DBBroker broker, DocumentImpl doc) throws PermissionDeniedException {
if(!getPermissionsNoLock().validate(broker.getSubject(), Permission.WRITE)) {
throw new PermissionDeniedException("Permission denied to remove" +
" document from collection: " + path);
}
documents.remove(doc.getFileURI().getRawCollectionPath());
}
COM: <s> removes the document from the internal list of resources but </s>
|
funcom_train/3619334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTargetMilestonePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Bug_targetMilestone_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Bug_targetMilestone_feature", "_UI_Bug_type"),
EclipsesrsPackage.Literals.BUG__TARGET_MILESTONE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the target milestone feature </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.