nus-yam/ex-repair huggingface dataset:
Buggy code:
class WeldSubsystemAdd extends AbstractBoottimeAddStepHandler { static final WeldSubsystemAdd INSTANCE = new WeldSubsystemAdd ( ) ; protected void populateModel ( ModelNode operation , ModelNode model ) { } protected void performBoottime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) { context . addStep ( new AbstractDeploymentChainStep ( ) { protected void execute ( DeploymentProcessorTarget processorTarget ) { processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , DEPENDENCIES , DEPENDENCIES_WELD , new WeldDependencyProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_CDI_ANNOTATIONS , new CdiAnnotationProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_WELD_DEPLOYMENT , new BeansXmlProcessor ( ) ) ; <START_BUG> processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PARSE , PARSE_WELD_WEB_INTEGRATION , new WebIntegrationProcessor ( ) ) ; <END_BUG> processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_WELD_BEAN_ARCHIVE , new BeanArchiveProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_WELD_PORTABLE_EXTENSIONS , new WeldPortableExtensionProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_WELD_COMPONENT_INTEGRATION , new WeldComponentIntegrationProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , INSTALL , INSTALL_WELD_DEPLOYMENT , new WeldDeploymentProcessor ( ) ) ; processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , INSTALL , INSTALL_WELD_BEAN_MANAGER , new WeldBeanManagerServiceProcessor ( ) ) ; } } , RUNTIME ) ; TCCLSingletonService singleton = new TCCLSingletonService ( ) ; newControllers . add ( context . getServiceTarget ( ) . addService ( SERVICE_NAME , singleton ) . setInitialMode ( ON_DEMAND ) . install ( ) ) ; } protected boolean requiresRuntimeVerification ( ) { } }

Fix:
processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , POST_MODULE , POST_MODULE_WELD_WEB_INTEGRATION , new WebIntegrationProcessor ( ) ) ;
Buggy code:
public class HomePage extends WicketExamplePage { private static final long serialVersionUID = 1L ; public HomePage ( final PageParameters parameters ) { } @ Override public void renderHead ( IHeaderResponse response ) { <START_BUG> response . renderCSSReference ( new GroupedAndOrderedResourceReference ( ResourceGroup . GLOBAL , 1 , HomePage . class , "footer.css" ) ) ; <END_BUG> response . renderCSSReference ( new GroupedAndOrderedResourceReference ( ResourceGroup . GLOBAL , 0 , HomePage . class , "header.css" ) ) ; response . renderJavaScriptReference ( new GroupedAndOrderedResourceReference ( ResourceGroup . GLOBAL , 0 , HomePage . class , "jquery-1.4.3.min.js" ) ) ; response . renderCSSReference ( new GroupedAndOrderedResourceReference ( ResourceGroup . APPLICATION , 0 , HomePage . class , "app.css" ) ) ; response . renderCSSReference ( new GroupedAndOrderedResourceReference ( ResourceGroup . PAGE , 0 , HomePage . class , "HomePage.css" ) ) ; response . renderJavaScriptReference ( new GroupedAndOrderedResourceReference ( ResourceGroup . PAGE , 0 , HomePage . class , "HomePage.js" ) ) ; } private static class AjaxProofContainer extends WebMarkupContainer implements IHeaderContributor { private static final long serialVersionUID = 1L ; public AjaxProofContainer ( String id ) { } @ Override public void renderHead ( IHeaderResponse response ) { if ( ( AjaxRequestTarget . get ( ) ) != null ) { response . renderCSSReference ( new PackageResourceReference ( HomePage . class , "ajax.css" ) ) ; response . renderJavaScriptReference ( new PackageResourceReference ( HomePage . class , "ajax.js" ) ) ; response . renderOnDomReadyJavaScript ( "updatePending();" ) ; } } } }

Fix:
response . renderCSSReference ( new GroupedAndOrderedResourceReference ( ResourceGroup . GLOBAL , 0 , HomePage . class , "footer.css" ) ) ;
Buggy code:
public class SvnPropertiesDiffTool implements FrameDiffTool { @ NotNull @ Override public String getName ( ) { } @ Override public boolean canShow ( @ NotNull DiffContext context , @ NotNull DiffRequest request ) { } @ NotNull @ Override public DiffViewer createComponent ( @ NotNull DiffContext context , @ NotNull DiffRequest request ) { <START_BUG> return new SvnPropertiesDiffViewer ( context , ( ( SvnPropertiesDiffRequest ) ( request ) ) ) ; <END_BUG> } }

Fix:
return SvnPropertiesDiffViewer . create ( context , ( ( SvnPropertiesDiffRequest ) ( request ) ) ) ;
Buggy code:
public class PacketManager implements ILoadable { public final String channel ; protected EnumMap < Side , FMLEmbeddedChannel > channelEnumMap ; public PacketManager ( String channel ) { } @ Deprecated public static void writeData ( ByteBuf data , Object ... sendData ) { } public static PacketType getPacketFor ( Object obj ) { } public Packet toMCPacket ( AbstractPacket packet ) { } @ Override public void preInit ( ) { } @ Override public void init ( ) { } @ Override public void postInit ( ) { } public void sendToPlayer ( AbstractPacket packet , EntityPlayerMP player ) { } public void sendToAllInDimension ( AbstractPacket packet , int dimId ) { } public void sendToAllInDimension ( AbstractPacket packet , World world ) { } public void sendToAll ( AbstractPacket packet ) { } public void sendToAllAround ( AbstractPacket message , NetworkRegistry . TargetPoint point ) { } public void sendToAllAround ( AbstractPacket message , IWorldPosition point , double range ) { <START_BUG> sendToAllAround ( message , point . world ( ) , point , range ) ; <END_BUG> } public void sendToAllAround ( AbstractPacket message , World world , IPos3D point , double range ) { } public void sendToAllAround ( AbstractPacket message , World world , Pos point , double range ) { } public void sendToAllAround ( AbstractPacket message , TileEntity tile ) { } public void sendToAllAround ( AbstractPacket message , TileEntity tile , double range ) { } public void sendToAllAround ( AbstractPacket message , World world , double x , double y , double z , double range ) { } @ SideOnly ( Side . CLIENT ) public void sendToServer ( AbstractPacket packet ) { } }

Fix:
sendToAllAround ( message , point . world ( ) , point . x ( ) , point . y ( ) , point . z ( ) , range ) ;
Buggy code:
public class Database { protected Connection connection ; public static void main ( String [ ] args ) throws ClassNotFoundException , SQLException { } public Database ( ) throws ClassNotFoundException , SQLException { } public static void addTrade ( Trade trade ) throws SQLException { } public static Date getLastUpdateTime ( ) { <START_BUG> return new Date ( 115 , 2 , 1 ) ; <END_BUG> } void addTrades ( CSVTradeFile csv ) { } SearchResult search ( Search s ) { } void saveSearch ( Search s ) { } Search [ ] getSavedSearches ( ) { } UPI [ ] getMatchingUPI ( String s ) { } }

Fix:
return new Date ( 114 , 0 , 0 ) ;
Buggy code:
public class StringParameterizedChild extends GenericParent < String > { @ Override <START_BUG> public void consume ( String t ) { <END_BUG> super . consume ( t ) ; } }

Fix:
public void consume ( final String t ) {
Buggy code:
public class Ant extends Task { private File dir = null ; private String antFile = null ; private String target = null ; private String output = null ; private boolean inheritAll = true ; private boolean inheritRefs = false ; private Vector properties = new Vector ( ) ; private Vector references = new Vector ( ) ; private Project newProject ; private PrintStream out = null ; public void setInheritAll ( boolean value ) { } public void setInheritRefs ( boolean value ) { } public void init ( ) { } private void reinit ( ) { } private void initializeProject ( ) { } protected void handleOutput ( String line ) { } protected void handleErrorOutput ( String line ) { } public void execute ( ) throws BuildException { } private void overrideProperties ( ) throws BuildException { } private void addReferences ( ) throws BuildException { } private void copyReference ( String oldKey , String newKey ) { Object orig = getProject ( ) . getReference ( oldKey ) ; Class c = orig . getClass ( ) ; Object copy = orig ; try { Method cloneM = c . getMethod ( "clone" , new Class [ 0 ] ) ; if ( cloneM != null ) { copy = cloneM . invoke ( orig , new Object [ 0 ] ) ; } } catch ( Exception e ) { } if ( copy instanceof ProjectComponent ) { ( ( ProjectComponent ) ( copy ) ) . setProject ( newProject ) ; } else { try { Method setProjectM = c . getMethod ( "setProject" , new Class [ ] { Project . class } ) ; if ( setProjectM != null ) { setProjectM . invoke ( copy , new Object [ ] { newProject } ) ; } } catch ( NoSuchMethodException e ) { } catch ( Exception e2 ) { String msg = ( "Error<seq2seq4repair_space>setting<seq2seq4repair_space>new<seq2seq4repair_space>project<seq2seq4repair_space>instance<seq2seq4repair_space>for<seq2seq4repair_space>" + "reference<seq2seq4repair_space>with<seq2seq4repair_space>id<seq2seq4repair_space>" ) + oldKey ; <START_BUG> throw new BuildException ( msg , e2 , location ) ; <END_BUG> } } newProject . addReference ( newKey , copy ) ; } public void setDir ( File d ) { } public void setAntfile ( String s ) { } public void setTarget ( String s ) { } public void setOutput ( String s ) { } public Property createProperty ( ) { } public void addReference ( Ant . Reference r ) { } public static class Reference extends org . apache . tools . ant . types . Reference { public Reference ( ) { } private String targetid = null ; public void setToRefid ( String targetid ) { } public String getToRefid ( ) { } } }

Fix:
throw new BuildException ( msg , e2 , getLocation ( ) ) ;
Buggy code:
public class ManifestTask extends Task { private Manifest nestedManifest = new Manifest ( ) ; private File manifestFile ; private ManifestTask . Mode mode ; private String encoding ; public static class Mode extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public ManifestTask ( ) { } public void addConfiguredSection ( Manifest . Section section ) throws ManifestException { } public void addConfiguredAttribute ( Manifest . Attribute attribute ) throws ManifestException { } public void setFile ( File f ) { } public void setEncoding ( String encoding ) { } public void setMode ( ManifestTask . Mode m ) { } public void execute ( ) throws BuildException { if ( ( manifestFile ) == null ) { throw new BuildException ( "the<seq2seq4repair_space>file<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; } Manifest toWrite = Manifest . getDefaultManifest ( ) ; Manifest current = null ; BuildException error = null ; if ( manifestFile . exists ( ) ) { FileInputStream fis = null ; InputStreamReader isr = null ; try { fis = new FileInputStream ( manifestFile ) ; if ( ( encoding ) == null ) { isr = new InputStreamReader ( fis , "UTF-8" ) ; } else { isr = new InputStreamReader ( fis , encoding ) ; } current = new Manifest ( isr ) ; } catch ( ManifestException m ) { error = new BuildException ( ( ( "Existing<seq2seq4repair_space>manifest<seq2seq4repair_space>" + ( manifestFile ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>invalid" ) , m , getLocation ( ) ) ; } catch ( IOException e ) { error = new BuildException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>" + ( manifestFile ) ) , e , getLocation ( ) ) ; } finally { FileUtils . close ( isr ) ; } } for ( Enumeration e = nestedManifest . getWarnings ( ) ; e . hasMoreElements ( ) ; ) { log ( ( "Manifest<seq2seq4repair_space>warning:<seq2seq4repair_space>" + ( ( String ) ( e . nextElement ( ) ) ) ) , MSG_WARN ) ; } try { if ( ( mode . getValue ( ) . equals ( "update" ) ) && ( manifestFile . exists ( ) ) ) { if ( current != null ) { toWrite . merge ( current ) ; } else if ( error != null ) { throw error ; } } toWrite . merge ( nestedManifest ) ; } catch ( ManifestException m ) { throw new BuildException ( "Manifest<seq2seq4repair_space>is<seq2seq4repair_space>invalid" , m , getLocation ( ) ) ; } if ( toWrite . equals ( current ) ) { log ( "Manifest<seq2seq4repair_space>has<seq2seq4repair_space>not<seq2seq4repair_space>changed,<seq2seq4repair_space>do<seq2seq4repair_space>not<seq2seq4repair_space>recreate" , MSG_VERBOSE ) ; return ; } PrintWriter w = null ; try { FileOutputStream fos = new FileOutputStream ( manifestFile ) ; <START_BUG> OutputStreamWriter osw = new OutputStreamWriter ( fos , "UTF-8" ) ; <END_BUG> w = new PrintWriter ( osw ) ; toWrite . write ( w ) ; } catch ( IOException e ) { throw new BuildException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>write<seq2seq4repair_space>" + ( manifestFile ) ) , e , getLocation ( ) ) ; } finally { if ( w != null ) { w . close ( ) ; } } } }

Fix:
OutputStreamWriter osw = new OutputStreamWriter ( fos , Manifest . JAR_ENCODING ) ;
Buggy code:
class AddFolderToIndex extends IndexRequest { IPath folderPath ; IProject project ; char [ ] [ ] exclusionPattern ; public AddFolderToIndex ( IPath folderPath , IProject project , char [ ] [ ] exclusionPattern , IndexManager manager ) { } public boolean execute ( IProgressMonitor progressMonitor ) { <START_BUG> if ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) <END_BUG> return true ; if ( ! ( project . isAccessible ( ) ) ) return true ; IResource folder = this . project . getParent ( ) . findMember ( this . folderPath ) ; if ( ( folder == null ) || ( ( folder . getType ( ) ) == ( IResource . FILE ) ) ) return true ; IIndex index = manager . getIndex ( this . indexPath , true , true ) ; if ( index == null ) return true ; ReadWriteMonitor monitor = manager . getMonitorFor ( index ) ; if ( monitor == null ) return true ; try { monitor . enterRead ( ) ; final IPath container = this . indexPath ; final IndexManager indexManager = this . manager ; final char [ ] [ ] pattern = exclusionPattern ; folder . accept ( new IResourceProxyVisitor ( ) { public boolean visit ( IResourceProxy proxy ) throws CoreException { switch ( proxy . getType ( ) ) { case IResource . FILE : if ( Util . isJavaFileName ( proxy . getName ( ) ) ) { IResource resource = proxy . requestResource ( ) ; if ( ( pattern == null ) || ( ! ( Util . isExcluded ( resource , pattern ) ) ) ) indexManager . addSource ( ( ( IFile ) ( resource ) ) , container ) ; } return false ; case IResource . FOLDER : if ( ( pattern != null ) && ( Util . isExcluded ( proxy . requestResource ( ) , pattern ) ) ) return false ; } return true ; } } , IResource . NONE ) ; } catch ( CoreException e ) { if ( JobManager . VERBOSE ) { JobManager . verbose ( ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>add<seq2seq4repair_space>" + ( this . folderPath ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>index<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>exception:" ) ) ; e . printStackTrace ( ) ; } return false ; } finally { monitor . exitRead ( ) ; } return true ; } public String toString ( ) { } }

Fix:
if ( ( this . isCancelled ) || ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) )
Buggy code:
public class OAuthActivity extends Activity implements View . OnClickListener , Notificable { public static final String FIRST_NAME = "firstName" ; static final String SUMMARY = "summary" ; private ProgressDialog progDailog ; @ Override public void onCreate ( Bundle savedInstanceState ) { } private void showProfile ( ) { } private void showProfile ( Object profile ) { } public void onClick ( View v ) { } private void doNextAction ( ) { } private void doShowProfile ( ) { } private void doOAuth ( ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } public Bundle getBundleFromMap ( HashMap < String , String > map ) { } private void saveAccessToken ( Object accessToken ) { } private void launchOAuthProccess ( String authUrl ) { <START_BUG> String data = new PocketServiceImpl ( this , null , null ) . getRequestToken ( "url" ) ; <END_BUG> } private void startProggressDialog ( ) { } @ Override public void notifyActionFinish ( String action , Object data ) { } abstract class OauthAsynkGenericTask extends AsyncTask { protected Exception exception ; @ Override protected void onPreExecute ( ) { } } class OauthRequestAsynkTaskTask extends OAuthActivity . OauthAsynkGenericTask { @ Override protected void onPreExecute ( ) { } @ Override protected void onPostExecute ( Object result ) { } @ Override protected Object doInBackground ( Object ... params ) { } } class OauthAsynkForAccessTokenTask extends OAuthActivity . OauthAsynkGenericTask { @ Override protected Object doInBackground ( Object ... params ) { } @ Override protected void onPostExecute ( Object result ) { } } class ShowResultAsynkTaskTask extends OAuthActivity . OauthAsynkGenericTask { @ Override protected Object doInBackground ( Object ... params ) { } @ Override protected void onPostExecute ( Object result ) { } } No newline ; at end ; of file ; }

Fix:
String data = new com . feedvids . controller . service . PocketServiceImpl ( this , getString ( R . string . consumer_key ) , null ) . getRequestToken ( "url" ) ;
Buggy code:
public class SelectPerspectiveDialog extends Dialog implements ISelectionChangedListener { private TableViewer list ; private IPerspectiveRegistry perspReg ; private IPerspectiveDescriptor perspDesc ; private Button okButton ; private static final int LIST_WIDTH = 200 ; private static final int LIST_HEIGHT = 200 ; public SelectPerspectiveDialog ( Shell parentShell , IPerspectiveRegistry perspReg ) { } protected void cancelPressed ( ) { } protected void configureShell ( Shell shell ) { } protected void createButtonsForButtonBar ( Composite parent ) { } protected Control createDialogArea ( Composite parent ) { Composite composite = ( ( Composite ) ( super . createDialogArea ( parent ) ) ) ; list = new TableViewer ( composite , ( ( ( SWT . H_SCROLL ) | ( SWT . V_SCROLL ) ) | ( SWT . BORDER ) ) ) ; list . getTable ( ) . setFont ( parent . getFont ( ) ) ; list . setLabelProvider ( new PerspLabelProvider ( ) ) ; list . setContentProvider ( new PerspContentProvider ( ) ) ; <START_BUG> list . setSorter ( new ViewerSorter ( ) { } ) ; <END_BUG> list . setInput ( perspReg ) ; list . addSelectionChangedListener ( this ) ; list . addDoubleClickListener ( new IDoubleClickListener ( ) { public void doubleClick ( DoubleClickEvent event ) { handleDoubleClickEvent ( ) ; } } ) ; Control ctrl = list . getControl ( ) ; GridData spec = new GridData ( GridData . FILL_BOTH ) ; spec . widthHint = SelectPerspectiveDialog . LIST_WIDTH ; spec . heightHint = SelectPerspectiveDialog . LIST_HEIGHT ; ctrl . setLayoutData ( spec ) ; ctrl . setFont ( parent . getFont ( ) ) ; return composite ; } public IPerspectiveDescriptor getSelection ( ) { } protected void handleDoubleClickEvent ( ) { } public void selectionChanged ( SelectionChangedEvent event ) { } protected void updateButtons ( ) { } protected void updateSelection ( ) { } }

Fix:
list . setSorter ( new ViewerSorter ( ) ) ;
Buggy code:
public final class TCFOperationMkDir extends TCFFileStoreOperation < Object > { protected final boolean fShallow ; public TCFOperationMkDir ( TCFFileStore filestore , boolean shallow ) { } @ Override protected void doExecute ( ) { } protected void mkdir ( final IFileSystem fs , final TCFFileStore fileStore , final DoneMkDir callback ) { stat ( fs , fileStore , new DoneStat ( ) { @ Override public void doneStat ( IToken token , FileSystemException error , FileAttrs attrs ) { if ( error == null ) { fileStore . setAttributes ( attrs ) ; } if ( ( error == null ) && ( attrs . isDirectory ( ) ) ) { <START_BUG> callback . doneMkDir ( token , error ) ; <END_BUG> } else if ( ( error != null ) && ( ( error . getStatus ( ) ) != ( IFileSystem . STATUS_NO_SUCH_FILE ) ) ) { callback . doneMkDir ( token , error ) ; } else { final IFileStore parent = ( fShallow ) ? null : fileStore . getParent ( ) ; if ( parent instanceof TCFFileStore ) { mkdir ( fs , ( ( TCFFileStore ) ( parent ) ) , new DoneMkDir ( ) { @ Override public void doneMkDir ( IToken token , FileSystemException error ) { if ( error != null ) { callback . doneMkDir ( token , error ) ; } else { fs . mkdir ( fileStore . getPath ( ) . toString ( ) , null , callback ) ; } } } ) ; } else { fs . mkdir ( fileStore . getPath ( ) . toString ( ) , null , callback ) ; } } } } ) ; } }

Fix:
callback . doneMkDir ( token , null ) ;
Buggy code:
public class DateBean { private int year ; private int month ; private int dayOfMonth ; private int hourOfDay ; private int minute ; private int second ; private int millisecond ; public DateBean ( int year , int month , int dayOfMonth , int hourOfDay , int minute , int second , int millisecond ) { } public DateBean ( Calendar calendar ) { } private void init ( Calendar calendar ) { } public DateBean ( Date date ) { } public Date getDate ( ) { <START_BUG> Calendar calendar = new GregorianCalendar ( year , month , dayOfMonth , hourOfDay , minute , second ) ; <END_BUG> calendar . set ( Calendar . MILLISECOND , millisecond ) ; return calendar . getTime ( ) ; } public Date getDateNoTime ( ) { } public int getYear ( ) { } public void setYear ( int year ) { } public int getMonth ( ) { } public void setMonth ( int month ) { } public int getDayOfMonth ( ) { } public void setDayOfMonth ( int dayOfMonth ) { } public int getHourOfDay ( ) { } public void setHourOfDay ( int hourOfDay ) { } public int getMinute ( ) { } public void setMinute ( int minute ) { } public int getSecond ( ) { } public void setSecond ( int second ) { } public int getMillisecond ( ) { } public void setMillisecond ( int millisecond ) { } }

Fix:
Calendar calendar = new GregorianCalendar ( year , ( ( month ) - 1 ) , dayOfMonth , hourOfDay , minute , second ) ;
Buggy code:
public class FieldPhraseListTest extends AbstractTestCase { public void test1TermIndex ( ) throws Exception { } public void test2TermsIndex ( ) throws Exception { } public void test1PhraseIndex ( ) throws Exception { } public void test1PhraseIndexB ( ) throws Exception { } public void test2ConcatTermsIndexB ( ) throws Exception { } public void test2Terms1PhraseIndex ( ) throws Exception { } public void testPhraseSlop ( ) throws Exception { } public void test2PhrasesOverlap ( ) throws Exception { } public void test3TermsPhrase ( ) throws Exception { } public void testSearchLongestPhrase ( ) throws Exception { } public void test1PhraseShortMV ( ) throws Exception { makeIndexShortMV ( ) ; FieldQuery fq = new FieldQuery ( tq ( "d" ) , true , true ) ; FieldTermStack stack = new FieldTermStack ( reader , 0 , F , fq ) ; FieldPhraseList fpl = new FieldPhraseList ( stack , fq ) ; assertEquals ( 1 , fpl . phraseList . size ( ) ) ; <START_BUG> assertEquals ( "d(1.0)((6,7))" , fpl . phraseList . get ( 0 ) . toString ( ) ) ; <END_BUG> } public void test1PhraseLongMV ( ) throws Exception { } public void test1PhraseLongMVB ( ) throws Exception { } }

Fix:
assertEquals ( "d(1.0)((9,10))" , fpl . phraseList . get ( 0 ) . toString ( ) ) ;
Buggy code:
public class TestMatchAllDocsQuery extends LuceneTestCase { private Analyzer analyzer = new org . apache . lucene . analysis . standard . StandardAnalyzer ( Version . LUCENE_CURRENT ) ; public void testQuery ( ) throws Exception { RAMDirectory dir = new RAMDirectory ( ) ; IndexWriter iw = new IndexWriter ( dir , analyzer , true , MaxFieldLength . LIMITED ) ; iw . setMaxBufferedDocs ( 2 ) ; addDoc ( "one" , iw , 1.0F ) ; addDoc ( "two" , iw , 20.0F ) ; addDoc ( "three<seq2seq4repair_space>four" , iw , 300.0F ) ; iw . close ( ) ; <START_BUG> IndexReader ir = IndexReader . open ( dir ) ; <END_BUG> IndexSearcher is = new IndexSearcher ( ir ) ; ScoreDoc [ ] hits ; hits = is . search ( new MatchAllDocsQuery ( ) , null , 1000 ) . scoreDocs ; assertEquals ( 3 , hits . length ) ; assertEquals ( "one" , ir . document ( hits [ 0 ] . doc ) . get ( "key" ) ) ; assertEquals ( "two" , ir . document ( hits [ 1 ] . doc ) . get ( "key" ) ) ; assertEquals ( "three<seq2seq4repair_space>four" , ir . document ( hits [ 2 ] . doc ) . get ( "key" ) ) ; MatchAllDocsQuery normsQuery = new MatchAllDocsQuery ( "key" ) ; hits = is . search ( normsQuery , null , 1000 ) . scoreDocs ; assertEquals ( 3 , hits . length ) ; assertEquals ( "three<seq2seq4repair_space>four" , ir . document ( hits [ 0 ] . doc ) . get ( "key" ) ) ; assertEquals ( "two" , ir . document ( hits [ 1 ] . doc ) . get ( "key" ) ) ; assertEquals ( "one" , ir . document ( hits [ 2 ] . doc ) . get ( "key" ) ) ; ir . setNorm ( 0 , "key" , 400.0F ) ; normsQuery = new MatchAllDocsQuery ( "key" ) ; hits = is . search ( normsQuery , null , 1000 ) . scoreDocs ; assertEquals ( 3 , hits . length ) ; assertEquals ( "one" , ir . document ( hits [ 0 ] . doc ) . get ( "key" ) ) ; assertEquals ( "three<seq2seq4repair_space>four" , ir . document ( hits [ 1 ] . doc ) . get ( "key" ) ) ; assertEquals ( "two" , ir . document ( hits [ 2 ] . doc ) . get ( "key" ) ) ; BooleanQuery bq = new BooleanQuery ( ) ; bq . add ( new MatchAllDocsQuery ( ) , MUST ) ; bq . add ( new MatchAllDocsQuery ( ) , MUST ) ; hits = is . search ( bq , null , 1000 ) . scoreDocs ; assertEquals ( 3 , hits . length ) ; bq = new BooleanQuery ( ) ; bq . add ( new MatchAllDocsQuery ( ) , MUST ) ; bq . add ( new TermQuery ( new Term ( "key" , "three" ) ) , MUST ) ; hits = is . search ( bq , null , 1000 ) . scoreDocs ; assertEquals ( 1 , hits . length ) ; is . getIndexReader ( ) . deleteDocument ( 0 ) ; hits = is . search ( new MatchAllDocsQuery ( ) , null , 1000 ) . scoreDocs ; assertEquals ( 2 , hits . length ) ; QueryParser qp = new QueryParser ( "key" , analyzer ) ; hits = is . search ( qp . parse ( new MatchAllDocsQuery ( ) . toString ( ) ) , null , 1000 ) . scoreDocs ; assertEquals ( 2 , hits . length ) ; Query maq = new MatchAllDocsQuery ( ) ; maq . setBoost ( 2.3F ) ; Query pq = qp . parse ( maq . toString ( ) ) ; hits = is . search ( pq , null , 1000 ) . scoreDocs ; assertEquals ( 2 , hits . length ) ; is . close ( ) ; ir . close ( ) ; dir . close ( ) ; } public void testEquals ( ) { } private void addDoc ( String text , IndexWriter iw , float boost ) throws IOException { } }

Fix:
IndexReader ir = IndexReader . open ( dir , true ) ;
Buggy code:
@ Service public class CsarFinderService { public Set < Path > prepare ( Path searchPath , Path zipPath ) { } private static class ToscaFinderWalker extends SimpleFileVisitor < Path > { private Path rootPath ; private Path zipRootPath ; private Set < Path > toscaArchives = Sets . newHashSet ( ) ; @ Override public FileVisitResult preVisitDirectory ( Path dir , BasicFileAttributes attrs ) throws IOException { } @ Override public FileVisitResult visitFile ( Path file , BasicFileAttributes attrs ) throws IOException { } private void addToscaArchive ( Path path ) { <START_BUG> Path relativePath = path . relativize ( rootPath ) ; <END_BUG> Path zipPath = zipRootPath . resolve ( relativePath ) . resolve ( "archive.zip" ) ; try { FileUtil . zip ( path , zipPath ) ; toscaArchives . add ( zipPath ) ; } catch ( IOException e ) { throw new GitException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>zip<seq2seq4repair_space>archives<seq2seq4repair_space>in<seq2seq4repair_space>order<seq2seq4repair_space>to<seq2seq4repair_space>import<seq2seq4repair_space>them." , e ) ; } } } No newline ; at end ; of file ; }

Fix:
Path relativePath = rootPath . relativize ( path ) ;
Buggy code:
public class TestStopFilter extends BaseTokenStreamTestCase { public void testExactCase ( ) throws IOException { } public void testStopFilt ( ) throws IOException { } public void testStopPositons ( ) throws IOException { } public void testEndStopword ( ) throws Exception { CharArraySet stopSet = StopFilter . makeStopSet ( TEST_VERSION_CURRENT , "of" ) ; <START_BUG> StopFilter stpf = new StopFilter ( Version . LUCENE_40 , new MockTokenizer ( new StringReader ( "test<seq2seq4repair_space>of" ) , MockTokenizer . WHITESPACE , false ) , stopSet ) ; <END_BUG> assertTokenStreamContents ( stpf , new String [ ] { "test" } , new int [ ] { 0 } , new int [ ] { 4 } , null , new int [ ] { 1 } , null , 7 , 1 , null , true ) ; } private void doTestStopPositons ( StopFilter stpf ) throws IOException { } private static void log ( String s ) { } private class MockSynonymFilter extends TokenFilter { State bufferedState ; CharTermAttribute termAtt = addAttribute ( CharTermAttribute . class ) ; PositionIncrementAttribute posIncAtt = addAttribute ( PositionIncrementAttribute . class ) ; MockSynonymFilter ( TokenStream input ) { } @ Override public boolean incrementToken ( ) throws IOException { } @ Override public void reset ( ) throws IOException { } } }

Fix:
StopFilter stpf = new StopFilter ( TEST_VERSION_CURRENT , new MockTokenizer ( new StringReader ( "test<seq2seq4repair_space>of" ) , MockTokenizer . WHITESPACE , false ) , stopSet ) ;
Buggy code:
public class FullValueAnalyzer extends Analyzer { private boolean caseSensitive ; public FullValueAnalyzer ( boolean caseSensitive ) { } @ Override public TokenStream tokenStream ( String fieldName , Reader reader ) { } class FullValueTokenizer extends CharTokenizer { public FullValueTokenizer ( Version matchVersion , Reader input ) { } @ Override protected boolean isTokenChar ( int c ) { <START_BUG> return false ; <END_BUG> } } class FullValueLowercaseTokenizer extends FullValueAnalyzer . FullValueTokenizer { public FullValueLowercaseTokenizer ( Version matchVersion , Reader input ) { } @ Override protected int normalize ( int c ) { } } }

Fix:
return true ;
Buggy code:
<START_BUG> public class ColorSearchParams extends BaseSearchParams { <END_BUG> private String color ; public ColorSearchParams ( String color ) { } public ColorSearchParams setColor ( String color ) { } public String getColor ( ) { } @ Override public Multimap < String , String > toMap ( ) { Multimap < String , String > map = super . toMap ( ) ; map . put ( "color" , color ) ; return map ; } }

Fix:
public class ColorSearchParams extends BaseSearchParams < ColorSearchParams > {
Buggy code:
public class CSDatabase extends Database { private static Statement s ; private static ResultSet res ; private static ResultSet res2 ; private static ResultSet res3 ; private static PreparedStatement preparedStmt ; public static int createChan ( ChanInfo ci ) { } public static int updateChan ( ChanInfo ci ) { } public static int updateChanSettings ( ChanInfo ci ) { } public static int updateChanTopic ( ChanInfo ci ) { } public static int addChanAccess ( ChanInfo ci , CSAccess op , int access ) { } public static int removeChanAccess ( ChanInfo ci , CSAccess access ) { } public static ArrayList < CFlag > getCFlags ( String name ) { } public static boolean deleteCFlag ( String name , String type ) { } public static boolean addCFlag ( User user , String name , String type , String reason , long expire ) { } public static ChanInfo getChan ( String name ) { } public static ArrayList < ChanInfo > getChansByNick ( NickInfo ni ) { } public static ArrayList < ChanInfo > getChansByFounderNick ( NickInfo ni ) { } public static Topic getChanTopic ( String name ) { } public static ArrayList < CSAccess > getChanAccess ( ChanInfo ci , int access ) { String [ ] buf ; ArrayList < CSAccess > opList = new ArrayList < > ( ) ; try { if ( activateConnection ( ) ) { CSAccess chanOp ; String acc = new String ( ) ; switch ( access ) { case AKICK : { acc = "akick" ; break ; } case SOP : { acc = "sop" ; break ; } case AOP : { acc = "aop" ; break ; } } String query = "SELECT<seq2seq4repair_space>nick,instater,stamp<seq2seq4repair_space>" + ( ( "FROM<seq2seq4repair_space>chanaccess<seq2seq4repair_space>" + "WHERE<seq2seq4repair_space>name=?<seq2seq4repair_space>" ) + "AND<seq2seq4repair_space>access=?;" ) ; CSDatabase . preparedStmt = sql . prepareStatement ( query ) ; CSDatabase . preparedStmt . setString ( 1 , ci . getName ( ) ) ; <START_BUG> CSDatabase . preparedStmt . setString ( 1 , acc ) ; <END_BUG> CSDatabase . res3 = CSDatabase . preparedStmt . executeQuery ( ) ; while ( CSDatabase . res3 . next ( ) ) { try { chanOp = new CSAccess ( CSDatabase . res3 . getString ( 1 ) , CSDatabase . res3 . getString ( 2 ) , Long . parseLong ( CSDatabase . res3 . getString ( 3 ) ) ) ; opList . add ( chanOp ) ; } catch ( SQLException | NumberFormatException e ) { Proc . log ( CSDatabase . class . getName ( ) , e ) ; } } CSDatabase . res3 . close ( ) ; CSDatabase . preparedStmt . close ( ) ; idleUpdate ( "getChanAccess()" ) ; return opList ; } } catch ( SQLException ex ) { Proc . log ( CSDatabase . class . getName ( ) , ex ) ; } return null ; } public static boolean deleteChan ( ChanInfo ci ) { } private static ChanSetting getSettings ( String name ) { } static boolean wipeAccessList ( ChanInfo ci , int access ) { } }

Fix:
CSDatabase . preparedStmt . setString ( 2 , acc ) ;
Buggy code:
public class LogglyCollectorVerticle extends BaseCollectorVerticle { private static final long TWO_MINUTES_IN_MILLISECONDS = ( 2 * 60 ) * 1000 ; private Logger logger ; private Config config ; private List < HttpClient > httpClients ; private Base64 . Encoder base64Encoder = Base64 . getEncoder ( ) ; private DateTimeFormatter dateTimeFormatter = ISODateTimeFormat . dateTime ( ) . withZoneUTC ( ) ; public void start ( ) { } private List < HttpClient > createHttpClients ( ) { } private void collect ( Handler < Void > handler ) { } private void getExistingMetrics ( AsyncResultHandler < JsonArray > handler ) { } private List < String > getMetricNames ( ) { } private void getMetrics ( JsonArray existingMetrics , AsyncResultHandler < JsonArray > handler ) { } private void getMetrics ( MetricCollectionState state , AsyncResultHandler < JsonArray > handler ) { } private String getLogglyQuery ( Metric metricConfig , JsonObject point ) { ArrayList < String > queryParts = new ArrayList < > ( ) ; if ( metricConfig . hasQuery ( ) ) { <START_BUG> queryParts . add ( urlEncode ( metricConfig . query ( ) ) ) ; <END_BUG> } for ( String fieldName : point . getFieldNames ( ) ) { if ( ! ( fieldName . equals ( "count" ) ) ) { queryParts . add ( ( ( fieldName + ":" ) + ( point . getField ( fieldName ) . toString ( ) ) ) ) ; } } return urlEncode ( String . join ( "<seq2seq4repair_space>" , queryParts ) ) ; } private String formatTimeInMicrosecondsAsISODateTime ( long timeInMicroseconds ) { } private void setBasicAuthOnRequest ( String username , String password , HttpClientRequest request ) { } private String urlEncode ( String value ) { } private void transformMetric ( Server serverConfig , Metric metricConfig , JsonObject metric ) { } }

Fix:
queryParts . add ( metricConfig . query ( ) ) ;
Buggy code:
public class DurationFormatUtilsTest extends TestCase { public static void main ( String [ ] args ) { } public static Test suite ( ) { } public DurationFormatUtilsTest ( String s ) { } public void testConstructor ( ) { } public void testFormatDurationWords ( ) { } public void testFormatDurationPluralWords ( ) { } public void testFormatDurationHMS ( ) { } public void testFormatDurationISO ( ) { } public void testFormatDuration ( ) { } public void testFormatPeriodISO ( ) { } public void testFormatPeriod ( ) { } public void testLexx ( ) { } public void testBugzilla38401 ( ) { } public void testJiraLang281 ( ) { } public void testLowDurations ( ) { } public void testEdgeDurations ( ) { } public void testDurationsByBruteForce ( ) { } private int FOUR_YEARS = ( 365 * 3 ) + 366 ; private void bruteForce ( int year , int month , int day , String format , int calendarType ) { } private void assertEqualDuration ( String expected , int [ ] start , int [ ] end , String format ) { } private void assertEqualDuration ( String message , String expected , int [ ] start , int [ ] end , String format ) { } private void assertArrayEquals ( DurationFormatUtils [ ] obj1 , DurationFormatUtils [ ] obj2 ) { assertEquals ( "Arrays<seq2seq4repair_space>are<seq2seq4repair_space>unequal<seq2seq4repair_space>length.<seq2seq4repair_space>" , obj1 . length , obj2 . length ) ; for ( int i = 0 ; i < ( obj1 . length ) ; i ++ ) { <START_BUG> assertTrue ( ( ( ( ( ( "Index<seq2seq4repair_space>" + i ) + "<seq2seq4repair_space>not<seq2seq4repair_space>equal,<seq2seq4repair_space>" ) + ( obj1 [ i ] ) ) + "<seq2seq4repair_space>vs<seq2seq4repair_space>" ) + obj2 ) , obj1 [ i ] . equals ( obj2 [ i ] ) ) ; <END_BUG> } } }

Fix:
assertTrue ( ( ( ( ( ( "Index<seq2seq4repair_space>" + i ) + "<seq2seq4repair_space>not<seq2seq4repair_space>equal,<seq2seq4repair_space>" ) + ( obj1 [ i ] ) ) + "<seq2seq4repair_space>vs<seq2seq4repair_space>" ) + ( obj2 [ i ] ) ) , obj1 [ i ] . equals ( obj2 [ i ] ) ) ;
Buggy code:
public class MockWebApplicationTest extends TestCase { private MockWebApplication application ; public MockWebApplicationTest ( String name ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; application = new MockWebApplication ( null ) ; <START_BUG> application . getRequiredPageSettings ( ) . setHomePage ( MockPage . class ) ; <END_BUG> } public void testRenderHomePage ( ) throws Exception { } public void testClickLink ( ) throws Exception { } private boolean validateDocument ( String document , int expectedLinkClickCount ) { } }

Fix:
application . setHomePage ( MockPage . class ) ;
Buggy code:
public class ServiceReceptionCrud implements DBCrud < ServiceReception > { private static final Logger LOG = Logger . getLogger ( ServiceReceptionCrud . class . getName ( ) ) ; private Connection connection ; public ServiceReception save ( ServiceReception element , Bill parent ) throws PersistenceException , ClassNotFoundException { } @ Override public ServiceReception find ( String id ) throws PersistenceException , ClassNotFoundException { } @ Override public ServiceReception find ( int id ) throws PersistenceException , ClassNotFoundException { } public Collection < ServiceReception > findByServiceBillId ( int serviceBillId ) throws PersistenceException , ClassNotFoundException { try { <START_BUG> String query = "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>service_receptions<seq2seq4repair_space>WHERE<seq2seq4repair_space>servicebill_id<seq2seq4repair_space>=<seq2seq4repair_space>?" ; <END_BUG> connection = ConnectionManager . getInstance ( ) . getConnection ( ) ; PreparedStatement statement = connection . prepareStatement ( query ) ; statement . setInt ( 1 , serviceBillId ) ; ResultSet resultSet = statement . executeQuery ( ) ; Collection < ServiceReception > result = new HashSet < > ( ) ; while ( resultSet . next ( ) ) { ServiceReception element = createElementFromResultSet ( resultSet ) ; result . add ( element ) ; } return result ; } catch ( SQLException ex ) { ServiceReceptionCrud . LOG . log ( Level . SEVERE , null , ex ) ; throw new PersistenceException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>service<seq2seq4repair_space>reception" , ex ) ; } finally { try { ConnectionManager . getInstance ( ) . releaseConnection ( ) ; } catch ( SQLException ex ) { ServiceReceptionCrud . LOG . log ( Level . SEVERE , null , ex ) ; } } } @ Override public ServiceReception merge ( ServiceReception element ) throws PersistenceException , ClassNotFoundException { } @ Override public Collection < ServiceReception > getAll ( ) throws PersistenceException , ClassNotFoundException { } @ Override public ServiceReception refresh ( ServiceReception element ) throws PersistenceException , ClassNotFoundException { } @ Override public ServiceReception createElementFromResultSet ( ResultSet resultSet ) throws SQLException { } @ Override public ServiceReception save ( ServiceReception element ) throws PersistenceException , ClassNotFoundException { } }

Fix:
String query = "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>service_receptions<seq2seq4repair_space>WHERE<seq2seq4repair_space>servicereception_id<seq2seq4repair_space>=<seq2seq4repair_space>?" ;
Buggy code:
public class AwtFactory extends geogebra . common . factories . AwtFactory { @ Override public Color newColor ( int RGB ) { } @ Override public Color newColor ( int red , int green , int blue ) { } @ Override public Color newColor ( int red , int green , int blue , int alpha ) { } @ Override public Color newColor ( float red , float green , float blue , float alpha ) { } @ Override public Color newColor ( float red , float green , float blue ) { } @ Override public AffineTransform newAffineTransform ( ) { } @ Override public Rectangle2D newRectangle2D ( ) { } @ Override public Rectangle newRectangle ( int x , int y , int w , int h ) { } @ Override public BufferedImageAdapter newBufferedImage ( int pixelWidth , int pixelHeight , int type ) { } @ Override public Dimension newDimension ( int width , int height ) { } @ Override public Point2D newPoint2D ( ) { } @ Override public Point2D newPoint2D ( double x , double y ) { } @ Override public Rectangle newRectangle ( int i , int j ) { } @ Override public GeneralPath newGeneralPath ( ) { } @ Override public BasicStroke newMyBasicStroke ( float f ) { } @ Override public BasicStroke newBasicStroke ( float width , int endCap , int lineJoin , float miterLimit , float [ ] dash , float f ) { } @ Override public BasicStroke newBasicStroke ( float f ) { } @ Override public Line2D newLine2D ( ) { } @ Override public Rectangle newRectangle ( Rectangle bb ) { } @ Override public Rectangle newRectangle ( ) { } @ Override public Ellipse2DDouble newEllipse2DDouble ( ) { } @ Override public Ellipse2DFloat newEllipse2DFloat ( int i , int j , int k , int l ) { <START_BUG> return new geogebra . awt . Ellipse2DFloat ( ) ; <END_BUG> } @ Override public Arc2D newArc2D ( ) { } @ Override public QuadCurve2D newQuadCurve2D ( ) { } @ Override public Area newArea ( ) { } @ Override public Area newArea ( Shape shape ) { } @ Override public GeneralPath newGeneralPath ( int rule ) { } @ Override public CubicCurve2D newCubicCurve2D ( ) { } }

Fix:
return new geogebra . awt . Ellipse2DFloat ( i , j , k , l ) ;
Buggy code:
public class IPlanetEjbcTask extends Task { private boolean keepgenerated = false ; private boolean debug = false ; private Path classpath ; private File dest ; private File ejbdescriptor ; private File iasdescriptor ; private File iashome ; public void setClasspath ( Path classpath ) { } public void setDebug ( boolean debug ) { } public void setDest ( File dest ) { } public void setEjbdescriptor ( File ejbdescriptor ) { } public void setIasdescriptor ( File iasdescriptor ) { } public void setIashome ( File iashome ) { } public void setKeepgenerated ( boolean keepgenerated ) { } public Path createClasspath ( ) { if ( ( classpath ) == null ) { <START_BUG> classpath = new Path ( getProject ( ) ) ; <END_BUG> } return classpath . createPath ( ) ; } public void execute ( ) throws TaskException { } private Path getClasspath ( ) { } private SAXParser getParser ( ) throws TaskException { } private void checkConfiguration ( ) throws TaskException { } private void executeEjbc ( SAXParser saxParser ) throws TaskException { } }

Fix:
classpath = new Path ( ) ;
Buggy code:
public abstract class PluginAction extends Action implements ISelectionChangedListener , INullSelectionListener , IPluginContribution , ISelectionListener { private IActionDelegate delegate ; private SelectionEnabler enabler ; private ISelection selection ; private IConfigurationElement configElement ; private String pluginId ; private String runAttribute = ActionDescriptor . ATT_CLASS ; private static int actionCount = 0 ; boolean isAdaptableAction = false ; boolean adaptableNotChecked = true ; public PluginAction ( IConfigurationElement actionElement , String id , int style ) { } protected final void createDelegate ( ) { } protected IActionDelegate validateDelegate ( Object obj ) throws WorkbenchException { } protected void initDelegate ( ) { } protected IActionDelegate getDelegate ( ) { } protected boolean isOkToCreateDelegate ( ) { String bundleId = configElement . getDeclaringExtension ( ) . getNamespace ( ) ; <START_BUG> return BundleUtility . isActivated ( bundleId ) ; <END_BUG> } private boolean hasAdaptableType ( ) { } protected void refreshEnablement ( ) { } public void run ( ) { } public void runWithEvent ( Event event ) { } public void selectionChanged ( ISelection newSelection ) { } public void selectionChanged ( SelectionChangedEvent event ) { } public void selectionChanged ( IWorkbenchPart part , ISelection sel ) { } private ISelection getResourceAdapters ( ISelection sel ) { } public String getOverrideActionId ( ) { } protected IConfigurationElement getConfigElement ( ) { } public String getLocalId ( ) { } public String getPluginId ( ) { } }

Fix:
return BundleUtility . isActive ( bundleId ) ;
Buggy code:
public class FirewallService extends IntentService { private static final String LOG_TAG = FirewallService . class . getSimpleName ( ) ; private boolean serviceRunning = false ; private Firewall firewall ; public FirewallService ( ) { } @ Override public void onCreate ( ) { } public Firewall getFirewall ( ) { } @ Override public void onDestroy ( ) { } @ Override public int onStartCommand ( Intent intent , int flags , int startId ) { Log . i ( FirewallService . LOG_TAG , "starting<seq2seq4repair_space>firewall<seq2seq4repair_space>service." ) ; if ( serviceRunning ) { Log . i ( FirewallService . LOG_TAG , "service<seq2seq4repair_space>already<seq2seq4repair_space>running<seq2seq4repair_space>-<seq2seq4repair_space>nothing<seq2seq4repair_space>to<seq2seq4repair_space>do." ) ; return START_STICKY ; } serviceRunning = true ; <START_BUG> Notification notification = new Notification . Builder ( this ) . setContentTitle ( getString ( firewall_service_notification_title ) ) . setContentText ( getString ( firewall_service_notification_message ) ) . setSmallIcon ( R . mipmap . firewall ) . build ( ) ; <END_BUG> startForeground ( firewallService , notification ) ; Log . i ( FirewallService . LOG_TAG , "service<seq2seq4repair_space>started." ) ; return START_STICKY ; } @ Override public boolean stopService ( Intent name ) { } public void stopFirewallService ( ) { } @ Override public IBinder onBind ( Intent intent ) { } @ Override protected void onHandleIntent ( Intent intent ) { } public class FirewallBinder extends Binder { public FirewallService getService ( ) { } } }

Fix:
Notification notification = new Notification . Builder ( this ) . setContentTitle ( getString ( firewall_service_notification_title ) ) . setContentText ( getString ( firewall_service_notification_message ) ) . setSmallIcon ( firewall_launcher ) . build ( ) ;