__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/29041777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createMoveOperation(DiffGroup root, EObject left, EObject right) {
final MoveModelElement operation = DiffFactory.eINSTANCE.createMoveModelElement();
operation.setRightElement(right);
operation.setLeftElement(left);
//operation.setRightTarget(getMatchedEObject(left.eContainer()));
//operation.setLeftTarget(getMatchedEObject(right.eContainer()));
operation.setRightTarget(right.eContainer());
operation.setLeftTarget(left.eContainer());
root.getSubDiffElements().add(operation);
}
COM: <s> this will create the </s>
|
funcom_train/2712691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isNavigationRequired() {
AbstractDocument currentFile = this.getContext().getEditorProperties().
getCurrentDocument();
AbstractDocument selectedFile = getSelectedFile();
if (currentFile.getAbsolutePath().equals(selectedFile.getAbsolutePath())) {
return false;
}
return true;
}
COM: <s> indicates whether or not navigation required between list items </s>
|
funcom_train/48630801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTempsRestant() {
System.out.println("getTempsRestant");
Itineraire instance = new Itineraire();
int expResult = 0;
int result = instance.getTempsRestant();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get temps restant method of class itineraire </s>
|
funcom_train/18007756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write( RtfWriter writer, OutputStream out ) throws IOException {
writer.writeInitialFontSignature( out, this );
out.write(content.toString().getBytes());
writer.writeFinishingFontSignature( out, this );
super.write(writer, out);
}
COM: <s> write this rtf field into a stream using the writer given as </s>
|
funcom_train/47023966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void importRtfDocument(Reader documentSource) throws IOException, DocumentException {
if(!this.open) {
throw new DocumentException("The document must be open to import RTF documents.");
}
RtfParser rtfImport = new RtfParser();
rtfImport.importRtfDocument(documentSource, this.rtfDoc);
}
COM: <s> adds the complete rtf document to the current rtf document being generated </s>
|
funcom_train/48894813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String store() {
if (this instanceof MP3File) {
try {
return "F"+((MP3File)this).getFile().getCanonicalPath();
} catch (IOException ioe) { }
} else if (this instanceof MP3Stream) {
return "S"+((MP3Stream)this).getURL().toExternalForm();
} else
throw new RuntimeException("Unknown subclass:"+this.getClass());
return null;
}
COM: <s> returns a string representation of this mp3 object </s>
|
funcom_train/5431538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Mirror blankproject() {
Mirror ret = new Mirror();
ret.setName("Project Title (e.g. 6\" f/8)");
ret.setDiameter(152);
ret.setRroc(1219);
Description d = new Description();
d.setContent("Describe your project in more detail here.");
ret.setDescription(d);
return ret;
}
COM: <s> returns a schema root to hold onto when no files are open </s>
|
funcom_train/50925810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDisorderMetadata(boolean processed) {
if (processed) {
disorderProcessed = true;
} else {
disorderProcessed = false;
}
List<CMLAtom> disorderedAtoms = DisorderAssembly.getDisorderedAtoms(molecule);
for (CMLAtom atom : disorderedAtoms) {
CMLScalar scalar = new CMLScalar();
atom.appendChild(scalar);
if (!processed) {
scalar.setDictRef(UNRESOLVED_DISORDER_DICTREF);
} else if (processed) {
scalar.setDictRef(RESOLVED_DISORDER_DICTREF);
}
}
}
COM: <s> adds metadata to molecule stating whether or not the disorder </s>
|
funcom_train/27899865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String get1Value(ServletContext app, String request) {
ConnPool pool = ROPool.getPool(app);
Connection conn;
try {
conn = pool.getInstance();
} catch (Exception ex) { return null; }
try {
return get1Value(conn, request);
} finally { pool.returnInstance(conn); }
}
COM: <s> get one field from a database query </s>
|
funcom_train/18104453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doPrefetch() throws MediaException {
if (ad <= 0) {
ad = toneInit(pID);
if (ad <= 0)
throw new MediaException("prefetch failed");
if (getLevel() == -1) {
setLevel(100);
} else {
toneCommon(ad, 7, getLevel());
}
if (isMuted()) {
toneCommon(ad, 7, 0); // SET_VOLUME
}
}
}
COM: <s> the worker method to prefetch the player </s>
|
funcom_train/50304399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CmsTask createTask(int projectid, String agentName, String roleName, String taskname, String taskcomment, int tasktype, long timeout, int priority) throws CmsException {
return m_rb.createTask(m_context.currentUser(), projectid, agentName, roleName, taskname, taskcomment, tasktype, timeout, priority);
}
COM: <s> creates a new task </s>
|
funcom_train/20678684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void storeGlobalsToCookie() {
StringBuffer sb = new StringBuffer();
appendValue(sb, BUILTIN_VAR_HIT_COUNT,
getClientValue(BUILTIN_VAR_HIT_COUNT));
appendValue(sb, BUILTIN_VAR_LAST_VISIT, new SmithDateTime());
appendValue(sb, BUILTIN_VAR_TIME_CREATED,
getClientValue(BUILTIN_VAR_TIME_CREATED));
addPermanentCookieToResponse(COOKIE_CFGLOBALS, SmithString
.URLEncodedFormat(sb.toString(),
ApplicationServices.BYTE_CHARSET));
}
COM: <s> packs global variables and stores them to http response cookie </s>
|
funcom_train/13749994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
Event event = null;
while (((event = _EVENT_QUEUE.next()) != null) && _RUNNING) {
for (int i = 0; i < _LISTENER_QUEUE.size(); i++) {
ListenerWrapper wrapper =
(ListenerWrapper) _LISTENER_QUEUE.elementAt(i);
if ((wrapper.GENERATOR == null)
|| (wrapper.GENERATOR == event.getGenerator())) {
wrapper.LISTENER.receiveEvent(event);
}
}
}
}
COM: <s> main processing method for the event multicaster object </s>
|
funcom_train/49333352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addItemView(View itemView, int childIndex) {
final ViewGroup currentParent = (ViewGroup) itemView.getParent();
if (currentParent != null) {
currentParent.removeView(itemView);
}
((ViewGroup) mMenuView).addView(itemView, childIndex);
}
COM: <s> add an item view at the given index </s>
|
funcom_train/35249922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasMethod(Class<?> example) {
if(example.getDeclaredMethods().length != 1) {
throw new IllegalArgumentException("example must declare exactly one method");
}
Method sample = example.getDeclaredMethods()[0]; // there's only one
for(Method maybe : target.getDeclaredMethods()) {
if(match(maybe,sample)) return true;
}
return false;
}
COM: <s> checks that the target class has a method with the same signature as </s>
|
funcom_train/8527946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addLargePrintDefaultValues(StyleManager sManager) {
//assures to get several mandatory properties in the styles
Style defaultPara = sManager.getStyle("default_paragraph");//css for default paragraph
if(defaultPara!=null){
defaultPara.setProperty("line-heigh", "100%");
defaultPara.setProperty("text-align", "justify");
}
}
COM: <s> adds the large print default values </s>
|
funcom_train/46654611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showResultAndExplanationNoAnswered(Question question) {
// Options are also disabled
disableOptions();
// Label that will show if user was right answering
Label resultLabel = new Label();
resultPanel.add(resultLabel);
addExplanationPopup(question);
// When the answer is wrong, the text style is red
resultLabel.setText(Global.constantsTest.questionNotAnswered());
DOM.setStyleAttribute(resultLabel.getElement(), "color", "orange");
}
COM: <s> show result and explanation no answered </s>
|
funcom_train/330590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadDataQueueItem(DataLoadQueData dataLoadQueData) {
if (dataLoadQueData.getDataStart() <= 0 || dataLoadQueData.getDataStart() == Long.MAX_VALUE) {
return;
}
dataLoadQueData.getPamDataBlock().loadViewerData(dataLoadQueData.getDataStart(),
dataLoadQueData.getDataEnd());
}
COM: <s> load the data from a single object in the queue </s>
|
funcom_train/15884769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
switch (type) {
case ROUTE_ADDED:
return "Add route " + route + " for " + destination;
case ROUTE_REMOVED:
return "Remove route " + route + " for " + destination;
case PROXY_ADDED:
return "Add proxy " + route + " for " + nodes;
case PROXY_REMOVED:
return "Remove proxy " + route + " for " + nodes;
}
return super.toString();
}
COM: <s> return a string representation of this route event </s>
|
funcom_train/11111623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MimeType getMimeType(String name) {
MimeType type = patterns.matches(name);
if (type != null) {
return type;
}
type = patterns.matches(name.toLowerCase(Locale.ENGLISH));
if (type != null) {
return type;
} else {
return rootMimeType;
}
}
COM: <s> find the mime content type of a document from its name </s>
|
funcom_train/50579909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateEmail(String email) throws InterceptorException {
email = email.toLowerCase();
if (email.endsWith("@yahoo.com") ||
email.endsWith("@hotmail.com") ||
email.endsWith("@aol.com") ) {
throw new InterceptorException("Cannot accept email that is in public domain. Your email = " + email);
}
}
COM: <s> in this sample interceptor it check that emails in public </s>
|
funcom_train/44713080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "Connection[" + ((m_conn==null)?"null":(Integer.toString(m_conn.hashCode()))) +
", pool " + m_pool + ", needsAutoCommitOff " +
m_needsAutoCommitOff + "]";
}
COM: <s> a debugging tostring includes some information about the underlying </s>
|
funcom_train/3361326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isConversionSupported(AudioFormat targetFormat, AudioFormat sourceFormat){
AudioFormat targetFormats[] = getTargetFormats( targetFormat.getEncoding(), sourceFormat );
for(int i=0; i<targetFormats.length; i++) {
if( targetFormat.matches( targetFormats[i] ) ) {
return true;
}
}
return false;
}
COM: <s> indicates whether the format converter supports conversion to one </s>
|
funcom_train/45770484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(OutputStream output) throws IOException {
try {
Debug.log(Debug.TRACE,"Writing out " + definition);
rgce = fh.convertCalcToPXL(definition);
cce = EndianConverter.writeShort((short) rgce.length);
} catch(Exception e) {
Debug.log(Debug.TRACE,"Error in Parsing Name Definition");
cce = EndianConverter.writeShort((short) 0);
}
output.write(getBiffType());
output.write(grbit);
output.write(cch);
output.write(cce);
output.write(ixals);
output.write(rgch);
if(rgce.length!=0)
output.write(rgce);
Debug.log(Debug.TRACE,"Writing DefinedName record");
}
COM: <s> write this particular code biffrecord code to the code output stream code </s>
|
funcom_train/40909648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContentType(String type) {
super.setContentType(type);
if (type != null) {
HttpContentType httpContentType = new HttpContentType(type);
if (shouldParsePage(httpContentType.getType())) {
activateSiteMesh(httpContentType.getType(), httpContentType.getEncoding());
} else {
deactivateSiteMesh();
}
}
}
COM: <s> set the content type of the request and store it so it can </s>
|
funcom_train/10985958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected HtmlForm form(String id) throws Exception {
Iterator forms = page.getAllForms().iterator();
while (forms.hasNext()) {
HtmlForm form = (HtmlForm) forms.next();
if (id.equals(form.getAttributeValue("id"))) {
return (form);
}
}
return (null);
}
COM: <s> p return the form with the specified code id code from the most </s>
|
funcom_train/7722483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addIterator(Iterator iterator) {
while(iterator.hasNext()) {
Object obj = iterator.next();
String classname = obj.getClass().getName();
Object list = map.get(classname);
if(list == null) {
list = new ArrayList();
map.put(classname, list);
}
((List)list).add(obj);
}
}
COM: <s> add this enumeration to the grouper </s>
|
funcom_train/37721245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void executeAlter() {
try {
StringTokenizer st = new StringTokenizer(table.getAlterStatements(), ";");
while (st.hasMoreTokens())
getUpdate().executeUpdate(st.nextToken());
} catch (DBProphetException e) {
Util.alert(this, e);
}
}
COM: <s> execute all alter statements that were made on the table </s>
|
funcom_train/42856870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finishClusters(List<Cluster> clusters) {
// Call finish on all of the clusters....
List<Future<ClusterFinish>> finishList = new ArrayList<Future<ClusterFinish>>();
for (Cluster c : clusters)
finishList.add(_execute.submit(new ClusterFinish(c)));
for (Future<ClusterFinish> future : finishList) {
try {
ClusterFinish finish = future.get();
} catch (Exception e) {
e.printStackTrace();
}
}
}
COM: <s> iterate over all of the clusters and call finish on them so </s>
|
funcom_train/4533415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hangupAll() {
if (interlocutors.size() < 1) {
Log.debug("hangup", "No interlocutors");
return false;
}
Interlocutor inter;
for (int i = 0; i < interlocutors.size(); i++) {
inter = (Interlocutor) interlocutors.get(i);
for (UserActionListener ual : actionHandlers) {
ual.handleHangupRequest(inter);
}
}
return true;
}
COM: <s> hangup the current call </s>
|
funcom_train/3351388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readPortStatus(int port, PortStatus data) throws USBException {
testPort(port);
final USBControlPipe pipe = dev.getDefaultControlPipe();
final USBRequest req =
pipe.createRequest(new SetupPacket(USB_DIR_IN | USB_RT_PORT, USB_REQ_GET_STATUS, 0, port + 1, 4), data);
pipe.syncSubmit(req, GET_TIMEOUT);
}
COM: <s> read the status of a given port into the given structure </s>
|
funcom_train/50072698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasIndex() {
boolean returnBool = true;
File indexFolder = new File(fEnv.getIndexDirectory());
if (! indexFolder.exists()) {
returnBool = false;
}
else if (env.isGUIMode()) {
setStatus(idxFldr + " " + fEnv.getIndexDirectory() + " " + I18n.getString("lower_exists"));
}
return returnBool;
}
COM: <s> checks to see that a doc searcher index has its lucene index folder </s>
|
funcom_train/14009152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone(Object array) {
if (!this.isArray(array)) {
return null;
}
Class type = array.getClass().getComponentType();
int length = Array.getLength(array);
Object clone = Array.newInstance(type, length);
System.arraycopy(array, 0, clone, 0, length);
return clone;
}
COM: <s> gets the clone of an array </s>
|
funcom_train/18365824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDataView(JPanel p){
setupViewPanel.removeAll();
setupViewPanel.add(p,
new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,
GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
setupViewPanel.repaint();
this.updateUI();
}
COM: <s> this function removes this existing panel and adds a new panel to the </s>
|
funcom_train/2968227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ITimeInterval cloneTIWithNewRoom(ITimeInterval oldTI, IRoom newRoom) {
assert newRoom != null;
ITimeInterval newTI = db.cloneTI(oldTI);
//in cloneTI I called: newTI.setRoom(old.getRoom(), false); so overwrite this:
newTI.setRoom(newRoom, false);
return newTI;
}
COM: <s> this method changes the iroom of the specified old ti and clones it </s>
|
funcom_train/2440364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String store(String s) {
if (StringUtils.isEmpty(s)) {
return s;
}
Integer index = stringToIndex.get(s);
if (index == null) {
index = Integer.valueOf(++counter);
stringToIndex.put(s, index);
indexToString.put(index, s);
}
return index.toString();
}
COM: <s> stores a code string code in this map </s>
|
funcom_train/3330372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finish() {
if (foundFacets) {
SimpleType baseType = _content.createSimpleType();
ContentType contentType = ContentType.valueOf("simpleType");
contentType.setSimpleType(baseType);
_complexType.setContentType(contentType);
baseType = null;
contentType = null;
}
//the restriction was properly handle
//we can set the flag
_complexType.setRestriction(true);
}
COM: <s> terminates the process of this restriction by </s>
|
funcom_train/16326979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean parseHeapSizes(String line) {
Matcher matcher = javaHeapSizePattern.matcher(line);
boolean found = false;
if (found = matcher.find()) {
matcher = numberPattern.matcher(line);
if (matcher.find()) {
initialHeapSize = new Integer(matcher.group()) / 1024;
}
if (matcher.find()) {
maxHeapSize = new Integer(matcher.group()) / 1024;
}
}
return found;
}
COM: <s> parse initial and maximum heap size from the line in </s>
|
funcom_train/44838041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Assistant getAssistant() {
// Lazy load...
try {
if (assistant != null) {
return assistant;
} else {
AssistantHome assistantHome = (AssistantHome) HomeInterfaceFactory.create(
AssistantHome.class,
AssistantHome.COMP_NAME);
assistant = assistantHome.findByPrimaryKey(
new AssistantPK(assistantPK));
return assistant;
}
} catch (Exception ex) {
throw new EJBException("Invalid assistant");
}
}
COM: <s> gets the assistant </s>
|
funcom_train/16177599 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initParamFileOptions() {
if (parameterFilePanel == null) {
parameterFilePanel = new RepastParamPanel(this.model);
this.toolBar.add(parameterFilePanel, 3);
int originalWidth = this.tbFrame.getWidth();
tbFrame.pack();
tbFrame.setLocation(tbFrame.getX()
- (tbFrame.getWidth() - originalWidth), tbFrame.getY());
}
}
COM: <s> loads up the parameter file chooser panel </s>
|
funcom_train/30216219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String initial(String string) {
StringBuffer retValue = new StringBuffer(10);
char[] name = string.toCharArray();
for (char aChar : name) {
if (Character.isUpperCase(aChar)) {
retValue.append(Character.toLowerCase(aChar));
}
}
return retValue.toString();
}
COM: <s> extract the initial by detecting camel case notation </s>
|
funcom_train/9059149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BooleanWrapper rename(String oldNickname, String newNickname) {
if (this.clients.get(newNickname) != null) {
return new BooleanWrapper(false);
}
this.clients.put(newNickname, this.clients.get(oldNickname));
this.clients.remove(oldNickname);
this.sendInformationToAll(new InformationMessage(oldNickname,
new String(oldNickname + " is now known as ") + newNickname,
InformationType.PLAYER_RENAMED, newNickname));
return new BooleanWrapper(true);
}
COM: <s> renames the nickname of a specific client and broadcast a notification to </s>
|
funcom_train/2488570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setData(List<TableCell> data) {
this.data = data;
HashMap<String, Integer> newDataIndex = new HashMap<String, Integer>();
for (int i=0; i < this.data.size(); i++){
newDataIndex.put(((TableCell)this.data.get(i)).getMetadata().getName(), new Integer(i));
}
this.setDataIndex(newDataIndex);
}
COM: <s> sets the data </s>
|
funcom_train/51341575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
globalLRU.lock.lock();
try {
final Iterator<Entry<K, V>> itr = map
.values().iterator();
while (itr.hasNext()) {
final Entry<K, V> e = itr.next();
// remove entry from the map.
itr.remove();
// unlink entry from the LRU.
globalLRU.removeEntry(e);
}
counters.clear();
} finally {
globalLRU.lock.unlock();
}
}
COM: <s> discards each entry in this cache and resets the statistics for this </s>
|
funcom_train/43567491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocbookElement getModuleDescriptionMain() {
DocbookAnnotationElement anno = this.getDocbookAnnotationChild();
if(anno!=null) {
Nodes matches = anno.query("db:para[contains(@role,'desc-main')]", Constants.namespaces);
if(matches.size()==1) {
return (DocbookElement) matches.get(0);
}
throw new IllegalStateException(Integer.toString(matches.size()));
}
return null;
}
COM: <s> get the main description para of this module </s>
|
funcom_train/15713630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isOverriddenBy(final TypeFaceImpl typeFace) {
return (fontFamily == null || typeFace.getFontFamily() != null)
&& (fontSeries == null || typeFace.getFontSeries() != null)
&& (fontShape == null || typeFace.getFontShape() != null)
&& (fontSize == null || typeFace.getFontSize() != null);
}
COM: <s> a typeface is considered being overridden by another typeface if nothing </s>
|
funcom_train/13363592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean booleanValue(String val) {
if (val == null) {
return false;
}
if (val.equalsIgnoreCase("on")) {
return true;
}
if (val.equalsIgnoreCase("checked")) {
return true;
}
if (val.equalsIgnoreCase("true")) {
return true;
}
return false;
}
COM: <s> converts various types of boolean strings to boolean </s>
|
funcom_train/19865054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
FooClient fc = new FooClient();
final Button sendButton = fc.getSendButton();
final TextBox nameField = fc.getNameField();
// Add the nameField and sendButton to the RootPanel
// Use RootPanel.get() to get the entire body element
RootPanel.get("nameFieldContainer").add(nameField);
RootPanel.get("sendButtonContainer").add(sendButton);
}
COM: <s> this is the entry point method </s>
|
funcom_train/32755685 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void snapshotSelected( BrowserController controller, MachineSnapshot snapshot ) {
if ( snapshot != null ) {
commentTextView.setText( snapshot.getComment() );
String title = "Selected Snapshot has " + snapshot.getChannelCount() + " channels logged";
titleLabel.setText( title );
}
else {
commentTextView.setText( "" );
valueTableModel.setChannelSnapshot( null );
}
}
COM: <s> event indicating that a snapshot has been selected </s>
|
funcom_train/40335336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newTraffic(Traffic traffic) {
//TRAFFIC_MANAGER.newTraffic(traffic);
if (sending) {
printError("manager busy");
printError("Operation:" + Integer.toString(request));
} else {
synchronized (this) {
request = newTraffic;
this.traffic = traffic;
sending = true;
}
}
}
COM: <s> executed on controller machine </s>
|
funcom_train/11688729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeRegistry(String key, Registry registry) {
if (registry != null) {
synchronized (registriesCache) {
try {
log.info("Removing the RMI registry bound to port : " + key);
UnicastRemoteObject.unexportObject(registry, true);
registriesCache.remove(key);
} catch (NoSuchObjectException e) {
String msg = "Error when stopping local registry(RMI)";
handleException(msg, e);
}
}
}
}
COM: <s> helper method to remove a rmi registry instance </s>
|
funcom_train/13502192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Triple getLocalizedTriple(Triple triple) {
try {
return _connector.getElementFactory().createTriple(
getLocalizedResource(triple.getSubject()),
getLocalizedResource(triple.getPredicate()),
getLocalizedObject(triple.getObject()));
} catch (GraphElementFactoryException e) {
throw new RuntimeException("Error localizing triple", e);
}
}
COM: <s> gets a triple appropriate for writing to the store </s>
|
funcom_train/5272386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void send(InetSocketAddress to, String message) {
try {
sendPacket = makePkg(to, message);
datagramSocket.send(sendPacket);
} catch(IllegalArgumentException e) {
DEBUG.error("UDPSocket: send: Cannot send message due to arguments error in makePkg:\n"+e.getMessage());
} catch(IOException e) {
DEBUG.error("UDPSocket: send: Cannot send message due to IOException:\n"+e.getMessage());
}
}
COM: <s> method used to send message to a global channel </s>
|
funcom_train/2539454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean writeXmlFile(Document doc, File file) {
try {
FileOutputStream fileOut = new FileOutputStream(file);
OutputFormat format = new OutputFormat(doc);
format.setLineWidth(900);
format.setIndenting(true);
format.setIndent(6);
format.setOmitComments(false);
XMLSerializer serializer = new XMLSerializer(fileOut, format);
serializer.serialize(doc);
fileOut.close();
System.out.println("Wrote the content of the document into the file: " + file);
} catch (IOException e) {
e.printStackTrace();
return false;
}
return true;
}
COM: <s> this method writes a dom document to a file </s>
|
funcom_train/6514747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String performService(String registryValue, WebMacro wm, Context context) throws Exception {
if (! registryValue.startsWith(packageName) )
registryValue = packageName + registryValue;
ManagementService s = (ManagementService) services.get(registryValue);
if (s != null) {
s.setWebMacro(wm);
return s.performService(context);
}
else {
return "No service associated with " + registryValue;
}
}
COM: <s> perform a management action </s>
|
funcom_train/49350255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPopupMenu getTreePopupMenuGenes() {
if (treePopupMenuGenes == null) {
treePopupMenuGenes = new JPopupMenu();
treePopupMenuGenes.add(newHighlightMenuItem());
treePopupMenuGenes.add(newHideOthersMenuItem());
treePopupMenuGenes.add(new JSeparator());
treePopupMenuGenes.add(newExtractMenuItem());
}
return treePopupMenuGenes;
}
COM: <s> this method initializes tree popup menu </s>
|
funcom_train/25519943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchWindow window = HandlerUtil
.getActiveWorkbenchWindowChecked(event);
try {
LocalDevice localDevice = LocalDevice.getLocalDevice();
discoveryAgent = localDevice.getDiscoveryAgent();
discoveryAgent.startInquiry(DiscoveryAgent.GIAC, new MyListener());
} catch (BluetoothStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
MessageDialog.openInformation(window.getShell(), "Cachecow", "gg");
return null;
}
COM: <s> the command has been executed so extract extract the needed information </s>
|
funcom_train/37109624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int arraySearch(String needle, String[][] haystack) throws Exception {
for(int a = 0; a < haystack.length; a++) {
for(int b = 0; b < haystack[a].length; b++) {
if(findInText(needle, haystack[a][b])) {
return a;
}
}
}
return -1;
}
COM: <s> searches for needle in all elements both dimensions of haystack </s>
|
funcom_train/8016683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchTodo(long rowId) throws SQLException {
Cursor mCursor =
database.query(true, DATABASE_TABLE, new String[] {KEY_ROWID,
KEY_SUMMARY, KEY_DESCRIPTION}, KEY_ROWID + "=" + rowId, null,
null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;
}
COM: <s> return a cursor positioned at the note that matches the given row id </s>
|
funcom_train/645786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText(Object element) {
INode node = (INode) element;
String text = node.getLabelText();
// return default if no label is provided
if (text == null) {
text = node.toString();
}
if (node.getLabelDecoration() != null) {
text = text + " [" + node.getLabelDecoration() + "]";
}
return text;
}
COM: <s> return the text to display the inode </s>
|
funcom_train/8415661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UseCaseController getController(String controller) throws Exception {
for (UseCaseController ucc : controllers) {
if (ucc.getAssetId() != null && ucc.getAssetId().toLowerCase().equals(controller.toLowerCase())) {
return ucc;
}
}
throw new Exception("Access denied!");
}
COM: <s> returns a controller object matching the given controller asset id </s>
|
funcom_train/19562581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void formatRegion(IRegion region) {
IFormattingStrategy strategy = getFormattingStrategy(IDocument.DEFAULT_CONTENT_TYPE);
if(strategy != null) {
strategy.formatterStarts(getIndentation(region.getOffset()));
format(strategy,
new TypedPosition(region.getOffset(),
region.getLength(),
IDocument.DEFAULT_CONTENT_TYPE));
strategy.formatterStops();
}
}
COM: <s> formats the given region with the strategy registered for the default </s>
|
funcom_train/40444924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void beforeExecute(Thread t, Runnable r) {
super.beforeExecute(t, r);
// set a lower priority
t.setPriority(Thread.MIN_PRIORITY);
LOGGER.debug("beforeExecute called");
StatusType status = StatusType.Factory.newInstance();
status.addNewProcessStarted().setPercentCompleted(33);
((WPSTask<?>) r).getRequest().getExecuteResponseBuilder().setStatus(status);
}
COM: <s> before executing the request this method is called </s>
|
funcom_train/10655697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAttributeUndoableEdit() {
Element elem = new PlainDocument().getDefaultRootElement();
AttributeSet attrs = new SimpleAttributeSet();
undoEdit = new AttributeUndoableEdit(elem, attrs, true);
assertSame(elem, undoEdit.element);
assertSame(attrs, undoEdit.newAttributes);
assertTrue(undoEdit.isReplacing);
assertSame(SimpleAttributeSet.EMPTY, undoEdit.copy);
}
COM: <s> tests the constructor of the class </s>
|
funcom_train/34564998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean key(final String key, final Cmd cmd) throws QueryException {
consumeWS();
final boolean ok = consume(key) || consume(key.toLowerCase());
if(!ok && cmd != null) help(null, cmd);
consumeWS();
return ok;
}
COM: <s> parses and returns the specified keyword </s>
|
funcom_train/49624709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String visit(ModuleVariableDeclaration $1, String $2, Object $3) {
StringBuilder builder = new StringBuilder();
if( $1.f0.size() > 0 ){
Enumeration e = $1.f0.elements();
while( e.hasMoreElements() ){
builder.append( this.visit( (Modifier)e.nextElement(), $2, $3) );
builder.append(" ");
}
}
builder.append(this.visit($1.f1, $2, $3));
return builder.toString();
}
COM: <s> f0 modifier variable declaration </s>
|
funcom_train/32719630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MessageDigest getDigestObject() {
MessageDigest md;
try {
md = MessageDigest.getInstance(protoName);
}
catch (java.security.NoSuchAlgorithmException e) {
throw new InternalError(protoName + " not supported in this VM.");
}
// not needed the first time: md.reset();
return md;
}
COM: <s> get a fresh message digest object of the algorithm specified in the </s>
|
funcom_train/3411693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String paramString() {
return ((orientation == Adjustable.VERTICAL ? "vertical,"
:"horizontal,")
+ "[0.."+maximum+"]"
+ ",val=" + value
+ ",vis=" + visibleAmount
+ ",unit=" + unitIncrement
+ ",block=" + blockIncrement
+ ",isAdjusting=" + isAdjusting);
}
COM: <s> returns a string representing the state of this scrollbar </s>
|
funcom_train/49460721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkLengthOffset(int extraOffset) throws RetrieveMoreDataException {
if (recordLength < (offset + extraOffset))
throw new RetrieveMoreDataException("The record length ("+recordLength+") is too short, trying to read ("+extraOffset+") more bytes from offset ("+offset+")", extraOffset);
}
COM: <s> throws an exception if extra offset cannot be read from the record </s>
|
funcom_train/38224482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Concept getConcept(String conceptId) throws OntologyException {
if ( conceptId == null )
throw new OntologyException("Cannot return Concept for a null conceptId");
Concept[] concepts = getConcepts();
for ( int i = 0; i<concepts.length; i++ ){
if ( conceptId.equals(concepts[i].getId()) )
return concepts[i];
}
return null;
}
COM: <s> returns concept with given id that is linked to this concept </s>
|
funcom_train/48045282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText(TextStyle textStyle, Locale locale) {
ISOChronology.checkNotNull(textStyle, "TextStyle must not be null");
ISOChronology.checkNotNull(locale, "Locale must not be null");
String text = new SimpleDateTimeTextProvider().getText(this, textStyle, locale);
return text == null ? Long.toString(value) : text;
}
COM: <s> gets the textual representation of this field </s>
|
funcom_train/22811269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionMessages delete(Bookmark bookmark) throws DatabaseException {
QueryHelper queryHelper = new QueryHelper(BookmarkQueries.deleteBookmarkQuery());
queryHelper.addInputInt(bookmark.getObjectTypeId());
queryHelper.addInputInt(bookmark.getObjectId());
queryHelper.addInputInt(bookmark.getId());
return executeProcedure(queryHelper);
}
COM: <s> delete a bookmark </s>
|
funcom_train/14245290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MDependency buildDependency(MModelElement client, MModelElement supplier) {
MDependency dep = createDependency();
dep.addSupplier(supplier);
dep.addClient(client);
if (supplier.getNamespace() != null)
dep.setNamespace(supplier.getNamespace());
else
if (client.getNamespace() != null)
dep.setNamespace(client.getNamespace());
return dep;
}
COM: <s> builds a modelelement dependency between two modelelements </s>
|
funcom_train/45504021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMovieWriter( MovieWriter writer ) {
this.writer = writer;
this.writer.setBitrate( bitrate );
this.writer.setFrameFormat( frameFormat );
this.writer.setFramename( framename );
this.writer.setFramerate( framerate );
this.writer.setHeight( height );
this.writer.setMovieFormat( movieFormat );
this.writer.setPath( path );
this.writer.setWidth( width );
}
COM: <s> sets a new movie writer </s>
|
funcom_train/39260868 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlayer(int position, int player) {
if ((position < 0) || (position > 8)) {return;}
if ((player < G_NULL) || (player > G_COMPUTER)) {return;}
if (isPlayed(position)) {return;}
grid[position] = player;
numPositionsPlayed++;
// notify listeners (View) that the model has changed.
view.sendMessage(SIG_MODEL_UPDATED, null, this);
}
COM: <s> set which player occupies the specified position </s>
|
funcom_train/30192446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JMenuBar createMenubar() {
JMenuBar mb = new JMenuBar();
addNormalMenuBar(mb);
if (pluginManager != null) {
mb.add(pluginManager.getMenu());
}
mb.add(Box.createHorizontalGlue());
addHelpMenuBar(mb);
return mb;
}
COM: <s> create the menubar for the app </s>
|
funcom_train/42068198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCodePagePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ChunkDataListTypeLabeledText_codePage_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ChunkDataListTypeLabeledText_codePage_feature", "_UI_ChunkDataListTypeLabeledText_type"),
WavPackage.Literals.CHUNK_DATA_LIST_TYPE_LABELED_TEXT__CODE_PAGE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the code page feature </s>
|
funcom_train/12924914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefineTextField setFontIdentifier(final int uid) {
if ((uid < 1) || (uid > Coder.USHORT_MAX)) {
throw new IllegalArgumentRangeException(
1, Coder.USHORT_MAX, uid);
}
fontIdentifier = uid;
fontClass = null; //NOPMD
return this;
}
COM: <s> sets the identifier of the font used to display the characters </s>
|
funcom_train/9104600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setResizable(false);
this.vinculos=new Vector<Vinculo>();
this.colorearTexto();
this.setSize(523,6);
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
if(filaAnterior==0)
{
fil=dim.getWidth();
col=dim.getHeight();
fil=(fil-523)/2;
col=(col-altura)/2;
}
else
{
fil=filaAnterior+10;
col=columnaAnterior+10;
}
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
this.setLocation((int)fil, (int)col);
this.setContentPane(getJScrollPane());
this.getJTextPane().setEditable(false);
this.setVisible(true);
this.redimensionar();
this.addKeyListener(this);
}
COM: <s> this method initializes this </s>
|
funcom_train/5232329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAllElements(int index, Collection<VisualPageListItem> c){
if(c!=null && index>=0 && index<=data.size()){
int i = index;
for(VisualPageListItem element : c){
data.add(i, element);
i++;
}
fireIntervalAdded(this, index, i-1);
}
}
COM: <s> add elements in c at the given index </s>
|
funcom_train/19913454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void prepareTagData(AudioFile audioFile) {
if (renameConfig.isExtendTrackNumbers()) {
String firstTrack = audioFile.getTag().getFirstTrack();
try {
if (firstTrack != null) {
int number = Integer.parseInt(firstTrack);
if (decFormatter == null) {
decFormatter = new DecimalFormat("00");
}
audioFile.getTag().setTrack(decFormatter.format(number));
}
} catch (NumberFormatException nfe) {
// Nothing to do
}
}
}
COM: <s> this method prepares the tag from the given file according to the </s>
|
funcom_train/23868016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean oneLetterOptions(final List<Method> optionMethods) {
assert optionMethods != null : "Null optionMethods is not allowed!";
for (final Method method : optionMethods) {
final Option option = method.getAnnotation(Option.class);
if (option.name().length() != 1) {
return false;
}
}
return true;
}
COM: <s> determines if all allowable options consist of a single letter </s>
|
funcom_train/8607030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addDamage(Creature creature, int damage) {
if (creature == null ||
!owner.isEnemy(creature))
return;
AggroInfo ai = getAggroInfo(creature);
ai.addDamage(damage);
/**
* For now we add hate equal to each damage received
* Additionally there will be broadcast of extra hate
*/
ai.addHate(damage);
owner.getAi().handleEvent(Event.ATTACKED);
}
COM: <s> only add damage from enemies </s>
|
funcom_train/44656342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ActionCommand createRemoveCommand() {
ActionCommand removeCommand = new ActionCommand("removeCommand") {
@Override
protected void doExecuteCommand() {
int columnCount = columnModel.getColumnCount();
if (columnCount > 0) {
columnModel.removeColumn(tableColumns.get(columnCount - 1));
sortedModel.resetComparators();
}
}
};
CommandConfigurer commandConfigurer = (CommandConfigurer) ApplicationServicesLocator.services().getService(
CommandConfigurer.class);
commandConfigurer.configure(removeCommand);
return removeCommand;
}
COM: <s> returns an action command removing a column </s>
|
funcom_train/2577972 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAxisProperties(Axis axis) {
super.setAxisProperties(axis);
NumberAxis numberAxis = (NumberAxis) axis;
numberAxis.setAutoRange(this.autoRange);
if (!this.autoRange) {
numberAxis.setRange(this.minimumValue, this.maximumValue);
}
}
COM: <s> sets the properties of the specified axis to match the properties </s>
|
funcom_train/25098908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUaTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UserAttributeableElement_uaType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UserAttributeableElement_uaType_feature", "_UI_UserAttributeableElement_type"),
UserattributesPackage.Literals.USER_ATTRIBUTEABLE_ELEMENT__UA_TYPE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the ua type feature </s>
|
funcom_train/3175306 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSize(float wIdth, float heIght) {
// remember
width = wIdth;
height = heIght;
// delegate
try {
view.setSize(width, height);
} catch (Throwable t) {
LOG.log(Level.FINE, "unexpected", t);
}
// done
}
COM: <s> the wrapped view needs to be sized </s>
|
funcom_train/42045786 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initValue(String propertyName, Object value, int keySequence) {
RecordValue recordValue = new RecordValue();
recordValue.setModified(false);
recordValue.setKeySequence(keySequence);
recordValue.setValue(value);
columnMap.put(propertyName, recordValue);
if (keySequence > 0) {
keyMap.put(keySequence, propertyName);
}
}
COM: <s> initialize the record </s>
|
funcom_train/11680000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String sequenceName, long initTime, boolean isInFlow, boolean isStatisticsEnable,boolean isFault) {
sequenceStatisticsList.add(new SequenceStatistics(sequenceName, initTime, isInFlow, isStatisticsEnable,isFault));
}
COM: <s> to put a statistics </s>
|
funcom_train/9442691 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getXmlAttribute(XmlResourceParser xrp, String name) {
int resId = xrp.getAttributeResourceValue(null, name, 0);
if (resId == 0) {
return xrp.getAttributeValue(null, name);
} else {
return mWnn.getString(resId);
}
}
COM: <s> get a attribute value from a xml resource </s>
|
funcom_train/37104359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParseTitles() throws Exception {
assertEquals("Characterization of a protein of the plastid inner envelope having homology to animal inorganic phosphate, chloride and organic-anion transporters.", map1.getFirst("TI"));
assertEquals("Chromosome termini of the monocot plant Othocallis siberica are maintained by telomerase, which specifically synthesises vertebrate-type telomere sequences.", map2.getFirst("TI"));
}
COM: <s> this method tests the titles parsed </s>
|
funcom_train/50447015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startContext(String context) {
context = CONTEXT_PREFIX + context.toUpperCase();
log.debug("Context started: [" + context + "]");
dataProcessorCache = pluginRegistry.getDataProcessors(context);
if (dataProcessorCache != null) {
for (int i = 0; i < dataProcessorCache.length; ++i) {
dataProcessorCache[i].startContext(context);
}
}
}
COM: <s> informs any listeners that a new context is starting </s>
|
funcom_train/2999600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Section sect) {
if (getSection(sect.getId()) != null) {
throw new IllegalArgumentException("A section with id " + sect.getId() + " has already been added");
}
sections.add(sect);
fireStateChanged(new RREvent(this));
}
COM: <s> add a section to this railroad </s>
|
funcom_train/49009309 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton7() {
if (jButton7 == null) {
jButton7 = new JButton();
jButton7.setText("灰度选择");
jButton7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
Filter filter = new GrayLevelFilter();
doFilter(filter, true);
}
});
}
return jButton7;
}
COM: <s> this method initializes j button7 </s>
|
funcom_train/3168457 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XnRegion with(Position pos) {
return unionWith(pos.asRegion());
/*
udanax-top.st:65255:XnRegion methodsFor: 'operations'!
{XnRegion CLIENT} with: pos {Position}
"the region with one more position. Actually, if I already contain pos, then the result is just me."
^self unionWith: pos asRegion!
*/
}
COM: <s> the region with one more position </s>
|
funcom_train/27905388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cekTypeForOrderComparison(Node e) {
//System.out.println("cek type "+ /*e.getValue()+*/" for order comparion");
if ((typeStack.top() != TYPE_INT ) && (typeStack.second() != TYPE_INT))
typeError(e, "type mismatched for order comparison, integer required");
}
COM: <s> method to check for order comparison </s>
|
funcom_train/24640396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBrowseButton(JTextField textfield){
JButton button = new JButton("Browse");
button.setActionCommand("Browse");
final Component parent= this;
final JTextField tField = textfield;
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
int result = fileChooser.showOpenDialog(parent);
if(result == JFileChooser.APPROVE_OPTION){
tField.setText(fileChooser.getSelectedFile().getAbsolutePath());
}
}
});
return button;
}
COM: <s> creates a browse button for the given textfield </s>
|
funcom_train/22742325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChild(DirElement child, boolean keepParent){
if (!keepParent){
child.setParent(this);
}
DirElement[] temp = new DirElement[children.length +1];
System.arraycopy(children,0,temp,0,children.length);
temp[temp.length -1] = child;
children = temp;
}
COM: <s> add a child element to this element </s>
|
funcom_train/33280352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getMaxLength() {
final String maxLength = getMaxLengthAttribute();
if (maxLength.length() == 0) {
return Integer.MAX_VALUE;
}
try {
return Integer.parseInt(maxLength.trim());
}
catch (final NumberFormatException e) {
return Integer.MAX_VALUE;
}
}
COM: <s> gets the max length if defined integer </s>
|
funcom_train/805746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(WizardCategory category) {
assert invariant() : "PRE: The invariant holds";
assert category != null : "PRE: The category is an instance";
assert category.getParent() == this : "PRE: This is the category's parent";
categories.add(category);
assert categories.contains(category) : "POST: This collection contains the category";
assert invariant() : "POST: The invariant holds";
}
COM: <s> adds the given category to this category as a sub category </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.