Buggy code:
public class StaticClassBuilder implements Callable < StaticClass > { private ArrayList < String > smaliCode ; private String smaliFilePath ; private int maxOriginalLineNumber ; private int index = 1 ; private StaticClassBuilder . MethodContext methodContext = new StaticClassBuilder . MethodContext ( ) ; @ Override public StaticClass call ( ) throws Exception { } private void parseDots ( StaticMethod m , String line ) { } private void parseColons ( StaticMethod m , String line ) { if ( line . startsWith ( ":array_" ) ) { String label = line ; int arrayStmtID = methodContext . tableDataMap . get ( label ) ; StaticStmt s = m . getSmaliStmts ( ) . get ( arrayStmtID ) ; Expression ex = s . getExpression ( ) ; Expression labelEx = ( ( Expression ) ( ex . getChildAt ( 1 ) ) ) ; if ( ! ( labelEx . getContent ( ) . equals ( label ) ) ) System . out . println ( "[ERROR]<seq2seq4repair_space>methodContext<seq2seq4repair_space>matched<seq2seq4repair_space>wrong<seq2seq4repair_space>fill-array-data<seq2seq4repair_space>statement<seq2seq4repair_space>with<seq2seq4repair_space>:array_<seq2seq4repair_space>label" ) ; String lengthInfo = smaliCode . get ( ( ( index ) ++ ) ) ; int elementByteLength = Integer . parseInt ( lengthInfo . substring ( ( ( lengthInfo . lastIndexOf ( "<seq2seq4repair_space>" ) ) + 1 ) ) ) ; int size = 0 ; String type = "" ; ArrayList < Expression > elementExList = new ArrayList < Expression > ( ) ; while ( ( index ) < ( smaliCode . size ( ) ) ) { line = smaliCode . get ( ( ( index ) ++ ) ) ; if ( line . contains ( "<seq2seq4repair_space>" ) ) line = line . trim ( ) ; if ( line . equals ( ".end<seq2seq4repair_space>array-data" ) ) break ; String hex = "" ; String dec = "" ; switch ( elementByteLength ) { case 1 : { type = "char" ; hex = line ; dec = ( Integer . parseInt ( hex . replace ( "0x" , "" ) . replace ( "t" , "" ) , 16 ) ) + "" ; break ; } case 2 : { type = "short" ; hex = line ; dec = ( Integer . parseInt ( hex . replace ( "0x" , "" ) . replace ( "s" , "" ) , 16 ) ) + "" ; break ; } case 4 : { if ( line . contains ( "#<seq2seq4repair_space>" ) ) { type = "float" ; hex = line . substring ( 0 , line . indexOf ( "<seq2seq4repair_space>" ) ) ; dec = line . substring ( ( ( line . indexOf ( "#<seq2seq4repair_space>" ) ) + 2 ) ) . replace ( "f" , "" ) ; } else { type = "int" ; hex = line ; dec = ( Integer . parseInt ( hex . replace ( "0x" , "" ) , 16 ) ) + "" ; } break ; } case 8 : { if ( line . contains ( "#<seq2seq4repair_space>" ) ) { type = "double" ; hex = line . substring ( 0 , line . indexOf ( "<seq2seq4repair_space>" ) ) ; dec = line . substring ( ( ( line . indexOf ( "#<seq2seq4repair_space>" ) ) + 2 ) ) ; } else { type = "long" ; hex = line ; <START_BUG> dec = ( Long . parseLong ( hex . replace ( "0x" , "" ) . replace ( "L" , "" ) ) ) + "" ; <END_BUG> } break ; } } Expression eleEx = new Expression ( "$element" ) ; Expression indexEx = new Expression ( ( size + "" ) ) ; Expression valueEx = new Expression ( "$number" ) ; valueEx . add ( new Expression ( type ) ) ; valueEx . add ( new Expression ( hex ) ) ; valueEx . add ( new Expression ( dec ) ) ; eleEx . add ( indexEx ) ; eleEx . add ( valueEx ) ; elementExList . add ( eleEx ) ; size ++ ; } Expression arrayEx = new Expression ( "$array" ) ; arrayEx . add ( new Expression ( ( size + "" ) ) ) ; arrayEx . add ( new Expression ( type ) ) ; for ( Expression eleEx : elementExList ) arrayEx . add ( eleEx ) ; ex . remove ( 1 ) ; ex . add ( arrayEx ) ; } else if ( line . startsWith ( ":sswitch_data_" ) ) { ( index ) ++ ; StaticStmt s = m . getSmaliStmts ( ) . get ( methodContext . tableDataMap . get ( line ) ) ; Map < Integer , String > switchMap = new HashMap < Integer , String > ( ) ; while ( ( index ) < ( smaliCode . size ( ) ) ) { line = smaliCode . get ( ( ( index ) ++ ) ) ; if ( line . contains ( "<seq2seq4repair_space>" ) ) line = line . trim ( ) ; if ( line . equals ( ".end<seq2seq4repair_space>sparse-switch" ) ) break ; String hexValue = line . substring ( 0 , line . indexOf ( "<seq2seq4repair_space>" ) ) ; String caseTargetLabel = line . substring ( ( ( line . indexOf ( "-><seq2seq4repair_space>" ) ) + 3 ) ) ; int decValue = Integer . parseInt ( hexValue . replace ( "0x" , "" ) , 16 ) ; switchMap . put ( decValue , caseTargetLabel ) ; } s . setData ( switchMap ) ; } else if ( line . startsWith ( ":pswitch_data_" ) ) { String initValueInfo = smaliCode . get ( ( ( index ) ++ ) ) ; int switchValue = Integer . parseInt ( initValueInfo . substring ( ( ( initValueInfo . lastIndexOf ( "<seq2seq4repair_space>" ) ) + 1 ) ) . replace ( "0x" , "" ) , 16 ) ;

Fix:
dec = ( Long . parseLong ( hex . replace ( "0x" , "" ) . replace ( "L" , "" ) , 16 ) ) + "" ;