A device to be implanted and assembled in a patient, the device comprising a base part comprising a liquefiable material at least on a distal side thereof, and comprising a nail or plate for being inserted in an inner space of a tubular bone for stabilizing a fracture of the tubular bone, the nail or plate comprising a non-liquefiable material, the device to be assembled with a method comprising the steps of: providing the base part, the base part being pin-shaped, and providing the nail or plate, providing a through opening in the bone tissue of the tubular bone of the patient, the opening comprising a proximal and a distal mouth, positioning the nail or plate relative to the bone tissue, positioning the base part in the through opening such that according to a first alternative a distal end or portion thereof is in contact with the nail or plate or such that according to a second alternative the base part reaches through a through opening of the nail or plate and is in contact with an opposite wall of the tubular bone and its proximal face is situated in the region of the proximal mouth of the opening, according to the first alternative, pressing the base part against the nail or plate and coupling mechanical vibration into the base part for a time sufficient for liquefying the liquefiable material of the base part and letting it fill a space between the nail or plate and the bone wall of the tubular bone, said space being located in a region of the through opening, according to the second alternative, pressing the base part against the opposite wall and coupling mechanical vibration into the base part for a time sufficient for liquefying the liquefiable material of the base part and letting it fill a space between the nail or plate and the opposite wall of the tubular bone, and for letting the liquefiable material penetrate the structure of the opposite wall of the tubular bone, whereby said space according to the first and second alternative constitutes a geometrical retention forming a second joining location suitable to form a positive fit connection with the liquefiable material. providing the base part, the base part being pin-shaped, and providing the nail or plate, providing a through opening in the bone tissue of the tubular bone of the patient, the opening comprising a proximal and a distal mouth, positioning the nail or plate relative to the bone tissue, positioning the base part in the through opening such that according to a first alternative a distal end or portion thereof is in contact with the nail or plate or such that according to a second alternative the base part reaches through a through opening of the nail or plate and is in contact with an opposite wall of the tubular bone and its proximal face is situated in the region of the proximal mouth of the opening, according to the first alternative, pressing the base part against the nail or plate and coupling mechanical vibration into the base part for a time sufficient for liquefying the liquefiable material of the base part and letting it fill a space between the nail or plate and the bone wall of the tubular bone, said space being located in a region of the through opening, according to the second alternative, pressing the base part against the opposite wall and coupling mechanical vibration into the base part for a time sufficient for liquefying the liquefiable material of the base part and letting it fill a space between the nail or plate and the opposite wall of the tubular bone, and for letting the liquefiable material penetrate the structure of the opposite wall of the tubular bone, whereby said space according to the first and second alternative constitutes a geometrical retention forming a second joining location suitable to form a positive fit connection with the liquefiable material.