nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Message implements Serializable { private String msgType ; private String src = "-1" ; private String dst = "-1" ; private String song ; private String url ; private String message ; public static final long serialVersionUID = 6473128480951955693L ; public Message ( ) { } public Message ( String type ) { } public Message ( String type , String m ) { } public Message ( String type , String key , String val ) { } public Message ( String type , String key , String val , String m ) { } public boolean isVoteReq ( ) { } public boolean isStateReq ( ) { } public boolean isStateReport ( ) { } public boolean isAck ( ) { } public boolean isResponse ( ) { } public boolean isMaster ( ) { } public boolean votedNo ( ) { } public boolean votedYes ( ) { } public boolean isFeedback ( ) { } public SlaveState getState ( ) { if ( ! ( msgType . equals ( STATE_REP ) ) ) { <START_BUG> return SlaveState . READY ; <END_BUG> } return SlaveState . valueOf ( message ) ; } public void setSrc ( int s ) { } public void setDst ( int d ) { } public String getType ( ) { } public int getSrc ( ) { } public int getDst ( ) { } public String getSong ( ) { } public String getUrl ( ) { } public String getMessage ( ) { } public String marshal ( ) { } public void unmarshal ( String str ) { } }

Fix:
return SlaveState . ABORTED ;
Buggy code:
public abstract class IOUtil { public static void skip ( InputStream is ) throws IOException { } public static void copy ( InputStream is , OutputStream os , boolean close ) throws IOException { } public static void copy ( InputStream is , OutputStream os ) throws IOException { } public static void copy ( Reader r , Writer w , boolean close ) throws IOException { } public static void copy ( Reader r , Writer w ) throws IOException { } public static InputStream asBufferedInputStream ( InputStream is ) { } public static InputStream asUncompressedInputStream ( InputStream is ) throws IOException { is = IOUtil . asBufferedInputStream ( is ) ; assert is . markSupported ( ) ; is . mark ( 2 ) ; byte [ ] buf = new byte [ 2 ] ; int bytesRead = 0 ; try { bytesRead = is . read ( buf ) ; } finally { is . reset ( ) ; } if ( bytesRead == 2 ) { <START_BUG> int magic = ( ( ( buf [ 0 ] ) & 255 ) << 8 ) | ( ( buf [ 1 ] ) & 255 ) ; <END_BUG> if ( magic == ( GZIPInputStream . GZIP_MAGIC ) ) { return new GZIPInputStream ( is ) ; } } return is ; } public static OutputStream asBufferedOutputStream ( OutputStream os ) { } }

Fix:
int magic = ( ( ( buf [ 1 ] ) & 255 ) << 8 ) | ( ( buf [ 0 ] ) & 255 ) ;
Buggy code:
public abstract class ZipUtil { private static final byte [ ] DOS_TIME_MIN = ZipLong . getBytes ( 8448L ) ; public static ZipLong toDosTime ( Date time ) { } public static byte [ ] toDosTime ( long t ) { Calendar c = Calendar . getInstance ( ) ; c . setTimeInMillis ( t ) ; int year = c . get ( Calendar . YEAR ) ; if ( year < 1980 ) { <START_BUG> return ( ( byte [ ] ) ( ZipUtil . DOS_TIME_MIN . clone ( ) ) ) ; <END_BUG> } int month = ( c . get ( Calendar . MONTH ) ) + 1 ; long value = ( ( ( ( ( ( year - 1980 ) << 25 ) | ( month << 21 ) ) | ( ( c . get ( Calendar . DAY_OF_MONTH ) ) << 16 ) ) | ( ( c . get ( Calendar . HOUR_OF_DAY ) ) << 11 ) ) | ( ( c . get ( Calendar . MINUTE ) ) << 5 ) ) | ( ( c . get ( Calendar . SECOND ) ) > > 1 ) ; return ZipLong . getBytes ( value ) ; } public static long adjustToLong ( int i ) { } public static Date fromDosTime ( ZipLong zipDosTime ) { } public static long dosToJavaTime ( long dosTime ) { } static void setNameAndCommentFromExtraFields ( ZipArchiveEntry ze , byte [ ] originalNameBytes , byte [ ] commentBytes ) { } private static String getUnicodeStringIfOriginalMatches ( AbstractUnicodeExtraField f , byte [ ] orig ) { } static byte [ ] copy ( byte [ ] from ) { } }

Fix:
return ZipUtil . copy ( ZipUtil . DOS_TIME_MIN ) ;
Buggy code:
public class StartProgramView { private String promptMessage ; public StartProgramView ( ) { } public void displayBanner ( ) { } public void displayStartProgramView ( ) { } private String getPlayersName ( ) { } private boolean doAction ( String playersName ) { if ( ( playersName . length ( ) ) < 2 ) { System . out . println ( ( "\nInvalid<seq2seq4repair_space>players<seq2seq4repair_space>name:<seq2seq4repair_space>" + "The<seq2seq4repair_space>name<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>greater<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>character<seq2seq4repair_space>in<seq2seq4repair_space>length" ) ) ; return false ; } <START_BUG> boolean player = GameControl . createPlayer ( playersName ) ; <END_BUG> if ( player == null ) { System . out . println ( "\nError<seq2seq4repair_space>creating<seq2seq4repair_space>the<seq2seq4repair_space>player." ) ; return false ; } this . displayNextView ( player ) ; return true ; } private void displayNextView ( Player player ) { } private void displayNextView ( boolean player ) { } }

Fix:
Player player = GameControl . createPlayer ( playersName ) ;
Buggy code:
public class UltimateCommands implements TabCompleter { public static List < UltimateCommand > cmds = new ArrayList < > ( ) ; public static UltimateCommands ucmds ; public static void load ( ) { } public static void onCmd ( final CommandSender sender , Command cmd , String label , final String [ ] args ) { } @ Override public List < String > onTabComplete ( CommandSender sender , Command cmd , String label , String [ ] args ) { if ( UltimateCommands . Overrider . checkOverridden ( sender , cmd , label , args ) ) { return null ; } List < String > rtrn = null ; if ( label . startsWith ( "ultimatecore:" ) ) { label = label . replaceFirst ( "ultimatecore:" , "" ) ; } for ( UltimateCommand cmdr : UltimateCommands . cmds ) { if ( ( cmdr . getName ( ) . equals ( label ) ) || ( cmdr . getAliases ( ) . contains ( label ) ) ) { try { rtrn = cmdr . onTabComplete ( sender , cmd , label , args , args [ ( ( args . length ) - 1 ) ] , ( ( args . length ) - 1 ) ) ; } catch ( Exception ex ) { ErrorLogger . log ( ex , ( "Failed<seq2seq4repair_space>tabcompleting<seq2seq4repair_space>for<seq2seq4repair_space>" + label ) ) ; } break ; } } if ( rtrn == null ) { rtrn = new ArrayList < > ( ) ; for ( Player p : r . getOnlinePlayers ( ) ) { rtrn . add ( p . getName ( ) ) ; } } if ( ! ( StringUtil . nullOrEmpty ( args [ ( ( args . length ) - 1 ) ] ) ) ) { <START_BUG> Iterator < String > i = rtrn . iterator ( ) ; <END_BUG> while ( i . hasNext ( ) ) { String s = i . next ( ) ; if ( ! ( s . startsWith ( args [ ( ( args . length ) - 1 ) ] ) ) ) { i . remove ( ) ; } } } return rtrn ; } static class Overrider { private static final transient Map < PluginCommand , PluginCommand > overriddenList = new HashMap < > ( ) ; public static void fixCommands ( ) { } public static void addPlugin ( Plugin pl ) { } public static void removePlugin ( Plugin pl ) { } public static boolean checkOverridden ( final CommandSender cs , Command cmd , final String label , final String [ ] args ) { } @ EventHandler public void plEnable ( PluginEnableEvent e ) { } @ EventHandler public void plDisable ( PluginDisableEvent e ) { } } }

Fix:
Iterator < String > i = new ArrayList < > ( rtrn ) . iterator ( ) ;
Buggy code:
public class Localizer { private static final Log log = LogFactory . getLog ( Localizer . class ) ; private Application application ; public Localizer ( final Application application ) { } public String getString ( final String key , final Component component ) throws MissingResourceException { } public String getString ( final String key , final Component component , final IModel model ) throws MissingResourceException { } public String getString ( final String key , final Component component , final IModel model , final String defaultValue ) throws MissingResourceException { } public String getString ( final String key , final Component component , final String defaultValue ) throws MissingResourceException { } public String getString ( final String key , final Component component , final IModel model , final Locale locale , final String style , final String defaultValue ) throws MissingResourceException { } public String getString ( final String key , final String path , final List searchStack , final Locale locale , final String style ) throws MissingResourceException { } private List getComponentStack ( final Component component ) { } private String substitutePropertyExpressions ( final Component component , final String string , final IModel model ) { } private String visitResourceLoaders ( final String key , final String path , final List searchStack , final Locale locale , final String style ) { final Iterator iterator = application . getResourceSettings ( ) . getStringResourceLoaders ( ) . iterator ( ) ; String string = null ; while ( ( iterator . hasNext ( ) ) && ( string == null ) ) { IStringResourceLoader loader = ( ( IStringResourceLoader ) ( iterator . next ( ) ) ) ; String prefix = path ; if ( ( searchStack != null ) && ( ( searchStack . size ( ) ) > 0 ) ) { for ( int i = ( searchStack . size ( ) ) - 1 ; ( i >= 0 ) && ( string == null ) ; i -- ) { Class clazz = ( ( Class ) ( searchStack . get ( i ) ) ) ; string = loader . loadStringResource ( clazz , key , locale , style ) ; if ( ( ( string == null ) && ( path != null ) ) && ( ( prefix . length ( ) ) > 0 ) ) { string = loader . loadStringResource ( clazz , ( ( prefix + '.' ) + key ) , locale , style ) ; if ( string == null ) { <START_BUG> prefix = Strings . beforeLast ( prefix , '.' ) ; <END_BUG> } } } } else { string = loader . loadStringResource ( null , key , locale , style ) ; if ( ( ( string == null ) && ( path != null ) ) && ( ( prefix . length ( ) ) > 0 ) ) { string = loader . loadStringResource ( null , ( ( prefix + '.' ) + key ) , locale , style ) ; } } } return string ; } }

Fix:
prefix = Strings . afterFirst ( prefix , '.' ) ;
Buggy code:
public class LocalRootFolder extends Folder { public LocalRootFolder ( FolderItem item ) { } protected static final ImageIcon rootIcon = ImageLoader . getSmallImageIcon ( "localhost.png" ) ; public ImageIcon getCollapsedIcon ( ) { } public ImageIcon getExpandedIcon ( ) { } public Object addMessage ( AbstractMessage message , WorkerStatusController worker ) throws Exception { } public Object addMessage ( String source , WorkerStatusController worker ) throws Exception { } public boolean exists ( Object uid , WorkerStatusController worker ) throws Exception { } <START_BUG> public void expungeFolder ( Object [ ] uids , WorkerStatusController worker ) throws Exception { <END_BUG> } public HeaderList getHeaderList ( WorkerStatusController worker ) throws Exception { } public ColumbaHeader getMessageHeader ( Object uid , WorkerStatusController worker ) throws Exception { } public String getMessageSource ( Object uid , WorkerStatusController worker ) throws Exception { } public MimePart getMimePart ( Object uid , Integer [ ] address , WorkerStatusController worker ) throws Exception { } public MimePartTree getMimePartTree ( Object uid , WorkerStatusController worker ) throws Exception { } public void markMessage ( Object [ ] uids , int variant , WorkerStatusController worker ) throws Exception { } public void removeMessage ( Object uid , WorkerStatusController worker ) throws Exception { } public Object [ ] searchMessages ( Filter filter , Object [ ] uids , WorkerStatusController worker ) throws Exception { } public Object [ ] searchMessages ( Filter filter , WorkerStatusController worker ) throws Exception { } public String getDefaultChild ( ) { } }

Fix:
public void expungeFolder ( WorkerStatusController worker ) throws Exception {
Buggy code:
public class WinNTCommandLauncher implements CommandLauncher { public Process exec ( final ExecMetaData metaData ) throws IOException , ExecException { final String [ ] prefix = new String [ 6 ] ; prefix [ 0 ] = "cmd" ; prefix [ 1 ] = "//c" ; prefix [ 2 ] = "cd" ; prefix [ 3 ] = "//d" ; prefix [ 4 ] = metaData . getWorkingDirectory ( ) . getCanonicalPath ( ) ; prefix [ 5 ] = "&&" ; final ExecMetaData newMetaData = ExecUtil . prepend ( metaData , prefix ) ; <START_BUG> final String [ ] env = ExecUtil . toNativeEnvironment ( metaData . getEnvironment ( ) ) ; <END_BUG> return Runtime . getRuntime ( ) . exec ( newMetaData . getCommand ( ) , env ) ; } }

Fix:
final String [ ] env = ExecUtil . getEnvironmentSpec ( metaData ) ;
Buggy code:
public class LogicalFlow { protected final int id ; protected final Match match ; protected final short priority ; protected final String srcIP ; protected final String dstIP ; public LogicalFlow ( Match match , String srcIP , String dstIP , int id , short priority ) { } public int getId ( ) { } public Match getMatch ( ) { } public String getSrcIP ( ) { } public String getDstIP ( ) { } @ Override public int hashCode ( ) { } public boolean equals ( Match match ) { } public boolean equals ( Flow flow ) { if ( flow == null ) { return false ; } <START_BUG> if ( match . equals ( flow . getMatch ( ) ) ) <END_BUG> return false ; if ( ( priority ) != ( flow . getPriority ( ) ) ) return false ; return true ; } @ Override public String toString ( ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
if ( ! ( match . equals ( flow . getMatch ( ) ) ) )
Buggy code:
public class ViewPagerFragment extends Fragment implements OnTimeOutHandler { protected ViewPager pager ; protected PagerTabStrip tabStrip ; protected Stopwatch stopwatch ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void timeOut ( ) { } @ Override public void onActivityCreated ( Bundle savedInstanceState ) { super . onActivityCreated ( savedInstanceState ) ; stopwatch = ( ( com . udelphi . traningcenter . realworldwallpaper . MainActivity ) ( getActivity ( ) ) ) . getStopwatch ( ) ; <START_BUG> pager . addOnPageChangeListener ( new com . udelphi . traningcenter . realworldwallpaper . handlers . OnViewPagerChangeListener ( getFragmentManager ( ) , tabStrip , stopwatch ) ) ; <END_BUG> stopwatch . addHandler ( this ) ; } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } }

Fix:
pager . addOnPageChangeListener ( new com . udelphi . traningcenter . realworldwallpaper . handlers . OnViewPagerChangeListener ( getChildFragmentManager ( ) , tabStrip , stopwatch ) ) ;
Buggy code:
public abstract class CommandLineBuilder extends Builder { protected String script ; protected List < String > args ; public CommandLineBuilder ( String script , List < String > args ) { } public abstract String [ ] buildCommandLine ( ) { } public boolean perform ( CrazyMonkeyBuild build , AndroidSdk androidSdk , AndroidEmulator emulator , AndroidEmulatorContext emuContext , StreamTaskListener taskListener , String successText ) throws IOException , InterruptedException { final PrintStream logger = taskListener . getLogger ( ) ; File file = new File ( script ) ; if ( ! ( file . exists ( ) ) ) { AndroidEmulator . log ( logger , String . format ( "The<seq2seq4repair_space>script<seq2seq4repair_space>file<seq2seq4repair_space>'%s'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>existing." , script ) ) ; return false ; } try { Map < String , String > buildEnvironment = new TreeMap < String , String > ( ) ; Map < String , String > sysEnv = System . getenv ( ) ; for ( String key : sysEnv . keySet ( ) ) { buildEnvironment . put ( key , sysEnv . get ( key ) ) ; } if ( androidSdk . hasKnownHome ( ) ) { buildEnvironment . put ( "ANDROID_SDK_HOME" , androidSdk . getSdkHome ( ) ) ; } if ( Utils . isUnix ( ) ) { buildEnvironment . put ( "LD_LIBRARY_PATH" , String . format ( "%s//tools//lib" , androidSdk . getSdkRoot ( ) ) ) ; } buildEnvironment . put ( "CRAZY_MONKEY_HOME" , build . getCrazyMonkeyHome ( ) ) ; ByteArrayOutputStream emulatorOutput = new ByteArrayOutputStream ( ) ; ForkOutputStream emulatorLogger = new ForkOutputStream ( logger , emulatorOutput ) ; int r = new ProcStarter ( ) . cmds ( buildCommandLine ( ) ) . stdout ( emulatorLogger ) . envs ( buildEnvironment ) . start ( ) . join ( ) ; String result = emulatorOutput . toString ( ) ; <START_BUG> if ( ( ( r == 0 ) && ( result != null ) ) && ( ( result . contains ( "OK<seq2seq4repair_space>(1<seq2seq4repair_space>test)" ) ) || ( result . contains ( "Monkey<seq2seq4repair_space>success." ) ) ) ) { <END_BUG> return true ; } else { return false ; } } catch ( IOException e ) { e . printStackTrace ( ) ; AndroidEmulator . log ( logger , String . format ( "Run<seq2seq4repair_space>the<seq2seq4repair_space>batch<seq2seq4repair_space>file<seq2seq4repair_space>'%s'<seq2seq4repair_space>failed." , script ) ) ; return false ; } } }

Fix:
if ( ( ( r == 0 ) && ( result != null ) ) && ( ( result . contains ( "OK<seq2seq4repair_space>(1<seq2seq4repair_space>test)" ) ) || ( result . contains ( successText ) ) ) ) {
Buggy code:
public class PropertyAccessTests extends ExpressionTestCase { @ Test public void testSimpleAccess01 ( ) { } @ Test public void testSimpleAccess02 ( ) { } @ Test public void testSimpleAccess03 ( ) { } @ Test public void testNonExistentPropertiesAndMethods ( ) { } @ Test public void testAccessingOnNullObject ( ) throws Exception { } private void checkException ( Exception e , SpelMessage expectedMessage ) { } @ Test public void testAddingSpecificPropertyAccessor ( ) throws Exception { } private static class StringyPropertyAccessor implements PropertyAccessor { int flibbles = 7 ; public Class < ? > [ ] getSpecificTargetClasses ( ) { } public boolean canRead ( EvaluationContext context , Object target , String name ) throws AccessException { } public boolean canWrite ( EvaluationContext context , Object target , String name ) throws AccessException { } public TypedValue read ( EvaluationContext context , Object target , String name ) throws AccessException { if ( ! ( name . equals ( "flibbles" ) ) ) throw new RuntimeException ( "Assertion<seq2seq4repair_space>Failed!<seq2seq4repair_space>name<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>flibbles" ) ; <START_BUG> return new TypedValue ( flibbles , TypeDescriptor . valueOf ( String . class ) ) ; <END_BUG> } public void write ( EvaluationContext context , Object target , String name , Object newValue ) throws AccessException { } } }

Fix:
return new TypedValue ( flibbles , TypeDescriptor . STRING ) ;
Buggy code:
public class JDBCSelectorBridge implements SelectorBridge { private final JDBCQueryMetaData queryMetaData ; private final JDBCStoreManager manager ; private TransactionManager tm ; private boolean syncBeforeSelect ; public JDBCSelectorBridge ( JDBCStoreManager manager , JDBCQueryMetaData queryMetaData ) { } public Object invoke ( CmpEntityBeanContext ctx , Method method , Object [ ] args ) throws Exception { } public String getSelectorName ( ) { } public Method getMethod ( ) { } private Class getReturnType ( ) { } public Object execute ( CmpEntityBeanContext ctx , Object [ ] args ) throws FinderException { Collection retVal ; Method method = getMethod ( ) ; try { JDBCQueryCommand query = manager . getQueryManager ( ) . getQueryCommand ( method ) ; final CmpEntityBeanComponent selectedComponent = query . getSelectManager ( ) . getComponent ( ) ; JDBCQueryCommand . EntityProxyFactory factory = new JDBCQueryCommand . EntityProxyFactory ( ) { public Object getEntityObject ( Object primaryKey ) { <START_BUG> return ( queryMetaData . isResultTypeMappingLocal ( ) ) && ( ( selectedComponent . getLocalHomeClass ( ) ) != null ) ? selectedComponent . getEjbLocalObject ( primaryKey ) : selectedComponent . getEJBObject ( primaryKey ) ; <END_BUG> } } ; retVal = query . execute ( method , args , null , factory ) ; } catch ( FinderException e ) { throw e ; } catch ( EJBException e ) { throw e ; } catch ( Exception e ) { throw new EJBException ( ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>" + ( getSelectorName ( ) ) ) , e ) ; } if ( ! ( Collection . class . isAssignableFrom ( getReturnType ( ) ) ) ) { if ( ( retVal . size ( ) ) == 0 ) { throw new ObjectNotFoundException ( ) ; } if ( ( retVal . size ( ) ) > 1 ) { throw new FinderException ( ( ( ( ( getSelectorName ( ) ) + "<seq2seq4repair_space>returned<seq2seq4repair_space>" ) + ( retVal . size ( ) ) ) + "<seq2seq4repair_space>objects" ) ) ; } Object o = retVal . iterator ( ) . next ( ) ; if ( ( o == null ) && ( method . getReturnType ( ) . isPrimitive ( ) ) ) { throw new FinderException ( ( "Cannot<seq2seq4repair_space>return<seq2seq4repair_space>null<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>value<seq2seq4repair_space>of<seq2seq4repair_space>primitive<seq2seq4repair_space>type<seq2seq4repair_space>" + ( method . getReturnType ( ) . getName ( ) ) ) ) ; } return o ; } else { if ( Set . class . isAssignableFrom ( getReturnType ( ) ) ) { return new HashSet ( retVal ) ; } else { return retVal ; } } } }

Fix:
return ( queryMetaData . isResultTypeMappingLocal ( ) ) && ( ( selectedComponent . getLocalHomeClass ( ) ) != null ) ? selectedComponent . getEJBLocalObject ( primaryKey ) : selectedComponent . getEJBObject ( primaryKey ) ;
Buggy code:
public class AssertStatement extends Statement { public Expression assertExpression ; public Expression exceptionArgument ; int preAssertInitStateIndex = - 1 ; private FieldBinding assertionSyntheticFieldBinding ; public AssertStatement ( Expression exceptionArgument , Expression assertExpression , int startPosition ) { } public AssertStatement ( Expression assertExpression , int startPosition ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { if ( ( ( this . bits ) & ( ASTNode . IsReachable ) ) == 0 ) { return ; } int pc = codeStream . position ; if ( ( this . assertionSyntheticFieldBinding ) != null ) { BranchLabel assertionActivationLabel = new BranchLabel ( codeStream ) ; <START_BUG> codeStream . getstatic ( this . assertionSyntheticFieldBinding ) ; <END_BUG> codeStream . ifne ( assertionActivationLabel ) ; BranchLabel falseLabel ; this . assertExpression . generateOptimizedBoolean ( currentScope , codeStream , ( falseLabel = new BranchLabel ( codeStream ) ) , null , true ) ; codeStream . newJavaLangAssertionError ( ) ; codeStream . dup ( ) ; if ( ( this . exceptionArgument ) != null ) { this . exceptionArgument . generateCode ( currentScope , codeStream , true ) ; codeStream . invokeJavaLangAssertionErrorConstructor ( ( ( this . exceptionArgument . implicitConversion ) & 15 ) ) ; } else { codeStream . invokeJavaLangAssertionErrorDefaultConstructor ( ) ; } codeStream . athrow ( ) ; if ( ( this . preAssertInitStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , this . preAssertInitStateIndex ) ; } falseLabel . place ( ) ; assertionActivationLabel . place ( ) ; } else { if ( ( this . preAssertInitStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , this . preAssertInitStateIndex ) ; } } codeStream . recordPositionsFrom ( pc , this . sourceStart ) ; } public void resolve ( BlockScope scope ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { } public StringBuffer printStatement ( int tab , StringBuffer output ) { } }

Fix:
codeStream . fieldAccess ( Opcodes . OPC_getstatic , this . assertionSyntheticFieldBinding , null ) ;
Buggy code:
@ Path ( "//app//data" ) public class DataController { private UserService userService = new UserService ( ) ; private DataService dataService = new DataService ( ) ; @ Path ( "reservetracks" ) @ GET public Response reserveTracks ( @ HeaderParam ( "Authorization" ) String token ) { } @ Path ( "starttrack//{time}" ) @ GET public Response startTrack ( @ HeaderParam ( "Authorization" ) String token , @ PathParam ( "time" ) <START_BUG> long timeInMs , @ QueryParam ( "trackId" ) <END_BUG> String trackId ) { if ( ! ( userService . valid ( token ) ) ) { return Response . status ( UNAUTHORIZED ) . build ( ) ; } Track track ; if ( trackId == null ) { track = dataService . startTrack ( userService . getDevice ( token ) , Instant . ofEpochMilli ( timeInMs ) ) ; } else { track = dataService . getTrack ( trackId ) ; if ( ( track == null ) || ( ! ( track . getDevice ( ) . getToken ( ) . toLowerCase ( ) . equals ( token . toLowerCase ( ) ) ) ) ) { return Response . status ( FORBIDDEN ) . entity ( new JSONObject ( ) . put ( "error" , "This<seq2seq4repair_space>track<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>belong<seq2seq4repair_space>to<seq2seq4repair_space>you!" ) . toString ( ) ) . type ( APPLICATION_JSON_TYPE ) . build ( ) ; } dataService . startTrack ( track , Instant . ofEpochMilli ( timeInMs ) ) ; } return Response . status ( OK ) . entity ( new JSONObject ( ) . put ( "track" , new TrackConverter ( ) . toJson ( track ) ) . toString ( ) ) . type ( APPLICATION_JSON_TYPE ) . build ( ) ; } @ Path ( "waypoints" ) @ POST public Response postWaypoints ( @ HeaderParam ( "Authorization" ) String token , @ FormParam ( "waypoints" ) String waypointsJSON ) { } @ Path ( "motionValues" ) @ POST public Response postMotionValues ( @ HeaderParam ( "Authorization" ) String token , @ FormParam ( "motionValues" ) String motionValuesJSON ) { } }

Fix:
long timeInMs , @ QueryParam ( "track" )
Buggy code:
@ SuppressWarnings ( "rawtypes" ) public class Jaxb2CollectionHttpMessageConverter < T extends Collection > extends AbstractJaxb2HttpMessageConverter < T > implements GenericHttpMessageConverter < T > { private final XMLInputFactory inputFactory = createXmlInputFactory ( ) ; @ Override public boolean canRead ( Class < ? > clazz , MediaType mediaType ) { } @ Override public boolean canRead ( Type type , Class < ? > contextClass , MediaType mediaType ) { } @ Override public boolean canWrite ( Class < ? > clazz , MediaType mediaType ) { } @ Override protected boolean supports ( Class < ? > clazz ) { } @ Override protected T readFromSource ( Class < ? extends T > clazz , HttpHeaders headers , Source source ) throws IOException { } @ Override @ SuppressWarnings ( "unchecked" ) public T read ( Type type , Class < ? > contextClass , HttpInputMessage inputMessage ) throws IOException , HttpMessageNotReadableException { } @ SuppressWarnings ( "unchecked" ) protected T createCollection ( Class < ? > collectionClass ) { } private int moveToFirstChildOfRootElement ( XMLStreamReader streamReader ) throws XMLStreamException { } private int moveToNextElement ( XMLStreamReader streamReader ) throws XMLStreamException { } @ Override protected void writeToResult ( T t , HttpHeaders headers , Result result ) throws IOException { } protected XMLInputFactory createXmlInputFactory ( ) { XMLInputFactory inputFactory = XMLInputFactory . newInstance ( ) ; <START_BUG> inputFactory . setProperty ( XMLInputFactory . IS_REPLACING_ENTITY_REFERENCES , false ) ; <END_BUG> return inputFactory ; } }

Fix:
inputFactory . setProperty ( XMLInputFactory . IS_SUPPORTING_EXTERNAL_ENTITIES , false ) ;
Buggy code:
public class ScalePhotoJob extends Logger { private List < Album > albums ; private List < Thread > threads = new ArrayList < Thread > ( ) ; private int albumIndex = - 1 ; public ScalePhotoJob ( List < Album > albums ) { } public void scale ( ) throws IOException { } private synchronized Album getNextAlbum ( ) { } private class ScalePhotoRunnable implements Runnable { @ Override public void run ( ) { Album a = getNextAlbum ( ) ; while ( a != null ) { for ( int i = 0 ; i < ( a . getPhotos ( ) . size ( ) ) ; i ++ ) { Photo p = a . getPhotos ( ) . get ( i ) ; <START_BUG> info ( ( ( ( ( ( ( ( ( ( ( ( ( "Scale<seq2seq4repair_space>photo<seq2seq4repair_space>\t" + ( i + 1 ) ) + "//" ) + ( a . getPhotos ( ) . size ( ) ) ) + "<seq2seq4repair_space>\t(" ) + ( ( albumIndex ) + 1 ) ) + "//" ) + ( albums . size ( ) ) ) + ")" ) + ":<seq2seq4repair_space>\t" ) + ( a . getTitle ( ) ) ) + "//" ) + ( p . getFile ( ) . getName ( ) ) ) ) ; <END_BUG> try { scale ( p . getFile ( ) , ( ( ( ( ( Stash . webDir ) + "//img//240//" ) + ( a . getDir ( ) . getName ( ) ) ) + "//" ) + ( p . getFile ( ) . getName ( ) ) ) , 240 , 240 , 100 , false ) ; scale ( p . getFile ( ) , ( ( ( ( ( Stash . webDir ) + "//img//1024//" ) + ( a . getDir ( ) . getName ( ) ) ) + "//" ) + ( p . getFile ( ) . getName ( ) ) ) , 1024 , 768 , 100 , true ) ; } catch ( IOException e ) { error ( e . getMessage ( ) , e ) ; } } a = getNextAlbum ( ) ; } } } private void scale ( File file , String output , int w , int h , int q , boolean preventCrop ) throws IOException { } private void resizeImageToFixedSize ( File file , int w , int h , File output , float q , boolean preventCrop ) throws IOException { } private void scaleAndSaveImage ( BufferedImage sourceImage , int width , int height , File file , float jpegQuality ) { } @ SuppressWarnings ( "rawtypes" ) private void saveImage ( BufferedImage bufferedImage , File file , float jpegQuality ) { } No newline ; at end ; of file ; }

Fix:
info ( ( ( ( ( ( ( ( ( ( ( ( ( "Scale<seq2seq4repair_space>\t" + ( i + 1 ) ) + "//" ) + ( a . getPhotos ( ) . size ( ) ) ) + "<seq2seq4repair_space>\t(" ) + ( ( albumIndex ) + 1 ) ) + "//" ) + ( albums . size ( ) ) ) + ")" ) + ":<seq2seq4repair_space>\t" ) + ( a . getTitle ( ) ) ) + "//" ) + ( p . getFile ( ) . getName ( ) ) ) ) ;
Buggy code:
public class FixedSizeSortedMap < K , V > extends AbstractSortedMapDecorator < K , V > implements Serializable , SortedMap < K , V > , BoundedMap < K , V > { private static final long serialVersionUID = 3126019624511683653L ; <START_BUG> public static < K , V > SortedMap < K , V > fixedSizeSortedMap ( SortedMap < K , V > map ) { <END_BUG> return new FixedSizeSortedMap < K , V > ( map ) ; } protected FixedSizeSortedMap ( SortedMap < K , V > map ) { } protected SortedMap < K , V > getSortedMap ( ) { } private void writeObject ( ObjectOutputStream out ) throws IOException { } @ SuppressWarnings ( "unchecked" ) private void readObject ( ObjectInputStream in ) throws IOException , ClassNotFoundException { } @ Override public V put ( K key , V value ) { } @ Override public void putAll ( Map < ? extends K , ? extends V > mapToCopy ) { } @ Override public void clear ( ) { } @ Override public V remove ( Object key ) { } @ Override public Set < Map . Entry < K , V > > entrySet ( ) { } @ Override public Set < K > keySet ( ) { } @ Override public Collection < V > values ( ) { } @ Override public SortedMap < K , V > subMap ( K fromKey , K toKey ) { } @ Override public SortedMap < K , V > headMap ( K toKey ) { } @ Override public SortedMap < K , V > tailMap ( K fromKey ) { } public boolean isFull ( ) { } public int maxSize ( ) { } }

Fix:
public static < K , V > FixedSizeSortedMap < K , V > fixedSizeSortedMap ( SortedMap < K , V > map ) {
Buggy code:
@ Path ( "//removeFormCart" ) public class RemoveCartService { @ Autowired private ApplicationContext appContext ; @ Autowired private CartOperationsDao cartOperationsDao ; @ Autowired ShoppingCart shoppingCart ; @ Context private HttpServletRequest request ; @ GET @ Path ( "//{param}" ) @ Produces ( MediaType . APPLICATION_JSON ) public Response removeCartItem ( @ PathParam ( "param" ) String removeFormCart ) { String output = "Jersey<seq2seq4repair_space>say<seq2seq4repair_space>:<seq2seq4repair_space>" + removeFormCart ; JsonHelper jsonHelper = new JsonHelper ( ) ; CartBean cBean = new CartBean ( ) ; CartOperationsDao cartOperationsDao = ApplicationContextHolder . getContext ( ) . getBean ( CartOperationsDao . class ) ; <START_BUG> cartOperationsDao . removeFromCart ( removeFormCart ) ; <END_BUG> return Response . ok ( jsonHelper . getSuccessJson ( ) . toString ( ) , APPLICATION_JSON ) . build ( ) ; } }

Fix:
cartOperationsDao . removeFromCart ( removeFormCart , request . getSession ( ) . getId ( ) ) ;
Buggy code:
@ Configuration @ EnableElasticsearchRepositories ( basePackages = "com.cspinformatique.kubik.reference" ) @ PropertySource ( "classpath:config//elasticsearch.properties" ) public class ElasticsearchConfig { @ Resource private Environment env ; @ Bean public ElasticsearchTemplate elasticsearchTemplate ( ) { if ( env . getRequiredProperty ( "kubik.elasticsearch.node" , Boolean . class ) ) { <START_BUG> return new ElasticsearchTemplate ( NodeClientUtil . buildNode ( env ) . client ( ) ) ; <END_BUG> } else { return new ElasticsearchTemplate ( TransportClientUtil . buildTransportClient ( env ) ) ; } } }

Fix:
return new ElasticsearchTemplate ( NodeClientUtil . buildLocalNode ( ) . client ( ) ) ;
Buggy code:
public class BooleanLiteral extends Expression { public static final SimplePropertyDescriptor BOOLEAN_VALUE_PROPERTY = new SimplePropertyDescriptor ( BooleanLiteral . class , "booleanValue" , boolean . class , ASTNode . MANDATORY ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private boolean value = false ; BooleanLiteral ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final boolean internalGetSetBooleanProperty ( SimplePropertyDescriptor property , boolean get , boolean newValue ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { BooleanLiteral result = new BooleanLiteral ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . setBooleanValue ( booleanValue ( ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public boolean booleanValue ( ) { } public void setBooleanValue ( boolean value ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class Activator implements BundleActivator , ServiceTrackerCustomizer < Object , Object > { private static final Logger logger = LoggerFactory . getLogger ( Activator . class ) ; private static Activator instance ; public static synchronized Activator getInstance ( ) { } private static synchronized void checkInstance ( ) { } private BundleContext bundleContext ; private volatile Coordinator coordinator ; private volatile SubsystemServiceRegistrar registrar ; private volatile RegionDigraph regionDigraph ; private volatile Resolver resolver ; private ServiceTracker < ? , ? > serviceTracker ; private volatile Subsystems subsystems ; private final Collection < ServiceRegistration < ? > > registrations = new HashSet < ServiceRegistration < ? > > ( ) ; private final Collection < Repository > repositories = Collections . synchronizedSet ( new HashSet < Repository > ( ) ) ; public BundleContext getBundleContext ( ) { } public Coordinator getCoordinator ( ) { } public RegionDigraph getRegionDigraph ( ) { } public Collection < Repository > getRepositories ( ) { } public Resolver getResolver ( ) { } public Subsystems getSubsystems ( ) { } public SubsystemServiceRegistrar getSubsystemServiceRegistrar ( ) { } public Repository getSystemRepository ( ) { } @ Override public synchronized void start ( BundleContext context ) throws Exception { } @ Override public synchronized void stop ( BundleContext context ) { } private void activate ( ) { } private void deactivate ( ) { if ( ! ( isActive ( ) ) ) return ; <START_BUG> new StopAction ( subsystems . getRootSubsystem ( ) , true , false ) . run ( ) ; <END_BUG> for ( ServiceRegistration < ? > registration : registrations ) { try { registration . unregister ( ) ; } catch ( IllegalStateException e ) { Activator . logger . debug ( "Service<seq2seq4repair_space>had<seq2seq4repair_space>already<seq2seq4repair_space>been<seq2seq4repair_space>unregistered" , e ) ; } } synchronized ( Activator . class ) { Activator . instance = null ; } } private Object findAlternateServiceFor ( Object service ) { } private Filter generateServiceFilter ( ) throws InvalidSyntaxException { } private String generateServiceFilterString ( ) { } private boolean hasRequiredServices ( ) { } private boolean isActive ( ) { } private void registerBundleEventHook ( ) { } @ Override public synchronized Object addingService ( ServiceReference < Object > reference ) { } @ Override public void modifiedService ( ServiceReference < Object > reference , Object service ) { } @ Override public synchronized void removedService ( ServiceReference < Object > reference , Object service ) { } }

Fix:
new StopAction ( subsystems . getRootSubsystem ( ) , subsystems . getRootSubsystem ( ) , true ) . run ( ) ;
Buggy code:
public class RandomNumberGame { private int randomNumber ; private boolean didWin ; private boolean gameOver ; private Player player ; private PrintStream printStream ; public RandomNumberGame ( Player player , PrintStream printStream ) { } public int getRandomNumber ( ) { } public boolean getDidWin ( ) { } private void setDidWin ( boolean didWin ) { } public boolean getGameOver ( ) { } private void setGameOver ( boolean gameOver ) { } public void checkGuess ( int guess ) { } public void playGame ( ) { } private void setUpGame ( ) { } private int generateRandomNumber ( ) { <START_BUG> return ( ( int ) ( ( Math . random ( ) ) * 100 ) ) ; <END_BUG> } private int getUserGuess ( ) { } private void endGame ( ) { } No newline ; at end ; of file ; }

Fix:
return ( ( int ) ( ( Math . random ( ) ) * 100 ) ) + 1 ;
Buggy code:
public class ZigBeeDiscoveryService extends AbstractDiscoveryService { private final Logger logger = LoggerFactory . getLogger ( ZigBeeDiscoveryService . class ) ; private static final int SEARCH_TIME = 60 ; private ZigBeeCoordinatorHandler coordinatorHandler ; List < ZigBeeDiscoveryService . ZigBeeThingType > zigbeeThingTypeList = new ArrayList < ZigBeeDiscoveryService . ZigBeeThingType > ( ) ; public ZigBeeDiscoveryService ( ZigBeeCoordinatorHandler coordinatorHandler ) { } public void activate ( ) { } @ Override public void deactivate ( ) { } @ Override public Set < ThingTypeUID > getSupportedThingTypes ( ) { } @ Override public void startScan ( ) { } private ThingUID getThingUID ( Device device ) { ThingUID bridgeUID = coordinatorHandler . getThing ( ) . getUID ( ) ; int max = 0 ; ZigBeeDiscoveryService . ZigBeeThingType bestThing = null ; for ( ZigBeeDiscoveryService . ZigBeeThingType thing : zigbeeThingTypeList ) { int s = thing . getScore ( device ) ; if ( s > max ) { max = s ; bestThing = thing ; } } if ( bestThing == null ) { logger . debug ( "No<seq2seq4repair_space>ThingUID<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>device" ) ; return null ; } <START_BUG> logger . debug ( "Using<seq2seq4repair_space>ThingUID:<seq2seq4repair_space>" , bestThing . getUID ( ) ) ; <END_BUG> ThingTypeUID thingTypeUID = new ThingTypeUID ( ZigBeeBindingConstants . BINDING_ID , bestThing . getUID ( ) ) ; if ( getSupportedThingTypes ( ) . contains ( thingTypeUID ) ) { String thingId = device . getIEEEAddress ( ) . replace ( ":" , "" ) ; ThingUID thingUID = new ThingUID ( thingTypeUID , bridgeUID , thingId ) ; return thingUID ; } else { return null ; } } public void deviceAdded ( Device device , String description ) { } public void deviceUpdated ( Device device ) { } public void deviceRemoved ( Device device ) { } @ Override protected void startBackgroundDiscovery ( ) { } private class ZigBeeThingType { private String label ; private List < Integer > clusters ; private ZigBeeThingType ( String label , int [ ] clusters ) { } public int getScore ( Device device ) { } public String getUID ( ) { } } }

Fix:
logger . debug ( "Using<seq2seq4repair_space>ThingUID:<seq2seq4repair_space>{}" , bestThing . getUID ( ) ) ;
Buggy code:
public class AsyncHandlerAdd extends AbstractHandlerAdd { private static final long serialVersionUID = 3144252544518106859L ; private OverflowAction overflowAction ; private int queueLength ; protected AsyncHandlerAdd ( final String name ) { } protected AbstractHandlerElement < ? > createElement ( final String name ) { } public OverflowAction getOverflowAction ( ) { } public void setOverflowAction ( final OverflowAction overflowAction ) { } public int getQueueLength ( ) { } public void setQueueLength ( final int queueLength ) { } protected < P > void applyUpdate ( UpdateContext updateContext , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { try { <START_BUG> final BatchBuilder builder = updateContext . getBatchBuilder ( ) ; <END_BUG> final AsyncHandlerService service = new AsyncHandlerService ( ) ; final ServiceBuilder < Handler > serviceBuilder = builder . addService ( LogServices . handlerName ( getName ( ) ) , service ) ; final List < InjectedValue < Handler > > list = new ArrayList < InjectedValue < Handler > > ( ) ; for ( String handlerName : getSubhandlers ( ) ) { final InjectedValue < Handler > injectedValue = new InjectedValue < Handler > ( ) ; serviceBuilder . addDependency ( LogServices . handlerName ( handlerName ) , Handler . class , injectedValue ) ; list . add ( injectedValue ) ; } service . addHandlers ( list ) ; service . setQueueLength ( queueLength ) ; service . setLevel ( Level . parse ( getLevelName ( ) ) ) ; service . setOverflowAction ( overflowAction ) ; serviceBuilder . setInitialMode ( ACTIVE ) ; serviceBuilder . addListener ( new UpdateResultHandler . ServiceStartListener < P > ( resultHandler , param ) ) ; serviceBuilder . install ( ) ; } catch ( Throwable t ) { resultHandler . handleFailure ( t , param ) ; return ; } } }

Fix:
final BatchBuilder builder = updateContext . getServiceTarget ( ) ;
Buggy code:
public class CompilerConfig { private static final ResourceBundle commandBySuffixRB = ResourceBundle . getBundle ( "com.sandwich.util.io.filecompiler.compilationcommands" ) ; public static boolean isSourceFile ( String fileName ) { } public static String [ ] getCompilationCommand ( File src , String destinationPath , String classPath ) { } public static Collection < String > getSupportedFileSuffixes ( ) { } public static String getSuffix ( String fileName ) { if ( fileName != null ) { <START_BUG> int periodIndex = fileName . indexOf ( '.' ) ; <END_BUG> if ( periodIndex > ( - 1 ) ) { return fileName . substring ( periodIndex ) . toLowerCase ( ) ; } } return "" ; } public static boolean isSuffixSupported ( String suffix ) { } }

Fix:
int periodIndex = fileName . lastIndexOf ( '.' ) ;
Buggy code:
public class PolyLineFigure extends AbstractFigure { public static final int ARROW_TIP_NONE = 0 ; public static final int ARROW_TIP_START = 1 ; public static final int ARROW_TIP_END = 2 ; public static final int ARROW_TIP_BOTH = 3 ; protected List fPoints ; protected LineDecoration fStartDecoration = null ; protected LineDecoration fEndDecoration = null ; protected Color fFrameColor = Color . black ; private static final long serialVersionUID = - 7951352179906577773L ; private int polyLineFigureSerializedDataVersion = 1 ; public PolyLineFigure ( ) { } public PolyLineFigure ( int size ) { } public PolyLineFigure ( int x , int y ) { } public Rectangle displayBox ( ) { } public boolean isEmpty ( ) { } public HandleEnumeration handles ( ) { } public void basicDisplayBox ( Point origin , Point corner ) { } public void addPoint ( int x , int y ) { } public Iterator points ( ) { } public int pointCount ( ) { } protected void basicMoveBy ( int dx , int dy ) { } public void setPointAt ( Point p , int i ) { } public void insertPointAt ( Point p , int i ) { } public void removePointAt ( int i ) { } public int splitSegment ( int x , int y ) { } public Point pointAt ( int i ) { } public boolean joinSegments ( int x , int y ) { } public Connector connectorAt ( int x , int y ) { } public void setStartDecoration ( LineDecoration l ) { } public LineDecoration getStartDecoration ( ) { } public void setEndDecoration ( LineDecoration l ) { } public LineDecoration getEndDecoration ( ) { } public void draw ( Graphics g ) { } protected void drawLine ( Graphics g , int x1 , int y1 , int x2 , int y2 ) { } public boolean containsPoint ( int x , int y ) { } public int findSegment ( int x , int y ) { } private void decorate ( Graphics g ) { } public Object getAttribute ( String name ) { } public Object getAttribute ( FigureAttributeConstant attributeConstant ) { } public void setAttribute ( String name , Object value ) { } public void setAttribute ( FigureAttributeConstant attributeConstant , Object value ) { if ( attributeConstant . equals ( FRAME_COLOR ) ) { setFrameColor ( ( ( Color ) ( value ) ) ) ; changed ( ) ; } else <START_BUG> if ( attributeConstant . equals ( ARROW_MODE . getName ( ) ) ) { <END_BUG> Integer intObj = ( ( Integer ) ( value ) ) ; if ( intObj != null ) { int decoration = intObj . intValue ( ) ; if ( ( decoration & ( PolyLineFigure . ARROW_TIP_START ) ) != 0 ) { setStartDecoration ( new ArrowTip ( ) ) ; } else { setStartDecoration ( null ) ; } if ( ( decoration & ( PolyLineFigure . ARROW_TIP_END ) ) != 0 ) { setEndDecoration ( new ArrowTip ( ) ) ; } else { setEndDecoration ( null ) ; } } changed ( ) ; } else { super . setAttribute ( attributeConstant , value ) ; } } public void write ( StorableOutput dw ) { } public void read ( StorableInput dr ) throws IOException { } public static Locator locator ( int pointIndex ) { } protected Color getFrameColor ( ) { } protected void setFrameColor ( Color c ) { } protected Rectangle invalidateRectangle ( Rectangle r ) { } }

Fix:
if ( attributeConstant . equals ( ARROW_MODE ) ) {
Buggy code:
public class NdkCleanMojo extends AbstractMojo { File ndkBuildLibsOutputDirectory ; File ndkBuildObjOutputDirectory ; boolean skipClean = false ; boolean skipBuildLibsOutputDirectory = true ; boolean skipBuildObjsOutputDirectory = false ; @ Override public void execute ( ) throws MojoExecutionException , MojoFailureException { if ( ndkBuildLibsOutputDirectory . exists ( ) ) { if ( ! ( skipBuildLibsOutputDirectory ) ) { getLog ( ) . debug ( ( "Cleaning<seq2seq4repair_space>out<seq2seq4repair_space>native<seq2seq4repair_space>library<seq2seq4repair_space>code<seq2seq4repair_space>directory<seq2seq4repair_space>:<seq2seq4repair_space>" + ( ndkBuildLibsOutputDirectory . getAbsolutePath ( ) ) ) ) ; try { FileUtils . deleteDirectory ( ndkBuildLibsOutputDirectory ) ; } catch ( IOException e ) { getLog ( ) . error ( ( "Error<seq2seq4repair_space>deleting<seq2seq4repair_space>directory:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) , e ) ; } } } if ( ndkBuildObjOutputDirectory . exists ( ) ) { <START_BUG> if ( skipBuildObjsOutputDirectory ) { <END_BUG> getLog ( ) . debug ( ( "Cleaning<seq2seq4repair_space>out<seq2seq4repair_space>native<seq2seq4repair_space>object<seq2seq4repair_space>code<seq2seq4repair_space>directory:<seq2seq4repair_space>" + ( ndkBuildObjOutputDirectory . getAbsolutePath ( ) ) ) ) ; try { FileUtils . deleteDirectory ( ndkBuildObjOutputDirectory ) ; } catch ( IOException e ) { getLog ( ) . error ( ( "Error<seq2seq4repair_space>deleting<seq2seq4repair_space>directory:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) , e ) ; } } } } }

Fix:
if ( ! ( skipBuildObjsOutputDirectory ) ) {
Buggy code:
public class Dialog extends android . app . Dialog { Context context ; View view ; View backView ; String message ; TextView messageTextView ; String title ; TextView titleTextView ; ButtonFlat buttonAccept ; ButtonFlat buttonCancel ; OnClickListener onAcceptButtonClickListener ; OnClickListener onCancelButtonClickListener ; public Dialog ( Context context , String title , String message ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public void show ( ) { } public String getMessage ( ) { } public void setMessage ( String message ) { } public TextView getMessageTextView ( ) { } public void setMessageTextView ( TextView messageTextView ) { } public String getTitle ( ) { } public void setTitle ( String title ) { } public TextView getTitleTextView ( ) { } public void setTitleTextView ( TextView titleTextView ) { } public ButtonFlat getButtonAccept ( ) { } public void setButtonAccept ( ButtonFlat buttonAccept ) { } public ButtonFlat getButtonCancel ( ) { } public void setButtonCancel ( ButtonFlat buttonCancel ) { } public void setOnAcceptButtonClickListener ( View . OnClickListener onAcceptButtonClickListener ) { } public void setOnCancelButtonClickListener ( View . OnClickListener onCancelButtonClickListener ) { this . onCancelButtonClickListener = onCancelButtonClickListener ; if ( ( buttonCancel ) != null ) <START_BUG> buttonCancel . setOnClickListener ( onAcceptButtonClickListener ) ; <END_BUG> } @ Override public void dismiss ( ) { } }

Fix:
buttonCancel . setOnClickListener ( onCancelButtonClickListener ) ;