__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/20671852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shareObject(String key, ISharableObject value) throws Exception {
if(key == null)
throw new Exception("Shared object key is mandatory!");
if(value == null)
throw new Exception("Shared object instance is mandatory!");
if(_sharedObjects.containsKey(key))
return;
_sharedObjects.put(key, value);
}
COM: <s> share the given object </s>
|
funcom_train/49790073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFormVisible() throws Exception {
beginAtSitemapThenPage("Home");
assertNoProblem();
// one form is visible
hasInputFormForText("Form visible");
// another field is not
List<IElement> list = hasInputFormForText("Form hidden");
assertEquals(1, list.size());
IElement form = list.get(0);
assertFalse("Form is hidden", isDisplayed(form));
}
COM: <s> check the visibility of </s>
|
funcom_train/44771519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int hashCode() {
// PropertyId is immutable, we can store the computed hash code value
int h = hash;
if (h == 0) {
h = 17;
h = 37 * h + parentUUID.hashCode();
h = 37 * h + propName.hashCode();
hash = h;
}
return h;
}
COM: <s> returns the hash code of this property identifier </s>
|
funcom_train/50848691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getGenderIcon(String g){
return g.equals("m")?"<img src=\"./images/cooldude.gif\" borderr=\"0\" alt=\"Male\">":"<img src=\"./images/girl.gif\" borderr=\"0\" alt=\"Female\">";
}
COM: <s> display a link to a gender image male female </s>
|
funcom_train/30194342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigDecimal getDecimal(){
switch(type){
case DECIMAL:
return decimal;
case INTEGER:
return new BigDecimal(integer);
default:
BigDecimal bd = new BigDecimal(numerator).setScale(scale);
return bd.divide(new BigDecimal(denominator),
BigDecimal.ROUND_HALF_UP);
}
}
COM: <s> gets the decimal value of a jxpl number </s>
|
funcom_train/33606532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveCrossings() {
System.out.println("removeCrossings");
assertEquals("before","??",a4.toString());
a4.removeCrossings();
assertEquals("after","??",a4.toString());
}
COM: <s> test of remove crossings method of class scio </s>
|
funcom_train/49426307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addSound(final String name, final String filename) {
log.fine("register sound [" + name + "] for file '" + filename + "'");
SoundHandle sound = soundDevice.loadSound(this, filename);
if (sound == null) {
return false;
}
soundLookup.put(name, sound);
return true;
}
COM: <s> add a sound file </s>
|
funcom_train/26324453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL toURL() throws MalformedURLException {
if (url == null) {
String slash = System.getProperty("file.separator");
if (location == null || location.equals(".")) {
url = new URL("jar:file:" + baseDir + slash + name + "!/");
}
else {
url = new URL("jar:" + location + "!/");
}
}
return url;
}
COM: <s> builds a url based on the name and location of this library </s>
|
funcom_train/23755054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // private void createBendPoint(double i, double j) {
// double xoffset = i * this.horizontalOffset;
// double yoffset = j * this.verticalOffset;
// this.selfEdge.getAttribute().createNewBendPoint(newBp1, bp1Translation, newBp1.difference(this.tgtAnchorPoint));
// }
COM: <s> creates a bend point positioned at an offset from the source anchor </s>
|
funcom_train/37596406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public Type visit(VariableAccess node) {
LocalVariable v = context.getLocalVariable(node.getVariableName(), ts);
setVariable(node, v);
setVariableType(node, v.type());
return setType(node, ts.capture(v.type()));
}
COM: <s> visits a variable access </s>
|
funcom_train/47805771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getWeight(int s, int e) throws NoSuchElementException{
if(s>=edges.length||e>=edges.length)throw new NoSuchElementException("Mindestens einer der Knoten existiert nicht!!! Es gibt nur die Knoten 0 bis " + (edges.length-1));
return edges[s][e];
}
COM: <s> returns weight of edge </s>
|
funcom_train/7625095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CharSequence loadLabel(PackageManager pm) {
if (nonLocalizedLabel != null) {
return nonLocalizedLabel;
}
if (labelRes != 0) {
CharSequence label = pm.getText(packageName, labelRes, null);
if (label != null) {
return label;
}
}
if(name != null) {
return name;
}
return packageName;
}
COM: <s> retrieve the current textual label associated with this item </s>
|
funcom_train/1880185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String nextToken(){
int workingPosition = position;
boolean workingEmptyReturned = emptyReturned;
boolean onToken = advancePosition();
while(position != workingPosition ||
emptyReturned != workingEmptyReturned){
if (onToken){
// returning a token decreases the token count
tokenCount--;
return (emptyReturned ? "" : text.substring(workingPosition, (position != -1) ? position : strLength));
}
workingPosition = position;
workingEmptyReturned = emptyReturned;
onToken = advancePosition();
}
throw new java.util.NoSuchElementException();
}
COM: <s> returns the next token from this string tokenizer </s>
|
funcom_train/43607130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Try_c reconstruct(Block tryBlock, List catchBlocks, Block finallyBlock) {
if (tryBlock != this.tryBlock || ! CollectionUtil.equals(catchBlocks, this.catchBlocks) || finallyBlock != this.finallyBlock) {
Try_c n = (Try_c) copy();
n.tryBlock = tryBlock;
n.catchBlocks = TypedList.copyAndCheck(catchBlocks, Catch.class, true);
n.finallyBlock = finallyBlock;
return n;
}
return this;
}
COM: <s> reconstruct the statement </s>
|
funcom_train/27817168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent event) {
String command = event.getActionCommand();
if (command.equals("ok")) {
do_close();
} else if (command.equals("save")) {
do_save();
} else if (command.equals("undo")) {
do_undo();
} else if (command.equals("cancel")) {
do_close();
}
}
COM: <s> this method handles the action events made by the user </s>
|
funcom_train/11075306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void findVariables(JXPathContext context) {
valuePointer = null;
JXPathContext varCtx = context;
while (varCtx != null) {
variables = varCtx.getVariables();
if (variables.isDeclaredVariable(name.toString())) {
actual = true;
break;
}
varCtx = varCtx.getParentContext();
variables = null;
}
}
COM: <s> assimilate the variables instance associated with the specified context </s>
|
funcom_train/7494314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean existsPdfFile( int hash ){
Cursor c =
db.query(this.PDF_FILE_TABLE, new String[] {
HASH_ID}, this.HASH_ID + "='" + hash + "'"
, null, null, null, null);
int numRows = c.getCount();
c.close();
return numRows > 0;
}
COM: <s> returns true if the pdf file has been cached before </s>
|
funcom_train/4462708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupLookFeel() {
try {
UIManager
.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
} catch (Exception ex) {
try {
UIManager
.setLookAndFeel("com.sun.java.swing.plaf.mac.MacLookAndFeel");
} catch (Exception ex2) {
try {
UIManager.setLookAndFeel(UIManager
.getSystemLookAndFeelClassName());
} catch (Exception ex3) {
}
}
}
}
COM: <s> setup look and feel of ui depending on os windows mac etc </s>
|
funcom_train/2037603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMinImageUploaded() {
if (minImage != null && !minImage.isEmpty()) {
String imageURL = minImage.getSrc();
return !(DEFAULT_HORIZONTAL_MIN_IMAGE.equals(imageURL) || DEFAULT_VERTICAL_MIN_IMAGE.equals(imageURL));
}
return false;
}
COM: <s> not upload the default min image </s>
|
funcom_train/1491946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getModel(String ticket) {
String soapRequest = omwsSOAPRequestUtil.getModelRequest(ticket);
String omwsResponse = this.executeOMwsRequest(soapRequest);
logger.debug(omwsResponse);
omwsSOAPRequestUtil.parseXMLResponseSAX(omwsResponse);
OmWSSAXParser omwsSAXParser = omwsSOAPRequestUtil.getOMwsSAXParser();
if(logger.isDebugEnabled()){
logger.debug("OMWS model params: " + omwsSAXParser.getModelParams());
}
return omwsResponse;
}
COM: <s> print out an xml representation of the model </s>
|
funcom_train/10521814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void close() {
try {
if (_producer != null) {
_producer.close();
_producer = null;
}
if (_session != null) {
_session.close();
_session = null;
}
if (_connection != null) {
_connection.close();
_connection = null;
}
}
catch (JMSException e) {
throw new ControlException("Unable to release JMS resource", e);
}
}
COM: <s> release any jms related resources </s>
|
funcom_train/46262898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void noCursor() {
if (!cursorVisible) return; // don't hide if already hidden.
if (invisibleCursor == null) {
invisibleCursor = new GLImage(16, 16, ARGB);
}
// was formerly 16x16, but the 0x0 was added by jdf as a fix
// for macosx, which wasn't honoring the invisible cursor
cursor(invisibleCursor, 8, 8);
cursorVisible = false;
}
COM: <s> hide the cursor by creating a transparent image </s>
|
funcom_train/2422589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDestinationType(DestinationType type) {
DestinationType old;
synchronized (getDataLock()) {
old = getDestinationType();
setProperty(DESTINATION_TYPE, type.name());
}
if (old != type) {
firePropertyChange(DESTINATION_TYPE, old, type);
}
}
COM: <s> sets the code jms destination type code of this code jms location code </s>
|
funcom_train/2910168 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AccessPoint stringToAccessPoint(String name) {
for (int i = 0; i < aps.size(); i++) {
if (((AccessPoint)aps.get(i)).name.equals(name)) {
return (AccessPoint)aps.get(i);
}
}
return null;
}
COM: <s> takes a string name and returns the ap object with the same name </s>
|
funcom_train/27709170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resetSplitLine() {
removeAllChildren();
splitPolygonLine = new PPath();
splitPoints = new Vector();
splitPoints.add(getFirstSplitHandle());
splitPolygonLine.setStroke(new FixedWidthStroke());
//splitPolygonLine.setPaint(new Color(1f,0f,0f,0.5f));
addChild(splitPolygonLine);
}
COM: <s> removes the current splitline and creates a new one from the startingpoint </s>
|
funcom_train/48058123 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setApplicantLastName(final String newLastName) throws SQLException, AuthorizeException {
if (validateModification(newLastName, _delegate.getSubmitter().getName().getLastName(), "")) {
getDao().getSubmitterDao().updateLastName(_delegate, newLastName);
logModMessage("Last name", ModType.CHANGED, newLastName, SubmissionLogEntry.EVENT_BIOGRAPHICAL_DATA_CHANGE);
}
}
COM: <s> sets the submitters last name </s>
|
funcom_train/16768309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Ping decodePing(IoBuffer in) {
final Ping ping = new Ping();
ping.setDebug(in.getHexDump());
ping.setEventType(in.getShort());
ping.setValue2(in.getInt());
if (in.hasRemaining()) {
ping.setValue3(in.getInt());
}
if (in.hasRemaining()) {
ping.setValue4(in.getInt());
}
return ping;
}
COM: <s> decodes ping event </s>
|
funcom_train/50915672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void roundCoords(double epsilon, CoordinateType coordinateType) {
CMLElements<CMLMolecule> molecules = this.getMoleculeElements();
if (molecules.size() > 0) {
for (CMLMolecule molecule : molecules) {
molecule.roundCoords(epsilon, coordinateType);
}
} else {
for (CMLAtom atom : getAtoms()) {
atom.roundCoords(epsilon, coordinateType);
}
}
}
COM: <s> round the atom coords to within a multiple of epsilon currently always </s>
|
funcom_train/3802731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undo() {
//System.out.println("undo " + strName);
if (listEdits.size() == 0) {
throw new IllegalStateException(this + " is empty!");
}
for (int e = listEdits.size() - 1; e >= 0; e--) {
((JPatchUndoableEdit)listEdits.get(e)).undo();
}
}
COM: <s> undoes all child edits in reverse order </s>
|
funcom_train/18019924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XQueryExpression (String exp, String whereVarName, String startVarName, String maxVarName, WhereClause whereClause, int start, int max) {
this.exp = exp;
this.whereVarName = whereVarName;
this.startVarName = startVarName;
this.maxVarName = maxVarName;
this.whereClause = whereClause;
this.start = start;
this.max = max;
}
COM: <s> construct an xquery expression </s>
|
funcom_train/7790987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseClicked(MouseEvent evt) {
if (manageAccount.isEnabled()) {
ManageAccountFrame manageAccount =
new ManageAccountFrame((ProfileData) account_select
.getSelectedItem(), model, core);
manageAccount.addWindowListener(new PopupWindowListener(
mainFrame, manageAccount));
}
return;
}
COM: <s> if manage account is clicked it will launched the profile manager </s>
|
funcom_train/18441116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void Init(String username, Workspace w) throws MultiplayerException {
try {
Init(username, new InetSocketAddress(InetAddress.getLocalHost(), 9020), w);
} catch (UnknownHostException ex) {
throw new MultiplayerException("Network Error: check your network connectivity.", ex);
}
}
COM: <s> must be called before inet presence can be used </s>
|
funcom_train/12651992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStarted() {
// Ensure that the holder is non-null
Therapy therapy = new Therapy();
assert therapy.getStarted() != null : "Started is null " + therapy;
// Test the set and get
YearMonth yearMonth = new YearMonth();
therapy.setStarted(yearMonth);
assert yearMonth == therapy.getStarted()
: "Started " + yearMonth + " not stored in therapy " + therapy;
}
COM: <s> test started field </s>
|
funcom_train/44852561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void insertHistoryEntry(DomainObject inHistory, String inKeyTimeStamp, String inKeyAuthor, Long inAuthorID) throws BOMChangeValueException {
try {
fillHistory(inHistory);
Timestamp lMutationDate = new Timestamp(System.currentTimeMillis());
inHistory.set(inKeyTimeStamp, lMutationDate);
inHistory.set(inKeyAuthor, inAuthorID);
inHistory.insert(true);
}
catch (Exception exc){
throw new BOMChangeValueException("HistorizableDomainObject.insertHistoryEntry: " + exc.getMessage());
}
}
COM: <s> creates a new history entry with the values of the actual domain object </s>
|
funcom_train/25663864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void ignoreChanges() {
for (final Pair<Integer, String> property : this.changedProperties.keySet()) {
final String oldValue = this.configs[property.first].getStringPref(property.second);
this.sync.configChanged(new ConfigChangeEvent(this.configs[property.first], property.second, oldValue));
}
this.changedProperties.clear();
}
COM: <s> rolls back changes that have not been committed into the underlying configuration modules </s>
|
funcom_train/10282172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Download getDownload(XPersonalEnclosure encl) {
synchronized (mDownloadList) {
Iterator it = mDownloadList.iterator();
while (it.hasNext()) {
Download d = (Download) it.next();
if (d.getEnclosure() == encl) {
return d;
}
}
}
return null;
}
COM: <s> get a download class based on the enclosure </s>
|
funcom_train/13887172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Properties toProperties() {
Properties ret;
if (defaultProfile != null) {
ret = defaultProfile.toProperties();
} else {
ret = new Properties();
}
Iterator entries = properties.entrySet().iterator();
while (entries.hasNext()) {
Map.Entry en = (Map.Entry) entries.next();
String key = (String) en.getKey();
String val = (String) en.getValue();
ret.setProperty(key,val);
}
return ret;
}
COM: <s> transforms this object to a properties object </s>
|
funcom_train/18837023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeContent(String content) throws NullPointerException, IOException {
if (this.fileURL != null) {
FileUtils.writeFile(FileUtils.convertFromJarURL(this.fileURL), content);
refreshPayload();
} else {
throw new NullPointerException("Target file was null, file not written into disk");
}
}
COM: <s> writes content of the file to the disk </s>
|
funcom_train/28985242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackTestsList () {
if (backTestsList == null) {//GEN-END:|266-getter|0|266-preInit
// write pre-init user code here
backTestsList = new Command ("Back", Command.BACK, 0);//GEN-LINE:|266-getter|1|266-postInit
// write post-init user code here
}//GEN-BEGIN:|266-getter|2|
return backTestsList;
}
COM: <s> returns an initiliazed instance of back tests list component </s>
|
funcom_train/18253875 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
super.initialize();
if (randomIs()) {
strategy = PD2D.COOPERATE;
} else {
strategy = PD2D.DEFECT;
}
age = randomInRange(0, ((PD2D) scape.getRoot()).getDeathAge());
wealth = ((PD2D) scape.getRoot()).getInitialWealth();
}
COM: <s> begining population values </s>
|
funcom_train/20881562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getBeamerNumber(BeamerPanel b) {
int i;
for (i = 0; i < AnzahlBeamer; i++) {
if (b == BeamerArray[i]) {
return i + 1;
}
}
if (b == mbp) {
return 0;
}
lg.debug("BeamerAuswahl: get BeamerNumber: returned 88 not good");
return 88;
}
COM: <s> decides which beamer panel is entered in b </s>
|
funcom_train/11345694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSameSignature(String[] sig1, String[] sig2) {
if (sig1.length != sig2.length) {
return false;
} else {
for (int i = 0; i < sig1.length; i++) {
if (!sig1[i].equals(sig2[i])) {
return false;
}
}
}
return true;
}
COM: <s> compares two method signature </s>
|
funcom_train/34341384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getComandoAnterior() {
if (ComandoAnterior == null) {//GEN-END:|26-getter|0|26-preInit
// write pre-init user code here
ComandoAnterior = new Command("Atras", Command.BACK, 0);//GEN-LINE:|26-getter|1|26-postInit
// write post-init user code here
}//GEN-BEGIN:|26-getter|2|
return ComandoAnterior;
}
COM: <s> returns an initiliazed instance of comando anterior component </s>
|
funcom_train/12300919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMaxRawPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PortScalingType_maxRaw_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PortScalingType_maxRaw_feature", "_UI_PortScalingType_type"),
SchemaPackage.Literals.PORT_SCALING_TYPE__MAX_RAW,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the max raw feature </s>
|
funcom_train/12367303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertAtPosition(Component c, JMenu menu, int position) {
if(c instanceof JMenuItem){
if(position == -1)
menu.add((JMenuItem) c);
else
menu.insert( (JMenuItem) c, position);
}
if(c instanceof JSeparator) {
if(position == -1)
menu.add(c);
else
menu.add(c, position);
}
}
COM: <s> adds a component to a menu </s>
|
funcom_train/18150020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAttentionLine(AttentionLine attentionLine) {
// create the association set if it doesn't exist already
if(_attentionLine == null) _attentionLine = new AssociationSetImpl<AttentionLine>();
// add the association to the association set
getAttentionLine().add(attentionLine);
// make the inverse link
attentionLine.setTransmission(this);
}
COM: <s> adds an association attention line </s>
|
funcom_train/13629663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Texture loadTextureResource(GL gl, String resourceName) throws IOException {
Texture texture = (Texture) textureCache.get(resourceName);
if (texture != null) return texture;
texture = loadTextureResource(gl,
resourceName,
gl.GL_TEXTURE_2D, // target
gl.GL_RGBA, // dst pixel format
gl.GL_LINEAR, // min filter (not used)
gl.GL_LINEAR);
textureCache.put(resourceName, texture);
return texture;
}
COM: <s> load a texture as a resource with the given name </s>
|
funcom_train/19538754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PreviewPanelFileChooser getImageFileChooser() {
if (imageFileChooser == null) {
imageFileChooser = new PreviewPanelFileChooser();
imageFileChooser.setFileFilter(new FileFilter() {
@Override
public boolean accept(File f) {
return f.isDirectory()
|| AppConstants.IMAGE_FILE_FILTER.accept(f
.getAbsoluteFile(), f.getName());
}
@Override
public String getDescription() {
return "Images only";
}
});
}
return imageFileChooser;
}
COM: <s> get the file chooser which allows an image to be selected </s>
|
funcom_train/5232481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getSuggestedDestinationDirectory(PdfSelectionTableItem item) {
String retVal;
if (StringUtils.isNotEmpty(Configuration.getInstance().getDefaultWorkingDirectory())) {
retVal = Configuration.getInstance().getDefaultWorkingDirectory();
} else {
retVal = item.getInputFile().getParentFile().getAbsolutePath();
}
return retVal;
}
COM: <s> if a default working directory is set it returns it as suggested </s>
|
funcom_train/39537009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Blinking getBlinking(File projectFile, String blinkingId){
Blinking blinking=null;
if(projectFile!=null && blinkingId!=null && ! blinkingId.equals("")){
Map<String, Object> blinkingsMap=getBlinkingsMap(projectFile);
if(blinkingsMap!=null){
blinking=(Blinking)blinkingsMap.get(blinkingId);
}
}
return blinking;
}
COM: <s> returns the blinking that has the given id </s>
|
funcom_train/18284508 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setByte(int parameterIndex, byte x) throws DAOException {
try {
parms.put("" + parameterIndex, "" + x);
this.preparedStatement.setByte(parameterIndex, x);
} catch (SQLException e) {
_log.error("Exception in setByte() method", e);
this.setTransactionRollbackOnly();
}
}
COM: <s> sets the designated parameter to byte value </s>
|
funcom_train/17203975 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CompiledMethod compileMethod(NormalMethod method, TypeReference[] params) {
CompiledMethod cm;
Callbacks.notifyMethodCompile(method, CompiledMethod.BASELINE);
cm = BaselineCompiler.compile(method);
if (VM.BuildForAdaptiveSystem) {
/* We can't accurately measure compilation time on Host JVM, so just approximate with DNA */
cm.setCompilationTime((float)CompilerDNA.estimateCompileTime(CompilerDNA.BASELINE, method));
}
return cm;
}
COM: <s> compile a method with bytecodes </s>
|
funcom_train/40853582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getStringItem1() {
if (stringItem1 == null) {//GEN-END:|56-getter|0|56-preInit
// write pre-init user code here
stringItem1 = new StringItem("", "Elija una de las opciones para empezar ");//GEN-LINE:|56-getter|1|56-postInit
// write post-init user code here
}//GEN-BEGIN:|56-getter|2|
return stringItem1;
}
COM: <s> returns an initiliazed instance of string item1 component </s>
|
funcom_train/24960841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double estimateRandomDelta() {
double result = Integer.MAX_VALUE;
double value = 0.0;
double[] zeroPoint = x.clone();
Arrays.fill(zeroPoint, 0.0);
for (int m = 0; m < constraints.length; m++) {
value = Math.abs(calculate(constraints[m].getText(), zeroPoint));
if (value > 0 && value < result) {
result = value;
}
}
return (result);
}
COM: <s> estimate random delta </s>
|
funcom_train/7994291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
for ( int i = 0; i < ServerConfig.getInstance().getProperties().getSocketReaders( ); ++i) {
services.add( new SocketReader( ));
}
for ( int i = 0; i < ServerConfig.getInstance().getProperties().getRequestHandlers(); ++i) {
services.add( new RequestHandler( ));
}
};
COM: <s> initializes the web server </s>
|
funcom_train/29560535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expandScorerAttributes(Entry entry, SearchResult result) {
FuzzyRecordBuilder builder = new FuzzyRecordBuilder(entry);
// NOTE: Hard coded for now
Score score = result.getScore();
for (String name: score.getScorerAttrNames()){
if (name.equals("Distance")) {
builder.addFloat("Distance", score.getScorerAttributeAsFloat("Distance"));
}
}
}
COM: <s> expand the general purpose annotations that are generated by different scorers </s>
|
funcom_train/20220949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String tokenisePath(final String path) {
if (path == null) {
return null;
}
final File projectPath = getProjectPath();
if (projectPath != null) {
final String projectPathAbs = projectPath.getAbsolutePath();
if (path.startsWith(projectPathAbs)) {
return CheckStyleConstants.PROJECT_DIR + path.substring(
projectPathAbs.length());
}
}
return path;
}
COM: <s> process a path and add tokens as necessary </s>
|
funcom_train/32636000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean markResultValid(String taskID) {
boolean success = false;
Result search = TaskFactory.createResult(taskID);
try {
Result r = search.find()[0];
transitioner.markResultValid(r);
success = true;
} catch (ArrayIndexOutOfBoundsException e) {
SysLogger.println("ERROR: RemoteTransitionerRPCHandler.markResultValid: Could not result " + taskID + ".");
} catch (Exception e) {
SysLogger.println("ERROR: RemoteTransitionerRPCHandler.markResultValid: " + e + ".");
}
return success;
}
COM: <s> marks a result as valid </s>
|
funcom_train/34339528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand1() {
if (okCommand1 == null) {//GEN-END:|22-getter|0|22-preInit
// write pre-init user code here
okCommand1 = new Command("Ok", Command.OK, 0);//GEN-LINE:|22-getter|1|22-postInit
// write post-init user code here
}//GEN-BEGIN:|22-getter|2|
return okCommand1;
}
COM: <s> returns an initiliazed instance of ok command1 component </s>
|
funcom_train/41623386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(ListSelectionEvent e) {
if (e.getValueIsAdjusting()) {
return;
}
if (this.inside) {
return;
}
this.inside = true;
try {
if (leftJList.getSelectedIndex() != -1) {
rightJList.clearSelection();
}
updateSelectionButtons();
} finally {
this.inside = false;
}
}
COM: <s> disables the single left to right button if there are no selected items </s>
|
funcom_train/10812150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void storeScriptSchema() {
String alias = getAlias();
if (!(conf == null || alias == null || scriptSchema == null)) {
try {
conf.set(alias + ".scriptSchema", ObjectSerializer
.serialize(Util.translateSchema(scriptSchema)));
} catch (IOException ioe) {
int errCode = 1018;
String msg = "Problem serializing script schema";
FrontendException fee = new FrontendException(this, msg, errCode,
PigException.INPUT, false, null, ioe);
throw new RuntimeException(fee);
}
}
}
COM: <s> this method will store the script schema schema using object serializer to </s>
|
funcom_train/3385301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getIndexFor(char c) {
if (defaultFont.canDisplay(c)) {
return 1;
}
for (int i=0; i < getAllFonts().length; i++) {
if (allFonts[i].canDisplay(c)) {
return i+2;
}
}
return 1;
}
COM: <s> search fonts in order and return 1 to indicate its in the default </s>
|
funcom_train/29545501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getInt(byte[] buffer, int index, int len) {
int newInt = ((int) buffer[index++] & 0xff);
len--;
while (len > 0) {
newInt <<= 8;
newInt |= ((int) buffer[index++] & 0xff);
len--;
}
return newInt;
} /* end getInt */
COM: <s> load bytes from a buffer into an integer </s>
|
funcom_train/3724127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getEndMax(String dim) {
if (dim == "x") {
return picture.getImage().getWidth(picture.getImageObserver());
} else if (dim == "y") {
return picture.getImage().getHeight(picture.getImageObserver());
} else {
return 0;
}
}
COM: <s> return the width of the picture if dim is x </s>
|
funcom_train/21609489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doCatch(int numconns, String hostname, int port) throws UnknownHostException {
this.total += numconns;
InetAddress addr = InetAddress.getByName(hostname);
searchDepth sd = new searchDepth();
searchTbl.put(addr, sd);
mygs.openConnection(addr, port);
}
COM: <s> create numconns new connections to the gnutella network using the </s>
|
funcom_train/45933684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NodeListResponseObjectType findNodes(FindNodesRequest parameters) {
NodeListResponseObject nodeListResponseObject = vocabularyService.findNodes(
IdentificationSdoHelper.fromIdentificationType(parameters.getIdentification()),
parameters.getNameSpaceName(), parameters.getRequestId(),
OptionsSdoHelper.fromOptionsType(parameters.getOptions()));
return ResponseObjectSdoHelper.toNodeListRepsonseObjectType(nodeListResponseObject);
}
COM: <s> interface to find nodes in vocabulary service </s>
|
funcom_train/15723443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExplorerState(IEntity directory, IEntity entity, int dividerLocation) {
//for explorer style
myCurrentDirectory = directory;
myCurrentEntity = entity;
myDividerLocation = dividerLocation;
//for nc style
if (myActivePanelIndex == 0) {
myLeftDirectory = directory;
myLeftEntity = entity;
} else {
myRightDirectory = directory;
myRightEntity = entity;
}
}
COM: <s> sets current state for viewers with one panel </s>
|
funcom_train/1538666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigRational inverse() {
BigInteger R1 = num;
BigInteger R2 = den;
BigInteger S1;
BigInteger S2;
if ( R1.signum() >= 0 ) {
S1 = R2;
S2 = R1;
} else {
S1 = R2.negate();
S2 = R1.negate();
}
return new BigRational(S1,S2);
}
COM: <s> rational number inverse </s>
|
funcom_train/3385231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static GlyphLayout get(LayoutEngineFactory lef) {
if (lef == null) {
lef = SunLayoutEngine.instance();
}
GlyphLayout result = null;
synchronized(GlyphLayout.class) {
if (cache != null) {
result = cache;
cache = null;
}
}
if (result == null) {
result = new GlyphLayout();
}
result._lef = lef;
return result;
}
COM: <s> return a new instance of glyph layout using the provided layout engine factory </s>
|
funcom_train/3375112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChooserPanel( AbstractColorChooserPanel panel ) {
AbstractColorChooserPanel[] oldPanels = getChooserPanels();
AbstractColorChooserPanel[] newPanels = new AbstractColorChooserPanel[oldPanels.length+1];
System.arraycopy(oldPanels, 0, newPanels, 0, oldPanels.length);
newPanels[newPanels.length-1] = panel;
setChooserPanels(newPanels);
}
COM: <s> adds a color chooser panel to the color chooser </s>
|
funcom_train/25365772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDamageFirePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Enemy_damageFire_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Enemy_damageFire_feature", "_UI_Enemy_type"),
LeveleditorPackage.Literals.ENEMY__DAMAGE_FIRE,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the damage fire feature </s>
|
funcom_train/22213734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onSemaphoreCleared() {
// do the normal thing unless we are abandoned
if (!getAbandonedState()) {
clearedLock.signalLockable() ;
}
// is anyone waiting to hear an event when all the
// resources are released?
if (shutdownLock!=null) {
// if so, set the event
shutdownLock.signalLockable() ;
}
}
COM: <s> callback invoked when all semaphore resources are unacquired and </s>
|
funcom_train/10815818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readFields(DataInput in) throws IOException {
long size = in.readLong();
for (long i = 0; i < size; i++) {
try {
Object o = sedes.readDatum(in);
add((Tuple)o);
} catch (ExecException ee) {
throw ee;
}
}
}
COM: <s> read a bag from disk </s>
|
funcom_train/49044634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTimeOffsetPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EventRelativeTime_TimeOffset_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EventRelativeTime_TimeOffset_feature", "_UI_EventRelativeTime_type"),
EventPackage.Literals.EVENT_RELATIVE_TIME__TIME_OFFSET,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the time offset feature </s>
|
funcom_train/3863181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveMap() {
// BUG when 'cancel' is selected exception is not caught properly !
dm.saveMap(JOptionPane.showInternalInputDialog(jFrame.getContentPane(),"Save Map as...","Save Map", JOptionPane.PLAIN_MESSAGE),hb.getHexBoard()) ;
// REVIEW doLayout shouldn't be called directly (better validate() if needed)
scroll.doLayout();
hb.repaint();
}
COM: <s> saves the currently open map to disk </s>
|
funcom_train/2284058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initPredefinedVarsOfBaseSer() {
if (_baseSer instanceof QuoteSer) {
QuoteSer quoteSer = (QuoteSer)_baseSer;
O = quoteSer.getOpen();
H = quoteSer.getHigh();
L = quoteSer.getLow();
C = quoteSer.getClose();
V = quoteSer.getVolume();
}
}
COM: <s> override this method to define your predefined vars </s>
|
funcom_train/42775305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAgent(AgentPropertiesPanel agPropPanel, ImageIcon icon){
//Create graphical representation of agent
AgentGUI tmpAgGUI = new AgentGUI(agPropPanel, icon);
agentGUIHashMap.put(tmpAgGUI.getID(), tmpAgGUI);
//Add MIDI agent to agent handler
AgentHolder.addAgent(tmpAgGUI.getAgent());
//Refresh
this.repaint();
}
COM: <s> adds an agent to the panel and application </s>
|
funcom_train/10598259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String absolutize(SourceFactory factory, String baseURI, String systemID) {
if (factory instanceof URIAbsolutizer) {
systemID = ((URIAbsolutizer) factory).absolutize(baseURI, systemID);
} else {
systemID = org.apache.excalibur.source.SourceUtil.absolutize(baseURI, systemID);
}
return systemID;
}
COM: <s> makes an absolute uri based on a base uri and a relative uri </s>
|
funcom_train/39481539 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendEvent (String eventName, Object... args){
State tgtState = machine.getMasterState();
int priority = machine.getEventPriority(this,tgtState,eventName,args);
sendEvent(tgtState,priority,eventName,args);
}
COM: <s> anonymously sent events are sent to all </s>
|
funcom_train/49327712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getOpenFrom() {
double price = service.getPrice();
if (price > 0.0) {
double payed = getPayed();
int numMonthsPayed = (int) Math.round(payed / (price / 12.0));
Calendar cal = Calendar.getInstance();
cal.setTime(fromdate);
cal.add(Calendar.MONTH, numMonthsPayed);
return Dates.getNextStartOfMonth(cal.getTime());
} else {
return new Date();
}
}
COM: <s> get date from which on open cost is computed </s>
|
funcom_train/50961680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void flushInvEntries() {
//flush if full
if (numDocs > 100) {
numDocs = 0;
for (Iterator i = invEntries.entrySet().iterator(); i.hasNext(); ) {
Map.Entry m = (Map.Entry) i.next();
LinkedList e = (LinkedList) m.getValue();
String t = (String) m.getKey();
if (e.size() < 10) {
invIndex.insert(t, e);
i.remove();
}
}
}
}
COM: <s> description of the method </s>
|
funcom_train/46189895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateFileManagerForThemeFiles() {
Theme theme = new Theme(blog, "custom", "/some/path");
blog.setEditableTheme(theme);
fileManager = new FileManager(blog, FileMetaData.THEME_FILE);
assertEquals(blog.getEditableTheme().getPathToLiveTheme(), fileManager.getRootDirectory());
}
COM: <s> tests that a file manager for theme files can be created </s>
|
funcom_train/17394269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moveWindowToCenter(){
Monitor monitor = this.shell.getMonitor();
Rectangle bounds = monitor.getBounds();
Rectangle rect = shell.getBounds();
int x = bounds.x + (bounds.width - rect.width) / 2;
int y = bounds.y + (bounds.height - rect.height) / 2;
shell.setLocation (x, y);
}
COM: <s> move the window to the center of the monitor </s>
|
funcom_train/23322679 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setBaseUrl(URL sitemapUrl) {
baseUrl = sitemapUrl.toString().toLowerCase();
//baseUrl = "http://foo.org/abc/sitemap.xml";
// Remove everything back to last slash.
// So http://foo.org/abc/sitemap.xml becomes http://foo.org/abc/
baseUrl = baseUrl.replaceFirst("/[^/]*$", "/");
}
COM: <s> this is private because only once we know the sitemaps url </s>
|
funcom_train/22287431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toFront(Widget w) {
for (int i = 0 ; i < nwidgets ; i++) {
if (widgets[i] == w) {
System.arraycopy(widgets, i+1, widgets, i, nwidgets-(i+1));
widgets[nwidgets-1] = w;
invalidate();
repaint(0, w.x, w.y, w.width, w.height);
break;
}
}
}
COM: <s> bring a widget in this widget to the front </s>
|
funcom_train/27931372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToTypeIndex(AnnotationType key, Annotation a) {
TreeSet treeSet = (TreeSet) typeMap.get(key);
if (treeSet == null) {
treeSet = new TreeSet(new AnnotationStartOffsetComparator());
typeMap.put(key, treeSet);
}
treeSet.add(a);
}
COM: <s> adds the specified annotation to the index map </s>
|
funcom_train/13197304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void loadDataSource(File file) throws DataSourceException {
try {
doc = new SecureXmlFile(secparam, file);
doc.loadFile();
} catch (SecurityException se) {
throw new DataSourceException("security error loading secure xml file", se);
} catch (Exception e) {
throw new DataSourceException("error loading secure xml file", e);
}
}
COM: <s> opens an existing xml file and loads the dom structure </s>
|
funcom_train/49752283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand() {
if (exitCommand == null) {//GEN-END:|54-getter|0|54-preInit
// write pre-init user code here
exitCommand = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|54-getter|1|54-postInit
// write post-init user code here
}//GEN-BEGIN:|54-getter|2|
return exitCommand;
}
COM: <s> returns an initiliazed instance of exit command component </s>
|
funcom_train/44403062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean serviceExists() {
String strFullCollectionPath = serviceURI + collectionPath;
boolean serviceExists = (xpathQueryServices.get(strFullCollectionPath) != null);
// this will return true even if database goes down - need to do more than a
// HashMap.get().
return serviceExists;
}
COM: <s> test to check if a service exists for this uri and collection </s>
|
funcom_train/31241510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void queue(ALBufferID buffer) {
assert isCreated() : this + " is not created yet";
if (attachedBuffer != null) {
attachedBuffer = null;
stop();
}
try {
alSourceQueueBuffers(source, buffer.getBufferID());
} catch (OpenALException e) {
System.out.println("Failed to queue "+buffer+" on "+this);
throw e;
}
set(AL_LOOPING, AL_FALSE);
}
COM: <s> queue a buffer on this source </s>
|
funcom_train/46188491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Category getParent(Category category, boolean create) {
String id = category.getId();
int index = id.lastIndexOf(CATEGORY_SEPARATOR);
String parentId = id.substring(0, index);
if (parentId.equals("")) {
// the parent is the root category
parentId = "/";
}
return getCategory(parentId, create);
}
COM: <s> gets and creates if necessary the parent of the specified category </s>
|
funcom_train/48784582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAdaptor() throws Exception {
RemoteAdaptor handler=createRemoteAdaptor(new URL(JMX_END_POINT));
assertEquals("Testing handler","jboss",
handler.getDefaultDomain());
assertTrue("Testing handler with custom serializer",handler.
isRegistered(new ObjectName(AXIS_JMX_NAME)));
}
COM: <s> tests the typed adaptor access </s>
|
funcom_train/36908961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAccount(String requesterLogin, long accountId) throws UnknownEntityException, PermissionDeniedException, PersistenceException {
Account ac = this.accountDAO.getAccount(accountId);
if (!ac.getLogin().equals(requesterLogin)) {
throw new PermissionDeniedException("Permission denied: you do not own this account");
}
this.removeAccount(ac);
}
COM: <s> removes an account from the system </s>
|
funcom_train/104107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void changeButtonPressed() {
// Make sure we populate our combobox with everything from the server
populateComboAndSelect(true);
if(topChooser.getSelectedItem() == EntityListComboBox.NEW_ITEM)
propertiesTable.setPreviewText(I18n.getText("general.choose").toUpperCase());
else
propertiesTable.setPreviewText(I18n.getText("general.preview").toUpperCase());
propertiesTable.setPreviewing(true);
// we're starting to change...
changingTop = true;
chooseOrCancelUIUpdate();
}
COM: <s> called when the change button is pressed </s>
|
funcom_train/3183907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addStyle(Element style) {
String id = style.getAttributes().getNamedItemNS(
XLElement.XMLNS_SS, "ID").getNodeValue();
if (styles.containsKey(id)) {
return false;
}
styles.put(id, style);
return true;
}
COM: <s> add a new spreadsheet ml style element to the factory </s>
|
funcom_train/13509256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DockablePanel getDockablePanel(String key){
DockableState[] dockableStates = this.getDockables();
for(int i=0;i<dockableStates.length;i++){
DockablePanel dockablePanel = (DockablePanel) dockableStates[i].getDockable();
if (dockablePanel.getDockKey().getKey().equals(key)){
return dockablePanel;
}
}
return null;
}
COM: <s> retrieve a dockable panel </s>
|
funcom_train/2385967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetParamsNull() {
IChatMessage message = null;
try {
message = IChatRefreshBoardMessage.newInstance(messageNumber, sender, null);
}
catch (NumberFormatException e) {
fail(e.getMessage());
}
String[] params = message.getParameters();
assertNotNull(params);
assertTrue(params.length == 0);
}
COM: <s> checks that the parameters getter returns empty array when null </s>
|
funcom_train/8022938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stylizeDefault(int r, int g, int b, boolean bold, boolean italic) {
for (int i = 0; i < Token.all.length; i++) {
setStyleConstants(styles.getStyleForScanValue(Token.all[i]
.getScanValue()), new Color(r, g, b), bold, italic);
}
}
COM: <s> set default text attributes for all scheme texts </s>
|
funcom_train/41524626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean initLogCommand(Command cmd){
TransactionStatus status = null;
boolean result = true;
try{
status = getTxStatus(cmd.getActionName(), false, Command.ISOLATION_DEFAULT, Command.PROPAGATION_REQUIRED);
cmd.initCommandLog();
}catch(Exception e){
logMessage(cmd, "It is not possible to log init command execution", e);
txManager.rollback(status);
result = false;
}
if(result)
txManager.commit(status);
return result;
}
COM: <s> this method is responsible of init log operation </s>
|
funcom_train/9919163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void beginUpdateIndices() {
gl.glBindBufferARB(GL.GL_ELEMENT_ARRAY_BUFFER, indicesVBO[0]);
ByteBuffer temp = gl.glMapBufferARB(GL.GL_ELEMENT_ARRAY_BUFFER, GL.GL_WRITE_ONLY);
indices = temp.asIntBuffer();
}
COM: <s> prepares the indices for updating </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.