__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
|---|---|---|
funcom_train/23942799
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private SelectedAttributes parse(XElement x) {
SelectedAttributes sa = new SelectedAttributes();
for (XElement cx : x.childrenWithName("attribute")) {
String name = cx.get("name");
if (name != null) {
sa.add(new SelectedAttribute(name));
}
}
return sa;
}
COM: <s> parse a single attribute </s>
|
funcom_train/31147047
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void enqueue_many(QueueElementIF[] bufarr) throws SinkException {
if (isClosed()) throw new SinkClosedException("ATcpConnection closed");
for (int i = 0; i < bufarr.length; i++) {
if (bufarr[i] == null) throw new BadQueueElementException("ATcpConnection.enqueue_many got null element", bufarr[i]);
aSocketMgr.enqueueRequest(new ATcpWriteRequest(this, (BufferElement) bufarr[i]));
}
}
COM: <s> enqueue a set of outgoing packets to be written to this socket </s>
|
funcom_train/779049
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean isSecuredFxp() throws IOException {
Command command = new Command(Command.SSCN);
Reply reply = sendCommand(command);
reply.dumpReply();
if(((String)reply.getLines().get(0)).indexOf("CLIENT") >= 0)
return true;
return false;
}
COM: <s> this method is used indicate if sscn is on or off </s>
|
funcom_train/9007906
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getName (){
String s="";
if(getGivenName() != null && getGivenName().length() != 0)
s += " " + getGivenName();
if(getMiddleName() != null && getMiddleName().length() != 0)
s += " " + getMiddleName();
if(getFamilyName() != null && getFamilyName().length() != 0)
s += " " + getFamilyName();
return s;
}
COM: <s> gets the patient whole name which is a concatenation of the </s>
|
funcom_train/24503719
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void writeFrequencies(File redFile, File greenFile, File blueFile) {
if (isGreyscale) {
throw new IllegalArgumentException("image not rgb.");
}
writeBand(redFile, 0);
writeBand(greenFile, 1);
writeBand(blueFile, 2);
}
COM: <s> write frequencies for an rgb image </s>
|
funcom_train/46858286
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeGameObjectFromMap() {
Tile cursorTile = mapRenderer.getCursorLocation();
TileMover mover = cursorTile.getTileMover();
Property property = cursorTile.getProperty();
if (mover != null && mover instanceof Unit) {
removeGameObjectFromMap(Unit.class, cursorTile);
return;
}
if (property != null) {
removeGameObjectFromMap(Property.class, cursorTile);
}
}
COM: <s> removes the game object from the cursor tile </s>
|
funcom_train/1170468
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeCardFromShopList(Card c) {
String s = c.getName();
if (!shopList.contains(s)) {
return;
}
for (int i = 0; i < shopList.size(); i++) {
String str = shopList.get(i);
if (str.equals(s)) {
shopList.remove(i);
break;
}
}
}
COM: <s> p remove card from shop list </s>
|
funcom_train/12713639
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public GribRecord getRecord(int iRecord) throws BadGribException {
long pos=arrRecordsPos[iRecord];
try {
FileInputStream in = new FileInputStream(gribFile);
GribRecord gr;
in.skip(pos);
gr = new GribRecord(in);
in.close();
return gr;
} catch (FileNotFoundException e) {
return null;
} catch (IOException e) {
return null;
}
}
COM: <s> retrieve tt i record tt th record of the grib file </s>
|
funcom_train/43327534
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public double estASns1(double score) {
if (!canEstimateAA()) return Double.NaN;
int x = (int)((score - limitsAA.data[0]) / limitsAA.data[1] * 100.0);
if (x > 99) x = 99;
else if (x < 0) x = 0;
return asns1EA.data[x];
}
COM: <s> estimate the asns1 given an average score with gap penalties </s>
|
funcom_train/14359470
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean acceptsFile(File file) {
// Convert the filename to lower case to help with the comparison.
String name = file.getName().toLowerCase();
// If it is an .xls file, then we are probably an Excel file,
// but check that it also complies with the OLE header requirement
// as well. This could be extended with additional checks.
if (ignoreFileExtension || name.endsWith(".xls")) {
return checkFileHeader(file, OLEConstants.OLE_HEADER);
}
return false;
}
COM: <s> determine if this adapter can extract metadata from the file </s>
|
funcom_train/49584997
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void updateLocaleState(Locale locale) {
updateLocaleActionState(HORIZONTALSCROLL_ACTION_COMMAND, locale);
updateLocaleActionState(PACKALL_ACTION_COMMAND, locale);
updateLocaleActionState(PACKSELECTED_ACTION_COMMAND, locale);
updateLocaleActionState(EXPORT_ACTION_COMMAND, locale);
}
COM: <s> updates locale dependent state to the given code locale code </s>
|
funcom_train/25211804
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void writeByteArrayAsEntries(byte[] bytes) throws IOException {
for (int i = 0; i < bytes.length; i++) {
writeStartElement("entry");
writeAttribute("id", i);
writeAttribute("value", "0x" + toHexString(bytes[i], 2));
writeEndElement();
}
}
COM: <s> write a byte array as entries hex </s>
|
funcom_train/33703969
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addDatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Operation_date_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Operation_date_feature", "_UI_Operation_type"),
BankabeulePackage.Literals.OPERATION__DATE, false, false,
false, null, null, null));
}
COM: <s> this adds a property descriptor for the date feature </s>
|
funcom_train/25462182
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getString() {
if( list == null || list.size() == 0 )return "";
StringBuilder sb = new StringBuilder();
for( int i=0, n=list.size(); i<n; i++ ){
Param pm = list.get(i);
sb.append(pm.getString());
if( i< n-1 ){
sb.append(", ");
}
}
return sb.toString();
}
COM: <s> get the parameters string without the type declaration or default value </s>
|
funcom_train/50366240
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void innerValidations(ConstantPoolTable cpt) throws AttributeValidationException, AttributeOutOfRangeException, MissingDnaContainerException, MissingCPTableException {
if (cpt != null) {
super.innerValidations(cpt);
validateCodeLength();
validateCode();
validateExceptionTable(cpt);
validateAttributes();
}
else {
throw new MissingCPTableException();
}
}
COM: <s> this method guarantees the validation process workflow is executed correctly </s>
|
funcom_train/29581172
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Vector getCertificates(GlobusGSSCredentialImpl credential) {
X509Certificate certArray[] = credential.getCertificateChain();
Vector certs = null;
if (certArray.length > 0) {
certs = new Vector(certArray.length);
for (int i=0; i<certArray.length; i++) {
certs.add(certArray[i]);
}
}
return certs;
}
COM: <s> this method is used to extract the chain of x </s>
|
funcom_train/14275137
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public DirectoryEntryEnumeration enumerateDirectory(FileReference file, int iterator) throws ConduitHandlerException, NotConnectedException {
try {
return jHotSync.enumerateDirectory(file, iterator);
} catch (DLPFunctionCallException e) {
throw new ConduitHandlerException(e.toString(), e);
} // end-catch
} // end-method
COM: <s> retrieves an enumeration of the entries in the specified directory </s>
|
funcom_train/1196476
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void run() {
String crs = Params.MAP_CRS;
Image img = null;
if(wmsServer != null)
try {
img = wmsServer.getImage(mapBounds, crs, mapSize);
} catch (CampusTourException e) {
mapper.resetAsynch();
}
else
mapper.resetAsynch();
MapImage theMap = new MapImage(img, mapBounds, null);
if(img != null)
mapper.setLocalMapImage(theMap);
else
mapper.resetAsynch();
}
COM: <s> request and return the map </s>
|
funcom_train/32057162
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testActionPerformed() {
System.out.println("testActionPerformed");
GPGraphpad graphpad = new GPGraphpad();
ToolBoxSelect bottom = new ToolBoxSelect(graphpad);
ActionEvent action = null;
bottom.actionPerformed(action); // empty implementation
assertTrue( true );
//graphpad.getFrame().dispose();
}
COM: <s> test of action performed method of class tool box select </s>
|
funcom_train/8805724
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public IBinding resolveImportBinding(ASImportDeclaration importDecl) {
//
// This is an import binding
//
if (importDecl.isOnDemand()) {
ASName packageName = importDecl.getName().getQualifier();
return getBinding(packageName.toString());
}
//
// This is a type binding
//
return getBinding(importDecl.getName().toString());
}
COM: <s> resolves an import to the corresponding package or type binding </s>
|
funcom_train/48874888
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private String retrieveElementCdata(final XMLEventReader reader, final boolean mandatory, final String xPath) throws XMLStreamException {
final String elementCData = reader.getElementText();
if (mandatory && elementCData == null || elementCData.trim().length() == 0) {
throw new IllegalStateException("Found an " + xPath + " element with no content.");
}
return elementCData;
}
COM: <s> utility method to retrieve the cdata contents of an element </s>
|
funcom_train/39911950
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testSetRh6() {
System.out.println("setRh6");
TextField tf = null;
Page1 instance = new Page1();
instance.setRh6(tf);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set rh6 method of class timesheetmanagement </s>
|
funcom_train/10482868
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public MessagingException getException(boolean reportSuccess) {
if (status != SUCCESS) {
return new SMTPAddressFailedException(address, cmd, reply.getCode(), reply.getMessage());
} else {
if (reportSuccess) {
return new SMTPAddressSucceededException(address, cmd, reply.getCode(), reply.getMessage());
}
}
return null;
}
COM: <s> get an exception object associated with this send operation </s>
|
funcom_train/11010217
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Dimension getPageSize(){
CTSlideSize sz = _presentation.getSldSz();
int cx = sz.getCx();
int cy = sz.getCy();
return new Dimension((int)Units.toPoints(cx), (int)Units.toPoints(cy));
}
COM: <s> returns the current page size </s>
|
funcom_train/49156787
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void loadSystems() {
int i, num;
SystemItem dtls;
systemCombo.removeAllItems();
systemCombo.addItem("<All>");
try {
systems = retrieveReLayout.getSystems();
} catch (Exception ex) {
message.setText(ex.getMessage());
message.setCaretPosition(1);
ex.printStackTrace();
}
num = systems.size();
for (i = 0; i < num; i++) {
dtls = systems.get(i);
systemCombo.addItem(dtls.description);
}
}
COM: <s> load the various systems from the db </s>
|
funcom_train/36764398
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected int processAlln(String parameter_info, String parameter){
if(parameter.contentEquals(""))
return 0;
Check check_instance = new Check();
if(check_instance.isInt(parameter)==0){
return 0;
}else{
if(check_instance.isParameterOverflow(parameter, parameter_info)==1){
return 1;
}
}
return 2;
}
COM: <s> provides the neccesary info for processing n type parameters </s>
|
funcom_train/1476371
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getAfterTableSQL() {
String sql = "";
if (whereSQL != null && !("".equals(whereSQL))) {
sql = " where " + whereSQL;
}
if (orderSQL != null && !("".equals(orderSQL))) {
sql += orderSQL;
}
return sql;
}
COM: <s> get the sql statement to place after the tables in the sql statement </s>
|
funcom_train/12837209
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void removeSession(SessionID sessionID) throws SessionException {
if (sessionID == null) {
throw new SessionException("Null sessionID argument.");
} else if (SessionID.SYSTEM_SESSION_ID.equals(sessionID)) {
throw new SessionException("The SystemSession cannot be removed.");
}
getSessionHashtable().remove(sessionID);
}
COM: <s> removes the named session if it exists </s>
|
funcom_train/20888241
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void sendTo(int nr) {
NodeId dstNode;
if (nr == -1) {
dstNode = NodeId.ALLNODES;
LOGGER.info("Node " + id + " now sends to all nodes.");
} else {
dstNode = NodeId.get(nr);
LOGGER.info("Node " + id + " now sends to node " + other);
}
Packet hw = new ApplicationPacket(sender, dstNode);
hw.setHeaderLength(1024);
sendPacket(hw);
}
COM: <s> internal helper to simply send a packet to a given node </s>
|
funcom_train/1712318
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addUserIconsForAnnotations(int page, String type, Image[] icons) {
if (userAnnotIcons == null)
userAnnotIcons = new Hashtable();
userAnnotIcons.put((page) + "-" + type, icons);
if (displayHotspots == null) {
displayHotspots = new Hotspots();
printHotspots = new Hotspots();
}
/** ensure type logged */
displayHotspots.checkType(type);
printHotspots.checkType(type);
}
COM: <s> allow user to set own icons for annotation hotspots to display in </s>
|
funcom_train/17568060
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void clearDB() {
try {
//Executes the removal.
clearDbStmt.executeUpdate();
//Notifies it is now empty.
ui.writeLog("Database is clear...");
} catch (SQLException e) {
//write error to log
ui.writeLog("Error accessing database.");
}
}
COM: <s> removes all templates from the database </s>
|
funcom_train/9429182
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void parsePrefix(Name name, NameTokenizer tokens) {
if (tokens.mStartPointer == tokens.mEndPointer) {
return;
}
String firstToken = tokens.mTokens[tokens.mStartPointer];
if (mPrefixesSet.contains(firstToken.toUpperCase())) {
name.prefix = firstToken;
tokens.mStartPointer++;
}
}
COM: <s> parses the first word from the name if it is a prefix </s>
|
funcom_train/2325579
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void dht2Slices() {
if (content instanceof DenseLargeFloatMatrix3D) {
if (this.isNoView == true) {
((DenseLargeFloatMatrix3D) content).dht2Slices();
} else {
DenseLargeFloatMatrix3D copy = (DenseLargeFloatMatrix3D) copy();
copy.dht2Slices();
assign(copy);
}
} else {
throw new IllegalArgumentException("This method is not supported");
}
}
COM: <s> computes the 2 d discrete hertley transform dht of each column of this </s>
|
funcom_train/4553366
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public double getDouble(String key) throws JSONException {
Object object = get(key);
try {
return object instanceof Number ?
((Number) object).doubleValue() :
Double.parseDouble((String) object);
} catch (Exception e) {
throw new JSONException("JSONObject[" + quote(key) +
"] is not a number.");
}
}
COM: <s> get the double value associated with a key </s>
|
funcom_train/40621758
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void selectAllRows() {
// Select all rows
RowFormatter rowFormatter = getRowFormatter();
int rowCount = getRowCount();
for (int i = 0; i < rowCount; i++) {
if (!selectedRows.containsKey(i)) {
selectRow(i, rowFormatter.getElement(i), false, true);
}
}
}
COM: <s> select all rows in the table </s>
|
funcom_train/18788981
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setValue(String propertyName, Serializable object) {
if (this.getPropertyValue(propertyName) != null) {
Serializable oldValue = this.getPropertyValue(propertyName);
this.getPropertyValue(propertyName).setValue(object);
propertyChangeSupport.firePropertyChange(propertyName, oldValue, object);
} else {
throw new RuntimeException("Property not found!");
}
}
COM: <s> sets the value of a property </s>
|
funcom_train/37141284
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void updateFromDateChanged() {
Date visibleHook = datePicker.getDate() != null ?
datePicker.getDate() : datePicker.getLinkDay();
datePicker.getMonthView().ensureDateVisible(visibleHook);
datePicker.getEditor().setValue(datePicker.getDate());
}
COM: <s> updates internals after pickers date property changed </s>
|
funcom_train/22498637
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void writeChildElements(final Element parentElement) throws IOException, BadLocationException {
Element childElement; //Not necessarily a paragraph element.
for (int i = 0; i < parentElement.getElementCount(); i++) {
childElement = parentElement.getElement(i);
write(childElement);
}
}
COM: <s> invoke html creation for all children of a given element </s>
|
funcom_train/32778268
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void skip(Class<?> messageType) {
if (messageType == null)
return; // no good parameter
MLink tmp = linkOf(messageType); // buffer the link to the msgType
if (tmp == null)
return; // type not registered, return
tmp.skipCount++; // well, just increase by one :-)
}
COM: <s> skips the transmission of the next tracenote or increases the skip counter </s>
|
funcom_train/32117058
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean isCodeEditorRegistered(CodeEditor codeEditor) throws IllegalArgumentException {
Validate.notNull(codeEditor, "codeEditor argument is null"); //$NON-NLS-1$
for (Component component : getComponents()) {
if (component instanceof CodeEditorPane
&& codeEditor == ((CodeEditorPane) component).getCodeEditor())
return true;
}
return false;
}
COM: <s> returns code true code if the specified </s>
|
funcom_train/45515782
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JToolBar standardToolbar() {
//Standard Tool Bar
JToolBar standardToolBar = new JToolBar();
//New
JButton newButton = new JButton(ACTIONS.get("new"));
standardToolBar.add(newButton);
//Open
JButton openButton = new JButton(ACTIONS.get("open"));
standardToolBar.add(openButton);
//SAVE
JButton SAVEButton = new JButton(ACTIONS.get("SAVE"));
standardToolBar.add(SAVEButton);
standardToolBar.addSeparator();
//Close
JButton CloseButton = new JButton(ACTIONS.get("close"));
standardToolBar.add(CloseButton);
return standardToolBar;
}
COM: <s> initializes the standard toolbar </s>
|
funcom_train/9869794
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setPais(Integer newVal) {
if ((newVal != null && this.pais != null && (newVal.compareTo(this.pais) == 0)) ||
(newVal == null && this.pais == null && pais_is_initialized)) {
return;
}
this.pais = newVal;
pais_is_modified = true;
pais_is_initialized = true;
}
COM: <s> setter method for pais </s>
|
funcom_train/2624067
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetAComponent() {
System.out.println("getAComponent");
JFCXComponent instance = new JFCXComponent(null);
Accessible expResult = EasyMock.createMock(Accessible.class);
instance.aComponent = expResult;
Accessible result = instance.getAComponent();
assertEquals(expResult, result);
}
COM: <s> test of get acomponent method of class jfcxcomponent </s>
|
funcom_train/26240057
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getToolTipText(MouseEvent event) {
int row = rowAtPoint(event.getPoint());
int col = columnAtPoint(event.getPoint());
Object o = getValueAt(row, col);
if (o == null)
return null;
if (o instanceof String) {
if (o.equals("")) //$NON-NLS-1$
return null;
else
return (String) o;
} else {
return super.getToolTipText(event);
}
}
COM: <s> show cell content as tooltip </s>
|
funcom_train/44223191
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Object get_zippedData() {
Object zippedData = null;
if (this.splineStack != null) {
this.splineStack.set_atlasMapper(null);
this.splineStack.set_currentLevel(-1);
zippedData = this.compressData(this.splineStack);
this.splineStack.set_atlasMapper(this);
}
return zippedData;
}
COM: <s> get the compressed spline stack data </s>
|
funcom_train/5600362
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void run() {
final Collection<Tile> tiles = createSourceTiles();
ensureEmptyProperties();
if (tiles.isEmpty()) {
err.println("At least one tile must be specified.");
System.exit(BAD_CONTENT_EXIT_CODE);
}
createTargetTiles(tiles);
out.flush();
err.flush();
}
COM: <s> process to the command execution </s>
|
funcom_train/27821792
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void elementsRemoved(final Graph graph,final Collection nodes,final Collection edges) {
if (SwingUtilities.isEventDispatchThread())
elementsRemovedInternal(graph,nodes,edges);
else
SwingUtilities.invokeLater(new Runnable() {
public void run() {
elementsRemovedInternal(graph,nodes,edges);
}
});
}
COM: <s> called when elements are removed from the graph </s>
|
funcom_train/26024325
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void doGroup(JGraph graph, Object prototype) {
if (prototype != null) {
// Reorders the selection according to the layering
Object[] cells = graph.order(graph.getSelectionCells());
if (cells != null && cells.length > 0) {
// Gets a clone of the prototype group cell
Object group = DefaultGraphModel.cloneCell(graph.getModel(),
prototype);
graph.getGraphLayoutCache().insertGroup(group, cells);
}
}
}
COM: <s> creates a new group cell that contains the selection cells as children </s>
|
funcom_train/11375324
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testReplicateLenMismatchedBlock() throws Exception {
MiniDFSCluster cluster = new MiniDFSCluster.Builder(new HdfsConfiguration()).numDataNodes(2).build();
try {
cluster.waitActive();
// test truncated block
changeBlockLen(cluster, -1);
// test extended block
changeBlockLen(cluster, 1);
} finally {
cluster.shutdown();
}
}
COM: <s> test if replication can detect mismatched length on disk blocks </s>
|
funcom_train/10565435
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setMinScore(Double minScore) {
if (minScore == null) {
minScore = DEFAULT_MIN_SCORE;
} else if (minScore > 1) {
minScore = Double.valueOf(1);
} else if (minScore < 0) {
minScore = Double.valueOf(0);
}
this.minScore = minScore;
}
COM: <s> setter for the minimum score used to decide if results of geoname </s>
|
funcom_train/3703348
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void fireResizeExpandEvent(Dimension dimNew, Dimension dimOld) {
Iterator it = listResizeListeners.iterator();
ResizeListener l;
while (it.hasNext()) {
l = (ResizeListener) it.next();
l.onExpand(dimNew, dimOld);
}
} // of method
COM: <s> fire that we have expanded </s>
|
funcom_train/36788190
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void logout() {
ContentValues values = new ContentValues();
values.put("Username", "");
values.put("Userpassword", "");
values.put("Rememberme", "");
values.put("Applicationlist", "");
mSqlite.update(Constant.SYSTEMTABLE, values, "ID = \"0\"", null);
this.finish();
startActivity(new Intent(this, Dma.class));
}
COM: <s> deletes preference data and finishes this activity </s>
|
funcom_train/42337085
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private IStructureComparator getStructure(IResource input) {
if (input instanceof IContainer)
return new ResourceNode(input);
if (input instanceof IFile) {
ResourceNode rn= new ResourceNode(input);
IFile file= (IFile) input;
String type= normalizeCase(file.getFileExtension());
if ("JAR".equals(type) || "ZIP".equals(type))
return new ZipStructureCreator().getStructure(rn);
return rn;
}
return null;
}
COM: <s> creates a code istructure comparator code for the given input </s>
|
funcom_train/3467215
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void generateUserImports(com.liantis.xcoder.io.Printer printer) throws java.io.IOException {
// @BEGINPROTECT _42AF37A400CE
if (this.isUserImportsEnabled()) {
printer.println("// add your own imports below");
printer.beginUserCode("//", "UserImports");
printer.endUserCode();
printer.println("");
}
// @ENDPROTECT
}
COM: <s> generates a protected area where the user can add import statements </s>
|
funcom_train/25365691
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addIsEnemyDeadPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RoomEvent_isEnemyDead_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RoomEvent_isEnemyDead_feature", "_UI_RoomEvent_type"),
LeveleditorPackage.Literals.ROOM_EVENT__IS_ENEMY_DEAD,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is enemy dead feature </s>
|
funcom_train/21954038
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void closeFolderDisplay() {
contentPanel.removePreviewPanel(getFolderInfo().getFolderID());
folderDisplay.removeMessageTable();
if (displayedFolder != null && displayedFolder.getFolderDisplayUI() == this)
displayedFolder.setFolderDisplayUI(null);
displayedFolder = null;
setEnabled(false);
}
COM: <s> closes the display for the given folder </s>
|
funcom_train/19578387
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private ChessPiece findEnPassantPawn(PlayerMove move) {
ChessPiece ourPawn;
BoardSquare pawnSquare =
ourBoard[move.to().getX()][move.to().getY() + ((currentPlayer) ? -1 : 1)];
ourPawn = pawnSquare.getCurPiece();
if (ourPawn == null) {
return null;
}
return (ourPawn instanceof Pawn) ? ourPawn : null;
}
COM: <s> finds the pawn that was captured en passant </s>
|
funcom_train/26315292
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void highlight(Coords coords) {
if ((coords == null) || game.getBoard().contains(coords)) {
setHighlighted(coords);
moveCursor(highlightSprite, coords);
moveCursor(firstLOSSprite, null);
moveCursor(secondLOSSprite, null);
processBoardViewEvent(new BoardViewEvent(this, coords, null,
BoardViewEvent.BOARD_HEX_HIGHLIGHTED, 0));
}
}
COM: <s> determines if this board contains the coords and if so highlights that </s>
|
funcom_train/43245601
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetEthinicity() {
System.out.println("getEthinicity");
PatientDataDG3Object instance = new PatientDataDG3Object();
String expResult = "";
String result = instance.getEthinicity();
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 ethinicity method of class org </s>
|
funcom_train/32367132
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private boolean checkFiles(Collection<File> pNexusFiles) {
if (pNexusFiles == null) {
return false;
}
boolean hasError = false;
for (File file : pNexusFiles) {
if (!file.exists()) {
if (LOGGER.isInfoEnabled()) {
LOGGER.info(" input file does not exist:" + file.getAbsolutePath()); //$NON-NLS-1$
}
hasError = true;
}
}
return !hasError;
}
COM: <s> returns true only if all files exist </s>
|
funcom_train/32778446
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean sample() {
incrementObservations(); // increase count of samples
// direct mapping between probability [0,1] and sample from
// randomgenerator [0,1]
// probability indicates level when to return "true".
boolean newSample = randomGenerator.nextDouble() < trueProbability;
if (antithetic)
newSample = !newSample;
if (this.currentlySendTraceNotes())
this.traceLastSample(Boolean.toString(newSample));
return newSample;
}
COM: <s> returns the next bernoulli distributed sample of the distribution </s>
|
funcom_train/9920297
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void fold(){
if(state != ProtoCircle.ACTIVE) {
System.out.println(getName(pc.clone)+"IS FOLDED ALREADY."+"\n");
System.exit(0);
}
state = ProtoCircle.FOLDED;
// Decrement number of active and to call players
pc.activePlayers--;
pc.playersLeftToCall--;
}
COM: <s> folds this player from the current hand </s>
|
funcom_train/37519277
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void printOptions() {
HashMap optMap = getOptions();
String[] options = new String[optMap.size()];
optMap.values().toArray(options);
Arrays.sort(options);
System.out.println();
System.out.println("Options:");
for (int i = 0; i < options.length; i++) {
System.out.println(options[i]);
}
}
COM: <s> prints the options </s>
|
funcom_train/29944195
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void applyIfThen(ASTIfThen n) {
IRGExpr egen = new IRGExpr(_theCode,_theFact);
Location res = egen.doIt(n.getCond());
Label joinLbl = _theCode.newLabel();
_theCode.jumpz(res,joinLbl);
doIt(n.getThen());
_theCode.setLabel(joinLbl);
}
COM: <s> generate the intermediate code for if statement </s>
|
funcom_train/4497296
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void writeSignedBits(long value, int nBits) throws IOException {
int bitsNeeded = getSignedBitsLength(value);
if (nBits < bitsNeeded) {
throw new IOException(
"At least " + bitsNeeded + " bits needed for representation of " +
value);
}
writeInteger(value, nBits);
}
COM: <s> writes a signed integer using a given number of bits e </s>
|
funcom_train/50156502
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void renderAndWrite() {
String pageName = "viewRecord";
Element e = render();
if (e != null) {
// prtln (Dom4jUtils.prettyPrint(autoForm.instanceDocument));
if (!writePage(e, pageName)) {
prtln("main(): trouble writing file");
}
else {
// prtln(pageName + " written to disk");
}
}
}
COM: <s> renders the jsp and writes it to a file </s>
|
funcom_train/37619730
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: final public void truncate(int newSize) {
int i = subscript(newSize);
int bitsLength = length();
if (i < bitsLength) {
andW(i, (1L << (newSize & MASK)) - 1);
for (i++; i < bitsLength; i++) {
bits1[i] = 0L;
}
}
// XXX: should shrink the vector to lower memory usage ?
}
COM: <s> clear all the bits beyond new size new size included so that this </s>
|
funcom_train/16546740
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String findTerm(String specifyTerm, String typeName) {
RecordDefinition recordDef = typeToDefinition.get(typeName);
if (recordDef == null) return null;
for (String term : recordDef.getFields()) {
if (term.substring(term.indexOf("_") + 1).toLowerCase().equals(specifyTerm)) {
return term;
}
}
return null;
}
COM: <s> given a specify dwc term all lowercase dwc term find the corresponding fp </s>
|
funcom_train/3457341
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void initializeAll() {
logger.info("Initializing All AudioFile Containers");
//Enumerate Hashtable
Enumeration e = masterC.elements();
//For each result, .initialize();
while (e.hasMoreElements()) {
AudioFileContainer afc =
((AudioFileContainer) e.nextElement());
afc.initialize();
}
}
COM: <s> initialize all audio file containers contained within </s>
|
funcom_train/43934538
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void notifyItemResume(IPlayItem item, int position) {
IStreamAwareScopeHandler handler = getStreamAwareHandler();
if (handler != null) {
try {
handler.streamPlaylistVODItemResume(this, item, position);
} catch (Throwable t) {
log.error("error notify streamPlaylistVODItemResume", t);
}
}
}
COM: <s> notifies subscribers on resume </s>
|
funcom_train/12855967
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void attach() {
mLock.lock();
try {
if (mTxnMgr.setLocalScope(this, mDetached)) {
mDetached = false;
} else if (!mDetached) {
throw new IllegalStateException("Transaction scope is not detached");
} else {
throw new IllegalStateException
("Current thread has a different transaction already attached");
}
} finally {
mLock.unlock();
}
}
COM: <s> attach this scope to the current thread if it has been </s>
|
funcom_train/23442824
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addSystemPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NotationType_system_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NotationType_system_feature", "_UI_NotationType_type"),
SchemaPackage.Literals.NOTATION_TYPE__SYSTEM,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the system feature </s>
|
funcom_train/46336446
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testIsReadOnly() {
System.out.println("isReadOnly");
OpbField instance = new OpbField();
assertFalse(instance.isReadOnly());
instance.opb_id("y");
assertTrue(instance.isReadOnly());
instance.opb_read_only("n");
assertFalse(instance.isReadOnly());
}
COM: <s> test of is read only method of class opb field </s>
|
funcom_train/10941838
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void runAsync(String localName, ModelService service, Map<String, ? extends Object> context, boolean persist) throws ServiceAuthException, ServiceValidationException, GenericServiceException {
this.runAsync(localName, service, context, null, persist);
}
COM: <s> run the service asynchronously and ignore the result </s>
|
funcom_train/5255410
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int init(String user,String password, String host){
int ret=-1;
// !!!!! DEBUG fixed to true !!!!!!
DEBUG = false;
ManagerConnectionFactory tmpConnect =
new ManagerConnectionFactory(host,user,password);
myManagerConnection = tmpConnect.createManagerConnection();
if (myManagerConnection != null) {
ret=0;
// then we log in
try{
myManagerConnection.login();
CallEvents = new LinkedList();
UserEvents = new LinkedList();
}
catch(Exception e){
System.err.println("Exception : " + e.toString());
}
}
return ret;
}
COM: <s> initialize the class to be able to call functions </s>
|
funcom_train/28750616
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setMadeby(String newVal) {
if ((newVal != null && this.madeby != null && (newVal.compareTo(this.madeby) == 0)) ||
(newVal == null && this.madeby == null && madeby_is_initialized)) {
return;
}
this.madeby = newVal;
madeby_is_modified = true;
madeby_is_initialized = true;
}
COM: <s> setter method for madeby </s>
|
funcom_train/31503798
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setThird(GanttCalendar dthird, boolean test) {
myThirdDatePicker.setDate(dthird.getTime());
this.third = dthird;
if (test) {
return;
}
switch (thirdDateComboBox.getSelectedIndex()) {
case TaskImpl.EARLIESTBEGIN:
thirdDateButton1.setEnabled(true);
break;
case TaskImpl.NONE:
thirdDateButton1.setEnabled(false);
break;
}
}
COM: <s> change the third date of the task </s>
|
funcom_train/43894539
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private List deltaMove(int fromIndex, int toIndex) {
int position = fromIndex;
List rest = subList(fromIndex, toIndex);
List moved = new ArrayList(rest.size());
for (Iterator i = rest.iterator(); i.hasNext(); position++) {
Object item = i.next();
moved.add(deltaSync(position, item));
}
return moved;
}
COM: <s> indicate that the range has been moved </s>
|
funcom_train/13717665
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testIs_empty() {
System.out.println("testIs_empty");
Assert.assertTrue(this.emptyl1.is_empty());
Assert.assertTrue(this.emptyl2.is_empty());
Assert.assertTrue(!l3a.is_empty());
Assert.assertTrue(!l3b.is_empty());
}
COM: <s> test of is empty method of class be </s>
|
funcom_train/37742181
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void invokeCurrentImpl () {
ExtImplementationLocal impl = (ExtImplementationLocal)
getPaActImpl()[Math.abs(getPaExecStat().intValue()) - 1];
impl.invoke (toActivityLocal());
if (impl instanceof ProcBasedImpl) {
String key = ((ProcBasedImpl)impl).processKey ();
setPaSubflow (key);
}
}
COM: <s> invoke the current tool </s>
|
funcom_train/40536452
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testGetStatusCode() {
executeTest(new RequestCallback() {
public void onError(Request request, Throwable exception) {
fail();
}
public void onResponseReceived(Request request, Response response) {
assertEquals(200, response.getStatusCode());
finishTest();
}
});
}
COM: <s> test method for </s>
|
funcom_train/44011680
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testIsObjectAlreadyInDB() {
System.out.println("isObjectAlreadyInDB");
BusinessObject instance = new BusinessObject();
boolean expResult = true;
boolean result = instance.isObjectAlreadyInDB();
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 is object already in db method of class edu </s>
|
funcom_train/8053268
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void actionPerformed(ActionEvent e) {
if (e.getSource() == "close")
this.bottom.hideInfo();
else if (e.getActionCommand() == "switchSound") {
AudioPlayer.getInstance().switchOn();
this.poiView.setSoundButton();
} else if (e.getActionCommand() == "replay")
AudioPlayer.getInstance().replay();
}
COM: <s> action listener for poiview </s>
|
funcom_train/3905245
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean isEmptyType() {
if (hasChildren()
|| (!(getXMLType() instanceof XSDComplexTypeDefinition))) {
return false;
}
XSDComplexTypeDefinition ctd = (XSDComplexTypeDefinition) getXMLType();
XSDContentTypeCategory contCat = ctd.getContentTypeCategory();
if (contCat.equals(XSDContentTypeCategory.EMPTY_LITERAL)) {
return true;
}
return false;
}
COM: <s> return true if this element is empty type can only have attrbute </s>
|
funcom_train/23875316
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addDatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BpxlType_date_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BpxlType_date_feature", "_UI_BpxlType_type"),
MetadataPackage.Literals.BPXL_TYPE__DATE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the date feature </s>
|
funcom_train/24152117
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public TupleList read(Tuple template) {
checkAndInit();
List<org.bissa.tuple.Tuple> list = bissa.read(Utils.convertWSTupletoTuple(template));
for (org.bissa.tuple.Tuple t : list) {
System.out.println("read " + t);
}
return Utils.convertToTupleList(list);
}
COM: <s> read tuple from the webservice </s>
|
funcom_train/45530863
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean match(ConstantDeclaration node, Object other) {
if (!(other instanceof ConstantDeclaration)) {
return false;
}
ConstantDeclaration o = (ConstantDeclaration)other;
if (!safeSubtreeListMatch(node.annotations(), o.annotations())) {
return false;
}
return (safeSubtreeMatch(node.getJSCdoc(), o.getJSCdoc())
&& safeSubtreeListMatch(node.fragments(), o.fragments())
);
}
COM: <s> returns whether the given node and the other object match </s>
|
funcom_train/1444309
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int getAge(int currentBodyCycle, UPDATE_MODE mode) {
if (mode == UPDATE_MODE.META_BASED_ON_INFO) {
return Math.min(getAge(currentBodyCycle, UPDATE_MODE.SEEN_NOTEAM),
getAge(currentBodyCycle, UPDATE_MODE.HEARED));
}
Integer i = this.updateCycles.get(mode);
if (i == null)
return Integer.MAX_VALUE;
if (mode == UPDATE_MODE.INIT) {
return 0;
}
return currentBodyCycle - i.intValue();
}
COM: <s> the age of the player depending on the update type </s>
|
funcom_train/31466674
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void write(byte b[], int off, int len) throws IOException {
try {
Document doc = textComponent.getDocument();
doc.insertString(doc.getLength(), new String(b, off, len), null);
} catch (BadLocationException e) {
throw new IOException(e.getMessage());
}
}
COM: <s> writes code len code bytes from the specified byte array </s>
|
funcom_train/49123531
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void update(Preference entity) {
if(log.isInfoEnabled())
log.info("update preference for uid: " + entity.getUid() + ".");
super.getHibernateTemplate().saveOrUpdate(entity);
if(log.isInfoEnabled())
log.info("uid[" + entity.getUid() + "]: Save XML successfully.");
}
COM: <s> update the data of an appointed user </s>
|
funcom_train/29398058
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public long readHeapIndex(edu.arizona.cs.mbel.MSILInputStream in, int heap) throws java.io.IOException {
// reads the appropriate number of bytes from the file into a long
if (heap < 0 || heap >= 3)
return -1L;
if (heapIndexSizes[heap] == 2)
return (in.readWORD() & 0xFFFFL);
else {
return in.readDWORD();
}
}
COM: <s> parses an index into one of the heaps i </s>
|
funcom_train/9940880
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void setWorkPanel(final ResizableWidget widget) {
workPanel.clear();
workPanel.add(menu);
workPanel.add((Widget) widget);
DeferredCommand.addCommand(new Command() {
public void execute() {
widget.adjustSize(Window.getClientWidth(), Window.getClientHeight());
}
});
}
COM: <s> sets the work panel </s>
|
funcom_train/13958398
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected WOResponse createStoppedResponse(WORequest request) {
final ERXApplication app = ERXApplication.erxApplication();
String args = (request.sessionID() != null ? "wosid=" + request.sessionID() : "");
String url = request.applicationURLPrefix() + "?" + args;
WOResponse result = new WOResponse();
result.setHeader(url, "location");
result.setStatus(302);
return result;
}
COM: <s> create a stopped page </s>
|
funcom_train/181560
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testSqlDmlDql() {
Long nlsId = new Long(1); //server.getMapper().getNewId(server, transaction, server.getMapper().getTargetNlsName()).longValue();
// sequence important
insertTranslations(nlsId);
updateTranslations(nlsId);
selectTranslations(nlsId);
deleteTranslations(nlsId);
}
COM: <s> adds entries for db nls string in a very low level way </s>
|
funcom_train/2891222
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setSelection(int xStart, int xFinish, boolean moveUp) {
if (moveUp) {
m_editor.setCaretPosition(xFinish);
m_editor.moveCaretPosition(xStart);
} else {
m_editor.select(xStart, xFinish);
}
}
COM: <s> sets the selection of the text editor </s>
|
funcom_train/4922163
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testMultipleWriteToConnection() throws Exception {
final String TEXT = "test message";
final int COUNT = 10000;
// Write data to the client
for (int i = 0; i < COUNT; i++) {
String msg = TEXT + i;
this.connectionWrite(msg);
}
// Write out data
this.socketListener.writeData(this.connection);
// Validate written data
for (int i = 0; i < COUNT; i++) {
String msg = TEXT + i;
this.validateOutputToClient(msg);
}
this.socketChannel.validateNoOutput();
}
COM: <s> ensures able to write multiple write to the </s>
|
funcom_train/36012607
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected Control createContents(Composite ancestor) {
Composite parent = createGeneralComposite(ancestor);
createLabelContent(parent);
createReviewPhaseContent(parent);
createViewPreferenceContent(parent);
fillTable(this.reviewPhaseMap.get(this.reviewPhaseNameKey));
Dialog.applyDialogFont(ancestor);
return parent;
}
COM: <s> creates preference page controls on demand </s>
|
funcom_train/41209335
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void editString(Component cmp, int maxSize, int constraint, String text) {
editingText = true;
keyRepeatCharged = false;
longPressCharged = false;
lastKeyPressed = 0;
previousKeyPressed = 0;
impl.editString(cmp, maxSize, constraint, text);
editingText = false;
}
COM: <s> encapsulates the editing code which is specific to the platform some platforms </s>
|
funcom_train/14607922
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Map getValues(String prefix) throws UIException {
prefix = (prefix != null) ? prefix + ":" : "";
Map values = new LinkedHashMap();
List fields = getFields();
for (int i = 0; i < fields.size(); i++) {
Field field = (Field) fields.get(i);
String name = field.getName();
if (name.startsWith(prefix))
values.put(name.substring(prefix.length()), field.getValue());
}
return values;
}
COM: <s> return values of all contained fields </s>
|
funcom_train/12837187
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Object getValue(SessionID sessionID, SessionKey key) throws SessionException {
if (SessionID.SYSTEM_SESSION_ID.equals(sessionID)) {
createSystemSession();
}
BaseSession session = getSession(sessionID);
if (session == null) {
return null;
}
return session.getValue(key, true);
}
COM: <s> a convenience method that looks up a session and returns the value </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.