Um estudo quantitativo sobre o uso de herança e interface em sistemas Java

Detalhes bibliográficos
Autor(a) principal: Dantas, Carlos Eduardo de Carvalho
Data de Publicação: 2017
Tipo de documento: Dissertação
Idioma: por
Título da fonte: Repositório Institucional da UFU
Texto Completo: https://repositorio.ufu.br/handle/123456789/18665
http://dx.doi.org/10.14393/ufu.di.2017.147
Resumo: Inheritance is one of the main features in the object-oriented paradigm (OOP). Nonetheless, previous work recommend carefully using it, suggesting alternatives in Java such as the adoption of composition with implementation of interfaces. Despite of being a well-studied theme, there is still little knowledge if such recommendations have been widely adopted by developers in general. This work aims at evaluating how the inheritance and interface resources have been used in Java, comparing new projects with older ones, and also the different releases of projects. Evaluated indicators were the number of corrective changes of the projects, encapsulation breaks by the use of instanceof operator, measures of cohesion, coupling and occurrence of code smells. We also studied how often inheritance or interface features are added or removed from classes, and motivations by which developers perform such procedure. A total of 1,656 open-source projects built between 1997 and 2013, all hosted in the repositories GitHub and SourceForge, were analyzed. We observed developers still use inheritance primarily as a resource for code reuse, motivated by the need to avoid duplicity of source code. In newer projects, classes in inheritance hierarchy had fewer corrective changes and subclasses had fewer use of the instanceof operator. However, as they evolve, classes in inheritance hierarchy tend to become complex as changes occur. Classes implementing interfaces have shown little relation to the interfaces, and there is indication that they are still underutilized. These results show there is still some lack of knowledge about the use of adequate object- oriented practices, which reinforces the need for training developers on how to design better classes.
id UFU_0baff0aa26301f7e7c3495025df063e9
oai_identifier_str oai:repositorio.ufu.br:123456789/18665
network_acronym_str UFU
network_name_str Repositório Institucional da UFU
repository_id_str
spelling Um estudo quantitativo sobre o uso de herança e interface em sistemas JavaComputaçãoInterface de programação de aplicaçõesJava (Linguagem de programação de computador)Engenharia de SoftwareHerançaInterfacesMudanças corretivasCode SmellsEncapsulamentoCoesãoAcoplamentoGitHubSourceForgeInheritanceCorrective commitsEncapsulationCohesionCouplingCNPQ::CIENCIAS EXATAS E DA TERRA::CIENCIA DA COMPUTACAOInheritance is one of the main features in the object-oriented paradigm (OOP). Nonetheless, previous work recommend carefully using it, suggesting alternatives in Java such as the adoption of composition with implementation of interfaces. Despite of being a well-studied theme, there is still little knowledge if such recommendations have been widely adopted by developers in general. This work aims at evaluating how the inheritance and interface resources have been used in Java, comparing new projects with older ones, and also the different releases of projects. Evaluated indicators were the number of corrective changes of the projects, encapsulation breaks by the use of instanceof operator, measures of cohesion, coupling and occurrence of code smells. We also studied how often inheritance or interface features are added or removed from classes, and motivations by which developers perform such procedure. A total of 1,656 open-source projects built between 1997 and 2013, all hosted in the repositories GitHub and SourceForge, were analyzed. We observed developers still use inheritance primarily as a resource for code reuse, motivated by the need to avoid duplicity of source code. In newer projects, classes in inheritance hierarchy had fewer corrective changes and subclasses had fewer use of the instanceof operator. However, as they evolve, classes in inheritance hierarchy tend to become complex as changes occur. Classes implementing interfaces have shown little relation to the interfaces, and there is indication that they are still underutilized. These results show there is still some lack of knowledge about the use of adequate object- oriented practices, which reinforces the need for training developers on how to design better classes.Dissertação (Mestrado)O recurso de herança é uma das principais características do paradigma de Orientação a Objetos. Contudo, trabalhos anteriores recomendam cuidado quanto ao seu uso, sugerindo alternativas em Java como a adoção de composição com implementação de interfaces. Apesar de ser um tema bem estudado, ainda há pouco conhecimento se estas recomendações foram amplamente adotadas pelos desenvolvedores de maneira geral. Este trabalho possui como objetivo avaliar como os recursos de herança e interface têm sido empregados em Java, comparando sistemas mais recentes com antigos, e também versões de cada sistema em épocas distintas. Os indicadores avaliados foram a quantidade de mudanças corretivas dos sistemas, quebras de encapsulamento pelo uso do operador instanceof, medidas de coesão, acoplamento e ocorrências de code smells. Por fim, foi realizada uma medição sobre o quão frequente os recursos de herança ou interface são adicionados ou removidos das classes, e as motivações pelas quais os desenvolvedores executam estes procedimentos. Foram analisados 1.656 sistemas open-source construídos entre 1997 e 2013, todos hospedados nos repositórios GitHub e SourceForge. Foi constatado que os desenvolvedores ainda utilizam herança primariamente como um recurso para reaproveitamento de código, motivados pela necessidade de evitar duplicidade de código-fonte. Em projetos mais recentes, as classes na hierarquia de herança apresentaram menos mudanças corretivas e as subclasses fizeram menos uso do operador instanceof. No entanto, à medida que evoluem, as classes na hierarquia de herança tendem a se tornar complexas na medida em que as mudanças ocorrem. As classes que implementam interfaces mostraram pouca relação com as suas respectivas interfaces implementadas, e foram observados indícios de que este recurso ainda é subutilizado. Estes resultados mostram que ainda existe alguma falta de conhecimento sobre o uso de práticas adequadas orientadas a objetos, o que reforça a necessidade de formação de desenvolvedores sobre como projetar melhores classes.Universidade Federal de UberlândiaBrasilPrograma de Pós-graduação em Ciência da ComputaçãoMaia, Marcelo de Almeidahttp://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4791753E8Macedo, Autranhttp://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4781728E0Sant'Anna, Cláudio Nogueirahttp://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4755862D6Dantas, Carlos Eduardo de Carvalho2017-05-17T16:39:12Z2017-05-17T16:39:12Z2017-02-10info:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/masterThesisapplication/pdfDANTAS, Carlos Eduardo de Carvalho. Um estudo quantitativo sobre o uso de herança e interface em sistemas Java. 2017. 94 f. Dissertação (Mestrado em Ciência da Computação) - Universidade Federal de Uberlândia, Uberlândia, 2017.https://repositorio.ufu.br/handle/123456789/18665http://dx.doi.org/10.14393/ufu.di.2017.147porinfo:eu-repo/semantics/openAccessreponame:Repositório Institucional da UFUinstname:Universidade Federal de Uberlândia (UFU)instacron:UFU2019-10-25T13:24:25Zoai:repositorio.ufu.br:123456789/18665Repositório InstitucionalONGhttp://repositorio.ufu.br/oai/requestdiinf@dirbi.ufu.bropendoar:2019-10-25T13:24:25Repositório Institucional da UFU - Universidade Federal de Uberlândia (UFU)false
dc.title.none.fl_str_mv Um estudo quantitativo sobre o uso de herança e interface em sistemas Java
title Um estudo quantitativo sobre o uso de herança e interface em sistemas Java
spellingShingle Um estudo quantitativo sobre o uso de herança e interface em sistemas Java
Dantas, Carlos Eduardo de Carvalho
Computação
Interface de programação de aplicações
Java (Linguagem de programação de computador)
Engenharia de Software
Herança
Interfaces
Mudanças corretivas
Code Smells
Encapsulamento
Coesão
Acoplamento
GitHub
SourceForge
Inheritance
Corrective commits
Encapsulation
Cohesion
Coupling
CNPQ::CIENCIAS EXATAS E DA TERRA::CIENCIA DA COMPUTACAO
title_short Um estudo quantitativo sobre o uso de herança e interface em sistemas Java
title_full Um estudo quantitativo sobre o uso de herança e interface em sistemas Java
title_fullStr Um estudo quantitativo sobre o uso de herança e interface em sistemas Java
title_full_unstemmed Um estudo quantitativo sobre o uso de herança e interface em sistemas Java
title_sort Um estudo quantitativo sobre o uso de herança e interface em sistemas Java
author Dantas, Carlos Eduardo de Carvalho
author_facet Dantas, Carlos Eduardo de Carvalho
author_role author
dc.contributor.none.fl_str_mv Maia, Marcelo de Almeida
http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4791753E8
Macedo, Autran
http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4781728E0
Sant'Anna, Cláudio Nogueira
http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4755862D6
dc.contributor.author.fl_str_mv Dantas, Carlos Eduardo de Carvalho
dc.subject.por.fl_str_mv Computação
Interface de programação de aplicações
Java (Linguagem de programação de computador)
Engenharia de Software
Herança
Interfaces
Mudanças corretivas
Code Smells
Encapsulamento
Coesão
Acoplamento
GitHub
SourceForge
Inheritance
Corrective commits
Encapsulation
Cohesion
Coupling
CNPQ::CIENCIAS EXATAS E DA TERRA::CIENCIA DA COMPUTACAO
topic Computação
Interface de programação de aplicações
Java (Linguagem de programação de computador)
Engenharia de Software
Herança
Interfaces
Mudanças corretivas
Code Smells
Encapsulamento
Coesão
Acoplamento
GitHub
SourceForge
Inheritance
Corrective commits
Encapsulation
Cohesion
Coupling
CNPQ::CIENCIAS EXATAS E DA TERRA::CIENCIA DA COMPUTACAO
description Inheritance is one of the main features in the object-oriented paradigm (OOP). Nonetheless, previous work recommend carefully using it, suggesting alternatives in Java such as the adoption of composition with implementation of interfaces. Despite of being a well-studied theme, there is still little knowledge if such recommendations have been widely adopted by developers in general. This work aims at evaluating how the inheritance and interface resources have been used in Java, comparing new projects with older ones, and also the different releases of projects. Evaluated indicators were the number of corrective changes of the projects, encapsulation breaks by the use of instanceof operator, measures of cohesion, coupling and occurrence of code smells. We also studied how often inheritance or interface features are added or removed from classes, and motivations by which developers perform such procedure. A total of 1,656 open-source projects built between 1997 and 2013, all hosted in the repositories GitHub and SourceForge, were analyzed. We observed developers still use inheritance primarily as a resource for code reuse, motivated by the need to avoid duplicity of source code. In newer projects, classes in inheritance hierarchy had fewer corrective changes and subclasses had fewer use of the instanceof operator. However, as they evolve, classes in inheritance hierarchy tend to become complex as changes occur. Classes implementing interfaces have shown little relation to the interfaces, and there is indication that they are still underutilized. These results show there is still some lack of knowledge about the use of adequate object- oriented practices, which reinforces the need for training developers on how to design better classes.
publishDate 2017
dc.date.none.fl_str_mv 2017-05-17T16:39:12Z
2017-05-17T16:39:12Z
2017-02-10
dc.type.status.fl_str_mv info:eu-repo/semantics/publishedVersion
dc.type.driver.fl_str_mv info:eu-repo/semantics/masterThesis
format masterThesis
status_str publishedVersion
dc.identifier.uri.fl_str_mv DANTAS, Carlos Eduardo de Carvalho. Um estudo quantitativo sobre o uso de herança e interface em sistemas Java. 2017. 94 f. Dissertação (Mestrado em Ciência da Computação) - Universidade Federal de Uberlândia, Uberlândia, 2017.
https://repositorio.ufu.br/handle/123456789/18665
http://dx.doi.org/10.14393/ufu.di.2017.147
identifier_str_mv DANTAS, Carlos Eduardo de Carvalho. Um estudo quantitativo sobre o uso de herança e interface em sistemas Java. 2017. 94 f. Dissertação (Mestrado em Ciência da Computação) - Universidade Federal de Uberlândia, Uberlândia, 2017.
url https://repositorio.ufu.br/handle/123456789/18665
http://dx.doi.org/10.14393/ufu.di.2017.147
dc.language.iso.fl_str_mv por
language por
dc.rights.driver.fl_str_mv info:eu-repo/semantics/openAccess
eu_rights_str_mv openAccess
dc.format.none.fl_str_mv application/pdf
dc.publisher.none.fl_str_mv Universidade Federal de Uberlândia
Brasil
Programa de Pós-graduação em Ciência da Computação
publisher.none.fl_str_mv Universidade Federal de Uberlândia
Brasil
Programa de Pós-graduação em Ciência da Computação
dc.source.none.fl_str_mv reponame:Repositório Institucional da UFU
instname:Universidade Federal de Uberlândia (UFU)
instacron:UFU
instname_str Universidade Federal de Uberlândia (UFU)
instacron_str UFU
institution UFU
reponame_str Repositório Institucional da UFU
collection Repositório Institucional da UFU
repository.name.fl_str_mv Repositório Institucional da UFU - Universidade Federal de Uberlândia (UFU)
repository.mail.fl_str_mv diinf@dirbi.ufu.br
_version_ 1805569702926221312