Buggy code:
public class RequirementSourceClassManager { static List < String > sourceCodeClasses = new ArrayList < String > ( ) ; static List < String > requirementClasses = new ArrayList < String > ( ) ; public static List < String > relationNodes = new ArrayList < String > ( ) ; static String projectPath ; static TableItem tableItem ; static TreeItem classItem ; static Image exactImage = new Image ( CompareWindow . display , ( ( ( PropertyFile . imagePath ) + "//" ) + "exact.jpg" ) ) ; static Image violateImage = new Image ( CompareWindow . display , ( ( ( PropertyFile . imagePath ) + "//" ) + "violation.jpg" ) ) ; @ SuppressWarnings ( "rawtypes" ) public static List < String > compareClassNames ( String projectPath ) { } @ SuppressWarnings ( "rawtypes" ) public static int compareClassCount ( ) { } public static void addSubItems ( int column , TreeItem item , List < ArtefactSubElement > list ) { } public static void compareSubElements ( TreeItem classItem , ArtefactElement reqArtefactElement , ArtefactElement sourceArtefactElement ) { if ( ( ( ( CompareWindow . tree ) != null ) && ( ! ( tree . isDisposed ( ) ) ) ) && ( HomeGUI . isComaparing ) ) { classItem = new TreeItem ( CompareWindow . tree , SWT . NONE ) ; classItem . setText ( 0 , sourceArtefactElement . getName ( ) ) ; classItem . setData ( "0" , sourceArtefactElement ) ; classItem . setImage ( RequirementSourceClassManager . exactImage ) ; classItem . setForeground ( Display . getDefault ( ) . getSystemColor ( COLOR_DARK_BLUE ) ) ; classItem . setText ( 1 , reqArtefactElement . getName ( ) ) ; classItem . setData ( "1" , reqArtefactElement ) ; } <START_BUG> RequirementSourceClassManager . relationNodes . add ( reqArtefactElement . getArtefactElementId ( ) ) ; <END_BUG> RequirementSourceClassManager . relationNodes . add ( "Req<seq2seq4repair_space>Class<seq2seq4repair_space>To<seq2seq4repair_space>Source<seq2seq4repair_space>Class" ) ; RequirementSourceClassManager . relationNodes . add ( sourceArtefactElement . getArtefactElementId ( ) ) ; ArrayList < ArtefactSubElement > reqAttributesList = new ArrayList < ArtefactSubElement > ( ) ; ArrayList < ArtefactSubElement > reqMethodsList = new ArrayList < ArtefactSubElement > ( ) ; ArrayList < ArtefactSubElement > sourceAttributesList = new ArrayList < ArtefactSubElement > ( ) ; ArrayList < ArtefactSubElement > sourceMethodsList = new ArrayList < ArtefactSubElement > ( ) ; ArrayList < WordsMap > methodWordsMapList = new ArrayList < WordsMap > ( ) ; ArrayList < WordsMap > attributeWordsMapList = new ArrayList < WordsMap > ( ) ; List < ArtefactSubElement > sourceAttributeElements = sourceArtefactElement . getArtefactSubElements ( ) ; List < ArtefactSubElement > reqAttributeElements = reqArtefactElement . getArtefactSubElements ( ) ; for ( int i = 0 ; i < ( sourceAttributeElements . size ( ) ) ; i ++ ) { ArtefactSubElement sourceAttribute = sourceAttributeElements . get ( i ) ; for ( int j = 0 ; j < ( reqAttributeElements . size ( ) ) ; j ++ ) { ArtefactSubElement requElement = reqAttributeElements . get ( j ) ; WordsMap w7 = new WordsMap ( ) ; w7 = SynonymWords . checkSymilarity ( sourceAttribute . getName ( ) , requElement . getName ( ) , sourceAttribute . getType ( ) , requElement . getType ( ) , RequirementSourceClassManager . requirementClasses ) ; if ( w7 . isIsMatched ( ) ) { if ( requElement . getSubElementId ( ) . contains ( "RQ" ) ) requElement . setSubElementId ( requElement . getSubElementId ( ) . substring ( requElement . getSubElementId ( ) . indexOf ( "RQ" ) ) ) ; RequirementSourceClassManager . relationNodes . add ( requElement . getSubElementId ( ) ) ; RequirementSourceClassManager . relationNodes . add ( ( ( ( "Req<seq2seq4repair_space>" + ( requElement . getType ( ) ) ) + "<seq2seq4repair_space>To<seq2seq4repair_space>Source<seq2seq4repair_space>" ) + ( sourceAttribute . getType ( ) ) ) ) ; RequirementSourceClassManager . relationNodes . add ( sourceAttribute . getSubElementId ( ) ) ; if ( ( ( ( CompareWindow . tree ) != null ) && ( ! ( tree . isDisposed ( ) ) ) ) && ( HomeGUI . isComaparing ) ) { if ( requElement . getType ( ) . equalsIgnoreCase ( "Field" ) ) { sourceAttributesList . add ( sourceAttribute ) ; reqAttributesList . add ( requElement ) ; attributeWordsMapList . add ( w7 ) ; } else if ( requElement . getType ( ) . equalsIgnoreCase ( "Method" ) ) { sourceMethodsList . add ( sourceAttribute ) ; reqMethodsList . add ( requElement ) ; methodWordsMapList . add ( w7 ) ; } sourceAttributeElements . remove ( sourceAttribute ) ; reqAttributeElements . remove ( requElement ) ; i -- ; j -- ; break ; } } } } if ( ( ( ( CompareWindow . tree ) != null ) && ( ! ( tree . isDisposed ( ) ) ) ) && ( HomeGUI . isComaparing ) ) { TreeItem subAttribute = new TreeItem ( classItem , SWT . NONE ) ; subAttribute . setText ( "Attributes" ) ; subAttribute . setForeground ( Display . getDefault ( ) . getSystemColor ( COLOR_GREEN ) ) ; for ( int k = 0 ; k < ( sourceAttributesList . size ( ) ) ; k ++ ) { TreeItem subItem = new TreeItem ( subAttribute , SWT . NONE ) ; subItem . setText ( 0 , sourceAttributesList . get ( k ) . getName ( ) ) ; subItem . setData ( "0" , sourceAttributesList . get ( k ) ) ; subItem . setImage ( 0 , ImageType . getImage ( attributeWordsMapList . get ( k ) ) . getValue ( ) ) ; subItem . setText ( 1 , reqAttributesList . get ( k ) . getName ( ) ) ; subItem . setData ( "1" , reqAttributesList . get ( k ) ) ; subItem . setImage ( 1 , ImageType . getImage ( attributeWordsMapList . get ( k ) ) . getValue ( ) ) ; }

Fix:
RequirementSourceClassManager . relationNodes . add ( reqArtefactElement . getArtefactElementId ( ) . substring ( reqArtefactElement . getArtefactElementId ( ) . indexOf ( "RQ" ) ) ) ;