__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/35079037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if( o instanceof StringFormat ) {
StringFormat sf = (StringFormat)o;
return (this.paragraph==sf.paragraph &&
this.font.equals(sf.font) &&
this.color.equals(sf.color) &&
this.startIndex== sf.startIndex &&
this.endIndex==sf.endIndex
);
}
return false;
}
COM: <s> the comparation of two string format will be true if br </s>
|
funcom_train/15918379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Stmt flattenForLoop(ForLoop stmt, boolean labeled) {
List<Stmt> stmts = new ArrayList<Stmt>();
Expr primary = getPrimaryAndStatements(stmt.domain(), stmts);
stmt = (ForLoop) stmt.domain(primary);
stmts.add(label(stmt, labeled));
return toStmt(stmt.position(), stmts);
}
COM: <s> flatten a for loop </s>
|
funcom_train/10666464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result testaddNotificationParam3() throws Exception {
startTimer();
timer.addNotification(LibTimer.TIMER_TYPE, LibTimer.TEST_MESSAGE, null,
timeCalc(1000), LibTimer.PERIOD, LibTimer.REPEATS);
stopTimer();
return result();
}
COM: <s> adding notifications to the timer service with parameter object user data </s>
|
funcom_train/1303312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean reachedTimerMillis() {
boolean result = false;
this.lastCheckDate = new Date();
if ((lastCheckDate.getTime() - time.get()) > timerMillis) {
time.set(lastCheckDate.getTime()); // reset timer when time has been reached.
result = true;
}
return result;
}
COM: <s> determine whether timer millis has elapsed since the last check </s>
|
funcom_train/6273630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initWordNet(String[] argv) {
synchronized (wordNetLock) {
wordNet = new WordNet(argv);
for (int i = 0; i < commandData.length; i++) {
commandMap.put(commandData[i].text, commandData[i].command);
}
}
}
COM: <s> initialise the wordnet library this may take a short while </s>
|
funcom_train/51346248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigdataSailConnection getReadOnlyConnection(long timestamp) {
AbstractTripleStore view = (AbstractTripleStore) database
.getIndexManager().getResourceLocator().locate(
database.getNamespace(),
TimestampUtility.asHistoricalRead(timestamp));
return new BigdataSailConnection(view, null, false/*unisolated*/);
}
COM: <s> obtain a read historical view that reads from the specified commit point </s>
|
funcom_train/44559865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void merge(DcLanguageResource resource) {
for (String key : resource.getResourcesMap().keySet()) {
if (!resources.containsKey(key)) {
resources.put(key, resource.getResourcesMap().get(key));
logger.debug("Text not found for key " + key + " (" + language + ")");
}
}
}
COM: <s> adds the values and keys from the provided map to the existing resources </s>
|
funcom_train/11392267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private GetUserMappingsProtocol getUgmProtocol() throws IOException {
GetUserMappingsProtocol userGroupMappingProtocol =
RPC.getProxy(GetUserMappingsProtocol.class,
GetUserMappingsProtocol.versionID,
getProtocolAddress(getConf()), UserGroupInformation.getCurrentUser(),
getConf(), NetUtils.getSocketFactory(getConf(),
GetUserMappingsProtocol.class));
return userGroupMappingProtocol;
}
COM: <s> get a client of the </s>
|
funcom_train/24435078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFullScreen(boolean fullScreen) {
if (fullScreen != isFullScreen) {
setVisible(false);
if (isDisplayable())
dispose();
setUndecorated(fullScreen);
setResizable(!fullScreen);
if (fullScreen) {
if (device.isFullScreenSupported()) {
device.setFullScreenWindow(this);
validate();
isFullScreen = fullScreen;
}
} else {
device.setFullScreenWindow(null);
pack();
isFullScreen = fullScreen;
}
setVisible(true);
}
}
COM: <s> full screen action </s>
|
funcom_train/25647944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doZoomEffect(State s) {
this.waitingForZoom = s;
if (!centeringInExecution && this.zoomAnime != null) {
log.debug("Do zoom effect on " + s);
this.zoomAnime.doZoomEffect(s);
this.waitingForZoom = null;
} else {
log.debug("Zoom for " + s + " waiting for centering animation");
}
}
COM: <s> this does the zooming animation to arg </s>
|
funcom_train/40614415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void throttle() {
if (currentCommandStart == 0) {
currentCommandStart = System.currentTimeMillis();
}
if (throttle == 0) {
return;
}
long time = System.currentTimeMillis();
if (lastThrottle + Constants.THROTTLE_DELAY > time) {
return;
}
lastThrottle = time + throttle;
try {
Thread.sleep(throttle);
} catch (Exception e) {
// ignore InterruptedException
}
}
COM: <s> wait for some time if this session is throttled slowed down </s>
|
funcom_train/5512242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireCannon(int initVel, int a, int wD, double wV){
initialVelocity = (double) initVel;
angle = (double) a;
windDirection = wD;
windVelocity = wV;
path = new Vector();
fireCannon();
if(vrmlSelected){
sendData();
}
if (!displayClosed){
display.addData(path);
display.repaint();
}
}
COM: <s> initiates the projectile motion based on the provided information </s>
|
funcom_train/38551785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean exactEquals(ClassID classID) {
if ((this.getClassname().equals(classID.getClassname())) &&
(this.getSourceFile().equals(classID.getSourceFile())) &&
(this.getSourceMachine().equals(classID.getSourceMachine()))) {
return true;
}
return false;
}
COM: <s> test if the class is exactally equal </s>
|
funcom_train/39885099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(int oneByte) throws IOException {
openCheck();
byte[] bytes = new byte[1];
bytes[0] = (byte) (oneByte & 0xff);
fileSystem.write(fd.descriptor, bytes, 0, 1);
// if we are in "rws" mode, attempt to sync file+metadata
if (syncMetadata) {
fd.sync();
}
}
COM: <s> writes a byte to this file starting at the current file pointer </s>
|
funcom_train/44303830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRequiredParameter(String strClasse, String id) throws FatalException {
HashMap hshId = (HashMap) hshClass.get(strClasse);
if (hshId == null) {
hshId = new HashMap();
hshClass.put(strClasse, hshId);
}
hshId.put(id, MISSING_VALUE);
}
COM: <s> declare a new parameter or rewrite an existing one </s>
|
funcom_train/42943656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteTask(int rowId) {
Log.v(TAG, "deleting: with id: "+ rowId);
return mDb.delete(DATABASE_CLASSES_TABLE, KEY_ROWID + "=" + rowId, null) > 0;
//return deleteAlltasks();
//return true;
}
COM: <s> delete the task with the given row id </s>
|
funcom_train/330560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addScroller(AbstractPamScroller aScroller) {
if (scrollers.indexOf(aScroller) < 0) {
scrollers.add(aScroller);
}
/*
* now need to immediately pick up settings from
* one of the existing scrollers - may not be the first if
* this one was already there.
*/
for (int i = 0; i < scrollers.size(); i++) {
if (scrollers.get(i) == aScroller) {
continue;
}
else {
aScroller.coupledScrollerChanged(scrollers.get(i));
}
break;
}
}
COM: <s> add a new scroller to the coupling </s>
|
funcom_train/18437494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean undo() {
// Make sure it is not closed anymore
closed = false;
if (_throws[2] != null) {
_throws[2] = null;
return true;
}
if (_throws[1] != null) {
_throws[1] = null;
return true;
}
_throws[0] = null;
return false;
}
COM: <s> removes the last throw from this turn </s>
|
funcom_train/35847763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void nameButton(AbstractButton button, String key) {
if (button != null) {
button.setText(Translator.localize(key));
String mnemonic =
Translator.localize(key + MNEMONIC_KEY_SUFFIX);
if (mnemonic != null && mnemonic.length() > 0) {
button.setMnemonic(mnemonic.charAt(0));
}
}
}
COM: <s> allocates names for a button </s>
|
funcom_train/36182467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTimerTask() {
Timer timer = new Timer();
logger.debug(new Date() + " starting task timer with delay of " + this.peerDiscoveryDelay * DEFAULT_PEER_DISCOVERY_DELAY_MULTIPLIER + " milliseconds");
timer.schedule(new ONMReConfiguration(peerGroupMgr, this.eventsMgr),new Double(peerDiscoveryDelay * DEFAULT_PEER_DISCOVERY_DELAY_MULTIPLIER).longValue());
}
COM: <s> create a delayed task to re configure the onm if necessary so that </s>
|
funcom_train/1297494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawX(Canvas canvas, Paint paint, PointF point) {
canvas.drawLine(point.x - SIZE, point.y - SIZE, point.x + SIZE, point.y + SIZE, paint);
canvas.drawLine(point.x + SIZE, point.y - SIZE, point.x - SIZE, point.y + SIZE, paint);
}
COM: <s> the graphical representation of an x point shape </s>
|
funcom_train/34901818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeOutput() throws IOException{
BufferedWriter bw= new BufferedWriter(new FileWriter(this.outputFile));
StringBuilder sb;
for(Map.Entry<String, List<String>> entry : this.map.entrySet()){
sb= new StringBuilder().append(entry.getKey());
for(String identifier : entry.getValue()){
sb.append(DELIMITER).append(identifier);
}
bw.write(sb.append("\n").toString());
}
bw.flush();
bw.close();
}
COM: <s> write the output after process mapping method is called </s>
|
funcom_train/13246158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ClassLoader buildClassLoader() {
LOG.debug("Building classloader");
List<URL> urls = new ArrayList<URL>();
for (File file:pluginsDirectory.listFiles()){
try {
urls.add(new URL("jar:"+file.toURI().toURL()));
} catch (MalformedURLException e) {
LOG.warn("Unexpected exception",e);
}
}
LOG.debug("Done");
return new URLClassLoader(
urls.toArray(new URL[urls.size()]),
getClass().getClassLoader());
}
COM: <s> creates a classloader containing the application classloader all the jars in </s>
|
funcom_train/11591768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void renderColumnFooterRow(FacesContext facesContext, ResponseWriter writer, UIComponent component, String footerStyleClass) throws IOException {
if (determineRenderFacet(component, false)) {
super.renderColumnFooterRow(facesContext, writer, component, footerStyleClass);
}
}
COM: <s> renders the column footer </s>
|
funcom_train/39396236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BodyPart getBodyPart(String CID) throws MessagingException {
synchronized (this) {
parse();
int count = getCount();
for (int i = 0; i < count; i++) {
MimeBodyPart bp = (MimeBodyPart)getBodyPart(i);
String contentID = bp.getContentID();
if (contentID != null && contentID.equals(CID)) {
return bp;
}
}
return null;
}
}
COM: <s> returns the body part identified by the given content id cid </s>
|
funcom_train/37854505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doList(File path, SVNRevision pegRevision, SVNRevision revision, boolean fetchLocks, boolean recursive, ISVNDirEntryHandler handler) throws SVNException {
doList(path, pegRevision, revision, fetchLocks, recursive ? SVNDepth.INFINITY : SVNDepth.IMMEDIATES, SVNDirEntry.DIRENT_ALL, handler);
}
COM: <s> browses directory entries from a repository using working </s>
|
funcom_train/50846157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetParameterClassName() throws Exception {
int param = 1;
ParameterMetaData pmd = getMetaData();
String expResult = "java.lang.String";
String result = pmd.getParameterClassName(param);
assertEquals("pmd.getParameterClassName(" + param + ")",
expResult,
result);
}
COM: <s> test of get parameter class name method of interface java </s>
|
funcom_train/9726962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNamedReturnValue(String fullParamName, RSLParam param, RSLInstance parent) throws RIBException {
int i = fullParamName.indexOf('.');
if (i < 0)
return getNamedReturnValue(fullParamName, "out", param, parent);
else
return getNamedReturnValue(fullParamName.substring(0,i),
fullParamName.substring(i + 1), param, parent);
}
COM: <s> this seeks out the named return parameter of a given mental ray shader </s>
|
funcom_train/35299038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processReadAborted() {
if (progressListeners == null) {
return;
}
int numListeners = progressListeners.size();
for (int i = 0; i < numListeners; i++) {
IIOReadProgressListener listener =
(IIOReadProgressListener)progressListeners.get(i);
listener.readAborted(this);
}
}
COM: <s> broadcasts that the read has been aborted to all registered </s>
|
funcom_train/44623003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isHelper(@NonNull Symbol symbol) {
if (helperAnnotationSymbol == null) {
helperAnnotationSymbol = ClassReader.instance(context).
enterClass(Names.instance(context).fromString(jmlAnnotationPackage + ".Helper"));
}
return symbol.attribute(helperAnnotationSymbol)!=null;
}
COM: <s> returns true if the given symbol has a helper annotation </s>
|
funcom_train/29917882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeResources(List<ResourceDataVO> resources){
for(ResourceDataVO resource : resources){
List<ResourceDataVO> list = currentLists.get(resource.getOrgId());
ResourceDataVO toRemove = null;
if(list != null){
for(ResourceDataVO next : list){
if(resource.equals(next) ){
toRemove = next;
break;
}
}
if(toRemove != null){
list.remove(toRemove);
}
this.setChanged();
notifyObservers(currentLists);
}
}
}
COM: <s> remove the given resource data from the model </s>
|
funcom_train/39062007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doSaveAs() {
if(clientSite == null)
return;
WorkspaceModifyOperation op = saveNewFileOperation();
Shell shell = clientSite.getShell();
try {
new ProgressMonitorDialog(shell).run(false, true, op);
} catch (InterruptedException interrupt) {
//Nothing to reset so do nothing
} catch (InvocationTargetException invocationException) {
MessageDialog.openError(
shell,
RENAME_ERROR_TITLE,
invocationException.getTargetException().getMessage());
}
}
COM: <s> save the viewers contents into the provided resource </s>
|
funcom_train/7718433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLastRepeatedGroupName() {
if (mGroups != null) {
int count = mGroups.size() - 1;
GroupElement ge;
for (int i = count; i > -1; i--) {
ge = mGroups.get(i);
if (ge.isRepeat()) {
return ge.getGroupText();
}
}
}
return null;
}
COM: <s> the name of the closest group that repeats or null </s>
|
funcom_train/5855596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeShort(int value, OutputStream out) throws IOException {
if (order == ByteOrder.BIG_ENDIAN) {
out.write(value >>> 8);
out.write(value);
} else {
out.write(value);
out.write(value >>> 8);
}
}
COM: <s> write the given short to the given output stream </s>
|
funcom_train/26525515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setIcons(DreamComponent comp) {
if(comp instanceof DreamNode) {
setIcon(nodeIcon);
}
if(comp instanceof DreamJob) {
setIcon(experimentIcon);
}
if(comp instanceof DreamIsland) {
setIcon(islandIcon);
}
if(comp instanceof DreamThread) {
setIcon(threadIcon);
}
}
COM: <s> set the component icon according to its type </s>
|
funcom_train/43572863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String printPath(TreeNode[] path) {
String value = "";
for (int i = 0; i < path.length; i++) {
if (((Annotated) ((XsdNode) path[i]).getUserObject())
.getStructureType() != Structure.GROUP)
value += "[" + ((XsdNode) path[i]).toString() + "]";
}
return value;
}
COM: <s> return a understandable code string code describing the path of a </s>
|
funcom_train/5272775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initPatternType() {
if ("/".equals(pattern)) {
patternType = DEFAULT_TYPE;
} else if (pattern.startsWith("*.")) {
patternType = EXTENSION_TYPE;
} else if (pattern.startsWith("/") && pattern.endsWith("/*")) {
patternType = PATH_TYPE;
} else {
patternType = EXACT_TYPE;
}
}
COM: <s> initialize the pattern type protected member </s>
|
funcom_train/16218813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addVerticalSpeed(long elapsedTime, double accel, double maxSpeed) {
if (accel == 0 || elapsedTime == 0) {
return;
}
this.verticalSpeed += accel * elapsedTime;
if (accel < 0) {
if (this.verticalSpeed < maxSpeed) {
this.verticalSpeed = maxSpeed;
}
} else {
if (this.verticalSpeed > maxSpeed) {
this.verticalSpeed = maxSpeed;
}
}
}
COM: <s> accelerates sprite vertical speed by code accel code and limit the </s>
|
funcom_train/9162583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long stop() {
if( startTimes.get() != null ) {
final long startTime = startTimes.get();
startTimes.remove();
lapTimes.remove();
return TimeUnit.NANOSECONDS.toMillis( System.nanoTime() - startTime );
}
throw new IllegalStateException( "Cannot call stop without calling start from same thread first" );
}
COM: <s> stops timing the current thread and returns the number of milliseconds that have </s>
|
funcom_train/8436892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddSpecificGraph() {
System.out.println("addSpecificGraph");
String name = "r1";
Logic l = new Logic("");
l.setModelSize(10);
Model instance = new Model(l);
SpecificGraph result = instance.addSpecificGraph(name);
if(instance.graphs.get("r1") != result) {
fail("Oh noes!");
}
}
COM: <s> test of add specific graph method of class nii </s>
|
funcom_train/266148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setCalendar(Calendar c, boolean update) {
if (c == null) {
setDate(null);
}
Calendar oldCalendar = calendar;
calendar = c;
if (update) {
// Thanks to Jeff Ulmer for correcting a bug in the sequence :)
yearChooser.setYear(c.get(Calendar.YEAR));
monthChooser.setMonth(c.get(Calendar.MONTH));
dayChooser.setDay(c.get(Calendar.DATE));
}
firePropertyChange("calendar", oldCalendar, calendar);
}
COM: <s> sets the calendar attribute of the jcalendar object </s>
|
funcom_train/46376732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private View2DCellFactory getViewFactory() {
View2DCellFactory vFactory = view2DCellFactory;
if (vFactory == null) {
vFactory = App2D.getView2DCellFactory();
}
if (vFactory == null) {
throw new RuntimeException(
"App2D View2DCellFactory is not defined.");
}
return vFactory;
}
COM: <s> returns the view cell factory </s>
|
funcom_train/20349826 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String encode(String value) {
StringBuffer buf = new StringBuffer();
for (int i = 0; i < value.length(); i++) {
char ch = value.charAt(i);
if (isCookieEscChar(ch)) {
int j = (int) ch;
buf.append("%").append(Integer.toHexString(j));
} else {
buf.append(ch);
}
}
return buf.toString();
}
COM: <s> encodes a string to be used for a cookie value </s>
|
funcom_train/26567474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean startInquiry(int accessCode, DiscoveryListener listener) throws BluetoothStateException {
if (listener == null) {
throw new NullPointerException("DiscoveryListener is null");
}
if ((accessCode != LIAC) && (accessCode != GIAC) && ((accessCode < 0x9E8B00) || (accessCode > 0x9E8B3F))) {
throw new IllegalArgumentException("Invalid accessCode " + accessCode);
}
return false;
}
COM: <s> places the device into inquiry mode </s>
|
funcom_train/45334079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logPdqQuery(ActiveParticipant source, Collection<ParticipantObject> patients,
ParticipantObject query) {
try {
//Participant Objects for Patient Query
if (query == null) //query is required
throw new IllegalArgumentException("Required query is missing");
query.idTypeCode = ParticipantObjectIdTypeCode.PDQQuery;
patientQuery(source, patients, query);
} catch (JAXBException e) {
LOG.error("Unable to log PDQ Query", e);
}
}
COM: <s> audit logging of pdq query messages </s>
|
funcom_train/2558520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void segment() throws Exception {
char first = data[off];
if(first == '/') {
throw new PathException("Invalid path expression '%s' in %s", path, type);
}
if(first == '@') {
attribute();
} else {
element();
}
align();
}
COM: <s> this method is used to extract a path segment from the source </s>
|
funcom_train/13747229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCompositeblocsprestationsautresponction() {
GridLayout gridLayout14 = new GridLayout();
gridLayout14.numColumns = 1;
compositeblocsprestationsautresponction = new Composite(
scrolledCompositeautresrhumphleb, SWT.NONE);
compositeblocsprestationsautresponction.setToolTipText("Rhumatologie et Phlébologie");
compositeblocsprestationsautresponction.setLayout(gridLayout14);
createGrouprhumato();
cComboblocsprestationsponcrhum.setItems (new String []{"Choisir","épaule,coude,genou", "doigt,orteil", "carpe,tarse"});
createGroupphlebo();
}
COM: <s> this method initializes compositeblocsprestationsautresponction </s>
|
funcom_train/3561568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addComponent(javax.swing.JComponent comp, Dimension dims, int resizeOpt) {
if (comp != null && dims != null && resizeOpt >= -1 && resizeOpt <=2) {
componentList.add(comp);
initialDimensions.add(new Dimension(dims));
resizeChoiceList.add(new Integer(resizeOpt));
}
}
COM: <s> adds a component to resize on resizing of the monitored container </s>
|
funcom_train/19338050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateCategory () {
MediaSystem.setDb (new DataBase ());
StringProperty title = new StringProperty ("Title");
IntProperty year = new IntProperty ("Year");
ArrayList a = new ArrayList ();
a.add(title);
a.add(year);
MediaSystem.createCategory("DVD", a);
Assert.assertEquals(1, MediaSystem.getDb().getCategories().size());
Assert.assertEquals(2, ((Category) MediaSystem.getDb().getCategories().get(0)).numberOfProperties());
}
COM: <s> this test check wether a category has been added or not </s>
|
funcom_train/49608903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Room getRoom(String username,EntityManager em,int id) throws Throwable {
try {
Room vo = JPAMethods.find(username, em, Room.class, id);
if (vo==null)
throw new Exception("No Room found having id: "+id);
return vo;
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
}
COM: <s> retrieve a specific room </s>
|
funcom_train/28756323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDyelabelid(Long newVal) {
if ((newVal != null && this.dyelabelid != null && (newVal.compareTo(this.dyelabelid) == 0)) ||
(newVal == null && this.dyelabelid == null && dyelabelid_is_initialized)) {
return;
}
this.dyelabelid = newVal;
dyelabelid_is_modified = true;
dyelabelid_is_initialized = true;
}
COM: <s> setter method for dyelabelid </s>
|
funcom_train/5002230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean SetInOutSource(File xmlinfile, File xmloutfile) {
// if (proc == null || exp == null || comp == null)
// return false;
//
// source = proc.newDocumentBuilder().build(
// new StreamSource(new File(xmlinfile)));
// out = new Serializer();
// out.setOutputFile(new File(xmloutfile));
//
// trans = exp.load();
// transformer.set.setInitialContextNode(source);
// transformer.setDestination(out);
return true;
}
COM: <s> set in and out file </s>
|
funcom_train/7277534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isDownloadable() {
// Check if the XT is s BTIH hash.
List<String> topics = getExactTopics();
for (String xt : topics)
if (xt.startsWith("urn:btih"))
return true;
if (getDefaultURLs().length > 0) {
return true;
}
if (getSHA1Urn() != null) {
if (getQueryString() != null) {
return true;
}
}
return false;
}
COM: <s> returns true if there are enough pieces of information to start a </s>
|
funcom_train/17174794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecute() throws Exception {
QuitProcessor eqp;
eqp = new QuitProcessor();
Script script = TestUtils.createJavaAppScript("src/easyaccept/script/test/scriptQuit01.txt",
new TestFacade());
ParsedLineReader plr = script.getParsedLineReader();
ParsedLine pl = plr.getParsedLine();
try{
eqp.execute(script,pl);
fail();
}catch(QuitSignalException exc){
assertTrue( (exc.getMessage().indexOf("Quit command was found")!= -1));
}
}
COM: <s> execute the quit test </s>
|
funcom_train/29549321 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createSubject2PredicateEdge(Node subjectNode, Node predicateNode) {
final Edge edge = new Edge(subjectNode, predicateNode, Edge.DEFAULT_LENGTH, Edge.EDGE_TYPE_LINE);
edge.setColor(render.getEdgeDefaultColor());
tgPanel.addEdge(edge);
}
COM: <s> create subject to predicate edge </s>
|
funcom_train/50431781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public char getStartchar()
{return('{');}
private Hashtable valueParsers = new Hashtable();
/**
* register a new sub-parser to parse the statement beginning with token
*/
public void addValueParser(ValueParser parser)
{
char c = parser.getStartchar();
// Logger.debug.println("DEBUG: [LinkedListValueParser] addValueParser char='"+c+"'");
valueParsers.put(""+c, parser);
}
} COM: <s> valid values must start with this char </s>
|
funcom_train/28298358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int fromFile(String file) {
Parser p=new Parser();
if (p.Init(file)) {
Object o=p.Parse("");
if (o!=null && o instanceof TransBaseConfig) {
TransBaseConfig cfg=(TransBaseConfig)o;
this.copy(cfg);
return 0;
}
return -10706;
}
return 0;
}
COM: <s> reads the configuration from the given file </s>
|
funcom_train/12643178 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMaximumLength() throws IOException {
try {
int receiveLen = endpoint.getReceiveBufferSize();
int sendLen = endpoint.getSendBufferSize();
/* return lesser of the two */
return (receiveLen < sendLen ? receiveLen : sendLen);
} catch(java.net.SocketException x) {
throw new IOException(x.getMessage());
}
}
COM: <s> get the maximum length a datagram can be </s>
|
funcom_train/32378849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getParamValueAsString(String paramName) throws ParameterException{
Parameter param = getParameter(paramName);
if (param == null )
throw new ParameterException("Parameter not available", ClientConnectorConstants.PARAMETERS_NOT_AVAILABLE);
if (param.getType()!= Parameter.TYPE_STRING)
throw new ParameterException("Parameter type is not matching", ClientConnectorConstants.PARAMETERS_TYPE_NOT_MATCHING);
else
return (String)param.getValue();
}
COM: <s> returns values of a parameter as string </s>
|
funcom_train/9436391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onRefresh(long mailboxId) {
Controller controller = Controller.getInstance(getApplication());
mHandler.progress(true);
if (mailboxId >= 0) {
controller.updateMailbox(mAccountId, mailboxId, mControllerCallback);
} else {
controller.updateMailboxList(mAccountId, mControllerCallback);
}
}
COM: <s> refresh the mailbox list or a single mailbox </s>
|
funcom_train/32870923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFieldAccessWatch(Field f, Object aopTag) {
setWatchPrecondition(f,aopTag);
synchronized(fieldAccessMap) {
try {
doSetFieldAccessWatch(f.getDeclaringClass(),f,aopTag);
fieldAccessMap.put(f,aopTag);
}
catch (NullPointerException e)
{ e.printStackTrace();}
}
}
COM: <s> sets a watch on a field access joinpoint </s>
|
funcom_train/9533247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveData(File f, DataAdapterI adapter) {
// COMMIT TO FILE if constraints passed
CharacterListI charList = this.characterListManager.getCharacterList();
adapter.commit(charList, f);
this.characterListManager.setCurrentDataFile(f);
for (LoadSaveListener listener : this.listeners) {
listener.fileSaved(f);
}
}
COM: <s> saves the documents characters to the given file using the given data adapter </s>
|
funcom_train/24552892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void getMultipleCreateCommand(List children, Object positionBeforeChild, CommandBuilder cbldr) {
EStructuralFeature containmentSF = getContainmentSF(children, positionBeforeChild, CREATE_REQ);
if (containmentSF == null)
cbldr.markDead();
else {
Iterator itr = children.iterator();
while (itr.hasNext()) {
Object child = itr.next();
if (!isValidChild(child, containmentSF)) {
cbldr.markDead();
return;
}
}
cbldr.append(primCreateCommand(children, positionBeforeChild, containmentSF));
}
}
COM: <s> a helper to handle creating for multiple children at once </s>
|
funcom_train/215134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void build(String panelName, int index) {
setContentPane(buildContentPane(panelName, index));
setTitle(getWindowTitle());
setJMenuBar(
createMenuBuilder().buildMenuBar(
settings,
createHelpActionListener(),
createAboutActionListener()));
setIconImage(readImageIcon("eye_16x16.gif").getImage());
}
COM: <s> builds the code start frame code using options from the launcher </s>
|
funcom_train/16818511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String rAddr = null;
if(returnAddr == null)
rAddr = "unavailable return address.";
else
rAddr = returnAddr.toString();
return "Method request: " + callId.toString() +
"\nTarget operation: " + opCode +
"\nRemote destiny id: " + targetObjectIdentifier.toString() +
"\nReturn address: " + rAddr;
}
COM: <s> gives textual information about this remote call </s>
|
funcom_train/8305722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof Fraction == false) {
return false;
}
Fraction other = (Fraction) obj;
return (getNumerator() == other.getNumerator() &&
getDenominator() == other.getDenominator());
}
COM: <s> p compares this fraction to another object to test if they are equal </s>
|
funcom_train/28674216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getPathFromRequest(HttpServletRequest request) {
String uri = request.getRequestURI().trim();
uri = uri.substring(request.getContextPath().length());
uri = uri.replaceAll("/{2,}", "/");
return uri;
}
COM: <s> read from the http servlet request to determine the requested path without </s>
|
funcom_train/19274729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh(UIRefreshEvent event) {
// use concurrent list via list factory?
AbstractUiWindow<?>[] currentWindows;
synchronized (this.windows) {
currentWindows = this.windows.toArray(new AbstractUiWindow[this.windows.size()]);
}
for (AbstractUiWindow<?> window : currentWindows) {
window.refresh(event);
}
}
COM: <s> this method refreshes all </s>
|
funcom_train/11385892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Path getOutputIndexFileForWrite(long size) throws IOException {
Path attemptIndexOutput =
new Path(getAttemptOutputDir(), MAP_OUTPUT_FILENAME_STRING +
MAP_OUTPUT_INDEX_SUFFIX_STRING);
return lDirAlloc.getLocalPathForWrite(attemptIndexOutput.toString(),
size, conf);
}
COM: <s> create a local map output index file name </s>
|
funcom_train/25099474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRealizedByPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Realization_realizedBy_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Realization_realizedBy_feature", "_UI_Realization_type"),
ElementsPackage.Literals.REALIZATION__REALIZED_BY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the realized by feature </s>
|
funcom_train/32207670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkSessionBeanIsAvailable(PageContext pageContext) {
BrowseSession session = (BrowseSession)
pageContext.getAttribute(SESSION_BEAN_NAME, PageContext.SESSION_SCOPE);
if (session == null) {
System.out.println("RequestController: creating session object");
session = new BrowseSession();
// Place the session in the PageContext, so it will be accessible
// to JSPs as a session bean
pageContext.setAttribute(SESSION_BEAN_NAME, session, PageContext.SESSION_SCOPE);
}
}
COM: <s> return the users session bean </s>
|
funcom_train/44158138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Person getPerson(String name) {
DetachedCriteria c = DetachedCriteria.forClass(Person.class);
c.add(Restrictions.eq("name", name));
c.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY);
List<Person> people = getPersonDao().findByCriteria(c);
assertEquals(1, people.size());
if (people.size() != 1) {
System.err.println("ERROR: Object returned several times by db.");
}
Person p = people.get(0);
assertEquals(name, p.getName());
return p;
}
COM: <s> get a person by name </s>
|
funcom_train/43441553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startDocument() throws SAXException {
_autoChecked = false;
try {
if (_log != null) _log.debug2("Starte Import...");
} catch (Exception e) {
throw new SAXException("SOSImport.startDocument: " + e.getMessage(), e);
}
}
COM: <s> start document handler </s>
|
funcom_train/20577626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkForCompletionAt(int row, int column) {
return checkForCompletionHelper(row, column, 1, 0) ||
checkForCompletionHelper(row, column, 0, 1) ||
checkForCompletionHelper(row, column, 1, 1) ||
checkForCompletionHelper(row, column, 1, -1);
}
COM: <s> checks for 4 consecutive pieces in all directions starting at the </s>
|
funcom_train/36231580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setColumn(int col, double[] value) throws MatrixException {
// test if the input vector is null
if (value == null)
throw new MatrixException(
"Error SetColumn: Incorrect form of input column array");
Matrix matrix = new Matrix(value.length, 1);
for (int i = 0; i < matrix.getNRows(); i++) {
matrix.in(i, 0, value[i]);
}
setColumn(col, matrix);
}
COM: <s> set the col column of this matrix with the values in the vector </s>
|
funcom_train/41582078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteChar() {
String messageString;
if(mCursorIndex < mEnteredText.size()) {
messageString = "Deleted "+
PRONUNCIATION_MAP.get(""+mEnteredText.get(mCursorIndex));
mEnteredText.remove(mCursorIndex);
} else {
messageString = "You are at the end of your text. There is no " +
"character to delete here.";
}
PhoneWandActivity.ttsSpeak(messageString, TextToSpeech.QUEUE_FLUSH);
speakCurrentChar();
drawString();
}
COM: <s> removes from the entered text whichever character is at the cursors current index </s>
|
funcom_train/14329383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_socketTimeout() {
String fieldName = "socketTimeout";
String messageKey = Driver.SOTIMEOUT;
String expectedValue = DefaultProperties.SOCKET_TIMEOUT;
assertDefaultPropertyByServerType(URL_SQLSERVER, messageKey, fieldName, expectedValue);
if (!isOnlySqlServerTests()) {
assertDefaultPropertyByServerType(URL_SYBASE, messageKey, fieldName, expectedValue);
}
}
COM: <s> test the code socket timeout code property </s>
|
funcom_train/37822762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fill(List<Integer> nodes) {
resized = false;
this.nodes.clear();
properties.clear();
cursorNode = 0;
this.nodes.addAll(nodes);
for(int i = 0; i < nodes.size(); i++) {
int x = SPACE_SMALL + i*(NODE_SIZE + SPACE_SMALL)+ NODE_SIZE / 2;
int y = getHeight() / 2;
Object[] p = {new Point(x,y), false};
properties.put(nodes.get(i), p);
}
repaint();
}
COM: <s> this method is invoked if new successors are available </s>
|
funcom_train/20597357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getWarning(ILaunchConfiguration config) throws CoreException {
HostChecker hostChecker = params.getHostChecker();
if (hostChecker != null) {
String hostWarning = hostChecker.getWarning(config);
if (hostWarning != null) {
return hostWarning;
}
}
return sourceContainerChecker.check(config);
}
COM: <s> checks config for warnings and returns first found or null </s>
|
funcom_train/286108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected List getChoiceOfValues() {
List choiceOfValues = new ArrayList();
for (Iterator applicableStereotypes = ((Element) eObject)
.getApplicableStereotypes().iterator(); applicableStereotypes
.hasNext();) {
Stereotype stereotype = (Stereotype) applicableStereotypes.next();
if (!((Element) eObject).isStereotypeApplied(stereotype)) {
choiceOfValues.add(stereotype);
}
}
// Collections.sort(choiceOfValues, new TextComparator());
return choiceOfValues;
}
COM: <s> get the list of available stereotypes for the current selected element </s>
|
funcom_train/47253793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processDecodes(FacesContext facesContext) {
Map<String,String> params = facesContext.getExternalContext().getRequestParameterMap();
String ajaxSourceValue = params.get(Constants.PARTIAL_SOURCE_PARAM);
//TabSwitch Request
if(ajaxSourceValue != null && ajaxSourceValue.equals(getClientId(facesContext))) {
decode(facesContext);
facesContext.renderResponse();
} else {
super.processDecodes(facesContext);
}
} COM: <s> process only tabview if its a tabswitch request </s>
|
funcom_train/31502406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getArray() {
String result = "";
if (array != null)
for (int i = 0; i < array.length; i++) {
result += array[i] + ",";
}
return (result.length() != 0) ? result.trim().substring(0,
result.trim().length() - 1) : "";
}
COM: <s> return the array of the shape on a string </s>
|
funcom_train/40336936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GQuery attr(String key, Function closure) {
int i = 0;
for (Element e : elements) {
Object val = closure.f(e.<com.google.gwt.dom.client.Element>cast(), i++);
attributeDelegate.setAttribute($(e), key, val);
}
return this;
}
COM: <s> set a single property to a computed value on all matched elements </s>
|
funcom_train/39177554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compare(Object a, Object b){
if(a instanceof Locale && b instanceof Locale){
Locale l1 = (Locale) a;
Locale l2 = (Locale) b;
return l1.getDisplayLanguage().compareTo(l2.getDisplayLanguage());
}else throw new ClassCastException();
}// int compare(Object a, Object b)
COM: <s> comparison method used for sorting the available locales </s>
|
funcom_train/2894145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(char ch) {
if (b.length <= i + EXTRA) {
char[] new_b = new char[b.length+INC];
for (int c = 0; c < b.length; c++)
new_b[c] = b[c];
b = new_b;
}
b[i++] = ch;
}
COM: <s> add a character to the word being stemmed </s>
|
funcom_train/33150223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean makeSymbolicLink(File sourcename, File destname) {
/*
* ln options. -s: make symbolic link -f: force removal of existing
* links
*/
String[] progarray = new String[4];
progarray[0] = "ln";
progarray[1] = "-sf";
progarray[2] = sourcename.getAbsolutePath();
progarray[3] = destname.getAbsolutePath();
return exec(progarray);
}
COM: <s> make a soft link from sourcename to destname </s>
|
funcom_train/23297409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPreferences(Tree2DPanelPreferences prefs) {
if ( prefs == null )
throw new IllegalArgumentException("Null 'prefs' argument.");
if ( ! prefs.equals(this.fPrefs) ) {
this.fPrefs.removeTree2DPanelChangeListener(this);
this.fPrefs = prefs;
this.fPrefs.addTree2DPanelChangeListener(this);
this.notifyTree2DPanelChangeListeners(new Tree2DPanelChangeEvent(this,
Tree2DPanelChangeEvent.DEFAULT_MODIFIED));
}
}
COM: <s> set the preferences used to display this tree </s>
|
funcom_train/38623411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getColumnNameInHtmlForm(String tableName, String columnName, String rownum) {
String shortNameForTbl = null;
shortNameForTbl = LogicBlockDataSource.getStr("SHORT_TBL_NAME_" + tableName);
if (StringUtils.isEmpty(shortNameForTbl)) {
shortNameForTbl = tableName;
}
return "FLD." + shortNameForTbl + rownum + "." + columnName;
}
COM: <s> where there is only one </s>
|
funcom_train/11641477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetNullLong() throws SQLException {
assertEquals(0, rs2.getNullLong());
// Set what gets returned to something other than the default
long l = 10;
rs2.setNullLong(l);
assertEquals(l, rs.getLong(1));
assertEquals(l, rs.getLong("column"));
}
COM: <s> tests the set null long implementation </s>
|
funcom_train/22318827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getTotalTime() {
long total = 0;
for (int i = 0; i < numRepeat; i++) {
//System.out.println("[DEBUG] stopTime["+i+"]" + stopTime[i]);
//System.out.println("[DEBUG] startTime["+i+"]" +
// startTime[i]);
total += (stopTime[i] - startTime[i]);
}
return total;
}
COM: <s> gets the total time attribute of the system cmd task object </s>
|
funcom_train/6453798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateDesignGUI() {
mas2jDesignComposite.setComboInfraStructure(infraStructure);
mas2jDesignComposite.setAgentsList(agents);
mas2jDesignComposite.setEnv(envClass);
mas2jDesignComposite.setControl(controlExecClass);
mas2jDesignComposite.setDirectivesList(directives);
mas2jDesignComposite.setClassPathList(classPath);
mas2jDesignComposite.setSourcePathList(sourcePath);
}
COM: <s> updates gui of tab design </s>
|
funcom_train/26607862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFont(String name, int style, int size) {
pdffont = page.getFont("/Type1", name, style);
// Only need to use this in headless mode
fontSize = size;
// don't want to actually use this one
newFont = true;
}
COM: <s> this sets the font </s>
|
funcom_train/8568648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printQuality(RunStats data) {
Stats edgeStats = data.getEdgeStats();
long evolvable = edgeStats.getStat(CountStat.EVOLVABLE);
long evolvableIncreasing = edgeStats.getStat(CountStat.EVO_INCREASING);
System.out.println(percent(evolvableIncreasing, evolvable)
+ " percent evolvable edges are increasing edges.");
}
COM: <s> local quality what percentage of edges are increasing </s>
|
funcom_train/23046515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private RootTermEditPart getRootTermEditPart(ConditionTermEditPart tEditPart) {
if (tEditPart == null) return null;
List opList = tEditPart.getTargetConnections();
if (opList == null || opList.isEmpty()) return null;
if (opList.get(0) instanceof RootTermEditPart)
return (RootTermEditPart)opList.get(0);
return null;
}
COM: <s> get the root term edit part for the given condition term edit part </s>
|
funcom_train/7638544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getIcon() {
IconFactory factory = IconFactory.getInstance();
Image icon;
icon = factory.getIcon(getXmlLocalName(), IconFactory.COLOR_RED, IconFactory.SHAPE_CIRCLE);
return icon != null ? icon : AdtPlugin.getAndroidLogo();
}
COM: <s> returns an optional icon for the attribute </s>
|
funcom_train/3561202 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int setSqlValues(PreparedStatement ps, int i) throws java.sql.SQLException, javatools.db.DbException {
if (c1 instanceof DbTrueExpr || c2 instanceof DbTrueExpr) {
return i;
} else if (c1 instanceof DbFalseExpr) {
return setSqlValue(ps, i, c2, null);
} else if (c2 instanceof DbFalseExpr) {
return setSqlValue(ps, i, c1, null);
} else {
return super.setSqlValues(ps, i);
}
}
COM: <s> puts data into a statement </s>
|
funcom_train/41510702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private EventsQueue getAjaxEventsQueue(FacesContext facesContext) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException{
AjaxViewRoot viewRoot = (AjaxViewRoot)facesContext.getViewRoot();
Method getAjaxEventsQueue = AjaxViewRoot.class.getDeclaredMethod("getAjaxEventsQueue");
getAjaxEventsQueue.setAccessible(true);
return (EventsQueue)getAjaxEventsQueue.invoke(viewRoot);
}
COM: <s> recupera a fila de eventos ajax </s>
|
funcom_train/40611220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FullSpot getSpot(final int id) throws GowallaException {
try {
final String response = get(String.format("/spots/%d", id));
return responseTranslator.translateSpot(response, id);
}catch(RequestNotAcceptableException e) {
// No Spot for this number.
return null;
} catch(RequestNotFoundException e) {
// No spot for this number.
return null;
}
}
COM: <s> get the full spot data for a given spot id </s>
|
funcom_train/41165685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoParagraphType entity) {
EntityManagerHelper.log("saving CoParagraphType instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co paragraph type entity </s>
|
funcom_train/39318888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NetMessage readMessage() {
try {
String msg = m_reader.readLine();
if(msg != null)
return NetMessage.deserialize(msg);
} catch(IOException e) {
m_logger.warning("Error reading message: " + e);
} catch(NetException e) {
m_logger.warning("Error reading message: " + e);
}
return null;
}
COM: <s> receives a message from the stream </s>
|