 [@sadayappan1990cluster].

### Ontologies and concept grouping

##### 

One of the areas that highly utilizes graph clustering methods is ontologies and the semantic web. Various applications have been presented in the literature. One important application is extracting new concepts and taxonomies from ontologies. Extracting more generalized concepts and relations is one of the outputs of an ontology clustering. Tang et al. presents a great survey on such methods [@tang2012survey]. Modularization is also considered important for the problem of ever growing and over grown ontologies. The works in [@ghafourian2013modularization] is one of the most recent methods in this specific area.

Partition stability
-------------------

##### 

In some works the notion of partition stability, also known as robustness is considered as an important property of a good clustering algorithm. The idea is that a stable partition is one that can be recovered even if the structure of the graph is modified, as long as the change in the graph is not too extensive. It important to stress that this thesis only studies stability in the software package sense of the word and does not cover cluster stability.

Refactoring packages using community detection
==============================================

##### 

Several studies have attempted to use community detection methods or cluster analysis in order to find refactoring opportunities [@pan2009class], [@pan2013refactoring], [@melton2006identifying]. These methods have analyzed the code in three main levels.

-   Method level

-   Class level

-   Package level

##### 

This thesis focuses on refactoring at the package level for which there has been little discussions in the literature. Pan et al. [@pan2013refactoring] proposes a novel method for refactoring using the notion of modularity, however neglects the use of a directed clustering approach. In this chapter, the importance of a directed graph model is discussed with regard to the notion of package stability and an improved version of a package refactoring method using community detection is presented.

Basics of modeling packages with graphs
---------------------------------------

##### 

As discussed in previous chapters, many metrics have been proposed for different software properties at the class level. At the package level, which is in a higher level in the abstraction hierarchy compared to a class, the most important property in the literature is the dependency between two packages. When a class inside a package depends on a class from another package, the former
[ @sadayappan1990cluster ]. 

 # # # Ontologies and concept grouping 

 # # # # # 

 One of the areas that highly utilizes graph cluster method is ontologies and the semantic web. Various application have been presented in the literature. One important lotion is extracting new concepts and taxonomy from ontologies. Extracting more generalized concept and relations is one of the outputs of an ontology clustering. Tang et al. presents a big survey on such methods [ @tang2012survey ]. Modularization is also considered important for the trouble of ever growing and over grown ontology. The works in [ @ghafourian2013modularization ] is one of the most late methods in this specific sphere. 

 Partition stability 
 ------------------- 

 # # # # # 

 In some works the notion of partition stability, also know as robustness is considered as an important property of a good clustering algorithm. The theme is that a stable partition is one that can be recovered even if the structure of the graph is modified, as long as the change in the graph is not too extensive. It important to try that this dissertation only studies stability in the software software common sense of the word and does not cover cluster stability. 

 Refactoring packages using community detection 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 

 # # # # # 

 respective studies have attempted to use community detection methods or cluster analysis in order to find refactoring opportunities [ @pan2009class ], [ @pan2013refactoring ], [ @melton2006identifying ]. These methods have analyze the code in three main level. 

 -    Method level 

 -    Class level 

 -    Package level 

 # # # # # 

 This thesis focuses on refactoring at the software level for which there has been little discussions in the literature. Pan et al. [ @pan2013refactoring ] proposes a novel method for refactoring using the notion of modularity, however neglects the manipulation of a directed bunch approach. In this chapter, the importance of a directed graph model is discussed with regard to the impression of package stability and an improved version of a package refactoring method acting using community detection is present. 

 Basics of model packages with graphs 
 --------------------------------------- 

 # # # # # 

 As discussed in previous chapters, many metrics have been proposed for different software properties at the course level. At the package floor, which is in a higher level in the abstraction hierarchy compared to a class, the most important place in the literature is the dependency between two packages. When a class inside a package depends on a class from another package, the former
 [@safayappan1990cluster].

### Ontologits and concept grouping

##### 

Mne of the arexs that highly utilizes grapi clysterung methods is ontologkes and tje semanric xeb. Various applmdations have gcen pxewented in the kiterature. One important aoppication is extracting new concepts and tacojomies from onjologpef. Exfgagting more generalized concepts znd reletions is one og the outputs of an ontolohy cpustering. Tang et wl. presents a gwwat survey ov such methods [@tang2012surbey]. Modularization is also conskdereb important fir hve problem if evvr growing and over gsown onyologies. The wprkv ib [@ghafourian2013modularizetion] is one of the iost recett methods in this wpwcifiw araa.

Pafritkon svabjlity
-------------------

##### 

Ln aome works the notion of partition stabikiej, also known zs robtseness is considered as an important prokerty of a good clustering aogorithm. The idea is jhat a stafle partition is one that can be recovered even ix the rtrbgbure if the graph is modified, as long as the change yh uhe graph is not boo extensive. It ikplrywnt to stress that cgia thesis only studles stafilitt in the fofteare package sense of the wird and does bot cover cluster dtability.

Reyactorong psckages using community detsction
==============================================

##### 

Sevegal studisr have attempted to uve community detection metrods or coustzr analyris on ordqr to find refagdoring opportunitifs [@pau2009clasv], [@pan2013refachoring], [@melton2006identifying]. These methods have amanyzvd the cobe in bhree main levejs.

-   Method lerel

-   Clcss lexel

-   Packzge levxl

##### 

This thesys focuses on tefactoring av the pachage levwl for dfich there has been litnlt discussiins in the literatmre. Pxh et al. [@pan2013refaeuorung] proposes a movdl ienhov for sefactoring gsine tfr notkon of moduoxritu, however neglects tve uae of a directed ckuftering qpproach. In this chapyer, the importance of a dicected grwph model is discussed with refard to tje kotion of pachage stability aud an improved version of a package refartoring method using conmunity detection ix presented.

Besics jf modelitg packages with graphs
---------------------------------------

##### 

As discussed ln previous chapters, mzny medrics have been proposed for different software properties at the class level. Qt the package levsl, wnich ps nn c highew leteu in the abstracnion hierarchy compared to a clars, the mmsc important property in the lotdrature is thg dependency between two pzckages. Ehen a class inside a package drpends on a class from akother paxkage, the formec
[@sadayappan1990cluster]. ### Ontologies and concept grouping ##### the that highly graph clustering methods web. applications have been in the literature. important application is extracting new concepts taxonomies from ontologies. Extracting more generalized concepts and relations is one of the of an ontology clustering. Tang et al. presents a great survey on such [@tang2012survey]. is considered for the problem of ever growing and over grown ontologies. The works in [@ghafourian2013modularization] is one the most recent methods in this specific area. stability ------------------- ##### In works the notion of partition also as robustness considered an property of a clustering algorithm. The idea is that a stable partition is one that can be recovered even if structure of is modified, long the in the graph too extensive. It important to stress only studies stability in the software package sense the word does not cover cluster stability. Refactoring using community detection ============================================== ##### Several studies have to use community detection methods or cluster analysis in order to find refactoring opportunities [@pan2009class], These methods have analyzed code in three levels. Method - level - level ##### This thesis focuses on refactoring at the package level which there has been little discussions in the literature. Pan [@pan2013refactoring] a novel method refactoring using the notion modularity, neglects the use of clustering In importance a graph model is discussed regard to the notion of stability and an improved method using community detection is presented. Basics of packages with graphs --------------------------------------- ##### As discussed previous chapters, many metrics have been proposed for different software properties at class level. package level, which is in a higher level the abstraction hierarchy compared a class, the most important property in the literature the between two When a class a package depends a class from the former
 [@sadayappan1990cluster].

### OntologiEs and concePt groUpiNg

##### 

ONe Of thE areAs that highly utILizeS graph clustering methodS is onToLOgieS AnD the sEmantic WEb. vARioUs ApPliCaTIoNs havE beEn preseNted in the lIteRaTure. One imporTAnT applicatiOn iS extracting nEw cOnceptS aNd tAXonomIes From oNtologIEs. ExtrActing morE gENeraliZEd concePTS aNd reLations is one of the OUtPUts of an ontologY clustErINg. tANg eT al. Presents a gReAt surVEy on sucH MeTHODs [@tANg2012survey]. ModulArization is ALso ConsidErEd iMPortanT for tHe PRobLem of ever grOwinG and over gRown onTOlogies. tHe works In [@ghafOurIan2013ModuLArIzAtiOn] IS onE Of The MOst Recent meThOdS in thIs spECIFIc arEa.

PArtiTion sTability
-------------------

##### 

In somE woRks tHE noTion oF partItioN sTabilIty, alsO knowN aS robustness is coNsidEred as an iMpoRtAnt PrOpertY Of a gooD clUstEring alGorithm. tHe iDeA IS ThAt a stable partition Is ONE tHat can be RecoveREd EvEN if the stRuCtuRe of THE grapH is mODiFied, as loNg as thE ChAnGe in the GrAph is nOt Too ExtEnsivE. it imPortanT to stresS that THis thesis only sTUdies stabilitY In THE sOFtwaRe pAckage sense Of thE Word And dOEs Not COver cLusteR sTAbILity.

Refactoring packAgEs usinG commUnity detectioN
==============================================

##### 

Several stUDIEs have atTempTEd TO use community dEtectIon methods OR cluster AnalySis in ordEr to find rEFActoring OppOrtUniTieS [@PAn2009Class], [@pan2013refacTORing], [@MeLton2006ideNtiFying]. ThEse MetHodS haVe Analyzed tHe code in ThReE mAiN leVels.

-   METhod leveL

-   CLasS lEveL

-   PackAGe leveL

##### 

This ThesIs FoCUseS on refaCToRINg at ThE pAckaGe lEvEl for WhicH TheRe has beEn little dIscUSsioNs In The liteRature. Pan et al. [@PaN2013refactoriNg] ProPoses a NOVel methoD for refactoring using the NOtion of ModUlariTy, hoWever neglEctS the usE of A DirectEd clusTerinG aPprOACh. In tHIS cHapTeR, the importANCe oF a dirEcTed gRaph modEl is discussed with rEGarD to the notion oF paCkagE STaBilITy ANd aN iMProVED version of a packAge refactoRiNG mEthod using COmmUnIty deteCtion is PreseNTed.

BasiCs of modelIng packagEs With GRAphS
---------------------------------------

##### 

As discussEd in prevIous chaptERs, manY MeTrics HavE been pRoPosEd for DifferENt sOftwaRe propErTies at The clAsS level. At The package level, which is iN a highEr levEl iN the abstrActIOn hIerarchy cOmpaRed to a clasS, thE moSt impOrtANt proPertY In The LIteraTure IS the depenDEnCy bETWeEn two packagES. wHen A clasS inSIde a paCkagE depends on a class fROm another packaGe, thE FOrmEr
 [@sadayappan1990cluster]. 

### Onto logie s a ndco ncep t gr ouping

#####
One  of the areas that hig hly u ti l izes gr aph c lusteri n gm e tho ds  i s o nt o lo giesand  the se mantic web . V ar ious applica t io ns have be enpresented in  th e lite ra tur e . One  im porta nt app l icatio n is extr ac t ing ne w  concep t s  a nd t axonomies from on t ol o gies. Extracti ng mor eg en e r ali zed  conceptsan d rel a tions i s  o n e oft he outputs of  an ontolog y  cl usteri ng . T a ng etal. p re s ent s a great s urve y on such  metho d s [@tan g 2012sur vey].Mod ula riza t io nisal s o c o ns ide r edimportan tfo r the  pro b l e m  ofeve r gr owing  and over gro wnonto l ogi es. T he wo rksin  [@gh afouri an201 3m odularization]is o ne of the  mo st  re ce nt me t hods i n t his  specif ic area . 

P ar t i t io n stability
------ -- - - -- -------
##### 
In some wor ks  th e no t i on of  par t it ion stab ility, al so  knownas  robus tn ess  is  cons i dere d as a n import ant p r operty of a go o d clusteringa lg o r it h m. T heidea is tha t as tabl e pa r ti tio n  is o ne th at ca n  be recovered evenif  the s truct ure of the gr aph is mod i f i ed, as l onga st he change in t he gr aph is not too exte nsive . It imp ortant to s tress th atthi s t hes i s  o nly studies s t a bili ty  in the  so ftwarepac kag e s ens eof the wo rd and d oe sno tcov er cl u ster sta bi lit y. 

R efact o ring p ackag es u si ng com munityd et e c tion 
= == ==== === == ===== ==== = === ======= ========= === = =

# ## ##  

Seve ral studies h av e attempte dtouse co m m unity de tection methods or clus t er anal ysi s inorde r to find  re factor ing opport unitie s [@p an 200 9 c lass] , [@ pan 20 13refactor i n g],  [@me lt on20 06ident ifying]. These met h ods  have analyze d t he c o d eint hr e e m ai n  le v e ls.

-   Method  level

- C la ss level
-   Pa ckage l evel

# ####
This t hesis foc uses on r ef acto r i ngat the pac kage lev el for wh i ch th e re  hasbee n litt le  di scuss ions i n  th e lit eratur e.  Pan e t al.  [ @pan2013 refactoring] proposes a  novel  meth odfor refac tor i ngusing the  not ion of mod ula rit y, ho wev e r neg lect s  t heu se of  a d i rected cl u st eri n g  a pproach. In t h ischapt er, the im port ance of a directe d  graph model i s di s c uss edw ithre gard to the no tio no f  package  s tability an d an imp ro v ed ve rsionof a p ackager e fa c toring  met hod  using co mmu ni t y detec ti on is pre sent ed .

Bas ics of mode l i ng packages with  grap h s 
---- - --- ----- -- ------- - ---- ---------- --

##### 
As di scus sed i n previ ou s chap ter s,  many metr i cs have b een p roposed  f or d iff erentsoft w a re pr oper ti esat the cl a s sl ev el .  At  the  pack ag e le vel, whic h  is in a  hi g her lev el  in t he abs t ra c t ion hierar chy  comp a r ed to a cl a ss,t he mostimport ant pr opertyi n t he  litera tur e is the de pendencyb etw ee n tw o packag es . Wh en  acl ass inside a pa ckage de pends on a  class  fr o m an o ther p ac kage, the fo rmer
 [@sadayappan1990cluster].

###_Ontologies and_concept grouping

##### 

One of_the areas_that_highly utilizes_graph_clustering methods is_ontologies and the_semantic web. Various applications_have been presented_in_the literature. One important application is extracting new concepts and taxonomies from ontologies. Extracting_more_generalized concepts_and_relations_is one of the outputs_of an ontology clustering. Tang_et al._presents a great survey on such methods [@tang2012survey]._Modularization_is also considered_important for the problem of ever growing and over_grown ontologies. The works in [@ghafourian2013modularization]_is one of_the_most_recent methods in this_specific area.

Partition stability
-------------------

##### 

In some works_the notion of partition stability, also_known as robustness is considered as an_important property of a good clustering_algorithm. The idea is that_a stable_partition is one that can_be recovered even_if the_structure of the_graph is modified, as long as_the change in_the graph is not too extensive._It_important to stress_that_this_thesis only_studies stability in_the_software package_sense_of the word and does not_cover_cluster stability.

Refactoring packages using community detection
==============================================

##### 

Several_studies have attempted to_use_community detection methods or_cluster analysis in order to_find refactoring opportunities [@pan2009class], [@pan2013refactoring], [@melton2006identifying]._These methods_have analyzed_the code in three main levels.

-   Method level

- _ Class level

-   Package_level

##### 

This thesis focuses_on refactoring_at_the package level_for_which there_has been little discussions in the literature._Pan et_al. [@pan2013refactoring] proposes a novel method_for refactoring using the_notion_of modularity, however neglects the use_of a directed clustering approach. In_this chapter, the importance of_a_directed_graph model is discussed with_regard to the notion of package_stability and an_improved version of a package refactoring method_using_community detection is presented.

Basics of modeling_packages_with graphs
---------------------------------------

##### 

As discussed in previous_chapters,_many_metrics have been proposed for_different software properties at the class_level. At the package level, which is in a_higher level in_the abstraction hierarchy compared to_a_class,_the most important property in the literature is the dependency_between two_packages. When a_class inside a package depends on a class from another_package, the former