public void removeSimilarClassesFromFile1 ( ) throws IOException { logging . info ( "Start reding cs File" ) ; List < String > linescs1 = getFileLinesAsList ( csFile1 ) ; logging . info ( "Start reding cs File" ) ; List < String > linescs2 = getFileLinesAsList ( csFile2 ) ; logging . info ( "Search classes" ) ; List < String > classNames1 = searchClasses ( linescs1 ) ; logging . info ( "Found " + classNames1 . size ( ) + " classes" ) ; logging . info ( "Search classes" ) ; List < String > classNames2 = searchClasses ( linescs2 ) ; logging . info ( "Found " + classNames2 . size ( ) + " classes" ) ; logging . info ( "Removing similarities from the file" ) ; for ( String name : findSimilarClassNames ( classNames1 , classNames2 ) ) { linescs1 = removeLinesContainingClassname ( linescs1 , name ) ; } logging . info ( "Remove Attributes, which stands alone" ) ; linescs1 = removeAttributesNotBoundToClass ( linescs1 ) ; if ( ! windows ) { logging . info ( "Replace abstract classes with interfaces" ) ; linescs1 = replaceAbstractClasses ( linescs1 ) ; linescs2 = replaceAbstractClasses ( linescs2 ) ; logging . info ( "Save files" ) ; } replaceFilesWithNewContent ( linescs1 , csFile1 ) ; replaceFilesWithNewContent ( linescs2 , csFile2 ) ; }
Removes similar classes in the first cs File