__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/5603271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInit() throws IOException {
Code c = classfile.addMethod("<init>", sig(Void.TYPE, String.class), ACC_PUBLIC);
c.aload(0);
c.invokespecial(p(PyFunctionTable.class), "<init>", sig(Void.TYPE));
addConstants(c);
}
COM: <s> this block of code writes out the various standard methods </s>
|
funcom_train/18743322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JFrame getFrameOf(Component panel) {
if (indexOfComponent(panel) < 0) {
Container window = panel.getParent();
while (window != null && !(window instanceof DisplayWindow)) {
window = window.getParent();
}
return (JFrame) window;
} else {
return null;
}
}
COM: <s> returns the parent frame of an editor panel if the editor is not </s>
|
funcom_train/4404803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toPolynomialString() {
StringBuffer str = new StringBuffer();
for ( BigInteger degree : degrees ) {
if ( str.length() != 0 ) {
str.append( " + " );
}
if ( degree.compareTo( BigInteger.ZERO ) == 0 ) {
str.append( "1" );
} else {
str.append( "x^" + degree );
}
}
return str.toString();
}
COM: <s> returns standard ascii representation of this polynomial in the form </s>
|
funcom_train/15957871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Directory createIndex(){
RAMDirectory idxDir=new RAMDirectory();
try {
Document[] data=buildData();
TestDataDigester testDigester=new TestDataDigester(_fconf,data);
BoboIndexer indexer=new BoboIndexer(testDigester,idxDir);
indexer.index();
IndexReader r = IndexReader.open(idxDir);
r.deleteDocument(r.maxDoc() - 1);
//r.flush();
r.close();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return idxDir;
}
COM: <s> public static document build data2 </s>
|
funcom_train/1246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte putAt(long lax, byte val) {
if (lax < blocksize) {
// the simple case: one flat array
return (arrvec[0][ (int)lax ] = val);
}
long blockno = lax / blocksize;
long eleminx = lax % blocksize;
// FFS/hm: index out of range
return (arrvec[(int)blockno][(int)eleminx] = val);
}
COM: <s> writes an element value at the passed large index </s>
|
funcom_train/29398134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFilterEnd(Instruction ih) {
// if (filterEnd != null)
// filterEnd.removeTargeter(this);
// if (ih != null)
// ih.addTargeter(this);
filterEnd = ih;
if (ih != null) {
Instruction temp = ih.getNext();
// if (handlerStart != null)
// handlerStart.removeTargeter(this);
// if (temp != null)
// temp.addTargeter(this);
handlerStart = temp;
}
}
COM: <s> sets the handle of the end of the filter block </s>
|
funcom_train/4017910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IAnswerData getQuestionPreload(String preloadType, String preloadParams) {
IPreloadHandler handler = (IPreloadHandler)preloadHandlers.get(preloadType);
if(handler != null) {
return handler.handlePreload(preloadParams);
} else {
System.err.println("Do not know how to handle preloader [" + preloadType + "]");
return null;
}
}
COM: <s> returns the ianswer data preload value for the given preload type and parameters </s>
|
funcom_train/33837606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String checkUser(){
if(this.getEmail()!=null && this.getPassword()!=null){
this.url = LoginBean.URL_LOGIN_FAILED;
b = Facade.getInstance().Benutzer_Login(this.getEmail(), this.getPassword());
if ( b != null ){//if Benutzer creation was successful go to login_loggedin.jsp
this.getBenutzer().setSessionId(this.getSessionId());
this.setLoggedIn( b.getRoles() );
this.url = LoginBean.URL_LOGGED_IN;
}
}
return url;
}
COM: <s> the form is responsible for setting the proper url </s>
|
funcom_train/46581908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File createGlobal(File pRoot) throws IOException {
Properties prop = new Properties();
prop.put("logListeners", "atg/dynamo/service/logging/ScreenLog");
prop.put("loggingDebug","false");
return NucleusTestUtils.createProperties("GLOBAL", new File(pRoot
.getAbsolutePath()
+ "/"), null, prop);
}
COM: <s> creates a global </s>
|
funcom_train/15406430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Props addChild(String subpath) {
subpath = subpath.trim();
addProperty(subpath);
// build the subpath
String p = path == null ? subpath : path + "." + subpath;
Props nested = new Props(owner, path, p);
owner.pathMap.put(p, nested);
return nested;
}
COM: <s> add a child property set </s>
|
funcom_train/21877604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Model getXformModel(String uri, Model input) throws DepoException {
Model oMod = getKnowledgeMap().readlockXforms();
try {
Resource res = oMod.getResource(uri);
input.add(new ArrayList(Workbench.getRevisionModelStrategy().getBasicRevisionItemStrategy()
.getStatements(res, null)));
return input;
} finally {
getKnowledgeMap()
.unlockXforms();
}
}
COM: <s> get a model containing the statements for the given resource </s>
|
funcom_train/3121457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(int pos, byte[] insertbuf, int off, int len) {
//// 1. Insert some space in.
insert(pos, len);
//// 2. Copy the bytes over.
System.arraycopy(insertbuf, off, databuf, pos, len);
} // of method
COM: <s> insert the specified buffer at the specified position </s>
|
funcom_train/50999554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String determineErrorCode(Throwable t) {
String theErrorCode;
theErrorCode = determineErrorCodeType(t);
// No DB support ...
/**
try {
theErrorCode = determineErrorCodeDb(t);
}
catch (SQLException ex) {
//log.debug("SQLEXception: ", ex);
ex.printStackTrace();
theErrorCode = determineErrorCodeType(t);
}
*/
return theErrorCode;
}
COM: <s> determines the error key for the given code throwable code </s>
|
funcom_train/45252759 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateState() {
IWorkbenchPage page = getActivePage();
if (page == null) {
setEnabled(false);
return;
}
IEditorReference editors[] = page.getEditorReferences();
for (int i = 0; i < editors.length; i++) {
if (!editors[i].isDirty()) {
setEnabled(true);
return;
}
}
setEnabled(false);
}
COM: <s> enable the action if there at least one editor open </s>
|
funcom_train/9086575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Categories entity) {
EntityManagerHelper.log("deleting Categories instance", Level.INFO,
null);
try {
entity = getEntityManager().getReference(Categories.class,
entity.getCategoryId());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent categories entity </s>
|
funcom_train/37073615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateFile() {
try {
BufferedWriter bw = new BufferedWriter(new FileWriter(iniFile, false));
for (int i=0; i<allIni.size(); i++) {
bw.write((String)allIni.get(i));
bw.newLine();
}
bw.close();
} catch (IOException e) {return false;}
return true;
}
COM: <s> write the changes that were made into the </s>
|
funcom_train/17416116 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void raiseAppletDeniedEvent() {
JSObject jso = (JSObject) this.configHolder.getObject("global.jso");
try {
jso.call("JUP_eventhandler", new String[]{"appletdenied"});
} catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> executed to indicate javascript event handler </s>
|
funcom_train/45598154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element writeGraph() {
Document document = DomHelper.createDocument("", "graph");
Element graphElement = document.getDocumentElement();
graphElement.setAttribute("type", graph.getType().getName());
Element parameters = document.createElement("parameters");
graphElement.appendChild(parameters);
writeParameters(graph, graph.getType(), parameters);
Element vertices = document.createElement("vertices");
graphElement.appendChild(vertices);
writeVertices(vertices);
Element edges = document.createElement("edges");
graphElement.appendChild(edges);
writeEdges(edges);
return graphElement;
}
COM: <s> writes the graph </s>
|
funcom_train/31057170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Agent sendUIAgent( Agent requester, CellAddress destination ) {
try {
MusicUIAgentImpl muai = new MusicUIAgentImpl();
muai.setMusicPlayingAgent( (MusicPlayingAgent)myCell.getRemoteObject( this ) );
Debug.notice( "shipping the music ui agent to " + destination );
return myCell.moveAgent( muai, destination );
} catch( Exception error ) {
Debug.error( "problem instantiating and serializing a remote interface to send over", error );
}
return null;
}
COM: <s> we use this to return a remote djagent impl which is configured </s>
|
funcom_train/34483453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startDocument() throws SAXException {
super.startDocument();
modelIds = new HashMap();
schInstances = new HashMap();
iso1030328HeaderHandler = new Iso1030328HeaderHandler();
documentNameHandler = new DocumentNameHandler();
timeStampHandler = new TimeStampHandler();
authorHandler = new AuthorHandler();
originatingOrganizationHandler = new OriginatingOrganizationHandler();
authorizationHandler = new AuthorizationHandler();
originatingSystemHandler = new OriginatingSystemHandler();
preprocessorVersionHandler = new PreprocessorVersionHandler();
}
COM: <s> accepts notification about document start events </s>
|
funcom_train/18149773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEthnicGroupCode(SET<CE> ethnicGroupCode) {
if(ethnicGroupCode instanceof org.hl7.hibernate.ClonableCollection)
ethnicGroupCode = ((org.hl7.hibernate.ClonableCollection<SET<CE>>) ethnicGroupCode).cloneHibernateCollectionIfNecessary();
_ethnicGroupCode = ethnicGroupCode;
}
COM: <s> sets the property ethnic group code </s>
|
funcom_train/22654940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String buildMessage(String firstMessageLine, int exceptionLine) {
if (additionalLines.size() == 0 || exceptionLine == 0) {
return firstMessageLine;
}
StringBuffer message = new StringBuffer(firstMessageLine);
int linesToProcess = (exceptionLine == -1 ? additionalLines.size()
: exceptionLine);
for (int i = 0; i < linesToProcess; i++) {
message.append(newLine);
message.append(additionalLines.get(i));
}
return message.toString();
}
COM: <s> combine all message lines occuring in the additional lines list adding a </s>
|
funcom_train/14115923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean processAction(final Object action) throws FiniteStateAutomatonException {
preProcessAction();
Set<State<N>> nextState = stateProcessor.computeNextStateSet(this, action, getInvalidActionHandler());
currentState.clear();
currentState.addAll(nextState);
if (stateProcessor.finalStateReached()) {
mode = Mode.TERMINATED;
}
lastProcessedAction = action;
return stateProcessor.finalStateReached();
}
COM: <s> processes an action on the model </s>
|
funcom_train/20168834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attributeRemoved(HttpSessionBindingEvent event) {
if (event.getName().equals(EVENT_KEY) && !isAnonymous()) {
SecurityContext securityContext = (SecurityContext) event.getValue();
User user = (User) securityContext.getAuthentication().getPrincipal();
removeUsername(user);
}
}
COM: <s> when users logout remove their name from the hash map </s>
|
funcom_train/13689794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getGetCancel() {
if (getCancel == null) {
getCancel = new JButton();
getCancel.setPreferredSize(new java.awt.Dimension(100,26));
getCancel.setText(Helper.getMessage("general.btnCancel"));
getCancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
dispose();
}
});
}
return getCancel;
}
COM: <s> this method initializes get cancel </s>
|
funcom_train/50774009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canNormalize(){
boolean result = false;
// only post inc/dec are critical
if(!(isPostIncrement() || isPostDecrement()))
return true;
ProgramElement pe = recoderAssignment.getASTParent();
if(pe instanceof StatementBlock){
result = true;
}else{
// TODO low - anyone - this needs to be more fine-grained
// things like x = y + i++ can as well be normalized:
// x = y + ((i = i+1)-1);
result = false;
}
return result;
}
COM: <s> checks whether an assignment can be normalized </s>
|
funcom_train/42348920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(int team,int ID,int value) throws Exception{
PreparedStatement prep= connection.prepareStatement(
"insert into match values(?,?,?);");
prep.setInt(1, team);
prep.setInt(2, ID);
prep.setInt(3, value);
prep.addBatch();
connection.setAutoCommit(false);
prep.executeBatch();
connection.setAutoCommit(true);
}
COM: <s> inserts a row into the database </s>
|
funcom_train/22092705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run( String[] straArg ) {
int len = straArg.length;
boolean bSynErr = false;
System.out.println( len );
if (len == 8) {
int i = 0;
String strArg = straArg[i];
while (i<8) {
bSynErr = cmdParam( straArg, i );
if (!bSynErr)
i += 2;
}
}
else
bSynErr = true;
if (bSynErr) {
_log.severe( _strUsage );
}
}
COM: <s> non static main method </s>
|
funcom_train/22385229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsContinuous() throws Exception {
//LinkedVStreamDim dim = (LinkedVStreamDim)this.dim;
Cell cc = space.makeSpanRank("foobar");
Cell d = dim.s(cc, 1);
assertNotNull("The other cell", d);
// assertTrue("The two cells "+c+" and "+d+" should be continuous",
// dim.isContinuous(c, d));
}
COM: <s> test that the is continuous routine works right </s>
|
funcom_train/2537488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteDisplayLists(){
if (MT4jSettings.getInstance().isOpenGlMode()){
// GL gl = Tools3D.getGL(this.r);
GL11Plus gl11Plus = PlatformUtil.getGL11Plus();
if (gl11Plus != null) {
for (int id : this.displayListIDs){
if (id != -1){
gl11Plus.glDeleteLists(id, 1);
}
}
}
this.displayListIDs[0] = -1;
this.displayListIDs[1] = -1;
}
}
COM: <s> delete the the displaylists of that geometry </s>
|
funcom_train/14307843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireDirectoryAdded(ProjectDirectory aDirectory) {
if (!fireEvents) return;
ProjectEvent evt = new ProjectEvent(this, aDirectory);
for(int i = 0; i < listeners.size(); i++)
((ProjectListener)listeners.get(i)).directoryAdded(evt);
}
COM: <s> fire notification that a project directory has been added </s>
|
funcom_train/44940424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void put(Query query, WebObject article) {
String text = query.getParameterValue("text");
try {
String result = getArticleXML(text);
setContentFieldText(query, article, result);
webObjectHome.save(article);
} catch (Exception e) {
log.warn("Wrong text from editor: " + text, e);
}
}
COM: <s> stores text into article </s>
|
funcom_train/6204824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void libraryDoubleClicked(IProjectLibrary library) {
if (library.getDeploymentType() == IProjectLibrary.DEPLOY_APPLICATION) {
library.setDeploymentType(IProjectLibrary.DEPLOY_SERVER);
} else if (library.getDeploymentType() == IProjectLibrary.DEPLOY_SERVER) {
library.setDeploymentType(IProjectLibrary.DEPLOY_NONE);
} else {
library.setDeploymentType(IProjectLibrary.DEPLOY_APPLICATION);
}
getViewer().refresh(library);
setContentsChanged();
}
COM: <s> indicates that a library in the table was double clicked </s>
|
funcom_train/15490667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNSlices() {
//IJ.log("getNSlices: "+ nChannels+" "+nSlices+" "+nFrames);
int stackSize = getImageStackSize();
if (nSlices==1 && nFrames*nChannels!=stackSize) {
nSlices = stackSize;
nChannels = 1;
nFrames = 1;
}
return nSlices;
}
COM: <s> returns the image depth number of z slices </s>
|
funcom_train/33393527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String buildUrl() {
StringBuilder sb = new StringBuilder();
boolean includePort = true;
if (null != scheme) {
sb.append(scheme).append("://");
includePort = (port != (scheme.equals("http") ? 80 : 443));
}
if (null != serverName) {
sb.append(serverName);
if (includePort && port > 0) {
sb.append(':').append(port);
}
}
if (!ObjectUtils.equals(contextPath, "/")) {
sb.append(contextPath);
}
sb.append(buildRequestUrl());
return sb.toString();
}
COM: <s> build full url </s>
|
funcom_train/3604050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IFile existsInTarget(IPath path) {
if (fTarget instanceof IFile) { // special case
IFile file= (IFile) fTarget;
if (matches(file.getFullPath(), path))
return file;
} else if (fTarget instanceof IContainer) {
IContainer c= (IContainer) fTarget;
if (c.exists(path))
return c.getFile(path);
}
return null;
}
COM: <s> iterates through all of the resources contained in the patch wizard target </s>
|
funcom_train/9891385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasChildTasks(boolean ignoreDeleted) throws SQLException {
PreparedStatement stmt;
ResultSet result;
if (ignoreDeleted) {
stmt=DataBase.getInstance().prepareStatement(
"SELECT task_id FROM task WHERE is_deleted=0 AND parent_task="
+ m_id.value());
}
else {
stmt= DataBase.getInstance().prepareStatement(
"SELECT task_id FROM task WHERE parent_task="
+ m_id.value());
}
stmt.execute();
result=stmt.getResultSet();
boolean res=result.next();
result.close();
stmt.close();
return res;
}
COM: <s> tests if this task has children </s>
|
funcom_train/29783995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void refreshFiles(IContainer root) {
IResource allfiles[];
try {
allfiles = root.members();
for(int i=0; i<allfiles.length; i++) {
IResource resource = allfiles[i];
if (resource instanceof IFile && !resource.getName().endsWith("jlayercheck.xml")) { // prevent recursion loop
deleteMarkers((IFile) resource);
check(resource);
}
if (resource instanceof IContainer) {
refreshFiles((IContainer) resource);
}
}
} catch (CoreException e) {
e.printStackTrace();
}
}
COM: <s> checks all files recursively from the given root </s>
|
funcom_train/13275127 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRectangularWallHeight(Float rectangularWallHeight) {
if (rectangularWallHeight != this.rectangularWallHeight) {
Float oldRectangularWallHeight = this.rectangularWallHeight;
this.rectangularWallHeight = rectangularWallHeight;
this.propertyChangeSupport.firePropertyChange(Property.RECTANGULAR_WALL_HEIGHT.name(),
oldRectangularWallHeight, rectangularWallHeight);
setShape(WallShape.RECTANGULAR_WALL);
}
}
COM: <s> sets the edited height of a rectangular wall </s>
|
funcom_train/47869032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean test_digit(String tok) {
if (tok == null)
return false;
if (tok.length() == 0)
return false;
char a;
for (int i = 0; i < tok.length(); i++) {
a = tok.charAt(i);
if (Character.isDigit(a))
return true;
}
return false;
}
COM: <s> test for the current string contains at least one digit </s>
|
funcom_train/24194726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void resetGuardsEvaluation() {
for (int i = 0; i < this.guardsExecutors.size(); i++) {
BTExecutor guardExecutor = this.guardsExecutors.get(i);
if (guardExecutor != null) {
guardExecutor.terminate();
this.guardsResults.set(i, Status.RUNNING);
BTExecutor newExecutor = new BTExecutor(guardExecutor.getBehaviourTree(),
this.getContext());
newExecutor.copyTasksStates(guardExecutor);
newExecutor.tick();
this.guardsExecutors.set(i, newExecutor);
}
}
}
COM: <s> resets the evaluation of all the guards </s>
|
funcom_train/22439689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkout(IResource[] resources, int depth, IProgressMonitor progress) throws TeamException {
progress.beginTask(Policy.bind("checkingOut"), 1000);
execute(new IIterativeOperation() {
public IStatus visit(IResource resource, int depth, IProgressMonitor progress) {
return _stateFactory.getState(resource).checkOut(progress);
}
}, resources, depth, progress);
// revert all editors..
}
COM: <s> check out the given resources to the given depth </s>
|
funcom_train/17827578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLength(int length) {
if (length >= buffer.length()) {
return;
}
for (int i = length; i < buffer.length(); i++) {
if (buffer.charAt(i) == '\n') {
--lineCount;
}
}
buffer.setLength(length);
}
COM: <s> changes the length of the contents of the buffer </s>
|
funcom_train/39564863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaintNode(Node node) {
JPowerGraphRectangle r = new JPowerGraphRectangle(0, 0, 0, 0);
getNodeScreenBounds(node,r);
repaint(new Rectangle(r.x, r.y, r.width, r.height));
}
COM: <s> repaints the given node </s>
|
funcom_train/24087047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String formatFloatPrecisly(double value){
if (Double.isInfinite(value) || Double.isNaN(value)) {
return Double.toString(value);
}
if (Math.abs(value) > 1000000000000000.0) {
// ok, this is too much,
return dfScientific.format(value);
}
return dfPrec.format(value);
}
COM: <s> formats a float value in decimal notation non scientific </s>
|
funcom_train/47928473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void findRumblers(Controller controller) {
// get the game pad's rumblers
rumblers = controller.getRumblers();
if (rumblers.length == 0) {
System.out.println("No Rumblers found");
rumblerIdx = -1;
} else {
System.out.println("Rumblers found: " + rumblers.length);
rumblerIdx = rumblers.length - 1; // use last rumbler
}
} // end of findRumblers()
COM: <s> find the rumblers </s>
|
funcom_train/22279493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector internalWindows() {
//- JComponent cont = panel.getLayeredPane();
//-
//- windows.removeAllElements();
//-
//- for (int i = 0; i < cont.getComponentCount(); ++i) {
//- Component c = cont.getComponent(i);
//-
//- if (c instanceof InternalWindow) { }
//- }
return windows;
}
COM: <s> returns the vector containing all internal windows currently displayed </s>
|
funcom_train/14093272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEvaluateMatchesString3() {
String leftside = "ABCD";
String rightside = "BA";
int operation = Operator.Operation.MATCH;
boolean ignoreCase = false;
boolean expectedReturn = false;
boolean actualReturn = Operator.evaluate(leftside, rightside, operation,
ignoreCase);
assertEquals("return value", expectedReturn, actualReturn);
}
COM: <s> test match false </s>
|
funcom_train/24049893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNodeConsistentArea() {
/**
* To fully check validity, it is necessary to compute ALL
* intersections, including self-intersections within a single edge.
*/
SegmentIntersector intersector = geomGraph.computeSelfNodes(li, true);
if (intersector.hasProperIntersection()) {
invalidPoint = intersector.getProperIntersectionPoint();
return false;
}
nodeGraph.build(geomGraph);
return isNodeEdgeAreaLabelsConsistent();
}
COM: <s> check all nodes to see if their labels are consistent with area topology </s>
|
funcom_train/48882751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextPane getProblemPddlTextPane() {
if (problemPddlTextPane == null) {
ItHilightedDocument problemDocument = new ItHilightedDocument();
problemDocument.setHighlightStyle(ItHilightedDocument.PDDL_STYLE);
problemPddlTextPane = new JTextPane(problemDocument);
problemPddlTextPane.setFont(new Font("Courier", 0, 12));
problemPddlTextPane.setBackground(Color.WHITE);
}
return problemPddlTextPane;
}
COM: <s> this method initializes problem pddl text pane </s>
|
funcom_train/46004482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void aXXtestNumberFormatLocale_US() throws ParseException{
// using the default locale (test in USA)
String valS = "36,23";
Locale locale= Locale.getDefault();
NumberFormat nf = NumberFormat.getNumberInstance(locale);
DecimalFormat df = (DecimalFormat)nf;
Number val = df.parse(valS);
NumberFormat myFormatter = NumberFormat.getInstance(locale);
myFormatter.setMaximumFractionDigits(6);
String output = myFormatter.format(val);
assertEquals("36,23", output);
}
COM: <s> not sure what this test those </s>
|
funcom_train/25333151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToString() {
DBCollection instance = new DBCollection();
assertTrue( instance.toString().equals(""));
instance.setPrimaryCoreDatabase(db);
assertTrue( instance.toString().equals("bob"));
assertEquals( instance.toString(),instance.getCollectionName());
}
COM: <s> test of to string method of class dbcollection </s>
|
funcom_train/15919302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LocalDecl createLocalDecl(Position pos, LocalDef def, Expr init) {
return nf.LocalDecl( pos.markCompilerGenerated(),
nf.FlagsNode(pos, def.flags()),
nf.CanonicalTypeNode(pos, def.type()),
nf.Id(pos, def.name()),
init ).localDef(def);
}
COM: <s> create a declaration for a local variable from a local type definition </s>
|
funcom_train/41163465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(CoCompleteE3 entity) {
EntityManagerHelper.log("deleting CoCompleteE3 instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(CoCompleteE3.class, entity.getCompleteE3Id());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent co complete e3 entity </s>
|
funcom_train/45209646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel getServerPortLabel() {
if (serverPortLabel == null) {
serverPortLabel = new JLabel();
serverPortLabel.setName("serverPortLabel");
serverPortLabel.setText("Server Port");
serverPortLabel.setToolTipText("The port on which the " +
"server listens. You usually shouldn't need to change this.");
}
return serverPortLabel;
}
COM: <s> return the server port label property value </s>
|
funcom_train/29023562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintIcon(Component c, Graphics g, int x, int y) {
if (orientation == Orientation.HORIZONTAL) {
for (Icon icon : icons) {
icon.paintIcon(c, g, x, y);
x += icon.getIconWidth();
}
} else {
for (Icon icon : icons) {
icon.paintIcon(c, g, x, y);
y += icon.getIconHeight();
}
}
}
COM: <s> draw the icon at the specified location </s>
|
funcom_train/3875663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void increaseCount(Map m, Object o) {
Integer count = (Integer) m.get(o);
if (count == null) {
count = new Integer(1);
}
else {
count = new Integer(count.intValue() + 1);
}
m.put(o, count);
}
COM: <s> increases the count in a map for a certain object </s>
|
funcom_train/18136046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeInputPort(String portId) {
InputPort inputPort = null;
int index = 0;
Iterator<InputPort> iterator = inputPorts.iterator();
while (inputPort == null && iterator.hasNext()) {
InputPort currentInputPort = iterator.next();
if (currentInputPort.getId().equals(portId)) {
inputPort = currentInputPort;
} else{
index++;
}
}
if (inputPort != null) {
inputPorts.remove(index);
inputPort
.removePropertyChangeListener(propertyChangeEventForwarder);
propertyChangeSupport.firePropertyChange(INPUT_PORTS_FIELD,
inputPort, null);
}
}
COM: <s> method for removing an input port </s>
|
funcom_train/12156643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getHostURL() {
try {
URL url = new URL(request.getScheme(),
request.getServerName(),
request.getServerPort(), "/");
return url;
} catch (MalformedURLException e) {
throw new ExtendedRuntimeException("Could not get host URI", e);
}
}
COM: <s> get the host url </s>
|
funcom_train/47891192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFilteredPartListener(IFilteredPartListener listener, Class<?> part) {
listeners.put(listener, part);
// Notifiy the listener of any parts already open that match the part type.
if (page != null) {
for(IWorkbenchPartReference p : page.getEditorReferences()) {
if(part.isInstance(p.getPart(false))) {
listener.partOpened(new FilteredPartEvent(p.getPart(false)));
}
}
}
}
COM: <s> attach a listener </s>
|
funcom_train/34673506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testValidatorServiceRegExpFail() throws Exception {
// set up key & value & validation
String key = "TestForm";
TestTypesObject value = new TestTypesObject();
value.setStringValue1("file.doc");
String validationXml = getCore().getParameterValue("ServiceRegExpValidationSpec","");
String error = testValidatorServiceGeneric(key, value, validationXml);
if(error.equals("")){
// fail - no errors
fail("validate should have found errors");
return;
}
System.out.println();
System.out.println("testValidatorServiceInRangeFailBelow");
System.out.println(error);
System.out.println(error);
}
COM: <s> test validator service required if validation </s>
|
funcom_train/14373821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printAllAbsoluteValues() {
SplitLine current = root;
while (current.getLeftChild() != null)
current = current.getLeftChild();
System.out.println("AV: " + getAbsoluteValue(current,10) );
current = successor(current);
while (current != null && current != maxStuckLine) {
System.out.println("AV: " + getAbsoluteValue(current,10) );
current = successor(current);
}
}
COM: <s> debugging function to print the absolute values for the entire tree </s>
|
funcom_train/18656350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void calcStatistics() {
boolean isFirstElement = true;
Enumeration keys = data.keys();
while (keys.hasMoreElements()) {
Long key = (Long) (keys.nextElement());
long lkey = key.longValue();
Long val = (Long) (data.get(key));
long lval = val.longValue();
if (isFirstElement || keymin > lkey)
keymin = lkey;
if (isFirstElement || keymax < lkey)
keymax = lkey;
if (isFirstElement || valmin > lval)
valmin = lval;
if (isFirstElement || valmax < lval)
valmax = lval;
isFirstElement = false;
}
}
COM: <s> recalcule the values keymin keymax valmin valmax needed prior to draw </s>
|
funcom_train/50535338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProtocolStack addProtocol(Protocol prot) {
if(prot == null)
return this;
prot.setUpProtocol(this);
if(bottom_prot == null) {
top_prot=bottom_prot=prot;
return this;
}
prot.setDownProtocol(top_prot);
prot.getDownProtocol().setUpProtocol(prot);
top_prot=prot;
return this;
}
COM: <s> adds a protocol at the tail of the protocol list </s>
|
funcom_train/46511104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void markRows (String [] Data, ColorRenderer colorRenderer) {
int i = 0;
while (Data [i] != null) {
if (Data[i].charAt(0) == '1')
colorRenderer.setRowColor(i, new Color(247, 191, 192));
else
colorRenderer.setRowColor(i, null);
i++;
}
}
COM: <s> marks a row if the corresponding appointment is </s>
|
funcom_train/49791659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assertNotEquals(String a, String b) {
if (a == null) {
assertFalse("'" + a + "' should not equal '" + b + "'", b == null);
} else {
assertFalse("'" + a + "' should not equal '" + b + "'", a.equals(b));
}
}
COM: <s> assert that the given elements are not equal i </s>
|
funcom_train/4125791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setType(TileType t) {
if (t == null) {
throw new IllegalArgumentException("Tile type must not be null");
}
type = t;
if (tileItemContainer != null) {
tileItemContainer.removeIncompatibleImprovements();
}
if (!isLand()) {
settlement = null;
}
updatePlayerExploredTiles();
}
COM: <s> sets the type for this tile </s>
|
funcom_train/40312034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetCatalogName_InvalidColumn1() {
try
{
ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry);
resMetaData.getCatalogName(-1);
fail("SQLException is expected.");
}
catch(SQLException e)
{
//ensure the SQLException is thrown by getCatalogName method.
assertEquals("The sqlstate mismatches", "22003", e.getSQLState());
}
}
COM: <s> tests get catalog name with negative column index </s>
|
funcom_train/37508090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSplitPane getSplitVertical() {
if (m_splitVertical == null) {
m_splitVertical = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
m_splitVertical.setOneTouchExpandable(true);
m_splitVertical.setTopComponent(getSplitHorizontal());
m_splitVertical.setBottomComponent(new JPanel());
}
return m_splitVertical;
}
COM: <s> returns the vertical split pane </s>
|
funcom_train/16452452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getChildrenPanel() {
if (childrenPanel == null) {
jLabel2 = new JLabel();
jLabel2.setText("Children");
childrenPanel = new JPanel();
childrenPanel.setLayout(new FlowLayout());
childrenPanel.add(jLabel2, null);
childrenPanel.add(getJScrollPane3(), null);
childrenPanel.setMinimumSize(new Dimension(475, 285));
}
return childrenPanel;
}
COM: <s> gets the children panel </s>
|
funcom_train/44596531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyAllModifiers(List dest, ModifierSet source) {
Iterator<org.jmlspecs.eclipse.jmldom.IExtendedModifier> i = source.iterator();
while (i.hasNext()) {
IExtendedModifier mex = i.next();
insertInList((List<ASTNode>)dest,(ASTNode)mex);
}
}
COM: <s> copies modifiers and annotations from source to dest all </s>
|
funcom_train/2676212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPath(String path) {
Resource rootFile = resources.getResource(path);
try {
rootDir = rootFile.getFile().getAbsolutePath();
this.path = path;
} catch (IOException err) {
log.error("I/O exception thrown when setting file path to " + path);
throw (new RuntimeException(err));
}
}
COM: <s> setter for file path </s>
|
funcom_train/50926090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void adjustBondOrdersToValency() {
molecule.setBondOrders(CMLBond.SINGLE);
PiSystemControls piSystemManager = new PiSystemControls();
piSystemManager.setUpdateBonds(true);
// piSystemManager.setKnownUnpaired(knownUnpaired);
piSystemManager.setDistributeCharge(true);
this.adjustBondOrdersToValency(piSystemManager);
}
COM: <s> adjust bond orders to satisfy valence </s>
|
funcom_train/18393049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void simpleDelete(String path) {
try {
fetchResponse(issueDeleteToSlave(path), 300000);
} catch (RemoteIOException e) {
if (e.getCause() instanceof FileNotFoundException) {
return;
}
setOffline("IOException deleting file, check logs for specific error");
addQueueDelete(path);
logger
.error(
"IOException deleting file, file will be deleted when slave comes online",
e);
} catch (SlaveUnavailableException e) {
// Already offline and we ARE successful in deleting the file
addQueueDelete(path);
}
}
COM: <s> deletes files directories and waits for the response </s>
|
funcom_train/29655727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() throws InvalidConfigFileException {
run(Integer.parseInt(PublicConfig.getInstance().getConfigFilePropertyManager().readProperty("graphical")) == 0, PublicConfig.getInstance().getConfigFilePropertyManager().readProperty("configFile"));
}
COM: <s> runs the application after initialization </s>
|
funcom_train/3464602 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeProject(OutputStream out, String dir) {
try {
out.write((new String("<special name=\"" +getName()+ "\" file=\"" +getFile()+ "\">\n")).getBytes());
} catch(Exception e) {
cdt.ErrorD.ErrorDlg.ErrorMsg("Error writing project -> " +dir+getFile());
}
}
COM: <s> writes the project data to an output stream </s>
|
funcom_train/49635717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processNextLine() throws IOException {
String line = source.readLine();
if (line == null) {
// TODO: Should we call close in the stream here?
eofReached = true;
finishRecord();
appendToBuffer(FOOTER);
bufferPos = 0;
return;
}
if ("".equals(line)) {
return;
}
processLineContent(line);
}
COM: <s> reads a line from the input stream and adds the corresponding output </s>
|
funcom_train/42237529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PushSourceStream getControlInputStream() {
if (ctrlInStrm == null) {
ctrlInStrm = new SimpleSocketInputStream(ctrlSock);
ctrlInStrm.setName("SimpleSocketInputStream [ctrl], port " + (port + 1));
ctrlInStrm.start();
}
return ctrlInStrm;
}
COM: <s> returns an input stream to receive the rtcp data </s>
|
funcom_train/37828284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeUser(User u) {
/*
* Requires: A valid user id
* Effects: Socket vector list no longer contains user removed
* Modifies: The User vector list
* Raises: Nothing
*/
userList.removeElement(u);
if (userList.size() == 0) {
whiteBoardList.clear();
chatMessages.clear();
}
// then close socket of the user removed
}
COM: <s> removes the user from the session </s>
|
funcom_train/13409660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void render(GC gc) {
if (awtImage == null)
return;
org.eclipse.swt.graphics.Rectangle clip = gc.getClipping();
transferPixels(clip.x, clip.y, clip.width, clip.height);
gc.drawImage(swtImage, clip.x, clip.y, clip.width, clip.height, clip.x,
clip.y, clip.width, clip.height);
}
COM: <s> complete the rendering by flushing the 2 d renderer on a swt graphical </s>
|
funcom_train/42537079 | /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 NameCons))return false;
if(o == this)return true;
NameCons oo = (NameCons)o;
return (((Object)first).equals(oo.first))&&(((Object)rest).equals(oo.rest));
}
COM: <s> is the given object equal to this name cons </s>
|
funcom_train/28992761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processNameFile(PortalMediator pm, ContentMediator cm, Map m) {
boolean b;
String message = (String)m.get(CPK_MESSAGE);
if(message.equals(FILE_DOES_NOT_EXIST)){
m.remove("filename");
b = true;
}
else{
m.remove(CPK_MESSAGE);
b = processName(pm, cm, m);
b = processFile(pm, cm, m, b);
}
// Invalid filename or description, need to stay on this screen
if (b) {
m.remove(CPK_ACTION);
}
}
COM: <s> calls both process name and process file </s>
|
funcom_train/12273102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UserAccount getUserAccount(String userName) {
// Get the user account list from the configuration
UserAccountList userList = m_securityConfig.getUserAccounts();
if ( userList == null || userList.numberOfUsers() == 0)
return null;
// Search for the required user account record
return userList.findUser(userName);
}
COM: <s> return the specified user account details </s>
|
funcom_train/51099620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void entityChanged(EntityEvent e) {
if (e.isNameChange()) {
Object[] path = new Object[] {
mediator.getCurrentDataDomain(), mediator.getCurrentDataMap(),
e.getEntity()
};
updateNode(path);
positionNode(path, Comparators.getDataMapChildrenComparator());
showNode(path);
}
}
COM: <s> makes entity visible and selected </s>
|
funcom_train/27859405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRectangle(Rectangle rect) {
if (this.rects == null) {
this.rects = new Rectangle[1];
this.rects[0] = rect;
} else {
Rectangle[] tmp = new Rectangle[this.rects.length + 1];
System.arraycopy(this.rects, 0, tmp, 0, this.rects.length);
tmp[tmp.length - 1] = rect;
this.rects = tmp;
}
}
COM: <s> add a new rectangle to the rects list </s>
|
funcom_train/3417023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object anObject) {
if (this == anObject) {
return true;
}
if (anObject instanceof String) {
String anotherString = (String)anObject;
int n = count;
if (n == anotherString.count) {
char v1[] = value;
char v2[] = anotherString.value;
int i = offset;
int j = anotherString.offset;
while (n-- != 0) {
if (v1[i++] != v2[j++])
return false;
}
return true;
}
}
return false;
}
COM: <s> compares this string to the specified object </s>
|
funcom_train/36680223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Animation getCityAnim(City city, Color color) {
return city.canBeCaptured() ?
animLib.getCityAnim(city.getImgRowID(), color, "") :
animLib.getCityAnim(city.getImgRowID() + AnimLib.NEUTRAL_CITY_OFFSET, color, "");
}
COM: <s> get a city animation </s>
|
funcom_train/19972063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void debugPlayAlerts() {
for (ChangeRate r : ChangeRate.values()) {
if (r.getSound() != null)
soundService.playSound(r.getSound(), null);
}
for (PressState r : PressState.values()) {
if (r.getSound() != null)
soundService.playSound(r.getSound(), null);
}
}
COM: <s> play all the alerts for testing </s>
|
funcom_train/8231849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand6() {
if (okCommand6 == null) {//GEN-END:|77-getter|0|77-preInit
// write pre-init user code here
okCommand6 = new Command("Buscar", Command.BACK, 0);//GEN-LINE:|77-getter|1|77-postInit
// write post-init user code here
}//GEN-BEGIN:|77-getter|2|
return okCommand6;
}
COM: <s> returns an initiliazed instance of ok command6 component </s>
|
funcom_train/5395388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWriteTypeInfo() {
System.out.println("writeTypeInfo");
SimpleType type = null;
DataOutputStream dos = null;
TableManager instance = new TableManager();
instance.writeTypeInfo(type, dos);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of write type info method of class org </s>
|
funcom_train/39256234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BaseObjectCollection filterVersions(BaseObjectCollection aVersions, User aUser) throws Exception {
BaseObjectCollection versions = new BaseObjectCollection();
for(int i=0;i<aVersions.getCount();i++) {
Version oVersion = (Version)aVersions.getItem(i);
if(aUser.hasPermissionsOnSystem(oVersion.systemid))
versions.Add(oVersion);
}
return versions;
}
COM: <s> this filters versions based on parent system permissions </s>
|
funcom_train/28344095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPosition(double dblPos, double dblLen) {
this.getMagBody().setPosition(dblPos);
this.getFaceEntr().setPosition(dblPos - dblLen/2.0);
this.getFaceExit().setPosition(dblPos + dblLen/2.0);
}
COM: <s> p set the position of the magnet along the design path within the </s>
|
funcom_train/7284487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDatabase(Transaction txn, final Database database) {
if (txn != null) {
txn.addTxn(this, new Txn() {
public void commit(Transaction txn) {
addDatabaseP(txn, database);
}
});
txn.attach(database);
} else {
addDatabaseP(txn, database);
}
}
COM: <s> adds database to this library b note b only one database per library </s>
|
funcom_train/34733531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createPredefinedContentTypes() {
logger.debug("Creating predefined CV content types");
for (CVContentType contentType : CONTENT_TYPES) {
if (cvDAO.findCVContentTypeByName(contentType.getName()) == null) {
logger.debug("Created predefined CV content type: " + contentType.getName());
cvDAO.insertCVContentType(contentType);
}
}
}
COM: <s> create predefined cv content types in persistent store if they do not </s>
|
funcom_train/25121958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeModelInTDB(String source) throws InfException {
if (modelo == null) {
throw new InfException ("No connection to model. Call connect() method first");
}
try {
// now load the source document, which will also load any imports
modelo.read(source);
modelo.close() ;
} catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> deletes the information stored in the database and reloads the ontology </s>
|
funcom_train/2859175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int postings(String hitlist, Object userData) {
if (hitlist != null && hitlist.length() > 0)
{
String hitlistName = getName() + hitlist;
LockResult r =
((DbLockUserData)userData).getResults(hitlistName);
if (r != null)
return r.postings();
}
return 0;
}
COM: <s> get postings for a specified hitlist </s>
|
funcom_train/1763795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sort(boolean forceResort) {
if (!mSorted || forceResort) {
if (mComparator != null) {
mSorter.sort(mContents, mCount, mComparator);
} else {
DebugLog.d("FixedSizeArray", "No comparator specified for this type, using Arrays.sort().");
Arrays.sort(mContents, 0, mCount);
}
mSorted = true;
}
}
COM: <s> sorts the array </s>
|
funcom_train/22889449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPermissions(String path) {
if( securityManager != null ) {
if( path.startsWith("jndi:") || path.startsWith("jar:jndi:") ) {
permissionList.add(new JndiPermission(path + "*"));
} else {
permissionList.add(new FilePermission(path + "-","read"));
}
}
}
COM: <s> if there is a java security manager create a read file permission </s>
|
funcom_train/2630351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void repaintFrom(final PBounds localBounds, final PNode childOrThis) {
if (parent != null) {
if (childOrThis != this) {
localToParent(localBounds);
}
else if (!getVisible()) {
return;
}
parent.repaintFrom(localBounds, this);
}
}
COM: <s> pass the given repaint request up the tree so that any cameras can </s>
|
funcom_train/11720031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void populateContext(Context ctx) {
Iterator iter = cl.getAllParameters();
while (iter.hasNext()) {
AbstractParameter param = (AbstractParameter) iter.next();
log.debug("add ctx attr: " + param.getContextKey() + "="
+ param.getValue());
ctx.put(param.getContextKey(), param.getValue());
}
}
COM: <s> populate the code context code with the attributes needed by the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.