nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CompilationUnitDeclaration extends ASTNode implements ReferenceContext , ProblemSeverities { public ImportReference currentPackage ; public ImportReference [ ] imports ; public TypeDeclaration [ ] types ; public int [ ] [ ] comments ; public boolean ignoreFurtherInvestigation = false ; public boolean ignoreMethodBodies = false ; public CompilationUnitScope scope ; public ProblemReporter problemReporter ; public CompilationResult compilationResult ; public LocalTypeBinding [ ] localTypes ; public int localTypeCount = 0 ; public boolean isPropagatingInnerClassEmulation ; public Javadoc javadoc ; public CompilationUnitDeclaration ( ProblemReporter problemReporter , CompilationResult compilationResult , int sourceLength ) { } public void abort ( int abortLevel , IProblem problem ) { } public void analyseCode ( ) { } public void cleanUp ( ) { } private void cleanUp ( TypeDeclaration type ) { } public void checkUnusedImports ( ) { } public CompilationResult compilationResult ( ) { } public TypeDeclaration declarationOfType ( char [ ] [ ] typeName ) { } public void generateCode ( ) { } public char [ ] getFileName ( ) { } public char [ ] getMainTypeName ( ) { } public boolean isEmpty ( ) { } public boolean isPackageInfo ( ) { } public boolean hasErrors ( ) { } public StringBuffer print ( int indent , StringBuffer output ) { } public void propagateInnerEmulationForAllLocalTypes ( ) { } public void record ( LocalTypeBinding localType ) { } public void resolve ( ) { int startingTypeIndex = 0 ; boolean isPackageInfo = isPackageInfo ( ) ; if ( ( ( this . types ) != null ) && isPackageInfo ) { final TypeDeclaration syntheticTypeDeclaration = types [ 0 ] ; syntheticTypeDeclaration . javadoc = new Javadoc ( syntheticTypeDeclaration . declarationSourceStart , syntheticTypeDeclaration . declarationSourceStart ) ; syntheticTypeDeclaration . resolve ( this . scope ) ; if ( ( this . currentPackage . annotations ) != null ) { ASTNode . resolveAnnotations ( syntheticTypeDeclaration . staticInitializerScope , this . currentPackage . annotations , this . scope . fPackage ) ; } if ( ( this . javadoc ) != null ) { this . javadoc . resolve ( syntheticTypeDeclaration . staticInitializerScope ) ; } startingTypeIndex = 1 ; } if ( ( ( ( this . currentPackage ) != null ) && ( ( this . currentPackage . annotations ) != null ) ) && ( ! isPackageInfo ) ) { scope . problemReporter ( ) . invalidFileNameForPackageAnnotations ( this . currentPackage . annotations [ 0 ] ) ; } try { if ( ( types ) != null ) { for ( int i = startingTypeIndex , count = types . length ; i < count ; i ++ ) { types [ i ] . resolve ( scope ) ; } } <START_BUG> if ( ! ( this . compilationResult . hasSyntaxError ( ) ) ) <END_BUG> checkUnusedImports ( ) ; } catch ( org . eclipse . jdt . internal . compiler . problem . AbortCompilationUnit e ) { this . ignoreFurtherInvestigation = true ; return ; } } public void tagAsHavingErrors ( ) { } public void traverse ( ASTVisitor visitor , CompilationUnitScope unitScope ) { } }

Fix:
if ( ! ( this . compilationResult . hasErrors ( ) ) )
Buggy code:
public class HierarchyBuilder { private static final String EXTENSION = "hbs.html" ; private Project project ; private UsageAnalyser usageAnalyser ; private List < Template > templates = new com . intellij . util . containers . SortedList < Template > ( TemplateComparator . INSTANCE ) ; public HierarchyBuilder ( Project project ) { } public List < Template > build ( ) { } private List < Template > process ( List < File > templateFiles ) { for ( File templateFile : templateFiles ) { templates . add ( createTemplate ( templateFile . getPath ( ) ) ) ; } for ( File file : templateFiles ) { Template parent = findTemplate ( file . getPath ( ) ) ; MultiMap < String , Integer > usage = usageAnalyser . analyse ( file ) ; for ( String templateName : usage . keySet ( ) ) { <START_BUG> Template child = findTemplate ( String . format ( "%s.%s" , templateName , HierarchyBuilder . EXTENSION ) ) ; <END_BUG> if ( child == null ) { continue ; } for ( Integer line : usage . get ( templateName ) ) { parent . use ( child ) . inLine ( ( line + 1 ) ) ; } } } return templates ; } @ Nullable private Template createTemplate ( String path ) { } private Template findTemplate ( String path ) { } private List < File > getTemplateFiles ( ) { } private class TemplateFileFilter implements FilenameFilter { @ Override public boolean accept ( File file , String s ) { } } No newline ; at end ; of file ; }

Fix:
Template child = findTemplate ( String . format ( "%s%s.%s" , File . separator , templateName , HierarchyBuilder . EXTENSION ) ) ;
Buggy code:
@ SuppressWarnings ( "unchecked" ) public class XmlIntegrationTest { private static final String EXPECTED_DATA_SOURCE_NAME = "XML<seq2seq4repair_space>stream" ; @ Test public void testWebsitesProcessing ( ) throws Exception { final InputStream xmlDataSource = getDataSource ( "//websites.xml" ) ; Engine engine = EngineBuilder . aNewEngine ( ) . reader ( new XmlRecordReader ( "website" , xmlDataSource ) ) . mapper ( new XmlRecordMapper ( Website . class ) ) . processor ( new org . easybatch . core . processor . RecordCollector < Website > ( ) ) . build ( ) ; Report report = engine . call ( ) ; List < Website > websites = ( ( List < Website > ) ( report . getBatchResult ( ) ) ) ; assertThat ( websites ) . isNotEmpty ( ) . hasSize ( 3 ) ; Website website = websites . get ( 0 ) ; assertThat ( website . getName ( ) ) . isEqualTo ( "google" ) ; assertThat ( website . getUrl ( ) ) . isEqualTo ( "http:////www.google.com?query=test&sort=asc" ) ; website = websites . get ( 1 ) ; <START_BUG> assertThat ( website . getName ( ) ) . isEqualTo ( "l'équipe" ) ; <END_BUG> assertThat ( website . getUrl ( ) ) . isEqualTo ( "http:////www.lequipe.fr" ) ; website = websites . get ( 2 ) ; assertThat ( website . getName ( ) ) . isEqualTo ( "l\"internaute.com" ) ; assertThat ( website . getUrl ( ) ) . isEqualTo ( "http:////www.linternaute.com" ) ; } @ Test public void testPersonsProcessing ( ) throws Exception { } @ Test public void testMavenDependenciesProcessing ( ) throws Exception { } @ Test public void testXmlProcessingWithCustomNamespace ( ) throws Exception { } private void assertThatReportIsCorrect ( Report report ) { } private InputStream getDataSource ( String name ) { } }

Fix:
assertThat ( website . getName ( ) ) . isEqualTo ( "l'equipe" ) ;
Buggy code:
public class TentangApl extends AppCompatActivity { @ Bind ( id . toolbar ) Toolbar mToolbar ; private ActionBar mActionBar ; @ Bind ( id . pembuat1 ) TextView tekspembuat1 ; @ Bind ( id . pembuat1s ) TextView tekspembuat1s ; @ Bind ( id . pembuat2 ) TextView tekspembuat2 ; @ Bind ( id . pembuat2s ) TextView tekspembuat2s ; @ Bind ( id . pembuat3 ) TextView tekspembuat3 ; @ Bind ( id . pembuat3s ) TextView tekspembuat3s ; @ Bind ( id . pembuat4 ) TextView tekspembuat4 ; @ Bind ( id . pembuat4s ) TextView tekspembuat4s ; @ Bind ( id . pembuat5 ) TextView tekspembuat5 ; @ Bind ( id . pembuat5a ) TextView tekspembuat5a ; @ Bind ( id . pembuat5b ) TextView tekspembuat1b ; @ Bind ( id . gambarlogo ) ImageView gambarlogo ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( layout_tentangapl ) ; ButterKnife . bind ( this ) ; if ( ( mToolbar ) != null ) { this . setSupportActionBar ( mToolbar ) ; } mActionBar = this . getSupportActionBar ( ) ; assert ( mActionBar ) != null ; mActionBar . setTitle ( tentangapl_judul ) ; mActionBar . setDisplayHomeAsUpEnabled ( true ) ; tekspembuat1 . setText ( CREDIT_PEMBUAT_1 ) ; tekspembuat1s . setText ( CREDIT_PEMBUAT_1s ) ; tekspembuat2 . setText ( CREDIT_PEMBUAT_2 ) ; tekspembuat2s . setText ( CREDIT_PEMBUAT_2s ) ; tekspembuat3 . setText ( CREDIT_PEMBUAT_3 ) ; tekspembuat3s . setText ( CREDIT_PEMBUAT_3s ) ; tekspembuat4 . setText ( CREDIT_PEMBUAT_4 ) ; tekspembuat4s . setText ( CREDIT_PEMBUAT_4s ) ; tekspembuat5 . setText ( CREDIT_PEMBUAT_5 ) ; tekspembuat5a . setText ( CREDIT_PEMBUAT_5a ) ; tekspembuat1b . setText ( CREDIT_PEMBUAT_5b ) ; <START_BUG> Glide . with ( this ) . load ( web_hi_res_512 ) . into ( gambarlogo ) ; <END_BUG> } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
Glide . with ( this ) . load ( banana ) . into ( gambarlogo ) ;
Buggy code:
public class BigReactorSimulator { private boolean activelyCooled ; private static final String OUR_10X10 = "E<seq2seq4repair_space>E<seq2seq4repair_space>E<seq2seq4repair_space>E<seq2seq4repair_space>E<seq2seq4repair_space>E<seq2seq4repair_space>E<seq2seq4repair_space>E" + ( ( ( ( ( ( "E<seq2seq4repair_space>E<seq2seq4repair_space>X<seq2seq4repair_space>E<seq2seq4repair_space>E<seq2seq4repair_space>X<seq2seq4repair_space>E<seq2seq4repair_space>E" + "E<seq2seq4repair_space>X<seq2seq4repair_space>X<seq2seq4repair_space>X<seq2seq4repair_space>X<seq2seq4repair_space>X<seq2seq4repair_space>X<seq2seq4repair_space>E" ) + "E<seq2seq4repair_space>E<seq2seq4repair_space>X<seq2seq4repair_space>D<seq2seq4repair_space>D<seq2seq4repair_space>X<seq2seq4repair_space>E<seq2seq4repair_space>E" ) + "E<seq2seq4repair_space>E<seq2seq4repair_space>X<seq2seq4repair_space>D<seq2seq4repair_space>D<seq2seq4repair_space>X<seq2seq4repair_space>E<seq2seq4repair_space>E" ) + "E<seq2seq4repair_space>X<seq2seq4repair_space>X<seq2seq4repair_space>X<seq2seq4repair_space>X<seq2seq4repair_space>X<seq2seq4repair_space>X<seq2seq4repair_space>E" ) + "E<seq2seq4repair_space>E<seq2seq4repair_space>X<seq2seq4repair_space>E<seq2seq4repair_space>E<seq2seq4repair_space>X<seq2seq4repair_space>E<seq2seq4repair_space>E" ) + "E<seq2seq4repair_space>E<seq2seq4repair_space>E<seq2seq4repair_space>E<seq2seq4repair_space>E<seq2seq4repair_space>E<seq2seq4repair_space>E<seq2seq4repair_space>E" ) ; private static final double STABILITY_THRESHOLD = 150 ; private int ticks ; public BigReactorSimulator ( boolean activelyCooled , int ticks ) { } public static void init ( ) { } public ReactorResult simulate ( IFakeReactorWorld world ) { } public static class TimeSeriesMonitor { private final int windowSize ; private final Deque < Double > window ; private double mean ; private double m2 ; public TimeSeriesMonitor ( int windowSize ) { } public void offer ( final double value ) { } public double getLastStandardDeviation ( ) { } public double getLastVariance ( ) { } public double getLastMean ( ) { } public int getWindowSize ( ) { } public int getMaxWindowSize ( ) { } } public static void main ( String [ ] args ) { BigReactorSimulator . init ( ) ; String reactor = "EEEEEXXEEEEE" ; <START_BUG> FakeReactorWorld fakeReactorWorld = FakeReactorWorld . makeReactor ( reactor , 6 , 5 , 3 ) ; <END_BUG> ReactorResult simulate = new BigReactorSimulator ( false , 10000 ) . simulate ( fakeReactorWorld ) ; System . out . println ( simulate ) ; } }

Fix:
FakeReactorWorld fakeReactorWorld = FakeReactorWorld . makeReactor ( reactor , 6 , 5 , 3 , ( ( short ) ( 0 ) ) ) ;
Buggy code:
final class ComponentEventSender implements IEventSource { private final Component source ; public ComponentEventSender ( Component source ) { } public < T > void send ( IEventSink sink , Broadcast type , T payload ) { } private void breadth ( final ComponentEvent < ? > event ) { } private void depth ( final ComponentEvent < ? > event ) { IEventSink sink = event . getSink ( ) ; boolean targetsApplication = sink instanceof Application ; boolean targetsSession = targetsApplication || ( sink instanceof Session ) ; boolean targetsCycle = targetsSession || ( sink instanceof RequestCycle ) ; boolean targetsComponnet = sink instanceof Component ; if ( ( ! targetsComponnet ) && ( ! targetsCycle ) ) { sink . onEvent ( event ) ; return ; } Component cursor = ( targetsCycle ) ? source . getPage ( ) : ( ( Component ) ( sink ) ) ; if ( cursor instanceof MarkupContainer ) { <START_BUG> Visits . visitComponentsPostOrder ( cursor , new ComponentEventSender . ComponentEventVisitor ( event ) ) ; <END_BUG> } if ( event . isStop ( ) ) { return ; } if ( targetsCycle ) { source . getRequestCycle ( ) . onEvent ( event ) ; } if ( event . isStop ( ) ) { return ; } if ( targetsSession ) { source . getSession ( ) . onEvent ( event ) ; } if ( event . isStop ( ) ) { return ; } if ( targetsApplication ) { source . getApplication ( ) . onEvent ( event ) ; } } private void bubble ( ComponentEvent < ? > event ) { } private static class ComponentEventVisitor implements IVisitor < Component , Void > { private final ComponentEvent < ? > e ; private ComponentEventVisitor ( ComponentEvent < ? > event ) { } public void component ( Component object , IVisit < Void > visit ) { } } }

Fix:
Visits . visitPostOrder ( cursor , new ComponentEventSender . ComponentEventVisitor ( event ) ) ;
Buggy code:
public class StrategiesTest { @ org . junit . Rule public TestName name = new TestName ( ) ; protected File testResource ( String baseName ) throws URISyntaxException { } @ Test public void simple ( ) throws IOException , URISyntaxException { } @ Test public void imp ( ) throws IOException , URISyntaxException { String filename = "//compiler-tests//strategies_imp.k" ; String mainModule = "IMP" ; String syntaxModule = "IMP-SYNTAX" ; String pgm = "int<seq2seq4repair_space>s,<seq2seq4repair_space>n;<seq2seq4repair_space>n<seq2seq4repair_space>=<seq2seq4repair_space>10;<seq2seq4repair_space>while(0<=n)<seq2seq4repair_space>{<seq2seq4repair_space>s<seq2seq4repair_space>=<seq2seq4repair_space>s<seq2seq4repair_space>+<seq2seq4repair_space>n;<seq2seq4repair_space>n<seq2seq4repair_space>=<seq2seq4repair_space>n<seq2seq4repair_space>+<seq2seq4repair_space>-1;<seq2seq4repair_space>}" ; <START_BUG> String expected = "<generatedTop><seq2seq4repair_space><k><seq2seq4repair_space>.<seq2seq4repair_space><//k><seq2seq4repair_space><state><seq2seq4repair_space>s<seq2seq4repair_space>|-><seq2seq4repair_space>55<seq2seq4repair_space>n<seq2seq4repair_space>|-><seq2seq4repair_space>-1<seq2seq4repair_space><//state><seq2seq4repair_space>
<seq2seq4repair_space>true<seq2seq4repair_space><//s><seq2seq4repair_space><//generatedTop>" ; <END_BUG> assertSearch ( filename , mainModule , syntaxModule , pgm , expected , "(^heat*<seq2seq4repair_space>;<seq2seq4repair_space>^regular<seq2seq4repair_space>;<seq2seq4repair_space>(^cool<seq2seq4repair_space>||<seq2seq4repair_space>true))*" ) ; } private void assertSearch ( String filename , String mainModule , String syntaxModule , String pgm , String expected , String strategies ) throws IOException , URISyntaxException { } }

Fix:
String expected = "<generatedTop><seq2seq4repair_space><k><seq2seq4repair_space>.<seq2seq4repair_space><//k><seq2seq4repair_space><state><seq2seq4repair_space>n<seq2seq4repair_space>|-><seq2seq4repair_space>-1<seq2seq4repair_space>s<seq2seq4repair_space>|-><seq2seq4repair_space>55<seq2seq4repair_space><//state><seq2seq4repair_space>
<seq2seq4repair_space>true<seq2seq4repair_space><//s><seq2seq4repair_space><//generatedTop>" ;
Buggy code:
public class Main { public static void main ( String [ ] args ) { String [ ] files = new String [ 1 ] ; <START_BUG> files [ 0 ] = "C:\\Users\\talsh\\workspace\\LexicalAnalayzer\\src\\testfile.txt" ; <END_BUG> ParserMain . main ( files ) ; } }

Fix:
files [ 0 ] = "C://Users//talsh//workspace//LexicalAnalayzer//src//testfile.txt" ;
Buggy code:
public final class Utils { private static HashSet < String > xpathCollector = new HashSet < String > ( ) ; private static String xpathExpressionToContent = null ; private Utils ( ) { } public static Document parse ( final IFile file ) throws IOException , ParserConfigurationException , SAXException { } public static Document parse ( final File file ) throws IOException , ParserConfigurationException , SAXException { } public static Document parse ( final byte [ ] content ) throws IOException , ParserConfigurationException , SAXException { } public static Document parse ( final InputStream content ) throws IOException , ParserConfigurationException , SAXException { } public static Document parse ( String content ) throws IOException , ParserConfigurationException , SAXException { } public static Document createDocument ( ) throws ParserConfigurationException { } private static DocumentBuilder prepareDocumentBuilder ( ) throws ParserConfigurationException { } public static String [ ] getIds ( final IFile xml , final String type ) { <START_BUG> String ids = ( "Use<seq2seq4repair_space>first<seq2seq4repair_space>" + type ) + "<seq2seq4repair_space>id;" ; <END_BUG> try { Document doc = Utils . parse ( xml ) ; Element current = null ; NodeList nodes = null ; if ( ( type != null ) && ( type . equals ( "encryption" ) ) ) { nodes = doc . getElementsByTagNameNS ( EncryptionSpecNS , _TAG_ENCRYPTEDDATA ) ; } else if ( ( type != null ) && ( type . equals ( "signature" ) ) ) { XPath xpath = XPathFactory . newInstance ( ) . newXPath ( ) ; NamespaceContext ns = new SignatureNamespaceContext ( ) ; xpath . setNamespaceContext ( ns ) ; nodes = ( ( NodeList ) ( xpath . evaluate ( "////ds:Signature" , new InputSource ( xml . getContents ( ) ) , XPathConstants . NODESET ) ) ) ; } if ( nodes != null ) { for ( int i = 0 , length = nodes . getLength ( ) ; i < length ; i ++ ) { current = ( ( Element ) ( nodes . item ( i ) ) ) ; if ( ( null != ( current . getAttribute ( "Id" ) ) ) && ( ( current . getAttribute ( "Id" ) . trim ( ) . length ( ) ) > 0 ) ) { ids += ( current . getAttribute ( "Id" ) ) + ";" ; } } } } catch ( Exception ex ) { Utils . logError ( ex , errorDuringIdSearch ) ; } return ids . split ( ";" ) ; } public static String [ ] getAllIds ( final IFile xml ) { } public static Object [ ] getCompleteXpath ( final Document doc ) { } private static void childNodes ( final Node node ) { } private static String getXPathExpression ( final Node node ) { } public static String getUniqueXPathToNode ( final Document doc , final Document selection ) { } private static String getXPathToContent ( final Node root , final String selectedContent ) { } public static String validateXPath ( final Document doc , final String xpathExpression ) { } public static String docToString ( final Document doc , final boolean prettyPrint ) throws Exception { } public static boolean validateId ( final String id ) { } public static boolean ensureIdIsUnique ( final String newId , final String [ ] ids ) { } public static void logError ( final Exception ex , final String message ) { } }

Fix:
String ids = ( "Use<seq2seq4repair_space>first<seq2seq4repair_space>" + type ) + ";" ;
Buggy code:
public class SimpleConsole extends JPanel { private static final String LINE_SEPARATOR = System . getProperty ( "line.separator" , "\n" ) ; private static final Object [ ] HELP_MESSAGE = new Object [ ] { "Simple<seq2seq4repair_space>Console<seq2seq4repair_space>for" , "Charliebot<seq2seq4repair_space>version<seq2seq4repair_space>4.1.8" , "(c)<seq2seq4repair_space>A.L.I.C.E.<seq2seq4repair_space>AI<seq2seq4repair_space>Foundation<seq2seq4repair_space>(http:////alicebot.org)" } ; private static final ImageIcon aliceLogo = new ImageIcon ( SimpleConsole . class . getClassLoader ( ) . getResource ( "icons//aliceLogo.jpg" ) ) ; private static final ImageIcon aliceIcon = new ImageIcon ( SimpleConsole . class . getClassLoader ( ) . getResource ( "icons//aliceIcon.jpg" ) ) ; private static JMenuBar menuBar ; private AliceServer server ; private Shell shell ; private JTextArea display ; private SimpleConsole . InputPanel inputPanel ; private SimpleConsole . ConsoleDisplayStream consoleDisplay ; private JFrame frame ; private PrintStream displayStream ; private PrintStream promptStream ; private SimpleConsole . ConsoleInputStream inStream ; public SimpleConsole ( ) { } public static void main ( String [ ] args ) { } public void start ( String s ) { Globals . load ( s ) ; shell = new Shell ( inStream , displayStream , promptStream ) ; server = new AliceServer ( s , shell ) ; Trace . setOut ( displayStream ) ; <START_BUG> server . startup ( ) ; <END_BUG> shutdown ( ) ; } private void shutdown ( ) { } private void loadAIMLURLBox ( ) { } private void loadAIMLFilePathChooser ( ) { } private void chooseBot ( ) { } private void showAboutBox ( ) { } public class ConsoleInputStream extends InputStream { byte [ ] content ; private int mark ; public ConsoleInputStream ( ) { } public void receive ( String s ) { } public int read ( byte [ ] abyte0 , int i , int j ) throws IOException { } public int available ( ) throws IOException { } public boolean markSupported ( ) { } public int read ( ) { } } public class ConsolePromptStream extends OutputStream { public ConsolePromptStream ( ) { } public void write ( byte [ ] abyte0 , int i , int j ) { } public void write ( int i ) { } } public class ConsoleDisplayStream extends OutputStream { private boolean paused ; public ConsoleDisplayStream ( ) { } public void write ( byte [ ] abyte0 , int i , int j ) { } public void write ( int i ) { } private void togglePause ( ) { } } class InputPanel extends JPanel { private JLabel prompt ; private JTextField input ; public InputPanel ( ) { } public void setPrompt ( String s ) { } private class InputSender implements ActionListener { private InputSender ( ) { } public void actionPerformed ( ActionEvent actionevent ) { } } } }

Fix:
server . startup ( true ) ;
Buggy code:
public class MemoryStorageService implements IMessagesStore , ISessionsStore { private Map < String , Set < Subscription > > m_persistentSubscriptions = new HashMap < String , Set < Subscription > > ( ) ; private Map < String , StoredMessage > m_retainedStore = new HashMap < String , StoredMessage > ( ) ; private Map < String , List < PublishEvent > > m_persistentMessageStore = new HashMap < String , List < PublishEvent > > ( ) ; private Map < String , PublishEvent > m_inflightStore = new HashMap < String , PublishEvent > ( ) ; private Map < String , PublishEvent > m_qos2Store = new HashMap < String , PublishEvent > ( ) ; private static final Logger LOG = LoggerFactory . getLogger ( MemoryStorageService . class ) ; public void initStore ( ) { } @ Override public void cleanRetained ( String topic ) { } @ Override public void storeRetained ( String topic , ByteBuffer message , AbstractMessage . QOSType qos ) { } @ Override public Collection < StoredMessage > searchMatching ( IMatchingCondition condition ) { } @ Override public void storePublishForFuture ( PublishEvent evt ) { } @ Override public List < PublishEvent > retrievePersistedPublishes ( String clientID ) { <START_BUG> return m_persistentMessageStore . get ( clientID ) ; <END_BUG> } @ Override public void cleanPersistedPublishMessage ( String clientID , int messageID ) { } @ Override public void cleanPersistedPublishes ( String clientID ) { } @ Override public void cleanInFlight ( String msgID ) { } @ Override public void addInFlight ( PublishEvent evt , String publishKey ) { } @ Override public void addNewSubscription ( Subscription newSubscription , String clientID ) { } @ Override public void wipeSubscriptions ( String clientID ) { } @ Override public void updateSubscriptions ( String clientID , Set < Subscription > subscriptions ) { } @ Override public boolean contains ( String clientID ) { } @ Override public List < Subscription > listAllSubscriptions ( ) { } @ Override public void close ( ) { } @ Override public void persistQoS2Message ( String publishKey , PublishEvent evt ) { } @ Override public void removeQoS2Message ( String publishKey ) { } @ Override public PublishEvent retrieveQoS2Message ( String publishKey ) { } }

Fix:
return new java . util . ArrayList ( m_persistentMessageStore . get ( clientID ) ) ;
Buggy code:
public class ClassicalRungeKuttaIntegratorTest extends TestCase { public ClassicalRungeKuttaIntegratorTest ( String name ) { } public void testSanityChecks ( ) { } public void testDecreasingSteps ( ) throws DerivativeException , IntegratorException { TestProblemAbstract [ ] problems = TestProblemFactory . getProblems ( ) ; for ( int k = 0 ; k < ( problems . length ) ; ++ k ) { double previousError = Double . NaN ; for ( int i = 4 ; i < 10 ; ++ i ) { TestProblemAbstract pb = ( ( TestProblemAbstract ) ( problems [ k ] . clone ( ) ) ) ; double step = ( ( pb . getFinalTime ( ) ) - ( pb . getInitialTime ( ) ) ) * ( Math . pow ( 2.0 , ( - i ) ) ) ; FirstOrderIntegrator integ = new ClassicalRungeKuttaIntegrator ( step ) ; TestProblemHandler handler = new TestProblemHandler ( pb , integ ) ; integ . setStepHandler ( handler ) ; SwitchingFunction [ ] functions = pb . getSwitchingFunctions ( ) ; for ( int l = 0 ; l < ( functions . length ) ; ++ l ) { <START_BUG> integ . addSwitchingFunction ( functions [ l ] , Double . POSITIVE_INFINITY , ( 1.0E-6 * step ) ) ; <END_BUG> } integ . integrate ( pb , pb . getInitialTime ( ) , pb . getInitialState ( ) , pb . getFinalTime ( ) , new double [ pb . getDimension ( ) ] ) ; double error = handler . getMaximalValueError ( ) ; if ( i > 4 ) { assertTrue ( ( error < ( Math . abs ( previousError ) ) ) ) ; } previousError = error ; assertEquals ( 0 , handler . getMaximalTimeError ( ) , 1.0E-12 ) ; } } } public void testSmallStep ( ) throws DerivativeException , IntegratorException { } public void testBigStep ( ) throws DerivativeException , IntegratorException { } public void testKepler ( ) throws DerivativeException , IntegratorException { } private static class KeplerHandler implements StepHandler { public KeplerHandler ( TestProblem3 pb ) { } public boolean requiresDenseOutput ( ) { } public void reset ( ) { } public void handleStep ( StepInterpolator interpolator , boolean isLast ) { } private double maxError = 0 ; private TestProblem3 pb ; } public static Test suite ( ) { } }

Fix:
integ . addSwitchingFunction ( functions [ l ] , Double . POSITIVE_INFINITY , ( 1.0E-6 * step ) , 1000 ) ;
Buggy code:
public class FormTesterTest extends WicketTestCase { public FormTesterTest ( ) { } public void testFormTester ( ) { } public void testAddFile ( ) { } public void testAddBinaryFile ( ) { tester . startPage ( MockFormFileUploadPage . class ) ; MockFormFileUploadPage page = ( ( MockFormFileUploadPage ) ( tester . getLastRenderedPage ( ) ) ) ; MockDomainObjectFileUpload domainObject = page . getDomainObject ( ) ; tester . createRequestCycle ( ) ; assertNull ( page . getFileUpload ( ) ) ; assertNotNull ( domainObject ) ; assertNull ( domainObject . getText ( ) ) ; FormTester formTester = tester . newFormTester ( "form" ) ; <START_BUG> formTester . setFile ( "file" , new File ( "src//test//java//org//apache//wicket//util//tester//bg.jpg" ) , "image//jpeg" ) ; <END_BUG> formTester . setValue ( "text" , "Mock<seq2seq4repair_space>value" ) ; formTester . submit ( ) ; assertNotNull ( domainObject ) ; assertNotNull ( domainObject . getText ( ) ) ; assertEquals ( "Mock<seq2seq4repair_space>value" , domainObject . getText ( ) ) ; FileUpload fileUpload = page . getFileUpload ( ) ; assertNotNull ( fileUpload ) ; assertTrue ( ( "uploaded<seq2seq4repair_space>content<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>the<seq2seq4repair_space>right<seq2seq4repair_space>size,<seq2seq4repair_space>expected<seq2seq4repair_space>428,<seq2seq4repair_space>got<seq2seq4repair_space>" + ( fileUpload . getBytes ( ) . length ) ) , ( ( fileUpload . getBytes ( ) . length ) == 428 ) ) ; assertEquals ( "bg.jpg" , fileUpload . getClientFileName ( ) ) ; assertEquals ( "image//jpeg" , fileUpload . getContentType ( ) ) ; } public void testSubmitWithoutUploadFile ( ) { } }

Fix:
formTester . setFile ( "file" , new org . apache . wicket . util . file . File ( ( ( getBasedir ( ) ) + "src//test//java//org//apache//wicket//util//tester//bg.jpg" ) ) , "image//jpeg" ) ;
Buggy code:
public class RuleBasedTransactionAttribute extends DefaultTransactionAttribute implements Serializable { public static final String PREFIX_ROLLBACK_RULE = "-" ; public static final String PREFIX_COMMIT_RULE = "+" ; private static final Log logger = LogFactory . getLog ( RuleBasedTransactionAttribute . class ) ; private List rollbackRules ; public RuleBasedTransactionAttribute ( ) { } public RuleBasedTransactionAttribute ( RuleBasedTransactionAttribute other ) { } public RuleBasedTransactionAttribute ( int propagationBehavior , List rollbackRules ) { } public void setRollbackRules ( List rollbackRules ) { } public List getRollbackRules ( ) { } @ Override public boolean rollbackOn ( Throwable ex ) { } @ Override public String toString ( ) { <START_BUG> StringBuffer result = getDefinitionDescription ( ) ; <END_BUG> if ( ( this . rollbackRules ) != null ) { for ( Iterator it = this . rollbackRules . iterator ( ) ; it . hasNext ( ) ; ) { RollbackRuleAttribute rule = ( ( RollbackRuleAttribute ) ( it . next ( ) ) ) ; String sign = ( rule instanceof NoRollbackRuleAttribute ) ? RuleBasedTransactionAttribute . PREFIX_COMMIT_RULE : RuleBasedTransactionAttribute . PREFIX_ROLLBACK_RULE ; result . append ( ',' ) . append ( sign ) . append ( rule . getExceptionName ( ) ) ; } } return result . toString ( ) ; } }

Fix:
StringBuilder result = getDefinitionDescription ( ) ;
Buggy code:
public class PrepareStepHandler implements OperationStepHandler { public static final String EXECUTE_FOR_COORDINATOR = "execute-for-coordinator" ; private final LocalHostControllerInfo localHostControllerInfo ; private final OperationCoordinatorStepHandler coordinatorHandler ; private final OperationSlaveStepHandler slaveHandler ; public PrepareStepHandler ( final LocalHostControllerInfo localHostControllerInfo , final ContentRepository contentRepository , final Map < String , ProxyController > hostProxies , final Map < String , ProxyController > serverProxies , final IgnoredDomainResourceRegistry ignoredDomainResourceRegistry ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } public void setExecutorService ( final ExecutorService executorService ) { } private boolean isServerOperation ( ModelNode operation ) { } private void executeDirect ( OperationContext context , ModelNode operation ) throws OperationFailedException { if ( DomainControllerLogger . HOST_CONTROLLER_LOGGER . isTraceEnabled ( ) ) { DomainControllerLogger . HOST_CONTROLLER_LOGGER . tracef ( "%s<seq2seq4repair_space>executing<seq2seq4repair_space>direct" , getClass ( ) . getSimpleName ( ) ) ; } final String operationName = operation . require ( ModelDescriptionConstants . OP ) . asString ( ) ; OperationStepHandler stepHandler = null ; final ImmutableManagementResourceRegistration registration = context . getResourceRegistration ( ) ; if ( registration != null ) { stepHandler = registration . getOperationHandler ( EMPTY_ADDRESS , operationName ) ; } if ( stepHandler != null ) { context . addStep ( stepHandler , MODEL ) ; } else { context . getFailureDescription ( ) . set ( DomainControllerMessages . MESSAGES . noHandlerForOperation ( operationName , PathAddress . pathAddress ( operation . get ( ModelDescriptionConstants . OP_ADDR ) ) ) ) ; } <START_BUG> context . completeStep ( ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class GoalFactory { private WorldMap map ; private ArrayList < Station > stations ; private Random random ; public GoalFactory ( int turnCount ) { } public GoalFactory ( ) { } private int genReward ( Station sStation , Station fStation ) { } private int genComboReward ( Station sStation , Station viaStation , Station fStation ) { } private int genTurnLimit ( Station fStation , Station sStation ) { } private int genComboTurnLimit ( Station fStation , Station viaStation , Station sStation ) { } private Station newStation ( ) { } public Goal CreateRandomGoal ( ) { } private boolean stationValid ( Station [ ] stations ) { for ( int i = 0 ; i < ( stations . length ) ; i ++ ) { for ( int j = i + 1 ; j < ( stations . length ) ; j ++ ) { if ( ( stations [ i ] . getName ( ) ) == ( stations [ j ] . getName ( ) ) ) { return false ; } } <START_BUG> if ( ! ( stations [ i ] . getRepairable ( ) ) ) { <END_BUG> return false ; } } return true ; } }

Fix:
if ( ! ( stations [ i ] . isRepairable ( ) ) ) {
Buggy code:
public class Product { private String category ; private String number ; private String description ; private String supNumber ; private String ean ; private String rPrice ; private int quantity ; private String model ; private double price ; private String weight ; private String pic ; private String mpn ; private String pName ; private String stStatus ; private String status ; private String addPic ; private String manufact ; private String tax_class ; public Product ( ) { } public Product ( String c , String n , String d , String sup , String e , String rp , int q , String m ) { } public String getCategory ( ) { } public void setCategory ( String cat ) { } public String getNumber ( ) { } public void setNumber ( String n ) { } public String getDescription ( ) { } public void setDescription ( String desc ) { } public String getSupNum ( ) { } public void setSupNum ( String sn ) { } public String getEan ( ) { } public void setEan ( String e ) { } public String getRPrice ( ) { } public void setRPrice ( String p ) { } public int getQuantity ( ) { } public void setQuantity ( int q ) { } public String getWeight ( ) { } public void setWeight ( String w ) { } public String getModel ( ) { } public void setModel ( String model ) { } public double getWeightDouble ( ) { } public String getPic ( ) { } public void setPic ( String picN ) { } public double getPrice ( double var1 , double var2 , double var3 , double var4 , double var5 , double kiloPrice ) { } public void setDoublePrice ( double p ) { } public double getDoublePrice ( ) { } public String toString ( String supplier ) { } public String toCsv ( ) { } public String trimmer ( String s ) { } public String getSupNumber ( ) { } public void setSupNumber ( String supNumber ) { } public String getMpn ( ) { } public void setMpn ( String mpn ) { } public String getpName ( ) { } public void setpName ( String pName ) { } public String getStatus ( ) { } public void setStatus ( String status ) { } public String getStStatus ( ) { } public void setStStatus ( String stStatus ) { } public String getAddPic ( ) { } public void setAddPic ( String addPic ) { } public String getManufact ( ) { } public void setManufact ( String manufact ) { } public String getTax_class ( ) { } public void setTax_class ( String tax_class ) { } public static double round ( double value , int places ) { } private String cleanString ( String s ) { <START_BUG> s = s . replace ( "\n" , "" ) ; <END_BUG> s = s . replace ( ";" , "" ) ; return s . replace ( "," , "" ) ; } }

Fix:
s = s . replaceAll ( "(\\r|\\n|\\r\\n)+" , "\\\\n" ) ;
Buggy code:
} <START_BUG> if ( f . isStatic ( ) ) { <END_BUG>

Fix:
if ( ( f . isPublic ( ) ) && ( f . isStatic ( ) ) ) {
Buggy code:
public class ComponentRegistry { private static ServiceName SERVICE_NAME = ServiceName . of ( "ee" , "ComponentRegistry" ) ; private final Map < Class < ? > , ComponentRegistry . ComponentManagedReferenceFactory > componentsByClass = new ConcurrentHashMap < Class < ? > , ComponentRegistry . ComponentManagedReferenceFactory > ( ) ; private final ServiceRegistry serviceRegistry ; private final InjectedValue < EEClassIntrospector > classIntrospectorInjectedValue = new InjectedValue ( ) ; public static ServiceName serviceName ( final DeploymentUnit deploymentUnit ) { } public ComponentRegistry ( final ServiceRegistry serviceRegistry ) { } public void addComponent ( final ComponentConfiguration componentConfiguration ) { } public ManagedReferenceFactory createInstanceFactory ( final Class < ? > componentClass ) { } public ManagedReference createInstance ( final Object instance ) { final ComponentRegistry . ComponentManagedReferenceFactory factory = componentsByClass . get ( instance . getClass ( ) ) ; if ( factory == null ) { <START_BUG> return null ; <END_BUG> } return factory . getReference ( instance ) ; } public InjectedValue < EEClassIntrospector > getClassIntrospectorInjectedValue ( ) { } private static class ComponentManagedReference implements ManagedReference { private final ComponentInstance instance ; private boolean destroyed ; public ComponentManagedReference ( final ComponentInstance component ) { } @ Override public synchronized void release ( ) { } @ Override public Object getInstance ( ) { } } public class ComponentManagedReferenceFactory implements ManagedReferenceFactory { private final ServiceName serviceName ; private volatile ServiceController < Component > component ; private ComponentManagedReferenceFactory ( final ServiceName serviceName ) { } @ Override public ManagedReference getReference ( ) { } public ManagedReference getReference ( final Object instance ) { } public ServiceName getServiceName ( ) { } } }

Fix:
return classIntrospectorInjectedValue . getValue ( ) . createInstance ( instance ) ;
Buggy code:
public class ExampleCameraClass { CameraServer server ; int session ; Image frame ; public void cameraInit ( ) { } public void Cameraforteleoperations ( ) { NIVision . IMAQdxStartAcquisition ( session ) ; NIVision . IMAQdxGrab ( session , frame , 1 ) ; NIVision . imaqColorThreshold ( frame , frame , 0 , HSL , new Range ( 0 , 255 ) , new Range ( 0 , 255 ) , new Range ( 128 , 255 ) ) ; <START_BUG> server . getInstance ( ) . setImage ( frame ) ; <END_BUG> NIVision . IMAQdxStopAcquisition ( session ) ; } }

Fix:
CameraServer . getInstance ( ) . setImage ( frame ) ;
Buggy code:
public abstract class AbstractMethodDeclaration extends ASTNode implements ReferenceContext , ProblemSeverities { public MethodScope scope ; public char [ ] selector ; public int declarationSourceStart ; public int declarationSourceEnd ; public int modifiers ; public int modifiersSourceStart ; public Annotation [ ] annotations ; public Argument [ ] arguments ; public TypeReference [ ] thrownExceptions ; public Statement [ ] statements ; public int explicitDeclarations ; public MethodBinding binding ; public boolean ignoreFurtherInvestigation = false ; public boolean needFreeReturn = false ; public Javadoc javadoc ; public int bodyStart ; public int bodyEnd = - 1 ; public CompilationResult compilationResult ; public boolean errorInSignature = false ; AbstractMethodDeclaration ( CompilationResult compilationResult ) { } public void abort ( int abortLevel , IProblem problem ) { } public abstract void analyseCode ( ClassScope classScope , InitializationFlowContext initializationContext , FlowInfo info ) { } public void bindArguments ( ) { } public void bindThrownExceptions ( ) { } public CompilationResult compilationResult ( ) { } public void generateCode ( ClassScope classScope , ClassFile classFile ) { } public void generateCode ( ClassFile classFile ) { } private void checkArgumentsSize ( ) { } public boolean hasErrors ( ) { } public boolean isAbstract ( ) { } public boolean isAnnotationMethod ( ) { } public boolean isClinit ( ) { } public boolean isConstructor ( ) { } public boolean isDefaultConstructor ( ) { } public boolean isInitializationMethod ( ) { } public boolean isMethod ( ) { } public boolean isNative ( ) { } public boolean isStatic ( ) { } public abstract void parseStatements ( Parser parser , CompilationUnitDeclaration unit ) { } public StringBuffer print ( int tab , StringBuffer output ) { } public StringBuffer printBody ( int indent , StringBuffer output ) { } public StringBuffer printReturnType ( int indent , StringBuffer output ) { } public void resolve ( ClassScope upperScope ) { } public void resolveJavadoc ( ) { } public void resolveStatements ( ) { if ( ( this . statements ) != null ) { for ( int i = 0 , length = this . statements . length ; i < length ; i ++ ) { this . statements [ i ] . resolve ( this . scope ) ; } } else <START_BUG> if ( ( ( this . bits ) & ( UndocumentedEmptyBlockMASK ) ) != 0 ) { <END_BUG> this . scope . problemReporter ( ) . undocumentedEmptyBlock ( ( ( this . bodyStart ) - 1 ) , ( ( this . bodyEnd ) + 1 ) ) ; } } public void tagAsHavingErrors ( ) { } public void traverse ( ASTVisitor visitor , ClassScope classScope ) { } public TypeParameter [ ] typeParameters ( ) { } }

Fix:
if ( ( ( this . bits ) & ( ASTNode . UndocumentedEmptyBlock ) ) != 0 ) {
Buggy code:
public class ToolItemAdapter extends WidgetAdapter implements IButtonComponent { private ToolItem m_item = null ; public ToolItemAdapter ( Object objectToAdapt ) { } public boolean isShowing ( ) { return getEventThreadQueuer ( ) . invokeAndWait ( "isShowing" , new org . eclipse . jubula . rc . common . driver . IRunnable < Boolean > ( ) { public Boolean run ( ) { <START_BUG> return m_item . isDisposed ( ) ; <END_BUG> } } ) ; } public boolean isEnabled ( ) { } public boolean hasFocus ( ) { } public String getPropteryValue ( final String propertyname ) { } public Object getRealComponent ( ) { } public String getText ( ) { } public boolean isSelected ( ) { } No newline ; at end ; of file ; }

Fix:
return ! ( m_item . isDisposed ( ) ) ;
Buggy code:
public class Sentinel2ProductReaderPlugIn implements ProductReaderPlugIn { @ Override public DecodeQualification getDecodeQualification ( Object input ) { BeamLogManager . getSystemLogger ( ) . fine ( "Getting<seq2seq4repair_space>decoders..." ) ; File file = new File ( input . toString ( ) ) ; DecodeQualification deco = ( S2ProductFilename . isProductFilename ( file . getName ( ) ) ) ? DecodeQualification . SUITABLE : DecodeQualification . UNABLE ; if ( deco . equals ( SUITABLE ) ) { <START_BUG> if ( S2ProductFilename . create ( file . getName ( ) ) . fileCategory . contains ( "L1C" ) ) { <END_BUG> deco = DecodeQualification . INTENDED ; } } return deco ; } @ Override public Class [ ] getInputTypes ( ) { } @ Override public ProductReader createReaderInstance ( ) { } @ Override public String [ ] getFormatNames ( ) { } @ Override public String [ ] getDefaultFileExtensions ( ) { } @ Override public String getDescription ( Locale locale ) { } @ Override public BeamFileFilter getProductFileFilter ( ) { } }

Fix:
if ( S2ProductFilename . create ( file . getName ( ) ) . fileSemantic . contains ( "L1C" ) ) {
Buggy code:
public class Applet extends WebComponent implements IResourceListener , IFormSubmitListener { private static final long serialVersionUID = 1L ; private Class appletClass ; private List < Class > classes = new ArrayList < Class > ( 2 ) ; public Applet ( final String id , final Class appletClass ) { } public Applet ( final String id , final IModel model , final Class appletClass ) { } public void addClass ( final Class c ) { } public Object getAppletModel ( ) { } public void onFormSubmitted ( ) { } public void onResourceRequested ( ) { } public void setAppletModel ( final Object model ) { } protected int getHeight ( ) { } protected int getWidth ( ) { } protected void onComponentTag ( final ComponentTag tag ) { checkComponentTag ( tag , "applet" ) ; tag . put ( "code" , HostApplet . class . getName ( ) ) ; final String jarName = ( appletClass . getName ( ) ) + ".jar" ; final ResourceReference jarResourceReference = new ResourceReference ( jarName ) { protected Resource newResource ( ) { final JarResourceFactory factory = new JarResourceFactory ( ) ; factory . addClassClosures ( classes ) ; return factory . getResource ( ) ; } } ; <START_BUG> final String jarResourceUrl = getRequestCycle ( ) . urlFor ( jarResourceReference ) ; <END_BUG> final String codebase = ( Strings . beforeLastPathComponent ( jarResourceUrl , '//' ) ) + '//' ; tag . put ( "codebase" , codebase ) ; tag . put ( "archive" , jarName ) ; tag . put ( "name" , getPageRelativePath ( ) . replace ( ':' , '_' ) ) ; final int width = getWidth ( ) ; if ( width != ( - 1 ) ) { tag . put ( "width" , width ) ; } final int height = getHeight ( ) ; if ( height != ( - 1 ) ) { tag . put ( "height" , height ) ; } tag . setType ( OPEN ) ; super . onComponentTag ( tag ) ; } protected void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } private void addAppletClass ( final Class appletClass ) { } }

Fix:
final String jarResourceUrl = getRequestCycle ( ) . urlFor ( jarResourceReference ) . toString ( ) ;
Buggy code:
public final class JodaTimeAndroid { private static boolean sInitCalled = false ; private JodaTimeAndroid ( ) { } public static void init ( Context context ) { if ( JodaTimeAndroid . sInitCalled ) { return ; } JodaTimeAndroid . sInitCalled = true ; try { DateTimeZone . setProvider ( new ResourceZoneInfoProvider ( context ) ) ; } catch ( IOException e ) { <START_BUG> throw new RuntimeException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>read<seq2seq4repair_space>ZoneInfoMap" ) ; <END_BUG> } context . getApplicationContext ( ) . registerReceiver ( new TimeZoneChangedReceiver ( ) , new android . content . IntentFilter ( Intent . ACTION_TIMEZONE_CHANGED ) ) ; } }

Fix:
throw new RuntimeException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>read<seq2seq4repair_space>ZoneInfoMap.<seq2seq4repair_space>You<seq2seq4repair_space>are<seq2seq4repair_space>probably<seq2seq4repair_space>using<seq2seq4repair_space>Proguard<seq2seq4repair_space>wrong." , e ) ;
Buggy code:
public class MyChannel extends BaseChannel { public MyChannel ( ) { } public MyChannel ( ISharedObjectTransactionConfig config , IChannelListener listener ) { } protected ReplicaSharedObjectDescription getReplicaDescription ( ID targetContainerID ) { } protected void initialize ( ) throws SharedObjectInitException { super . initialize ( ) ; addEventProcessor ( new IEventProcessor ( ) { public boolean processEvent ( Event event ) { if ( event instanceof IContainerConnectedEvent ) { IContainerConnectedEvent ccevent = ( ( IContainerConnectedEvent ) ( event ) ) ; <START_BUG> if ( ! ( ccevent . getTargetID ( ) . equals ( getGroupID ( ) ) ) ) <END_BUG> sendHelloMessage ( ) ; } return false ; } } ) ; } protected void sendHelloMessage ( ) { } }

Fix:
if ( ! ( ccevent . getTargetID ( ) . equals ( getConnectedID ( ) ) ) )
Buggy code:
public class BootReceiver extends WakefulBroadcastReceiver { private static String LOG_TAG = "BootReceiver" ; @ Override public void onReceive ( final Context context , Intent intent ) { Log . i ( BootReceiver . LOG_TAG , "Boot<seq2seq4repair_space>intent<seq2seq4repair_space>received" ) ; new Thread ( new Runnable ( ) { @ Override public void run ( ) { Log . i ( BootReceiver . LOG_TAG , "Running<seq2seq4repair_space>Boot<seq2seq4repair_space>Setup" ) ; DailyAlarmInterface dailyAlarmInterface = new DailyAlarmInterface ( context ) ; dailyAlarmInterface . open ( ) ; dailyAlarmInterface . delete ( null ) ; dailyAlarmInterface . close ( ) ; AlarmTemplateInterface alarmTemplateInterface = new AlarmTemplateInterface ( context ) ; alarmTemplateInterface . open ( ) ; <START_BUG> List < AlarmTemplate > templates = alarmTemplateInterface . getAll ( ) ; <END_BUG> alarmTemplateInterface . close ( ) ; AlarmScheduler scheduler = new AlarmScheduler ( context ) ; scheduler . open ( ) ; for ( AlarmTemplate t : templates ) { scheduler . scheduleAsNew ( t ) ; } scheduler . close ( ) ; CleanupJob . schedule ( context ) ; new com . patricklove . snowdayalarm . activities . RefreshStatesTask ( context ) . execConcurrent ( ) ; } } ) . start ( ) ; } }

Fix:
List < AlarmTemplate > templates = alarmTemplateInterface . getAllEnabled ( ) ;
Buggy code:
public class ImageProcessing { public static void main ( String [ ] args ) { File file = new File ( "//home//roy//picP//newBW//Hello.jpg" ) ; BlackWhite Bw = new BlackWhite ( ) ; RecCol D = new RecCol ( ) ; MatCol matcol = new MatCol ( ) ; int [ ] [ ] a ; int [ ] [ ] b ; try { BufferedImage original = ImageIO . read ( file ) ; BufferedImage negetive ; BufferedImage work ; BufferedImage sub ; negetive = Bw . BW ( original , "//home//roy//picP//newBW//Hello2.jpg" , 130 , 2 , 0.5 ) ; Bw . NumOfColors ( negetive ) ; work = Bw . BW ( original , "//home//roy//picP//newBW//Hello1.jpg" , 130 , 0 , 0.5 ) ; Bw . con ( original , "//home//roy//picP//newBW//Hello2.jpg" ) ; GameOfLife gol = new GameOfLife ( ) ; <START_BUG> gol . GOL ( negetive , "//home//roy//picP//newBW//Hello3.jpg" , D , 1 ) ; <END_BUG> D . growAll ( 15 , 15 ) ; D . mergeAll ( ) ; Test . Rects ( "//home//roy//picP//newBW//Hello1.jpg" , "//home//roy//picP//newBW//Hello4.jpg" , D . Rects ) ; RecLineCol recline = new RecLineCol ( ) ; recline . LineRec = D . sort ( ) ; MatLineCol matline = new MatLineCol ( ) ; matline . ProRect ( work , recline ) ; matcol . ProRect ( work , D ) ; MatCol newLM = MatSaver . loadCol ( "//home//roy//picP//Saves//save1.ser" ) ; OCR ocr = new OCR ( ) ; ocr . go ( newLM , matline ) ; } catch ( IOException ex ) { Logger . getLogger ( ImageProcessing . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } } }

Fix:
gol . GOL ( negetive , "//home//roy//picP//newBW//Hello3.jpg" , D , 1 , 0 ) ;