__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/11024484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testArrayReadMethod() {
try {
IndexedPropertyDescriptor descriptor =
(IndexedPropertyDescriptor)propertyUtilsBean.getPropertyDescriptor(bean, "stringArray");
assertNotNull("No Array Read Method", descriptor.getReadMethod());
} catch(Exception e) {
fail("Threw exception " + e);
}
}
COM: <s> test read method for an array </s>
|
funcom_train/31223192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectCurrentUfo() {
DrawSelection drawSelection = aspectController.getSelection();
drawSelection.clear();
Vector ufoEvents = model.getEvents(aspectController.getTimeKey(), currentUFO);
for (int i = 0; i < ufoEvents.size(); i++) {
DrawEvent event = (DrawEvent) ufoEvents.elementAt(i);
drawSelection.add(event);
}
}
COM: <s> select all shapes of the current ufo </s>
|
funcom_train/8241146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPipe() throws Exception {
System.out.println("pipe");
Reader in = null;
OutputStream out = null;
Util.pipe(in, out);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of pipe method of class util </s>
|
funcom_train/26147276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public V get(Object k) {
K key = (K) k; // this casts from object to object just to fudge type-checking
int hash = hash(key);
for (Entry<K,V> e = table[indexFor(hash, table.length)];
e != null;
e = e.next) {
// should probably re-enable hash checking before key checking
if (e.hash == hash && deepEquals(e.key,key))
//if (deepEquals(e.key,key))
return e.value;
}
return null;
}
COM: <s> returns the value to which the specified key is mapped </s>
|
funcom_train/20043993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _last() {
try {
oObj.last() ;
} catch (SQLException e) {
log.println("Exception occured :") ;
e.printStackTrace(log) ;
tRes.tested("last()", false) ;
return ;
}
tRes.tested("last()", true) ;
}
COM: <s> places the cursor on the last row </s>
|
funcom_train/50862708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPopulationCapacity() {
int result = 0;
Iterator<Building> i = buildingManager.getBuildings(
LivingAccommodations.NAME).iterator();
while (i.hasNext()) {
Building building = i.next();
LivingAccommodations livingAccommodations = (LivingAccommodations) building
.getFunction(LivingAccommodations.NAME);
result += livingAccommodations.getBeds();
}
return result;
}
COM: <s> gets the population capacity of the settlement </s>
|
funcom_train/33233859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getLearnedMainSI() {
if (learnedMainSI == null) {//GEN-END:|114-getter|0|114-preInit
// write pre-init user code here
learnedMainSI = new StringItem("Learned Cards:", null);//GEN-LINE:|114-getter|1|114-postInit
// write post-init user code here
}//GEN-BEGIN:|114-getter|2|
return learnedMainSI;
}
COM: <s> returns an initiliazed instance of learned main si component </s>
|
funcom_train/10628347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testClearBitNegativeInside4() {
String as = "-4294967295";
String res = "-4294967296";
int number = 0;
BigInteger aNumber = new BigInteger(as);
BigInteger result = aNumber.clearBit(number);
assertEquals(res, result.toString());
}
COM: <s> clear bit 0 in the negative number of length 1 </s>
|
funcom_train/8880894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSpringConfigFile(String jarFileName, String fileName, JarFile jarFile, JarEntry jarEntry) {
if (! fileName.endsWith(".xml"))
return false;
Element rootElement = loadRootElementOfTheFile(jarFileName, fileName, jarFile, jarEntry);
return rootElement.getName().equals("beans");
}
COM: <s> checks whether the file is spring configuration file </s>
|
funcom_train/32185572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FileInfo getFileInfo() {
if (fileInfo == null) {
String name = fileName.getText();
if (name.length() == 0) return null;
app.clientSideMethodCallWaitForReturn("tw_FileChooser", "submit", app.getComponentId(fileName));
fileInfo = ((Application) app).getFileInfo();
fileInfo.fullName = name;
}
return fileInfo;
}
COM: <s> initiates the upload of the file from the users machine to the server </s>
|
funcom_train/19683313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getVOIfromImage(final ModelImage modelImage) {
VOIVector vector = modelImage.getVOIs();
for (Iterator<VOI> iterator = vector.iterator(); iterator.hasNext();) {
VOI voi = (VOI) iterator.next();
if (!registeredVOIs.containsKey(voi)) {
registeredVOIs.put(voi, modelImage.getImageName());
}
}
}
COM: <s> get all the voi of given model image </s>
|
funcom_train/21876698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected QueryResults performQuery() {
final String qstring = getQueryString();
Logger.getLogger(this.getClass()).debug("template query string set to:\n" + qstring);
final Query query = new Query(qstring);
query.setSource(getModel());
final QueryExecution qe = new QueryEngine(query);
return qe.exec();
}
COM: <s> perform the query and return the query results </s>
|
funcom_train/1422351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updatePosition(Widget w, double radian, double offset) {
radian += offset;
double x = radius * Math.cos(radian) + centerX;
double y = radius * Math.sin(radian) + centerY;
absolutePanel.setWidgetPosition(w, (int) x, (int) y);
}
COM: <s> update the position of the widget adding a rotational offset </s>
|
funcom_train/14177733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getMails(Player p) {
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
Transaction tx = null;
List result = null;
try {
tx = session.beginTransaction();
Query q = session
.createQuery("from Mail where TOID like :un order by SENDTIME DESC");
q.setInteger("un", p.getPlayerId());
result = q.list();
tx.commit();
} catch (HibernateException he) {
if (tx != null) {
tx.rollback();
}
throw he;
}
return result;
}
COM: <s> returns all mails of player p </s>
|
funcom_train/20646879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void compactTreeAutoShowCheckActionPerformed() {
Boolean b= new Boolean(compactTreeAutoShrinkCheck.isSelected());
BC.setParameter("autoShrinkView", b);
// Take actions for Compact Explorer to work properly...
this.compExplorer.setAutoShrinkView(b.booleanValue());
}
COM: <s> set the autoshrink property for compact explorer </s>
|
funcom_train/41163200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OpenResponse3 update(OpenResponse3 entity) {
EntityManagerHelper.log("updating OpenResponse3 instance", Level.INFO, null);
try {
OpenResponse3 result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved open response3 entity and return it or a copy </s>
|
funcom_train/40647973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writePropertyMethodHeader(final JMethod method) {
String methodName = method.getName();
if (methodName.startsWith("get")) {
String type = method.getReturnType().getQualifiedSourceName();
this.writeMethodHeader(methodName, type, null);
} else {
JParameter setterParam = method.getParameters()[0];
this.writeMethodHeader(methodName, "void", getSetterArgument(setterParam));
}
}
COM: <s> writes method header for property method setter or getter eg public final java </s>
|
funcom_train/45502876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAssociatedFloor( Floor floor ) throws IllegalArgumentException {
try {
if( floor != null ) {
//ChangeEvents are thrown by Floor class
associatedFloor.deleteRoom( this );
associatedFloor = floor;
floor.addRoom( this );
} else {
throw new IllegalArgumentException( ZLocalization.getSingleton().getString( "ds.z.Room.NoFloorException" ) );
}
} catch( IllegalArgumentException ex ) {
throw ex;
}
}
COM: <s> sets the associated floor of this room </s>
|
funcom_train/2612094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String dumpOptions() {
StringBuilder buff = new StringBuilder(ShikariConstants.NEW_LINE);
buff.append(ShikariConstants.NEW_LINE);
for (Map.Entry<String, String> entry : options.entrySet()) {
buff.append(entry.getKey());
buff.append("="); //$NON-NLS-1$
buff.append(entry.getValue());
buff.append(ShikariConstants.NEW_LINE);
}
return buff.toString(); /*I18NOK:LSM*/
}
COM: <s> return a tt string tt with the options </s>
|
funcom_train/47527655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void keyPressed(int keyCode) {
int action = getGameAction(keyCode);
switch (action) {
case UP:
gf.move(GameField.UP);
break;
case DOWN:
gf.move(GameField.DOWN);
break;
case LEFT:
gf.move(GameField.LEFT);
break;
case RIGHT:
gf.move(GameField.RIGHT);
break;
default:
break;
}
}
COM: <s> handle a single key event </s>
|
funcom_train/8074280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOptions(String[] options) throws Exception {
String wString = Utils.getOption('W', options);
if (wString.length() != 0) {
setClusterer(Clusterer.forName(wString,
Utils.partitionOptions(options)));
} else {
throw new Exception("A clusterer must be specified with the -W option.");
}
}
COM: <s> parses a given list of options </s>
|
funcom_train/3904073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTargetObjectiveIDPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ObjectiveMappingType_targetObjectiveID_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ObjectiveMappingType_targetObjectiveID_feature", "_UI_ObjectiveMappingType_type"),
ImsssPackage.Literals.OBJECTIVE_MAPPING_TYPE__TARGET_OBJECTIVE_ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the target objective id feature </s>
|
funcom_train/32825429 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isOnBuildPath(IResource resource, IProgressMonitor monitor) {
boolean onBuildPath = false;
IJavaElement javaElement = JavaCore.create((IFile) resource);
if (javaElement != null) {
IPackageFragmentRoot root =
(IPackageFragmentRoot) javaElement.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
onBuildPath = root.exists();
}
return onBuildPath;
}
COM: <s> return a boolean indicating whether or not the specified resource </s>
|
funcom_train/50578838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Context getLocalContext(Node n) {
// set up instance-specific contexts
VariableContext vc = new JstlVariableContext();
ContextSupport cs = new ContextSupport(nc, fc, vc, dn);
Context c = new Context(cs);
List l = new ArrayList(1);
l.add(n);
c.setNodeSet(l);
return c;
}
COM: <s> returns a locally appropriate jaxen context given a node </s>
|
funcom_train/22573940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransform(String systemId) throws Exception {
System.out.println("Transform:setTransform: " + systemId);
StreamSource streamSource;
//StringBufferInputStream is = new StringBufferInputStream(s);
streamSource = new StreamSource(systemId);
if (tFactory == null)
tFactory = TransformerFactory.newInstance();
transformer = tFactory.newTransformer(streamSource);
}
COM: <s> set the transform by providing a string representing a uri </s>
|
funcom_train/9851410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addOneEdge(int type, EmailVertex v1, EmailVertex v2){
if(!containsVertex(v1)) addVertex(v1);
if(!containsVertex(v2)) addVertex(v2);
Collection<EmailEdge> hs = findEdgeSet(v1, v2);
if(hs==null){
addEdge(new EmailEdge(type), v1, v2);
return;
}
if(hs.isEmpty()){
addEdge(new EmailEdge(type), v1, v2);
return;
}
}
COM: <s> add new edge </s>
|
funcom_train/18049442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IStructuredContentProvider createContentProvider() {
return new IStructuredContentProvider(){
public Object[] getElements(Object inputElement) {
if (inputElement instanceof XqueryBundle) {
XqueryBundle bundle = (XqueryBundle) inputElement;
return bundle.getAllXqueries().toArray();
}
return null;
}
public void dispose() {
// noop
}
public void inputChanged(Viewer viewer, Object oldInput,
Object newInput) {
// noop
}
};
}
COM: <s> creates the content provider </s>
|
funcom_train/49044770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTargetActorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Dependency_targetActor_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Dependency_targetActor_feature", "_UI_Dependency_type"),
ModelPackage.Literals.DEPENDENCY__TARGET_ACTOR,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the target actor feature </s>
|
funcom_train/25069709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean markerExists(IFile file, int annotID){
boolean exists = false;
IMarker[] annotations = null;
try{
annotations = file.findMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
for(int i=0; i < annotations.length; i++){
if(annotations[i].getAttribute("ID").equals(annotID)){
exists = true;
}
}
} catch (CoreException e) {
System.out.println(e.getMessage());
}
return exists;
}
COM: <s> finds whether an annotation exists or not </s>
|
funcom_train/42709665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getContinuarCommand() {
if (continuarCommand == null) {//GEN-END:|64-getter|0|64-preInit
// write pre-init user code here
continuarCommand = new Command("Continuar", Command.ITEM, 0);//GEN-LINE:|64-getter|1|64-postInit
// write post-init user code here
}//GEN-BEGIN:|64-getter|2|
return continuarCommand;
}
COM: <s> returns an initiliazed instance of continuar command component </s>
|
funcom_train/44018222 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void EnableSelectedSource() {
final String src = (String) DisabledSourcesList.getSelectedValue();
if (src == null) return;
if (PluginSources.addSource(src)) {
final DefaultListModel enabledModel = (DefaultListModel) EnabledSourcesList
.getModel();
enabledModel.addElement(src);
final DefaultListModel disabledModel = (DefaultListModel) DisabledSourcesList
.getModel();
disabledModel.removeElement(src);
}
}
COM: <s> enable the currently selected source plugin by creating the appropriate </s>
|
funcom_train/49159665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SponsoringContract getSignedContractByType(String type) {
SponsoringContract result = null;
for (int i = 0; i < signedContracts.size(); i++) {
if (signedContracts.get(i).getSponsoringType().equalsIgnoreCase(type)) {
return signedContracts.get(i);
}
}
return result;
}
COM: <s> returns the signed sponsoring contract by sponsoring type </s>
|
funcom_train/18347494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseReleased(MouseEvent event) {
// If we are tracing a line, finish it up here.
if (isTracing) {
isTracing = false;
// Handle the auto-dititize line tracing completion.
if (mode == kAutoDigitize)
doAutoDigitization();
// Handle the point dragging completion.
else if (dragIndex >= 0) {
doDragPointComplete();
dragIndex = -1;
}
}
isShiftDrag = false;
}
COM: <s> used in conjunction with mouse dragged to determine </s>
|
funcom_train/39876612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int writeEntityHeader(String key, int dataSize) throws IOException {
int result = writeEntityHeader_native(mBackupWriter, key, dataSize);
if (result >= 0) {
return result;
} else {
throw new IOException("result=0x" + Integer.toHexString(result));
}
}
COM: <s> mark the beginning of one record in the backup data stream </s>
|
funcom_train/51643459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean canRemoveCompletely(IPackageFragment pack) throws JavaModelException {
final IPackageFragment[] subPackages= JavaElementUtil.getPackageAndSubpackages(pack);
for (int i= 0; i < subPackages.length; i++) {
if (!(subPackages[i].equals(pack)) && !(fPackagesToDelete.contains(subPackages[i])))
return false;
}
return true;
}
COM: <s> returns true if this initially selected package is really deletable </s>
|
funcom_train/4544298 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int unset(int pos) {
if (pos >= capacity) {
return 0;
}
int windex = pos >> 5;
int mask = 0x80000000 >>> (pos & 0x1F);
int word = map[windex];
int result = (word & mask) == 0 ? 0
: 1;
mask = ~mask;
map[windex] = (word & mask);
return result;
}
COM: <s> unsets pos and returns old value </s>
|
funcom_train/39569899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void syncAll(boolean force) throws InterruptedException {
synchronized (lock){
updateSize();
try{
for(int i=0;i<size();i++){
if(!isSync(i) || force)
try {
syncSingle(i);
} catch (NumberFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (HyperCastStatsException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}catch(NoSuchPortalException nspe){
/* should not happend after updating the size */
}
}
}
COM: <s> synchronizes with all run servers </s>
|
funcom_train/37891281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Sequence findByQName(QName qname, AtomicValue comparisonCriterium, Sequence contextSequence) throws XPathException {
NodeSet contextSet = contextSequence.toNodeSet();
DocumentSet docSet = contextSet.getDocumentSet();
ValueIndexKeyFactory
// Indexable
indexable = new QNameValueIndexKeyFactory( (Indexable)comparisonCriterium, qname);
int relation = Constants.EQ;
return find(relation, docSet, contextSet, indexable);
}
COM: <s> called from the special xquery function util qname index lookup </s>
|
funcom_train/29581949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParsedToken decode(Object token) throws PbaException {
logger.debug("decode SAML <Response> Element");
this.primaryCheck(token,roleHierarchy);
Response response = this.buildResponseFromXML((Element)token);
Object[] assertions = this.getSAMLAssertions(response);
return this.decodeSAMLAssertions(assertions);
}
COM: <s> this method decodes a given saml response </s>
|
funcom_train/34283039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reload() throws IOException {
String oldEncoding = getEncoding();
UnicodeReader ur = new UnicodeReader(loc.getInputStream(), oldEncoding);
String encoding = ur.getEncoding();
BufferedReader r = new BufferedReader(ur);
try {
read(r, null); // Dumps old contents.
} finally {
r.close();
}
setEncoding(encoding);
setDirty(false);
syncLastSaveOrLoadTimeToActualFile();
discardAllEdits(); // Prevent user from being able to undo the reload
}
COM: <s> reloads this file from disk </s>
|
funcom_train/48883029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JToolBar getToolBar() {
if (toolBar == null) {
toolBar = new JToolBar();
toolBar.setRollover(true);
toolBar.add(newProjectAction).setToolTipText("New Project");
toolBar.add(openProjectAction).setToolTipText("Open Project");
toolBar.add(saveAction).setToolTipText("Save Project");
toolBar.add(saveAllAction).setToolTipText("Save All");
}
return toolBar;
}
COM: <s> this method initializes tool bar </s>
|
funcom_train/3369653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateHSB( float h, float s, float b ) {
if ( !isAdjusting ) {
isAdjusting = true;
updatePalette( h, s, b );
updateSlider( h, s, b );
updateHSBTextFields( h, s, b );
Color color = Color.getHSBColor(h, s, b);
updateRGBTextFields( color );
getColorSelectionModel().setSelectedColor( color );
isAdjusting = false;
}
}
COM: <s> main internal method of updating the ui controls and the color model </s>
|
funcom_train/12767835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer result = new StringBuffer();
result.append(href).append(":").append(description).append(":").append(extended).append(":").append(hash).append(":")
.append(tag).append(":").append(time).append(":").append(shared);
return result.toString();
}
COM: <s> object as href description extended hash tag time string </s>
|
funcom_train/5678948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void uninstall( String path) {
String fullPath = getFullPath( path);
for ( int i = 0; i < conduits.size(); i++) {
ConduitInformation info = (ConduitInformation)conduits.elementAt(i);
if ( info.getLocation().equals( fullPath)) {
properties.removeConduit( info);
System.out.println( "Conduit ["+path+"] un-installed!");
return;
}
}
System.out.println( "ERROR: Conduit could not be un-installed.");
}
COM: <s> uninstalls the conduit as identified by the path </s>
|
funcom_train/47534036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFile(Music file) {
Directory dir = this;
if (getFullpath().compareTo(file.getPath()) == 0) {
file.setParent(this);
files.put(file.getFilename(), file);
} else {
dir = makeDirectory(file.getPath());
dir.addFile(file);
}
}
COM: <s> adds a file creating path directories mkdir p </s>
|
funcom_train/10792381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearMapping() {
_strategy = null;
_fk = null;
_unq = null;
_idx = null;
_outer = false;
_orderCol.setColumn(null);
_val.clearMapping();
_key.clearMapping();
_elem.clearMapping();
_info.clear();
setResolve(MODE_MAPPING, false);
}
COM: <s> clear mapping information including strategy </s>
|
funcom_train/7511039 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemHelp() {
if (jMenuItemHelp == null) {
jMenuItemHelp = new JMenuItem();
jMenuItemHelp.setText(Messages.getString("MainFrame.menu.helpImpl")); //$NON-NLS-1$
jMenuItemHelp.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0));
registerAction(jMenuItemHelp, Actions.HELP);
}
return jMenuItemHelp;
}
COM: <s> this method initializes j menu item help </s>
|
funcom_train/10543234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test3UpdateBeforeTrigger() throws SQLException{
if (isDerby1482Fixed == false)
return;
if (testWithLargeDataInLOB)
return;
basicSetup();
Statement s = createStatement();
s.execute("create trigger trigger1 no cascade before update of bl on table1 referencing " +
"new as n_row for each row " +
"select updates from table2 where table2.id = n_row.id");
commit();
runtest2UpdateTrigger();
}
COM: <s> this test creates a before update trigger which selects a row </s>
|
funcom_train/41216465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute() {
try {
makeDiff();
}
catch (IOException e) {
System.err.println("Error: " + e.getMessage());
e.printStackTrace();
}
showResultMessage();
/*
Collections.sort(allFiles);
for (File file : allFiles) {
System.out.println("file = " + file);
}
Collections.sort(newFiles);
*/
}
COM: <s> p ant task interface implementation </s>
|
funcom_train/9667199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void todayIs() {
DateTime now = new DateTime();
todayIsLabel.setText("Today is : " + now.dayOfWeek().getAsText() + ", " + now.getDayOfMonth() + " " +
now.monthOfYear().getAsText() + " " + now.getYearOfEra());
}
COM: <s> updates the label which displays the current date </s>
|
funcom_train/37855171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPropertyValue(String propertyName) {
if (propertyName == null) {
return null;
}
String value = getConfigFile().getPropertyValue(SVNKIT_GROUP, propertyName);
if (value == null) {
value = getConfigFile().getPropertyValue(OLD_SVNKIT_GROUP, propertyName);
}
return value;
}
COM: <s> returns the value of a property from the i svnkit i section </s>
|
funcom_train/2388287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRoundTrip() throws Exception {
byte[] encResult = TwofishPws.processECB(Util.unsignedToSigned(key), true, Util.unsignedToSigned(plainText));
byte[] decResult = TwofishPws.processECB(Util.unsignedToSigned(key), false, encResult);
assertEquals(Util.bytesToHex(Util.unsignedToSigned(plainText)), Util.bytesToHex(decResult));
}
COM: <s> tests we can encrypted and decrypt and get back to square </s>
|
funcom_train/10482673 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected POP3Connection createPoolConnection() throws MessagingException {
POP3Connection connection = new POP3Connection(props);
if (!connection.protocolConnect(host, port, authid, realm, username, password)) {
// we only add live connections to the pool. Sever the connections and
// allow it to go free.
connection.closeServerConnection();
return null;
}
// just return this connection
return connection;
}
COM: <s> creates an authenticated pool connection and adds it to </s>
|
funcom_train/31890255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processDataStoreListenerEcho(Element root) {
String rq = root.elementText("listenerid");
CalendarWindow w = (CalendarWindow) listenerWindows.get(rq);
if (w == null) {
log.fine("Unknown listener echo arrived, request ID: " + rq);
return;
}
w.processListenerEcho(root);
}
COM: <s> processes the data store listener echo </s>
|
funcom_train/24463108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSup(int newSup) {
if (newSup != this.sup) {
if (this.supStamp <= environment.getWorldIndex()) {
environment.savePreviousState(tree, this, IStateBinaryTree.SUP);
this.supStamp = environment.getWorldIndex();
}
this.sup = newSup;
}
}
COM: <s> set a new upper bound to the node and saving it if needed </s>
|
funcom_train/50342358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShowHidden(boolean state) {
_showHidden = state;
if (_showHidden) {
for (int i = 0; i<_contents.size(); i++) {
_contents.get(i).setVisible(true);
}
} else {
for (int i = 0; i<_contents.size(); i++) {
_contents.get(i).showHidden();
}
}
}
COM: <s> control whether target panel hidden items are visible or not </s>
|
funcom_train/11679859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Property getPropertyObject(String name) {
Object o = globalProps.get(name);
Property prop = null;
if(o != null && o instanceof Property) {
prop = (Property) o;
} else {
handleException("Property with name " + name + " doesnt exists in the registry");
}
return prop;
}
COM: <s> get the property object of the named property </s>
|
funcom_train/3921252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void register() throws XindiceException {
if(_database == null) {
try {
Class driverClass = Class.forName(driver);
_database = (org.xmldb.api.base.Database)driverClass.newInstance();
DatabaseManager.registerDatabase(_database);
}
catch(Exception ex) {
throw new XindiceException(ex);
}
}
}
COM: <s> register the database </s>
|
funcom_train/5322435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double calcHeight() {
for (Iterator i = owner.getChildren(Position.EXTERNAL_DETAIL);
i.hasNext(); ) {
Entity start = (Entity)(i.next());
recursiveHeight(start, 0.0);
// Only one starting point, crowds are not handled.
return max-min;
}
return 0.0;
}
COM: <s> calculates the height of the overviews group </s>
|
funcom_train/37596361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: @Override public TypeContext importField(DJClass c, String name) {
ImportContext result = new ImportContext(this);
// Under strict circumstances, a duplicate import for a name is illegal, but DynamicJava allows it
result._importedFields.put(name, c);
return result;
}
COM: <s> import the field s of </s>
|
funcom_train/45759019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addShiftedExtents(Object node, int amount, Vector extents) {
Tokens tokens = (Tokens)get(node);
if (tokens != null) {
final int size = tokens.size(); int i = 0;
do {
extents.addElement(tokens.tokenAt(i++).shift(amount));
}
while (i < size);
}
}
COM: <s> the function retrieves tokens associated with node if any </s>
|
funcom_train/29828878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized protected void setComposing() {
if (!sendComposingEvents) return;
if (composingTimer == null) {
composingTimer = new javax.swing.Timer(COMPOSING_TIME_OUT, new ActionListener() {
public void actionPerformed(ActionEvent e) {
stopComposing();
}
});
composingTimer.setInitialDelay(COMPOSING_TIME_OUT);
sendComposing();
}
composingTimer.restart();
}
COM: <s> sets composing re starts timer and sends composing cancelled event </s>
|
funcom_train/32068693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeEmailMessageAttachment(EmailMessageAttachment emailMessageAttachment) {
boolean removedOK = getEmailMessageAttachments().remove(emailMessageAttachment);
if (removedOK) {
emailMessageAttachment.setEmailMessage(null);
} else {
if (logger.isWarnEnabled()) {
logger.warn("remove returned false");
}
}
return removedOK;
}
COM: <s> remove the passed email message attachment from the email message collection and unset </s>
|
funcom_train/47856915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Image loadIcon(String name) {
InputStream is = ClassLoader.getSystemResourceAsStream("icons/"+name); //$NON-NLS-1$
if (is == null)
//is = getClass().getResourceAsStream("jar:icons/"+name);
is = ClassLoader.getSystemResourceAsStream ("jar:icons/"+name); //$NON-NLS-1$
if (is == null)
throw new RuntimeException(Messages.getString("MainWindow.38")+name); //$NON-NLS-1$
return new Image(display, is);
}
COM: <s> loads an image looks into the filesystem and into the jar </s>
|
funcom_train/46733273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCostCurrencyRef(DisplayModel costCurrencyRef) {
if (Converter.isDifferent(this.costCurrencyRef, costCurrencyRef)) {
DisplayModel oldcostCurrencyRef= new DisplayModel(this);
oldcostCurrencyRef.copyAllFrom(this.costCurrencyRef);
this.costCurrencyRef.copyAllFrom(costCurrencyRef);
setModified("costCurrencyRef");
firePropertyChange(String.valueOf(CHARGEITEMLOGS_COSTCURRENCYREFID), oldcostCurrencyRef, costCurrencyRef);
}
}
COM: <s> units the charge item quantity is measured in </s>
|
funcom_train/18513674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ElementName getElementName(String name) {
Element element = (Element) elements.get(name);
if (element != null) { return element.getElementName(); }
// in all bad cases, ie if the dtd does not give the answer, returns a
// default ElementName
return new ElementName(ElementName.TYPE_NAME, null);
}
COM: <s> gets the element name of a given element </s>
|
funcom_train/34005921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveNewSaleDet(SalesDetBean salesDet) throws CommonException{
try {
this.getConfig().startTransaction();
this.getConfig().insert("sales.insSalesDet", salesDet);
this.getConfig().commitTransaction();
} catch (SQLException e) {
e.printStackTrace();
throw new CommonException(e);
} finally {
try {
this.getConfig().endTransaction();
} catch (SQLException e) {
e.printStackTrace();
throw new CommonException(e);
}
}
}
COM: <s> insert detail record </s>
|
funcom_train/34137445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onKeyboardModeChanged(int mode) {
LatinTutorialLogger.log(Log.INFO, "Keyboard mode changed to %d", mode);
mKeyboardMode = mode;
if (mActiveModule != null && mActiveModule instanceof KeyboardModeListener) {
((KeyboardModeListener) mActiveModule).onKeyboardModeChanged(mode);
}
}
COM: <s> updates the internal representation of the keyboard mode and notifies </s>
|
funcom_train/21017418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPreferredSize(Dimension2D preferredSize) {
if (preferredSize != null) {
requireTrue(preferredSize.getWidth() >= 0,
"@require (preferredSize.getWidth() >= 0)");
requireTrue(preferredSize.getHeight() >= 0,
"@require (preferredSize.getHeight() >= 0)");
}
_preferredSize = preferredSize;
}
COM: <s> sets the preferred size of the scroll decorator </s>
|
funcom_train/50370823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayMatrix(int matrixLimits) {
// display contents of matrix
for (int i = 0; i < matrixLimits; i++) {
for (int j = 0; j < matrixLimits; j++) {
if (j <= i) {
short count = (Short) ((ArrayList) matrix.get(i)).get(j);
if(count >0)
System.out.println("("+i + "," + j + ") --" + count);
}
}
}
}
COM: <s> utility method to display the marix </s>
|
funcom_train/49045812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButtonMenuItem getJRadioButtonActual() {
if (buttActual == null) {
buttActual = new JRadioButtonMenuItem();
buttActual.setText("Actual");
buttActual.setPreferredSize(new Dimension(85,10));
buttActual.setToolTipText("does nothing with result");
buttActual.addActionListener(this);
buttActual.setActionCommand("parameter");
//buttActual.setEnabled(false);
}
return buttActual;
}
COM: <s> this method initializes the option actual </s>
|
funcom_train/3387988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openLogFile(boolean truncate) throws IOException {
try {
close();
} catch (IOException e) { /* assume this is okay */
}
logName = versionName(logfilePrefix);
try {
log = (logClassConstructor == null ?
new LogFile(logName, "rw") :
logClassConstructor.newInstance(logName, "rw"));
} catch (Exception e) {
throw (IOException) new IOException(
"unable to construct LogFile instance").initCause(e);
}
if (truncate) {
initializeLogFile();
}
}
COM: <s> opens the log file in read write mode </s>
|
funcom_train/40105334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadDiscussions() {
discussions = new LinkedList<Discussion>();
try {
IResource[] files = getDiscussionFolder().members();
for (IResource resource : files) {
if (resource instanceof IFile) {
IFile file = (IFile) resource;
if (isExtentionLegel(file.getName(), "dis")) { //$NON-NLS-1$
discussions.add(new Discussion(this, file.getLocation()
.toOSString()));
}
}
}
} catch (CoreException e) {
e.printStackTrace();
}
}
COM: <s> reloads the discussions in the tree </s>
|
funcom_train/45692577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEdit1PropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ParametersFx_edit1_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ParametersFx_edit1_feature", "_UI_ParametersFx_type"),
EsxPackage.Literals.PARAMETERS_FX__EDIT1,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the edit1 feature </s>
|
funcom_train/24312239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void replaceResourcePath(org.enhydra.xml.xmlc.html.HTMLObject page) {
replaceResourcePathForTagName(page, "script", "src");
replaceResourcePathForTagName(page, "link", "href");
replaceResourcePathForTagName(page, "img", "src");
}
COM: <s> replaces references to static resources on page </s>
|
funcom_train/375448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testValidateHttpJBufferPacketHandlerWithLocalPacketScanner() {
pcap.loop(Pcap.LOOP_INFINATE, new JBufferHandler<Pcap>() {
public void nextPacket(PcapHeader header, JBuffer buffer, Pcap pcap) {
assertNotNull(buffer);
final int id = JRegistry.mapDLTToId(pcap.datalink());
PcapPacket packet = new PcapPacket(header, buffer);
assertNotNull(packet);
packet.scan(id);
}
}, pcap);
}
COM: <s> test validate http j buffer packet handler with local packet scanner </s>
|
funcom_train/823594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration getPrefixes(String uri) {
Vector prefixes = new Vector();
Enumeration allPrefixes = getPrefixes();
while (allPrefixes.hasMoreElements()) {
String prefix = (String) allPrefixes.nextElement();
if (uri.equals(getURI(prefix))) {
prefixes.addElement(prefix);
}
}
return prefixes.elements();
}
COM: <s> return an enumeration of all prefixes for a given uri whose declarations </s>
|
funcom_train/2769938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String toStringImpl() throws Exception {
StringBuffer sb = new StringBuffer();
Field[] fields;
Field field;
sb = new StringBuffer();
sb.append('[');
fields = getClass().getDeclaredFields();
int len = fields.length;
for (int i = 0; i < len; i++) {
field = fields[i];
sb.append(field.getName());
sb.append('=');
sb.append(field.get(this));
if (i + 1 < len) {
sb.append(',');
sb.append(' ');
}
}
sb.append(']');
return sb.toString();
}
COM: <s> provides the implementation of the to string method </s>
|
funcom_train/14306395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveToPropertyAsString(int list, String propertyName) {
Object[] elements = lists[list].toArray();
int i;
for (i = 0; i < elements.length; i++) {
jEdit.setProperty(propertyName + "." + i, elements[i].toString());
}
jEdit.unsetProperty(propertyName+"."+i);
}
COM: <s> saves a list to a property array first item stored in property name </s>
|
funcom_train/40118969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File isTortugaJar(String path) {
if (null == path) {
return null;
}
File f = new File(path);
if (f.getName().equalsIgnoreCase(aspectJ5 ? "tortuga-tiger.jar" : "tortuga.jar"))
return (f);
return (null);
}
COM: <s> determines whether the path represents the tortuga </s>
|
funcom_train/42350405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void broadcast( final Message m) {
ShortestPathsTree<NetAddress> t = Spanner.shortestPathsTree( this.address) ;
for( NetAddress i : Network.addresses() )
if (i == this.address)
m.deliverTo(this, i.endpoint.handler );
else {
double delay = t.cost(i) * (1 + Network.JITTER * rg.nextDouble() ) ;
new UdpPacket( this, i.endpoint, m, delay );
}
}
COM: <s> sends a message to all the nodes in the simulation </s>
|
funcom_train/10055588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
GridLayout gridLayout = new GridLayout();
gridLayout.setRows(1);
jContentPane = new JPanel();
jContentPane.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
jContentPane.setLayout(gridLayout);
jContentPane.add(getJTabbedPane(), null);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/35844109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addClass() {
Object target = getTarget();
if (Model.getFacade().isANamespace(target)) {
Object ns = target;
Object ownedElem = Model.getCoreFactory().buildClass();
Model.getCoreHelper().addOwnedElement(ns, ownedElem);
TargetManager.getInstance().setTarget(ownedElem);
}
}
COM: <s> create a class </s>
|
funcom_train/19054070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleGlobal(StructureProject strProject) {
projectName = strProject.getName();
theParser.setGlobalProperties("projectname", strProject.getName());
theParser.setGlobalProperties("uid", strProject.getUid());
theParser.setGlobalProperties("defaultview", strProject.getView());
theParser.setGlobalProperties("defaultmenu", strProject.getMenu());
theParser.setGlobalProperties("DEFAULTMENU", strProject.getMenu().toUpperCase());
}
COM: <s> this method sets the global variables </s>
|
funcom_train/47967719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeToFile(String fileName, String content){
BufferedWriter bw = null;
try{
bw = new BufferedWriter(new FileWriter(fileName));
try{
bw.write(content);
}
finally{
bw.close();
}
}
catch(IOException e){
e.printStackTrace();
}
}
COM: <s> method to write the content to a file </s>
|
funcom_train/27778657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void destroySubcontext(final String name) throws BindingException{
try{
AccessController.doPrivileged(
new PrivilegedExceptionAction<Object>(){
public Object run() throws IOException{
getMyProperties();//init
FileUtils.deleteRecursively(new File(myDirCache,name));
return null;
}
});
}catch(PrivilegedActionException e){
throw new BindingException(this, e.getCause());
}
}
COM: <s> recursively destroys all bindings and subcontexts beneath the subcontext denoted </s>
|
funcom_train/42435078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testOnlyCoreFilterN1() {
SubjectAttributeFilterCommand coreFieldFilterCommand
= new SubjectAttributeFilterCommand(sessionProperties);
coreFieldFilterCommand.setCoreFieldDataStorageName("core_field_B");
coreFieldFilterCommand.setFieldValue("Female");
try {
ArrayList<String> results
= loggingServiceAPI.applyOnlySubjectAttributeFilter(endUser, coreFieldFilterCommand);
assertEquals(3, results.size());
Collections.sort(results);
assertEquals("CS005", results.get(0));
assertEquals("CS006", results.get(1));
assertEquals("CS008", results.get(2));
}
catch(Exception exception) {
exception.printStackTrace(System.out);
fail();
}
}
COM: <s> apply only a core filter and return 1 results </s>
|
funcom_train/17939716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void brushModified(Brush b) {
if (b != null){
countLabel.setText(b.getNumBrushed() + " / " + b.getNumValues() + " ");
}
else {
countLabel.setText("0 / " + parallelDisplay.getNumRecords() + " ");
}
}
COM: <s> callback triggered if the brush has been modified </s>
|
funcom_train/21796467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeProduct(ProductEntity product) throws ProductException {
if(product!=null){
ShoppingCartLineRemote sclr = this.findLine(product);
if(sclr!=null){
sclr.remove();
this.listShoppingCartLine.remove(sclr);
}else{
throw new ProductException("produit invalide");
}
}
}
COM: <s> supprime un produit </s>
|
funcom_train/26257056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MappingClass getMappingClassNC(String name) {
MappingClass x = (MappingClass) myClasses.get(name);
if (x == null) {
x = new MappingClass(name);
x.setModel(this);
x.setId(IdGenerator.getInstance().getNext());
if (name.length() > 0) {
myClasses.put(name, x);
}
} // end of if (x == null)
return x;
}
COM: <s> getting a mapping class without adding to the changelog </s>
|
funcom_train/20765720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEvent(Event e){
// System.out.println("add event "+e);
int n=numEvents+1;
ensureCapacity(n);
if(e==null) throw new RuntimeException("null event "+e);
// if(timestamps==null) throw new RuntimeException("null timestamps");
// try{
timestamps[n-1]=e.timestamp;
// }catch(NullPointerException ex){
// ex.printStackTrace();
// }
numEvents++; // we added one event
}
COM: <s> appends event to the packet enlarging if necessary </s>
|
funcom_train/24931994 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getStrictLowerBound() {
int possibleLower;
Set<MAssociationEnd> indirectParents = getIndirectParents();
int strictLower = this.assocEnd().multiplicity().getRange().getLower();
for (MAssociationEnd indirectParentAE : indirectParents) {
//intersect
possibleLower = indirectParentAE.multiplicity().getRange().getLower();
strictLower = MMultiplicity.getSmallerNumber(strictLower, possibleLower);
}
return strictLower;
}
COM: <s> calculates redefine strict lower bound </s>
|
funcom_train/48405109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandlerRegistration addMouseWheelHandler(com.smartgwt.client.widgets.events.MouseWheelHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.events.MouseWheelEvent.getType()) == 0) setupMouseWheelEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.events.MouseWheelEvent.getType());
}
COM: <s> add a mouse wheel handler </s>
|
funcom_train/20307613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeConsumer(ConsumerChoicePointFrame ccp) {
consumingCPs.remove(ccp);
// We used to set it complete if there were no consumers left.
// However, a generator might be part of one query, incompletely consumed
// and then opened again on a different query,
// it seems better to omit this. TODO review
// if (!isComplete() &&consumingCPs.isEmpty()) {
// setComplete();
// }
}
COM: <s> remove a terminated consuming choice point from the state set </s>
|
funcom_train/27974866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
if (img == null) return;
if (scale == 1.0) {
g.drawImage(img, 0, 0, this);
} else {
int w = img.getWidth(this);
int h = img.getHeight(this);
if (w > 0 && h > 0)
g.drawImage(img, 0, 0, (int)(w*scale), (int)(h*scale), this);
}
}
COM: <s> this method is called to repaint the component </s>
|
funcom_train/39788968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeUser(String userName, String authToken, String remoteHost) {
if (userManager.authenticate(userName, authToken)) {
userManager.remove(userName);
messageStore.post(null, "User \"" + userName + "\" has exited the chat.");
Log.log(Log.ACTION_EXIT, remoteHost, userName, null);
return true;
} else {
return false;
}
}
COM: <s> removes a user from the chat room </s>
|
funcom_train/13850514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Collection getRoots() {
HashSet roots = new HashSet();
listGraph.addRoots(roots);
Iterator proxyIt = proxies.iterator();
while (proxyIt.hasNext()) {
String proxy = (String) proxyIt.next();
try {
Class proxyClass = Class.forName(proxy, false, loader);
addProxyRoot(proxyClass, roots);
} catch (ClassNotFoundException e) {
String msg = getString("preflistgen.badproxyclass", proxy);
IllegalArgumentException iae = new IllegalArgumentException(msg);
iae.initCause(e);
throw iae;
}
}
return roots;
}
COM: <s> generate the code collection code of roots to use for the dependency </s>
|
funcom_train/46789674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransformation(float[] data) {
cosGetArray().set(0, COSFixed.create(data[0]));
cosGetArray().set(1, COSFixed.create(data[1]));
cosGetArray().set(2, COSFixed.create(data[2]));
cosGetArray().set(3, COSFixed.create(data[3]));
cosGetArray().set(4, COSFixed.create(data[4]));
cosGetArray().set(5, COSFixed.create(data[5]));
}
COM: <s> set all matrix elements a f </s>
|
funcom_train/2425587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setState(EnumSet<Permission> allow, EnumSet<Permission> deny) {
boolean isDenied = (deny != null) && deny.contains(permission);
denyBox.setSelected(isDenied);
boolean isAllowed = !isDenied && (allow != null) && allow.contains(permission);
allowBox.setSelected(isAllowed);
}
COM: <s> sets the selected state of this checkbox pair by querying the specified permission </s>
|
funcom_train/48468837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getNode(String nodePath) throws ItemNotFoundException, RepositoryException, NamingException{
Repository repository = super.getRepository();
Session session = repository.login();
Node node = session.getRootNode();
node = node.getNode(nodePath);
session.logout();
return node;
}
COM: <s> get node on basis of node path </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.