nus-yam/ex-repair huggingface dataset:
Buggy code:
final class ArrayToArrayGenericConverter implements GenericConverter { private final GenericConversionService conversionService ; public ArrayToArrayGenericConverter ( GenericConversionService conversionService ) { } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { if ( sourceType . isAssignableTo ( targetType ) ) { return source ; } TypeDescriptor sourceElementType = sourceType . getElementTypeDescriptor ( ) ; TypeDescriptor targetElementType = targetType . getElementTypeDescriptor ( ) ; Object target = Array . newInstance ( targetElementType . getType ( ) , Array . getLength ( source ) ) ; GenericConverter converter = this . conversionService . getConverter ( sourceElementType , targetElementType ) ; if ( converter == null ) { <START_BUG> throw new org . springframework . core . convert . ConverterNotFoundException ( sourceType , targetType ) ; <END_BUG> } for ( int i = 0 ; i < ( Array . getLength ( target ) ) ; i ++ ) { Array . set ( target , i , converter . convert ( Array . get ( source , i ) , sourceElementType , targetElementType ) ) ; } return target ; } }

Fix:
throw new org . springframework . core . convert . ConverterNotFoundException ( sourceElementType , targetElementType ) ;
Buggy code:
public class MainApp extends Application { @ Override public void start ( Stage stage ) throws Exception { stage . setMinWidth ( 1300 ) ; stage . setMinHeight ( 850 ) ; try { <START_BUG> System . loadLibrary ( ( System . getProperty ( "sun.arch.data.model" ) . contains ( "64" ) ? "spinapi64" : "api" ) ) ; <END_BUG> } catch ( Error error ) { AlertHelper . showAlert ( Alert . AlertType . ERROR , "Missing<seq2seq4repair_space>SpinAPI" , "It<seq2seq4repair_space>seems<seq2seq4repair_space>that<seq2seq4repair_space>SpinAPI<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>installed<seq2seq4repair_space>on<seq2seq4repair_space>this<seq2seq4repair_space>computer.<seq2seq4repair_space>Please<seq2seq4repair_space>install<seq2seq4repair_space>SpinAPI<seq2seq4repair_space>first<seq2seq4repair_space>to<seq2seq4repair_space>use<seq2seq4repair_space>this<seq2seq4repair_space>software." ) ; return ; } FXMLLoader loader = new FXMLLoader ( getClass ( ) . getResource ( "//fxml//Scene.fxml" ) ) ; Parent root = loader . load ( ) ; MainController mainController = loader . getController ( ) ; mainController . init ( stage ) ; Scene scene = new Scene ( root ) ; scene . getStylesheets ( ) . add ( "//styles//Styles.css" ) ; stage . setTitle ( "NMR<seq2seq4repair_space>GUI" ) ; stage . setScene ( scene ) ; stage . getIcons ( ) . add ( new Image ( "file:icon.png" ) ) ; stage . show ( ) ; } public static void main ( String [ ] args ) { } }

Fix:
System . loadLibrary ( ( System . getProperty ( "sun.arch.data.model" ) . contains ( "64" ) ? "spinapi64" : "spinapi" ) ) ;
Buggy code:
public class FullInternetBuild { private static final String BASE_AS_REL_FILE = "//scratch//waterhouse//schuch//asData//current-as-rel" ; private static final String BASE_IP_FILE = "//scratch//waterhouse//schuch//asData//current-ip-count" ; private static final String OUT_FILE = "pruned-weighted-internet" ; public static void main ( String [ ] args ) throws IOException { } private static void dumpToFile ( HashMap < Integer , AS > asMap ) throws IOException { BufferedWriter outFile = new BufferedWriter ( new FileWriter ( ( ( FullInternetBuild . OUT_FILE ) + "-rel.txt" ) ) ) ; long count = 0 ; for ( AS tAS : asMap . values ( ) ) { for ( int tNeighbor : tAS . getNeighbors ( ) ) { <START_BUG> outFile . write ( ( ( ( ( ( ( "" + ( tAS . getASN ( ) ) ) + "|" ) + tNeighbor ) + "|" ) + ( ( tAS . getRel ( tNeighbor ) ) * ( - 1 ) ) ) + "\n" ) ) ; <END_BUG> count ++ ; } } outFile . close ( ) ; System . out . println ( ( "line<seq2seq4repair_space>count:<seq2seq4repair_space>" + count ) ) ; outFile = new BufferedWriter ( new FileWriter ( ( ( FullInternetBuild . OUT_FILE ) + "-ip.txt" ) ) ) ; for ( AS tAS : asMap . values ( ) ) { outFile . write ( ( ( ( ( "" + ( tAS . getASN ( ) ) ) + "<seq2seq4repair_space>" ) + ( tAS . getCIDRSize ( ) ) ) + "\n" ) ) ; } outFile . close ( ) ; } private static HashMap < Integer , AS > incorpIPCount ( String ipCountFile , HashMap < Integer , AS > fullTopo , HashMap < Integer , BGPSpeaker > prunedMap ) throws IOException { } }

Fix:
outFile . write ( ( ( ( ( ( ( "" + ( tAS . getASN ( ) ) ) + "|" ) + tNeighbor ) + "|" ) + ( tAS . getMyRelationshipTo ( tNeighbor ) ) ) + "\n" ) ) ;
Buggy code:
public class IRModule extends IRScopeImpl { private static final StaticScope rootObjectScope = IRStaticScopeFactory . newIRLocalScope ( null ) ; private static final String ROOT_METHOD_PREFIX = "[root]:" ; private static Map < String , IRClass > coreClasses ; private IRMethod rootMethod ; private CodeVersion version ; private List < IRModule > modules = new ArrayList < IRModule > ( ) ; private List < IRClass > classes = new ArrayList < IRClass > ( ) ; private List < IRMethod > methods = new ArrayList < IRMethod > ( ) ; private Map < String , Operand > constants = new HashMap < String , Operand > ( ) ; private static IRClass addCoreClass ( String name , IRScope parent , String [ ] coreMethods , StaticScope staticScope ) { } public static void bootStrap ( ) { } public static StaticScope getRootObjectScope ( ) { } public static IRClass getCoreClass ( String n ) { } public static boolean isAModuleRootMethod ( IRMethod m ) { } private void addRootMethod ( ) { String n = ( IRModule . ROOT_METHOD_PREFIX ) + ( getName ( ) ) ; <START_BUG> rootMethod = new IRMethod ( this , n , false , IRStaticScopeFactory . newIRLocalScope ( getLexicalParent ( ) . getStaticScope ( ) ) ) ; <END_BUG> rootMethod . addInstr ( new org . jruby . compiler . ir . instructions . ReceiveSelfInstruction ( rootMethod . getSelf ( ) ) ) ; rootMethod . addInstr ( new org . jruby . compiler . ir . instructions . ReceiveClosureInstr ( rootMethod . getImplicitBlockArg ( ) ) ) ; } public List < IRModule > getModules ( ) { } public List < IRClass > getClasses ( ) { } public List < IRMethod > getMethods ( ) { } public Map getConstants ( ) { } public Operand getConstantValue ( String constRef ) { } public void setConstantValue ( String constRef , Operand val ) { } public void addModule ( IRModule m ) { } public void addClass ( IRClass c ) { } public void addMethod ( IRMethod method ) { } @ Override public void runCompilerPassOnNestedScopes ( CompilerPass p ) { } @ Override public IRModule getNearestModule ( ) { } public IRModule ( IRScope lexicalParent , String name , StaticScope scope ) { } public void updateVersion ( ) { } public String getScopeName ( ) { } public CodeVersion getVersion ( ) { } public IRMethod getRootMethod ( ) { } public IRMethod getInstanceMethod ( String name ) { } public IRMethod getClassMethod ( String name ) { } public boolean isACoreClass ( ) { } public boolean isCoreClassType ( String className ) { } public RubyModule getCoreClassModule ( Ruby runtime ) { } public LocalVariable getLocalVariable ( String name , int depth ) { } }

Fix:
rootMethod = new IRMethod ( this , n , false , getStaticScope ( ) ) ;
Buggy code:
public abstract class AbstractOptions extends FormComponent { private static final long serialVersionUID = 1L ; private Palette palette ; protected Palette getPalette ( ) { } public AbstractOptions ( String id , Palette palette ) { } protected abstract Iterator getOptionsIterator ( ) { } protected void onComponentTagBody ( MarkupStream markupStream , ComponentTag openTag ) { final AppendingStringBuffer buffer = new AppendingStringBuffer ( 128 ) ; Iterator options = getOptionsIterator ( ) ; IChoiceRenderer renderer = getPalette ( ) . getChoiceRenderer ( ) ; while ( options . hasNext ( ) ) { final Object choice = options . next ( ) ; String id = renderer . getIdValue ( choice , 0 ) ; Object displayValue = renderer . getDisplayValue ( choice ) ; Class displayClass = ( displayValue == null ) ? null : displayValue . getClass ( ) ; String value = getConverter ( displayClass ) . convertToString ( displayValue , getLocale ( ) ) ; value = getLocalizer ( ) . getString ( ( ( id + "." ) + value ) , this , value ) ; buffer . append ( "\n<option<seq2seq4repair_space>value=\"" ) . append ( id ) . append ( "\"" ) ; Map additionalAttributesMap = getAdditionalAttributes ( choice ) ; if ( additionalAttributesMap != null ) { Iterator iter = additionalAttributesMap . keySet ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { String next = ( ( String ) ( iter . next ( ) ) ) ; <START_BUG> buffer . append ( ( ( ( ( "<seq2seq4repair_space>" + ( next . toString ( ) ) ) + "=\"" ) + ( additionalAttributesMap . get ( next ) . toString ( ) ) ) + "\"" ) ) ; <END_BUG> } } buffer . append ( ">" ) . append ( value ) . append ( "<//option>" ) ; } buffer . append ( "\n" ) ; replaceComponentTagBody ( markupStream , openTag , buffer ) ; } protected Map getAdditionalAttributes ( Object choice ) { } protected void onComponentTag ( ComponentTag tag ) { } public void updateModel ( ) { } }

Fix:
buffer . append ( ( ( ( ( "<seq2seq4repair_space>" + next ) + "=\"" ) + ( additionalAttributesMap . get ( next ) . toString ( ) ) ) + "\"" ) ) ;
Buggy code:
public class ManagedWebView extends WebView { private Context context ; private Stack < ManagedWebView . HistoryElement > backStack ; private int posY ; private String repoHtml ; private ManagedWebView . Listener listener ; private DownloadTask . Listener downloadTaskListener ; private boolean showTools ; public ManagedWebView ( Context context ) { } public ManagedWebView ( Context context , AttributeSet attrs ) { } public ManagedWebView ( Context context , AttributeSet attrs , int defStyleAttr ) { } private void init ( Context context ) { } public void setListener ( ManagedWebView . Listener listener ) { } public void show ( final String url ) { if ( url . startsWith ( context . getString ( link_scriptPagePrefix ) ) ) { final String id = Utils . getNameFromUrl ( url ) ; if ( PageCacheManager . hasPage ( id ) ) { RPCManager . getPageTimestamp ( ( ( context . getString ( prefix_script ) ) + id ) , new RPCManager . Listener < Integer > ( ) { @ Override public void onResult ( RPCManager . Result < Integer > result ) { if ( ( result . getStatus ( ) ) == RPCManager . RESULT_OK ) { PageCacheManager . Page page = PageCacheManager . getPage ( id ) ; if ( ( result . getResult ( ) ) > page . timestamp ) { downloadPage ( url ) ; } else <START_BUG> if ( ! ( url . equals ( backStack . peek ( ) . url ) ) ) { <END_BUG> showPage ( url , page . html ) ; } } else Dialogs . connectionFailed ( context ) ; } } ) ; } else downloadPage ( url ) ; } else { new com . trianguloy . llscript . repository . internal . AppChooser ( context , android . net . Uri . parse ( url ) , context . getString ( R . string . title_appChooserExternalClicked ) , context . getString ( R . string . message_noBrowser ) , null ) . show ( ) ; } } private void showPage ( String url , String html ) { } private void downloadPage ( final String url ) { } public boolean backPossible ( ) { } public void performBack ( ) { } @ Override public String getUrl ( ) { } public boolean hasPage ( ) { } public void dropOnStackWithoutShowing ( String url ) { } public String getRepoHtml ( ) { } private void loading ( boolean isLoading ) { } public void setShowTools ( boolean showTools ) { } private static class HistoryElement { public final String url ; public int posY ; public HistoryElement ( String url ) { } } public interface Listener { void loading ( boolean isLoading ) { } void pageChanged ( String url ) { } } }

Fix:
if ( ( backStack . empty ( ) ) || ( ! ( url . equals ( backStack . peek ( ) . url ) ) ) ) {
Buggy code:
public class HaqosWebRoutable implements RestletRoutable { @ Override public String basePath ( ) { } @ Override public Router getRestlet ( Context context ) { Router router = new Router ( context ) ; router . attach ( "//queues//{switchId}//list//json" , HaqosResource . class ) ; <START_BUG> router . attach ( "//addqueues//{src-dpid}//{src-port}//{dst-dpid}//{dst-port}//{bandwidth}//json" , HaqosResource . class ) ; <END_BUG> router . attach ( "//hasbandwidth//{src-dpid}//{dst-dpid}//{bandwidth}//json" , HaqosBandwidthResource . class ) ; return router ; } }

Fix:
router . attach ( "//addqueues//{src-dpid}//{src-port}//{dst-dpid}//{dst-port}//{bandwidth}//{tcp}//json" , HaqosResource . class ) ;
Buggy code:
public class B { public static void main ( String [ ] argv ) { } aspect X ; T Utils ; max ( T first , T second ) { <START_BUG> if ( first > second ) <END_BUG> return first ; else return second ; } }

Fix:
if ( ( first . intValue ( ) ) > ( second . intValue ( ) ) )
Buggy code:
public class FileCellRenderer extends DefaultTreeCellRenderer { public static Icon fileIcon = GUIUtilities . loadIcon ( "file.gif" ) ; public static Icon dirIcon = GUIUtilities . loadIcon ( "closed_folder.gif" ) ; public static Icon openDirIcon = GUIUtilities . loadIcon ( "open_folder.gif" ) ; public static Icon filesystemIcon = GUIUtilities . loadIcon ( "drive.gif" ) ; public static Icon loadingIcon = GUIUtilities . loadIcon ( "drive.gif" ) ; public FileCellRenderer ( ) { } public Component getTreeCellRendererComponent ( JTree tree , Object value , boolean sel , boolean expanded , boolean leaf , int row , boolean focus ) { super . getTreeCellRendererComponent ( tree , value , sel , expanded , leaf , row , focus ) ; DefaultMutableTreeNode treeNode = ( ( DefaultMutableTreeNode ) ( value ) ) ; Object userObject = treeNode . getUserObject ( ) ; if ( userObject instanceof VFS . DirectoryEntry ) { VFS . DirectoryEntry file = ( ( VFS . DirectoryEntry ) ( userObject ) ) ; underlined = ( jEdit . getBuffer ( file . path ) ) != null ; setIcon ( ( showIcons ? getIconForFile ( file , expanded ) : null ) ) ; setFont ( ( ( file . type ) == ( DirectoryEntry . FILE ) ? plainFont : boldFont ) ) ; setText ( file . name ) ; if ( ! sel ) { Color color = file . getColor ( ) ; <START_BUG> setForeground ( ( color == null ? tree . getForeground ( ) : color ) ) ; <END_BUG> } } else if ( userObject instanceof BrowserView . LoadingPlaceholder ) { setIcon ( ( showIcons ? FileCellRenderer . loadingIcon : null ) ) ; setFont ( plainFont ) ; setText ( jEdit . getProperty ( "vfs.browser.tree.loading" ) ) ; underlined = false ; } else if ( userObject instanceof String ) { setIcon ( ( showIcons ? FileCellRenderer . dirIcon : null ) ) ; setFont ( boldFont ) ; setText ( ( ( String ) ( userObject ) ) ) ; underlined = false ; } else { setIcon ( null ) ; setText ( null ) ; } return this ; } public void paintComponent ( Graphics g ) { } boolean showIcons ; void propertiesChanged ( ) { } private Font plainFont ; private Font boldFont ; private boolean underlined ; private Icon getIconForFile ( VFS . DirectoryEntry file , boolean expanded ) { } }

Fix:
setForeground ( ( color == null ? UIManager . getColor ( "Tree.foreground" ) : color ) ) ;
Buggy code:
public class ToolTip extends Widget { Shell parent ; Shell tip ; int x ; int y ; boolean spikeAbove ; boolean autohide ; TextLayout layoutText ; TextLayout layoutMessage ; String text ; String message ; TrayItem item ; Region region ; Font boldFont ; Runnable runnable ; int helpString ; static final int BORDER = 5 ; static final int PADDING = 5 ; static final int INSET = 4 ; static final int TIP_HEIGHT = 20 ; static final int IMAGE_SIZE = 16 ; static final int DELAY = 10000 ; public ToolTip ( Shell parent , int style ) { } static int checkStyle ( int style ) { } public void addSelectionListener ( SelectionListener listener ) { } void configure ( ) { } void createWidget ( ) { } void disposeTip ( ) { } public boolean getAutoHide ( ) { } public String getMessage ( ) { } public Shell getParent ( ) { } Point getSize ( int maxWidth ) { } public String getText ( ) { } public boolean getVisible ( ) { } public boolean isVisible ( ) { } void onMouseDown ( Event event ) { <START_BUG> notifyListeners ( Selection , new Event ( ) ) ; <END_BUG> setVisible ( false ) ; } void onPaint ( Event event ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setAutoHide ( boolean autohide ) { } public void setLocation ( int x , int y ) { } public void setLocation ( Point location ) { } public void setMessage ( String string ) { } public void setText ( String string ) { } public void setVisible ( boolean visible ) { } }

Fix:
sendSelectionEvent ( Selection , null , true ) ;
Buggy code:
i = is [ Randoms . uniform ( is . length ) ] ; double xui = predict ( u , i ) ; List < Integer > SPu = SP . get ( u ) ; do { j = Randoms . uniform ( numItems ) ; } while ( ( pu . contains ( j ) ) || ( SPu . contains ( j ) ) ) ; double xuj = predict ( u , j ) ; if ( ( SPu . size ( ) ) > 0 ) { int k = SPu . get ( Randoms . uniform ( SPu . size ( ) ) ) ; double xuk = predict ( u , k ) ; SparseVector Tu = socialMatrix . row ( u ) ; double suk = 0 ; for ( VectorEntry ve : Tu ) { int v = ve . index ( ) ; if ( v < ( trainMatrix . numRows ( ) ) ) { double rvk = trainMatrix . get ( v , k ) ; if ( rvk > 0 ) suk += 1 ; } } double xuik = ( xui - xuk ) // ( 1 + suk ) ; double xukj = xuk - xuj ; double vals = ( - ( Math . log ( g ( xuik ) ) ) ) - ( Math . log ( g ( xukj ) ) ) ; loss += vals ; errs += vals ; double cik = g ( ( - xuik ) ) ; double ckj = g ( ( - xukj ) ) ; double bi = itemBias . get ( i ) ; itemBias . add ( i , ( ( lRate ) * ( ( cik // ( 1 + suk ) ) - ( ( regB ) * bi ) ) ) ) ; loss += ( ( regB ) * bi ) * bi ; double bk = itemBias . get ( k ) ; itemBias . add ( k , ( ( lRate ) * ( ( ( ( - cik ) // ( 1 + suk ) ) + ckj ) - ( ( regB ) * bk ) ) ) ) ; loss += ( ( regB ) * bk ) * bk ; double bj = itemBias . get ( j ) ; itemBias . add ( j , ( ( lRate ) * ( ( - ckj ) - ( ( regB ) * bj ) ) ) ) ; loss += ( ( regB ) * bj ) * bj ; for ( int f = 0 ; f < ( numFactors ) ; f ++ ) { double puf = P . get ( u , f ) ; double qif = Q . get ( i , f ) ; double qkf = Q . get ( k , f ) ; double qjf = Q . get ( j , f ) ; double delta_puf = ( ( cik * ( qif - qkf ) ) // ( 1 + suk ) ) + ( ckj * ( qkf - qjf ) ) ; P . add ( u , f , ( ( lRate ) * ( delta_puf - ( ( regU ) * puf ) ) ) ) ; Q . add ( i , f , ( ( lRate ) * ( ( ( cik * puf ) // ( 1 + suk ) ) - ( ( regI ) * qif ) ) ) ) ; double delta_qkf = ( cik * ( ( - puf ) // ( 1 + suk ) ) ) + ( ckj * puf ) ; Q . add ( k , f , ( ( lRate ) * ( delta_qkf - ( ( regI ) * qkf ) ) ) ) ; <START_BUG> Q . add ( j , f , ( ( lRate ) * ( ( cik * ( - puf ) ) - ( ( regI ) * qjf ) ) ) ) ; <END_BUG> loss += ( ( ( regU ) * puf ) * puf ) + ( ( ( regI ) * qif ) * qif ) ; loss += ( ( ( regI ) * qkf ) * qkf ) + ( ( ( regI ) * qjf ) * qjf ) ; } } else { double xuij = xui - xuj ; double vals = - ( Math . log ( g ( xuij ) ) ) ; errs += vals ; loss += vals ; double cij = g ( ( - xuij ) ) ; double bi = itemBias . get ( i ) ; itemBias . add ( i , ( ( lRate ) * ( cij - ( ( regB ) * bi ) ) ) ) ; loss += ( ( regB ) * bi ) * bi ; double bj = itemBias . get ( j ) ; itemBias . add ( j , ( ( lRate ) * ( ( - cij ) - ( ( regB ) * bj ) ) ) ) ; loss += ( ( regB ) * bj ) * bj ; for ( int f = 0 ; f < ( numFactors ) ; f ++ ) { double puf = P . get ( u , f ) ; double qif = Q . get ( i , f ) ; double qjf = Q . get ( j , f ) ; P . add ( u , f , ( ( lRate ) * ( ( cij * ( qif - qjf ) ) - ( ( regU ) * puf ) ) ) ) ;

Fix:
Q . add ( j , f , ( ( lRate ) * ( ( ckj * ( - puf ) ) - ( ( regI ) * qjf ) ) ) ) ;
Buggy code:
public class HouyiLoader extends HouyiObject { protected HouyiLoader ( long id ) { } public static HouyiLoader createLoader ( String filePath ) { } public HouyiScene load ( byte [ ] data , int size , String filePath , int options ) { <START_BUG> long scene = nativeLoad ( data , size , ( filePath == null ? "" : filePath ) , options ) ; <END_BUG> return scene == 0 ? null : new HouyiScene ( scene ) ; } public void cancel ( ) { } public static String [ ] getTexturePaths ( byte [ ] data , int size , String path ) { } public float getProgress ( ) { } private static native long nativeCreateLoader ( String filePath ) { } private native long nativeLoad ( byte [ ] data , int size , String filePath , int options ) { } private native void nativeCancel ( ) { } private static native String [ ] nativeGetTexturePaths ( byte [ ] data , int size , String path ) { } private native float nativeGetProgress ( ) { } }

Fix:
long scene = nativeLoad ( data , size , ( filePath == null ? "" : filePath ) , 1 ) ;
Buggy code:
public class VehicleMakeFragment extends ListFragment { ListView lv ; ArrayAdapter < String > ad ; String [ ] makes = new String [ ] { "Loading" } ; String selected ; @ Nullable @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onActivityCreated ( Bundle state ) { } @ Override public void onListItemClick ( ListView lv , View v , int pos , long id ) { } public void setList ( String m ) { <START_BUG> List < String > l = new ArrayList < String > ( Arrays . asList ( m . split ( ",<seq2seq4repair_space>" ) ) ) ; <END_BUG> l . removeAll ( Arrays . asList ( "" , "<seq2seq4repair_space>" , null ) ) ; ad = new ArrayAdapter < String > ( getActivity ( ) , layout . list_row , id . row_item , l ) ; setListAdapter ( ad ) ; } private class GetModels extends AsyncTask < String , Void , String > { @ Override protected String doInBackground ( String ... params ) { } @ Override protected void onPostExecute ( String ret ) { } } }

Fix:
List < String > l = new ArrayList < String > ( Arrays . asList ( m . split ( "\\^" ) ) ) ;
Buggy code:
public class WelcomeScreen extends ActionBarActivity { private static final String TAG = null ; public static boolean long_or_short ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( welcome_screen ) ; final ImageView image = ( ( ImageView ) ( findViewById ( imageView ) ) ) ; final Animation animationFadeIn = AnimationUtils . loadAnimation ( this , fadein ) ; final Animation animationFadeOut = AnimationUtils . loadAnimation ( this , fadeout ) ; Animation . AnimationListener animListener = new Animation . AnimationListener ( ) { @ Override public void onAnimationStart ( Animation animation ) { } @ Override public void onAnimationRepeat ( Animation animation ) { } @ Override public void onAnimationEnd ( Animation animation ) { image . setImageResource ( eddi ) ; image . startAnimation ( animationFadeIn ) ; } } ; image . startAnimation ( animationFadeOut ) ; animationFadeIn . setAnimationListener ( animListener ) ; animationFadeOut . setAnimationListener ( animListener ) ; final Button switchact = ( ( Button ) ( findViewById ( startbutton ) ) ) ; final Button database = ( ( Button ) ( findViewById ( database_button ) ) ) ; final CheckBox want_user = ( ( CheckBox ) ( findViewById ( newUserCheckBox ) ) ) ; final CheckBox test_time = ( ( CheckBox ) ( findViewById ( longorshort ) ) ) ; switchact . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { if ( want_user . isChecked ( ) ) { WelcomeScreen . long_or_short = test_time . isChecked ( ) ; Intent act2 = new Intent ( view . getContext ( ) , CustomerName . class ) ; startActivity ( act2 ) ; } else { WelcomeScreen . long_or_short = test_time . isChecked ( ) ; <START_BUG> Intent act2 = new Intent ( view . getContext ( ) , Calculation . class ) ; <END_BUG> startActivity ( act2 ) ; } } } ) ; database . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { Intent act2 = new Intent ( view . getContext ( ) , Password_screen . class ) ; startActivity ( act2 ) ; } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public static void doRestart ( Context c ) { } }

Fix:
Intent act2 = new Intent ( view . getContext ( ) , Calibration . class ) ;
Buggy code:
public class TwoLineActionRow extends ActionRow { private TextView mTitleView ; private TextView mSubtitleView ; private ImageView mActionIconView ; private static final String NAMESPACE = "http:////schemas.android.com//apk//res//android" ; public TwoLineActionRow ( Context context , AttributeSet attrs ) { } public TwoLineActionRow ( Context context ) { } private void initHelper ( Context context ) { } public void setTitle ( CharSequence title , int color ) { } public void setTitle ( CharSequence title ) { } public void setTitle ( CharSequence title , TextView . BufferType bufferType ) { if ( title != null ) { <START_BUG> mTitleView . setText ( title ) ; <END_BUG> mTitleView . setVisibility ( VISIBLE ) ; } else { mTitleView . setVisibility ( GONE ) ; } } public CharSequence getTitle ( ) { } public void setSubtitle ( CharSequence subtitle ) { } public void setActionIconResource ( int resId ) { } public void removeActionIcon ( ) { } @ Override protected int getLayoutId ( ) { } @ Override public void setEnabled ( boolean enabled ) { } }

Fix:
mTitleView . setText ( title , bufferType ) ;
Buggy code:
public class MinifyResources { public static void main ( String [ ] args ) { <START_BUG> String baseDir = ( new File ( args [ 0 ] ) . getAbsoluteFile ( ) . getParentFile ( ) . getPath ( ) ) + ( File . separator ) ; <END_BUG> String baseDirData = ( baseDir + "data" ) + ( File . separator ) ; String [ ] command = new String [ ] { "java" , "-jar" , baseDirData + "compiler.jar" , baseDirData + "d3.js" , baseDirData + "c3.js" , baseDirData + "excanvas.compiled.js" , baseDirData + "diff_match_patch.js" , baseDirData + "jquery-1.11.2.min.js" , baseDirData + "pivot.js" , baseDirData + "jquery-ui-1.9.2.custom.min.js" , baseDirData + "l10n.js" , baseDirData + "viewer.js" , baseDirData + "main.js" , baseDirData + "preMain.js" , baseDirData + "compatibility.js" , baseDirData + "jstat.js" , baseDirData + "pdf.js" , "--js_output_file" , baseDirData + "all" , "--language_in" , "ECMASCRIPT5" , "--compilation_level" , "WHITESPACE_ONLY" , "--charset" , "UTF-8" } ; try { ProcessBuilder pb = new ProcessBuilder ( Arrays . asList ( command ) ) ; pb . inheritIO ( ) ; Process p = pb . start ( ) ; p . waitFor ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } try { String all = FileUtils . readFileToString ( new File ( ( baseDirData + "all" ) ) , utf8 ) ; String lz = FileUtils . readFileToString ( new File ( ( baseDirData + "lz-string.min.js" ) ) , utf8 ) ; String base64JS = FileUtils . readFileToString ( new File ( ( baseDirData + "base64.js" ) ) , utf8 ) ; String datatablesJS = FileUtils . readFileToString ( new File ( ( baseDirData + "jquery.dataTables.js" ) ) , utf8 ) ; String alasqlJS = FileUtils . readFileToString ( new File ( ( baseDirData + "alasql.js" ) ) , utf8 ) ; String codemirrorJS = FileUtils . readFileToString ( new File ( ( baseDirData + "codemirror-compressed.js" ) ) , utf8 ) ; String pdfworkerJS = FileUtils . readFileToString ( new File ( ( baseDirData + "pdf.worker.js" ) ) , utf8 ) ; String viewerCSS = FileUtils . readFileToString ( new File ( ( baseDirData + "viewer.css" ) ) , utf8 ) ; String pivotCSS = FileUtils . readFileToString ( new File ( ( baseDirData + "pivot.css" ) ) , utf8 ) ; String datatablesCSS = FileUtils . readFileToString ( new File ( ( baseDirData + "jquery.dataTables.css" ) ) , utf8 ) ; String codemirrorCSS = FileUtils . readFileToString ( new File ( ( baseDirData + "codemirror.css" ) ) , utf8 ) ; String c3CSS = FileUtils . readFileToString ( new File ( ( baseDirData + "c3.css" ) ) , utf8 ) ; String out = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( lz + pdfworkerJS ) + base64JS ) + alasqlJS ) + "\n" ) + all ) + "\n" ) + codemirrorJS ) + "\n" ) + datatablesJS ) + "<//script><style>" ) + viewerCSS ) + pivotCSS ) + codemirrorCSS ) + datatablesCSS ) + c3CSS ) + "<//style>" ; FileUtils . writeStringToFile ( new File ( ( baseDirData + "all" ) ) , out , utf8 , false ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } }

Fix:
String baseDir = new File ( CompleteRun_HTML . class . getProtectionDomain ( ) . getCodeSource ( ) . getLocation ( ) . getPath ( ) ) . getParent ( ) ;
Buggy code:
@ MessageBundle ( projectCode = "JBAS" ) interface ModClusterMessages { ModClusterMessages MESSAGES = Messages . getBundle ( ModClusterMessages . class ) ; @ Message ( id = 11730 , value = "A<seq2seq4repair_space>class<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>needed<seq2seq4repair_space>for<seq2seq4repair_space>%s" ) String classAttributeRequired ( String attributeName ) { } @ Message ( id = 11731 , value = "need<seq2seq4repair_space>context<seq2seq4repair_space>and<seq2seq4repair_space>host" ) String needContextAndHost ( ) { } @ Message ( id = 11732 , value = "A<seq2seq4repair_space>type<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>needed<seq2seq4repair_space>for<seq2seq4repair_space>%s" ) String typeAttributeRequired ( String attributeName ) { } @ Message ( id = 11733 , value = "virtualhost:<seq2seq4repair_space>%s<seq2seq4repair_space>or<seq2seq4repair_space>context<seq2seq4repair_space>%s<seq2seq4repair_space>not<seq2seq4repair_space>found" ) String ContextorHostNotFound ( String Host , String Context ) { } <START_BUG> @ Message ( id = 11734 , value = "'cacacity'<seq2seq4repair_space>is<seq2seq4repair_space>either<seq2seq4repair_space>an<seq2seq4repair_space>expression<seq2seq4repair_space>or<seq2seq4repair_space>has<seq2seq4repair_space>a<seq2seq4repair_space>bigger<seq2seq4repair_space>value<seq2seq4repair_space>than<seq2seq4repair_space>Integer.MAX_VALUE:<seq2seq4repair_space>%s" ) <END_BUG> String capacityIsExpressionOrGreaterThanIntegerMaxValue ( ModelNode value ) ; @ Message ( id = 11735 , value = "'property'<seq2seq4repair_space>can<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>entry" ) String propertyCanOnlyHaveOneEntry ( ) { } }

Fix:
@ Message ( id = 11734 , value = "'capacity'<seq2seq4repair_space>is<seq2seq4repair_space>either<seq2seq4repair_space>an<seq2seq4repair_space>expression,<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>an<seq2seq4repair_space>integer<seq2seq4repair_space>value,<seq2seq4repair_space>or<seq2seq4repair_space>has<seq2seq4repair_space>a<seq2seq4repair_space>bigger<seq2seq4repair_space>value<seq2seq4repair_space>than<seq2seq4repair_space>Integer.MAX_VALUE:<seq2seq4repair_space>%s" )
Buggy code:
public class CookieTest extends TestCase { private static Log log = LogFactory . getLog ( CookieTest . class ) ; private MockWebApplication application ; private SignInPanel panel ; private Form form ; private Cookie cookieUsername ; private Cookie cookiePassword ; private Cookie [ ] cookies ; private WebPage page ; private WebRequestCycle cycle ; public CookieTest ( String name ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; application = new MockWebApplication ( null ) ; application . getPages ( ) . setHomePage ( MockPage . class ) ; application . setupRequestAndResponse ( ) ; final ApplicationSettings settings = application . getSettings ( ) ; settings . setCryptClass ( NoCrypt . class ) ; this . panel = new SignInPanel ( "panel" ) { public boolean signIn ( final String username , final String password ) { return true ; } } ; this . panel . setPersistent ( true ) ; this . form = ( ( Form ) ( panel . get ( "signInForm" ) ) ) ; <START_BUG> final ICrypt crypt = application . getCrypt ( ) ; <END_BUG> final String encryptedPassword = crypt . encryptString ( "test" ) ; assertNotNull ( encryptedPassword ) ; this . cookieUsername = new Cookie ( "panel.signInForm.username" , "juergen" ) ; this . cookiePassword = new Cookie ( "panel.signInForm.password" , encryptedPassword ) ; this . cookies = new Cookie [ ] { cookieUsername , cookiePassword } ; application . getServletRequest ( ) . setCookies ( cookies ) ; cycle = new WebRequestCycle ( application . getWicketSession ( ) , application . getWicketRequest ( ) , application . getWicketResponse ( ) ) ; this . page = new MockPage ( null ) ; page . add ( this . panel ) ; WebRequestCycle cycle = new WebRequestCycle ( application . getWicketSession ( ) , application . getWicketRequest ( ) , application . getWicketResponse ( ) ) ; application . getWicketSession ( ) . setRequestCycle ( cycle ) ; } public void testSetCookieOnForm ( ) throws IOException , ServletException { } public void testPersistCookieWithPersistenceDisabled ( ) throws IOException , ServletException { } public void testPersistCookie ( ) throws IOException , ServletException { } public void testRemoveFromPage ( ) throws IOException , ServletException { } }

Fix:
final ICrypt crypt = application . newCrypt ( ) ;
Buggy code:
class JSFSubsystemAdd extends AbstractBoottimeAddStepHandler { static final JSFSubsystemAdd INSTANCE = new JSFSubsystemAdd ( ) ; @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performBoottime ( OperationContext context , ModelNode operation , final ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) { context . addStep ( new AbstractDeploymentChainStep ( ) { protected void execute ( DeploymentProcessorTarget processorTarget ) { processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_JSF_VERSION , new org . jboss . as . jsf . deployment . JSFVersionProcessor ( model ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_JSF_SHARED_TLDS , new JSFSharedTldsProcessor ( ) ) ; <START_BUG> processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , POST_MODULE_JSF_MANAGED_BEANS , new JSFManagedBeanProcessor ( ) ) ; <END_BUG> processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , DEPENDENCIES , DEPENDENCIES_JSF , new JSFDependencyProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_JSF_MANAGED_BEANS , new JSFManagedBeanProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , INSTALL , INSTALL_JSF_ANNOTATIONS , new JSFAnnotationProcessor ( ) ) ; } } , RUNTIME ) ; } @ Override protected boolean requiresRuntimeVerification ( ) { } }

Fix:
processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_JSF_MANAGED_BEANS , new JSFManagedBeanProcessor ( ) ) ;
Buggy code:
public interface IValidationError { <START_BUG> String getErrorMessage ( IMessageSource messageSource ) ; <END_BUG> }

Fix:
String getErrorMessage ( IErrorMessageSource messageSource ) ;
Buggy code:
public class SignInServlet extends HttpServlet { private AccountService accountService ; public SignInServlet ( AccountService accountService ) { } public void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { Map < String , Object > pageVariables = new HashMap < > ( ) ; response . setStatus ( SC_OK ) ; if ( ( accountService . getSessions ( request . getSession ( ) . getId ( ) ) ) != null ) { response . sendRedirect ( "//profile" ) ; } else { pageVariables . put ( "signInStatus" , "Time<seq2seq4repair_space>to<seq2seq4repair_space>login!" ) ; <START_BUG> response . getWriter ( ) . println ( PageGenerator . getPage ( "signup.html" , pageVariables ) ) ; <END_BUG> } } public void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } }

Fix:
response . getWriter ( ) . println ( PageGenerator . getPage ( "signin.html" , pageVariables ) ) ;
Buggy code:
public class UpgradeReceiver extends BroadcastReceiver { @ Override public void onReceive ( Context context , Intent intent ) { } private void upgradeUser ( Context context ) { int newAppVersion = new samuelpalmer . sensorautorotation . VersionInfo ( context ) . installedVersionCode ( ) ; ApplicationSettings . Setting < Integer > lastVersionUserInstructedAbout = new ApplicationSettings ( context ) . lastVersionUserInstructedAbout ( ) ; <START_BUG> Integer lastVersionUserInstructedAboutValue = lastVersionUserInstructedAbout . getOr ( null ) ; <END_BUG> if ( lastVersionUserInstructedAboutValue != null ) { StringBuilder upgradeMessage = new StringBuilder ( ) ; for ( int version = lastVersionUserInstructedAboutValue + 1 ; version <= newAppVersion ; ++ version ) { Integer messageId = UpgradeReceiver . upgradeMessages . get ( version ) ; if ( messageId != null ) { String currentMessage = context . getString ( messageId ) ; upgradeMessage . append ( currentMessage ) ; upgradeMessage . append ( '\n' ) ; } } if ( ( upgradeMessage . length ( ) ) != 0 ) show ( upgradeMessage . toString ( ) , context ) ; lastVersionUserInstructedAbout . setAndCommit ( newAppVersion ) ; } } private void show ( String upgradeMessage , Context context ) { } private PendingIntent makeShowMessage ( String message , Context context ) { } private static final Map < Integer , Integer > upgradeMessages ; }

Fix:
Integer lastVersionUserInstructedAboutValue = lastVersionUserInstructedAbout . tryGet ( ) ;
Buggy code:
public class AdvertisedService extends ServiceInfo implements IService , INode { private static final long serialVersionUID = 1001026250299416572L ; private String uuid ; private Map < String , Object > nodeProperties = new HashMap < String , Object > ( ) ; private static Map < String , IServiceInfo > publishedServices = new HashMap < String , IServiceInfo > ( ) ; private ServiceReference serviceReference ; public AdvertisedService ( ServiceReference ref ) { } public AdvertisedService ( IServiceInfo serviceInfo ) { } private void setNodeProperties ( ) { this . nodeProperties . put ( NODE_PROPERTY_SERVICE_NAME , getServiceName ( ) ) ; this . nodeProperties . put ( NODE_SERVICE_PROPERTIES , super . properties ) ; this . nodeProperties . put ( NODE_PROPERTY_NAME_PROTOCOLS , getServiceID ( ) . getServiceTypeID ( ) . getProtocols ( ) ) ; this . nodeProperties . put ( NODE_PROPERTY_NAME_SCOPE , getServiceID ( ) . getServiceTypeID ( ) . getScopes ( ) ) ; this . nodeProperties . put ( NODE_PROPERTY_SERVICES , getServiceID ( ) . getServiceTypeID ( ) . getServices ( ) ) ; this . nodeProperties . put ( NODE_PROPERTY_NAME_NA , getServiceID ( ) . getServiceTypeID ( ) . getNamingAuthority ( ) ) ; this . nodeProperties . put ( LOCATION , getLocation ( ) ) ; this . nodeProperties . put ( WEIGHT , getWeight ( ) ) ; this . nodeProperties . put ( PRIORITY , getPriority ( ) ) ; <START_BUG> AdvertisedService . publishedServices . put ( getServiceID ( ) . getServiceTypeID ( ) . getInternal ( ) , this ) ; <END_BUG> } public static Map < String , IServiceInfo > getPublishedServices ( ) { } public static synchronized IServiceInfo removePublished ( String id ) { } public String getNodeId ( ) { } public void regenerateNodeId ( ) { } public URI getLocation ( ) { } public IServiceID getServiceID ( ) { } public int compareTo ( Object o ) { } public ServiceReference getServiceReference ( ) { } public byte [ ] getPropertiesAsBytes ( ) { } public String getPath ( ) { } public String getAbsolutePath ( ) { } public boolean isLocalNode ( ) { } public IService getWrappedService ( ) { } }

Fix:
AdvertisedService . publishedServices . put ( getServiceID ( ) . getName ( ) , this ) ;
Buggy code:
public class Accountmanagement extends Controller { public static Result register ( ) { } public static Result login ( ) { String nickname = Form . form ( ) . bindFromRequest ( ) . field ( "nickname" ) . value ( ) ; String password = Form . form ( ) . bindFromRequest ( ) . field ( "password" ) . value ( ) ; if ( ( nickname . equals ( "" ) ) || ( nickname == null ) ) { } User user = User . findByUsername ( nickname ) ; if ( user == null ) { return ok ( login . render ( "Your<seq2seq4repair_space>password<seq2seq4repair_space>or<seq2seq4repair_space>username<seq2seq4repair_space>was<seq2seq4repair_space>wrong." ) ) ; } try { if ( PasswordHash . validatePassword ( password , ( ( ( "5000:" + ( user . password_hash ) ) + ":" ) + ( user . password_salt ) ) ) ) { session ( "username" , nickname ) ; <START_BUG> return ok ( editProfile . render ( ( ( "Welcome,<seq2seq4repair_space>" + nickname ) + "!" ) ) ) ; <END_BUG> } else { return ok ( login . render ( "Your<seq2seq4repair_space>password<seq2seq4repair_space>or<seq2seq4repair_space>username<seq2seq4repair_space>was<seq2seq4repair_space>wrong." ) ) ; } } catch ( Exception e ) { return ok ( login . render ( "Oops,<seq2seq4repair_space>seems<seq2seq4repair_space>we<seq2seq4repair_space>occurred<seq2seq4repair_space>a<seq2seq4repair_space>problem.<seq2seq4repair_space>Maybe<seq2seq4repair_space>our<seq2seq4repair_space>Server<seq2seq4repair_space>drowned.\n" ) ) ; } } public static Result logout ( ) { } public static Result editProfile ( ) { } public static String getHashy ( String hash ) { } public static String getSalty ( String hash ) { } }

Fix:
return ok ( home . render ( ( ( "Welcome,<seq2seq4repair_space>" + nickname ) + "!" ) ) ) ;
Buggy code:
public class RemoteServiceRegistrationImpl implements Serializable , IRemoteServiceRegistration { private static final long serialVersionUID = - 3206899332723536545L ; transient Object service ; protected String [ ] clazzes ; protected long serviceid ; protected RemoteServiceRegistrationImpl . Properties properties ; protected int serviceranking ; protected transient Object registrationLock = new Object ( ) ; protected int state = RemoteServiceRegistrationImpl . REGISTERED ; protected ID containerID = null ; public static final int REGISTERED = 0 ; public static final int UNREGISTERING = 1 ; public static final int UNREGISTERED = 2 ; protected transient RemoteServiceReferenceImpl reference = null ; protected transient RegistrySharedObject sharedObject = null ; public RemoteServiceRegistrationImpl ( ) { } public void publish ( RegistrySharedObject sharedObject , RemoteServiceRegistryImpl registry , Object service , String [ ] clazzes , Dictionary properties ) { } public Object getService ( ) { } public ID getContainerID ( ) { } protected String [ ] getClasses ( ) { } public IRemoteServiceReference getReference ( ) { } public void setProperties ( Dictionary properties ) { } public void unregister ( ) { } protected RemoteServiceRegistrationImpl . Properties createProperties ( Dictionary props ) { } static class Properties extends Hashtable { private static final long serialVersionUID = - 3684607010228779249L ; private Properties ( int size , Dictionary props ) { } protected Properties ( Dictionary props ) { } protected Object getProperty ( String key ) { } protected synchronized String [ ] getPropertyKeys ( ) { } protected synchronized Object setProperty ( String key , Object value ) { } protected static Object cloneValue ( Object value ) { if ( value == null ) return null ; if ( value instanceof String ) return value ; Class clazz = value . getClass ( ) ; if ( clazz . isArray ( ) ) { Class type = clazz . getComponentType ( ) ; int len = Array . getLength ( value ) ; Object clonedArray = Array . newInstance ( type , len ) ; System . arraycopy ( value , 0 , clonedArray , 0 , len ) ; return clonedArray ; } try { <START_BUG> return clazz . getMethod ( "clone" , null ) . invoke ( value , null ) ; <END_BUG> } catch ( Exception e ) { } catch ( Error e ) { if ( value instanceof Vector ) return ( ( Vector ) ( value ) ) . clone ( ) ; if ( value instanceof Hashtable ) return ( ( Hashtable ) ( value ) ) . clone ( ) ; } return value ; } public synchronized String toString ( ) { } } public Object getProperty ( String key ) { } public String [ ] getPropertyKeys ( ) { } public long getServiceId ( ) { } public Object callService ( RemoteCallImpl call ) throws Exception { } }

Fix:
return clazz . getMethod ( "clone" , ( ( Class [ ] ) ( null ) ) ) . invoke ( value , ( ( Object [ ] ) ( null ) ) ) ;
Buggy code:
public class TemplateManager { private final MessageSource messageSource ; private final boolean cache ; private final Map < String , Template > templateCache = new ConcurrentHashMap < > ( 5 ) ; public enum TemplateOutput { TEXT , HTML ; } private final Map < TemplateManager . TemplateOutput , Compiler > compilers ; @ Autowired public TemplateManager ( Environment environment , JMustacheTemplateLoader templateLoader , MessageSource messageSource ) { } public String renderClassPathResource ( String classPathResource , Map < String , Object > model , Locale locale , TemplateManager . TemplateOutput templateOutput ) { } public String renderString ( String template , Map < String , Object > model , Locale locale , TemplateManager . TemplateOutput templateOutput ) { <START_BUG> return render ( new ByteArrayResource ( template . getBytes ( ) ) , "" , model , locale , templateOutput , false ) ; <END_BUG> } public String renderServletContextResource ( String servletContextResource , Map < String , Object > model , HttpServletRequest request , TemplateManager . TemplateOutput templateOutput ) { } private String render ( AbstractResource resource , String key , Map < String , Object > model , Locale locale , TemplateManager . TemplateOutput templateOutput , boolean cachingRequested ) { } private Template compile ( AbstractResource resource , TemplateManager . TemplateOutput templateOutput ) { } private static class CustomLocalizationMessageInterceptor { private static final Pattern KEY_PATTERN = Pattern . compile ( "(.*?)[\\s\\[]" ) ; private static final Pattern ARGS_PATTERN = Pattern . compile ( "\\[(.*?)\\]" ) ; private final Locale locale ; private final MessageSource messageSource ; private CustomLocalizationMessageInterceptor ( Locale locale , MessageSource messageSource ) { } protected Lambda createTranslator ( ) { } private String extractKey ( String key ) { } private List < String > extractParameters ( String key ) { } } }

Fix:
return render ( new ByteArrayResource ( template . getBytes ( StandardCharsets . UTF_8 ) ) , "" , model , locale , templateOutput , false ) ;
Buggy code:
public class DefaultJobService { private static final Logger logger = LoggerFactory . getLogger ( JobDao . class ) ; private static final ConcurrentHashMap < KylinConfig , DefaultJobService > CACHE = new ConcurrentHashMap < KylinConfig , DefaultJobService > ( ) ; private JobDao jobDao ; public static DefaultJobService getInstance ( KylinConfig config ) { } private DefaultJobService ( KylinConfig config ) { } public void addJob ( AbstractExecutable executable ) { } private void addJobOutput ( AbstractExecutable executable ) throws PersistentException { jobDao . addJobOutput ( executable . getJobOutput ( ) ) ; if ( executable instanceof DefaultChainedExecutable ) { for ( AbstractExecutable subTask : ( ( DefaultChainedExecutable ) ( executable ) ) . getTasks ( ) ) { <START_BUG> addJob ( subTask ) ; <END_BUG> } } } void deleteJob ( AbstractExecutable executable ) { } public AbstractExecutable getJob ( String uuid ) { } public ExecutableStatus getJobStatus ( String uuid ) { } public List < AbstractExecutable > getAllExecutables ( ) { } public void resetRunningJobToError ( AbstractExecutable executable , String reason ) { } public void updateJobStatus ( AbstractExecutable executable , ExecutableStatus newStatus ) { } public void updateJobStatus ( AbstractExecutable executable , ExecutableStatus newStatus , String reason ) { } private JobPO getJobPO ( AbstractExecutable executable ) { } private AbstractExecutable parseTo ( JobPO jobPO , JobOutputPO jobOutput ) { } }

Fix:
addJobOutput ( subTask ) ;