__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/40071146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MovieDB moviedbImdbLookup(String imdbID, String language) {
MovieDB movie = new MovieDB();
// If the imdbID is null, then exit
if (!isValidString(imdbID)) {
return movie;
}
String searchUrl = buildUrl(MOVIE_IMDB_LOOKUP, imdbID, language);
return MovieDbParser.parseMovie(searchUrl);
}
COM: <s> searches the database using the imdb reference </s>
|
funcom_train/33258246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File saveData(Data data) throws IOException {
File dataFile = (File) data.getData();
File targetFile = new File(RETURN_FILE_DIRECTORY, dataFile.getName());
try {
FileUtilities.copyFile(dataFile, targetFile);
} catch (FileCopyingException e) {
throw new IOException(e.getMessage());
}
return targetFile;
}
COM: <s> write the data out to a file </s>
|
funcom_train/3416393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void exiting(String sourceClass, String sourceMethod, Object result) {
if (Level.FINER.intValue() < levelValue) {
return;
}
Object params[] = { result };
logp(Level.FINER, sourceClass, sourceMethod, "RETURN {0}", result);
}
COM: <s> log a method return with result object </s>
|
funcom_train/45835778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getUserCount() {
try {
String path = USER_URL_PREFIX + "users/count";
Element element = ClearspaceManager.getInstance().executeRequest(GET, path);
return Integer.valueOf(WSUtils.getReturn(element));
} catch (Exception e) {
Log.error(e.getMessage(), e);
}
return 0;
}
COM: <s> gets the user count using the user service users count get service </s>
|
funcom_train/20029232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSplitString() throws AssertionFailedException {
System.out.println("splitString");
String target = "abc#mean";
char flag = '#';
String[] result = StringUtil.splitString(target, flag);
assertEquals("abc",result[0]);
assertEquals("mean", result[1]);
}
COM: <s> test of test split string method of class string util </s>
|
funcom_train/44011664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testReadAllCoup() throws Exception {
System.out.println("readAllCoup");
CouponDAO instance = new CouponDAO();
ArrayList<CouponBO> expResult = null;
ArrayList<CouponBO> result = instance.readAllCoup();
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 read all coup method of class edu </s>
|
funcom_train/6488917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sort() {
// don't allow shift click to extend after sorting, it's confusing.
lastClickIndex = -1;
if (model == null) {
sortedModel = null;
} else {
sortedModel = Sorting.sort(model.getResults(), sortOrder);
repaint();
}
}
COM: <s> sort according to the current sort order </s>
|
funcom_train/3170825 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSwitchedBy(RegionDelta delta) {
return (match(delta.before())) != (match(delta.after()));
/*
udanax-top.st:66198:Filter methodsFor: 'filtering'!
{BooleanVar} isSwitchedBy: delta {RegionDelta}
"Whether the change causes a change in the state of the filter. (I.E. Whether the old region was in and the new out, or vice versa.)"
^(self match: delta before) ~~ (self match: delta after)!
*/
}
COM: <s> whether the change causes a change in the state of the filter </s>
|
funcom_train/8323087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void collectColumns(BitKey bitKey, List<Column> list) {
for (Column column : getColumns()) {
if (bitKey.get(column.getBitPosition())) {
list.add(column);
}
}
for (Table table : getChildren()) {
table.collectColumns(bitKey, list);
}
}
COM: <s> adds to a list all columns of this table or a child table </s>
|
funcom_train/25484204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ServerResource createResource( final StarTable table ) {
return new ServerResource() {
public long getContentLength() {
return -1L;
}
public String getContentType() {
return writer_.getMimeType();
}
public void writeBody( OutputStream out ) throws IOException {
writer_.writeStarTable( table, out );
}
};
}
COM: <s> obtains a somewhat persistent resource object via which </s>
|
funcom_train/41411909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String formatMovementsId(Solution solution){
Solution origin = solution.getOriginSolution();
if (origin != null){
String tag = "";
Object[] tour = solution.getValues();
List<Object> originTour = Arrays.asList(origin.getValues());
for (int i = 0; i < tour.length; ++i){
if (!tour[i].equals(originTour.get(i))){
int j = originTour.indexOf(tour[i]);
if (j > i){
tag+= "," + i + "<->" + j;
}
}
}
return tag;
} else {
return null;
}
}
COM: <s> creates an id that represents the recently cities swaps of informed solution </s>
|
funcom_train/3341580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insert(int count) {
if (start >= count) {
start -= count;
size += count;
} else {
setSize(size + count);
System.arraycopy(data, start + count - count, data, start + count, size - 1 - count);
}
for (int i = 0; i < count; i++) {
data[start + i] = 0;
}
testBuffer();
}
COM: <s> insert a given number of bytes to the front of the buffer </s>
|
funcom_train/45507026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTotalHeightUpTo ( int lineCounter ) {
if ( lineCounter < 0 || lineCounter > stringTokenizer.length ) throw new RuntimeException( "Outof the bound exception : " + lineCounter );
int toReturn = 0;
for ( int i = 0 ; i < lineCounter ; i++ )
toReturn += heights[ i ];
return toReturn;
}
COM: <s> starts from zero to length of the total available heights the </s>
|
funcom_train/20648658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JLabel getPlayBtn() {
if (playBtn == null) {
playBtn = new JLabel();
playBtn.setText("");
playBtn.setForeground(Color.blue);
playBtn.setBackground(Color.white);
playBtn.setFont(new Font("Dialog", Font.BOLD, 12));
//playBtn.setBorderPainted(false);
playBtn.setOpaque(false);
playBtn.setHorizontalAlignment(SwingConstants.CENTER);
}
return playBtn;
}
COM: <s> this method initializes play btn </s>
|
funcom_train/22497330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Topic findTopicByName(String name, boolean create) {
// return the topic if found
for (Topic topic : topics) {
if (topic.getName().equalsIgnoreCase(name)) {
return topic;
}
}
// if we're not going to create, return null
if (!create) {
return null;
}
// create new lecturer
Topic topic = new Topic();
topic.setName(name);
topic.setAutoId();
topics.add(topic);
return topic;
}
COM: <s> this method finds the required topic </s>
|
funcom_train/22291459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Target findTargetByName(String target) {
Target targetToFind = null;
Hashtable targets = getProject().getTargets();
for (Iterator i=targets.keySet().iterator();i.hasNext();) {
String targetName = (String) i.next();
Target aTarget = (Target) targets.get(targetName);
if (aTarget.getName().equals(target)) {
targetToFind = aTarget;
}
}
return targetToFind;
}
COM: <s> find a target amid the projet targets </s>
|
funcom_train/1443938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFlag(int cycle, int id, double dDist, double dDir) {
FlagInfo flag;
if (this.flagBuffer.size() != 0) {
flag = this.flagBuffer.remove(0);
flag.setCycle(cycle);
flag.setId(id);
flag.setDistance(dDist);
flag.setDirection(dDir);
} else {
flag = new FlagInfo(cycle, id, dDist, dDir);
}
this.flags.add(flag);
}
COM: <s> method that takes a flag from buffer and adds it with setted parameters </s>
|
funcom_train/51413440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh() {
try {
Row[] methRows = MAspectRoleMethodParameter.getAllRoleMethodParametersAsRow(roleMethodPKey);
cmlParams.refresh(methRows);
firePropertyChange(PROPTERY_PARAMETERCHANGED, false, true);
} catch (CMExceptionTable e) {
e.addContextInfo("Error on refresh the editor for the roleclass-method-parameters.");
GUITools.showException(e);
}
}
COM: <s> refreshes the list of parameters for the selected rolemethod </s>
|
funcom_train/29690577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOkButtonClick() {
NamedComponentFinder finder =
new NamedComponentFinder(JComponent.class, "okButton");
JButton okButton = (JButton) finder.find(cfgmd, 0);
assertNotNull("Could not find the ok button", okButton);
getHelper().enterClickAndLeave(new MouseEventData(this, okButton));
}
COM: <s> method test ok button click </s>
|
funcom_train/4388477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Message createMessageWithImageAttachment() throws Exception {
Message message = createMimeMessage();
BodyPart part1 = new MimeBodyPart();
part1.setContent(TEXT_PLAIN_CONTENT, TEXT_PLAIN_TYPE);
BodyPart part2 = new MimeBodyPart();
ByteArrayDataSource ds = new ByteArrayDataSource(getImageBytes(), IMAGE_TYPE);
part2.setDataHandler(new DataHandler(ds));
part2.setFileName(IMAGE_FILE);
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(part1);
multipart.addBodyPart(part2);
message.setContent(multipart);
message.saveChanges();
return message;
}
COM: <s> creates the message with image attachment </s>
|
funcom_train/8095914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isExtremeValue(Instance inst) {
boolean result;
int i;
result = false;
for (i = 0; i < m_AttributeIndices.length; i++) {
// non-numeric attribute?
if (m_AttributeIndices[i] == NON_NUMERIC)
continue;
result = isExtremeValue(inst, i);
if (result)
break;
}
return result;
}
COM: <s> returns whether the instance is an extreme value or not </s>
|
funcom_train/9408150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddAndGet(){
AtomicLong ai = new AtomicLong(1);
assertEquals(3,ai.addAndGet(2));
assertEquals(3,ai.get());
assertEquals(-1,ai.addAndGet(-4));
assertEquals(-1,ai.get());
}
COM: <s> add and get adds given value to current and returns current value </s>
|
funcom_train/15491145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyBits(ImageProcessor ip, int xloc, int yloc, int mode) {
if (!((ip instanceof ColorProcessor) | (ip instanceof ByteProcessor)))
throw new IllegalArgumentException("8-bit or RGB image required");
new ColorBlitter(this).copyBits(ip, xloc, yloc, mode);
}
COM: <s> copies the image contained in ip to xloc yloc using one of </s>
|
funcom_train/27766569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeLastExecTime(File dir, String targetKey, long newTime) {
File lastExecFile = getLastExecFile(dir, targetKey);
if (lastExecFile.exists()) {
lastExecFile.delete();
}
try {
lastExecFile.getParentFile().mkdirs();
FileUtils.writeStringToFile(lastExecFile, "This file intentionally left blank.", SystemUtils.FILE_ENCODING);
}
catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> writes last execution time to a temporary file </s>
|
funcom_train/13287101 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
try {
Site site = (Site) obj;
return new EqualsBuilder()
.append(this.getPath(), site.getPath())
.isEquals();
} catch (ClassCastException e) {
// The given object is not a site, therefore they are not equal.
return false;
}
}
COM: <s> compares this site with the given object for equality </s>
|
funcom_train/4039558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeData(E element, LocalDate date, File file) {
// Add the element to the list:
S category = createCategory();
category.setDate(toXmlDate(date));
getElements(category).add(element);
// Create the document:
EventListType events = new EventListType();
accessor.getCategories(events).add(category);
// Saves to file:
accessor.getDataStore().write(events, file);
}
COM: <s> writes the given element to file </s>
|
funcom_train/26094091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void evaluate( Chromosome c ) {
try {
Activator activator = factory.newActivator( c );
// calculate fitness, sum of multiple trials
int fitness = 0;
for ( int i = 0; i < numTrials; i++ )
fitness += singleTrial( activator );
c.setFitnessValue( fitness );
}
catch ( Throwable e ) {
logger.warn( "error evaluating chromosome " + c.toString(), e );
c.setFitnessValue( 0 );
}
}
COM: <s> evaluate chromosome and set fitness </s>
|
funcom_train/48619167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFiles() {
IrUser user = userService.getUser(userId, false);
if( !item.getOwner().equals(user) && !user.hasRole(IrRole.ADMIN_ROLE))
{
return "accessDenied";
}
List<ItemObject> itemObjects = item.getItemObjects();
// Sort item objects by order
Collections.sort(itemObjects, new AscendingOrderComparator());
createItemFileVersionForDisplay(itemObjects);
return SUCCESS;
}
COM: <s> get personal files for the selected personal file ids </s>
|
funcom_train/5231124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOption(Parameter opt) {
if (opt == null) {
throw new NullPointerException();
}
if (options.containsKey(opt.getTag())) {
throw new IllegalArgumentException(Strings.get(
"BasicCmdLineHandler.duplicateOption",
new Object[] { opt.getTag() }));
}
options.put(opt.getTag().toLowerCase(), opt);
}
COM: <s> adds a command line option </s>
|
funcom_train/322160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkSizes(long length) {
boolean ok = true;
if (length != riffChunkSize+8) {
// System.out.println(String.format("RIFF Chunk Bytes difference = %d", length-riffChunkSize));
ok = false;
}
if (length != dataStart + dataSize) {
// System.out.println(String.format("Data bytes different = %d expected %d" , length - dataSize, dataStart));
ok = false;
}
return ok;
}
COM: <s> check the two size informations in the wav file </s>
|
funcom_train/32212661 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean toBoolean(String value) {
value = value.toLowerCase();
if (value.equals("0")) return (false);
if (value.equals("f")) return (false);
if (value.equals("F")) return (false);
if (value.equals("false")) return (false);
return (true);
}
COM: <s> convert a string value to a boolean value </s>
|
funcom_train/34890001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int write(DataOutputStream ds) throws IOException{
ds.writeByte(this.dataType);
ds.writeShort(this.objectType);
ds.writeUTF(this.name);
ds.writeInt(this.labelX);
ds.writeInt(this.labelY);
return 13 + this.name.getBytes("UTF-8").length;
}
COM: <s> writes all the data into the output stream returns the number of bytes </s>
|
funcom_train/29413254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createConnection(EditPart source, EditPart target) {
if (target == null)
return;
/*
* CreateConnectionViewRequest r = CreateViewRequestFactory
* .getCreateConnectionRequest(EpcElementTypes.Arc_4001, editor
* .getDiagramEditPart().getDiagramPreferencesHint());
*/
// CreateConnectionViewRequest.getCreateCommand(r, source, target)
// .execute();
EpcDiagramEditUtil.createConnection(editor, source, target);
}
COM: <s> creates a single orientated connection between two edit parts </s>
|
funcom_train/3294408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getElement(int row,String colname) {
Integer ii=(Integer)name2pos.get(colname);
if (ii!=null) {
int i=ii.intValue();
Vector rw=(Vector)rows.elementAt(row);
String value=(String)rw.elementAt(i);
return value;
}
return null;
}
COM: <s> returns the element at the given row and with the given column name </s>
|
funcom_train/37820704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createToken(Symbol symbol, String content) {
initStatement(symbol.getAddress().substring(1).length(), symbol);
code.append("<td>");
code.append("<a class=\"token\" name=\"" + symbol.getAddress()
+ "\" href=\"" + symbol.getAddress() + "\">");
code.append(content + "</a></td><td>");
}
COM: <s> creates a html tag with an attribute token </s>
|
funcom_train/5859130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setChildAdded() {
Hashtable tmp = new Hashtable();
for (Enumeration e = getFSObjects().elements(); e.hasMoreElements(); ) {
FSObject fso = (FSObject) e.nextElement();
tmp.put(fso.getName(), fso.naming());
}
setProxyPropertyChanged(PFSDir.ENTRIES, this.naming(), 0, tmp);
}
COM: <s> updates the proxy property pfsdir </s>
|
funcom_train/25292138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void buildGraph() {
//System.err.println("Build Graph "+this);
if (node instanceof javax.media.ding3d.utils.scenegraph.io.SceneGraphIO)
((javax.media.ding3d.utils.scenegraph.io.SceneGraphIO)node).restoreSceneGraphObjectReferences( control.getSymbolTable() );
}
COM: <s> subclasses should processes their own build graph requirements before </s>
|
funcom_train/2287523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getUriTemplate(CmsObject cms, CmsResource res) {
String result = "";
try {
result = cms.readPropertyObject(
cms.getRequestContext().removeSiteRoot(res.getRootPath()),
CmsPropertyDefinition.PROPERTY_TEMPLATE,
true).getValue("");
} catch (CmsException e) {
// noop
}
return result;
}
COM: <s> returns the open cms vfs uri of the template of the resource </s>
|
funcom_train/19049766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createOverviewPage() {
try {
OVeditor = new OverviewEditor();
OVeditor.setParentED(this);
int index = addPage(OVeditor, getEditorInput());
setPageText(index, "Overview");
} catch (PartInitException e) {
ErrorDialog.openError(getSite().getShell(),
"Error creating nested text editor (Page0)", null, e.getStatus());
}
}
COM: <s> creates page0 which shows an overview of the opened acmdoc </s>
|
funcom_train/22470810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStreamUrl() {
Map<String, String> parameters = new HashMap<String, String>();
parameters.put("userid", Long.toString(getUser().getId()));
parameters.put("passhash", getUser().getPassword());
return getStreamService().getLink(false, parameters).getAbsoluteURL();
}
COM: <s> returns the url for the current user where the shoutcast stream can be </s>
|
funcom_train/1443047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void valueChanged(ListSelectionEvent arg0) {
// System.out.println(pmList.getSelectedValues());
int[] indices = this.pmList.getSelectedIndices();
PLAY_MODE[] pms = new PLAY_MODE[indices.length];
for (int i = 0; i < indices.length; i++) {
pms[i] = PlayMode.allPlayModes[indices[i]];
}
this.pmCond.setPlayModes(pms);
}
COM: <s> this method listens for events on the play mode list </s>
|
funcom_train/36492111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getBankName(Context context) {
String bankName = null;
CharSequence[] bValue = context.getResources().getTextArray(R.array.select_bank_values);
CharSequence[] bName = context.getResources().getTextArray(R.array.select_bank);
for (int i = 0; i < bValue.length; i++) {
if (bValue[i].equals(mBankName)) {
bankName = (String) bName[i];
}
}
return bankName;
}
COM: <s> get the banks real name </s>
|
funcom_train/15622920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeCrossTable(String newCrossTableName) throws M4Exception {
Columnset cs = (Columnset) this.getM4Db().getColumnsetFromCase(newCrossTableName, this.getTheFromConcept().getTheCase());
if (cs == null) {
cs = (Columnset) this.getM4Db().createColumnsetFromTable(newCrossTableName);
}
this.setCrossLinkColumnSet(cs);
}
COM: <s> change the cross table of this relation </s>
|
funcom_train/37859304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasDocument(DBBroker broker, XmldbURI uri) throws PermissionDeniedException {
if(!getPermissionsNoLock().validate(broker.getSubject(), Permission.READ)) {
throw new PermissionDeniedException("Permission denied to read collection: " + path);
}
return documents.containsKey(uri.getRawCollectionPath());
}
COM: <s> check if the collection has a child document </s>
|
funcom_train/49427713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onClickMouseMove(final MouseInputEvent inputEvent) {
if (lastMouseX == inputEvent.getMouseX() && lastMouseY == inputEvent.getMouseY()) {
return;
}
lastMouseX = inputEvent.getMouseX();
lastMouseY = inputEvent.getMouseY();
interaction.onClickMouseMoved(inputEvent);
}
COM: <s> on click mouse move method </s>
|
funcom_train/7698990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPrimaryKey_Name(ColumnData[] columnData) {
if (columnData == null) {
return null;
}
String s = "";
for (int i=0; i < columnData.length; i++) {
if (columnData[i].getIsPrimaryKey() == true) {
s = columnData[i].getColumnName();
break;
}
}
return s;
}
COM: <s> find primary key column name </s>
|
funcom_train/27842144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeTarget(Object inTarget) {
ListIterator iter = targets.listIterator();
while (iter.hasNext()) {
TargetStrategy strategy = (TargetStrategy) iter.next();
if (inTarget.equals(strategy) || inTarget.equals(strategy.getTarget())) {
iter.remove();
}
}
}
COM: <s> removes a target </s>
|
funcom_train/13551655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void store(int addr, int value) {
if (addr<2) {
ioPort.writeToPort(addr, value);
// write previous value that the data bus still have.
bus.store(addr & 0xffff, bus.previous, view, sigAEC);
} else bus.store(addr & 0xffff, value, view, sigAEC);
}
COM: <s> write a value to the bus </s>
|
funcom_train/26465129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ByteBuffer allocateNewBuffer(final int _size) {
try {
return ByteBuffer.allocateDirect(_size);
} catch (OutOfMemoryError e) {
clearBufferPools();
runGarbageCollection();
try {
return ByteBuffer.allocateDirect(_size);
} catch (OutOfMemoryError ex) {
String msg = "Memory allocation failed: Out of direct memory space.\n"
+ "To fix: Use the -XX:MaxDirectMemorySize=512m command line option,\n"
+ "or upgrade your Java JRE to version 1.4.2_05 or 1.5 series or newer.";
System.err.println(msg);
throw (ex);
}
}
}
COM: <s> allocate and return a new direct byte buffer </s>
|
funcom_train/9115134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getValues() {
String x822 = type_ + ';';
for (Enumeration xe = params_.keys(); xe.hasMoreElements();) {
String xname = (String) xe.nextElement();
String xvalue = (String) params_.get(xname);
x822 = x822 + xname + '=' + xvalue + ';';
}
return x822;
}
COM: <s> get the parameters formatted as a mime string </s>
|
funcom_train/31649769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals( Object other ) {
if ( ! (other instanceof Principal) ) {
return false;
} else if ( this.name==null ) {
return ((Principal)other).getName()==null;
} else {
return this.name.equals( ((Principal)other).getName() );
}
}
COM: <s> returns equality based solely on the principal names </s>
|
funcom_train/40764985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize(SimpleCommandLineParser parser) {
if (null != parser) {
if (parser.containsKey(OPTION_PORT)) {
port = Integer.parseInt(parser.getValue(OPTION_PORT));
}
if (parser.containsKey(OPTION_FEED_SERVER_URI)) {
uri = parser.getValue(OPTION_FEED_SERVER_URI);
}
}
}
COM: <s> initialize the configuration with command line arguments </s>
|
funcom_train/15556670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String tryXPath(String expr, Node n) {
String result = null;
try {
result = (String) getXPath().evaluate(expr, n, XPathConstants.STRING);
} catch (XPathExpressionException e) {
logger.log(Level.SEVERE, "Internal XML error: {0}", e.getMessage());
}
return result;
}
COM: <s> tries to evaluate an xpath expression to a string </s>
|
funcom_train/31928580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JbActionHistory getHistory(String _buddyName) {
JbActionHistory result = new JbActionHistory(new java.util.LinkedList());
JbActionHistory history = (JbActionHistory) this.jbHistoryMap.get(_buddyName);
if(null==history || history.isEmpty()){ //return empty list
return result;
}
return history;
}
COM: <s> get the entire stored action history for a buddy </s>
|
funcom_train/37828693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer add(final V item) {
// new item? prepare the bag
Integer cnt = map.get(item);
if (cnt == null) {
cnt = Integer.valueOf(0);
}
// increment the counter
// Note: We need to do it this way because Integer objects
// are immutable.
cnt = Integer.valueOf(cnt.intValue() + 1);
map.put(item, cnt);
return cnt;
}
COM: <s> adds am entry to the bag </s>
|
funcom_train/28471499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void createPopupMenu() {
popup = new JPopupMenu();
JMenu submenu = new JMenu("Add");
Gui.gui.createSuccessorMenu(submenu,getClass());
if (submenu.getItemCount() > 0) // "Add" item only if we have successors
popup.add(submenu);
}
COM: <s> method creates a popup menu for a node </s>
|
funcom_train/42755832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayInBrowser(final String text) {
String newText = "<html>\n<head>\n<style type=\"text/css\">\n"
+ stylesheet + "</style>\n</head>\n<body>\n" + text
+ "</body>\n</html>\n";
browser.setText(newText);
}
COM: <s> displays text in the browser </s>
|
funcom_train/3919928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCheckListItems(LD_CheckList checkList, String category) {
DataComponent[] env_refs = _owner.getChildren(EnvironmentRef.class);
for(int i = 0; i < env_refs.length; i++) {
LD_ComponentRef refComponent = (LD_ComponentRef)env_refs[i];
refComponent.addCheckListItems(checkList, category);
}
}
COM: <s> add checklist items </s>
|
funcom_train/19686098 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeLog(String text) {
synchronized(taMsgMonitor) {
//System.out.println(":::" + text);
try {
String s = taMsgMonitor.getText();
taMsgMonitor.setText(s + "> " + text + "\n");
taMsgMonitor.setCaretPosition(s.length());
}
catch (IllegalArgumentException e) {
//System.out.println("# unable to set caret; continuing..");
}
}
}
COM: <s> method used to append some log messages into ta msg monitor </s>
|
funcom_train/14311166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessage(final String message) {
byte[] msg;
if (client != null) {
msg = new Message(Peer.getDeviceName(), message).toByteArray();
client.send(msg);
} else if (server != null) {
msg = new Message(Peer.getDeviceName(), message).toByteArray();
server.sendBuffer(server.getClientIDs().keys(), (byte)-1, msg);
} else
throw new IllegalStateException("Ibtu must be connected");
}
COM: <s> sends a message </s>
|
funcom_train/3167517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAgeModifierBlock(AgeModifierBlock ageModifierBlock) throws java.beans.PropertyVetoException {
AgeModifierBlock oldAgeModifierBlock = this.ageModifierBlock;
vetoableChangeSupport.fireVetoableChange("ageModifierBlock", oldAgeModifierBlock, ageModifierBlock);
this.ageModifierBlock = ageModifierBlock;
propertyChangeSupport.firePropertyChange("ageModifierBlock", oldAgeModifierBlock, ageModifierBlock);
}
COM: <s> setter for property age modifier block </s>
|
funcom_train/29313129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear(ROI roi) {
assert(imagePlus != null);
WindowManager.setTempCurrentImage(imagePlus);
IJ.makeRectangle((int)roi.x, (int)roi.y, (int)roi.width, (int)roi.height);
IJ.run("Clear");
}
COM: <s> clears the region within roi </s>
|
funcom_train/44136401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getNameWithoutSlash(String s) {
String r = "";
for(int i = 0;i < s.length();i++) {
if((s.charAt(i) != '\\') && (s.charAt(i) != '/'))
r += s.charAt(i);
}
return r;
}
COM: <s> to get a file or path without any slash </s>
|
funcom_train/4900959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setElements(Element... elements) {
Element[] old = getElements();
this.elements.clear();
if (elements != null) {
this.elements.addAll(Arrays.asList(elements));
}
firePropertyChange("elements", old, getElements());
}
COM: <s> sets the elements </s>
|
funcom_train/37482988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getFractionError(Nucleus p, Amount<Energy> energy) {
/* no need to set projectile */
final Amount<Mass> mass = p.getMass();
final double ea = energy.divide(mass).to(NukeUnits.MeVperAmu).getEstimatedValue();
double rval = 0.025;
if (ea <= 2.0) {
if (absorber instanceof Gas) {
rval = 0.1;
} else {// solid
rval = 0.05;
}
}
return rval;
}
COM: <s> returns the fractional error in energy loss </s>
|
funcom_train/1491675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ModelAndView handleCommonNameSearch(Map<String, String> propertiesMap, HttpServletRequest request, HttpServletResponse response, String query, String view) {
ModelAndView mav = new ModelAndView(view);
try {
SearchResultsDTO searchResults = taxonomyManager.findMatchingCommonNames(query, true, new SearchConstraints(0,maxResults));
mav.addObject(searchResultsModelKey, searchResults);
} catch (ServiceException e){
logger.error(e.getMessage(), e);
}
return mav;
}
COM: <s> retrieves a list of matching common names </s>
|
funcom_train/47681148 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceNode(T oldObj, T newObj) {
Node<T> node = objNodeMap.remove(oldObj);
if (node == null) {
throw new IllegalArgumentException("Node to replace '" + oldObj + "' is not in the tree");
}
node.obj = newObj;
objNodeMap.put(newObj, node);
}
COM: <s> replaces the old object in the tree with the new one </s>
|
funcom_train/46277684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeGetServiceName(PrintWriter pw, QName qname) {
pw.println(" public javax.xml.namespace.QName getServiceName() {");
pw.println(" return " + Utils.getNewQName(qname) + ";");
pw.println(" }");
pw.println();
} // writeGetServiceName
COM: <s> write the get service name method </s>
|
funcom_train/22897043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Action createRemoveAction() {
return new AbstractAction() {
/**Serialization ID*/
private static final long serialVersionUID = 8772511184605835231L;
public void actionPerformed(final ActionEvent e) {
int [] selectedRows = getTable().getSelectedRows();
for (int i = selectedRows.length - 1; i >= 0; i--) {
getTableModel().remove(selectedRows[i]);
}
}
};
}
COM: <s> creates the remove action </s>
|
funcom_train/24121456 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(OutputStream out) throws IOException {
// The palette entry is written in zero-b-g-r format
out.write(0);
out.write(color.getBlue());
out.write(color.getGreen());
out.write(color.getRed());
}
COM: <s> writes the palette entry to a stream </s>
|
funcom_train/18741223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ReteNetworkNode getOtherAntecedent(ReteNetworkNode oneAntecedent) {
ReteNetworkNode result = null;
List<ReteNetworkNode> aSet = this.getAntecedents();
assert aSet.size() > 1;
for (ReteNetworkNode n : aSet) {
if (n != oneAntecedent) {
result = n;
break;
}
}
return result;
}
COM: <s> this is an auxiliary utility method to quickly get the </s>
|
funcom_train/51643895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isMethodBody() {
ASTNode first= (ASTNode)fNodes.get(0);
if (first.getParent() == null)
return false;
ASTNode candidate= first.getParent().getParent();
if (candidate == null || candidate.getNodeType() != ASTNode.METHOD_DECLARATION)
return false;
MethodDeclaration method= (MethodDeclaration)candidate;
return method.getBody().statements().size() == fNodes.size();
}
COM: <s> tests if the whole duplicate is the full body of a method </s>
|
funcom_train/49004383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getHashCode(Entry entry) {
log.entering(UpdateTask.class.getName(), "getHashCode");
final Hashtable hashtable = entry.getHashtable();
final Detail summary = entry.getSummary();
String value = "";
int hashCode = -1;
if (summary != null) {
value = summary.getValue();
hashCode = value.hashCode();
} else {
hashCode = hashtable.hashCode();
}
log.exiting(UpdateTask.class.getName(), "getHashCode");
return hashCode;
}
COM: <s> get entry hashcode if summary </s>
|
funcom_train/1963517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getJCheckBoxCurrentOnly() {
if (jCheckBoxCurrentOnly == null) {
jCheckBoxCurrentOnly = new JCheckBox();
jCheckBoxCurrentOnly.setBounds(new Rectangle(344, 164, 152, 30));
jCheckBoxCurrentOnly.setText("Search current only?");
}
return jCheckBoxCurrentOnly;
}
COM: <s> this method initializes j check box current only </s>
|
funcom_train/25914023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeAll() {
while(!photoItemNodes_.isEmpty()) {
photoItemNodes_.get(0).removeAll(photoItemNodes_.get(0));
photoItemNodes_.remove(0);
}
while(!bitmapNodes_.isEmpty()) {
bitmapNodes_.get(0).removeAll(bitmapNodes_.get(0));
bitmapNodes_.remove(0);
}
groups_.removeAll(groups_);
photoItems_.removeAll(photoItems_);
bitmaps_.removeAll(bitmaps_);
}
COM: <s> remove all item from expandable list </s>
|
funcom_train/2023560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isChanged() {
int i;
boolean changed;
changed = super.isChanged();
if (!hasTabbedPane())
return changed;
for (i = 0; i < getPanelCount(); i++) {
if (changed)
break;
if (getPanelAt(i) != null)
changed = changed || getPanelAt(i).isChanged();
}
return changed;
}
COM: <s> returns whether anything in this panel and tabs was changed </s>
|
funcom_train/38305613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(String propertyName) {
String retval = getStr( propertyName );
if( retval == null )
{
retval = propertyName;
String msg =
"Missing property '"
+ propertyName
+ "' in bundle '"
+ _class.getName()
+ "'"
+ " for locale '"
+ _locale
+ "'";
_logger.error(msg);
}
return retval;
}
COM: <s> returns a string defined by property name </s>
|
funcom_train/119154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GraphModelEdit createRemoveEdit(Object[] cells) {
// Remove from GraphStructure
ConnectionSet cs = ConnectionSet.create(this, cells, true);
// Remove from Group Structure
ParentMap pm = ParentMap.create(this, cells, true, false);
// Construct Edit
//GraphModelEdit edit = new GraphModelEdit(cells, cs, pm);
GraphModelEdit edit = createEdit(null, cells, null, cs, pm);
if (edit != null)
edit.end();
return edit;
}
COM: <s> returns an edit that represents a remove </s>
|
funcom_train/46960302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getRotateBox() {
if (rotateBox == null) {
rotateBox = new JComboBox(new Object[] { 0, 90, 180, 270});
rotateBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (camera != null)
camera.setRotation((Integer )rotateBox.getSelectedItem());
}
});
}
return rotateBox;
}
COM: <s> this method initializes rotate list </s>
|
funcom_train/16883895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setValue( String value ) throws XMLException {
if ( element != null )
if ( element.getClass() == Vector.class )
throw new XMLException( "Cannot assign a value to an element with subelements" );
this.element = value;
if ( debug )
System.out.println( "XMLWriter.setValue(" + value + ")" );
}
COM: <s> set the value for this element private </s>
|
funcom_train/7232493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
if (!this.cachedAll) rehash ();
String res = "(Network: ";
res += getName();
res += " ["+getAllPlaces().length+" P]";
res += "["+getAllTransitions().length+" T]";
res += "["+getAllInputArcs().length+" I]";
res += "["+getAllOutputArcs().length+" O] ";
return res + ")";
}
COM: <s> returns human readable description of this net </s>
|
funcom_train/28659159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void catchedException(final Throwable ex) {
LOGGER.log(Level.SEVERE, "catchedException()", ex);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JOptionPane.showMessageDialog(XI5250Emulator.this,
ex.getMessage() + "\nSee the log for details ",
"ERROR", JOptionPane.ERROR_MESSAGE);
}
});
}
COM: <s> called when an generic exception is catched </s>
|
funcom_train/12169379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertAllNodesVisisted() {
if (!processor.isEmpty()) {
CharacteristicNotAvailableException e =
new CharacteristicNotAvailableException(
exceptionLocalizer.format(
"service-def-path-failure",
new String[] {xpath, serviceName}));
throw new RuntimeCharacteristicNotAvailableException(e);
}
}
COM: <s> this method should be invoked to assert that the path has been </s>
|
funcom_train/35566936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int undoCmd(Object context) {
if (m_cmdHistoryIndex < 0)
return getFlags();
Cmd cmd = (Cmd) m_cmdHistory.get(m_cmdHistoryIndex);
m_cmdHistoryIndex--;
cmd.undoCmd(context);
if (Dbg.on())
dumpCmdHistory();
return getFlags();
}
COM: <s> undoes the next command </s>
|
funcom_train/31337820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reloadQueued(IBookMark bookmark, Map<Object, Object> properties, final Shell shell) {
/* Create a Task for the Bookmark to Reload */
ReloadTask task = new ReloadTask(bookmark, properties, shell, ITask.Priority.DEFAULT);
/* Check if Task is not yet Queued already */
if (!fReloadFeedQueue.isQueued(task))
fReloadFeedQueue.schedule(task);
}
COM: <s> reload the given book mark </s>
|
funcom_train/20315006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getChoiceFromList(List<String> choices, String title) {
String result;
displayTitle(title);
displayChoices(choices);
String[] input = readLine().split("\\ ");
int i;
try {
i = Integer.parseInt(input[0]);
} catch (Exception e) {
i = -1;
}
if (i < 1 || i > choices.size() || input.length > 1) {
displayError("Bitte Eingabe korrigieren!");
result = getChoiceFromList(choices, title);
} else {
result = choices.get(i - 1);
}
return result;
}
COM: <s> provides a list of numbered entries to choose from </s>
|
funcom_train/27710660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addUniqueLeafNode(int nameIndex) throws Exception {
// create content spec node
int contentSpecIndex = createContentSpec();
// set content spec node values
fContentSpec.setValues(XMLContentSpec.CONTENTSPECNODE_LEAF,
nameIndex, -1);
setContentSpec(contentSpecIndex, fContentSpec);
// return index
return contentSpecIndex;
} // addUniqueLeafNode(int):int
COM: <s> create an xmlcontent spec for a leaf </s>
|
funcom_train/34271658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkSourceReconnection() {
// connection endpoints must be different Shapes
if (newSource.equals(oldTarget))
return false;
// return false, if the connection exists already
for (Object element : newSource.getSourceConnections()) {
Route conn = (Route) element;
// return false if a newSource -> oldTarget connection exists already
// and it is a different instance than the connection-field
if (conn.getTarget().equals(oldTarget) && !conn.equals(connection))
return false;
}
return true;
}
COM: <s> return true if reconnecting the connection instance to new source is allowed </s>
|
funcom_train/42658220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addProperty(String value){
String key = new Throwable().fillInStackTrace().getStackTrace()[1].getMethodName();
key = StringUtils.removeStart(key, "set");
key = StringUtils.uncapitalize(key);
propertiesImpl.put(key, value);
}
COM: <s> method add proprerty adds the value specified in the properties impl map </s>
|
funcom_train/1116229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getSearchButton() {
if (searchButton == null) {
searchButton = new JButton();
ResourceHelper.setText(searchButton, "srch");
searchButton.setIcon(new ImageIcon(getClass().getResource(
"/resource/Find16.gif")));
searchButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
load();
}
});
}
return searchButton;
}
COM: <s> this method initializes search button </s>
|
funcom_train/44718523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runBare() throws Throwable {
baseSetUp();
try {
try {
setUp();
runTest();
} catch(Throwable t) {
try {
tearDown();
} catch (Throwable t2) {
System.err.println ( "Error in teardown: " );
t2.printStackTrace ( System.err );
}
throw t;
}
tearDown();
} finally {
baseTearDown ();
}
}
COM: <s> runs the bare test sequence </s>
|
funcom_train/46188573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File createDirectory(String path, String name) throws IllegalFileAccessException {
FileMetaData subDirectory = getFileMetaData(path);
File newDirectory = new File(getFile(subDirectory), name);
if (!isUnderneathRootDirectory(newDirectory)) {
throw new IllegalFileAccessException();
} else {
newDirectory.mkdirs();
}
return newDirectory;
}
COM: <s> creates a new directory with the specified name underneath the given path </s>
|
funcom_train/26558881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(int b) throws IOException {
sb.append((char) b);
if (sb.toString().endsWith(lineSep)) {
String s = sb.toString();
String line = s.substring(0, s.length() - lineSep.length());
addLine(line);
sb.delete(0, sb.length());
}
}
COM: <s> implements the tt output stream tt s write method </s>
|
funcom_train/17567897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIdentifyThreshold() {
try {
//Try to get the parameters from Fingerprint SDK.
return fingerprintSDK.getIdentificationThreshold();
} catch (GrFingerJavaException e) {
//If fails to load the parameters, writes error to log and returns 0
ui.writeLog(e.getMessage());
return 0;
}
}
COM: <s> returns the current identification threshold </s>
|
funcom_train/20644480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BCNode getMyNode(Tarif t) {
ArrayList/*<BCNode>*/ map = t.getMyMapping(tarification.getTreeBase());
if (map.size() != 1) {
m_log.error( "How come ["+t+"] has an invalid mapping!!" );
return null;
}
return (BCNode) map.get(0);
}
COM: <s> get the node on base tree where this tarif is linked </s>
|
funcom_train/3785343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String showAffineLM(String msg)
{ /* showAffineLM */
String outMsg= msg + "\n[Affine LM]\n" + getLMstr();
if(Flicker.CONSOLE_FLAG || flk.dbugFlag)
System.out.println(outMsg);
return(outMsg);
} /* showAffineLM */
COM: <s> show affine lm show affine landmarks </s>
|
funcom_train/22563619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNumberOfCompetences() {
int competenceCount = INT_NO_MAP;
try {
if (isMapReady(getMap())) {
competenceCount = getMap().getCompetencesCount();
} else {
competenceCount = INT_NO_MAP;
}
} catch (SystemException e) {
PortletUtils.handleError(LOG, e);
}
return getInfoText("smallview.report.competences", competenceCount);
}
COM: <s> return the number of competences in this map </s>
|
funcom_train/39399195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createQuestionMarkList(Vector<String> fieldNames) {
String listOfQuestionMarks = "";
Iterator<String> fieldNamesIter = fieldNames.iterator();
while (fieldNamesIter.hasNext()) {
listOfQuestionMarks += "?";
fieldNamesIter.next(); // we don't need it
listOfQuestionMarks += fieldNamesIter.hasNext() ? ", " : " ";
}
return listOfQuestionMarks;
}
COM: <s> creates a comma separated list of question marks </s>
|
funcom_train/7384471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void undo() {
while (indexOfNextAdd > 0) {
mxUndoableEdit edit = history.get(--indexOfNextAdd);
edit.undo();
if (edit.isSignificant()) {
fireEvent(new mxEventObject(mxEvent.UNDO, "edit", edit));
break;
}
}
}
COM: <s> undoes the last change </s>
|
funcom_train/2710184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasDependency(Object dep) {
if (dependencies == null) return false;
for (Dependency d : dependencies){
if (d.getTarget() == dep) return true;
// Look deeper inside:
Collection<Dependency> subDeps = d.search(dep);
if (subDeps != null && !subDeps.isEmpty()) return true;
}
return false;
}
COM: <s> checks that a dependency is not included in a dependency tree </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.