nus-yam/ex-repair huggingface dataset:
Buggy code:
public class StartCommand extends ExtendedCommand { private HashMap < String , Integer > map ; private final Plugin plugin ; private final int speed ; public StartCommand ( String syntax , String arguments , String node , HashMap < String , Integer > map , Plugin plugin , int speed ) { } @ Override public void execute ( String [ ] args , Player player ) { String worldName = args [ 0 ] . toLowerCase ( ) ; World world = Bukkit . getServer ( ) . getWorld ( worldName ) ; if ( ( world == null ) || ( ( map . get ( worldName ) ) == null ) ) { player . sendMessage ( ( ( ( ( ChatColor . RED ) + "[GreenMile]<seq2seq4repair_space>World<seq2seq4repair_space>'" ) + worldName ) + "'<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>found!" ) ) ; return ; } if ( ( Main . chunkThread ) != null ) { player . sendMessage ( ( ( ChatColor . RED ) + "[GreenMile]<seq2seq4repair_space>Already<seq2seq4repair_space>running<seq2seq4repair_space>a<seq2seq4repair_space>thread!" ) ) ; player . sendMessage ( ( ( ChatColor . GRAY ) + "Type<seq2seq4repair_space>'//gm<seq2seq4repair_space>stop'<seq2seq4repair_space>to<seq2seq4repair_space>stop<seq2seq4repair_space>the<seq2seq4repair_space>thread." ) ) ; return ; } Main . chunkThread = new de . minestar . greenmile . threading . ChunkGenerationThread ( map . get ( worldName ) , world . getName ( ) ) ; int pSpeed = speed ; if ( ( args . length ) == 2 ) { try { pSpeed = Integer . parseInt ( args [ 1 ] ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; player . sendMessage ( ( ( ( ( ChatColor . RED ) + "Fehlerhafte<seq2seq4repair_space>Zahl,<seq2seq4repair_space>Standardgeschwindigkeit<seq2seq4repair_space>von<seq2seq4repair_space>" ) + pSpeed ) + "<seq2seq4repair_space>wird<seq2seq4repair_space>genutzt!" ) ) ; } } chunkThread . setTaskID ( Bukkit . getServer ( ) . getScheduler ( ) . scheduleSyncRepeatingTask ( plugin , chunkThread , 0L , pSpeed ) ) ; <START_BUG> player . sendMessage ( ( ( ( ( ( ( ChatColor . GREEN ) + "[GreenMile]<seq2seq4repair_space>Rendering<seq2seq4repair_space>of<seq2seq4repair_space>world<seq2seq4repair_space>'" ) + worldName ) + "'<seq2seq4repair_space>started<seq2seq4repair_space>with<seq2seq4repair_space>speed<seq2seq4repair_space>" ) + ( speed ) ) + "!" ) ) ; <END_BUG> player . sendMessage ( ( ( ChatColor . GRAY ) + "Type<seq2seq4repair_space>'//gm<seq2seq4repair_space>stop'<seq2seq4repair_space>to<seq2seq4repair_space>stop<seq2seq4repair_space>the<seq2seq4repair_space>thread." ) ) ; } }

Fix:
player . sendMessage ( ( ( ( ( ( ( ChatColor . GREEN ) + "[GreenMile]<seq2seq4repair_space>Rendering<seq2seq4repair_space>of<seq2seq4repair_space>world<seq2seq4repair_space>'" ) + worldName ) + "'<seq2seq4repair_space>started<seq2seq4repair_space>with<seq2seq4repair_space>speed<seq2seq4repair_space>" ) + pSpeed ) + "!" ) ) ;
Buggy code:
public class FolderLayout implements IFolderLayout { private ViewStack folder ; private PageLayout pageLayout ; private ViewFactory viewFactory ; public FolderLayout ( PageLayout pageLayout , ViewStack folder , ViewFactory viewFactory ) { } public void addPlaceholder ( String viewId ) { } public void addView ( String viewId ) { if ( pageLayout . checkPartInLayout ( viewId ) ) return ; try { <START_BUG> IViewDescriptor descriptor = viewFactory . getViewRegistry ( ) . find ( viewId ) ; <END_BUG> if ( descriptor == null ) { throw new PartInitException ( ( "View<seq2seq4repair_space>descriptor<seq2seq4repair_space>not<seq2seq4repair_space>found:<seq2seq4repair_space>" + viewId ) ) ; } if ( WorkbenchActivityHelper . filterItem ( descriptor ) ) { addPlaceholder ( viewId ) ; LayoutHelper . addViewActivator ( pageLayout , viewId ) ; } else { ViewPane newPart = LayoutHelper . createView ( pageLayout . getViewFactory ( ) , viewId ) ; linkPartToPageLayout ( viewId , newPart ) ; folder . add ( newPart ) ; } } catch ( PartInitException e ) { WorkbenchPlugin . log ( getClass ( ) , "addView(String)" , e ) ; } } private void linkPartToPageLayout ( String viewId , LayoutPart newPart ) { } }

Fix:
IViewDescriptor descriptor = viewFactory . getViewRegistry ( ) . find ( ViewFactory . extractPrimaryId ( viewId ) ) ;
Buggy code:
final class ServletInputStreamFacade extends ServletInputStream { private int bytesRead = 0 ; private int limit = - 1 ; private Request reqA ; ServletInputStreamFacade ( ) { } void prepare ( ) { } void setRequest ( Request reqA ) { } void recycle ( ) { } private int doRead ( ) throws IOException { } private int doRead ( byte [ ] b , int off , int len ) throws IOException { } public int read ( ) throws IOException { } public int read ( byte [ ] b ) throws IOException { } public int read ( byte [ ] b , int off , int len ) throws IOException { if ( ( limit ) != ( - 1 ) ) { if ( ( bytesRead ) == ( limit ) ) { return - 1 ; } if ( ( ( bytesRead ) + len ) > ( limit ) ) { len = ( limit ) - ( bytesRead ) ; } int numRead = doRead ( b , off , len ) ; if ( numRead > 0 ) { bytesRead += numRead ; } return numRead ; } else { <START_BUG> return 0 ; <END_BUG> } } public int readLine ( byte [ ] b , int off , int len ) throws IOException { } }

Fix:
return - 1 ;
Buggy code:
public final class Terasology { private static Terasology _instance = new Terasology ( ) ; private final Logger _logger = Logger . getLogger ( "Terasology" ) ; private final GroovyManager _groovyManager = new GroovyManager ( ) ; private final ThreadPoolExecutor _threadPool = ( ( ThreadPoolExecutor ) ( Executors . newCachedThreadPool ( ) ) ) ; private Timer _timer ; private boolean _runGame = true ; public enum GAME_STATE { UNDEFINED , MAIN_MENU , SINGLE_PLAYER ; } static Terasology . GAME_STATE _state = Terasology . GAME_STATE . MAIN_MENU ; private static Map < Terasology . GAME_STATE , IGameState > _gameStates = Collections . synchronizedMap ( new EnumMap < Terasology . GAME_STATE , IGameState > ( Terasology . GAME_STATE . class ) ) ; public static Terasology getInstance ( ) { } private Terasology ( ) { } public void init ( ) { } private void initLogger ( ) { } private void initNativeLibs ( ) { if ( System . getProperty ( "os.name" ) . equals ( "Mac<seq2seq4repair_space>OS<seq2seq4repair_space>X" ) ) addLibraryPath ( "natives//macosx" ) ; else if ( System . getProperty ( "os.name" ) . equals ( "Linux" ) ) addLibraryPath ( "natives//linux" ) ; else { addLibraryPath ( "natives//windows" ) ; <START_BUG> if ( ( System . getProperty ( "os.arch" ) . equals ( "amd64" ) ) || ( System . getProperty ( "os.arch" ) . equals ( "x86_64" ) ) ) <END_BUG> System . loadLibrary ( "OpenAL64" ) ; else System . loadLibrary ( "OpenAL32" ) ; } } private void addLibraryPath ( String s ) { } private void initOpenAL ( ) { } private void initDisplay ( ) { } private void initOpenGL ( ) { } private void checkOpenGL ( ) { } private void resizeViewport ( ) { } public void initOpenGLParams ( ) { } private void initControls ( ) { } private void initManagers ( ) { } private void initTimer ( ) { } public void run ( ) { } public void shutdown ( ) { } private void terminateThreads ( ) { } private void destroy ( ) { } public void exit ( ) { } public void addLogFileHandler ( String s , Level logLevel ) { } public String getWorldSavePath ( String worldTitle ) { } public IGameState getGameState ( Terasology . GAME_STATE s ) { } public IGameState getCurrentGameState ( ) { } public void setGameState ( Terasology . GAME_STATE state ) { } public Logger getLogger ( ) { } public double getAverageFps ( ) { } public WorldRenderer getActiveWorldRenderer ( ) { } public IWorldProvider getActiveWorldProvider ( ) { } public Player getActivePlayer ( ) { } public long getTimeInMs ( ) { } public void submitTask ( final String name , final Runnable task ) { } public int activeTasks ( ) { } public GroovyManager getGroovyManager ( ) { } public static void main ( String [ ] args ) { } }

Fix:
if ( System . getProperty ( "os.arch" ) . contains ( "64" ) )
Buggy code:
public class Main { public static void main ( String [ ] args ) { Scanner scanner = new Scanner ( System . in ) ; int [ ] input1 = Main . stringArraytoIntArray ( scanner . nextLine ( ) . split ( "\\s+" ) ) ; int width = input1 [ 0 ] ; int height = input1 [ 1 ] ; IMapData mapData = new MapData ( width , height ) ; for ( int i = 0 ; i < height ; i ++ ) { <START_BUG> int [ ] row = Main . stringArraytoIntArray ( scanner . nextLine ( ) . split ( "\\s+" ) ) ; <END_BUG> try { mapData . addRow ( row ) ; } catch ( MapSizeMismatchException e ) { e . printStackTrace ( ) ; } } IMapFactory mapFactory = new MapFactory ( ) ; IFloorMap floorMap = mapFactory . newInstance ( mapData ) ; IConnectorAlgorithm connector = new GreedyConnector ( ) ; List < INode > path = connector . findConnections ( floorMap . getNodes ( ) ) ; IPathOptimiserAlgorithm pathAlgorithm = new TravellingSalesmanAlgorithm ( ) ; pathAlgorithm . optimisePath ( path ) ; System . out . println ( path ) ; scanner . close ( ) ; } private static int [ ] stringArraytoIntArray ( String [ ] stringArray ) { } }

Fix:
int [ ] row = Main . stringArraytoIntArray ( scanner . nextLine ( ) . split ( "" ) ) ;
Buggy code:
public class ReadableDocument implements ReadablePipe { private static final String ACCEPT_XML = "application//xml,<seq2seq4repair_space>text//xml,<seq2seq4repair_space>application//xml-external-parsed-entity,<seq2seq4repair_space>text//xml-external-parsed-entity" ; private static final String ACCPET_JSON = "application//json,<seq2seq4repair_space>application//javascript,<seq2seq4repair_space>text//javascript,<seq2seq4repair_space>text//*,<seq2seq4repair_space>*//*" ; private Logger logger = LoggerFactory . getLogger ( ReadableDocument . class ) ; protected DocumentSequence documents = null ; protected String uri = null ; protected XProcRuntime runtime = null ; private int pos = 0 ; private String base = null ; private XdmNode node = null ; private boolean readDoc = false ; private Step reader = null ; private Pattern pattern = null ; public ReadableDocument ( XProcRuntime runtime ) { } public ReadableDocument ( XProcRuntime runtime , XdmNode node , String uri , String base , String mask ) { } public void canReadSequence ( boolean sequence ) { } public boolean readSequence ( ) { } public void resetReader ( ) { } public void setReader ( Step step ) { } public void setNames ( String stepName , String portName ) { } public boolean moreDocuments ( ) { } public boolean closed ( ) { } public int documentCount ( ) { } public DocumentSequence documents ( ) { } public XdmNode read ( ) throws SaxonApiException { } protected void readDoc ( ) { } private XdmNode parse ( String uri , String base ) { XdmNode doc = runtime . parse ( uri , base ) ; if ( uri . contains ( "#" ) ) { int pos = uri . indexOf ( "#" ) ; String ptr = uri . substring ( ( pos + 1 ) ) ; if ( ptr . matches ( "^[\\w]+$" ) ) { ptr = ( "element(" + ptr ) + ")" ; } <START_BUG> XPointer xptr = new XPointer ( ptr ) ; <END_BUG> Vector < XdmNode > nodes = xptr . selectNodes ( runtime , doc ) ; if ( ( nodes . size ( ) ) == 1 ) { doc = nodes . get ( 0 ) ; } else if ( ( nodes . size ( ) ) != 0 ) { throw new com . xmlcalabash . core . XProcException ( node , "XPointer<seq2seq4repair_space>matches<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>one<seq2seq4repair_space>node!?" ) ; } } return doc ; } }

Fix:
XPointer xptr = new XPointer ( ptr , ( 1024 * 1000 ) ) ;
Buggy code:
public class SnapshotManagerImplTest extends SnapshotTestBase { @ TestSubject private SnapshotManagerImpl manager ; @ Mock private SnapshotContentItemRepo snapshotContentItemRepo ; @ Mock private SnapshotRepo snapshotRepo ; @ Mock private BridgeConfiguration bridgeConfig ; @ Mock private SnapshotTaskClientHelper snapshotTaskClientHelper ; @ Mock private NotificationManager notificationManager ; @ Mock private Snapshot snapshot ; @ Mock private DuracloudEndPointConfig endPointConfig ; @ Mock private SnapshotTaskClient snapshotTaskClient ; @ Mock private StoreClientHelper storeClientHelper ; @ Before @ Override public void setup ( ) throws Exception { } @ Test public void testAddContentItem ( ) throws SnapshotException { } @ Test public void testTransferToDpnNodeComplete ( ) throws IOException , ContentStoreException , SnapshotException { } @ Test public void testTransferError ( ) throws SnapshotException { } @ Test public void testAddDuplicateAlternateIdsInSameSnapshot ( ) throws AlternateIdAlreadyExistsException { } @ Test public void testAddDuplicateAlternateIdsInDifferentSnapshot ( ) { } private void setupTaskClientHelper ( ) { } private void setupEndpoint ( ) { } @ Test public void testFinalizeSnapshots ( ) throws ContentStoreException , SnapshotException { } @ Test public void testFinalizeSnapshotsUnsuccessfulAfter3Days ( ) throws ContentStoreException , SnapshotException { List < Snapshot > snapshots = new ArrayList < > ( ) ; snapshots . add ( snapshot ) ; expect ( this . snapshotRepo . findByStatus ( eq ( CLEANING_UP ) ) ) . andReturn ( snapshots ) ; ContentStore contentStore = createMock ( ContentStore . class ) ; expect ( storeClientHelper . create ( isA ( DuracloudEndPointConfig . class ) , isA ( String . class ) , isA ( String . class ) ) ) . andReturn ( contentStore ) ; Iterator < String > it = Arrays . asList ( "test" ) . iterator ( ) ; expect ( contentStore . getSpaceContents ( isA ( String . class ) ) ) . andReturn ( it ) ; setupEndpoint ( ) ; String spaceId = "space-id" ; expect ( this . endPointConfig . getSpaceId ( ) ) . andReturn ( spaceId ) ; String adminEmail = "admin-email" ; Calendar c = Calendar . getInstance ( ) ; <START_BUG> c . add ( Calendar . DATE , ( ( - 1 ) * ( SnapshotManagerImpl . MAX_DAYS_IN_CLEANUP ) ) ) ; <END_BUG> expect ( snapshot . getModified ( ) ) . andReturn ( c . getTime ( ) ) ; expect ( snapshot . getStatus ( ) ) . andReturn ( CLEANING_UP ) ; String [ ] stringArray = new String [ ] { adminEmail } ; expect ( bridgeConfig . getDuracloudEmailAddresses ( ) ) . andReturn ( stringArray ) ; notificationManager . sendNotification ( isA ( NotificationType . class ) , isA ( String . class ) , isA ( String . class ) , eq ( adminEmail ) ) ; expectLastCall ( ) ; replayAll ( ) ; this . manager . finalizeSnapshots ( ) ; } }

Fix:
c . add ( Calendar . DATE , ( ( - 1 ) * ( ( SnapshotManagerImpl . MAX_DAYS_IN_CLEANUP ) + 1 ) ) ) ;
Buggy code:
public class ValidationSummary { private AtomicInteger attempted = new AtomicInteger ( ) ; private AtomicInteger succeeded = new AtomicInteger ( ) ; private AtomicInteger failed = new AtomicInteger ( ) ; public void incrementAttempted ( ) { } public int getAttempted ( ) { } public void incrementSucceeded ( ) { } public int getSucceeded ( ) { } public void incrementFailed ( ) { <START_BUG> succeeded . incrementAndGet ( ) ; <END_BUG> } public int getFailed ( ) { } }

Fix:
failed . incrementAndGet ( ) ;
Buggy code:
public class FilesystemObserverTestCase extends TestCase { protected FilesystemObserver observer ; protected CollectionFilesystemListener listener = new CollectionFilesystemListener ( ) ; protected File testDir ; public FilesystemObserverTestCase ( String name ) { } protected void setUp ( ) throws Exception { } protected void createObserver ( File file , FileFilter fileFilter ) { } protected void tearDown ( ) throws Exception { } public void testDirectory ( ) { } public void testFileCreate ( ) { } public void testFileUpdate ( ) { } public void testFileDelete ( ) { } public void testObserveSingleFile ( ) { } protected void checkAndNotify ( ) throws Exception { } private void checkCollectionsEmpty ( String label ) { } private void checkCollectionSizes ( String label , int dirCreate , int dirChange , int dirDelete , int fileCreate , int fileChange , int fileDelete ) { } private File touch ( File file ) { long lastModified = ( file . exists ( ) ) ? file . lastModified ( ) : 0 ; try { FileUtils . touch ( file ) ; while ( lastModified == ( file . lastModified ( ) ) ) { try { <START_BUG> Thread . sleep ( 5 ) ; <END_BUG> } catch ( InterruptedException ie ) { } FileUtils . touch ( file ) ; } } catch ( Exception e ) { fail ( ( ( ( "Touching<seq2seq4repair_space>" + file ) + ":<seq2seq4repair_space>" ) + e ) ) ; } return file ; } }

Fix:
Thread . sleep ( 50 ) ;
Buggy code:
public class TestAutomatonQuery extends LuceneTestCase { private Directory directory ; private IndexReader reader ; private IndexSearcher searcher ; private final String FN = "field" ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; directory = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , directory ) ; Document doc = new Document ( ) ; Field titleField = newTextField ( "title" , "some<seq2seq4repair_space>title" , NO ) ; Field field = newTextField ( FN , "this<seq2seq4repair_space>is<seq2seq4repair_space>document<seq2seq4repair_space>one<seq2seq4repair_space>2345" , NO ) ; Field footerField = newTextField ( "footer" , "a<seq2seq4repair_space>footer" , NO ) ; doc . add ( titleField ) ; doc . add ( field ) ; doc . add ( footerField ) ; writer . addDocument ( doc ) ; field . setStringValue ( "some<seq2seq4repair_space>text<seq2seq4repair_space>from<seq2seq4repair_space>doc<seq2seq4repair_space>two<seq2seq4repair_space>a<seq2seq4repair_space>short<seq2seq4repair_space>piece<seq2seq4repair_space>5678.91" ) ; writer . addDocument ( doc ) ; field . setStringValue ( ( "doc<seq2seq4repair_space>three<seq2seq4repair_space>has<seq2seq4repair_space>some<seq2seq4repair_space>different<seq2seq4repair_space>stuff" + "<seq2seq4repair_space>with<seq2seq4repair_space>numbers<seq2seq4repair_space>1234<seq2seq4repair_space>5678.9<seq2seq4repair_space>and<seq2seq4repair_space>letter<seq2seq4repair_space>b" ) ) ; writer . addDocument ( doc ) ; reader = writer . getReader ( ) ; searcher = newSearcher ( reader ) ; <START_BUG> writer . close ( ) ; <END_BUG> } @ Override public void tearDown ( ) throws Exception { } private Term newTerm ( String value ) { } private int automatonQueryNrHits ( AutomatonQuery query ) throws IOException { } private void assertAutomatonHits ( int expected , Automaton automaton ) throws IOException { } public void testBasicAutomata ( ) throws IOException { } public void testNFA ( ) throws IOException { } public void testEquals ( ) { } public void testRewriteSingleTerm ( ) throws IOException { } public void testRewritePrefix ( ) throws IOException { } public void testEmptyOptimization ( ) throws IOException { } public void testHashCodeWithThreads ( ) throws Exception { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class FlagsFilter extends AbstractFilter { private String criteria ; private String pattern ; public FlagsFilter ( ) { } public boolean process ( MessageFolder folder , Object uid ) throws Exception { boolean result = false ; String headerField = pattern ; int condition = FilterCriteria . getCriteria ( criteria ) ; String searchHeaderField = null ; Flags flags = folder . getFlags ( uid ) ; if ( headerField . equalsIgnoreCase ( "Answered" ) ) { result = flags . get ( ANSWERED ) ; } else if ( headerField . equalsIgnoreCase ( "Deleted" ) ) { <START_BUG> result = flags . get ( EXPUNGED ) ; <END_BUG> } else if ( headerField . equalsIgnoreCase ( "Flagged" ) ) { result = flags . get ( FLAGGED ) ; } else if ( headerField . equalsIgnoreCase ( "Recent" ) ) { result = flags . get ( RECENT ) ; } else if ( headerField . equalsIgnoreCase ( "Draft" ) ) { result = flags . get ( DRAFT ) ; } else if ( headerField . equalsIgnoreCase ( "Seen" ) ) { result = flags . get ( SEEN ) ; } else if ( headerField . equalsIgnoreCase ( "Spam" ) ) { result = ( ( Boolean ) ( folder . getAttribute ( uid , "columba.spam" ) ) ) . booleanValue ( ) ; } if ( condition == ( FilterCriteria . IS ) ) { return result ; } else { return ! result ; } } public void setUp ( FilterCriteria f ) { } }

Fix:
result = flags . get ( DELETED ) ;
Buggy code:
public class AttemptFragment extends Fragment implements LoaderManager . LoaderCallbacks < List < AttemptItem > > { @ Inject protected TestpressServiceProvider serviceProvider ; @ InjectView ( id . previous ) TextView previous ; @ InjectView ( id . next ) TextView next ; @ InjectView ( id . pager ) TestpressViewPager pager ; @ InjectView ( id . questions_list ) ListView questionsListView ; @ InjectView ( id . end ) TextView endExamButton ; @ InjectView ( id . pause_exam ) TextView pauseExamButton ; @ InjectView ( id . sliding_layout ) SlidingUpPanelLayout mLayout ; @ InjectView ( id . timer ) TextView timer ; @ InjectView ( id . filter ) Spinner filter ; ExamPagerAdapter pagerAdapter ; List < AttemptItem > filterItems = new ArrayList < > ( ) ; PanelListAdapter mPanelAdapter ; MaterialDialog progressDialog ; Attempt mAttempt ; Exam mExam ; List < AttemptItem > attemptItemList = Collections . emptyList ( ) ; CountDownTimer countDownTimer ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ OnClick ( id . question_list ) void openPanel ( ) { } @ OnClick ( id . next ) void showNextQuestion ( ) { } @ OnItemClick ( id . questions_list ) void goToQuestion ( int position ) { } @ OnClick ( id . previous ) void showPreviousQuestion ( ) { } @ OnClick ( id . end ) void endExamAlert ( ) { } @ OnClick ( id . pause_exam ) void pauseExam ( ) { } @ Override public Loader < List < AttemptItem > > onCreateLoader ( int id , final Bundle args ) { } @ Override public void onLoadFinished ( final Loader < List < AttemptItem > > loader , final List < AttemptItem > items ) { } @ Override public void onLoaderReset ( final Loader < List < AttemptItem > > loader ) { } protected void returnToHistory ( ) { <START_BUG> Intent intent = new Intent ( getActivity ( ) , MainActivity . class ) ; <END_BUG> intent . setFlags ( FLAG_ACTIVITY_CLEAR_TOP ) ; intent . putExtra ( "currentItem" , "2" ) ; startActivity ( intent ) ; getActivity ( ) . finish ( ) ; } protected void showReview ( ) { } SafeAsyncTask < Attempt > sendHeartBeat = new SafeAsyncTask < Attempt > ( ) { @ Override public Attempt call ( ) throws Exception { } @ Override protected void onPreExecute ( ) { } @ Override protected void onSuccess ( Attempt result ) { } @ Override protected void onException ( Exception e ) { } @ Override protected void onFinally ( ) { } } ; SafeAsyncTask < Attempt > endExam = new SafeAsyncTask < Attempt > ( ) { @ Override public Attempt call ( ) throws Exception { } @ Override protected void onPreExecute ( ) { } @ Override protected void onSuccess ( Attempt result ) { } @ Override protected void onException ( Exception e ) { } @ Override protected void onFinally ( ) { } } ; public static String formatTime ( final long millis ) { } public long formatMillisecond ( String inputString ) { } public void collapsePanel ( ) { } public void expandPanel ( ) { } public void setFilter ( String filter ) { } }

Fix:
Intent intent = new Intent ( getActivity ( ) , ExamsListActivity . class ) ;
Buggy code:
public interface ParseMatcher { public static class MatchResult { public Token t ; public int replace ; public MatchResult ( Token t , int replace ) { } } public static class UnaryOpMatcher implements ParseMatcher { TokenType type = TokenType . SYMBOL ; String op ; public UnaryOpMatcher ( String op ) { } public UnaryOpMatcher ( TokenType type , String op ) { } @ Override public boolean valid ( TokenType type , List < Token > tokens ) { return ( ( ( tokens . size ( ) ) >= 2 ) && ( op . equals ( tokens . get ( 0 ) . data ) ) ) && ( ( this . type ) == ( tokens . get ( 0 ) . type ) ) ; } @ Override public Result < ParseMatcher . MatchResult > transform ( TokenType type , List < Token > tokens ) { } } public static class BinOpMatcher implements ParseMatcher { TokenType type = TokenType . SYMBOL ; String op ; public BinOpMatcher ( String op ) { } public BinOpMatcher ( TokenType type , String op ) { } @ Override public boolean valid ( TokenType type , List < Token > tokens ) { <START_BUG> return ( ( tokens . size ( ) ) >= 3 ) && ( op . equals ( tokens . get ( 1 ) . data ) ) ; <END_BUG> } @ Override public Result < ParseMatcher . MatchResult > transform ( TokenType type , List < Token > tokens ) { } } public static class BlockMatcher implements ParseMatcher { TokenType type1 ; TokenType type2 ; boolean allowStatements ; public BlockMatcher ( TokenType type1 , TokenType type2 , boolean allowStatements ) { } @ Override public boolean valid ( TokenType type , List < Token > tokens ) { return ( ! ( tokens . isEmpty ( ) ) ) && ( ( tokens . get ( 0 ) . type ) == ( type1 ) ) ; } @ Override public Result < ParseMatcher . MatchResult > transform ( TokenType type , List < Token > tokens ) { } } public boolean valid ( TokenType type , List < Token > tokens ) ; public Result < ParseMatcher . MatchResult > transform ( TokenType type , List < Token > tokens ) { } }

Fix:
return ( ( ( tokens . size ( ) ) >= 3 ) && ( ( tokens . get ( 1 ) . type ) == ( this . type ) ) ) && ( op . equals ( tokens . get ( 1 ) . data ) ) ;
Buggy code:
public class PageOpenKey extends WizardPage implements Listener { public static final String PAGE_NAME = "EncryptPageOpenKey" ; private String project ; private Button bOpen = null ; private Button bEchoKeyStorePassword = null ; private Button bEchoKeyPassword = null ; private Text tKeyStore = null ; private Text tKeyStorePassword = null ; private Text tKeyName = null ; private Text tKeyPassword = null ; private static final int LABELWIDTH = 120 ; private static final String SETTING_KEYSTORE = "enc_keystore" ; private static final String SETTING_KEY_NAME = "enc_key_name" ; private Encryption encryption = null ; private Keystore keystore = null ; public PageOpenKey ( final Encryption encryption , final String project ) { } public void createControl ( final Composite parent ) { } private void createPageContent ( final Composite parent ) { } private void addListeners ( ) { } private void dialogChanged ( ) { if ( ( tKeyName . getText ( ) . length ( ) ) == 0 ) { updateStatus ( enterKeyName ) ; return ; } if ( ( tKeyPassword . getText ( ) . length ( ) ) == 0 ) { updateStatus ( enterKeyPassword ) ; return ; } if ( ( tKeyStore . getText ( ) . length ( ) ) == 0 ) { updateStatus ( selectKeystoreFile ) ; return ; } if ( ( tKeyStorePassword . getText ( ) . length ( ) ) == 0 ) { updateStatus ( enterKeystorePassword ) ; return ; } if ( new File ( tKeyStore . getText ( ) ) . exists ( ) ) { try { <START_BUG> keystore = new Keystore ( tKeyStore . getText ( ) , tKeyStorePassword . getText ( ) , "JCEKS" ) ; <END_BUG> keystore . load ( ) ; if ( ! ( keystore . containsKey ( tKeyName . getText ( ) ) ) ) { setErrorMessage ( verifyKeyAlias ) ; return ; } } catch ( Exception ex ) { setErrorMessage ( verifyAll ) ; return ; } } else { updateStatus ( keyStoreNotFound ) ; return ; } setErrorMessage ( null ) ; updateStatus ( null ) ; } private void updateStatus ( final String message ) { } public void handleEvent ( final Event e ) { } private void echoPassword ( final Event e ) { } private void openKeystore ( ) { } public IWizardPage getNextPage ( ) { } private void saveDataToModel ( ) { } private void loadSettings ( ) { } protected void storeSettings ( ) { } }

Fix:
keystore = new Keystore ( tKeyStore . getText ( ) , tKeyStorePassword . getText ( ) , Globals . KEYSTORE_TYPE ) ;
Buggy code:
public class TestIndexWriterOnDiskFull extends LuceneTestCase { public void testAddDocumentOnDiskFull ( ) throws IOException { } public void testAddIndexOnDiskFull ( ) throws IOException { } private static class FailTwiceDuringMerge extends MockDirectoryWrapper . Failure { public boolean didFail1 ; public boolean didFail2 ; @ Override public void eval ( MockDirectoryWrapper dir ) throws IOException { } } public void testCorruptionAfterDiskFullDuringMerge ( ) throws IOException { MockDirectoryWrapper dir = newDirectory ( ) ; IndexWriter w = new IndexWriter ( dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ) ) . setMergeScheduler ( new SerialMergeScheduler ( ) ) . setReaderPooling ( true ) . setMergePolicy ( newLogMergePolicy ( 2 ) ) ) ; _TestUtil . keepFullyDeletedSegments ( w ) ; ( ( LogMergePolicy ) ( w . getMergePolicy ( ) ) ) . setMergeFactor ( 2 ) ; Document doc = new Document ( ) ; doc . add ( newField ( "f" , "doctor<seq2seq4repair_space>who" , YES , ANALYZED ) ) ; w . addDocument ( doc ) ; w . commit ( ) ; w . deleteDocuments ( new Term ( "f" , "who" ) ) ; w . addDocument ( doc ) ; TestIndexWriterOnDiskFull . FailTwiceDuringMerge ftdm = new TestIndexWriterOnDiskFull . FailTwiceDuringMerge ( ) ; ftdm . setDoFail ( ) ; dir . failOn ( ftdm ) ; try { w . commit ( ) ; fail ( "fake<seq2seq4repair_space>disk<seq2seq4repair_space>full<seq2seq4repair_space>IOExceptions<seq2seq4repair_space>not<seq2seq4repair_space>hit" ) ; } catch ( IOException ioe ) { <START_BUG> assertTrue ( ftdm . didFail1 ) ; <END_BUG> } _TestUtil . checkIndex ( dir ) ; ftdm . clearDoFail ( ) ; w . addDocument ( doc ) ; w . close ( ) ; dir . close ( ) ; } public void testImmediateDiskFull ( ) throws IOException { } private void addDoc ( IndexWriter writer ) throws IOException { } private void addDocWithIndex ( IndexWriter writer , int index ) throws IOException { } }

Fix:
assertTrue ( ( ( ftdm . didFail1 ) || ( ftdm . didFail2 ) ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class JNDITestCase { @ Inject public Bundle bundle ; @ Deployment public static JavaArchive createdeployment ( ) { } @ Test public void testJNDIAccess ( ) throws Exception { bundle . start ( ) ; InitialContext iniCtx = getInitialContext ( bundle . getBundleContext ( ) ) ; <START_BUG> Object lookup = iniCtx . lookup ( "jboss" ) ; <END_BUG> assertNotNull ( "Lookup<seq2seq4repair_space>not<seq2seq4repair_space>null" , lookup ) ; try { iniCtx . createSubcontext ( "test" ) . bind ( "Foo" , new String ( "Bar" ) ) ; fail ( "UnsupportedOperationException<seq2seq4repair_space>expected" ) ; } catch ( UnsupportedOperationException ex ) { } } private InitialContext getInitialContext ( BundleContext context ) { } }

Fix:
Object lookup = iniCtx . lookup ( "java:jboss" ) ;
Buggy code:
public class Flock implements Collection < Boid > , GameObject { private static final float leaderWeight = 100.0F ; private HashMap < Boid , Flock . BoidType > boids ; private boolean visible ; public static Flock newFlock ( Boid leader , int flockSize ) { } private Flock ( ) { } public Rigidbody2D getPerceivedCenterOfMass ( Boid b ) { PVector perceivedPosition = new PVector ( 0.0F , 0.0F ) ; float perceivedOrientation = 0.0F ; PVector perceivedVelocity = new PVector ( 0.0F , 0.0F ) ; float perceivedRotation = 0.0F ; for ( Boid other : this . getOtherBoids ( b ) ) { <START_BUG> float weight = ( this . isALeader ( b ) ) ? Flock . leaderWeight : 1.0F ; <END_BUG> Rigidbody2D rigidbody2D = other . getRigidbody2D ( ) ; perceivedPosition . add ( PVector . mult ( rigidbody2D . getPosition ( ) , weight ) ) ; perceivedOrientation += rigidbody2D . getOrientation ( ) ; perceivedVelocity . add ( PVector . mult ( rigidbody2D . getLinearVelocity ( ) , weight ) ) ; perceivedRotation += rigidbody2D . getOrientation ( ) ; } perceivedPosition . div ( ( ( ( this . size ( ) ) - 1 ) + ( Flock . leaderWeight ) ) ) ; perceivedOrientation //= ( this . size ( ) ) - 1 ; perceivedVelocity . div ( ( ( ( this . size ( ) ) - 1 ) + ( Flock . leaderWeight ) ) ) ; perceivedRotation //= ( this . size ( ) ) - 1 ; return new Rigidbody2D . Builder ( ) . position ( perceivedPosition ) . orientation ( perceivedOrientation ) . velocity ( perceivedVelocity ) . rotation ( perceivedRotation ) . build ( ) ; } private List < Boid > getOtherBoids ( Boid b ) { } public List < Rigidbody2D > getOtherBoidsRigidbodies ( Boid b ) { } public boolean isALeader ( Boid b ) { } public void setVisible ( boolean visible ) { } @ Override public void update ( float timeDelta ) { } @ Override public void draw ( PApplet canvas ) { } @ Override public boolean isVisible ( ) { } @ Override public int size ( ) { } @ Override public boolean isEmpty ( ) { } @ Override public boolean contains ( Object o ) { } @ Override public Iterator < Boid > iterator ( ) { } @ Override public Object [ ] toArray ( ) { } @ Override public < T > T [ ] toArray ( T [ ] a ) { } @ Override public boolean add ( Boid e ) { } @ Override public boolean remove ( Object o ) { } @ Override public boolean containsAll ( Collection < ? > c ) { } @ Override public boolean addAll ( Collection < ? extends Boid > c ) { } @ Override public boolean removeAll ( Collection < ? > c ) { } @ Override public boolean retainAll ( Collection < ? > c ) { } @ Override public void clear ( ) { } private enum BoidType { LEADER ( - 65536 ) , FOLLOWER ( - 16777216 ) ; int color ; BoidType ( int color ) { } } }

Fix:
float weight = ( this . isALeader ( other ) ) ? Flock . leaderWeight : 1.0F ;
Buggy code:
public class StopTomcat { static final String DEFAULT_CONFIG = "conf//server.xml" ; private static StringManager sm = StringManager . getManager ( "org.apache.tomcat.resources" ) ; String configFile ; String tomcatHome ; Helper loghelper = new Logger . Helper ( "tc_log" , "StopTomcat" ) ; public StopTomcat ( ) { } public void setConfig ( String s ) { } public void setF ( String s ) { } public void setH ( String s ) { } public void setHome ( String s ) { } public void execute ( ) throws Exception { } void stopTomcat ( ) throws TomcatException { } public void execute ( ContextManager cm ) throws TomcatException { int portInt = 8007 ; InetAddress address = null ; <START_BUG> ContextInterceptor [ ] ci = cm . getContextInterceptors ( ) ; <END_BUG> for ( int i = 0 ; i < ( ci . length ) ; i ++ ) { Object con = ci [ i ] ; if ( con instanceof Ajp12ConnectionHandler ) { PoolTcpConnector tcpCon = ( ( PoolTcpConnector ) ( con ) ) ; portInt = tcpCon . getPort ( ) ; address = tcpCon . getAddress ( ) ; } if ( con instanceof Ajp12Interceptor ) { Ajp12Interceptor tcpCon = ( ( Ajp12Interceptor ) ( con ) ) ; portInt = tcpCon . getPort ( ) ; address = tcpCon . getAddress ( ) ; } } try { if ( address == null ) address = InetAddress . getLocalHost ( ) ; Socket socket = new Socket ( address , portInt ) ; OutputStream os = socket . getOutputStream ( ) ; byte [ ] stopMessage = new byte [ 2 ] ; stopMessage [ 0 ] = ( ( byte ) ( 254 ) ) ; stopMessage [ 1 ] = ( ( byte ) ( 15 ) ) ; os . write ( stopMessage ) ; socket . close ( ) ; } catch ( Exception ex ) { throw new TomcatException ( ( ( ( "Error<seq2seq4repair_space>stopping<seq2seq4repair_space>Tomcat<seq2seq4repair_space>with<seq2seq4repair_space>Ajp12<seq2seq4repair_space>on<seq2seq4repair_space>" + address ) + ":" ) + portInt ) , ex ) ; } } }

Fix:
BaseInterceptor [ ] ci = cm . getContextInterceptors ( ) ;
Buggy code:
public class MutableExecutionState implements ExecutionState { private static final long serialVersionUID = - 5926781775292208999L ; private boolean canReset ; private boolean canSubmit ; private boolean menuEnabled ; private boolean resetShown ; private boolean submitShown ; private boolean hasUnsubmittedChanges ; private boolean hasUnsubmittedGeogebraChanges ; public MutableExecutionState ( ) { } public MutableExecutionState ( boolean canReset , boolean canSubmit , boolean resetShown , boolean submitShown , boolean menuEnabled , boolean hasUnsubmittedChanges ) { } @ Override public boolean isResetShown ( ) { } @ Override public boolean isSubmitShown ( ) { } @ Override public boolean isAllowReset ( ) { } @ Override public boolean isAllowSubmit ( ) { } @ Override public boolean isMenuEnabled ( ) { } public void setCanReset ( boolean canReset ) { } public void setCanSubmit ( boolean canSubmit ) { } public void setMenuEnabled ( boolean menuEnabled ) { } public void setResetShown ( boolean resetShown ) { } public void setSubmitShown ( boolean submitShown ) { } @ Override public boolean hasUnsubmittedChanges ( ) { } public void clearUnSubmChangesFlag ( ) { } public void setUnSubmChangesFlag ( ) { } @ Override public boolean hasUnsubmittedGeogebraChanges ( ) { } public void clearUnSubmGeogebraChangesFlag ( ) { } public void setUnSubmGeogebraChangesFlag ( ) { <START_BUG> hasUnsubmittedChanges = true ; <END_BUG> } }

Fix:
hasUnsubmittedGeogebraChanges = true ;
Buggy code:
@ SuppressWarnings ( "deprecation" ) public class LocalActivityManagerFragment extends Fragment { private static final String KEY_STATE_BUNDLE = "localActivityManagerState" ; private LocalActivityManager mLocalActivityManager ; protected LocalActivityManager getLocalActivityManager ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public void onResume ( ) { } @ Override public void onPause ( ) { super . onPause ( ) ; <START_BUG> mLocalActivityManager . dispatchResume ( ) ; <END_BUG> } @ Override public void onStop ( ) { } @ Override public void onDestroy ( ) { } }

Fix:
mLocalActivityManager . dispatchPause ( getActivity ( ) . isFinishing ( ) ) ;
Buggy code:
public class Api extends AbstractModelObject { public final Object bean ; public Api ( Object bean ) { } public String getDisplayName ( ) { } public String getSearchUrl ( ) { } public void doXml ( StaplerRequest req , StaplerResponse rsp , @ QueryParameter String xpath , @ QueryParameter String wrapper , @ QueryParameter String tree , @ QueryParameter int depth ) throws IOException , ServletException { } private boolean isSimpleOutput ( Object result ) { } public void doSchema ( StaplerRequest req , StaplerResponse rsp ) throws IOException , ServletException { } public void doJson ( StaplerRequest req , StaplerResponse rsp ) throws IOException , ServletException { if ( ( ( req . getParameter ( "jsonp" ) ) == null ) || ( permit ( req ) ) ) { setHeaders ( rsp ) ; <START_BUG> rsp . serveExposedBean ( req , bean , JSON ) ; <END_BUG> } else { rsp . sendError ( HttpURLConnection . HTTP_FORBIDDEN , "jsonp<seq2seq4repair_space>forbidden;<seq2seq4repair_space>implement<seq2seq4repair_space>jenkins.security.SecureRequester" ) ; } } public void doPython ( StaplerRequest req , StaplerResponse rsp ) throws IOException , ServletException { } private boolean permit ( StaplerRequest req ) { } private void setHeaders ( StaplerResponse rsp ) { } private static final Logger LOGGER = Logger . getLogger ( Api . class . getName ( ) ) ; private static final ModelBuilder MODEL_BUILDER = new ModelBuilder ( ) ; }

Fix:
rsp . serveExposedBean ( req , bean , ( ( req . getParameter ( "jsonp" ) ) == null ? Flavor . JSON : Flavor . JSONP ) ) ;
Buggy code:
public class PhoneticEnginePerformanceTest { private static final int LOOP = 80000 ; @ Test public void test ( ) { <START_BUG> PhoneticEngine engine = new PhoneticEngine ( NameType . GENERIC , RuleType . APPROX , true ) ; <END_BUG> final String input = "Angelo" ; final long startMillis = System . currentTimeMillis ( ) ; for ( int i = 0 ; i < ( PhoneticEnginePerformanceTest . LOOP ) ; i ++ ) { engine . encode ( input ) ; } final long totalMillis = ( System . currentTimeMillis ( ) ) - startMillis ; System . out . println ( String . format ( "Time<seq2seq4repair_space>for<seq2seq4repair_space>encoding<seq2seq4repair_space>%,d<seq2seq4repair_space>times<seq2seq4repair_space>the<seq2seq4repair_space>input<seq2seq4repair_space>'%s':<seq2seq4repair_space>%,d<seq2seq4repair_space>millis." , PhoneticEnginePerformanceTest . LOOP , input , totalMillis ) ) ; } }

Fix:
final PhoneticEngine engine = new PhoneticEngine ( NameType . GENERIC , RuleType . APPROX , true ) ;
Buggy code:
public class CriteriaExpressionBuilder { public QueryExpressions getQueryExpressions ( ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected void evalAccessPaths ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected void evalOrderingAndProjection ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected Map < ExpressionImpl < ? > , Value > evalOrdering ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected void evalGrouping ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { List < Expression < ? > > groups = q . getGroupList ( ) ; MetamodelImpl model = q . getMetamodel ( ) ; PredicateImpl having = q . getGroupRestriction ( ) ; if ( groups == null ) return ; int groupByCount = groups . size ( ) ; exps . grouping = new Value [ groupByCount ] ; for ( int i = 0 ; i < groupByCount ; i ++ ) { Expression < ? > groupBy = groups . get ( i ) ; exps . grouping [ i ] = Expressions . toValue ( ( ( ExpressionImpl < ? > ) ( groupBy ) ) , factory , model , q ) ; } <START_BUG> exps . having = ( having == null ) ? factory . emptyExpression ( ) : having . toKernelExpression ( factory , model , q ) ; <END_BUG> } protected void evalDistinct ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected void evalCrossJoinRoots ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected void evalFilter ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected void evalProjections ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q , Map < ExpressionImpl < ? > , Value > exp2Vals ) { } private void getProjections ( QueryExpressions exps , List < Selection < ? > > selections , List < Value > projections , List < String > aliases , List < String > clauses , ExpressionFactory factory , CriteriaQueryImpl < ? > q , MetamodelImpl model , Map < ExpressionImpl < ? > , Value > exp2Vals ) { } protected void evalFetchJoin ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected static Expression and ( ExpressionFactory factory , org . apache . openjpa . kernel . exps . Expression e1 , org . apache . openjpa . kernel . exps . Expression e2 ) { } ResultShape < ? > getShape ( CriteriaQueryImpl < ? > q , ResultShape < ? > parent , Selection < ? > s ) { } private ResultShape < ? > evalResultShape ( CriteriaQueryImpl < ? > q ) { } }

Fix:
exps . having = ( having == null ) ? null : having . toKernelExpression ( factory , model , q ) ;
Buggy code:
public class SwtPerformanceTestCase extends TestCase { public static boolean verbose = false ; public static String [ ] imageFormats = new String [ ] { "bmp" , "jpg" , "gif" , "png" } ; public static String [ ] imageFilenames = new String [ ] { "folder" , "folderOpen" , "target" } ; public static String [ ] transparentImageFilenames = new String [ ] { "transparent.png" } ; public SwtPerformanceTestCase ( String name ) { } protected PerformanceMeter createMeter ( String id ) { Performance performance = Performance . getDefault ( ) ; <START_BUG> String scenarioId = "org.eclipse.swt<seq2seq4repair_space>" + id ; <END_BUG> PerformanceMeter meter = performance . createPerformanceMeter ( scenarioId ) ; performance . tagAsSummary ( meter , id , CPU_TIME ) ; return meter ; } protected void disposeMeter ( PerformanceMeter meter ) { } protected String getPath ( String fileName ) { } protected boolean isJ2ME ( ) { } }

Fix:
String scenarioId = "org.eclipse.swt.test." + id ;
Buggy code:
public class CategoricalTableData implements TableData { private Map < String , List > categoricalData ; public CategoricalTableData ( Map < String , List > data ) { } @ Override public List < List < Object > > getData ( List < String > order ) { List < List < Object > > data = new ArrayList < > ( ) ; for ( String key : order ) { <START_BUG> if ( key != null ) { <END_BUG> data . add ( new ArrayList < Object > ( categoricalData . get ( key ) ) ) ; } else { data . add ( null ) ; } } return data ; } @ Override public List < List < Object > > getData ( ) { } }

Fix:
if ( ( key != null ) && ( ( categoricalData . get ( key ) ) != null ) ) {
Buggy code:
public class GossipDigestAckVerbHandler implements IVerbHandler { private static Logger logger_ = LoggerFactory . getLogger ( GossipDigestAckVerbHandler . class ) ; public void doVerb ( Message message ) { InetAddress from = message . getFrom ( ) ; if ( GossipDigestAckVerbHandler . logger_ . isTraceEnabled ( ) ) GossipDigestAckVerbHandler . logger_ . trace ( "Received<seq2seq4repair_space>a<seq2seq4repair_space>GossipDigestAckMessage<seq2seq4repair_space>from<seq2seq4repair_space>{}" , from ) ; if ( ! ( instance . isEnabled ( ) ) ) { if ( GossipDigestAckVerbHandler . logger_ . isTraceEnabled ( ) ) GossipDigestAckVerbHandler . logger_ . trace ( "Ignoring<seq2seq4repair_space>GossipDigestAckMessage<seq2seq4repair_space>because<seq2seq4repair_space>gossip<seq2seq4repair_space>is<seq2seq4repair_space>disabled" ) ; return ; } byte [ ] bytes = message . getMessageBody ( ) ; DataInputStream dis = new DataInputStream ( new ByteArrayInputStream ( bytes ) ) ; try { GossipDigestAckMessage gDigestAckMessage = GossipDigestAckMessage . serializer ( ) . deserialize ( dis ) ; List < GossipDigest > gDigestList = gDigestAckMessage . getGossipDigestList ( ) ; Map < InetAddress , EndpointState > epStateMap = gDigestAckMessage . getEndpointStateMap ( ) ; if ( ( epStateMap . size ( ) ) > 0 ) { instance . notifyFailureDetector ( epStateMap ) ; instance . applyStateLocally ( epStateMap ) ; } Map < InetAddress , EndpointState > deltaEpStateMap = new HashMap < InetAddress , EndpointState > ( ) ; for ( GossipDigest gDigest : gDigestList ) { InetAddress addr = gDigest . getEndpoint ( ) ; EndpointState localEpStatePtr = instance . getStateForVersionBiggerThan ( addr , gDigest . getMaxVersion ( ) ) ; if ( localEpStatePtr != null ) deltaEpStateMap . put ( addr , localEpStatePtr ) ; } GossipDigestAck2Message gDigestAck2 = new GossipDigestAck2Message ( deltaEpStateMap ) ; <START_BUG> Message gDigestAck2Message = instance . makeGossipDigestAck2Message ( gDigestAck2 ) ; <END_BUG> if ( GossipDigestAckVerbHandler . logger_ . isTraceEnabled ( ) ) GossipDigestAckVerbHandler . logger_ . trace ( "Sending<seq2seq4repair_space>a<seq2seq4repair_space>GossipDigestAck2Message<seq2seq4repair_space>to<seq2seq4repair_space>{}" , from ) ; MessagingService . instance ( ) . sendOneWay ( gDigestAck2Message , from ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } } }

Fix:
Message gDigestAck2Message = instance . makeGossipDigestAck2Message ( gDigestAck2 , message . getVersion ( ) ) ;
Buggy code:
public class MessageDetailsRecipientAdapter extends BaseAdapter implements AbsListView . RecyclerListener { private final Context context ; private final MasterSecret masterSecret ; private final MessageRecord record ; private final Recipients recipients ; private final boolean isPushGroup ; public MessageDetailsRecipientAdapter ( Context context , MasterSecret masterSecret , MessageRecord record , Recipients recipients , boolean isPushGroup ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { if ( convertView == null ) { <START_BUG> convertView = LayoutInflater . from ( context ) . inflate ( message_details_recipient , parent , false ) ; <END_BUG> } Recipient recipient = recipients . getRecipientsList ( ) . get ( position ) ; ( ( MessageRecipientListItem ) ( convertView ) ) . set ( masterSecret , record , recipient , isPushGroup ) ; return convertView ; } @ Override public void onMovedToScrapHeap ( View view ) { } }

Fix:
convertView = LayoutInflater . from ( context ) . inflate ( message_recipient_list_item , parent , false ) ;