__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/35299778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUrl(String url) throws SQLException {
if(url == null) {
url = null;
} else if (url.length() < 1) {
throw new SQLException("Invalid url string detected. " +
"Cannot be of length less than 1");
} else {
URL = url;
}
dataSource = null;
}
COM: <s> sets the url property for this code row set code object </s>
|
funcom_train/7276595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean canSendDHTQueryNow() {
if (!isDHTUp())
return false;
return numDHTQueries == 0 ||
(numDHTQueries < DHTSettings.MAX_DHT_ALT_LOC_QUERY_ATTEMPTS.getValue()
&& System.currentTimeMillis() - lastQuerySent >=
DHTSettings.TIME_BETWEEN_DHT_ALT_LOC_QUERIES.getValue()
);
}
COM: <s> true if another dht query can be sent right now </s>
|
funcom_train/2558407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(Label label, Object value) throws Exception {
Variable variable = new Variable(label, value);
if(label != null) {
Collection<String> options = label.getNames(context);
String path = label.getPath(context);
if(!registry.containsKey(path)) {
registry.put(path, variable);
}
for(String option : options) {
alias.put(option, variable);
}
}
}
COM: <s> this is used to create a code variable code and set it for </s>
|
funcom_train/22404589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getFieldSerializerClassName() {
String sourceName = serializationOracle.getFieldSerializerName(serializableClass);
int qualifiedSourceNameStart = sourceName.lastIndexOf('.');
if (qualifiedSourceNameStart >= 0) {
sourceName = sourceName.substring(qualifiedSourceNameStart + 1);
}
return sourceName;
}
COM: <s> returns the name of the field serializer which will deal with this class </s>
|
funcom_train/38349886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addResource(String resourceName) {
if (resourceFactory == null) {
throw new IllegalStateException(
"No resource factory specified. setResourceFactory must be called before resources are bound.");
}
try {
InputStream in = resourceFactory.getResourceAsStream(resourceName);
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build(in);
bindResource(doc);
} catch (Exception e) {
throw new InvalidBindingException("Unable to load resource: "
+ resourceName, e);
}
}
COM: <s> add a resource to the rule engine </s>
|
funcom_train/48630716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetListeVilles() {
System.out.println("setListeVilles");
ArrayList<String> listeVilles = null;
Itineraire instance = new Itineraire();
instance.setListeVilles(listeVilles);
// 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 liste villes method of class itineraire </s>
|
funcom_train/42734847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createPackageControls(Composite composite, int nColumns) {
fPackageDialogField.doFillIntoGrid(composite, nColumns);
Text text = fPackageDialogField.getTextControl(null);
LayoutUtil.setWidthHint(text, getMaxFieldWidth());
LayoutUtil.setHorizontalGrabbing(text);
ControlContentAssistHelper.createTextContentAssistant(text,
fCurrPackageCompletionProcessor);
TextFieldNavigationHandler.install(text);
}
COM: <s> creates the controls for the package name field </s>
|
funcom_train/18107841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parse(String wordDocPath, String txtPath) throws ParseContentException{
try{
String content = parse(wordDocPath);
FileUtil.writeString(txtPath, content, KIMClientConstants.DEFAULT_ENCODING);
}
catch (Throwable e){
log.error("Error occured in MSWordParser ", e);
e.printStackTrace();
throw new ParseContentException(e);
}
}
COM: <s> parse content of doc file to txt file </s>
|
funcom_train/39950761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createProject(String packageId, String packageName) {
modelService = new ModelServiceLayer(ModelServiceLayer.createPackage(
packageId, packageName));
// Creo tambien el pool, con el nombre similar al del package
poolId = "pool_" + packageId;
modelService.addPool(poolId, "name_" + poolId);
}
COM: <s> creo el projecto y el workflow </s>
|
funcom_train/21936368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void bringDown() {
ZoomManager zoomMgr = (ZoomManager)getEditPart().getViewer()
.getProperty(ZoomManager.class.toString());
if (zoomMgr != null)
zoomMgr.removeZoomListener(zoomListener);
if (actionHandler != null) {
actionHandler.dispose();
actionHandler = null;
}
if (actionBars != null) {
restoreSavedActions(actionBars);
actionBars.updateActionBars();
actionBars = null;
}
super.bringDown();
// dispose any scaled fonts that might have been created
disposeScaledFont();
}
COM: <s> unregisters actions copy paste etc and zoom listeners </s>
|
funcom_train/46746022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDatabaseUsername(String databaseUsername) {
if (Converter.isDifferent(this.databaseUsername, databaseUsername)) {
String olddatabaseUsername= null;
olddatabaseUsername = this.databaseUsername;
this.databaseUsername = databaseUsername;
setModified("databaseUsername");
firePropertyChange(String.valueOf(ENVIRONMENTS_DATABASEUSERNAME), olddatabaseUsername, databaseUsername);
}
}
COM: <s> database user name </s>
|
funcom_train/49139412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getChatTextAreaSrollPane() {
if (ChatTextAreaSrollPane == null) {
ChatTextAreaSrollPane = new JScrollPane();
ChatTextAreaSrollPane.setBounds(new Rectangle(17, 18, 220, 159));
ChatTextAreaSrollPane.setViewportView(getChatTextArea());
}
return ChatTextAreaSrollPane;
}
COM: <s> this method initializes chat text area sroll pane </s>
|
funcom_train/39534221 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveEditorsCurrentState(){
//saves the current files list
saveRecentFiles();
//runs the list of the runnables
LinkedList<Runnable> exitRun=new LinkedList<Runnable>(exitRunnables);
for(Runnable runnable : exitRun){
if(runnable!=null){
runnable.run();
}
}
}
COM: <s> saves the editors current state before it is exited </s>
|
funcom_train/1564574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HttpRequest setPostBody(byte[] postBody) {
if (postBody == null) {
this.postBody = ArrayUtils.EMPTY_BYTE_ARRAY;
} else {
this.postBody = new byte[postBody.length];
System.arraycopy(postBody, 0, this.postBody, 0, postBody.length);
}
return this;
}
COM: <s> assigns the specified body to the request copying all input bytes </s>
|
funcom_train/47209767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateGameState(long millis) {
//System.out.println("GAME HERE: ");
world.update(millis);
//gameFrame.repaint();
gameFrame.validate();
//scroll.validate();
//scroll.paintComponent(scroll.getGraphics());
scroll.repaint();
/*
while(true)
{
//System.out.println("KO: ");
long curr=System.currentTimeMillis();
long millis=curr-start;
start=curr;
world.update(millis);
//repaint();
//scroll.repaint();
gameFrame.validate();
//scroll.paint(scroll.getGraphics());
//scroll.repaint();
//gameFrame.repaint();
try{
Thread.sleep(1500);
}catch(Exception e){}
}
*/
}
COM: <s> main game loop updates world and draws it </s>
|
funcom_train/22212795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DefaultCacheEntry getNonTransactionCacheEntry(CacheKey cacheKey) {
DefaultCacheEntry dco = cacheModel.getCacheEntry(cacheKey) ;
if (dco != null) {
//synchronized(dco) {
Object obj = dco.getCacheObject() ;
// see if the underlying is a transactional item
if (obj instanceof CacheTransaction) {
dco = null ;
}
//}
}
return dco ;
}
COM: <s> get a cache entry iff it is not a transaction </s>
|
funcom_train/39170843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
super.setUp();
// get paths
uimaPlugin = new File(System.getProperty("gate.uima.plugin.location"));
gateHome = new File(System.getProperty("gate.home.location"));
testConfDir = new File(new File(uimaPlugin, "test"), "conf");
uimaXMLParser = UIMAFramework.getXMLParser();
}
COM: <s> set up the fixture </s>
|
funcom_train/46296971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Method getRunMethod(Class<?> clazz) {
Method method = null;
if (validateMapForceRunner(clazz)) {
// look for run(Connection, String...)
Method[] methods = clazz.getDeclaredMethods();
for (Method m : methods) {
if (isPublicVoidRun(m)) {
if (validateParamTypes(m)) {
// we're done looking at methods
method = m;
break;
}
}
}
}
return method;
}
COM: <s> given a class get a method with the signature </s>
|
funcom_train/4305356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Slider createHorizontalScrollBar(int width) {
loadGlyphImages();
int w = width;
int h = SCROLLBAR_WIDTH;
Slider slider = new Slider(
createHorizontalBarImage(GLYPHS1, COLOR1, width),
createHorizontalBarImage(GLYPHS2, COLOR2, Math.max(h, w/5)), 0, 0);
slider.setOrientation(Slider.HORIZONTAL);
return slider;
}
COM: <s> creates a horizontal scroll bar with the default appearance </s>
|
funcom_train/18938066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void run( CommonSyntacticalAnalyzer syntactical ) throws CompilerException {
try {
LOG.debug( "Compilation started for source \"" + sourceFile.getAbsolutePath() + "\"" );
syntactical.startCompilation();
} catch ( SyntacticalException sex ) {
LOG.error( "Problems at the compilation. ", sex );
throw new CompilerException( sex.getMessage(), sex );
}
}
COM: <s> starts the compilation at the given syntactical analyzer </s>
|
funcom_train/13271565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void detachJoinedWall(Wall joinedWall) {
// Detach the previously attached wall
if (joinedWall != null) {
if (joinedWall.getWallAtStart() == this) {
joinedWall.setWallAtStart(null, false);
} else if (joinedWall.getWallAtEnd() == this) {
joinedWall.setWallAtEnd(null, false);
}
}
}
COM: <s> detaches code joined wall code from this wall </s>
|
funcom_train/31051833 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setupGainStuff (Player player) {
if (player == null)
gainSlider.setEnabled(false);
gainControl = player.getGainControl();
if (gainControl != null) {
gainSlider.setEnabled (true);
setGainLevel();
} else {
gainSlider.setEnabled (false);
}
}
COM: <s> called in action performed to attach a gain control to </s>
|
funcom_train/1501702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Record get(String key) {
Record ret = null;
try {
byte[] keyBytes = key.getBytes("UTF-8");
DatabaseEntry theKey = new DatabaseEntry(keyBytes);
ret = get(theKey);
} catch (Exception e) {
logger.error("Exception caught using key " + key, e);
}
return ret;
}
COM: <s> returns the processed data belonging to the given raw column value </s>
|
funcom_train/2302667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map placeNodes(TreeModel tree, NodeDrawer drawer) {
HashMap nodeToPoint = new HashMap();
int[] width = Trees.width(tree);
TreeNode[] leaves = Trees.leaves(tree);
int depth = Trees.depth(tree);
setPoints((TreeNode)tree.getRoot(), depth, 0, leaves.length,
new int[] {0}, nodeToPoint);
return nodeToPoint;
}
COM: <s> given a code tree model code that contains </s>
|
funcom_train/7519963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SocketAddress getLocalSocketAddress() throws AppiaException {
if(error)
throw new AppiaException("There was an error upon socket registration: Error Code = "+errorCode+
" Description: "+errorDescription);
if(this.getDir() == Direction.DOWN)
throw new AppiaException("Event did not reach the socket session yet!");
return new InetSocketAddress(localHost,port);
}
COM: <s> gets the local address </s>
|
funcom_train/28672735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PropertyType_name_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PropertyType_name_feature", "_UI_PropertyType_type"),
BeansPackage.Literals.PROPERTY_TYPE__NAME,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the name feature </s>
|
funcom_train/24562470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Populationrules exportPopulationRules(Binaries binaries) throws SQLException {
Populationrules returnValue = new Populationrules();
for (Contribution populationRule : getUtility().getMatchingSubordinateContributions(
RelationshipTypes.CHILD_OF,
ReservedTypes.POPULATION_RULE)) {
returnValue.addPopulationrule(
populationRule.getExporter().exportPopulationRule(returnValue, null, binaries));
}
return returnValue;
}
COM: <s> export population rules </s>
|
funcom_train/17455753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getInitialSortColumn() {
for(int i = 0; i < columns.size(); i++) {
if(columns.get(i).getComparator() != null) {
return i;
}
}
throw new IllegalStateException("At least one DataViewColumn must have a comparator.");
}
COM: <s> get the default sort column </s>
|
funcom_train/25289724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlaneT(Vector4f planeT) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_PLANE_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("TexCoordGeneration6"));
if (isLive())
((TexCoordGenerationRetained)this.retained).setPlaneT(planeT);
else
((TexCoordGenerationRetained)this.retained).initPlaneT(planeT);
}
COM: <s> sets the t coordinate plane equation </s>
|
funcom_train/9920786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cards getCards(int numPlayers){
Cards temp= new Cards(numPlayers, false);
temp.makeSharedCards(cards.SharedCards);
temp.makeYourHand(toBet.getAIsHand().FirstCard, toBet.getAIsHand().SecondCard);
return temp;
}
COM: <s> returns a code cards code object with num players number of players </s>
|
funcom_train/28485842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("ToUpper".equals(portName)) {
setToUpperEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/7673956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void liveOutAtStatement() {
SsaInsn statement = blockN.getInsns().get(statementIndex);
RegisterSpec rs = statement.getResult();
if (!statement.isResultReg(regV)) {
if(rs != null) {
interference.add(regV, rs.getReg());
}
nextFunction = LIVE_IN_AT_STATEMENT;
}
}
COM: <s> v is live out at s </s>
|
funcom_train/9913391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JSONObject pojo_tableCommand() throws UIException {
JSONObject ret = null;
String commandName = getCommandName();
if ("pojoDelete".equals(commandName)) {
return this.pojo_delete();
}
try {
ret = this.actionWorker.operateBusinessEntityObject();
return ret;
} catch (PojoActionException e) {
logger.error("actionWorker fail for command" + commandName);
logger.error(e);
}
throw new UIException(PojoActionExceptionCode.NOT_FIND_COMMAND,
commandName);
}
COM: <s> does table command </s>
|
funcom_train/45897445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectSurfaceEntity(Tile tile) {
int i = 0;
for (TileEntry te : surfaceTableModel.rows) {
if (te.tile == tile) {
int idx = surfaceTable.convertRowIndexToView(i);
surfaceTable.getSelectionModel().addSelectionInterval(idx, idx);
surfaceTable.scrollRectToVisible(surfaceTable.getCellRect(idx, 0, true));
}
i++;
}
}
COM: <s> select the surface tile in the lists and preview </s>
|
funcom_train/40734703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendAjaxRequestToGetBlobstorePath() throws RequestException {
RequestBuilder reqBuilder = new RequestBuilder(RequestBuilder.GET, getServletPath());//composeURL("blobstore=true"));
reqBuilder.setTimeoutMillis(DEFAULT_AJAX_TIMEOUT);
reqBuilder.sendRequest("blobstore", onBlobstoreReceivedCallback);
}
COM: <s> sends a request to the server in order to get the blobstore path </s>
|
funcom_train/35844101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
modifiersPanel =
createBorderPanel(Translator.localize("label.modifiers"));
modifiersPanel.add(new UMLGeneralizableElementAbstractCheckBox());
modifiersPanel.add(new UMLGeneralizableElementLeafCheckBox());
modifiersPanel.add(new UMLGeneralizableElementRootCheckBox());
modifiersPanel.add(new UMLDerivedCheckBox());
}
COM: <s> initialize the panel with the common fields and stuff </s>
|
funcom_train/15406794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object putIfAbsent(K key, V value) {
expunge();
Reference<V> ref = backing.get(key);
if (ref != null) {
V existingValue = ref.get();
if (existingValue != null) {
// it is not absent
return existingValue;
}
}
// put the new value and return null
// indicating the put was successful
backing.put(key, createReference(key, value));
return null;
}
COM: <s> put the key value pair if there is not already a matching entry </s>
|
funcom_train/3405640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSize() {
if (content != null)
return contentLength;
if (contentStream != null) {
try {
int size = contentStream.available();
// only believe the size if it's greate than zero, since zero
// is the default returned by the InputStream class itself
if (size > 0)
return size;
} catch (IOException ex) {
// ignore it
}
}
return -1;
}
COM: <s> return the size of the content of this body part in bytes </s>
|
funcom_train/8263045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCookie(java.net.URL url, String cookieSpec) {
java.net.CookieHandler handler = java.net.CookieHandler.getDefault();
if(handler == null) {
return;
}
Map headers = new HashMap(2);
headers.put("Set-Cookie", Collections.singletonList(cookieSpec));
try {
handler.put(url.toURI(), headers);
} catch(Exception err) {
logger.log(Level.WARNING, "setCookie()", err);
}
}
COM: <s> this method uses the default cookie handler if one is available </s>
|
funcom_train/7585256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String callFindExpressionStaticMethodCallType(String receiverClassName, String methodName, List<Object> args) {
if(!this.ready) return null;
if(reloadAlways) this.reload();
Value ret = this.callFunction(findExpressionStaticMethodCallType,
Quercus.objectToValue(receiverClassName),
Quercus.objectToValue(methodName),
createScalarsCollection(args));
if(ret.isString()) {
return ret.toJavaString();
}
return null;
}
COM: <s> call the php find expression static method call type function </s>
|
funcom_train/17028590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void autoAdjustRange() {
// TODO I had to comment out this method because it is package protected
// this.axis.autoAdjustRange();
this.colorPalette.setMinZ(this.axis.getLowerBound());
this.colorPalette.setMaxZ(this.axis.getUpperBound());
}
COM: <s> rescales the axis to ensure that all data are visible </s>
|
funcom_train/12180765 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MarkerGeneratingErrorReporter getErrorReporter() {
Collection validationManagers = getValidationManagers();
if (validationManagers.size() > 1) {
throw new IllegalStateException(
"Expected only 1 ValidationManager" +
" but there were " + validationManagers.size());
}
return ((ValidationManager) validationManagers.iterator().next()).
getErrorReporter();
}
COM: <s> provide the marker generating error reporter associated with the </s>
|
funcom_train/42046074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasAutoIncrementKeys() {
if (hasAutoIncrementKeys == null) {
hasAutoIncrementKeys = new Boolean(false);
for (int i = 0; i < list.size(); i++) {
ColumnMetaData metaData = getColumnMetaData(i);
if (metaData.isAutoIncrement()) {
hasAutoIncrementKeys = new Boolean(true);
break;
}
}
}
return hasAutoIncrementKeys.booleanValue();
}
COM: <s> return true if one of the columns is auto increment </s>
|
funcom_train/22166329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reloadCurrentlyPlaying(Hashtable fileHash) {
if (getCurrent() != null) {
MP3File newNowPlaying =
(MP3File) fileHash.get(getCurrent().getFile().getAbsolutePath().toLowerCase());
if (newNowPlaying != null) {
currentMedia = newNowPlaying;
}
}
}
COM: <s> when a reload is complete call this to find the song currently playing </s>
|
funcom_train/37448899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FeatureBean getFeatureForUnlink() {
// Loop till we found the selected feature.
for (ComponentBean compBean : myComponents)
{
for (FeatureBean fb : compBean.getFeatures())
{
if (fb.isChecked())
{
return fb;
}
}
}
// None found so far, return null.
return null;
}
COM: <s> returns the selected feature for selecting a checkbox </s>
|
funcom_train/50154620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showEditor(Object modelObject, StrutsApplicationModel model, boolean isForward) {
String className = modelObject.getClass().getName();
PropertyEditor editor = getEditorForObject(modelObject, isForward);
editor.updateView(modelObject, model);
layout.show(this, editor.getClass().getName());
}
COM: <s> displays the appropriate code property editor code panel for the supplied object </s>
|
funcom_train/37421122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void killSession(){
unsubscribeAll();
removeSession( this );
List sessions = Session.getAllSessions();
Iterator i = sessions.iterator();
while(i.hasNext()){
Session session = (Session) i.next();
session.send(logoffMessage(session.getId()));
}
if(GoTServer.DEBUG)
System.out.println("Session "+getId()+" killed!");
// uncomment for SimpleParserTest
channelController.killChannelController();
}
COM: <s> this method stops all subscriptions and </s>
|
funcom_train/8077049 | /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 == null) || !(o.getClass().equals(this.getClass()))) {
return false;
}
SelectedTag s = (SelectedTag)o;
if ((s.getTags() == m_Tags)
&& (s.getSelectedTag() == m_Tags[m_Selected])) {
return true;
} else {
return false;
}
}
COM: <s> returns true if this selected tag equals another object </s>
|
funcom_train/40877944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getVersionNumber() {
String version = "?";
try {
PackageInfo pi = getPackageManager().getPackageInfo(getPackageName(), 0);
version = pi.versionName;
} catch (PackageManager.NameNotFoundException e) {
Log.e("OSP ERROR", "Package name not found", e);
}
return version;
}
COM: <s> get current version number </s>
|
funcom_train/50364550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer str = new StringBuffer();
for (int i = 0; i < bits.length; i++) {
if (bits[i]) {
str.append("1");
} else {
str.append("0");
}
}
return str.toString();
}
COM: <s> returns the bits object as a sequence of 0 and 1 string </s>
|
funcom_train/50892652 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessage(String contact, String message) {
try {
Vector v = new Vector();
v.add(fTrID);
increaseTrID();
v.add(message);
IPacket packet = fFactory.createOutgoingPacket("MSN_MSG", v);
this.sendPacket(packet);
} catch(BadArgumentException e) {
System.out.println("Exception occurred: " + e.getMessage());
} catch (UnknownPacketException e){
System.out.println("Exception occurred: " + e.getMessage());
}
}
COM: <s> method send message </s>
|
funcom_train/1386051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnNuovaBanca() {
if (btnNuovaBanca == null) {
btnNuovaBanca = new JButton();
btnNuovaBanca.setText("Nuova Banca");
btnNuovaBanca.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
nuovaBanca();
}
});
}
return btnNuovaBanca;
}
COM: <s> this method initializes btn nuova banca </s>
|
funcom_train/44087770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(URL file, GPGraph gpGraph) throws Exception {
// don't try / catch this command
// sothat we get error messages at the
// frontend.
// e.g. I you have not permissions to
// write a file you should get an error message
OutputStream out = null;
out = new FileOutputStream(file.getFile());
out = new BufferedOutputStream(out);
out.write(toString(gpGraph).getBytes());
out.flush();
out.close();
}
COM: <s> writes the graph as xml file </s>
|
funcom_train/40882379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void render () {
GUI gui = this.gui;
int viewWidth = Gdx.graphics.getWidth();
int viewHeight = Gdx.graphics.getHeight();
if (renderer.getWidth() != viewWidth || renderer.getHeight() != viewHeight) {
renderer.setSize(viewWidth, viewHeight);
gui.setSize(viewWidth, viewHeight);
}
gui.updateTime();
gui.handleKeyRepeat();
gui.handleTooltips();
gui.updateTimers();
gui.invokeRunables();
gui.validateLayout();
gui.draw();
}
COM: <s> draws the twl ui </s>
|
funcom_train/12835960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAnySuccessFirstFalse() {
_support = new DispatcherSupport(DispatcherSupport.ANY_SUCCESS, 2, _mainDispatcher);
_support.failure(null);
assertNull(_mainResult);
_support.success(null);
assertNotNull(_mainResult);
assertEquals(new Boolean(true), _mainResult);
}
COM: <s> tests any success mode when first client failed but second succeeded </s>
|
funcom_train/41385695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBotonReportes() {
if (botonReportes == null) {
botonReportes = new JButton();
botonReportes.setBounds(new Rectangle(270, 2, 120, 20));
botonReportes.setFont(new Font("Verdana", Font.BOLD, 10));
botonReportes.setText("Reportes");
botonReportes.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
botonReportes.setEnabled(false);
listener.actionPerformed(e);
}
});
}
return botonReportes;
}
COM: <s> this method initializes boton reportes </s>
|
funcom_train/43366099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStereoMode() {
switch (stereoMode) {
case 0:
return "Mono";
case 1:
return "Stereo";
case 2:
return "Dual";
case 3:
return "Joint";
case 4:
return "Force";
case 5:
return "Auto";
case 6:
return "Intensity";
default:
return "unknown";
}
}
COM: <s> gets the stereo mode used by the encoder </s>
|
funcom_train/4676586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double time(double z) {
double c = 2.99792458E10 / 3.08568E24 * 3.155815E7;
// (cm/s)/(3.08568e24cm/Mpc)*(3.16e7s/yr) = Mpc/yr
if (z < 250.) {
return (-1. / c * Simpson.qsimp(drdzpropObj, 250., z) / 1.e9); // Giga-years
}
return (0.);
}
COM: <s> calculate the age of the universe at a given redshift </s>
|
funcom_train/13298023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addReceviedMessagePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ReceiveMessage_receviedMessage_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ReceiveMessage_receviedMessage_feature", "_UI_ReceiveMessage_type"),
NegotiationPackage.Literals.RECEIVE_MESSAGE__RECEVIED_MESSAGE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the recevied message feature </s>
|
funcom_train/44300784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public Criteria createValueCriteria(ConstList lstValue, boolean bModeOr) throws FatalException {
if (lstValue.size() == 1)
return createValueCriteria((Value) lstValue.get(0), MpCriteria.COMPARE_EQUALS);
Criteria newCriteria = new Criteria();
newCriteria.lstValue = lstValue;
newCriteria.bModeOr = bModeOr;
return newCriteria;
}
COM: <s> create a criteria based on a list of value </s>
|
funcom_train/8241236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
try {
if (output != null) {
output.close();
output = null;
}
} catch (IOException ex) {
Logger.getLogger(NNTPService.class.getName()).log(
Level.WARNING, "close failed.", ex);
}
}
COM: <s> close inner writer </s>
|
funcom_train/39166471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
Constraint newC = null;
try {
newC = (Constraint)super.clone();
}
catch(CloneNotSupportedException e) {
throw (new InternalError(e.toString()));
}
newC.annotType = annotType;
newC.predicates = (List<ConstraintPredicate>)((ArrayList)predicates).clone();
return newC;
} // clone
COM: <s> need cloning for processing of macro references </s>
|
funcom_train/2583512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Paint getPaint() {
// TODO: it might be a good idea to keep a reference to the color
// specified in setPaint() or setColor(), rather than creating a
// new object every time getPaint() is called.
return SWTUtils.toAwtColor(this.gc.getForeground());
}
COM: <s> returns the current paint for this graphics context </s>
|
funcom_train/4534889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ChatRoom createChatRoom(String userJID, String nickname, String title) {
ChatRoom chatRoom;
try {
chatRoom = getChatContainer().getChatRoom(userJID);
}
catch (ChatRoomNotFoundException e) {
chatRoom = new ChatRoomImpl(userJID, nickname, title);
getChatContainer().addChatRoom(chatRoom);
}
return chatRoom;
}
COM: <s> creates and or opens a chat room with the specified user </s>
|
funcom_train/2337289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assignWidth(JToggleButton b, int buttonWidth) {
b.setMinimumSize(new Dimension(buttonWidth - 2,
b.getPreferredSize().height));
b.setPreferredSize(new Dimension(buttonWidth,
b.getPreferredSize().height));
Dimension newSize = b.getPreferredSize();
b.setMaximumSize(newSize);
b.setSize(newSize);
}
COM: <s> assigns a new width to the specified button </s>
|
funcom_train/18191424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void scaleInTheMiddleOfScreen(double deltaZoom, double[][] matrix) {
scale(deltaZoom, matrix);
// move the window back s.t. the center of the screen before zooming lies again in the center of the screen
translate(width / 2 *(1- deltaZoom), height / 2 *(1- deltaZoom), 0, matrix);
}
COM: <s> scales the transformation matrix s </s>
|
funcom_train/1441331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User showUser(String id) throws ApiException {
assert (id != null);
String url = String.format("http://twitter.com/users/show/%s.json", id);
GetMethod method = new GetMethod(url);
String response = execute(method);
return User.newFromJsonString(response);
}
COM: <s> returns extended information of a given user specified by id or screen </s>
|
funcom_train/5395408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToString() {
System.out.println("toString");
TableAttribute instance = null;
String expResult = "";
String result = instance.toString();
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 to string method of class org </s>
|
funcom_train/6444790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DeploymentInfo getDeploymentInfo(DeploymentInfo[] info, String name) throws OpenEJBException {
for(int i=0; i<info.length; i++) {
if(info[i].getDeploymentID().equals(name)) {
return info[i];
}
}
throw new OpenEJBException("Unable to find a deployed bean named '"+name+"'");
}
COM: <s> gets a specific deployment info object from a list by name </s>
|
funcom_train/45255734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attachPart(IViewReference ref) {
ViewPane pane = (ViewPane)((WorkbenchPartReference)ref).getPane();
// Restore any maximized part before re-attaching.
// Note that 'getMaximizedStack != null' implies 'useNewMinMax'
if (getMaximizedStack() != null) {
getMaximizedStack().setState(IStackPresentationSite.STATE_RESTORED);
}
derefPart(pane);
addPart(pane);
bringPartToTop(pane);
pane.setFocus();
}
COM: <s> attaches a part that was previously detached to the main layout </s>
|
funcom_train/28965799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String saveFileOf(String sourceFile) {
if (sourceFile == null || sourceFile.length() == 0) {
return "";
}
int dot = sourceFile.lastIndexOf('.');
if (dot < 0) {
return sourceFile + ".trace";
}
return sourceFile.substring(0, dot) + ".trace";
}
COM: <s> compute the save file to go with a source import file </s>
|
funcom_train/22087349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasInstance(Scriptable instance) {
Object protoProp = ScriptableObject.getProperty(this, "prototype");
if (protoProp instanceof Scriptable && protoProp != Undefined.instance)
{
return ScriptRuntime.jsDelegatesTo(instance, (Scriptable)protoProp);
}
throw NativeGlobal.typeError1
("msg.instanceof.bad.prototype", functionName, instance);
}
COM: <s> implements the instanceof operator for java script function objects </s>
|
funcom_train/49874307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeOutputDisplay(Dimension size) {
myModel = new FlockModel(size);
myModel.setPreferredSize(size);
myModel.setSize(size);
myModel.setFocusable(true);
myModel.requestFocus();
// myDisplay = new Canvas(size);
// myDisplay.setPreferredSize(size);
// myDisplay.setSize(size);
// myDisplay.setFocusable(true);
// myDisplay.requestFocus();
// add our user interface components to applet
// getContentPane().add(myDisplay, BorderLayout.CENTER);
// }
COM: <s> creates center canvas for simulation </s>
|
funcom_train/13197429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void performSelectStartField(ImageButton myButton) {
try {
DCCoord selectedField = new DCCoord(myButton.getBoard(),
myButton.getFile(),
myButton.getRank());
sendOut(encoder.selectPiece(activePlayer, selectedField));
} catch (DCLocationException e) {
System.err.println("DCLocationExeption in " +
"performSelectStartField() : " + e.getMessage());
displayMessage("ERROR [performSelectStartField()] - " +
"Invalid startfield!");
}
}
COM: <s> sends out a msg select piece with the coordinates of the selected piece </s>
|
funcom_train/17852970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancel() {
if (new File(mService.mixedChannelsDirName + "/mixedChannels.properties").exists()) {
try {
InputStream reader = new FileInputStream(mService.mixedChannelsDirName + "/mixedChannels.properties");
channelDescriptions.load(reader);
} catch (IOException e) {
e.printStackTrace();
}
}
}
COM: <s> will be called if cancel was pressed </s>
|
funcom_train/44083159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GPToolPlugin getSelectedToolPlugin(){
for(Iterator i=plugins.iterator(); i.hasNext();){
PluginToolAdapter plugin=(PluginToolAdapter)i.next();
JToggleButton button=plugin.getToggleButton();
if(button.isSelected()){
return plugin;
}
}
return null;
}
COM: <s> if the selected toolbar button is a plugin return it </s>
|
funcom_train/5022407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Xrecord getContextObject(Xrecord record) {
if ((getContext() != null) && (getContext().length() > 0)) {
if (record.getReferenceProperty(getContext(), Xelement.class) != null) {
Object object = record.getReferenceProperty(getContext(), Xelement.class);
if (object instanceof Xrecord) {
return (Xrecord) object;
}
}
}
return null;
}
COM: <s> convert the context string into its xrecord </s>
|
funcom_train/43193667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getFeatureIdError(int featureId) {
if (element == null) {
return "The UILayoutData has no attribute with the featureId=" + featureId; //$NON-NLS-1$
} else {
return element.getFactory().loadTranslations(Messages.class).UBean_PropertyUnknown(getClass().getName(), featureId);
}
}
COM: <s> get the message if a feature is unknown </s>
|
funcom_train/3306440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCookie(String name, String value) {
if (headers == null) {
headers = new Hashtable();
}
String existingCookies = (String) headers.get("Cookie");
if (existingCookies == null) {
setHeader("Cookie", name + "=" + value);
}
else {
setHeader("Cookie", existingCookies + "; " + name + "=" + value);
}
}
COM: <s> sets a request cookie with the given name and value </s>
|
funcom_train/29549606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getActiveNotebookChildCount() {
if (activeNotebookResource != null) {
Seq seq = activeNotebookResource.rdfModel.getModel().getSeq(
activeNotebookResource.resource.getMetadata().getUri().toString());
return seq.size();
}
return 0;
}
COM: <s> returns the notebook childred count </s>
|
funcom_train/10713022 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getJNDIChangeType() {
switch (changeType) {
case ADD:
return NamingEvent.OBJECT_ADDED;
case DELETE:
return NamingEvent.OBJECT_REMOVED;
case MODIFY:
return NamingEvent.OBJECT_CHANGED;
case MODIFY_DN:
return NamingEvent.OBJECT_RENAMED;
default:
// never reach
return -1;
}
}
COM: <s> get jndi defined change type value which is different with </s>
|
funcom_train/27780210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(long new_uid, IListItem item) {
try {
if (buffersize == BUFFERSIZE) {
flushHeader();
buffersize = 0;
}
super.append(new_uid, item, temp);
buffersize++;
if (buffersize == 1) {
firstUid = new_uid;
}
} catch (java.io.IOException x) {
logger.log(Level.WARNING, "append", x);
}
}
COM: <s> write the given item with the given uid to the stream </s>
|
funcom_train/42271594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(Object value) {
if (value == null) {
throw new NullPointerException();
}
HashtableEntry tab[] = table;
for (int i = tab.length ; i-- > 0 ;) {
for (HashtableEntry e = tab[i] ; e != null ; e = e.next) {
if (e.value.equals(value)) {
return true;
}
}
}
return false;
}
COM: <s> tests if some key maps into the specified value in this hashtable </s>
|
funcom_train/7457793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final FieldDescriptor type) {
if (type.getJavaType() == FieldDescriptor.JavaType.MESSAGE) {
throw new IllegalArgumentException(
"ExtensionRegistry.add() must be provided a default instance when " +
"adding an embedded message extension.");
}
add(new ExtensionInfo(type, null));
}
COM: <s> add a non message type extension to the registry by descriptor </s>
|
funcom_train/51093470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String catAnswers( String[] rightAnswers ){
String rightAnswer = new String();
if ( rightAnswers == null || rightAnswers.length == 0 )
return null;
for (int i = 0; i < rightAnswers.length; i++) {
if ( i != 0 && i != rightAnswers.length )
rightAnswer += ", " + rightAnswers[i];
else
rightAnswer += " " + rightAnswers[i];
}
return rightAnswer;
}
COM: <s> describe code cat answers code method here </s>
|
funcom_train/8235390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCommand(Command command, boolean execute) {
checkStack();
if (command != null) {
if (execute) {
command.execute();
}
undoStack.push(command);
redoStack.clear();
postChangeEvent();
if (debug) {
System.out.println("UndoManager.addCommand() execute=" + execute);
dump();
}
}
}
COM: <s> add a command to the undo stack without executing the command </s>
|
funcom_train/41157181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isOutlier(Instance inst) {
boolean result;
int i;
result = false;
for (i = 0; i < m_AttributeIndices.length; i++) {
// non-numeric attribute?
if (m_AttributeIndices[i] == NON_NUMERIC)
continue;
result = isOutlier(inst, m_AttributeIndices[i]);
if (result)
break;
}
return result;
}
COM: <s> returns whether the instance is an outlier or not </s>
|
funcom_train/39846791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSenderEmailAddress() {
if (logger.isDebugEnabled()) {
logger.debug("getSenderEmailAddress() - start");
}
if (logger.isDebugEnabled()) {
logger.debug("getSenderEmailAddress() - end - return value = "
+ senderEmailAddress);
}
return senderEmailAddress;
}
COM: <s> get the email address of the notification sender </s>
|
funcom_train/3329806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float toFloat() throws NumberFormatException {
if (_value.equals("INF")) return Float.POSITIVE_INFINITY;
if (_value.equals("-INF")) return Float.NEGATIVE_INFINITY;
return Float.valueOf(_value).floatValue();
} //-- toInt
COM: <s> returns a double representation of the value of this facet </s>
|
funcom_train/10628226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDoubleValuePlusZero() {
String a = "123809648392384754573567356745735.63567890295784902768787678287E-400";
BigDecimal aNumber = new BigDecimal(a);
long zero = 0;
double result = aNumber.doubleValue();
assertTrue("incorrect value", Double.doubleToLongBits(result) == zero);
}
COM: <s> double value of a small positive big decimal </s>
|
funcom_train/30158453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentHitPoints(String hp) {
if (!mCurrentHitPoints.equals(hp)) {
postUndoEdit(MSG_CURRENT_HIT_POINTS_UNDO, ID_CURRENT_HIT_POINTS, mCurrentHitPoints, hp);
mCurrentHitPoints = hp;
notifySingle(ID_CURRENT_HIT_POINTS, mCurrentHitPoints);
}
}
COM: <s> sets the current hit points </s>
|
funcom_train/20647387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String testDropTarget(TreePath destination, TreePath dropper) {
if (destination == null) return "no destination";
if (dropper == null) return "no dropper";
CheckNode dest = (CheckNode) destination.getLastPathComponent();
CheckNode node = (CheckNode) dropper.getLastPathComponent();
if (dest == node) return "no same";
if (node.isNodeDescendant(dest)) return "no parent";
if (dest.getAllowsChildren()) return null ;
return "nope";
}
COM: <s> convenience method to test whether drop location is valid </s>
|
funcom_train/19318107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float readFloat() throws JMSException {
if(isBodyModifiable()) {
throw new MessageNotReadableException("BytesMessage write_only");
}
try {
return getInputStream().readFloat();
}
catch(EOFException e) {
throw new MessageEOFException("BytesMessage end_of_message");
}
catch(IOException e) {
throw new JMSException(e.getMessage());
}
}
COM: <s> reads a code float code from the bytes message stream </s>
|
funcom_train/51653265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getSelection () {
checkWidget();
if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false;
if (OS.HIVIEW) {
return selection;
}
short [] transform = new short [1];
OS.GetControlData (iconHandle, (short) OS.kControlEntireControl, OS.kControlIconTransformTag, 2, transform, null);
return (transform [0] & OS.kTransformSelected) != 0;
}
COM: <s> returns code true code if the receiver is selected </s>
|
funcom_train/9043710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void inspectExpression(Expression ex) {
if(ex==null)
return;
String source = ex.toString();
if ((ex != null) && (source != null)) {
String expression = source;
char[] chars = expression.toCharArray();
for (int i = 0; i < chars.length - 1; i++) {
char next = chars[i];
if ((next == '&' || next == '|') && (next == chars[i + 1])) {
cyclomatic++;
}
}
}
}
COM: <s> count occurrences of and conditional and or fix for bug 740253 </s>
|
funcom_train/3099769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return (digits(mostSigBits >> 32, 8) + "-" +
digits(mostSigBits >> 16, 4) + "-" +
digits(mostSigBits, 4) + "-" +
digits(leastSigBits >> 48, 4) + "-" +
digits(leastSigBits, 12));
}
COM: <s> returns a code string code object representing this </s>
|
funcom_train/1406477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addLineStyleMarker(final Color color, final int dataSetIndex, final int dataPoint, final int size, final Priority priority) {
getParameter(ChartMarkersParameter.class).addLineStyleMarker(color, dataSetIndex, dataPoint, size, priority);
}
COM: <s> adds the line style marker </s>
|
funcom_train/4853723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL makeQuery (String keywords) {
try {
return new URL("http://www.newsindex.com/cgi-bin/process.cgi?mode=any&query="
+ URLEncoder.encode(keywords));
} catch (MalformedURLException e) {
throw new RuntimeException ("internal error");
}
}
COM: <s> make a query url for news index </s>
|
funcom_train/18504072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fixKeyCloseSwingBug() {
getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
KeyStroke.getKeyStroke("ctrl F4"), "closeInternalFrame");
getActionMap().put("closeInternalFrame",
new AbstractAction() {
public void actionPerformed(ActionEvent e) {
doDefaultCloseAction();
}
}
);
}
COM: <s> fixing a swing bug when pressing ctrl f4 closing the internal frame </s>
|
funcom_train/46825157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CommJoinTable (String username, Table table) {
super (username);
// Set table number manually
setTableNum (table.getTableNum());
// Set player list
this.playerList = table.getPlayerList();
if (table.getModel() != null)
this.jogreModelXML = table.getModel().flatten();
}
COM: <s> constructor from the server to the joining client </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.