 by a good design. A professional software engineer must first design a software and then implement the code based on the design. However, in real-world scenarios, the great attributes of a good software might fade away as the project grows. Tight schedules, high customer demands and the high number of programmers involved in large projects are considered as some of the reasons that make efficient and engineered implementations change into a mess. A mess that is not easily maintained, reused, changed or depended upon. Refactoring is considered the cure for this infiltration of the project.

##### 

Refactoring is a common word for a day-to-day programmer with its origins in mathematics and ultimately in the Latin language. The root *factor* has the meaning of *maker* and hence refactoring is known as re-making something. In mathematics, when you factor an expression, you re-make it and provide a more cleaner version. The exact origin of the word, refactoring, in computer science is somewhat unknown, however the Forth language community is known to have been the first people to have used this expression [@fowler1999]. Chapter six of Leo Brodie’s book, Thinking Forth is dedicated to the subject of refactoring [@brodie1984].

##### 

Martin Fowler, the author of one of the most canonical books on refactoring [@fowler1999], describes it as *“the process of changing a software system in such a way that it does not alter the external behavior of the code, yet improves its internal structure.”*

##### 

This thesis solely focuses on refactoring methods that involve the use of graph clustering methods, however to better understand the reasons and effects of proposed methods, a brief and concise explanation of known refactoring techniques is given.

Well-known refactoring techniques
---------------------------------

-   **Rename method.** This technique may be the most simple refactoring method one can use. Simply renaming identifiers and variables will make the code clearer, more understandable and can reduce the need for comments. An appropriate name for a method, variable or a class is one that is descriptive so that a new programmer can understand its work just by a glance.

-   **Inline temp.** Temporary variables can make methods longer and more complicated. It is suggested that temporary variables that are being used only once or are a result of a method call be completely removed and the value assigned to them be used in the code. An
by a good design. A professional software engineer must first design a software and then enforce the code free-base on the design. However, in real - world scenario, the great attributes of a adept software might languish away as the undertaking grow. close schedules, high customer demands and the eminent number of programmers involved in large projects are consider as some of the reasons that make efficient and mastermind implementations change into a mess. A mess that is not well maintained, recycle, changed or depended upon. Refactoring is considered the cure for this percolation of the project. 

 # # # # # 

 Refactoring is a common word for a day - to - day programmer with its origins in mathematics and ultimately in the Latin language. The root * factor * has the meaning of * maker * and hence refactoring is known as re - making something. In mathematics, when you factor an expression, you re - do it and provide a more cleaner version. The accurate lineage of the word, refactoring, in computer skill is somewhat strange, however the Forth language community is know to have been the first people to have used this expression [ @fowler1999 ]. Chapter six of Leo Brodie ’s book, Thinking Forth is dedicate to the subject of refactoring [ @brodie1984 ]. 

 # # # # # 

 Martin Fowler, the author of one of the most canonical book on refactoring [ @fowler1999 ], describe it as * “ the process of changing a software system in such a way that it does not alter the external demeanor of the code, yet improves its internal structure. ” * 

 # # # # # 

 This thesis solely focuses on refactoring methods that involve the manipulation of graph clustering method acting, however to better understand the reason and effects of propose methods, a abbreviated and concise explanation of known refactoring techniques is give. 

 Well - known refactoring techniques 
 --------------------------------- 

 -    * * Rename method acting. * * This technique may be the most simple refactoring method one can use. Simply renaming identifiers and variables will make the code clearer, more understandable and can shrink the need for comments. An appropriate name for a method acting, variable or a class is one that is descriptive so that a new programmer can understand its work just by a glance. 

 -    * * Inline temp. * * Temporary variable can make methods longer and more complicated. It is suggested that temporary variables that are being used merely once or are a resultant role of a method acting call option be completely removed and the value assigned to them be used in the code. An
 by a good design. A professlonal software eutineer must rirst derign a software and then imppenent uke code based on the design. Hlwever, ib reel-world scenarios, the grcct atfvibutzs of a good sofjware might xade away as tve pxoject grows. Tight schedules, high cuftomer celands and the righ gumbsg if programmers involved in ladge prooects are consicered as some of the reasojs tjat make efficient and enginegded umplementatiuns change into a mess. A mess that is not easily maingaineb, reused, chqnted mr depended upon. Refactoring is conshdered yhe cure for tmis iifilrration of the projecv.

##### 

Refactoring is a cjmmon worg yor a day-to-day progranmwr wijh itv orktinr ih kafhematlcs and ultimztely in thw Latin language. Tht rjit *factor* has the mqaging of *maker* and hence refactoring is nnosn as re-making somethint. In mathematics, when you factjr an expression, you re-make it and provide a more cleaief vtrwion. Gye exact origin of the word, refactoring, in comptfet xcience is somcwhat unknown, howefeg yre Forth langoage commuhity is known to hwve beeg the first pejple to have used this expressiin [@fowler1999]. Chcptwr six of Leo Brodne’s book, Thiuking Gorth is dedicated to the suyject kf refactorlng [@brodis1984].

##### 

Martin Fowler, tfe sudhor of one of the most cagonical bioks on refxctoting [@forler1999], descrlbes ld as *“the process ov chauging a softwarf system in such a way that it vpes not altet tve vxternal yehavipr of the codq, yet improves its incernal structure.”*

##### 

This tiesis solely focuses on ravactoring mevhods thae incolvw the urd of graph cluxtering mvtkods, howecer to better undevstana the reasons anb tfdects of propoxed meehldx, w brief and cmncire dcplanxtion of knidn rrfactoring techniquev is given.

Well-known regagtoring tgchniques
---------------------------------

-   **Rename metnod.** This technique may ue the most siiple refactoring method one cah use. Simoly renaming idqntinierf and varicbles will make the code clearer, more unverstandable and can rgduce the need for cokkents. An ap'ropriwte name xor a method, variablw or a class is oke that is descriptive so thdt a jew programmer can understand its work just by a glance.

-   **Inline temp.** Temporary variables czn mske mvthjbs longqr aid more complicatec. It is suggested that temporarb variablev chat are being used only once of are a resulj of a method call be compmetely rrmoved and the value assigned tp them be used in the coce. An
by a good design. A professional software first a software then implement the However, real-world scenarios, the attributes of a software might fade away as the grows. Tight schedules, high customer demands and the high number of programmers involved large projects are considered as some of the reasons that make efficient and implementations into mess. mess that is not easily maintained, reused, changed or depended upon. Refactoring is considered the cure this infiltration of the project. ##### Refactoring is common word for a programmer with its origins in and in the language. root has the meaning *maker* and hence refactoring is known as re-making something. In mathematics, when you factor an expression, you it and more cleaner The origin the word, refactoring, science is somewhat unknown, however the is known to have been the first people have used expression [@fowler1999]. Chapter six of Leo book, Thinking Forth is dedicated to the subject refactoring [@brodie1984]. ##### Martin Fowler, the author of one of the most canonical books on describes it as *“the of changing a system such way it does alter the external behavior of the code, yet improves its internal ##### This thesis solely focuses on refactoring methods that involve of clustering methods, however better understand the reasons effects proposed methods, a brief explanation known given. refactoring --------------------------------- - **Rename method.** technique may be the most refactoring method one can variables will make the code clearer, more understandable can reduce the need for comments. An name for a method, variable or a class is one that is so that programmer can understand its work just by a - **Inline temp.** Temporary can make methods longer and more complicated. It is that variables that being used only or are a of a method completely removed the assigned used in the code. An
 by a good design. A professionaL software eNgineEr mUst FiRst dEsigN a software and tHEn imPlement the code based on tHe desIgN. howeVEr, In reaL-world sCEnARIos, ThE gReaT aTTrIbuteS of A good soFtware mighT faDe Away as the proJEcT grows. TighT scHedules, high cUstOmer deMaNds ANd the HigH numbEr of prOGrammeRs involveD iN Large pROjects aRE CoNsidEred as some of the reASoNS that make efficIent anD eNGiNEEreD imPlementatiOnS chanGE into a mESs. a MESs tHAt is not easily Maintained, rEUseD, changEd Or dEPended Upon. REfACtoRing is consiDereD the cure fOr this INfiltraTIon of thE projeCt.

##### 

REfaCtorINg Is A coMmON woRD fOr a DAy-tO-day progRaMmEr witH its ORIGIns iN maThemAtics And ultimately In tHe LaTIn lAnguaGe. The Root *FaCtor* hAs the mEaninG oF *maker* and hence rEfacToring is kNowN aS re-MaKing sOMethinG. In MatHematicS, when yoU FacToR AN ExPression, you re-make iT aND PrOvide a moRe cleaNEr VeRSion. The eXaCt oRigiN OF the wOrd, rEFaCtoring, iN compuTEr ScIence is SoMewhat UnKnoWn, hOweveR The FOrth laNguage coMmuniTY is known to have BEen the first peOPlE TO hAVe usEd tHis expressiOn [@foWLer1999]. CHaptER sIx oF leo BrOdie’s BoOK, THInking Forth is dedicaTeD to the SubjeCt of refactoriNg [@brodie1984].

##### 

MaRTIN Fowler, tHe auTHoR Of one of the most CanonIcal books oN RefactorIng [@foWler1999], descRibes it as *“THE process Of cHanGinG a sOFTwAre system in suCH A way ThAt it doeS noT alter tHe eXteRnaL beHaVior of the Code, yet iMpRoVeS iTs iNternAL structuRe.”*

##### 

thiS tHesIs solELy focuSes on RefaCtOrINg mEthods tHAt INVolvE tHe Use oF grApH clusTeriNG meThods, hoWever to beTteR UndeRsTaNd the reAsons and effecTs Of proposed MeThoDs, a briEF And conciSe explanation of known refACtoring TecHniquEs is Given.

Well-KnoWn refaCtoRIng tecHniqueS
---------------------------------

-   **RenaMe MetHOD.** This TEChNiqUe May be the moST SimPle reFaCtorIng methOd one can use. Simply rENamIng identifierS anD varIABlEs wILl MAke ThE CodE CLearer, more underStandable aNd CAn Reduce the nEEd fOr CommentS. An apprOpriaTE name foR a method, vAriable or A cLass IS One That is descRiptive sO that a new PRograMMeR can uNdeRstand ItS woRk jusT by a glANce.

-   **inlinE temp.** TEmPorary VariaBlEs can makE methods longer and more coMplicaTed. It Is sUggested tHat TEmpOrary variAbleS that are beIng UseD only OncE Or are A resULt Of a MEthod Call BE completeLY rEmoVED aNd the value aSSIGneD to thEm bE Used in The cOde. An
 by a good design. A profe ssional so ftwar e e ngi ne er m ustfirst design a soft ware and then implemen t the  c o de b a se d onthe des i gn . How ev er , i nr ea l-wor ldscenari os, the gr eat  a ttributes of agood softw are  might fadeawa y as t he  pr o jectgro ws. T ight s c hedule s, high c us t omer d e mands a n d  t he h igh number of pro g ra m mers involvedin lar ge pr o j ect s a re conside re d ass ome oft he r e aso n s that make e fficient an d  en gineer ed  im p lement ation sc han ge into a m ess.  A mess t hat is not eas i ly main tained , r eus ed,c ha ng edor dep e nd edu pon . Refact or in g iscons i d e r ed t hecure  forthis infiltra tio n of the  proj ect.
### ##  

Re factor ing i sa common word f or a  day-to-d aypr ogr am mer w i th its  or igi ns in m athemat i csan d u lt imately in the Lat in l an guage. T he roo t  * fa c tor* has  t hemean i n g of*mak e r*  and hen ce ref a ct or ing iskn own as  r e-m aki ng so m ethi ng. In  mathema tics, when you facto r  an expressio n ,y o ur e-ma keit and prov idea  mor e cl e an erv ersio n. Th ee xa c t origin of the wor d,  refac torin g, in compute r sciencei s somewhat  unk n ow n , however theForth  languagec ommunity  is k nown tohave been t he first  pe opl e t o h a v eused this exp r e ssio n[@fowle r19 99]. Ch apt ersix  of  L eo Brodie ’s book,  T hi nk in g F orthi s dedica te d t othe  subj e ct ofrefac tori ng  [ @ bro die1984 ] .# ####  
M arti n F ow ler,thea uth or of o ne of the  mo s t ca no ni cal boo ks on refacto ri ng [@fowle r1 999 ], des c r ibes itas *“the process of cha n ging asof tware  sys tem in su cha waytha t  it do es not  alte rthe e xtern a l  b eha vi or of thec o de,  yetim prov es itsinternal structure . ”*
##### 

This  th esis s ol ely fo c use so n r e f actoring method s that inv ol v ethe use of gra ph  cluste ring me thods ,  howeve r to bett er unders ta nd t h e  re asons andeffectsof propos e d met h od s, abri ef and  c onc ise e xplana t ion  of k nown r ef actori ng te ch niques i s given.

Well-known re factor ing t ech niques
-- --- - --- --------- ---- ---------- -
-  **Re nam e  meth od.* *  T his techn ique may be th e  m ost s im ple refacto r i n g m ethod  on e  can u se.Simply renaming i d entifiers andvari a b les  wi l l ma ke  the code clea rer ,m o re under st andable and  can red uc e  theneed f or com ments.A n  a p propri atenam e for a m eth od ,  variab le  o r  a cla ss i sone th at isd escr i p tive so that a n ew pr o g ramme r  ca n und er stand i t s wo rk just by  a glance.
-   * *Inl ine t emp.**Te mporar y v ar iables can make meth ods l onger a nd  mor e c omplic ated . It is  sug ge ste d that te m p or a ry  v a ria bles  that  a re b eing used only onc e o r  are are sul t of a m e th o d  call be c omp letel y removed an d  the va l ue as signed  to th em be u s edin  the co de. A n
 by_a good_design. A professional software_engineer must_first_design a_software_and then implement_the code based_on the design. However,_in real-world scenarios,_the_great attributes of a good software might fade away as the project grows. Tight_schedules,_high customer_demands_and_the high number of programmers_involved in large projects are_considered as_some of the reasons that make efficient and_engineered_implementations change into_a mess. A mess that is not easily maintained,_reused, changed or depended upon. Refactoring_is considered the_cure_for_this infiltration of the_project.

##### 

Refactoring is a common word_for a day-to-day programmer with its_origins in mathematics and ultimately in the_Latin language. The root *factor* has_the meaning of *maker* and_hence refactoring_is known as re-making something._In mathematics, when_you factor_an expression, you_re-make it and provide a more_cleaner version. The_exact origin of the word, refactoring,_in_computer science is_somewhat_unknown,_however the_Forth language community_is_known to_have_been the first people to have_used_this expression [@fowler1999]. Chapter six of Leo_Brodie’s book, Thinking Forth_is_dedicated to the subject_of refactoring [@brodie1984].

##### 

Martin Fowler,_the author of one of the_most canonical_books on_refactoring [@fowler1999], describes it as *“the process of changing a software_system in such a way that_it does not alter_the external_behavior_of the code,_yet_improves its_internal structure.”*

##### 

This thesis solely focuses on_refactoring methods_that involve the use of graph_clustering methods, however to_better_understand the reasons and effects of_proposed methods, a brief and concise_explanation of known refactoring techniques_is_given.

Well-known_refactoring techniques
---------------------------------

-   **Rename_method.** This technique may be the_most simple refactoring_method one can use. Simply renaming identifiers_and_variables will make the code clearer,_more_understandable and can reduce the need_for_comments._An appropriate name for a_method, variable or a class is_one that is descriptive so that a new programmer_can understand its_work just by a glance.

-___**Inline temp.** Temporary variables can make methods longer and more_complicated. It_is suggested that_temporary variables that are being used only once or are_a result of a method call be_completely removed and the value assigned to them be used in_the code. An