Exploring the Impact of Source Code Linearity on the Programmers Comprehension of API Code Examples

Context: Application Programming Interface (API) code examples are an essential knowledge resource for learning APIs. However, a few user studies have explored how the structural characteristics of the source code in code examples impact their comprehensibility and reusability. Objectives: We invest...

Full description

Saved in:
Bibliographic Details
Published in:arXiv.org
Main Authors: Alharbi, Seham, Kolovos, Dimitris
Format: Paper
Language:English
Published: Ithaca Cornell University Library, arXiv.org 03.04.2024
Subjects:
ISSN:2331-8422
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Abstract Context: Application Programming Interface (API) code examples are an essential knowledge resource for learning APIs. However, a few user studies have explored how the structural characteristics of the source code in code examples impact their comprehensibility and reusability. Objectives: We investigated whether the (a) linearity and (b) length of the source code in API code examples affect users performance in terms of correctness and time spent. We also collected subjective ratings. Methods: We conducted an online controlled code comprehension experiment with 61 Java developers. As a case study, we used the API code examples from the Joda-Time Java library. We had participants perform code comprehension and reuse tasks on variants of the example with different lengths and degrees of linearity. Findings: Participants demonstrated faster reaction times when exposed to linear code examples. However, no substantial differences in correctness or subjective ratings were observed. Implications: Our findings suggest that the linear presentation of a source code may enhance initial example understanding and reusability. This, in turn, may provide API developers with some insights into the effective structuring of their API code examples. However, we highlight the need for further investigation.
AbstractList Context: Application Programming Interface (API) code examples are an essential knowledge resource for learning APIs. However, a few user studies have explored how the structural characteristics of the source code in code examples impact their comprehensibility and reusability. Objectives: We investigated whether the (a) linearity and (b) length of the source code in API code examples affect users performance in terms of correctness and time spent. We also collected subjective ratings. Methods: We conducted an online controlled code comprehension experiment with 61 Java developers. As a case study, we used the API code examples from the Joda-Time Java library. We had participants perform code comprehension and reuse tasks on variants of the example with different lengths and degrees of linearity. Findings: Participants demonstrated faster reaction times when exposed to linear code examples. However, no substantial differences in correctness or subjective ratings were observed. Implications: Our findings suggest that the linear presentation of a source code may enhance initial example understanding and reusability. This, in turn, may provide API developers with some insights into the effective structuring of their API code examples. However, we highlight the need for further investigation.
Author Kolovos, Dimitris
Alharbi, Seham
Author_xml – sequence: 1
  givenname: Seham
  surname: Alharbi
  fullname: Alharbi, Seham
– sequence: 2
  givenname: Dimitris
  surname: Kolovos
  fullname: Kolovos, Dimitris
BookMark eNotj8FLwzAYxYMoOOf-AG8Bz63Jl6RtjmNMNxg4cPeRtF-3jjapSSfzv7c6T-_w3u893gO5dd4hIU-cpbJQir2YcGm-UpBMpgxEnt-QCQjBk0IC3JNZjCfGGGQ5KCUmpFxe-taHxh3ocES67npTDtTX9MOfQ4l04Sukm8ahCc3wTb37i22DPwTTdRjimOj6gEd0sRndkZxv11dseTFd32J8JHe1aSPO_nVKdq_L3WKVbN7f1ov5JjEKdKJFbaVlaLLaZlCxStuszHjOhOKiKnOdjz7XFoSVaDXwgisUwCT8UqUSU_J8re2D_zxjHPan8YMbF_eCCSgYgNbiB8HnWC4
ContentType Paper
Copyright 2024. This work is published under http://creativecommons.org/publicdomain/zero/1.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Copyright_xml – notice: 2024. This work is published under http://creativecommons.org/publicdomain/zero/1.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
DBID 8FE
8FG
ABJCF
ABUWG
AFKRA
AZQEC
BENPR
BGLVJ
CCPQU
DWQXO
HCIFZ
L6V
M7S
PHGZM
PHGZT
PIMPY
PKEHL
PQEST
PQGLB
PQQKQ
PQUKI
PRINS
PTHSS
DOI 10.48550/arxiv.2404.02377
DatabaseName ProQuest SciTech Collection
ProQuest Technology Collection
Materials Science & Engineering Collection
ProQuest Central (Alumni)
ProQuest Central UK/Ireland
ProQuest Central Essentials
ProQuest Central
Technology Collection
ProQuest One Community College
ProQuest Central Korea
SciTech Collection (ProQuest)
ProQuest Engineering Collection
Engineering Database
ProQuest Central Premium
ProQuest One Academic (New)
Publicly Available Content Database
ProQuest One Academic Middle East (New)
ProQuest One Academic Eastern Edition (DO NOT USE)
ProQuest One Applied & Life Sciences
ProQuest One Academic (retired)
ProQuest One Academic UKI Edition
ProQuest Central China
Engineering collection
DatabaseTitle Publicly Available Content Database
Engineering Database
Technology Collection
ProQuest One Academic Middle East (New)
ProQuest Central Essentials
ProQuest One Academic Eastern Edition
ProQuest Central (Alumni Edition)
SciTech Premium Collection
ProQuest One Community College
ProQuest Technology Collection
ProQuest SciTech Collection
ProQuest Central China
ProQuest Central
ProQuest One Applied & Life Sciences
ProQuest Engineering Collection
ProQuest One Academic UKI Edition
ProQuest Central Korea
Materials Science & Engineering Collection
ProQuest Central (New)
ProQuest One Academic
ProQuest One Academic (New)
Engineering Collection
DatabaseTitleList Publicly Available Content Database
Database_xml – sequence: 1
  dbid: PIMPY
  name: Publicly Available Content Database
  url: http://search.proquest.com/publiccontent
  sourceTypes: Aggregation Database
DeliveryMethod fulltext_linktorsrc
Discipline Physics
EISSN 2331-8422
Genre Working Paper/Pre-Print
GroupedDBID 8FE
8FG
ABJCF
ABUWG
AFKRA
ALMA_UNASSIGNED_HOLDINGS
AZQEC
BENPR
BGLVJ
CCPQU
DWQXO
FRJ
HCIFZ
L6V
M7S
M~E
PHGZM
PHGZT
PIMPY
PKEHL
PQEST
PQGLB
PQQKQ
PQUKI
PRINS
PTHSS
ID FETCH-LOGICAL-a529-93fb4b0ea6fb62d0d9b6c61703513dc797fb419b23b4eb921815e320424b0ec53
IEDL.DBID M7S
IngestDate Mon Jun 30 09:24:04 EDT 2025
IsDoiOpenAccess true
IsOpenAccess true
IsPeerReviewed false
IsScholarly false
Language English
LinkModel DirectLink
MergedId FETCHMERGED-LOGICAL-a529-93fb4b0ea6fb62d0d9b6c61703513dc797fb419b23b4eb921815e320424b0ec53
Notes SourceType-Working Papers-1
ObjectType-Working Paper/Pre-Print-1
content type line 50
OpenAccessLink https://www.proquest.com/docview/3032802299?pq-origsite=%requestingapplication%
PQID 3032802299
PQPubID 2050157
ParticipantIDs proquest_journals_3032802299
PublicationCentury 2000
PublicationDate 20240403
PublicationDateYYYYMMDD 2024-04-03
PublicationDate_xml – month: 04
  year: 2024
  text: 20240403
  day: 03
PublicationDecade 2020
PublicationPlace Ithaca
PublicationPlace_xml – name: Ithaca
PublicationTitle arXiv.org
PublicationYear 2024
Publisher Cornell University Library, arXiv.org
Publisher_xml – name: Cornell University Library, arXiv.org
SSID ssj0002672553
Score 1.8656658
SecondaryResourceType preprint
Snippet Context: Application Programming Interface (API) code examples are an essential knowledge resource for learning APIs. However, a few user studies have explored...
SourceID proquest
SourceType Aggregation Database
SubjectTerms Application programming interface
Linearity
Ratings
Source code
Title Exploring the Impact of Source Code Linearity on the Programmers Comprehension of API Code Examples
URI https://www.proquest.com/docview/3032802299
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
link http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwpV09T8MwELWgBYmJb_FRKg-saZM4TuIJQdWKDlQR7VCmynbOoktTklL153N2QxmQWBgj56TIl9y73D2_I-Q-DSCExChPIBx4kQ5yLzVaej4ThkdSc19KN2wiGY3S6VRkdcGtqmmV3zHRBeq80LZG3mVW-A0BR4iH5Ydnp0bZ7mo9QmOfNK1KQuCoe-NdjSWME8yY2baZ6aS7urLczNcdhLGog2iVJL9CsMOVwfF_n-iENDO5hPKU7MHijBw6PqeuzonecesoZnh06M5C0sLQsSvW016RA8X_UHzPMQ2nxcLdlm3JWraUTW2gKOHd8ttxFS0fs-HWrL-RVlK4uiCTQX_Se_bqeQqe5KFAbxgVKR9kbFQc5n4uVKytHjvjAct1ItBlUSBUyFQESljs58BC2xtFK83ZJWksigVcEWp8AMYN5EEEEZOpitFScp1ivhMDj69J63vLZvU3Uc1-9uvm7-VbchRi6uD4MaxFGqvyE-7IgV6v5lXZJs2n_ih7bTtX41U2fMnevgBzDrSm
linkProvider ProQuest
linkToHtml http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMw1V07T8MwELZQC4KJt3gU8ABj2sTOywNCCFoRtVSV6MBW2c5FdGlKwqP8KP4jZ7cpAxIbA7Nz0iXn3Hfn-3xHyHnsAYMoU45AOHB87aVOnGnpuFxkgS914Epph01E_X78-CgGK-SzugtjaJWVT7SOOs21OSNvcdP4DQFHiKvps2OmRpnqajVCY74tuvDxjilbeZncon0vGOu0hzd3zmKqgCMDJlCnTPnKBRlmKmSpmwoVatOVnAceT3UkUHHfE4px5YMSBgED4MxUCFFKmyER6PHrGEUwYZmCD8sjHRZGGKDzee3UdgpryWI2fmsiavpNBMco-uHxLYx1Nv_ZB9gi9YGcQrFNVmCyQ9YsW1WXu0QvmYMU41ea2JueNM_ogy1F0Js8BYpZNmqLSQbNJ_axwZyKZg7qqXGDBTwZ9j6uouT1IJmLtWfSNEwu98jwL15rn9Qm-QQOCM1cAB5kkHo--FzGKkRJGegYo7kQgvCQNCoLjRZ_fDn6Ns_R78tnZP1ueN8b9ZJ-95hsMAySLBOIN0jtpXiFE7Kq317GZXFqdxcloz825helxAvn
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Exploring+the+Impact+of+Source+Code+Linearity+on+the+Programmers+Comprehension+of+API+Code+Examples&rft.jtitle=arXiv.org&rft.au=Alharbi%2C+Seham&rft.au=Kolovos%2C+Dimitris&rft.date=2024-04-03&rft.pub=Cornell+University+Library%2C+arXiv.org&rft.eissn=2331-8422&rft_id=info:doi/10.48550%2Farxiv.2404.02377