__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/972650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(int cual) {
if(cual>howmany){
System.out.println("No es posible extraer un elemento en esa posición.");
}else{
array[cual]=null;
for(int i=cual; i<array.length-1; i++){
array[i]=array[i+1];
}
array[howmany]=null;
howmany--;
}
}
COM: <s> removes the indicated element at position cual </s>
|
funcom_train/7243200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PublicKey createPublicKey() {
if(getKeyFile() == null && keyBase32 == null)
throw new NullPointerException("no key source!!");
// prefer string-based keys
if (keyBase32 != null)
return SignatureVerifier.readKey(keyBase32, "DSA");
return SignatureVerifier.readKey(getKeyFile(), "DSA");
}
COM: <s> creates the public key </s>
|
funcom_train/15453256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getUserImageAcceptedExtensions() {
String ext = getProperty(RESC_USER_IMAGES_ACCEPTED_EXTENSIONS);
StringTokenizer tokens = new StringTokenizer(ext, ",");
Set extensions = new LinkedHashSet();
while (tokens.hasMoreTokens()) {
extensions.add(tokens.nextToken().toLowerCase());
}
return extensions;
}
COM: <s> returns all accepted extensions to upload an user image </s>
|
funcom_train/50433534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reject(int low, int high) {
debug.assert(low >= 0 && low <= filterSet.size(), "Out of range");
debug.assert(high >= 0 && high <= filterSet.size(), "Out of range");
for (int i = low; i < high; i++) {
filterSet.clear(i);
}
} // of reject
COM: <s> filter out these values </s>
|
funcom_train/51773832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNUndeployedServces(int days) {
try {
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select count(event) from log where application='SeCSERegistry' AND event LIKE 'Undeployed Service id%' AND DATE_SUB(CURDATE(),INTERVAL " + days + " DAY) <= start");
if (rs.next())
return rs.getInt(1);
} catch (Exception e) {
e.printStackTrace();
}
return 0;
}
COM: <s> it returns the number of service undeployments in the specified period </s>
|
funcom_train/38543018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int compare(int row1, int row2) {
int result = 0;
for (int level = 0; level < this.sortingColumns.length; level++) {
result = compareRowsByColumn(row1, row2, level);
if (result != 0) {
break;
}
}
return result;
}
COM: <s> compares two rows using the sorting columns to determine which columns </s>
|
funcom_train/38807652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getPseudoAttributeNames() {
Set mapDataSet = mapData.entrySet();
List nameList = PArrayList.newInstance(instanceFactory);
for (Iterator i = mapDataSet.iterator(); i.hasNext();) {
String wholeSet = (i.next()).toString();
String attrName = wholeSet.substring(0, (wholeSet.indexOf("=")));
nameList.add(attrName);
}
return nameList;
}
COM: <s> this will return a code list code containing the names of the </s>
|
funcom_train/8569539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load() throws InvalidConfigurationException {
if (neatIdMap == null) {
neatIdMap = new NeatIdMap(props);
try {
neatIdMap.load();
} catch (IOException e) {
String msg = "error loading ID map";
logger.error(msg, e);
throw new InvalidConfigurationException(msg);
}
}
}
COM: <s> load from persistence </s>
|
funcom_train/32054518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void close(DirContext context) {
// Do nothing if there is no opened connection
if (context == null)
return;
// Close our opened connection
try {
if (debug >= 1)
log("Closing directory context");
context.close();
} catch (NamingException e) {
log(sm.getString("jndiRealm.close"), e);
}
this.context = null;
}
COM: <s> close any open connection to the directory server for this realm </s>
|
funcom_train/2714389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isCardAvailable(String name) {
Component[] comps = cards.getComponents();
for (int iCount = 0; iCount < comps.length; iCount++) {
if (name.equalsIgnoreCase(comps[iCount].getName())) {
return true;
}
}
return false;
}
COM: <s> determines whether a card is already added to the panel </s>
|
funcom_train/12653010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
merge();
this.generateAnalyticTrackingCode( );
// Reattach transient fields in associations (just invitations)
patientAssociationManager.updateInvitations(patient);
Long postalCode = patient.getPrivatePostalCode();
int postalCodeInt = postalCode.intValue() * 100;
trials.setPostalCodeGeocoding( postalCodeInt, postalCodeManager.getPostalCodeGeocoding( postalCodeInt ).getGeocoding() );
}
COM: <s> persists changes to an existing users information that is not the health </s>
|
funcom_train/10225222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String IndentationForDepth(int IndentationDepth)
{ String Result;
StringBuffer recResult;
int j, jEnd;
recResult = new StringBuffer();
for( j = 1, jEnd = IndentationDepth ; j <= jEnd ; j ++ )
recResult.append(_IndentationStep);
Result = "" + recResult;
return Result;
}
COM: <s> returns the indentation to use for indentation depth </s>
|
funcom_train/25567597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Frame getDefaultFrame() {
if(defaultFrame==null)try {
java.awt.Dimension size = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
defaultFrame = new Frame();
int border = 30;
size.width -= (border+border);
size.height -= (border+border);
defaultFrame.setLocation(border, border);
defaultFrame.setSize(size);
}catch(Exception e){//Is there HeadlesException in applets?
return null;//this is normal: dialogs in applets with null parent is shown normally
}
return defaultFrame;
}
COM: <s> returns the default default frame to use in some dialogs </s>
|
funcom_train/29768295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PreparedStatement prepareStatement(Connection connection, String query, int autoGeneratedKeys) {
VSert.argNotNull("connection", connection);
try {
PreparedStatement statement = connection.prepareStatement(query, autoGeneratedKeys);
return statement;
} catch (SQLException ex) {
throw _exTranslator.translate(ex);
}
}
COM: <s> prepares a statement and wraps exceptions </s>
|
funcom_train/46458390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void play() {
if (getFrameCount() == 1) return;
if (!timer.isRunning()) {
if (getFrameNumber() >= getEndFrameNumber())
setFrameNumber(getStartFrameNumber());
timer.restart();
support.firePropertyChange("playing", null, new Boolean(true)); //$NON-NLS-1$
}
}
COM: <s> plays the video at the current rate </s>
|
funcom_train/37240498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int work(float[] buffer)throws AOException{
float[][] buf = new float[this.inputs][];
buf[0] = new float[buffer.length];
int returned = this.previous[0].nextWork(buf[0]);
for(int i=1;i<inputs;i++){
buf[i] = new float[returned];
if(returned != this.previous[i].nextWork(buf[i])){
throw new AOException(this.name,0);
}
}
int ret=0;
for(;ret<returned;ret++){
buffer[ret] = buf[0][ret];
for(int j=1;j<inputs;j++){
buffer[ret]*=buf[j][ret];
}
}
return ret;
}
COM: <s> this next work method multiplys all inputs together </s>
|
funcom_train/8089927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
m_matrix = new Object[m_size][m_size];
for (int i = 0; i < m_size; i++) {
for (int j = 0; j < m_size; j++) {
setCell(i, j, i == j ? new Double(0.0) : new Double(1.0));
}
}
}
COM: <s> initializes the matrix </s>
|
funcom_train/25193816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInt(String key){
if(gotResource(key)) {
String value = getString(key);
try{
return Integer.parseInt(value);
}catch(NumberFormatException e) {
throw new RuntimeException("Could not fetch 'int' resource value with key=" + key+" value="+value);
}
}
else
throw new RuntimeException("The resource " + key +" does not exists");
}
COM: <s> this method tries to converts the attribute to an int value </s>
|
funcom_train/38994160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matrix transpose(){
Matrix result = new Matrix(this.getYDimension(), this.getXDimension());
for(int i = 0; i < this.getXDimension(); i++)
for(int j = 0; j < this.getYDimension(); j++)
result.setEntry(j, i, this.getEntry(i, j));
return result;
}
COM: <s> transposes this matrix i </s>
|
funcom_train/22122172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateDeploymentDir() {
try {
// Update the deployment.dir property
Main.get().getProperties().setProperty("deployment.dir", mBrowseLastPath.getAbsolutePath());
Main.get().saveProperties();
}catch(Exception e) {
logger.error("Can't update the deployment.dir property ! Exception : "+e.getMessage());
}
}
COM: <s> update the deployment </s>
|
funcom_train/15568805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSend() {
System.out.println("testSend");
Netsender _netsender=new Netsender("localhost", 3000);
_netsender.send("24");
assertTrue(true);
// Add your test code below by replacing the default call to fail.
// fail("The test case is empty.");
}
COM: <s> test of send method of class plankton </s>
|
funcom_train/7681389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void negotiateCapabilityAsync(AsyncCompletion completion) {
Primitive capabilityRequest = buildCapabilityRequest();
AsyncTransaction tx = new AsyncTransaction(
mConnection.getTransactionManager(), completion) {
@Override
public void onResponseOk(Primitive response) {
extractCapability(response);
}
@Override
public void onResponseError(ImpsErrorInfo error) { }
};
tx.sendRequest(capabilityRequest);
}
COM: <s> perform client capability negotiation with the server asynchronously </s>
|
funcom_train/21017638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getVerticalPosition(boolean asPercentage) {
double result = _verticalPosition;
if (_isExpressedAsPercentage) {
if (!asPercentage) {
double deltaHeight = _decoratedElement.getHeight()
- getHeight();
result = deltaHeight * _verticalPosition;
}
} else {
if (asPercentage) {
double deltaHeight = _decoratedElement.getHeight()
- getHeight();
result = _verticalPosition / deltaHeight;
}
}
return result;
}
COM: <s> returns the vertical position of the shown section </s>
|
funcom_train/4786324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resize() {
Point headerSize = new Point(0, 0);
Control header = parentTable.getHeaderControl();
if (header != null) {
headerSize = header.getSize();
}
Point parentSize = getParent().getSize();
setBounds(0, headerSize.y+2, parentSize.x-4, parentSize.y - headerSize.y-6);
}
COM: <s> actually resize ourself </s>
|
funcom_train/12158758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endElement() {
Iterator it = counters.iterator();
while (it.hasNext()) {
Counter counter = (Counter) it.next();
boolean done = counter.endElement();
// If this counter has gone out of scope ...
if (done) {
// ... then remove it.
it.remove();
}
}
}
COM: <s> indicate to the counters engine that the end tag for a styled element </s>
|
funcom_train/3833274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint (Graphics2D g) {
// render the halo (only if specified)
if ( halo != null ) {
try {
paintHalo( g, halo, xpoints [0], ypoints [0] - descent);
} catch (FilterEvaluationException e) {
e.printStackTrace ();
}
}
// render the text
setColor( g, color, 1.0 );
g.setFont (font);
g.drawString( caption, xpoints [0], ypoints [0] - descent );
}
COM: <s> renders the label including halo to the submitted </s>
|
funcom_train/36888274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List convertDTOs(List transitCornListView){
List transitCornListViews = null;
transitCornListViews = new ArrayList(0);
if(!CollectionUtils.isEmpty(transitCornListView)){
Iterator iterator = transitCornListView.iterator();
TransitCornDTO e = null;
while(iterator.hasNext()){
e = (TransitCornDTO) iterator.next();
transitCornListViews.add(converterTransitCornDtoToView(e));
}
}
return transitCornListViews;
}
COM: <s> transit corn converter list dto to view </s>
|
funcom_train/6476524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
Plan returnValue = new Plan();
returnValue.planIdentifier = (FOS)this.planIdentifier.clone();
returnValue.preConditions = (TerAND) this.preConditions.clone();
returnValue.postConditions = (TerAND) this.postConditions.clone();
returnValue.body = (FOS) this.body.clone();
return (Object) returnValue;
}
COM: <s> produce a simple clone of the current plan object </s>
|
funcom_train/20307770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InfGraph makeInfGraph(String rules, String data, ReificationStyle style ) {
PrintUtil.registerPrefix("eh", "eh:/");
Graph base = graphWith( data, style );
List ruleList = Rule.parseRules(rules);
return new FBRuleReasoner(ruleList).bind( base );
}
COM: <s> internal helper create an inf graph with given rule set and base data </s>
|
funcom_train/46759290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private TableColumnModel getTableColumn(IndexColumnModel index, List<TableColumnModel> columns) {
for (TableColumnModel column : columns) {
if (column.getTablename().equalsIgnoreCase(index.getTablename())) {
if (column.getColumnname().equalsIgnoreCase(index.getColumnName())) {
return column;
}
}
}
return null;
}
COM: <s> get the column for the index </s>
|
funcom_train/46999241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(OrderedStroke s) {
// Key strokes by start point
Vector bucket = (Vector) strokesTrack.get(new Long(
s.getStartPoint().time));
if (bucket == null) {
bucket = new Vector();
bucket.add(s);
strokesTrack.put(new Long(s.getStartPoint().time), bucket);
} else {
bucket.add(s);
}
}
COM: <s> add a stroke to the track </s>
|
funcom_train/47889957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getPreviousButton() {
if (previousB == null) {
previousB = new TuxButton("images/buttons/prev.png",new Rectangle(40, 28, 37, 40));
previousB.addMouseListener(new PreviousControlListener(fileBrowser, alertPlaylist, remotePlaylist));
previousB.addMouseMotionListener(new HandCursorChanger(jContentPane));
}
return previousB;
}
COM: <s> this function initializes the previous navigation button </s>
|
funcom_train/3411649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void shapeNonContextually(char[] text, int start, int count) {
int base = bases[key];
char minDigit = key == TAMIL_KEY ? '\u0031' : '\u0030'; // Tamil doesn't use decimal zero
for (int i = start, e = start + count; i < e; ++i) {
char c = text[i];
if (c >= minDigit && c <= '\u0039') {
text[i] = (char)(c + base);
}
}
}
COM: <s> perform non contextual shaping </s>
|
funcom_train/1504758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCollapsible(boolean collapsible) {
if (collapsible && collapseButton_ == null) {
collapseButton_ = new ExpandButton(true);
toolBar_.add(collapseButton_);
expandSize_ = new Dimension(bodyPanel_.getOffsetWidth(), bodyPanel_
.getOffsetHeight());
} else if (!collapsible && collapseButton_ != null) {
toolBar_.remove(collapseButton_);
collapseButton_ = null;
}
}
COM: <s> this method toggles the collapse button on the panel </s>
|
funcom_train/42510235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setObserverHeight(float observerHeight) {
if (observerHeight != this.observerHeight) {
float oldObserverHeight = this.observerHeight;
this.observerHeight = observerHeight;
this.propertyChangeSupport.firePropertyChange(Property.OBSERVER_HEIGHT.name(), oldObserverHeight, observerHeight);
}
}
COM: <s> sets the edited observer height </s>
|
funcom_train/7385402 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectCellForEvent(Object cell, MouseEvent e) {
boolean isSelected = graph.isCellSelected(cell);
if (isToggleEvent(e)) {
if (isSelected) {
graph.removeSelectionCell(cell);
} else {
graph.addSelectionCell(cell);
}
} else if (!isSelected || graph.getSelectionCount() != 1) {
graph.setSelectionCell(cell);
}
}
COM: <s> selects the cell for the given event </s>
|
funcom_train/11324421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void render(StringBuilder buffer, String filename) {
buffer.append("<li><a href='#");
buffer.append(TaskUtils.getFilename(filename));
buffer.append("'>");
buffer.append(filename);
buffer.append("</a></li>");
}
COM: <s> render the html represenation of the given filename </s>
|
funcom_train/28723273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoomIn() {
if (sourceImage == null)
return;
Rectangle rect = getClientArea();
int w = rect.width, h = rect.height;
double dx = ((double) (w / 2));
double dy = ((double) (h / 2));
if(transform.getScaleX()>ZOOM_UPPER_BOUND || transform.getScaleY()>ZOOM_UPPER_BOUND) return;
centerZoom(dx, dy, zoom_rate, transform);
}
COM: <s> zoom in around the center of client area </s>
|
funcom_train/14070454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flushTriggers() throws DataException {
try {
EntityCursor<TriggerVO> cursor = primaryIndex.entities();
for (TriggerVO t : cursor) {
primaryIndex.delete(t.getPrimaryKey());
}
cursor.close();
}
catch (DatabaseException e) {
logger.log(Level.SEVERE,"Flushing triggers",e);
throw new DataException("Unable to flush triggers");
}
}
COM: <s> flush all the triggers this wipes out all triggers stored </s>
|
funcom_train/18861044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadModel(IPath modelPath, boolean readOnly) {
URI modelURI = URI.createPlatformResourceURI(modelPath
.toPortableString());
ResourceSet resourceSet = editingDomain.getResourceSet();
modelResource = (StrutsConfigResourceImpl) resourceSet.getResource(
modelURI, true);
if (readOnly) {
editingDomain.getResourceToReadOnlyMap().put(modelResource,
Boolean.TRUE);
}
StrutsConfigType root = getModelRoot();
root.eAdapters().add(new StrutsConfigVersionAdapter());
}
COM: <s> loads the configuration model from the given path </s>
|
funcom_train/19165171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setWrapperFor(String name, Class componentWrapper) {
if(!ComponentWrapper.class.isAssignableFrom(componentWrapper)) {
throw new IllegalArgumentException("given class " + componentWrapper.getName() + " must be a ComponentWrapper");
}
if(classWrapper==null) {
classWrapper=new HashMap();
}
classWrapper.put(name, componentWrapper);
}
COM: <s> sets the component wrapper for the property with the given name </s>
|
funcom_train/34617965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFullyQualifiedName() {
List<Scope> idents = getAncestorScopesAsList();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < idents.size(); i++) {
Scope ident = idents.get(i);
sb.append(ident.getFullLocalName());
sb.append(getDelimiter());
}
sb.append(this.getFullLocalName());
String fqName = sb.toString();
return fqName;
}
COM: <s> returns the fully qualified name of this scope </s>
|
funcom_train/12776360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void revertToPreTransitive() {
for (Iterator it = iterateKeys(); it.hasNext();) {
PointerKey key = (PointerKey) it.next();
if (!isTransitiveRoot(key) && !isImplicit(key) && !isUnified(key)) {
PointsToSetVariable v = getPointsToSet(key);
v.removeAll();
}
}
}
COM: <s> wipe out the cached transitive closure information </s>
|
funcom_train/1058814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Composite createAdvancedArea(Composite composite) {
Composite parent= new Composite(composite, SWT.CENTER);
GridLayout layout = new GridLayout();
parent.setLayout(layout);
// new copyright area
savePreferencesButton = new Button(parent, SWT.CHECK);
savePreferencesButton.setText("Store author and copyright values in preferences.");
GridData gd = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
savePreferencesButton.setLayoutData(gd);
return parent;
}
COM: <s> creates and returns the content of the advanced area </s>
|
funcom_train/37082007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getOrganism(XMLElement xml, SequenceI seq) {
XMLElement genus = getGrandchild(xml, "genus");
XMLElement species = getGrandchild(xml, "species");
if (genus != null && species != null) {
seq.setOrganism(genus.getCharData() + " " + species.getCharData());
}
}
COM: <s> sequences do have an organism field </s>
|
funcom_train/20644272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TransactionsRoot0 getTransactionsRoot0() {
if (getTarif() != null) {
WorkSheet ws= getTarif().getWorkSheet();
// check if I'm attached to a valid tarif
if (ws != null && (TransactionsRoot0.class.isInstance(ws))) {
return (TransactionsRoot0) ws;
}
m_log.fatal( "My Tarif does not hold an valid root WS" );
}
m_log.warn( "Not on a Tarif" );
return null;
}
COM: <s> get the transactions root0 tarif im working on </s>
|
funcom_train/21848984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize(Font f) {
String[] fonts = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment()
.getAvailableFontFamilyNames();
JList list = m_view.getList(FontViewNames.ID_FAMILY_LIST);
DefaultListModel lmodel = new DefaultListModel();
list.setModel(lmodel);
for (int index = 0; index < fonts.length; index++) {
lmodel.addElement(fonts[index]);
}
if (f != null) {
setFontValue(f);
}
}
COM: <s> initializes the view with the current font set </s>
|
funcom_train/14330192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Handler getBestHandler(Request request) throws HandlerException {
synchronized ( handlerMutex ) {
for ( int i = 0; i < handlers.length; i++ )
if ( handlers[i].isRequestValid(request) )
return handlers[i];
}
throw new HandlerException("No Handler for '"+request.getPath()+"'");
}
COM: <s> get best handler returns the most appropriate handler for the </s>
|
funcom_train/42268157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawAxesAndGrid(Graphics gc, Component comp, Rectangle bounds) {
// Draw a box around the boundary of the plot.
gc.drawRect(bounds.x, bounds.y, bounds.width, bounds.height);
gc.drawRect(bounds.x+1, bounds.y+1, bounds.width-2, bounds.height-2);
// Draw the horizontal axis and grid.
xAxis.draw(gc, comp, bounds);
// Draw the vertical axis and grid.
yAxis.draw(gc, comp, bounds);
}
COM: <s> draw the plots horizontal and vertical axes and </s>
|
funcom_train/20308761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetKB() {
getConnection().bindKB( true, getProfile() );
// reset the name caches
m_indNames.clear();
m_indNamesAsked = false;
m_conceptNames.clear();
m_conceptNamesAsked = false;
m_roleNames.clear();
m_roleNamesAsked = false;
}
COM: <s> p clear the old contents of the dig knowledge base p </s>
|
funcom_train/46500579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJScrollPaneIMMe(String thisID) {
// if (jScrollPaneIMMe == null) {
jScrollPaneIMMe = new JScrollPane();
jScrollPaneIMMe.setMinimumSize(new Dimension(0, 22));
jScrollPaneIMMe.setViewportView(getJTextPaneIMMe(thisID));
jScrollPaneIMMe.setName(thisID);
// }
return jScrollPaneIMMe;
}
COM: <s> this method initializes j scroll pane imme </s>
|
funcom_train/37658055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processNode(Node node) {
Node child;
NodeList nl;
nl = node.getChildNodes();
for (int i=0; i<nl.getLength(); i++) {
child = nl.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE) {
filterElement((Element) child);
}
processNode(child);
}
}
COM: <s> recursevely process the dom node removing elements attributes with </s>
|
funcom_train/37588718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void _interpret(String toEval) {
// System.err.println("interpret setting toEval to " + toEval);
this.toEval = toEval;
if (errorPresent) replReturnedSyntaxError(errorString1, errorString2, -1, -1, -1, -1); // imitate return with syntax error
else replReturnedVoid(); // imitate successful return
}
COM: <s> simulates a syntax error in interpretation </s>
|
funcom_train/3085607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLayoutComponent(Component comp) throws OutOfBoundsException, OverlapException {
CellConstraints cell = null;
//
// they just want the next available cell. Lets find it.
boolean done = false;
while (!done) {
cell = new CellConstraints(cursorCol, cursorRow);
if (_overlaps(cell)) {
space();
} else {
space();
break;
}
}
if (cursorCol >= width)
width = cursorCol + 1;
if (cursorRow >= height)
height = cursorRow + 1;
super.addLayoutComponent(comp, cell);
_addInOrder(cell);
}
COM: <s> adds a component to the layout manager in the next available cell </s>
|
funcom_train/43849480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handle( HttpServletResponse response, HttpServletRequest request, String mimeType, String charsetName, String xformsDBEncoding, InputStream content, boolean logResponse ) throws HandlerException {
logger.log( Level.DEBUG, "Method has been called." );
this.handle( response, request, mimeType, charsetName, xformsDBEncoding, content, 0, logResponse );
}
COM: <s> write the response </s>
|
funcom_train/22683432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ResultSet executeQuery(String query) throws SQLException {
if (query == null) {
throw new IllegalArgumentException("Cannot execute query for null query string.");
}
Connection con = openConnection();
Statement s = con.createStatement();
ResultSet result = s.executeQuery(query);
return result;
}
COM: <s> executes a query against the underlying database </s>
|
funcom_train/4280504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(BundleContext bc) throws Exception {
System.out.println("STARTING PSICQUIC Registry Client");
// Dictionary props = new Properties();
// add specific service properties here...
//System.out.println( "REGISTER org.hupo.psi.mi.psicquic2.ExampleService" );
// Register our example service implementation in the OSGi service registry
//bc.registerService( ExampleService.class.getName(), new ExampleServiceImpl(), props );
}
COM: <s> called whenever the osgi framework starts our bundle </s>
|
funcom_train/14274638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getVFSDefaultDirectory(VolumeReference volRef, String fileType) throws ConduitHandlerException, NotConnectedException {
try {
return jHotSync.getVFSDefaultDirectory(volRef, fileType);
} catch (DLPFunctionCallException e) {
throw new ConduitHandlerException(e.toString(), e);
}
} // end-method
COM: <s> retrieves the vfs default directory </s>
|
funcom_train/31684713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContentType(String sContentType) throws PopulateException {
if (isPopulated() == true) {
if ((m_sContentType == null && sContentType != null) || m_sContentType.equals(sContentType) == false) {
setIsChanged(true);
}
}
m_sContentType = sContentType;
}
COM: <s> sets the mime type of this code asset code </s>
|
funcom_train/4518374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enumerateChildren(TimeBarNode node, List<TimeBarNode> children) {
if (node.getChildren() != null && _hvs.isExpanded(node)) {
for (TimeBarNode timeBarNode : node.getChildren()) {
children.add(timeBarNode);
enumerateChildren(timeBarNode, children);
}
}
}
COM: <s> fill a list with all children of the given node that are visible </s>
|
funcom_train/5727625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WikiSiteContentInfo importWikiSiteContent(Long importDomainId, WikiSiteContentInfo exportWikiSiteContent) {
final WikiSiteContentInfo importWikiSiteContent = new WikiSiteContentInfo(exportWikiSiteContent);
importWikiSiteContent.setId(null);
importWikiSiteContent.setWikiSiteId(null);
importWikiSiteContent.setDomainId(importDomainId);
saveWikiSite(importWikiSiteContent);
return importWikiSiteContent;
}
COM: <s> clones existing wiki site and imports it to a specific domain object </s>
|
funcom_train/9298707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String select_query(String select,String from,String where,String sort,String start,String count){
String sql="SELECT "+select+" FROM "+from;
if (!where.equals("")) sql+=" WHERE "+where;
if (!sort.equals("")) sql+=" ORDER BY "+sort;
if (!start.equals("") || !count.equals("")) sql+=" LIMIT "+start+","+count;
return sql;
}
COM: <s> generates sql for select query </s>
|
funcom_train/50062684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRoles() {
int size;
RoleDAO dao = new RoleDAO();
size = dao.getRoles().size();
List<RoleDTO> list = new ArrayList<RoleDTO>();
list = dao.getRoles();
for (int i = 0; i < list.size(); i++) {
new pits.util.Logger().writeln(i + " " + list.get(i).getRole());
}
Assert.assertEquals(3, size);
}
COM: <s> test method for </s>
|
funcom_train/25360979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void applyLocaliztionInUI() {
// add action listeners
rbmiLanguageArabic.addActionListener(new ApplyLocalizationAction("project.jpdftools.localization.ar_EG"));
rbmiLanguageEnglish.addActionListener(new ApplyLocalizationAction("project.jpdftools.localization.en_US"));
// add radio button components to the menu
menu.add(rbmiLanguageArabic);
menu.add(rbmiLanguageEnglish);
}
COM: <s> applies the localization in the ui </s>
|
funcom_train/890632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
if (CacheHandler.logger.isLoggable(Level.FINER)) {
CacheHandler.logger.entering("CacheHandler", "close()", "start");
}
theCtrl.close();
if (CacheHandler.logger.isLoggable(Level.FINER)) {
CacheHandler.logger.exiting("CacheHandler", "close()", "end");
}
}
COM: <s> close the cache </s>
|
funcom_train/38413878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void queueMessage( NetMessage message ) {
if( nbMessages==aggregationMsgLimit ) {
// the user has not tunned his aggregation limit very well...
setAggregationMessageLimit( (short) (aggregationMsgLimit+10) );
}
messageList[nbMessages] = message;
nbMessages++;
if( senderType!=USER_AGGREGATION )
notify();
}
COM: <s> to queue a message </s>
|
funcom_train/1339837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateAll() {
Iterator<WeakReference<Section>> it = sections.values().iterator();
while (it.hasNext()) {
Section section = it.next().get();
if (section == null) {
it.remove(); // may as well clean it up.
} else {
section.refreshImage();
}
}
}
COM: <s> tell all sections that they need to be updated to display properly </s>
|
funcom_train/8477609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void bufferStatusChanged(long bufferStartsAt, long len) {
this.bufferStartsAt = bufferStartsAt;
this.len = len;
boolean update = (System.currentTimeMillis()-lastBufferUpdate)>25;
if(!update)
return;
lastBufferUpdate = System.currentTimeMillis();
timeSeeker.setBuffered(bufferStartsAt, len);
timeSeeker.setNow(nowPlaying);
timeSeeker.setStatus(this.status);
timeSeeker.update();
}
COM: <s> streaming player listener implementation </s>
|
funcom_train/36229496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean saveLeftFullRectifiedPhoto(String absulutePath) {
getLeftRectifiedFullImage();
if (leftRectifiedImage == null)
return false;
try {
ImageUtil.writeToJPEG(leftRectifiedImage, absulutePath);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return false;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return false;
}
return true;
}
COM: <s> save left epipolar rectified full photo </s>
|
funcom_train/13874172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOperationCallExpPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EnforcementOperation_operationCallExp_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EnforcementOperation_operationCallExp_feature", "_UI_EnforcementOperation_type"),
QvtcorePackage.Literals.ENFORCEMENT_OPERATION__OPERATION_CALL_EXP,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the operation call exp feature </s>
|
funcom_train/43100385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstruction() {
assertNotNull(ProjectBrowser.getInstance());
ProjectBrowser pb = ProjectBrowser.getInstance();
assertNotNull(pb.getLocale());
assertNotNull(pb.getAppName());
assertNotNull(pb.getTabProps());
assertNotNull(pb.getStatusBar());
assertNotNull(pb.getJMenuBar());
assertNotNull(pb.getEditorPane());
assertNotNull(pb.getNamedTab(Translator.localize("tab.properties")));
assertNotNull(pb.getNamedTab(Translator.localize("tab.source")));
assertNotNull(pb.getTodoPane());
}
COM: <s> tests that the projectbrowser is created or can be created </s>
|
funcom_train/30005116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getDescriptionArea() {
if (this.descriptionArea == null) {
this.descriptionArea = new JTextArea();
this.descriptionArea.setLineWrap(true);
this.descriptionArea.setWrapStyleWord(true);
this.descriptionArea.setEditable(true);
}
return this.descriptionArea;
}
COM: <s> gets the description pane </s>
|
funcom_train/32722644 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String formatForSql(Object obj, DatabasePolicy dbPolicy) {
String returnValue;
if (obj == null) {
returnValue = "null";
} else {
java.util.Date d = (java.util.Date) obj;
returnValue = dbPolicy.formatTimestamp(new Timestamp(d.getTime()));
}
return returnValue;
}
COM: <s> returns the string representation of code java </s>
|
funcom_train/37590502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateUndoState() {
if (_doc.undoManagerCanUndo() && isEditable()) {
setEnabled(true);
putValue(Action.NAME, _doc.getUndoManager().getUndoPresentationName());
}
else {
setEnabled(false);
putValue(Action.NAME, "Undo");
}
}
COM: <s> updates the undo list i </s>
|
funcom_train/34519666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getDWORD(){
long value = (get()&0xFFL);
value |= (get()&0xFFL)<<8;
value |= (get()&0xFFL)<<16;
value |= (get()&0xFFL)<<24;
value &= 0xFFFFFFFFL;
return value;
}
COM: <s> returns a 4 byte unsigned little endian integer starting at the current position </s>
|
funcom_train/13865468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setState(boolean open, boolean fireEvents) {
if (open && getChildCount() == 0) {
return;
}
// Only do the physical update if it changes
if (this.open != open) {
this.open = open;
updateState(true, true);
}
if (fireEvents && tree != null) {
tree.fireStateChanged(this);
}
}
COM: <s> sets whether this items children are displayed </s>
|
funcom_train/1562755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModeParam(float value) {
switch(mode) {
case HUE:
setHSB(value, sat, bri);
break;
case SAT:
setHSB(hue, value, bri);
break;
case BRI:
setHSB(hue, sat, value);
break;
case RED:
setRGB((int)(value * 255), green, blue);
break;
case GREEN:
setRGB(red, (int)(value * 255), blue);
break;
case BLUE:
setRGB(red, green, (int)(value * 255));
break;
}
}
COM: <s> set the mode parameter </s>
|
funcom_train/49262887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateRule() {
String[] values = null;
if (trueValue != null) {
if (falseValue != null) {
values = new String[] {trueValue, falseValue};
} else {
values = new String[] {trueValue};
}
} else if (falseValue != null) {
values = new String[] {falseValue};
}
if (values != null) {
addRule(new EnumRule(this, values), true);
} else {
removeAllOf(EnumRule.class);
}
}
COM: <s> updates the property enumeration rule given the current value </s>
|
funcom_train/9978707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canLink(ProjectContext context, NodeContainer node1, NodeContainer node2) {
if (node1 instanceof NodeAction) {
NodeAction nm = NodeAction.class.cast(node1);
Struts2CustomObject co = nm.getAdapter(Struts2CustomObject.class);
if (co == null)
return false;
UrlManager url = node2.getAdapter(UrlManager.class);
if (url == null) {
if (node2 instanceof NodeView) {
NodeView nv = (NodeView) node2;
if (Struts2GenericViewManager.viewID.equals(nv.getMgrId()))
return true;
}
return false;
}
return true;
}
return false;
}
COM: <s> check if this plugin can perfmorm this kind of link </s>
|
funcom_train/13706880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose() {
for (int i = 0; i < retargetActions.size(); i++) {
RetargetAction action = (RetargetAction) retargetActions.get(i);
getPage().removePartListener(action);
}
registry.dispose();
retargetActions = null;
registry = null;
super.dispose();
}
COM: <s> disposes the contributor </s>
|
funcom_train/50224714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEnabled(boolean b) {
//this may be called before the menu is raised
//no problem as by default the text area is enabled
if (cutMenuItem != null) cutMenuItem.setEnabled(b);
if (pasteMenuItem != null) pasteMenuItem.setEnabled(b);
super.setEnabled(b);
}
COM: <s> enable disable the menu items depending on whether it is enabled </s>
|
funcom_train/8013281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void hideColumn(String name) {
TableColumnModel mod = getColumnModel();
try {
int ndx = mod.getColumnIndex(name);
if (ndx > -1) {
STableColumn col = (STableColumn) mod.getColumn(ndx);
mod.removeColumn(col);
_invisibleColumns.add(col);
}
}
catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> makes a column with the specified name invisible </s>
|
funcom_train/22285623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getTabHeight(int layer) {
int nlayers = getLayerCount();
if (layer > nlayers) {
return 0;
}
int result = 0;
switch (tabMode) {
case TOP:
result = getFontMetrics(tabFont).getHeight() + 8;
if ((nlayers > 1 && layer == 0) || nlayers == 1) {
result = Math.max(result, getFontMetrics(selectFont).getHeight() + 8);
}
break;
}
return result;
}
COM: <s> get the height of the tabs on the given layer </s>
|
funcom_train/46948563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextFieldCrInfoStrctAnnotName() {
if (jTextFieldCrInfoStrctAnnotName == null) {
jTextFieldCrInfoStrctAnnotName = new JTextField();
jTextFieldCrInfoStrctAnnotName
.setPreferredSize(new Dimension(4, 19));
jTextFieldCrInfoStrctAnnotName.setEditable(false);
}
return jTextFieldCrInfoStrctAnnotName;
}
COM: <s> this method initializes j text field cr info strct annot name </s>
|
funcom_train/23411507 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addClassPredicatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_ClassAtom_classPredicate_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_ClassAtom_classPredicate_feature",
"_UI_ClassAtom_type"),
SwrlPackage.Literals.CLASS_ATOM__CLASS_PREDICATE, true, false,
true, null, null, null));
}
COM: <s> this adds a property descriptor for the class predicate feature </s>
|
funcom_train/10801147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MetaDataRepository getRepository() {
if (_repos == null) {
_repos = newRepository();
_repos.setResolve(MODE_MAPPING, false);
MetaDataFactory factory = _repos.getMetaDataFactory();
factory.getDefaults().setIgnoreNonPersistent(false);
factory.setStoreMode(MetaDataFactory.STORE_VERBOSE);
}
return _repos;
}
COM: <s> the repository to use to hold metadata </s>
|
funcom_train/51062486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean addTSinkType( TSink ts, Class event_type ) {
Class current_type = event_type;
while (current_type != null) {
Object o = subscribed_types.get(current_type);
if (o != null) {
if (o instanceof SinkIF && ts.mySinkIF.equals((SinkIF)o)) {
//return Boolean.FALSE;
} else {
return Boolean.TRUE;
}
} else {
//return Boolean.FALSE;
}
current_type = current_type.getSuperclass();
}
return Boolean.FALSE;
}
COM: <s> called by tsink </s>
|
funcom_train/18184003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Test public void testIsSetup() throws ResourceException {
assertThat(connectionFactoryImpl.isSetup(), is(false));
connectionFactoryImpl.setManagedConnectionFactoryImpl(managedConnectionFactoryImpl);
connectionFactoryImpl.setConnectionManager(connectionManagerImpl);
connectionFactoryImpl.setup();
assertThat(connectionFactoryImpl.isSetup(), is(true));
}
COM: <s> verifies code is setup code method </s>
|
funcom_train/48385418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSessionValid(int sessionId) {
String query = "SELECT TIMESTAMPDIFF(MINUTE, ssnTime, NOW()) FROM Session WHERE TIMESTAMPDIFF(MINUTE, ssnTime, NOW()) < 1000 AND ssnID = " + sessionId + "; ";
ResultSet rs = sql.returnQuery(query);
try {
if (rs.first()) {
ConfigManager.log("Session is old: " + rs.getInt(1));
return true;
}
} catch (SQLException e) {
e.printStackTrace();
}
return false;
}
COM: <s> check if session id is a valid session with a reasonable timeout </s>
|
funcom_train/46470479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
while (true) {
Iterator<ColorOutputCell> itr = cells.iterator();
try {
Thread.sleep(100);
} catch(InterruptedException ie) { }
double w = inputPanel.getWidth();
double x = inputPanel.getBoundaryX();
double alpha;
if (x < w / 2) {
alpha = 2 * (x / w);
} else {
x = x - w / 2;
alpha = 1.0 - 2 * (x / w);
}
while (itr.hasNext()) {
ColorOutputCell c = itr.next();
c.setAlpha(alpha);
c.wakeUp();
}
}
}
COM: <s> sleep work repeat </s>
|
funcom_train/10518005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doMultipleCalls(int calls, int database, boolean caching, boolean catchexception){
Properties props = getProperties(database);
for (int i = 0; i < calls; i++){
SQLExec sql = createTask(props);
sql.setCaching(caching);
try {
sql.execute();
} catch (BuildException e){
if (!catchexception){
throw e;
}
}
}
}
COM: <s> run a sql tasks multiple times </s>
|
funcom_train/23021804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void generateStartElement(XmlWriter w, XmlNamespace namespace, String elementName, Collection<XmlWriter.Attribute> additionalAttrs, Collection<XmlNamespace> additionalNs) throws IOException {
XmlBlob.startElement(w, namespace, elementName, xmlBlob, additionalAttrs, additionalNs);
}
COM: <s> generates xml corresponding to the type implementing </s>
|
funcom_train/49249894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void requestNode(boolean sourceNode) {
previousMode = currentMode;
this.setMode(GraphWorkspace.NODE_SELECTION);
if (sourceNode) {
JOptionPane.showMessageDialog(
null,
"Click on the source node for the selected algorithm",
"Algorithm source node input",
JOptionPane.QUESTION_MESSAGE
);
} else {
JOptionPane.showMessageDialog(
null,
"Click on a client node to input it to the selected algorithm",
"Algorithm client node input",
JOptionPane.QUESTION_MESSAGE
);
}
}
COM: <s> informs the workspace that the user must select a node when he does </s>
|
funcom_train/1553600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Pnt isOn (Pnt[] simplex) {
int[] result = this.relation(simplex);
Pnt witness = null;
for (int i = 0; i < result.length; i++) {
if (result[i] == 0) witness = simplex[i];
else if (result[i] > 0) return null;
}
return witness;
}
COM: <s> test if this pnt is on a simplex </s>
|
funcom_train/40425479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readJavaSource(StringBuffer javaSource) throws IOException {
for (;;) {
String src = lexer.getStringExact();
if (src == null) {
lexer.reportError("EOF unexpected");
} else if ("]]".equals(src)) {
return;
} else if ("GRIN_COMMAND_[[".equals(src)) {
// TODO
}
javaSource.append(src);
}
}
COM: <s> read a java command fragment </s>
|
funcom_train/11651182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getPath() {
String str = url;
int i = str.indexOf("//");
if (i > 0) {
str = str.substring(i + 2);
}
i = str.indexOf("/");
if (i < 0) {
return "";
}
return str.substring(i);
}
COM: <s> find the some file </s>
|
funcom_train/25548103 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void performDailyDataCopy(){
//putting check whether we have to run this from this context
if(!"false".equalsIgnoreCase(PropertiesUtil.getMainProperty("medsol.incr.back.application.context", "false"))){
try{
logger.info("Daily Data Migration Started");
confirmSlaveServersOnline();
callDailyProcForSchemasInMasterDB();
archiveAllFilesAfterSuccessfulLoad();
logger.info("Daily Data Migration Finished without any exceptions");
}
catch (Exception e) {
logger.error("Exception while calling daily procedure", e);
}
}
}
COM: <s> this method takes the master db connection and will call the incremental </s>
|
funcom_train/24162876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBaseCase(int index, double value) {
int recSize = baseValues.size();
if (index > recSize-1) {
/*
* Expand base values array if necessary
*/
for (int i = recSize; i < index; i++)
baseValues.add( new Double(Double.NaN) );
baseValues.add( new Double(value) );
} else
baseValues.set(index, new Double(value));
}
COM: <s> adds base case </s>
|
funcom_train/50154158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setupForm(ActionFormClass form) {
IForward input = mapping.getInput();
if (input != null && input instanceof PageClass) {
PageClass inputPage = ((PageClass)input);
if (mapping.getForm() != null) {
inputPage.removeForm(mapping.getForm());
}
inputPage.addForm(form, mapping);
}
mapping.setForm(form);
}
COM: <s> method setup form </s>
|
funcom_train/9137406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JFrame getJFrame() {
if (jFrame == null) {
jFrame = new JFrame();
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jFrame.setSize(300, 200);
jFrame.setContentPane(getJContentPane());
jFrame.setTitle("Sistema de Gestion de Presupuestos");
}
return jFrame;
}
COM: <s> this method initializes j frame </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.