__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
|---|---|---|
funcom_train/8981342
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void initialize() {
this.setSize(500, 300);
Dimension us = this.getSize(),
them = Toolkit.getDefaultToolkit()
.getScreenSize();
int newX = (them.width - us.width) / 2;
int newY = (them.height - us.height) / 2;
this.setLocation(newX, newY);
this.setContentPane(getJContentPane());
}
COM: <s> this method initializes this </s>
|
funcom_train/44450050
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public SrcMLElement getBreakStructure() {
SrcMLElement parent = getSParent();
while (parent != null) {
if (parent instanceof Loop
|| parent instanceof Switch) {
return parent;
}
parent = parent.getSParent();
}
logger.warning("Illegal Break node: Missing Loop or Switch parent node!");
return null;
}
COM: <s> finds out which control structure the break refers to </s>
|
funcom_train/2385676
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getAlarmTrigger() {
int startpos = cal.indexOf("TRIGGER;");
if (startpos < 0) {
return null;
}
try {
int valuepos = cal.indexOf(':', startpos + 7);
int endpos = cal.indexOf('\n', valuepos);
return (endpos < 0) ? cal.substring(valuepos + 1)
: cal.substring(valuepos + 1, endpos);
} catch (Exception e) {
return null;
}
}
COM: <s> returns the value of the valarms trigger property considering cal an </s>
|
funcom_train/8487108
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetCouleur() {
System.out.println("getCouleur");
Group instance = new Group(StoneVal.WHITE);
StoneVal expResult = StoneVal.WHITE;
StoneVal result = instance.getCouleur();
assertEquals(expResult, result);
instance = new Group(StoneVal.BLACK);
expResult = StoneVal.BLACK;
result = instance.getCouleur();
assertEquals(expResult, result);
}
COM: <s> test of get couleur method of class group </s>
|
funcom_train/25642001
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String getString(String key) {
if (messageRB == null) {
try {
messageRB = ResourceBundle.getBundle(
"com.sun.tools.javadoc.resources.javadoc");
} catch (MissingResourceException e) {
throw new Error("Fatal: Resource for javadoc is missing");
}
}
return messageRB.getString(key);
}
COM: <s> get string from resource bundle initialize resource bundle </s>
|
funcom_train/50721489
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected File getLog() throws IOException {
File log = null;
File root = new File(systemState.prefix);
if (root.exists() && root.isDirectory()) {
File logs = new File(root, "logs");
if (!logs.exists()) {
logs.mkdirs();
}
if (logs.exists()) {
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd-HHmmss'.log'");
log = new File(logs, format.format(new Date()));
log.createNewFile();
}
}
return log;
}
COM: <s> method get log </s>
|
funcom_train/44011411
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetCity() {
System.out.println("getCity");
StoreBO instance = new StoreBO();
String expResult = "";
String result = instance.getCity();
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 city method of class edu </s>
|
funcom_train/8231783
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Command getOkCommand2() {
if (okCommand2 == null) {//GEN-END:|45-getter|0|45-preInit
// write pre-init user code here
okCommand2 = new Command("Buscar", Command.OK, 0);//GEN-LINE:|45-getter|1|45-postInit
// write post-init user code here
}//GEN-BEGIN:|45-getter|2|
return okCommand2;
}
COM: <s> returns an initiliazed instance of ok command2 component </s>
|
funcom_train/1589141
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public InstantConverter getInstantConverter(Object object) {
InstantConverter converter =
(InstantConverter)iInstantConverters.select(object == null ? null : object.getClass());
if (converter != null) {
return converter;
}
throw new IllegalArgumentException("No instant converter found for type: " +
(object == null ? "null" : object.getClass().getName()));
}
COM: <s> gets the best converter for the object specified </s>
|
funcom_train/35902133
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Task createSubTask(String name) {
if (hasCompleted) throw new IllegalStateException("createSubTask() called on a Task which has already completed ("+this+":"+name+")");
Task subTask = new Task(name);
this.registerSubTask(subTask);
return subTask;
}
COM: <s> creates a new subtask of this task </s>
|
funcom_train/43244923
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testOldObjectToVariant() {
System.out.println("OldObjectToVariant");
Object obj = null;
boolean deep = true;
Variant expResult = null;
Variant result = BeanTools.OldObjectToVariant(obj, deep);
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 old object to variant method of class org </s>
|
funcom_train/40719457
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void createMyAnnotations() {
String source = "my";
addAnnotation
(productionQueryEClass,
source,
new String[] {
"label", "definition._label()"
});
addAnnotation
(emptyQueryEClass,
source,
new String[] {
"label", "\'#empty\'"
});
addAnnotation
(symbolReferenceQueryEClass,
source,
new String[] {
"label", "symbol._label()"
});
}
COM: <s> initializes the annotations for b my b </s>
|
funcom_train/16218808
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setBackground(Background backgr) {
this.background = backgr;
if (this.background == null) {
this.background = Background.getDefaultBackground();
}
// force all sprites to use a same background
for (int i = 0; i < this.size; i++) {
this.sprites[i].setBackground(this.background);
}
}
COM: <s> associates specified background with this sprite group the background will </s>
|
funcom_train/24080476
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void setToReplaceByFields() {
//Create toReplaceBy label + area
toReplaceByLabel = new JLabel("Replace by: ");
toReplaceByArea = new JTextArea(3, 54);
toReplaceByArea.setLineWrap(true);
toReplaceByPane = new JScrollPane(toReplaceByArea);
}
COM: <s> set all fields related to replacing text </s>
|
funcom_train/3180677
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj instanceof ElementFilter) {
ElementFilter filter = (ElementFilter) obj;
if (namespace == filter.namespace) {
if (name == filter.name) {
return true;
}
else {
return (name == null) ? false : name.equals(filter.name);
}
}
}
return false;
}
COM: <s> returns true if object is instance of element filter and has </s>
|
funcom_train/27973003
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private long getLastDepartureTime() {
long time = 0;
ResultSet rs = sqlExchange.sql("SELECT `departureDateEnd` FROM `containers` ORDER BY `departureDateEnd` DESC LIMIT 0,1;");
try {
while (rs.next()) {
time = rs.getInt("departureDateEnd");
}
} catch (SQLException e) {
System.out.println(e);
}
return time;
}
COM: <s> retrieves the biggest departure date end from the database </s>
|
funcom_train/3302357
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void resolveRefs() throws InitException {
Iterator descs = componentMap.getDescriptors();
while(descs.hasNext()) {
Map.Entry descEntry = (Map.Entry)descs.next();
WiredComponentDesc desc = (WiredComponentDesc)descEntry.getValue();
resolveComponentRefs(desc);
resolveResourceRefs(desc);
}
}
COM: <s> traverse the list of components and link descriptors to symbolic </s>
|
funcom_train/38318341
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void illegalKey (String sKey, boolean bShort) {
final String sFormat;
if (bShort) {
sFormat= "XXXXXXXXXXXXXXXX";
} else {
sFormat= "XXXX-XXXX-XXXX-XXXX";
}
LOG.log(Level.INFO, "Illegal CD-Key [{0}].", new Object[] { sKey });
throw new IllegalArgumentException(
"Illegal CD-Key '" + sKey + "', format has to be '" + sFormat + "'."
);
}
COM: <s> throws an illegal argument exception for invalid keys </s>
|
funcom_train/41162672
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void delete(CoUnit entity) {
EntityManagerHelper.log("deleting CoUnit instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoUnit.class, entity.getUnitId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co unit entity </s>
|
funcom_train/22268174
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void update(final Object observed, final Object obj) {
if (null != this.dataLine && observed instanceof WaveDataProducer) {
final byte[] data = (byte[]) obj;
synchronized (this.buffer) {
this.buffer.write(data, 0, data.length);
if (this.buffer.size() > NOTIFY_THRESHOLD_BUFFERSIZE) {
this.buffer.notifyAll();
}
}
}
}
COM: <s> we write the sound data sent from the producer into the dataline </s>
|
funcom_train/17385029
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean isSearchFieldEmpty() {
boolean result = Utils.isTextEmpty( searchField.getText() );
if ( result )
JOptionPane.showMessageDialog( this, Messages.getString("SearchFrame.13"),Messages.getString("title.warning"), JOptionPane.WARNING_MESSAGE);
return result;
}
COM: <s> this method controls if the search field is empty </s>
|
funcom_train/9044802
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void createFieldEditors() {
addField(new PackageExcludeListEditor(PreferenceConstants.P_PACKAGE_EXCLUDES, "&Packages e&xcluded from dependency graphs:", getFieldEditorParent()));
addField(new PatternExcludeListEditor(PreferenceConstants.P_PATTERN_EXCLUDES, "&Classes excluded from dependency graphs: (regex patterns)", getFieldEditorParent()));
}
COM: <s> creates the package exclude list field editor </s>
|
funcom_train/1038949
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int getRegionIDbyName(String name) throws StoreException{
int id = FAILED;
Statement statement = db.getStatement();
String sql = "SELECT idRegions from regions " +
"Where name='" + name + "';";
try {
statement = db.getStatement();
ResultSet rs = statement.executeQuery(sql);
while (rs.next()) {
id = rs.getInt("idRegions");
}
rs.close();
statement.close();
} catch (SQLException e) {
e.printStackTrace();
}
if (id == FAILED){
throw new StoreException("invalid region name");
} else {
return id;
}
}
COM: <s> fetches a regionid by name </s>
|
funcom_train/40444641
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private int findMinTestInterval() {
int minInterval = 0;
Iterator<Integer> it = activeServices.keySet().iterator();
while ( it.hasNext() ) {
int serviceRefreshRate = services.get( it.next() ).getRefreshRate();
if ( minInterval == 0 || serviceRefreshRate < minInterval ) {
minInterval = serviceRefreshRate;
}
}
return minInterval;
}
COM: <s> finds the minimum test interval from the active services </s>
|
funcom_train/18514089
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void fetchUpdate() {
try {
URL feedUrl = new URL(newsFeed);
SyndFeedInput input = new SyndFeedInput();
SyndFeed feed = input.build(new XmlReader(feedUrl));
Vector entries = new Vector(feed.getEntries());
SyndEntryImpl entry = (SyndEntryImpl) entries.get(0);
setTitle(entry.getTitle());
setLink(entry.getLink());
setPubdate(entry.getPublishedDate().toString());
} catch (Exception e) {
}
}
COM: <s> fetch update information </s>
|
funcom_train/8581115
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void trainOn(NNDataSet innds, int numberofEpochs) {
for (int i = 0; i < numberofEpochs; i++) {
innds.refreshDataset();
while (innds.hasMoreExamples()) {
NNExample nne = innds.getExampleAtRandom();
processInput(nne.getInput());
Vector error = layer.errorVectorFrom(nne.getTarget());
processError(error);
}
}
}
COM: <s> induces the layer of this perceptron from the specified set of examples </s>
|
funcom_train/13671573
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void test2() throws Exception {
String baseName = getBaseName();
Function function1 = new Function("f1");
Function function2 = new Function("f2");
ODB odb = open(baseName);
odb.store(function1);
odb.store(function2);
ObjectOid id1 = odb.getObjectId(function1);
ObjectOid id2 = odb.getObjectId(function2);
Function function1bis = (Function) odb.getObjectFromId(id1);
odb.close();
assertEquals(function1.getName(), function1bis.getName());
deleteBase(baseName);
}
COM: <s> getting object by id during the same transaction </s>
|
funcom_train/28740522
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Integer createSampleInfo(ProprodSampleInfo info) throws SimsException {
String errMsg = clsName + ".createNewSample(): ";
Integer id = null;
try {
//Create ProprodSample and return local object.
local = this.createNewSampleLocal(info);
id = local.getId();
}
catch (RuntimeException e) {
ctx.setRollbackOnly();
//Propagate.
throw e;
}
return id;
}
COM: <s> this method create a new proprod sample object </s>
|
funcom_train/8077535
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getPlotPoints() {
StringBuffer buf = new StringBuffer();
if (m_plotPoints != null)
for (int i=0; i < m_plotPoints.length; i++) {
buf.append(m_plotPoints[i]);
if (i != (m_plotPoints.length -1))
buf.append(" ");
}
return buf.toString();
}
COM: <s> get the value of plot points </s>
|
funcom_train/16358331
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setReference(String reference) {
// set default value
this.reference = 0;
SimpleDateFormat simple = new SimpleDateFormat("yyyyMMddHHmmssZ");
if ( Test.isNoNull(reference) ) {
try {
Date date = simple.parse(reference);
this.reference = date.getTime();
} catch (ParseException e) {
System.err.println("Be Careful: The time reference format was not recognize: " + reference );
this.reference = 0;
}
}
}
COM: <s> p align justify set the current reference </s>
|
funcom_train/129908
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void translateObjectBeingDragged(final VisualObject obj, final double dx, final double dy) {
double diffX = dx;
double diffY = dy;
AffineTransform trans = obj.getTransform();
double scale = getVVDisplay().getWorldViewScale();
diffX /= (scale * trans.getScaleX());
diffY /= (scale * trans.getScaleY());
trans.translate(diffX, diffY);
obj.setTransform(trans);
}
COM: <s> translates the supplied code visual object code by the given amounts </s>
|
funcom_train/625467
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Vector names(ANameList nameList) {
PName head = nameList.getName();
Iterator tail = nameList.getNextName().iterator();
Vector names = new Vector();
// assemble every name
while (head != null) {
names.add(head);
if (tail.hasNext()) {
head = ((ANextName) tail.next()).getName();
} else {
head = null;
}
}
return names;
}
COM: <s> returns the declared names of a name list in form of a vector </s>
|
funcom_train/18575957
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void runningModulesRemove(String module, int moduleId) {
LinkedList moduleIds = (LinkedList) runningModules.get(module);
int test;
if (moduleIds != null)
for (int i = 0; i < moduleIds.size(); i++) {
test = ((Integer) moduleIds.get(i)).intValue();
if (test == moduleId) {
moduleIds.remove(i);
if (moduleIds.size() == 0)
runningModules.remove(module);
break;
}
}
}
COM: <s> remove a module from the running modules list </s>
|
funcom_train/1538852
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean isUnit() {
if ( isZERO() ) {
return false;
}
if ( ring.isField() ) {
return true;
}
java.math.BigInteger g = ring.modul.gcd( val ).abs();
return ( g.equals( java.math.BigInteger.ONE ) );
}
COM: <s> is mod integer number a unit </s>
|
funcom_train/44215398
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testAssertionAdded() throws Exception {
Player player = PlayerFactory.buildDefault("pounder/accpt/TestTextEqualsByWindowID.pnd");
PounderInstance instance = (PounderInstance)player.play();
RecordingItem ri = (RecordingItem)instance.model.getRecord().elementAt(0);
TextEqualsItem tei = (TextEqualsItem)ri;
assertEquals(new TextEqualsItem(32, "Gary", "Stinkpit"), tei);
}
COM: <s> must use a default player because mouse motions dont catch too well </s>
|
funcom_train/40667492
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addComponent(Component comp) {
GridBagConstraints cons = new GridBagConstraints();
cons.gridy = y++;
cons.gridheight = 1;
cons.gridwidth = cons.REMAINDER;
cons.fill = GridBagConstraints.HORIZONTAL;
cons.anchor = GridBagConstraints.CENTER;
cons.weightx = 1.0f;
gridBag.setConstraints(comp,cons);
contents.add(comp);
}
COM: <s> adds a component to the jbrowse option pane </s>
|
funcom_train/124813
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setIntercellSpacing(Dimension newSpacing) {
Dimension oldSpacing = getColumnModel() == null ? new Dimension(0,
getRowMargin()) : getIntercellSpacing();
super.setIntercellSpacing(newSpacing);
updateRect00();
firePropertyChange("intercellSpacing", oldSpacing, newSpacing);
}
COM: <s> sets the width and height between cells to code new spacing code and </s>
|
funcom_train/20286232
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public CalendarEventList getEventList(String tmp1, String tmp2, String tmp3) {
String key = tmp1 + "/" + tmp2 + "/" + tmp3;
if (eventList.containsKey(key)) {
return eventList.get(key);
} else {
return new CalendarEventList();
}
}
COM: <s> gets the event list attribute of the calendar view object </s>
|
funcom_train/28339610
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String toString() {
// Create vector string
String strVec = "(";
for (int i=0; i<6; i++)
strVec = strVec + this.getElem(i) + ",";
strVec = strVec + this.getElem(6) + ")";
return strVec;
}
COM: <s> convert the vector contents to a string </s>
|
funcom_train/22210100
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addToHistory(String statement){
if(statement == null) return;
if(history.getCurrent()!= null){
String lastAdded = (String)history.getCurrent();
if(StringUtil.equalsIgnoreWhiteWaste(lastAdded, statement))
return; // no new statement
}
history.addEntry(statement);
syncHistoryStateAndUI();
}
COM: <s> adds the given statement to the history </s>
|
funcom_train/13536510
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void translateVertically(Map propertyMap, ParentMap parentMap, int yPos, int dv) {
GraphParticipantInterface[] pars = getParticipantsForYPos(yPos, 0, propertyMap, parentMap);
translateParticipants(pars, propertyMap, parentMap, 0, dv);
}
COM: <s> translates participants under given position y pos vertically for a value </s>
|
funcom_train/16910972
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeAllComponents() {
ArrayList<WorkspaceComponent> toRemove = new ArrayList<WorkspaceComponent>();
synchronized (componentList) {
for (WorkspaceComponent component : componentList) {
toRemove.add(component);
}
for (WorkspaceComponent component : toRemove) {
removeWorkspaceComponent(component);
}
}
}
COM: <s> disposes all simbrain windows </s>
|
funcom_train/39146880
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void createLight() {
IColourValue lightColour = new ColourValue(0.7f, 0.7f, 0.7f, 0);
ILight light = sceneManager.createLight(NAME_MAIN_LIGHT);
light.setDiffuseColour(lightColour);
light.setSpecularColour(lightColour);
lightColour.delete();
light.setType(LightTypes.LT_DIRECTIONAL);
light.setDirection(0, -0.5f, -1);
light.setPosition(0, 50, 100);
light.setVisible(true);
}
COM: <s> creates a light </s>
|
funcom_train/13258061
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public InputPort getInPortAt(int x, int y) {
JmtCell cell = getVertexAt(x, y);
for (int i = 0; i < getModel().getChildCount(cell); i++) {
Object child = getModel().getChild(cell, i);
if (child instanceof InputPort) {
return (InputPort) child;
}
}
return null;
}
COM: <s> gets the inport port for the cell under point x y </s>
|
funcom_train/48402238
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void print(MessageProxy message) throws IOException, JAXBException {
JAXBElement<GviSmsMessageType> sms = new JAXBElement<GviSmsMessageType>(new QName("", "gviSmsMessage"), GviSmsMessageType.class, null, message.getMessage());
// Set message properties
this.setProperties(sms.getValue());
// Post request to output stream
DispatchMessageHandler handler = new DispatchMessageHandler();
handler.marshal(sms, System.out);
}
COM: <s> this method is commonly used for testing </s>
|
funcom_train/7720653
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Vector getProperties(String nodename) {
// get the object rom our props
Object obj=props.get(nodename);
if (obj!=null) {
// object found is it a vector (should be)
if (obj instanceof Vector) {
// cast it to Vector and return it
Vector vec=(Vector)obj;
return(vec);
}
}
// not vector found under the wanted name return null
return(null);
}
COM: <s> get the properties vector of the wanted type </s>
|
funcom_train/51291664
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void test_20() throws Exception{
String query = "xs:dayTimeDuration(\"PT31M\")+xs:dayTimeDuration(\"PT31M\")";
doQuery(prepareQuery(query, false,false, false, false, false));
// System.out.println(myBuffer.toString());
assertEquals("PT1H2M", resultBuffer.toString().trim() );
};
COM: <s> additive iterator tests </s>
|
funcom_train/51109856
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void createData() {
// create DataContext to run queries
DataContext ctxt = this.getDomain().createDataContext();
addIssueTypes(ctxt);
addProjects(ctxt);
addRoleTypes(ctxt);
addStatuses(ctxt);
processAdminUser(ctxt);
// commit all changes at once
ctxt.commitChanges(Level.INFO);
}
COM: <s> populate config tables with data if needed </s>
|
funcom_train/49790920
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testUniqueDescriptors() throws Exception {
Document gmfgraph = getGmfgraph();
IterableElementList nl = xpath(gmfgraph, "/Canvas/figures/descriptors");
assertNotSame("We should have at least one descriptor node", nl.getLength(), 0);
Set<String> found = new HashSet<String>();
for (Element child : nl) {
String childName = child.getAttribute("name");
assertFalse("More than one descriptor found for '" + childName + "'", found.contains(childName));
found.add(childName);
}
}
COM: <s> make sure all figures descriptors are unique </s>
|
funcom_train/40853902
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Command getBackCommand2() {
if (backCommand2 == null) {//GEN-END:|83-getter|0|83-preInit
// write pre-init user code here
backCommand2 = new Command("Back", Command.BACK, 0);//GEN-LINE:|83-getter|1|83-postInit
// write post-init user code here
}//GEN-BEGIN:|83-getter|2|
return backCommand2;
}
COM: <s> returns an initiliazed instance of back command2 component </s>
|
funcom_train/17754381
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int mark() {
syncConsume();
//System.out.println("Marking at " + markerOffset);
//try { for (int i = 1; i <= 2; i++) { System.out.println("LA("+i+")=="+LT(i).getText()); } } catch (ScannerException e) {}
nMarkers++;
return markerOffset;
}
COM: <s> return an integer marker that can be used to rewind the buffer to </s>
|
funcom_train/25332829
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetSequenceDAO() throws Exception {
DBDAOCollectionCoreFactory instance = new DBDAOCollectionCoreFactory();
DBCollectionSpecies sp = new DBCollectionSpecies();
instance.setSpecies(sp);
DBDNASequenceDAO result = instance.getSequenceDAO();
assertNotNull(result);
assertTrue(result.getFactory()==instance);
assertTrue(result.getSpecies()==sp);
}
COM: <s> test of get sequence dao method of class dbdaocollection core factory </s>
|
funcom_train/27822224
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void updateActions() {
Iterator actions=values().iterator();
while (actions.hasNext()) {
SmartAction action=(SmartAction)actions.next();
action.updateAction();
}
if (m_parentSmartActionMap!=null)
m_parentSmartActionMap.updateActions();
}
COM: <s> updates all actions in the action map </s>
|
funcom_train/36753543
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void export() {
// Pick a file
int choice = fileChooser.showSaveDialog(this);
if (choice != JFileChooser.APPROVE_OPTION) {
refresh();
return;
}
String filename = fileChooser.getSelectedFile().getAbsolutePath();
// Write the tree out
try {
synchronized (transformationTree) {
SceneNode.export(filename, (SceneNode) transformationTree
.getRoot());
}
} catch (IOException ioe) {
showExceptionDialog(ioe);
}
refresh();
}
COM: <s> export the tree in a format readable by the ray tracer </s>
|
funcom_train/17905628
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public DatabaseProcedure getProcedure(String name) {
DatabaseMetaTag metaTag = getDatabaseMetaTag(META_TYPES[PROCEDURE]);
if (metaTag == null) {
return null;
}
List<NamedObject> objects = metaTag.getObjects();
for (NamedObject namedObject: objects) {
if (name.equalsIgnoreCase(namedObject.getName())) {
return (DatabaseProcedure) namedObject;
}
}
return null;
}
COM: <s> returns the procedure or function if procedure does not exist with </s>
|
funcom_train/38953929
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getMessage(Locale locale) {
// TODO: creating a formatter and a stringbuilder at each invocation seems costly.
String msg = ErrorMessage.ref.get(code);
StringBuilder buffer = new StringBuilder();
Formatter formatter = new Formatter(buffer);
formatter.format(msg, args);
return buffer.toString();
}
COM: <s> gets a localized message for the given locale </s>
|
funcom_train/29916560
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public JCheckBox getEnterPinManualjCheckBox() {
if (enterPinManualjCheckBox == null) {
enterPinManualjCheckBox = new JCheckBox(UIHelper.getText("renewcert.enterpinmanual"));
enterPinManualjCheckBox.setBackground(Color.white);
enterPinManualjCheckBox.setBounds(new Rectangle(286, 435, 506, 21));
}
return enterPinManualjCheckBox;
}
COM: <s> this method initializes enter pin manualj check box </s>
|
funcom_train/15567904
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean setLong(int _row,int _column, long _value) {
if (longRowList[_row]==null)
return false;
if (longV[_row].length>=_column)
return false;
longV[_row][_column]=_value;
return true;
}
COM: <s> code set long code sets a long at a specified position </s>
|
funcom_train/37516426
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void registerVisibleTypes() {
declarationContext.registerVisibleType( receiverType() );
CSpecializedType[] parms = parameters();
for (int j = 0; j < parms.length; j++) {
declarationContext.registerVisibleType(parms[j].dynamicType());
declarationContext.registerVisibleType(parms[j].staticType());
}
}
COM: <s> registers the types visible in the signature of this </s>
|
funcom_train/5550249
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JPanel getJp_a() {
if (jp_a == null) {
jp_a = new JPanel();;
jp_a.setPreferredSize( new Dimension(340,75) );
jp_a.setLayout(new BorderLayout());
//p_a = RichtungsWinkelEditorPanel.getRichtungsWinkelEditorPanel( "ea" );
p_a = new VectorWinkelViewPanel();
jp_a.add(p_a, java.awt.BorderLayout.CENTER);
}
return jp_a;
}
COM: <s> this method initializes jp a </s>
|
funcom_train/47170820
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private int determineTokenType() throws IOException {
int state = TYPE_TEXT_TOKEN;
if (input[0] == '<') {
if (match("<!--")) {
state = TYPE_COMMENT;
next(4);
} else {
state = TYPE_TAG;
next();
}
}
return state;
}
COM: <s> determines the type of the next token </s>
|
funcom_train/38306916
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void initialize() throws DocumentHandlerException {
super.initialize();
// getting parents
this.phraseHolder = documentHandler.latestPhraseHolder();
if (phraseHolder == null) {
throw new DocumentHandlerException(locator(), "Item '" + getName() + "' is not supported here.");
}
// getting attributes
this.valueAttr = getStringAttribute(VALUE, false, null);
}
COM: <s> initializes the item </s>
|
funcom_train/27761392
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testNonAccessibleProperty() {
try {
Bean1 bean1 = new Bean1();
BeanProperty prop = new BeanProperty("notAccessible", Bean1.class);
fail("Should have failed because notAccessible is private");
} catch (BeanException be) {
assertTrue("Should have a root cause of NoSuchMethodException",
be.getRootCause() instanceof NoSuchMethodException);
}
}
COM: <s> tests the property that is not accessible </s>
|
funcom_train/21999913
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void hide() {
// only the primary progress dialog can close it
// If the primary is set to master and we are set to master we will
// override the primary's values. In this case we need to restore them
// as we really hijacked it.
if (isMaster() && primaryProgressDialog.isMaster()) {
primaryProgressDialog.setMinimum(minimum);
primaryProgressDialog.setMaximum(maximum);
primaryProgressDialog.setProgress(progress);
primaryProgressDialog.setIndeterminate(indeterminate);
}
}
COM: <s> close the dialog window </s>
|
funcom_train/34257066
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean isAttached(File aFile) {
Iterator lAttachmentIterator = getAttachmentList().iterator();
while (lAttachmentIterator.hasNext()) {
Attachment lAttachment = (Attachment)lAttachmentIterator.next();
if (aFile.equals(lAttachment.getWorkspaceFile()))
return true;
}
return false;
}
COM: <s> test whether there is already an attachment from </s>
|
funcom_train/26016251
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void setRemoteParty(SIPMessage sipMessage) {
if (!isServer()) {
this.remoteParty = sipMessage.getTo().getAddress();
} else {
this.remoteParty = sipMessage.getFrom().getAddress();
}
if (sipStack.isLoggingEnabled()) {
sipStack.getStackLogger().logDebug("settingRemoteParty " + this.remoteParty);
}
}
COM: <s> set the remote party for this dialog </s>
|
funcom_train/46493088
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getErrorString() {
checkDone();
if (error != null)
return error;
switch (result) {
case SUCCESSFUL:
return "successful";
case UNRECOVERABLE:
return "unrecoverable error";
case TRY_AGAIN:
return "try again";
case HOST_NOT_FOUND:
return "host not found";
case TYPE_NOT_FOUND:
return "type not found";
}
throw new IllegalStateException("unknown result");
}
COM: <s> returns an error string describing the result code of this lookup </s>
|
funcom_train/14194399
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void initialize() {
ToolTipManager ttm = ToolTipManager.sharedInstance();
ttm.setInitialDelay(100);
button_left = new DirectionButton(DirectionButton.BUTTON_LEFT, painter);
showFleets = new BlueToggleButton("Zeige Flotten", null, true);
showFleets.addActionListener(this);
this.add(button_left);
this.add(showFleets);
}
COM: <s> this method initializes this </s>
|
funcom_train/7285064
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void toJson(JsonElement jsonElement, Appendable writer) {
try {
if (generateNonExecutableJson) {
writer.append(JSON_NON_EXECUTABLE_PREFIX);
}
if (jsonElement == null && serializeNulls) {
writeOutNullString(writer);
}
formatter.format(jsonElement, writer, serializeNulls);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
COM: <s> writes out the equivalent json for a tree of </s>
|
funcom_train/45622760
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addTimestampUrlPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SignFileType_timestampUrl_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SignFileType_timestampUrl_feature", "_UI_SignFileType_type"),
MSBPackage.eINSTANCE.getSignFileType_TimestampUrl(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the timestamp url feature </s>
|
funcom_train/49670846
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int getHotkey() {
final String hotkey = properties.get(HOTKEY_REPR);
if (hotkey != null && hotkey.contains("+")) {
//good hotkey
if (hotkey.endsWith("Space")) {
return KeyEvent.VK_SPACE;
} else {
return hotkey.charAt(hotkey.length() - 1);
}
}
//bad or no hotkey
return -1;
}
COM: <s> parses hotkey string and returns char value of the shortcut key </s>
|
funcom_train/7542661
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected List createMatchers() {
List list = new ArrayList();
boolean isCaseSensitive = preferences.isCaseSensitive();
String[] tasks = preferences.getTagNames();
if (tasks != null) {
fTaskTagMatcher = new TaskTagMatcher(
getToken(DLTKColorConstants.TASK_TAG));
fTaskTagMatcher.addTaskTags(tasks);
fTaskTagMatcher.setCaseSensitive(isCaseSensitive);
list.add(fTaskTagMatcher);
}
return list;
}
COM: <s> creates a list of word matchers </s>
|
funcom_train/45558301
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addIDPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_OwlsProfile_iD_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_OwlsProfile_iD_feature", "_UI_OwlsProfile_type"),
OwlsPackage.Literals.OWLS_PROFILE__ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the id feature </s>
|
funcom_train/21438140
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setLinkagePositions(Collection<Bond> _bonds) {
bonds = new Vector<Bond>(0,1);
for( Bond toadd : _bonds )
bonds.add(toadd.clone());
if( bonds.size()==0 )
bonds.add(new Bond());
if( child!=null )
setAnomericCarbon(child.getAnomericCarbon());
}
COM: <s> set the bonds forming this linkage </s>
|
funcom_train/51782195
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void drawNavigabilityArrows(DrawingContext drawingContext) {
if (getRelation().isNavigableToElement1()) {
drawArrow(drawingContext, getEndPoint1(), calculateRotationInEndPoint1());
}
if (getRelation().isNavigableToElement2()) {
drawArrow(drawingContext, getEndPoint2(), calculateRotationInEndPoint2());
}
}
COM: <s> draws the navigability arrows </s>
|
funcom_train/32761331
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void applySettings() {
if ( !chartAdaptor.isYAutoScale() ) {
applyYAxisMinValue();
applyYAxisMaxValue();
applyYAxisMinValue(); // repeated in case new y-min is greater than old y-max
applyYAxisMajorTicks();
}
// update display with actual settings
revertSettings();
}
COM: <s> apply the values entered in the panel to the chart </s>
|
funcom_train/20400260
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void preregisterQualifiedSwitches() {
for (Iterator<String> iter = config.getIDMap().idIterator(); iter.hasNext();) {
String thisID = (String) iter.next();
Parameter param = config.getByID(thisID);
if (param instanceof QualifiedSwitch) {
result.registerQualifiedSwitch(thisID, false);
}
}
}
COM: <s> loops through all parameters informing the argument result </s>
|
funcom_train/11320294
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void setSelectState(TreeNode node, boolean newValue) {
boolean oldValue = node.isSelected();
node.setSelected(newValue);
if (isNotifyListeners()) {
if (newValue) {
fireNodeSelected(node, oldValue);
} else {
fireNodeDeselected(node, oldValue);
}
}
}
COM: <s> sets the tree node select state to the new value </s>
|
funcom_train/7275225
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void updateSignatureWithSecuredBytes(Signature signature) throws SignatureException {
parseResults();
SecureGGEPData sg = _data.getSecureGGEP();
if(sg != null) {
signature.update(_payload, 0, sg.getStartIndex());
int end = sg.getEndIndex();
int length = _payload.length - 16 - end;
signature.update(_payload, end, length);
}
}
COM: <s> passes in the appropriate bytes of the payload to the signature </s>
|
funcom_train/23778882
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void _initLinkingEnabled() {
// Try the dialog settings first, which remember the last choice.
String setting = _settings.get(IWorkbenchPreferenceConstants.LINK_NAVIGATOR_TO_EDITOR);
if (setting != null) {
_linkingEnabled = setting.equals("true");
} else {
// TODO: introduce a Eslink plugin config for this
_linkingEnabled = true;
}
}
COM: <s> initialises the linking enabled setting from the preference store </s>
|
funcom_train/1170928
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Card getAttackerBlockedBy(Card blocker) {
CardList att = new CardList(getAttackers());
for (int i = 0; i < att.size(); i++) {
if (getBlockers(att.get(i)).contains(blocker)) return att.get(i);
} // for
return null;
}
COM: <s> p get attacker blocked by </s>
|
funcom_train/22676293
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void escapeField(StringBuilder b, String name, String s) {
if (s != null && s.length() > 0) {
if (b.length() > 0) {
b.append(',');
}
b.append(name).append('=');
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (c == ',' || c == '\\') {
b.append('\\');
}
b.append(c);
}
}
}
COM: <s> escape any comma in the given string and add it to the stringbuilder </s>
|
funcom_train/22497787
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean doFind() {
boolean found = false;
int start = findNext();
if (jcbWholeWords.isSelected()) {
start = findWholeWords(start);
}
if (start >= 0) {
lastPosition = start;
if (jrbDown.isSelected()) {
start += offset;
}
editor.select(start, start + searchTerm.length());
found = true;
}
return found;
}
COM: <s> look for the next occurrence of the search phrase either as whole word </s>
|
funcom_train/21508343
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public UIContainer getChild(String searchName) {
if( name.equals(searchName) ) return this;
UIContainer searchResult = null;
for(UIContainer c : children) {
searchResult = c.getChild(searchName);
if( (searchResult != null) && (searchResult.getName().equals(searchName)) ) {
break;
}
}
return searchResult;
}
COM: <s> looks up a component with a given name </s>
|
funcom_train/35217273
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setIndependentTestSet(){
Instances tmpdata = fulldata;
int indLength = (tmpdata.numInstances()/4)+1;
int optLength = tmpdata.numInstances()-indLength;
tmpdata.randomize(new Random());
independentTestSet = new Instances(tmpdata, 0, indLength);
optimizationSet = new Instances(tmpdata, indLength, optLength);
}
COM: <s> a method to divide the data into optimization set and independent testing set </s>
|
funcom_train/495075
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String getEntityType(SubEntity subEntity) {
String entityType = null;
if (subEntity != null) {
Map properties = subEntity.getProperties();
if (properties != null) {
Object entityTypeObj = properties.get(DataSource.SUB_ENTITY_TYPE_PROPERTY_NAME);
if (entityTypeObj != null)
entityType = entityTypeObj.toString();
}
}
return entityType;
}
COM: <s> read the props and get the entity type </s>
|
funcom_train/10252544
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: static public void staticRunner(Class c, String[] sa) {
junit.textui.TestRunner runner = new junit.textui.TestRunner();
junit.framework.TestResult result =
runner.run(runner.getTest(c.getName()));
System.exit(result.wasSuccessful() ? 0 : 1);
}
COM: <s> this method allows to easily run this unit test independent of the other </s>
|
funcom_train/50139798
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addExpGroup(ExpressionGroup EG) throws SameNameException{
/* Iterate through groups to make sure none of them have the same name already. */
for(int i = 0; i < regExpGroups.size();i++){
ExpressionGroup eg = (ExpressionGroup)regExpGroups.get(i);
if(eg.getName().equals(EG.getName())){
throw new SameNameException("This name is already in use");
}
}
regExpGroups.add(EG);
}
COM: <s> add a new expression group to the list </s>
|
funcom_train/11687796
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public long getBytesSent() {
if (endpoint.getChildren() != null) {
long bytesSent = 0;
for (Endpoint e : endpoint.getChildren()) {
if (e.getMetricsMBean() != null) {
bytesSent += e.getMetricsMBean().getBytesSent();
}
}
return bytesSent;
} else {
return bytesSent;
}
}
COM: <s> number of bytes sent </s>
|
funcom_train/8264503
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String matchCase(String s1, String s2) {
if (s1 == null)
return null;
if (s2 == null)
return s1;
int len1 = s1.length();
int len2 = s2.length();
if (len2 < len1)
len1 = len2;
String result = "";
char c1;
char c2;
for (int i = 0; i < len1; i ++) {
c1 = s1.charAt(i);
c2 = s2.charAt(i);
if (Character.isUpperCase(c2)) {
result += Character.toUpperCase(c1);
} else {
result += Character.toLowerCase(c1);
}
}
return result;
}
COM: <s> convert case of character in s1 to match those in s2 </s>
|
funcom_train/42898606
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public KeyPairInfo createKeyPair(String keyName) throws EC2Exception {
Map<String, String> params = new HashMap<String, String>();
params.put("KeyName", keyName);
HttpGet method = new HttpGet();
CreateKeyPairResponse response =
makeRequestInt(method, "CreateKeyPair", params, CreateKeyPairResponse.class);
return new KeyPairInfo(response.getKeyName(),
response.getKeyFingerprint(),
response.getKeyMaterial());
}
COM: <s> creates a public private keypair </s>
|
funcom_train/20112242
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testBuildMap2() throws Exception {
System.out.println("buildMap2");
SixFigure sixFigure = null;
OSMapImage instance = new OSMapImage();
instance.buildMap2(sixFigure);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of build map2 method of class org </s>
|
funcom_train/31686434
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean isPropertyInstancesPopulated() throws DataAccessException {
boolean bIsPopulated = true;
if(m_bPropInstsPopulated == false) {
initialisePropertyInstanceStores();
Iterator iter = m_propStores.values().iterator();
while (bIsPopulated == true && iter.hasNext()) {
PropertyInstanceStore propStore =
(PropertyInstanceStore) iter.next();
if (propStore.isPopulated() == false) {
bIsPopulated = false;
}
}
}
return bIsPopulated;
}
COM: <s> returns code true code if all the property instances have been </s>
|
funcom_train/35271348
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void computeByteArray(OSCJavaToByteArrayConverter stream) {
stream.write("#bundle");
computeTimeTagByteArray(stream);
Enumeration enume = packets.elements();
OSCPacket nextElement;
byte[] packetBytes;
while (enume.hasMoreElements()) {
nextElement = (OSCPacket) enume.nextElement();
packetBytes = nextElement.getByteArray();
stream.write(packetBytes.length);
stream.write(packetBytes);
}
byteArray = stream.toByteArray();
}
COM: <s> compute the osc byte stream representation of the bundle </s>
|
funcom_train/30009291
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetArchiveInfo() {
System.out.println("getArchiveInfo");
Document instance = new Document();
String expResult = "";
String result = instance.getArchiveInfo();
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 archive info method of class papyrus </s>
|
funcom_train/9641931
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void toggleFourFieldsTable() {
final Tree tree = treeViewer.getTree();
if (four.isVisible()) {
four.setVisible(false);
((FormData) tree.getLayoutData()).bottom = new FormAttachment(
canvas, 0);
} else {
four.setVisible(true);
((FormData) tree.getLayoutData()).bottom = new FormAttachment(100,
-125);
}
tree.getParent().layout();
}
COM: <s> toggles the visibility of the four fields table </s>
|
funcom_train/51301725
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int getVariableId(String variableName) {
//
// strip colon if containing one
//
int colonIndex = variableName.indexOf(':');
if (colonIndex > 0) {
variableName = variableName.substring(0,colonIndex);
}
Integer i = (Integer) variableIds.get(variableName);
return i.intValue();
}
COM: <s> returns the id corresponding to a variable </s>
|
funcom_train/101855
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void checkEverythingValid() {
if(btnExisting.isSelected()) {
checkComboValid();
if(ourFormValidated)
setPanelValid(true);
else
setPanelValid(false);
}
else if(btnNew.isSelected()) {
if(childFormValidated)
setPanelValid(true);
else
setPanelValid(false);
}
}
COM: <s> is our form in a completely valid state </s>
|
funcom_train/43793304
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void writeFile() throws Exception, IOException {
if (this.document != null) {
XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
FileWriter fw = new FileWriter(file);
outputter.output(this.document, fw);
fw.close();
} else {
throw new Exception("The file could not be written once the "
+ "document has not been created yet.");
}
}
COM: <s> this method effectively writes the xml file in the directory </s>
|
funcom_train/16529184
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void loadXMLContent() {
String jaxbXML = getJaxbXML();
//make sure the jaxbXML is not null
if(jaxbXML != null && !jaxbXML.equals("")) {
/*
* tell the browser to execute the javascript that will load
* the content for the step
*/
browser.executeJavascript("loadXMLString(" + getJaxbXML() + ");");
}
}
COM: <s> loads the content for the step such as the question and </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.