__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/16614236
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private ScoredMappingMatrix geneScoresFromTranscriptScores(ScoredMappingMatrix transcriptScores) {
// find which gene pairs actually score, store result in a "flag" matrix
// this avoids having to do all-vs-all comparison
ScoredMappingMatrix geneFlagMatrix = flagMatrixFromTranscriptScores( transcriptScores );
ScoredMappingMatrix geneScores = scoringMatrixFromFlagMatrix( geneFlagMatrix, transcriptScores, false );
return geneScores;
}
COM: <s> build a matrix of source target gene scores based on transcript scores </s>
|
funcom_train/13255747
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void save() {
currentPanel.lostFocus();
if (!checkFinish()) {
return; // panels with problems are expected to notify the user by
// themselves
}
int retval = modelLoader.saveModel(data, this, null);
switch (retval) {
case ModelLoader.SUCCESS:
data.resetChanged();
this.setTitle("JABA - "
+ modelLoader.getSelectedFile().getAbsolutePath());
break;
case ModelLoader.FAILURE:
JOptionPane.showMessageDialog(this,
modelLoader.getFailureMotivation(), "Error",
JOptionPane.ERROR_MESSAGE);
break;
}
}
COM: <s> saves current model br </s>
|
funcom_train/33817080
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void navigationStackChange(ActionEvent event){
// get from the context panel stack item to show as well
// as the title associated with the link.
FacesContext context = FacesContext.getCurrentInstance();
Map map = context.getExternalContext().getRequestParameterMap();
selectedPanel = (String) map.get("stackName");
}
COM: <s> action listener for the changes the selected panel stack in the </s>
|
funcom_train/7903994
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void drawStatic(Canvas canvas) {
canvas.drawBitmap(compass, PADDING, getHeight() - PADDING - compass.getHeight(), null);
canvas.drawText(northLabel, PADDING + compass.getWidth() / 2, getHeight() - PADDING - compass.getHeight() - 5,
this.getPaint());
}
COM: <s> draw various static gfx compass </s>
|
funcom_train/18454105
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean add(ASNModule module) {
if ((module == null) || (module.getName() == null)
|| (module.getResource() == null))
return false;
addToMapList(modules, module.getName(), module);
addToMapList(resources, module.getResource(), module);
return true;
}
COM: <s> adds the current module to the list </s>
|
funcom_train/25540272
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String retrieveAUID(String starName) {
String auid = null;
try {
getParent().setCursor(
Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
AAVSODatabaseConnector vsxConnector = AAVSODatabaseConnector.vsxDBConnector;
Connection vsxConnection = vsxConnector.createConnection();
StarInfo starInfo = vsxConnector.getAUID(vsxConnection, starName);
auid = starInfo.getAuid();
getParent().setCursor(null);
} catch (Exception e) {
MessageBox.showErrorDialog(this,
"Star Information Retrieval Error", e);
}
return auid;
}
COM: <s> retrieve the auid of the specified star from the database first </s>
|
funcom_train/5662688
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addEmploymentEnabledPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_View_employmentEnabled_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_View_employmentEnabled_feature", "_UI_View_type"),
ViewPackage.eINSTANCE.getView_EmploymentEnabled(),
true,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the employment enabled feature </s>
|
funcom_train/25566373
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void generateExtraRandomMatrix() {
for (int i = 0; i < size; i++) {
for (int j = 0; j < getExtraMatrix().getTable().getColumnCount(); j++) {
Double value = (extraMax - extraMin)*Math.random() + extraMin;
getExtraMatrix().getTable().setValueAt(value.toString(), i, j);
}
}
}
COM: <s> generation of whole extra matrix in random way </s>
|
funcom_train/50430312
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void print() {
for(int i=0;i<vertices.size();i++) {
((Vertex) vertices.elementAt(i)).print();
Debug.println();
}
for(int j=0;j<edges.size();j++) {
((Edge) edges.elementAt(j)).print();
Debug.println();
}
}
COM: <s> prints out the entire graph structure </s>
|
funcom_train/9890082
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getNewItemName(String newName, List<? extends DatabaseItem> items) {
String defaultName = newName;
boolean isExisting = false; int i = 1;
do {
isExisting = false;
for(DatabaseItem item : items) {
if(item.name.equals(defaultName)) {
isExisting = true;
defaultName = newName + "(" + i + ")";
i++;
break;
}
}
} while(isExisting);
return defaultName;
}
COM: <s> returns a name for a new database object that is unique i </s>
|
funcom_train/4852877
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JButton getCancelButton() {
if (cancelButton == null) {
cancelButton = new JButton();
cancelButton.setText("Stop");
cancelButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
controller.stopProcess();
messageLabel.setText("Search stopped!");
}
});
}
return cancelButton;
}
COM: <s> this method initializes cancel button </s>
|
funcom_train/27864487
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setBounds(double[] wnes){
if(wnes[0] > wnes[2] || wnes[1] < wnes[3]){
throw new IllegalArgumentException("Invalid Camera bounds");
}
this.wb = wnes[0];
this.nb = wnes[1];
this.eb = wnes[2];
this.sb = wnes[3];
}
COM: <s> sets the horizontal bounds for this camera </s>
|
funcom_train/22416165
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void saveMessage(HttpServletRequest request, String msg) {
List messages = (List) request.getSession().getAttribute(MESSAGES_KEY);
if (messages == null) {
messages = new ArrayList();
}
messages.add(msg);
request.getSession().setAttribute(MESSAGES_KEY, messages);
}
COM: <s> saves a message in the http session </s>
|
funcom_train/26410269
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public XmlNode toXmlNode() {
final XmlNode xmlNode;
if (srcFile != null) {
xmlNode = new XmlNode(Constants.FILE);
xmlNode.setAttribute(Constants.SOURCE, srcFile.getAbsolutePath());
} else {
xmlNode = new XmlNode(Constants.FOLDER);
}
xmlNode.setAttribute(Constants.NAME, nodeName);
return xmlNode;
}
COM: <s> used to save data to install </s>
|
funcom_train/49249359
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void removeNodeSpi() throws BackingStoreException {
org.w3c.dom.Node root = PreferencesController.getInstance().getXMLDocument().getDocumentElement();
Element myNode = myXMLNode();
Element parentNode = (Element)myNode.getParentNode();
if(root.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE) {
Element docRoot = (Element) root;
parentNode.removeChild(myNode);
}
}
COM: <s> removes this node from the backing store </s>
|
funcom_train/6330600
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Entity createEntity( String name, String value ) {
EntityProxy entity = null;
try {
entity = (EntityProxy)database().createObject( EntityImpl.class.getName() );
entity.init( this, name, value );
} catch (Exception except) {
throw new DOMExceptionImpl( DOMExceptionImpl.PDOM_ERR, except.getMessage() );
}
return entity;
}
COM: <s> creates a new internal entity declaration and returns it </s>
|
funcom_train/35751341
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void filterANDKeywords() {
searchString = searchString.replaceAll(" AND ", " ");
//tokenize
String[] tmp = searchString.split(" ");
for (int i = 0; i < tmp.length; i++) {
searchObject.addKeywordAND(tmp[i]);
}
}
COM: <s> eliminates all remaining and s from the search query </s>
|
funcom_train/26117037
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setColor(int color, boolean callback){
int alpha = Color.alpha(color);
int red = Color.red(color);
int blue = Color.blue(color);
int green = Color.green(color);
float[] hsv = new float[3];
Color.RGBToHSV(red, green, blue, hsv);
mAlpha = alpha;
mHue = hsv[0];
mSat = hsv[1];
mVal = hsv[2];
if(callback && mListener != null){
mListener.onColorChanged(Color.HSVToColor(mAlpha, new float[]{mHue, mSat, mVal}));
}
invalidate();
}
COM: <s> set the color this view should show </s>
|
funcom_train/29518444
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void StoreNewNodePosition(AP node, Integer nodeNumber, Integer second) {
NodeCheckPoint checkPoint = new NodeCheckPoint(node.x, node.y, new Float(0));
m_model.StoreNodePosition(nodeNumber, second, checkPoint);
//nodePositions[nodeNumber][second] = checkPoint;
}
COM: <s> store one position of a node in the matrix of positions </s>
|
funcom_train/18220279
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private TableConfiguration createSCMFolderTableConfiguration() {
final TableConfiguration configuration = new TableConfiguration(
FolderDBTable.TABLE_NAME);
configuration.addMandatoryColumn(FolderDBTable.ID);
configuration.addMandatoryColumn(FolderDBTable.DEVELOPMENTLINEID);
configuration.addMandatoryColumn(FolderDBTable.DEVELOPMENTLINETYPEID);
configuration.addMandatoryColumn(FolderDBTable.ENABLED);
configuration.addMandatoryColumn(FolderDBTable.NAME);
configuration.addMandatoryColumn(FolderDBTable.PATH);
configuration.addMandatoryColumn(FolderDBTable.PROJECT_NAME);
return configuration;
}
COM: <s> creates the configuration for the scm folder table </s>
|
funcom_train/2425855
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addStructure(NumericOid oid, ObjectClassStructure structure) {
NumericOid toCheck = (structure != null) ? structure.getOid() : oid;
ObjectClassDefinition classDef = classes.getClassDefinition(toCheck);
checkArgument(classDef != null, "Unknown class: " + toCheck);
structures.put(classDef, structure);
}
COM: <s> adds an code object class structure code to this collection </s>
|
funcom_train/4866047
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private int calculateSize(int maxWidth, int maxHeight, int minWidth, int minHeight) {
if ( (maxWidth < minWidth) || (maxHeight < minHeight) ) {
return 0;
}
return this.N * calculateSize(maxWidth / 2, maxHeight / 2, minWidth, minHeight) + 1;
}
COM: <s> calculates the size of the array that is needed to store the </s>
|
funcom_train/28424039
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void execute() throws BuildException {
Enumeration en = tasks.elements();
while ( en.hasMoreElements() ) {
Task task = (Task)en.nextElement();
task.perform();
if ( task instanceof Breakable ) {
if ( ( (Breakable)task ).doBreak() ) {
setBreak( true );
return;
}
}
}
}
COM: <s> execute all nested tasks checking for breakables </s>
|
funcom_train/4918003
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testLoadCommandParameterFromEnvironment() throws Exception {
final String NAME = "env-name";
final String VALUE = "env-value";
// Setup environment property
this.environment.put(NAME, VALUE);
// Run the command (within this process)
MockCommand command = this.createCommand("command", NAME);
this.run("", command);
// Ensure run
assertTrue("Process should be run", isRun(command));
// Ensure parameter value loaded
assertEquals("Parameter not loaded from environment", VALUE, command
.getParameterValues().get(NAME));
}
COM: <s> ensure can load </s>
|
funcom_train/48382004
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JMenuItem getJTextMenuItem() {
if (jTextMenuItem == null) {
jTextMenuItem = new JMenuItem();
jTextMenuItem.setText("Insert text field here");
jTextMenuItem
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
stepType = StepType.TextField;
addTextField();
repaint();
revalidate();
}
});
}
return jTextMenuItem;
}
COM: <s> this method initializes j text menu item </s>
|
funcom_train/25923866
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void unRegisterSwingWorkerForCancel(JTree tree, SwingWorker<MutableTreeNode[], ?> worker) {
if (!cancelable) {
return;
}
Action action = tree.getActionMap().get(ESCAPE_ACTION_NAME);
if (action != null && action instanceof CancelWorkersAction) {
CancelWorkersAction cancelWorkerAction = new CancelWorkersAction();
cancelWorkerAction.removeSwingWorker(worker);
}
}
COM: <s> remove the swing worker from the cancellable task of the tree </s>
|
funcom_train/32089077
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public KeyValuePair getHttpHost() {
KeyValuePair got = getValue(host);
if (got == null) {
System.out.println("no Host in header");
return emptyHost;
}
// remove the port number
int colonPos = got.eol;
int i;
for (i = got.val; i < got.eol; i++) {
if (got.chars[i] == ':') {
colonPos = i;
break;
}
}
got.eol = colonPos;
return got;
}
COM: <s> usually returns localhost or whatever </s>
|
funcom_train/47104301
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeEnemies(int level){
Land[][] tempLand = cities.get(level);
for(int i = 0; i < tempLand.length; i++){
for(int k = 0; k < tempLand[0].length; k++){
tempLand[i][k].setEnemy(null);
}
}
}
COM: <s> removes all enemies on the specified level </s>
|
funcom_train/22863265
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void init() {
GLSLDisplay.printDebugInfoN("Initializing FBO:");
glState.initSize(getView().getSize().width, getView()
.getSize().height);
glState.getFboManager().setupFBO(glState);
glState.initLineCache(this);
LightCollection.initMap();
ShadowLightCollection.initMap();
MaterialCollection.initMap();
GLSLChannelMap.initMap();
FloatToFloatCollection.initMap();
Transform3DCollection.initMap();
}
COM: <s> initialize open gl proteus </s>
|
funcom_train/7623755
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int getSinkPriority(String address) {
if (DBG) log("getSinkPriority(" + address + ")");
try {
return mService.getSinkPriority(address);
} catch (RemoteException e) {
Log.w(TAG, "", e);
return BluetoothError.ERROR_IPC;
}
}
COM: <s> get priority of a2dp sink </s>
|
funcom_train/2578353
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected Size2D arrangeNN(BlockContainer container, Graphics2D g2) {
List blocks = container.getBlocks();
Block b = (Block) blocks.get(0);
Size2D s = b.arrange(g2, RectangleConstraint.NONE);
b.setBounds(new Rectangle2D.Double(0.0, 0.0, s.width, s.height));
return new Size2D(s.width, s.height);
}
COM: <s> arranges the blocks without any constraints </s>
|
funcom_train/33481159
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void showDetail(Long trackedID) {
loadTrackedList();
waypointTable.setCurrentTrackID("");
waypointTable.removeAllWayPoints();
Record[] records = cbTrackedList.getStore().getRecords();
for (Record record : records) {
if (record.getAsString("trackedusername").equals("" + trackedID)) {
cbTrackedList.setValue(record.getAsString("trackedname"));
loadTrackList(Long.parseLong(record
.getAsString("trackedusername")));
break;
}
}
}
COM: <s> show detail of a tracked </s>
|
funcom_train/5513501
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void readableFieldChanged(X3DFieldEvent evt) {
if (evt.getSource() == isOver) {
if (isOver.getValue() == true)
diffuseColor.setValue(RED);
else
diffuseColor.setValue(BLUE);
} else {
System.out.println("Unhandled event: " + evt);
}
}
COM: <s> handle field changes </s>
|
funcom_train/46378490
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeEventListener(EventListener listener) {
if (app == null) {
return;
}
synchronized (app.getAppCleanupLock()) {
synchronized (eventListeners) {
if (eventListeners.contains(listener)) {
eventListeners.remove(listener);
for (View2D view : views) {
view.removeEventListener(listener);
}
}
}
}
}
COM: <s> remove an event listener from all of this windows views </s>
|
funcom_train/50119298
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int add_new_affect(String name, int what, int duration) {
if(is_affect(name))
return -1;
affect_spell na = new affect_spell(name, what, duration);
affect_sp.addElement(na);
updatestats();
return 0;
}
COM: <s> this method adds a new affect spell to the living </s>
|
funcom_train/39069737
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected String getDefaultIssueURL(){
String clipboardText = getClipboardText();
if ((clipboardText.startsWith("http://") || clipboardText.startsWith("https://") && clipboardText.length() > 10)){
return clipboardText;
}
String defaultPrefix = MylarPlugin.getDefault().getPreferenceStore().getString(MylarTasklistPlugin.DEFAULT_URL_PREFIX);
if (!defaultPrefix.equals("")){
return defaultPrefix;
}
return taskURL;
}
COM: <s> returns the default url text for the task by first </s>
|
funcom_train/4780380
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public AccessRule addServerAccessRuleForUser(String userName, String level) throws AppException {
Validator.validateUserName(userName);
Validator.validateLevelOfAccess(level);
User user = addUser(userName);
Path path = addPath(null, "/");
AccessRule accessRule = new AccessRule(path, user, level);
path.addAccessRule(accessRule);
accessRules.add(accessRule);
user.addAccessRule(accessRule);
setUnsavedChanges();
return accessRule;
}
COM: <s> adds a new server level access rule specifying user authorization </s>
|
funcom_train/46395050
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void drawCentered(Graphics2D g, int x, int y) {
double xshift = image.getWidth(null) / 2;
double yshift = image.getHeight(null) / 2;
AffineTransform at = AffineTransform.getTranslateInstance(x - xshift, y
- yshift);
g.drawImage(image, at, null);
}
COM: <s> draw the sprite centered at x y </s>
|
funcom_train/22115370
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void enqueueObject(Object object) {
if (object == null) {
throw new NullPointerException("trying to enqueue null.");
}
List queue = (List)THREADLOCAL_QUEUE.get();
if (queue == null) {
queue = new LinkedList();
THREADLOCAL_QUEUE.set(queue);
}
queue.add(object);
}
COM: <s> enqueue an object on the thread local </s>
|
funcom_train/8609646
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void createChatHandlers() {
final CommandChatHandler adminCCH = new CommandChatHandler();
addChatHandler(adminCCH);
// set global loader
sm.setGlobalClassListener(new ChatHandlersLoader(adminCCH));
try {
sm.load(CHAT_DESCRIPTOR_FILE);
}
catch (Exception e) {
throw new GameServerError("Can't initialize chat handlers.", e);
}
}
COM: <s> creates and return object of </s>
|
funcom_train/21845034
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void initializeLog() {
if( log != null )
return;
log = new JBFOutput(this);
try {
log.open(new Value(CONSOLE_NAME), globals);
} catch (JBasicException e) {
e.printStackTrace();
}
log.setSystemFlag();
Value v = null;
try {
v = globals().reference("SYS$LOGLEVEL");
}
catch( JBasicException e ) {
v = new Value(Value.INTEGER, null);
try {
globals().insertReadOnly("SYS$LOGLEVEL", v);
} catch (JBasicException e1) {
e1.printStackTrace();
}
}
v.setInteger(1);
}
COM: <s> initialize the logging system if needed </s>
|
funcom_train/22911807
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Integer formattedtoId(String formatted) {
DecimalFormat myFormatter = new DecimalFormat(idPattern);
Number id = null;
try {
id = myFormatter.parse(formatted);
} catch (ParseException ex) {
// TODO Auto-generated catch block
ex.printStackTrace();
}
Integer realId = null;
if (id != null) {
realId = new Integer(id.intValue());
}
return realId;
}
COM: <s> convert a formatter string to an integer </s>
|
funcom_train/7421497
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addTargetFor(Transition transition, Output output) {
if ((this.targetFor.size() > 0) && (this.sourceFor.size() > 1)) {
output.addError("This gateway " +
" is a split gateway and cannot have multiple"+
" incoming transitions.", getId());
} else {
super.addTargetFor(transition, output);
}
}
COM: <s> checks if the gateway has already multiple outgoing transitions </s>
|
funcom_train/8542377
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String findContextNameForId(int contextId) {
Cursor contextCursor = getContext().getContentResolver().query(
AGtd.Contexts.CONTENT_URI, new String[] {AGtd.Contexts.TITLE},
AGtd.Contexts._ID + "=?", new String[] {"" + contextId}, null);
String result = "INBOX";
if (contextCursor.first()) {
result = contextCursor.getString(0);
}
AGtdContentProvider.popCursor(contextCursor);
return result;
}
COM: <s> lookup method that searches for a context name </s>
|
funcom_train/49752382
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Command getComandoVolverPrincipal() {
if (comandoVolverPrincipal == null) {//GEN-END:|67-getter|0|67-preInit
// write pre-init user code here
comandoVolverPrincipal = new Command("Back", Command.BACK, 0);//GEN-LINE:|67-getter|1|67-postInit
// write post-init user code here
}//GEN-BEGIN:|67-getter|2|
return comandoVolverPrincipal;
}
COM: <s> returns an initiliazed instance of comando volver principal component </s>
|
funcom_train/42906011
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void index_conv_enc(int[] index) {
for (int k = 1; k < CB_NSTAGES; k++) {
if ((index[k] >= 108) && (index[k] < 172)) {
index[k] -= 64;
} else if (index[k] >= 236) {
index[k] -= 128;
} else {
// ERROR
}
}
}
COM: <s> convert the codebook indexes to make the search easier </s>
|
funcom_train/965358
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected Container createButtonArea() {
JPanel bottom = new JPanel(new ExtButtonAreaLayout(true, 6));
bottom.setBorder(UIManager.getBorder("OptionPane.buttonAreaBorder"));
addButtonComponents(bottom, getButtons(), getInitialValueIndex());
return bottom;
}
COM: <s> creates and returns a container containin the buttons </s>
|
funcom_train/34269561
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void connect(ConnectionModel cmodel) throws ConnectionFailedException {
if (!(cmodel instanceof URLConnectionModel)) {
try {
connection.connect(new URLConnectionModel(cmodel.getHostName(), cmodel.getPort()));
}
catch (UnknownHostException uhe) {
throw new ConnectionFailedException(uhe.getMessage());
}
}
else
connection.connect(cmodel);
}
COM: <s> connect using an existing connection model </s>
|
funcom_train/27906174
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String toString() {
StringBuffer buff = new StringBuffer();
String linefeed = System.getProperty("line.separator");
buff.append(header).append(linefeed);
buff.append(top).append(linefeed);
buff.append(retr).append(linefeed);
buff.append(dele).append(linefeed);
return buff.toString();
}
COM: <s> return a string prepresentation of this summary information </s>
|
funcom_train/36428768
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void computeNbThreads() {
int nb = Runtime.getRuntime().availableProcessors() * 2 + 1;
if (nb > 32) {
nb = Runtime.getRuntime().availableProcessors() + 1;
}
if (SERVER_THREAD < nb) {
logger.info("Change default number of threads to " + nb);
SERVER_THREAD = nb;
CLIENT_THREAD = SERVER_THREAD*10;
}
}
COM: <s> compute number of threads for both client and server from the real number </s>
|
funcom_train/18747741
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setAndNot(GraphTest test) throws IllegalStateException {
testFixed(false);
getNegConjunct().setOr(test);
if (test instanceof GraphCondition) {
addAndNot((GraphCondition) test);
} else {
for (GraphCondition condition: ((GraphPredicate) test).getConditions()) {
addAndNot(condition);
}
}
}
COM: <s> calls code get neg predicate </s>
|
funcom_train/21619985
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testSetPayment() throws Exception {
System.out.println("setPayment");
PaymentBO pmt = new PaymentBO(GUID.generate(), trans);
trans.setPayment(pmt);
assertEquals("Unable to set or get payment.", pmt, trans.getPayment());
}
COM: <s> test of set payment method of class edu </s>
|
funcom_train/18322936
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addAccessModifierPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FieldDeclaration_accessModifier_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FieldDeclaration_accessModifier_feature", "_UI_FieldDeclaration_type"),
MetalangPackage.Literals.FIELD_DECLARATION__ACCESS_MODIFIER,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the access modifier feature </s>
|
funcom_train/854465
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void ensureRowArray( int capacity ) {
if( rows.length < capacity ){
Row[] array = new Row[Math.max( capacity, rows.length * 2 ) + 1];
System.arraycopy( rows, 0, array, 0, rowCount );
rows = array;
}
}
COM: <s> versichert dass der row array genug lang f r code capacity code </s>
|
funcom_train/21143894
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setDIALOG_OR_FRAME(int DIALOG_OR_FRAME) {
this.DIALOG_OR_FRAME = DIALOG_OR_FRAME;
if(DIALOG_OR_FRAME == newgen.presentation.component.NewGenConstants.DIALOG_MODE){
bSearchRequest.setEnabled(false);
}
// else{
// bSearchRequest.setEnabled(true);
// }
}
COM: <s> setter for property dialog or frame </s>
|
funcom_train/15913667
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean hasTerminalClass( List instanceClassesL ) {
boolean answer = false;
Iterator classIter = instanceClassesL.iterator();
while ( classIter.hasNext() ) {
String instanceClass = (String)classIter.next();
if ( terminalClasses.contains( instanceClass ) ) {
answer = true;
break;
}
}
return answer;
}
COM: <s> is there a terminal class among list of instance classes </s>
|
funcom_train/802636
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addDoublePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SupDataType_double_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SupDataType_double_feature", "_UI_SupDataType_type"),
MzdataPackage.Literals.SUP_DATA_TYPE__DOUBLE,
true,
false,
false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the double feature </s>
|
funcom_train/28999280
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected Document createWaitXMLDoc(String msg, String refreshUrl) {
Document doc = new Document(new Element(XT_PORTAL_SERVICES));
Element wait = new Element(XT_WAIT);
wait.setAttribute(XA_WAIT_MSG, msg);
wait.setAttribute(XA_WAIT_REFRESH_URL, refreshUrl);
doc.getRootElement().addContent(wait);
return doc;
}
COM: <s> answer an xml document consisting of an pre error pre element with </s>
|
funcom_train/9644885
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int getSGAnchorY(SG sg) {
for (Iterator iter = sgCompTupels.iterator(); iter.hasNext();) {
SGComponentTupel tupel = (SGComponentTupel) iter.next();
if (sg == tupel.getSG()) {
return tupel.overlapComp.getY()
+ (tupel.overlapComp.getHeight() / 2);
}
}
throw new IllegalArgumentException("sg not found: " + sg);
}
COM: <s> gets the subgroup anchor y </s>
|
funcom_train/15554940
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void add(double value, double n) {
sum += value * n;
sumSq += value * value * n;
count += n;
if (Double.isNaN(min)) {
min = max = value;
} else if (value < min) {
min = value;
} else if (value > max) {
max = value;
}
}
COM: <s> adds a value that has been seen n times to the observed values </s>
|
funcom_train/16855264
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void displayData() {
title.setText(TITLE);
textPresantation.setText(SUMMARY);
developers.setText("Développée par : ");
developerD.setText("Didier Girard");
developerP.setText("Patrice De Saint-Steban");
developerM.setText("Mehdi Ben Houria");
developerC.setText("Clement Griffoin");
developerE.setText("Ekaterina Suetina");
urlSfeir.setText("m.sfeir.com");
Contact.setText("Pour en savoir plus sur Sfeir :");
encadrer.setText("Encadré Par:");
}
COM: <s> displays the data of this activity </s>
|
funcom_train/39801452
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setHighlighters(Highlighter... inList) {
Contract.asNotNull(inList, "Highlighter must not be null");
if (highlighters.isEmpty() && (inList.length == 0)) return;
removeAllHighlightersSilently();
for (Highlighter highlighter : inList) {
addHighlighterSilently(highlighter, false);
}
fireStateChanged();
}
COM: <s> sets the given </s>
|
funcom_train/33718439
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setRangePos(Range r, AxedChar cp1, AxedChar cp2) {
AxedEvent e = eventPool.newEvent(AxedEvent.ATOMIC_NONE, AxedEvent.SET_RANGE_POS);
e.getSetRangePos().issue(AxedEvent.SET_RANGE_POS, r, cp1, cp2);
listeners.fireEvent(e);
eventPool.releaseEvent(e);
}
COM: <s> creates a range </s>
|
funcom_train/19180056
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void noDBDriverWarning() {
JOptionPane.showMessageDialog(this,
Resources.getString("dlgNoDBDriversLoadedText",
new File(dbDriverDir).getAbsolutePath(),
Configuration.instance().getFile(FILENAME_DRIVERS).getAbsolutePath()),
Resources.getString("dlgNoDBDriversLoadedTitle"),
JOptionPane.ERROR_MESSAGE);
}
COM: <s> notify user if no db drivers have been loaded </s>
|
funcom_train/20876309
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void afterUnassigned(long iteration, ExamPlacement value) {
ExamPlacement p = value;
iTable[p.getPeriod().getIndex()].remove(value.variable());
iDayTable[p.getPeriod().getDay()].remove(value.variable());
}
COM: <s> an exam was unassigned update student assignment table </s>
|
funcom_train/25705754
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JPanel getPbuttons() {
if( Pbuttons == null ) {
final FlowLayout flowLayout = new FlowLayout();
flowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
Pbuttons = new JPanel();
Pbuttons.setLayout(flowLayout);
Pbuttons.add(getBsave(), null);
Pbuttons.add(getBclose(), null);
}
return Pbuttons;
}
COM: <s> this method initializes pbuttons </s>
|
funcom_train/24097116
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setChildren(List<ProfileChild> childList) {
element.removeChildren("select", XCCDF_NAMESPACE);
element.removeChildren("set-value", XCCDF_NAMESPACE);
element.removeChildren("refine-value", XCCDF_NAMESPACE);
element.removeChildren("refine-rule", XCCDF_NAMESPACE);
for (int i=0; i<childList.size(); i++) {
ProfileChild child = childList.get(i);
insertChild(child, PROFILE_ORDER, -1);
}
}
COM: <s> set the children of this profile </s>
|
funcom_train/31358805
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void doSomething(int buttonNo, int row) {
if (buttonNo < 0 || buttonNo >= reorder.length)
return;
switch(reorder[buttonNo]){
case ADD:
// prompt for groupname
String groupname = JOptionPane.showInputDialog(this.rcg,
getResourceString("groupnameDialog"), getResourceString("addGroupDialog"),
JOptionPane.PLAIN_MESSAGE);
// Add the group
if (groupname != null)
addGroup(groupname);
break;
case EDIT:
details(row);
break;
case DELETE:
deleteGroup(row);
break;
}
}
COM: <s> handle button pressed event </s>
|
funcom_train/40409596
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public StringBuffer toTreeString(int depth, StringBuffer sb) {
sb.append(StringUtils.repeat("-", depth * 2)).append(this).append("\n");
for (AccountTreeNode childAccount : childAccounts) {
childAccount.toTreeString(depth + 1, sb);
}
return sb;
}
COM: <s> returns a string representation of the current level of the tree and </s>
|
funcom_train/35310401
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void updateLabelUIs() {
Dictionary labelTable = getLabelTable();
if (labelTable == null) {
return;
}
Enumeration labels = labelTable.keys();
while ( labels.hasMoreElements() ) {
JComponent component = (JComponent) labelTable.get(labels.nextElement());
component.updateUI();
component.setSize(component.getPreferredSize());
}
}
COM: <s> updates the uis for the labels in the label table by calling </s>
|
funcom_train/3597021
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private SpecialLoad findSpecialLoad(NObservation obs, NCoding coding) {
SpecialLoad sl = null;
if (specialLoads==null) { return sl; }
for (Iterator lit = specialLoads.iterator(); lit.hasNext(); ) {
SpecialLoad sl2 = (SpecialLoad)lit.next();
if (sl2.getObservation()==obs &&
sl2.getCoding()==coding) {
return sl2;
}
}
return sl;
}
COM: <s> select the name of the file to be loaded </s>
|
funcom_train/3703603
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void fireUpdateEvent(Subscription sub, Tuple t) {
SubscriptionListener lstnr = sub.getCallBack();
UpdateEvent evt = new UpdateEvent(sub, t);
if (DEBUG == true) {
System.out.println("Firing event: " + evt);
System.out.println(" From sub: " + sub);
}
lstnr.onUpdate(evt);
} // of method
COM: <s> fire off a notification </s>
|
funcom_train/43245401
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testSetTmpAddrToDate() {
System.out.println("setTmpAddrToDate");
Calendar tmpAddrToDate = null;
PatientDemographicsDG5Object instance = new PatientDemographicsDG5Object();
instance.setTmpAddrToDate(tmpAddrToDate);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set tmp addr to date method of class org </s>
|
funcom_train/43294249
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean activeThreadsFound() {
synchronized (m_ActiveThreadsLock) {
//get value iterator
Iterator iterator = m_ActiveThreads.values().iterator();
//current value?
Boolean currentValue = null;
//iterate over all values?
while (iterator.hasNext()) {
//get current value
currentValue = (Boolean) iterator.next();
//error found?
if (currentValue.booleanValue()) {
//error found
return true;
}
}
//no error found
return false;
}
}
COM: <s> searches for active threads </s>
|
funcom_train/8103200
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: /* public void testGraphVizLinksIn() {
System.out.println("GraphVizLinksIn");
Category instance = new Category();
String expResult = "";
String result = instance.GraphVizLinksIn();
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 graph viz links in method of class wikipedia </s>
|
funcom_train/15577052
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void fileRegisteredEvent(File file) {
++nbFilesRegistered;
this.progressBar.setValue(nbFilesRegistered);
String text = "" + nbFilesRegistered + " of " + nbFiles;
this.counterLabel.setText(text);
this.textArea.append(file.getPath());
this.textArea.append("\n");
int pos = this.textArea.getText().length() - 1;
textArea.setCaretPosition(pos);
}
COM: <s> a file has been registered </s>
|
funcom_train/29017961
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Rectangle getBounds () {
checkWidget ();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
RECT rect = getBounds (0, true, false, false);
int width = rect.right - rect.left, height = rect.bottom - rect.top;
return new Rectangle (rect.left, rect.top, width, height);
}
COM: <s> returns a rectangle describing the receivers size and location </s>
|
funcom_train/2628485
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testSetValueByName() {
System.out.println("setValueByName");
String sTitle = "";
String sName = "";
String sValue = "";
GUITypeWrapper instance = null;
instance.setValueByName(sTitle, sName, sValue);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set value by name method of class guitype wrapper </s>
|
funcom_train/40337431
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Combo createRangeOp(RelationCount.RangeOption setup) {
rangeOp = new Combo(this, SWT.DROP_DOWN | SWT.READ_ONLY);
for (RelationCount.RangeOption option : COMBO_DISPLAY) {
rangeOp.add(option.getRangeLabel());
}
rangeOp.addSelectionListener(this);
rangeOp.select(getRangeIndex(setup));
return rangeOp;
}
COM: <s> create the combo box that defines the types of node count ranges </s>
|
funcom_train/9279157
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void decorateSQL(Statement stmt) throws SQLException {
Connection conn = getConnection();
/**
* Creates the table used in the test cases.
*
*/
stmt.execute("create table tab1 (i int, s smallint, r real)");
stmt.executeUpdate("insert into tab1 values(1, 2, 3.1)");
}
COM: <s> creates the tables used in the test </s>
|
funcom_train/44165652
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public DiplomaticTrade showNegotiationDialog(Unit unit, Settlement settlement, DiplomaticTrade agreement) {
NegotiationDialog negotiationDialog
= new NegotiationDialog(freeColClient, gui, unit, settlement, agreement);
negotiationDialog.initialize();
return showFreeColDialog(negotiationDialog, unit.getTile());
}
COM: <s> displays the code negotiation dialog code </s>
|
funcom_train/2421824
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public static final EntityCollectionValidationResult EMPTY = new EntityCollectionValidationResult() {
@Override
public IntegrationEntity[] getValidatedEntities() {
return new IntegrationEntity[0];
}
@Override
public ValidationResult getValidationResult(IntegrationEntity entity) {
return null;
}
@Override
public boolean isEverythingOk() {
return true;
}
@Override
public ValidationStatus status() {
return ValidationStatus.VALID;
}
@Override
public boolean isFatal() {
return false;
}
};
COM: <s> code entity collection validation result code constant representing an empty validation </s>
|
funcom_train/35322371
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean linkFirst(Node<E> node) {
// assert lock.isHeldByCurrentThread();
if (count >= capacity)
return false;
Node<E> f = first;
node.next = f;
first = node;
if (last == null)
last = node;
else
f.prev = node;
++count;
notEmpty.signal();
return true;
}
COM: <s> links node as first element or returns false if full </s>
|
funcom_train/18345731
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void handleOutputPixels(ActionEvent e) {
JCheckBox check = (JCheckBox)e.getSource();
if (check.isSelected()) {
outputPixels = true;
prefs.setProperty("OutputPixels", "TRUE");
} else {
outputPixels = false;
prefs.setProperty("OutputPixels", "FALSE");
}
prefsChanged = true;
// Update the display.
updateDisplay();
}
COM: <s> method that handles the user clicking on the output pixels check box </s>
|
funcom_train/184229
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public double execute(Parameters param) {
if (isEnabled()) {
// get parameters
Bug bug = (Bug) param.getObject("object");
BaseObject target = (BaseObject) param.getObject("target");
/* process each sensor of the bug that has the same type as the
* stimuli.
*/
for (int k = 0; k < bug.numberOfObjectSensors(); k++) {
ObjectSensor eye = (ObjectSensor)bug.getObjectSensor(k);
eye.process(target);
}
}
return 0;
}
COM: <s> resolves and processes sensory input from a stimuli to a bug </s>
|
funcom_train/47138351
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int insert(final Role role) {
Object[] params = new Object[] { new Long(role.getId()), role.getName(), role.getDescription(),
role.getCreated(), role.getLastChanged() };
return update(params);
}
COM: <s> insert role into database </s>
|
funcom_train/48055305
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ImageIcon getIcon() {
URL url = null;
if (iconName != null) {
url = Licenses.class.getResource(iconLocation + iconName);
}
if (url != null) {
return new ImageIcon(url);
} else {
return IconManager.getIcon("32x32/license.png");
}
}
COM: <s> returns the custom license icon if it exist otherwise it returns </s>
|
funcom_train/25587274
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Command getBackCommand() {
if (backCommand == null) {//GEN-END:|40-getter|0|40-preInit
// write pre-init user code here
backCommand = new Command("Cancel", Command.BACK, 0);//GEN-LINE:|40-getter|1|40-postInit
// write post-init user code here
}//GEN-BEGIN:|40-getter|2|
return backCommand;
}
COM: <s> returns an initiliazed instance of back command component </s>
|
funcom_train/8247760
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private int getWidgetOffset(int documentOffset) {
if (fTextViewer instanceof ITextViewerExtension5) {
ITextViewerExtension5 extension = (ITextViewerExtension5) fTextViewer;
return extension.modelOffset2WidgetOffset(documentOffset);
}
IRegion visible = fTextViewer.getVisibleRegion();
int widgetOffset = documentOffset - visible.getOffset();
if (widgetOffset > visible.getLength()) {
return -1;
}
return widgetOffset;
}
COM: <s> convert a document offset to the corresponding widget offset </s>
|
funcom_train/45623289
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addDirectoriesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MakeDirType_directories_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MakeDirType_directories_feature", "_UI_MakeDirType_type"),
MSBPackage.eINSTANCE.getMakeDirType_Directories(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the directories feature </s>
|
funcom_train/29771220
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetColumnNames() {
System.out.println("getColumnNames");
ExcelFile instance = new ExcelFile();
ArrayList<String> expResult = null;
ArrayList<String> result = instance.getColumnNames();
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 column names method of class names </s>
|
funcom_train/18861136
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected GlobalExceptionsType createGlobalExceptions() {
GlobalExceptionsType element = StrutsConfigFactory.eINSTANCE
.createGlobalExceptionsType();
StrutsConfigType root = ((ConfigEditor) getPage().getEditor())
.getModelRoot();
Command command = SetCommand.create(getEditingDomain(), root,
StrutsConfigPackage.eINSTANCE.getGlobalExceptionsType(),
element);
if (command.canExecute()) {
getEditingDomain().getCommandStack().execute(command);
}
return element;
}
COM: <s> creates a new global exceptions element and adds it to the root element </s>
|
funcom_train/51147781
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void run( IAction action )
{
RouteManagerEditor routeEditor = new RouteManagerEditor();
Shell shell = window.getShell();
routeEditor.createPartControl( shell );
IViewSite site = routeEditor.getViewSite();
try {
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("XUIPRO_ROUTEMANAGER");
}
catch ( PartInitException e ) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> the action has been activated </s>
|
funcom_train/12126955
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void clip(Shape s) {
Rectangle2D clipBds = s.getBounds2D();
SWTShapeManager.transform(clipBds, transform);
SWTShapeManager.awtToSWT(clipBds, SWT_RECT);
org.eclipse.swt.graphics.Rectangle clip = gc.getClipping();
clip = clip.intersection(SWT_RECT);
gc.setClipping(SWT_RECT);
}
COM: <s> this method isnt really supported by swt so will use the shape bounds </s>
|
funcom_train/3175751
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setValue(String set) {
// ignore if linked
if (target!=null)
return;
// 20070128 don't bother with calculating old if this is happening in init()
String old = getParent()==null?null:getValue();
// remember value
value = set.replace('@',' ').trim();
// remember change
if (old!=null) propagatePropertyChanged(this, old);
// done
}
COM: <s> sets this propertys value as string </s>
|
funcom_train/49798869
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getURL() {
FacesContext context = FacesContext.getCurrentInstance();
// String uri = ((BridgeExternalContext)context.getExternalContext()).getRequestURI();
return this.getDomain() + this.getContextPath() + "/" + context.getViewRoot().getViewId();
}
COM: <s> calculate url of page incl </s>
|
funcom_train/16521979
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void fireEditingStopped() {
CellEditorListener listener;
Object[] listeners = listenerList.getListenerList();
for (int i = 0; i < listeners.length; i++) {
if (listeners[i] == CellEditorListener.class) {
listener = (CellEditorListener) listeners[i + 1];
listener.editingStopped(changeEvent);
}
}
}
COM: <s> invoked when stops the cell editing by removing thefocus from the editor component </s>
|
funcom_train/8011054
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getText(int rowNo) {
try {
if (_dsEval != null) {
if (_aggregateType != -1) {
_text = _dsEval.evaluateAggregateFormat(_aggregateType);
} else {
if (rowNo > -1)
_text = _dsEval.evaluateRowFormat(rowNo);
else
_text = _dsEval.evaluateRowFormat();
}
}
} catch (Exception e) {
com.salmonllc.util.MessageLog.writeErrorMessage(e, this);
}
return _text;
}
COM: <s> this method returns the text in the component </s>
|
funcom_train/3130416
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String qname(Name name) throws PropertyConstraintFailure {
Namespace ns = name.namespace();
Name prefix = (Name) prefixes.getValue(ns.uri());
if (prefix == null) {
return name.string();
} else if (prefix.string().equals("")) {
return name.string();
} else {
return prefix.string() + ":" + name.string();
}
}
COM: <s> return the xml qname string based on the name and active </s>
|
funcom_train/15718534
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setBoolean(String bool, boolean value) {
if (bool.equals("isselected"))
isselected = value;
if (bool.equals("hibernate"))
hibernate = value;
if (bool.equals("shutdown"))
shutdown = value;
if (bool.equals("con"))
con = value;
}
COM: <s> sets some booleans </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.